/* ==========================================================================
   MusicHaven feature-template systems — tracklist/audio, festival, flip cards,
   live transmissions, premium feature header, musical timeline, editorial list.
   Extends components.css; same tokens, same Edge language, reduced-motion safe
   (global kill-switch lives in tokens.css).
   ========================================================================== */

/* ----- Preview waveform (deterministic bars; sweep only while playing) ----- */
.mh-wave { display: inline-flex; align-items: flex-end; gap: 2px; height: 34px; min-width: 0; }
.mh-wave--active { height: 42px; }
.mh-wave span {
	width: 3px; border-radius: 2px; flex: none;
	height: calc(5px + var(--h, 0.5) * 20px);
	background: color-mix(in srgb, var(--sk-accent, var(--mh-gold)) 55%, transparent);
}
.mh-wave span.is-played { background: var(--sk-accent, var(--mh-gold)); }
.mh-wave--idle span { opacity: 0.55; }
@media (prefers-reduced-motion: no-preference) {
	.mh-wave--active span { animation: mh-wave-b 0.9s ease-in-out infinite alternate; animation-delay: calc(var(--i, 0) * -0.11s); }
	.mh-wave--idle span { animation: mh-wave-b 3.4s ease-in-out infinite alternate; animation-delay: calc(var(--i, 0) * -0.4s); }
}
@keyframes mh-wave-b { from { transform: scaleY(0.72); } to { transform: scaleY(1.12); } }

/* ----- Audio preview control ----- */
.mh-prevbtn {
	display: inline-flex; align-items: center; justify-content: center; gap: 7px;
	min-width: 44px; min-height: 44px; padding: 8px 14px; border-radius: var(--mh-radius-pill);
	border: 2px solid var(--sk-accent, var(--mh-gold)); background: transparent;
	color: var(--sk-text, var(--mh-ink)); font: inherit; font-weight: 800; font-size: 0.8rem; cursor: pointer;
	transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.mh-prevbtn:hover { background: var(--sk-accent, var(--mh-gold)); color: var(--sk-chip-text, #100A14); }
.mh-prevbtn:active { transform: scale(0.97); }
.mh-prevbtn[aria-pressed="true"] { background: var(--sk-accent, var(--mh-gold)); color: var(--sk-chip-text, #100A14); box-shadow: 0 8px 20px var(--sk-glow, rgba(200,164,77,0.3)); }
.mh-prevbtn--off { border-style: dashed; border-color: var(--mh-line); color: var(--mh-muted); cursor: default; }
.mh-prevbtn--off:hover { background: transparent; color: var(--mh-muted); }

/* ----- Track rows (quiet inactive, strong active) ----- */
.mh-tracklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mh-trackrow {
	display: grid; grid-template-columns: 34px minmax(0, 1.4fr) minmax(80px, 1fr) 52px auto;
	align-items: center; gap: 12px; padding: 12px 16px;
	border: 1.5px solid var(--mh-line-soft); border-radius: var(--mh-radius);
	background: var(--mh-surface); transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.mh-trackrow:hover, .mh-trackrow:focus-within { border-color: rgba(200, 164, 77, 0.55); }
.mh-trackrow.is-active {
	background: var(--sk-bg, var(--mh-surface)); color: var(--sk-text, var(--mh-ink));
	border-color: var(--sk-accent, var(--mh-gold));
	box-shadow: 0 14px 30px var(--sk-glow, rgba(200,164,77,0.25)), inset 0 1px 0 rgba(255,255,255,0.12);
	transform: translateY(-1px);
}
.mh-trackrow__num { font-family: var(--mh-serif); font-weight: 900; font-size: 1.05rem; color: var(--mh-gold-ink); text-align: center; font-variant-numeric: tabular-nums; }
.mh-trackrow.is-active .mh-trackrow__num { color: var(--sk-accent); }
.mh-trackrow__title { font-weight: 800; margin: 0; font-size: 0.98rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mh-trackrow__artist { margin: 0; font-size: 0.8rem; color: var(--mh-muted); }
.mh-trackrow.is-active .mh-trackrow__artist { color: var(--sk-muted); }
.mh-trackrow__time { font-variant-numeric: tabular-nums; font-size: 0.82rem; font-weight: 700; color: var(--mh-muted); text-align: right; }
.mh-trackrow__note { grid-column: 2 / -1; margin: 2px 0 0; font-size: 0.85rem; color: var(--mh-muted); font-style: italic; font-family: var(--mh-serif); }
.mh-trackrow__state { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mh-muted); }
@media (max-width: 599px) {
	.mh-trackrow { grid-template-columns: 28px minmax(0, 1fr) auto; }
	.mh-trackrow__wave, .mh-trackrow__time { display: none; }
}

/* ----- Editorial list item (ranked) ----- */
.mh-listitem {
	display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 16px; align-items: start;
	padding: 20px 0; border-top: 1px solid var(--mh-line-soft);
}
.mh-listitem__rank {
	font-family: var(--mh-serif); font-weight: 900; font-size: clamp(2rem, 5vw, 3rem); line-height: 1;
	background: var(--mh-grad-gold); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
	transform: rotate(var(--rot, 0deg));
}
.mh-listitem__title { font-size: clamp(1.2rem, 3.4vw, 1.6rem); font-weight: 800; margin: 0; }
.mh-listitem__artist { font-size: 0.9rem; font-weight: 700; color: var(--mh-violet-ink); margin: 2px 0 0; }
.mh-listitem__note { font-size: 0.95rem; color: var(--mh-ink-soft); margin: 8px 0 0; max-width: 62ch; }
.mh-listitem__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
@media (max-width: 599px) { .mh-listitem { grid-template-columns: 52px minmax(0, 1fr); } }

/* ----- Feature ticker (duplicated lane, exact -50%) ----- */
.mh-fticker {
	overflow: hidden; border-radius: var(--mh-radius-pill); padding: 10px 0;
	background: var(--mh-pulsebar); color: var(--mh-night-text); border: 1.5px solid rgba(228, 200, 120, 0.5);
}
.mh-fticker__lane { display: inline-flex; gap: 26px; padding-right: 26px; white-space: nowrap; font-weight: 800; font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; }
.mh-fticker__inner { display: inline-flex; }
@media (prefers-reduced-motion: no-preference) {
	.mh-fticker__inner { animation: mh-marquee var(--mh-fticker-speed, 26s) linear infinite; }
	.mh-fticker:hover .mh-fticker__inner, .mh-fticker:focus-within .mh-fticker__inner { animation-play-state: paused; }
}
.mh-fticker__dot { color: var(--mh-gold-bright); }

/* ----- Festival: tabs, stickers, lineup wall ----- */
.mh-daytabs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mh-daytabs__label { font-size: 0.7rem; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mh-muted); margin-right: 4px; }
.mh-fsticker {
	display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 6px;
	background: var(--mh-grad-gold); color: var(--mh-ink); font-weight: 900; font-size: 0.72rem;
	letter-spacing: 0.1em; text-transform: uppercase; transform: rotate(var(--rot, -2deg));
	box-shadow: 0 6px 16px rgba(200, 164, 77, 0.4), inset 0 1px 0 rgba(255,255,255,0.5);
	transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.18s ease;
}
.mh-fsticker:hover { transform: rotate(0deg) translateY(-2px) scale(1.04); box-shadow: 0 12px 26px rgba(200, 164, 77, 0.5); }
.mh-fsticker--violet { background: var(--mh-grad-violet); color: #fff; }
.mh-lineup { list-style: none; margin: 0; padding: 8px 0; display: flex; flex-wrap: wrap; gap: 14px 26px; align-items: baseline; }
.mh-lineup__item { transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1); transform: rotate(var(--rot, 0deg)); }
.mh-lineup__item.is-out { opacity: 0; transform: scale(0.92); position: absolute; visibility: hidden; }
.mh-lineup__name {
	font-family: var(--mh-serif); font-weight: 900; line-height: 1; margin: 0; letter-spacing: -0.01em;
	color: var(--sk-text, var(--mh-ink)); text-wrap: balance;
}
.mh-lineup__item--t1 .mh-lineup__name { font-size: clamp(2rem, 6vw, 3.4rem); color: var(--mh-violet-ink); }
.mh-lineup__item--t2 .mh-lineup__name { font-size: clamp(1.4rem, 4vw, 2.1rem); }
.mh-lineup__item--t3 .mh-lineup__name { font-size: clamp(1rem, 2.6vw, 1.3rem); font-family: var(--mh-sans); font-weight: 800; color: var(--mh-ink-soft); }
.mh-lineup__meta { display: block; font-family: var(--mh-sans); font-weight: 700; font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mh-gold-ink); margin-top: 3px; }

/* ----- Live Transmissions ----- */
.mh-lt-strip { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 600px) { .mh-lt-strip { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .mh-lt-strip { grid-template-columns: repeat(4, 1fr); } }
.mh-lt {
	display: flex; flex-direction: column; gap: 10px; padding: 18px;
	border-radius: var(--mh-radius); border: 1.5px solid var(--mh-line-soft);
	background: var(--mh-surface); box-shadow: var(--mh-shadow-soft); min-width: 0;
}
.mh-lt--now { border-color: rgba(228, 200, 120, 0.8); background: linear-gradient(180deg, #FFFDF7, #FBF1DE); box-shadow: 0 16px 34px rgba(200, 164, 77, 0.22); }
.mh-lt--expired { opacity: 0.62; }
.mh-lt__status { align-self: flex-start; }
.mh-lt__type { font-size: 0.68rem; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mh-muted); }
.mh-lt__title { font-family: var(--mh-serif); font-weight: 900; font-size: 1.12rem; line-height: 1.15; margin: 0; }
.mh-lt__date { font-size: 0.78rem; font-weight: 700; color: var(--mh-gold-ink); font-variant-numeric: tabular-nums; }
.mh-lt__actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: 8px; }
.mh-lt-timeline { list-style: none; margin: 0; padding: 0 0 0 26px; position: relative; display: flex; flex-direction: column; gap: 16px; }
.mh-lt-timeline::before { content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 3px; border-radius: 3px; background: var(--mh-grad-gold); opacity: 0.55; }
.mh-lt-timeline > li { position: relative; }
.mh-lt-timeline > li::before {
	content: "♪"; position: absolute; left: -26px; top: 2px; width: 20px; height: 20px; border-radius: 50%;
	display: flex; align-items: center; justify-content: center; font-size: 0.65rem;
	background: var(--mh-surface); border: 2px solid var(--mh-gold); color: var(--mh-gold-ink);
}

/* ----- Flip feature card ----- */
.mh-flipcard { perspective: 1200px; min-width: 0; }
.mh-flipcard__inner {
	position: relative; width: 100%; aspect-ratio: 4 / 5.6; min-height: 420px; transform-style: preserve-3d;
	transition: transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1);
}
/* Flip is EXPLICIT only — the Flip/Back button (or Enter/Escape on the card).
   No :hover or :focus-within flip: touching or tabbing must never flip a card. */
.mh-flipcard.is-flipped .mh-flipcard__inner { transform: rotateY(180deg); }
@media (prefers-reduced-motion: reduce) { .mh-flipcard__inner { transition: none; } }
.mh-flipcard__face { pointer-events: none; }
.mh-flipcard__face > * { pointer-events: auto; }
.mh-flipcard:not(.is-flipped) .mh-flipcard__face--back,
.mh-flipcard.is-flipped .mh-flipcard__face:not(.mh-flipcard__face--back) { visibility: hidden; }
/* MusicHaven spacing ledger (RapHaven-proven rhythm, ported 2026-08-29):
   terminal copy → control border box = 16px, control → card bottom = 16px.
   margin-top:auto is GONE — it was resolving to a ~60px cream cavity on the
   front face. Slack is absorbed by the already-flexible art well, never by the
   copy→control edge and never below the control. */
.mh-flipcard__flips { display: inline-flex; align-items: center; gap: 8px; margin-top: 0; padding-top: 0; flex: none; }
.mh-flipcard__count {
	font-size: 0.68rem; font-weight: 800; letter-spacing: 0.06em;
	color: var(--sk-muted, var(--mh-muted)); font-variant-numeric: tabular-nums;
}
.mh-flipcard__face {
	position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
	border-radius: var(--mh-radius); overflow: hidden; display: flex; flex-direction: column;
	border: 1.5px solid rgba(228, 200, 120, 0.5); box-shadow: var(--mh-shadow-soft);
	background: var(--sk-bg, var(--mh-surface)); color: var(--sk-text, var(--mh-ink));
}
.mh-flipcard__face--back { transform: rotateY(180deg); padding: 16px; gap: 8px; background: var(--sk-panel, var(--mh-surface-2)); overflow: hidden; }
/* The back's scroll lives on its content, so Return To Front stays pinned inside
   the face. The excerpt is the element that ABSORBS slack — without that, two
   margin-top:auto siblings opened a cream cavity between the copy and the
   controls. Excerpt grows, action area sits in its own bottom block. */
/* Every non-action back child shares the slack (flex-grow), so the action group
   always lands 16px off the card bottom on every back variant — tracklist,
   summary, plain copy or a CTA row. Nothing collects below the controls. */
.mh-flipcard__face--back > *:not(.mh-flipcard__flips):not(.mh-flipcard__read) { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.mh-flipcard__face--back > .mh-flipcard__read { flex: none; margin-top: 0; }
/* Back face: 8px face gap + 8px padding = 16px copy→control border box. The
   scroll region GROWS so the action group lands exactly 16px off the card
   bottom — without it, 140–170px of slack collected below the controls. */
.mh-flipcard__face--back > .mh-flipcard__flips { margin-top: 8px; padding-top: 8px; border-top: 1.5px solid color-mix(in srgb, var(--sk-accent, var(--mh-gold)) 26%, transparent); }
.mh-flipcard__face--back > .mh-flipcard__tracks,
.mh-flipcard__face--back > .mh-flipcard__summary { flex: 1 1 auto; overscroll-behavior: contain; }
.mh-flipcard__face--back:not(:has(.mh-flipcard__tracks)):not(:has(.mh-flipcard__summary)) > *:nth-last-child(2):not(.mh-flipcard__read) { flex: 1 1 auto; }
.mh-flipcard__art { aspect-ratio: 16 / 10; flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; background: var(--sk-grad, var(--mh-grad-gold)); background-image: radial-gradient(120% 130% at 80% -10%, var(--sk-glow, rgba(200,164,77,0.3)), transparent 55%), var(--sk-grad, var(--mh-grad-gold)); }
.mh-flipcard__art img { width: 100%; height: 100%; object-fit: cover; }
.mh-flipcard__body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 5px; flex: none; min-height: 0; overflow: hidden; }
/* 5px body gap + 11px = 16px from the terminal copy box to the control border box.
   Terminal copy margins are zeroed so the 16px is exact, not 16px + a UA margin. */
.mh-flipcard__body > .mh-flipcard__flips { margin-top: 11px; }
.mh-flipcard__body > *:not(.mh-flipcard__flips) { margin-bottom: 0; }
/* Same contract as the back face: the copy stack both yields AND absorbs slack,
   so the control lands 16px off the card bottom even when the body grows to
   fill a tall face. The button row never leaves the card. */
.mh-flipcard__body > *:not(.mh-flipcard__flips) { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.mh-flipcard__title { font-family: var(--mh-serif); font-weight: 900; font-size: 1.08rem; line-height: 1.14; margin: 0; }
.mh-flipcard__meta { font-size: 0.76rem; font-weight: 700; color: var(--sk-muted, var(--mh-muted)); }
/* Read More ↻ at exactly 1.5× the .mh-chip base: .9→1.35rem, 44→66px min-height,
   8/18→12/27px padding, 8→12px gap, 2→3px border. Auto-width, so the rendered
   pill is 1.5× wider; the label never wraps. */
.mh-flipcard__flipbtn { align-self: flex-start; white-space: nowrap; gap: 12px; min-height: 66px; padding: 12px 27px; border-width: 3px; font-size: 1.35rem; }
@media (max-width: 360px) { .mh-flipcard__flipbtn { font-size: 1.1rem; padding: 12px 16px; min-height: 58px; } }
.mh-flipcard__tracks { list-style: none; margin: 0; padding: 0; font-size: 0.82rem; display: flex; flex-direction: column; gap: 5px; overflow-y: auto; min-height: 0; }
.mh-flipcard__tracks li { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px dashed color-mix(in srgb, var(--sk-muted, var(--mh-muted)) 35%, transparent); padding-bottom: 4px; }
.mh-flipcard__tracks .t { font-variant-numeric: tabular-nums; color: var(--sk-muted, var(--mh-muted)); }
.mh-flipgrid { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 600px) { .mh-flipgrid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .mh-flipgrid { grid-template-columns: repeat(3, 1fr); } }

/* Optional era overlays — default OFF, opt-in via data-mh-era */
[data-mh-era="grain"] .mh-flipcard__art::after, [data-mh-era="scanline"] .mh-flipcard__art::after {
	content: ""; position: absolute; inset: 0; pointer-events: none;
}
[data-mh-era] .mh-flipcard__art { position: relative; }
[data-mh-era="grain"] .mh-flipcard__art::after { background-image: radial-gradient(rgba(0,0,0,0.16) 1px, transparent 1px); background-size: 3px 3px; opacity: 0.5; }
[data-mh-era="scanline"] .mh-flipcard__art::after { background: repeating-linear-gradient(0deg, rgba(0,0,0,0.14) 0 1px, transparent 1px 3px); }

/* ----- Premium feature header ----- */
.mh-pfh {
	position: relative; border-radius: var(--mh-radius-lg); overflow: hidden;
	background: var(--mh-surface); border: 1px solid var(--mh-line-soft);
	padding: clamp(26px, 5vw, 64px) clamp(18px, 5vw, 56px);
}
.mh-pfh--grid { background-image: repeating-linear-gradient(90deg, var(--mh-line-soft) 0 1px, transparent 1px calc(100% / 12)); }
.mh-pfh__label { display: flex; align-items: center; gap: 12px; font-size: 0.72rem; font-weight: 900; letter-spacing: 0.18em; text-transform: uppercase; color: var(--mh-gold-ink); }
.mh-pfh__label::after { content: ""; flex: 1; height: 1px; background: var(--mh-line); }
.mh-pfh__title { font-size: clamp(2.4rem, 8vw, 5.4rem); line-height: 0.98; letter-spacing: -0.025em; font-weight: 900; margin: 18px 0 0; max-width: 14ch; text-wrap: balance; }
.mh-pfh__title .stagger { display: block; }
.mh-pfh__title .stagger--2 { margin-left: clamp(0px, 6vw, 90px); }
.mh-pfh__title .stagger--3 { margin-left: clamp(0px, 3vw, 44px); color: var(--sk-accent, var(--mh-gold-ink)); }
.mh-pfh__dek { font-family: var(--mh-serif); font-style: italic; font-size: clamp(1.05rem, 2.6vw, 1.4rem); color: var(--mh-ink-soft); max-width: 52ch; margin: 20px 0 0; }
.mh-pfh__meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 22px 0 0; padding-top: 14px; border-top: 1px solid var(--mh-line); font-size: 0.8rem; font-weight: 700; color: var(--mh-muted); }
.mh-pfh__meta b { color: var(--mh-ink); }
.mh-pfh__media { margin: clamp(20px, 4vw, 36px) 0 0; border-radius: var(--mh-radius); overflow: hidden; aspect-ratio: 21 / 9; background: var(--sk-grad, var(--mh-grad-violet)); display: flex; align-items: center; justify-content: center; }
.mh-pfh__media img { width: 100%; height: 100%; object-fit: cover; object-position: var(--focal, center); }
.mh-pfh__quote { font-family: var(--mh-serif); font-style: italic; font-size: clamp(1.2rem, 3vw, 1.7rem); border-left: 4px solid var(--sk-accent, var(--mh-gold)); padding-left: 20px; margin: 24px 0 0; max-width: 48ch; }
/* The CTA row owns the top hit layer: the Living-Glass ::after sheen and the
   decorative still both sit under it and take no pointer input, so
   elementFromPoint at the pill's centre resolves to the anchor itself. */
.mh-pfh__cta { position: relative; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: clamp(22px, 4vw, 36px); }
.mh-pfh::after, .mh-pfh__still, .mh-pfh__still > * { pointer-events: none; }
/* READ THE FULL STORY ↗ at exactly 1.5× the .mh-btn base: 16→24px font,
   22→33px horizontal padding, 46→69px min-height. No transform:scale — type,
   glyph, padding and physical target all grew together. Stays one line. */
.mh-pfh__read, .mh-pfh__cta .mh-btn { font-size: 24px; font-weight: 900; min-height: 69px; padding: 15px 33px; gap: 12px; white-space: nowrap; letter-spacing: 0.01em; }
@media (max-width: 430px) { .mh-pfh__read, .mh-pfh__cta .mh-btn { font-size: 19px; padding: 14px 20px; min-height: 60px; } }
@media (min-width: 900px) {
	.mh-pfh__layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(24px, 4vw, 56px); align-items: end; }
	.mh-pfh__layout .mh-pfh__media { aspect-ratio: 4 / 5; margin: 0; }
}

/* ----- Musical timeline (staff rail, note nodes — never clocks) ----- */
.mh-mtl { position: relative; padding-left: 100px; display: flex; flex-direction: column; gap: clamp(20px, 3.4vw, 34px); }
.mh-mtl::before {
	content: ""; position: absolute; left: 29px; top: 0; bottom: 0; width: 22px;
	background: repeating-linear-gradient(90deg, var(--mh-line) 0 1px, transparent 1px 5.5px);
	opacity: 0.9;
}
.mh-mtl__era { position: relative; }
/* A live medallion replaces the decorative ::before node entirely. */
.mh-mtl__era[data-mh-medallion="true"]::before { display: none; }
.mh-mtl__era::before {
	content: var(--glyph, "♩"); position: absolute; left: -100px; top: 0; width: 80px; height: 80px; border-radius: 50%;
	display: flex; align-items: center; justify-content: center; font-size: 2.2rem;
	background: var(--sk-bg, var(--mh-surface)); color: var(--sk-accent, var(--mh-gold-ink));
	border: 2px solid var(--sk-accent, var(--mh-gold)); box-shadow: 0 8px 18px var(--sk-glow, rgba(200,164,77,0.25));
}
@media (max-width: 480px) {
	.mh-mtl { padding-left: 72px; }
	.mh-mtl::before { left: 21px; }
	.mh-mtl__era::before { left: -72px; width: 58px; height: 58px; font-size: 1.7rem; }
}
.mh-mtl__year { font-size: 0.72rem; font-weight: 900; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mh-gold-ink); }
.mh-mtl__title { font-family: var(--mh-serif); font-weight: 900; font-size: clamp(1.25rem, 3.4vw, 1.7rem); margin: 2px 0 6px; }
.mh-mtl__body { font-size: 0.94rem; color: var(--mh-ink-soft); max-width: 64ch; margin: 0; }
.mh-mtl__facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.mh-mtl__fact {
	display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: var(--mh-radius-pill);
	border: 1.5px solid var(--mh-line); font-size: 0.72rem; font-weight: 800; color: var(--mh-ink-soft);
	font-variant-numeric: tabular-nums; background: var(--mh-surface);
}
.mh-eranav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }

/* ----- Timeline medallion: the note IS the play control -------------------
   One fixed 60×60 (52×52 mobile) circle, absolutely positioned in the staff
   lane. Every state — idle note, loading, playing pause, paused play, progress
   ring, provider handoff, unconnected — renders INSIDE that same circle, and
   because it is out of flow no state change can move the editorial column.
   Play/pause truth and progress come from window.HavenAudio (real player
   events); nothing here simulates playback. */
.mh-med {
	position: absolute; left: -90px; top: 10px; width: 60px; height: 60px; border-radius: 50%;
	display: grid; place-items: center; padding: 0; flex: none; box-sizing: border-box;
	background: var(--sk-bg, var(--mh-surface)); color: var(--sk-accent, var(--mh-gold-ink));
	border: 2px solid var(--sk-accent, var(--mh-gold));
	box-shadow: 0 8px 18px var(--sk-glow, rgba(200, 164, 77, 0.25)), inset 0 1.5px 0 rgba(255, 255, 255, 0.7);
	font: inherit; cursor: pointer;
}
.mh-med__glyph { grid-area: 1 / 1; font-size: 1.7rem; line-height: 1; display: block; }
.mh-med__glyph--sym { font-size: 1.35rem; font-weight: 900; }
/* Progress ring: a real conic sweep driven by the player's own timeupdate. */
.mh-med__ring { grid-area: 1 / 1; position: absolute; inset: -5px; border-radius: 50%; pointer-events: none; }
.mh-med[data-mh-state="playing"] { border-color: var(--sk-accent, var(--mh-gold)); }
.mh-med:hover { filter: brightness(1.05); }
.mh-med:active { transform: translateY(1px); }
.mh-med:focus-visible { outline: 3px solid var(--mh-gold-ink); outline-offset: 3px; }
.mh-med--off { cursor: default; opacity: 0.72; border-style: dashed; }
.mh-med__qa {
	position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
	text-transform: uppercase; line-height: 1.25; color: var(--mh-muted);
}
.mh-med__sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 480px) {
	.mh-med { left: -69px; width: 52px; height: 52px; }
	.mh-med__glyph { font-size: 1.45rem; }
	.mh-med__glyph--sym { font-size: 1.15rem; }
}
@media (prefers-reduced-motion: reduce) { .mh-med:active { transform: none; } }

/* ----- Inline provider drawer: the real adapter-built player, in place -----
   It opens beneath its own era, never in a new window. Reserved height keeps
   the editorial column from moving when the provider frame paints. */
/* ----- Sound Line: the resolved player IN the era's own row -----------------
   The lane is reserved on every era carrying a record (idle included), and the
   player fills it absolutely, so activation contributes ZERO height: the active
   era's height and every following era's position are untouched. No full-width
   drawer, no page-wide provider panel, no transport control out here — the
   medallion is the only transport. */
.mh-mtl__era[data-mh-medallion="true"] { padding-right: var(--mh-sl-w, 312px); }
.mh-mtl__slot {
	position: absolute; top: 50%; right: 0; transform: translateY(-50%);
	width: var(--mh-sl-w, 312px); max-width: 100%; height: 152px;
	border-radius: 14px; overflow: hidden;
	border: 1.5px solid rgba(212, 162, 58, 0.32);
	background: rgba(26, 14, 36, 0.04);
}
.mh-mtl__slot[data-mh-active="true"] {
	border-color: rgba(212, 162, 58, 0.55); background: #1A0E24;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 14px 34px -20px rgba(26, 14, 36, 0.5);
}
.mh-mtl__slotframe { position: absolute; inset: 0; display: block; width: 100%; height: 100%; border: 0; background: #120A19; }
.mh-mtl__slotnote {
	position: absolute; bottom: 6px; left: 10px; margin: 0; z-index: 1;
	font-size: 0.62rem; font-weight: 900; letter-spacing: 0.06em; text-transform: uppercase;
	color: #E4C878; pointer-events: none; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}
.mh-mtl__slot[data-mh-provider="YouTube"] { height: 176px; }
@media (max-width: 700px) {
	.mh-mtl__era[data-mh-medallion="true"] { padding-right: var(--mh-sl-w, 148px); }
	.mh-mtl__slot { width: var(--mh-sl-w, 148px); height: 132px; }
	.mh-mtl__slot[data-mh-provider="YouTube"] { height: 132px; }
}

/* ----- Procedural front-art motifs (flip cards) — skin-recolored, no imagery ----- */
.mh-motif { position: relative; overflow: hidden; }
.mh-motif i { position: absolute; inset: 0; pointer-events: none; }
.mh-motif--grooves i:nth-child(1) { background: repeating-radial-gradient(circle at 50% 54%, rgba(0,0,0,0.32) 0 1.5px, transparent 1.5px 7px); }
.mh-motif--grooves i:nth-child(2) { background: radial-gradient(circle at 50% 54%, var(--sk-accent, #E4C878) 0 9%, rgba(0,0,0,0.55) 9.5% 12%, transparent 12.5%); }
.mh-motif--grooves i:nth-child(3) { background: linear-gradient(115deg, rgba(255,255,255,0.22), transparent 34%); }
.mh-motif--drumgrid i:nth-child(1) { background: repeating-linear-gradient(0deg, rgba(0,0,0,0.22) 0 1px, transparent 1px 25%), repeating-linear-gradient(90deg, rgba(0,0,0,0.22) 0 1px, transparent 1px 12.5%); }
.mh-motif--drumgrid i:nth-child(2) { background: linear-gradient(var(--sk-accent, #E4C878), var(--sk-accent, #E4C878)) 12.5% 25% / 12% 24% no-repeat, linear-gradient(var(--sk-accent, #E4C878), var(--sk-accent, #E4C878)) 62.5% 50% / 12% 24% no-repeat, linear-gradient(rgba(255,255,255,0.5), rgba(255,255,255,0.5)) 87.5% 75% / 12% 24% no-repeat; }
.mh-motif--drumgrid i:nth-child(3) { background: radial-gradient(120% 90% at 0% 100%, rgba(0,0,0,0.3), transparent 55%); }
.mh-motif--tape i:nth-child(1) { background: linear-gradient(180deg, transparent 30%, rgba(0,0,0,0.4) 30% 70%, transparent 70%); }
.mh-motif--tape i:nth-child(2) { background: radial-gradient(circle at 30% 50%, var(--sk-accent, #E4C878) 0 8%, rgba(0,0,0,0.6) 8.5% 13%, transparent 13.5%), radial-gradient(circle at 70% 50%, var(--sk-accent, #E4C878) 0 8%, rgba(0,0,0,0.6) 8.5% 13%, transparent 13.5%); }
.mh-motif--tape i:nth-child(3) { background: repeating-linear-gradient(90deg, rgba(255,255,255,0.12) 0 2px, transparent 2px 9px); mix-blend-mode: overlay; }
.mh-motif--choir i:nth-child(1) { background: repeating-linear-gradient(90deg, rgba(0,0,0,0.3) 0 10%, transparent 10% 12.5%); }
.mh-motif--choir i:nth-child(2) { background: linear-gradient(180deg, var(--sk-accent, #E4C878) 0 12%, transparent 12%); opacity: 0.85; }
.mh-motif--choir i:nth-child(3) { background: radial-gradient(140% 70% at 50% 108%, rgba(255,255,255,0.28), transparent 60%); }
.mh-motif--strings i:nth-child(1) { background: repeating-linear-gradient(64deg, rgba(0,0,0,0.34) 0 1.5px, transparent 1.5px 14%); }
.mh-motif--strings i:nth-child(2) { background: radial-gradient(circle at 24% 72%, var(--sk-accent, #E4C878) 0 4%, transparent 4.5%), radial-gradient(circle at 46% 55%, var(--sk-accent, #E4C878) 0 4%, transparent 4.5%), radial-gradient(circle at 68% 38%, rgba(255,255,255,0.7) 0 4%, transparent 4.5%); }
.mh-motif--strings i:nth-child(3) { background: linear-gradient(295deg, rgba(255,255,255,0.18), transparent 40%); }
.mh-motif--live i:nth-child(1) { background: repeating-conic-gradient(from 240deg at 50% 112%, rgba(255,255,255,0.16) 0 5deg, transparent 5deg 14deg); }
.mh-motif--live i:nth-child(2) { background: radial-gradient(90% 46% at 50% 112%, var(--sk-accent, #E4C878) 0 22%, transparent 60%); opacity: 0.8; }
.mh-motif--live i:nth-child(3) { background: radial-gradient(rgba(0,0,0,0.5) 1px, transparent 1px) 0 88% / 9px 7px repeat-x, radial-gradient(rgba(0,0,0,0.4) 1px, transparent 1px) 4px 94% / 11px 6px repeat-x; }

/* ----- Premium feature procedural still (no fake photography) ----- */
.mh-pfh__still { position: absolute; inset: 0; display: block; overflow: hidden; }
.mh-pfh__still i { position: absolute; inset: 0; }
.mh-pfh__still-disc { background: radial-gradient(circle at var(--focal, 62% 30%), var(--sk-accent, #E4C878) 0 6%, rgba(0,0,0,0.62) 6.5% 9%, transparent 9.5%), repeating-radial-gradient(circle at var(--focal, 62% 30%), rgba(0,0,0,0.34) 0 1.5px, transparent 1.5px 8px); }
.mh-pfh__still-hairlines { background: repeating-linear-gradient(90deg, rgba(255,255,255,0.09) 0 1px, transparent 1px 25%), repeating-linear-gradient(0deg, rgba(255,255,255,0.07) 0 1px, transparent 1px 25%); }
.mh-pfh__still-glow { background: radial-gradient(120% 100% at 0% 110%, var(--sk-glow, rgba(200,164,77,0.3)), transparent 55%), linear-gradient(200deg, rgba(255,255,255,0.1), transparent 40%); }
.mh-pfh__still-glyph { position: absolute; left: 50%; top: 58%; transform: translate(-50%, -50%); font-family: var(--mh-serif); font-weight: 900; font-size: clamp(3rem, 8vw, 5.5rem); color: color-mix(in srgb, var(--sk-accent, #E4C878) 85%, #fff); text-shadow: 0 4px 30px rgba(0,0,0,0.45); }

/* ----- Feature Universe gateway tiles (home) ----- */
.mh-fu { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.mh-fu__tile { display: flex; flex-direction: column; gap: 8px; padding: 18px; text-decoration: none; border-radius: 18px; border: 1.5px solid rgba(228, 200, 120, 0.5); background: radial-gradient(120% 130% at 82% -10%, var(--sk-glow, rgba(200, 164, 77, 0.25)), transparent 55%), linear-gradient(155deg, color-mix(in srgb, var(--sk-panel, #2B1A3E) 46%, #1C1128) 0%, #1C1128 115%); color: #F3ECE0; box-shadow: 0 12px 26px rgba(43, 21, 61, 0.16), 0 2px 0 rgba(82, 39, 111, 0.2); transition: transform 0.18s ease, box-shadow 0.18s ease; }
.mh-fu__tile:hover { transform: translateY(-2px); box-shadow: 0 18px 34px rgba(43, 21, 61, 0.24), 0 3px 0 rgba(82, 39, 111, 0.24); }
.mh-fu__glyph { font-size: 1.7rem; line-height: 1; color: var(--sk-accent, #E4C878); }
.mh-fu__name { font-family: var(--mh-serif); font-weight: 900; font-size: 1.12rem; line-height: 1.15; margin: 0; color: #FFFDF7; }
.mh-fu__dek { margin: 0; font-size: 0.82rem; font-weight: 600; color: #C6B7D6; }
.mh-fu__go { margin-top: auto; font-size: 0.78rem; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sk-accent, #E4C878); }

/* Poster-wall status colors + gallery dimming (attribute-driven — no style holes) */
[data-mh-lt-status="now"] { color: #E4C878 !important; }
[data-mh-lt-status="expired"] { color: #948D92 !important; }
[data-mh-dim="true"] { opacity: 0.55; }

/* Deterministic rank tilt (fixed bank, applied by attribute — no runtime styles) */
[data-mh-rot="r0"] { transform: rotate(-1.2deg); }
[data-mh-rot="r1"] { transform: rotate(-0.6deg); }
[data-mh-rot="r2"] { transform: rotate(0deg); }
[data-mh-rot="r3"] { transform: rotate(0.8deg); }
[data-mh-rot="r4"] { transform: rotate(-0.8deg); }
[data-mh-rot="r5"] { transform: rotate(1.2deg); }
[data-mh-rot="r6"] { transform: rotate(0.4deg); }
[data-mh-rot="r7"] { transform: rotate(-0.4deg); }


/* ----- Premium feature: in-page story disclosure ----- */
.mh-btn--disclose { display: inline-flex; align-items: center; gap: 10px; }
.mh-btn__caret {
	width: 0; height: 0; flex: none;
	border-left: 6px solid transparent; border-right: 6px solid transparent;
	border-top: 7px solid currentColor;
	transition: transform 0.22s ease;
}
[aria-expanded="true"] > .mh-btn__caret { transform: rotate(180deg); }
.mh-story { overflow: hidden; }
.mh-story[hidden] { display: none; }
.mh-story__inner { animation: mh-story-in 0.34s cubic-bezier(0.2, 0.7, 0.3, 1) both; }
@keyframes mh-story-in { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }
.mh-story__rule { height: 1px; background: var(--mh-line); margin: 0 0 clamp(20px, 3vw, 30px); }
.mh-story__kicker { font-size: 0.74rem; font-weight: 900; letter-spacing: 0.16em; text-transform: uppercase; color: var(--mh-gold-ink); margin: 0 0 10px; }
.mh-story__views { font-size: 0.78rem; font-weight: 800; color: var(--mh-ink-soft); font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { .mh-btn__caret { transition: none; } .mh-story__inner { animation: none; } }
