/* Harmonica Live Preview Panel */
.hlp-toggle {
	position: fixed;
	top: 50%;
	left: 0;
	z-index: 99999;
	width: 32px;
	min-height: 132px;
	padding: 12px 6px;
	transform: translateY(-50%);
	writing-mode: vertical-rl;
	text-orientation: mixed;
	border-radius: 0 8px 8px 0;
	border: 1px solid rgba(255,255,255,0.2);
	background: #1a1a1a;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.12em;
	cursor: pointer;
	box-shadow: 0 4px 16px rgba(0,0,0,0.25);
	transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
}
.hlp-toggle:hover {
	background: #000;
	border-color: rgba(255,255,255,0.38);
	box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}
.hlp-toggle[aria-expanded="true"] {
	background: #1a1a1a;
	border-color: rgba(255,255,255,0.38);
}

.hlp-panel {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 99998;
	width: 312px;
	height: 100vh;
	max-height: 100vh;
	overflow-y: auto;
	background: #fff;
	color: #1a1a1a;
	border-right: 1px solid rgba(0,0,0,0.08);
	border-radius: 0;
	box-shadow: 8px 0 32px rgba(0,0,0,0.14);
	padding: 0;
	display: none;
	font-family: "Inter", "Noto Sans JP", sans-serif;
	font-size: 13px;
	line-height: 1.5;
}
@media (min-width: 901px) {
	body.hlp-sidebar-active {
		padding-left: 312px;
	}

	body.hlp-sidebar-active .site-header,
	body.hlp-sidebar-active .lp-header {
		left: 312px;
		width: calc(100% - 312px);
	}
}
.hlp-preview body.lp-page,
.hlp-preview body:not(.wp-admin) {
	background: var(--portal-bg, #fff) !important;
	color: var(--portal-text, #1a1a1a);
}
.hlp-preview .lp-page,
.hlp-preview .lp-main,
.hlp-preview .lp-footer,
.hlp-preview .lp-header,
.hlp-preview .wp-block-group.is-style-card,
.hlp-preview .wp-block-column.is-style-card,
.hlp-preview .wp-block-table table {
	border-color: var(--portal-border, #e0e0e0) !important;
}
.hlp-preview .wp-block-group.is-style-card,
.hlp-preview .wp-block-column.is-style-card {
	background: var(--portal-card-bg, color-mix(in srgb, var(--portal-bg, #fff) 92%, var(--portal-accent, #1a1a1a) 8%));
	color: var(--portal-card-text, var(--portal-text, #1a1a1a));
}
.hlp-preview a {
	color: var(--portal-link, currentColor);
}
.hlp-preview .hm-hero--minimal,
.hlp-preview .hm-hero--left,
.hlp-preview .hm-hero--split {
	background: var(--portal-bg, #fff);
	color: var(--portal-text, #1a1a1a);
}
.hlp-preview .hm-hero__eyebrow {
	color: var(--portal-muted, rgba(26,26,26,0.58)) !important;
}
.hlp-preview .hm-hero__lede,
.hlp-preview .hm-hero p:not(.hm-hero__eyebrow) {
	color: var(--portal-text, #1a1a1a) !important;
}
.hlp-preview .hm-hero--accent,
.hlp-preview .wp-block-button__link {
	background: var(--portal-accent, #1a1a1a) !important;
	color: var(--portal-accent-text, #fff) !important;
	border-color: var(--portal-accent, #1a1a1a) !important;
}
.hlp-preview .hm-theme-lp-hero {
	transition: background 0.18s ease, color 0.18s ease;
}
.hlp-preview .hm-theme-lp-hero.hm-hero--dark {
	background: #1a1a1a !important;
	color: #fff !important;
}
.hlp-preview .hm-theme-lp-hero.hm-hero--dark .hm-hero__eyebrow {
	color: #a2c4c9 !important;
}
.hlp-preview .hm-theme-lp-hero.hm-hero--dark .hm-hero__lede {
	color: #ccc !important;
}
.hlp-preview .hm-theme-lp-hero.hm-hero--gradient {
	background: linear-gradient(135deg, #1a1a1a 0%, #2c3e50 50%, #34495e 100%) !important;
	color: #fff !important;
}
.hlp-preview .hm-theme-lp-hero.hm-hero--gradient .hm-hero__eyebrow {
	color: rgba(255,255,255,0.6) !important;
}
.hlp-preview .hm-theme-lp-hero.hm-hero--gradient .hm-hero__lede {
	color: rgba(255,255,255,0.8) !important;
}
.hlp-preview .hm-theme-lp-hero.hm-hero--left {
	justify-items: start;
	text-align: left;
}
.hlp-preview .hm-theme-lp-hero.hm-hero--left .hm-hero__lede {
	margin-left: 0;
}
.hlp-preview .hm-theme-lp-hero.hm-hero--split {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(220px, 0.78fr);
	column-gap: clamp(24px, 5vw, 72px);
	text-align: left;
	justify-items: stretch;
}
.hlp-preview .hm-theme-lp-hero.hm-hero--split > * {
	grid-column: 1;
}
.hlp-preview .hm-theme-lp-hero.hm-hero--split::after {
	content: "";
	grid-column: 2;
	grid-row: 1 / span 4;
	align-self: stretch;
	min-height: 360px;
	border: 1px solid var(--portal-border, rgba(0,0,0,0.12));
	background:
		linear-gradient(135deg, color-mix(in srgb, var(--portal-accent, #1a1a1a) 18%, transparent), transparent 58%),
		var(--portal-bg-alt, #f0f0f0);
}
.hlp-preview .hm-theme-lp-hero.hm-hero--split .hm-hero__lede {
	margin-left: 0;
	max-width: none;
}
.hlp-preview .hero__title,
.hlp-preview .hm-hero__title,
.hlp-preview .hm-hero__heading,
.hlp-preview .wp-block-cover h1,
.hlp-preview .wp-block-cover h2 {
	font-size: var(--portal-hero-size, clamp(36px, 7vw, 64px)) !important;
}
.hlp-panel[open] {
	display: block;
}

.hlp-panel__header {
	padding: 68px 20px 14px;
	border-bottom: 1px solid #e0e0e0;
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.hlp-panel__title {
	font-size: 15px;
	font-weight: 700;
	margin: 0;
}
.hlp-panel__reset {
	font-size: 12px;
	color: #888;
	background: none;
	border: 1px solid #ddd;
	border-radius: 4px;
	padding: 2px 8px;
	cursor: pointer;
}
.hlp-panel__reset:hover {
	color: #C11920;
	border-color: #C11920;
}

.hlp-section {
	padding: 14px 20px;
	border-bottom: 1px solid #f0f0f0;
}
.hlp-section:last-child {
	border-bottom: none;
}
.hlp-section__label {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #888;
	margin: 0 0 10px;
}
.hlp-section__sub-label {
	font-size: 11px;
	font-weight: 700;
	color: #888;
	margin: 12px 0 8px;
}

/* Color Scheme Chips */
.hlp-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.hlp-chip {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 5px 10px;
	border: 2px solid #e0e0e0;
	border-radius: 6px;
	background: #fff;
	cursor: pointer;
	font-size: 12px;
	font-weight: 500;
	transition: border-color 0.15s;
}
.hlp-chip:hover {
	border-color: #888;
}
.hlp-chip[aria-pressed="true"] {
	border-color: #1a1a1a;
	font-weight: 700;
}
.hlp-chip__swatch {
	width: 16px;
	height: 16px;
	border-radius: 50%;
	border: 1px solid rgba(0,0,0,0.1);
	flex-shrink: 0;
}

/* Font Select */
.hlp-select {
	width: 100%;
	padding: 8px 10px;
	border: 1px solid #ddd;
	border-radius: 6px;
	font-size: 13px;
	background: #fff;
	cursor: pointer;
}
.hlp-select:focus {
	outline: 2px solid #1a1a1a;
	outline-offset: 1px;
}

/* Hero Pattern / Size Buttons */
.hlp-patterns {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 6px;
}
.hlp-sizes {
	display: flex;
	gap: 4px;
}
.hlp-pattern-btn,
.hlp-size-btn {
	flex: 1;
	padding: 7px 4px;
	border: 2px solid #e0e0e0;
	border-radius: 6px;
	background: #fff;
	cursor: pointer;
	font-size: 12px;
	font-weight: 500;
	text-align: center;
	transition: border-color 0.15s;
}
.hlp-pattern-btn:hover,
.hlp-size-btn:hover {
	border-color: #888;
}
.hlp-pattern-btn[aria-pressed="true"],
.hlp-size-btn[aria-pressed="true"] {
	border-color: #1a1a1a;
	font-weight: 700;
}

.hlp-sample {
	display: grid;
	gap: 10px;
}
.hlp-sample-list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}
.hlp-sample-card,
.hlp-sample-prose {
	border: 1px solid var(--portal-border, #e0e0e0);
	background: var(--portal-card-bg, color-mix(in srgb, var(--portal-bg, #fff) 92%, var(--portal-accent, #1a1a1a) 8%));
	color: var(--portal-card-text, var(--portal-text, #1a1a1a));
	border-radius: var(--portal-card-radius, 0px);
	overflow: hidden;
}
.hlp-sample-card {
	display: flex;
	flex-direction: column;
}
.hlp-sample-card__body,
.hlp-sample-prose {
	padding: 12px;
}
.hlp-sample-thumb {
	display: block;
	aspect-ratio: 16 / 9;
	background:
		linear-gradient(135deg, color-mix(in srgb, var(--portal-accent, #1a1a1a) 18%, transparent), transparent 62%),
		var(--portal-bg-alt, #f0f0f0);
	border-bottom: 1px solid var(--portal-border, #e0e0e0);
}
.hlp-sample-list--card-compact {
	gap: 8px;
}
.hlp-sample-list--card-compact .hlp-sample-card__body {
	padding: 10px;
}
.hlp-sample-list--card-compact .hlp-sample-thumb {
	display: none;
}
.hlp-sample-list--magazine {
	grid-template-columns: 1fr 1fr;
}
.hlp-sample-list--magazine .hlp-sample-card:first-child {
	grid-column: 1 / -1;
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
}
.hlp-sample-list--magazine .hlp-sample-card:first-child .hlp-sample-thumb {
	border-right: 1px solid var(--portal-border, #e0e0e0);
	border-bottom: 0;
}
.hlp-sample-list--magazine .hlp-sample-card:first-child h4 {
	font-size: 17px;
}
.hlp-sample-meta {
	margin: 0 0 6px;
	color: var(--portal-muted, #777);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.04em;
}
.hlp-sample-card h4 {
	margin: 0 0 8px;
	font-family: var(--portal-heading-font, inherit);
	font-size: 15px;
	line-height: 1.45;
}
.hlp-sample-card p,
.hlp-sample-prose p {
	margin: 0 0 8px;
}
.hlp-sample-card p:last-child,
.hlp-sample-prose p:last-child {
	margin-bottom: 0;
}
.hlp-sample-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.hlp-sample-tags span {
	border: 1px solid var(--portal-border, #e0e0e0);
	background: var(--portal-bg, #fff);
	color: var(--portal-link, currentColor);
	border-radius: 3px;
	padding: 4px 8px;
	font-size: 11px;
	font-weight: 700;
}
.hlp-sample-prose {
	font-family: var(--portal-body-font, inherit);
	line-height: 1.9;
}

/* Mobile */
@media (max-width: 900px) {
	.hlp-panel {
		top: auto;
		left: 8px;
		right: 8px;
		width: auto;
		height: min(76vh, 620px);
		bottom: 8px;
		border-radius: 12px;
		border: 1px solid rgba(0,0,0,0.08);
		box-shadow: 0 -8px 32px rgba(0,0,0,0.18);
	}
	.hlp-toggle {
		top: 50%;
		left: 0;
		bottom: auto;
		width: 32px;
		min-height: 116px;
	}
	.hlp-preview .hm-theme-lp-hero.hm-hero--split {
		grid-template-columns: 1fr;
	}
	.hlp-preview .hm-theme-lp-hero.hm-hero--split::after {
		grid-column: 1;
		grid-row: auto;
		min-height: 180px;
		order: -1;
	}
	.hlp-sample-list,
	.hlp-sample-list--magazine {
		grid-template-columns: 1fr;
	}
	.hlp-sample-list--magazine .hlp-sample-card:first-child {
		grid-column: auto;
		grid-template-columns: 1fr;
	}
	.hlp-sample-list--magazine .hlp-sample-card:first-child .hlp-sample-thumb {
		border-right: 0;
		border-bottom: 1px solid var(--portal-border, #e0e0e0);
	}
	.hlp-panel__header {
		padding-top: 16px;
	}
}
