:root {
  --bg: #f6f3ea;
  --bg-elev: #fffefa;
  --bg-soft: #ebeadc;
  --text: #14221a;
  --muted: #55645a;
  --line: #d8dccb;
  --accent: #a3222f;
  --accent-strong: #84151f;
  --gold: #b0802a;
  --lyrics-dot: #1d4ed8;
  --danger: #8a2f1a;
  --shadow: 0 8px 28px rgba(16, 48, 30, .09);
  --radius: 14px;
  --topbar: 64px;
  --font: "Outfit", system-ui, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0d1712;
  --bg-elev: #15231b;
  --bg-soft: #1d3025;
  --text: #f1eee2;
  --muted: #a8b9ac;
  --line: #2d4336;
  --accent: #ea6a74;
  --accent-strong: #f49aa1;
  --gold: #e6c370;
  --lyrics-dot: #60a5fa;
  --danger: #e08a72;
  --shadow: 0 8px 28px rgba(0, 0, 0, .38);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}
img { max-width: 100%; display: block; }
a { color: var(--accent-strong); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--gold); }
button, input { font: inherit; color: inherit; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -3rem; background: var(--accent);
  color: #fff; padding: .5rem .8rem; border-radius: 8px; z-index: 20;
}
.skip-link:focus { top: .6rem; }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 10;
  height: var(--topbar);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1.1rem;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.logo {
  display: flex; align-items: center; gap: .55rem;
  color: var(--text); text-decoration: none; font-weight: 700;
  letter-spacing: -.03em; font-size: 1.25rem;
}
.logo-mark { color: #2a7d52; display: flex; }
[data-theme="dark"] .logo-mark { color: #5cc08a; }
.logo { flex: 0 0 auto; }
.search {
  display: flex; align-items: stretch;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 640px;
  width: auto;
  margin-inline: auto;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.theme-toggle { flex: 0 0 auto; }
.search input {
  flex: 1; min-width: 0;
  border: 0; background: transparent;
  padding: .55rem 1rem .55rem 1.1rem;
  outline: none;
}
.search input::placeholder { color: var(--muted); }
.search-btn, .theme-toggle {
  border: 0; background: transparent; color: var(--muted);
  display: grid; place-items: center; cursor: pointer;
  width: 44px; height: 40px;
}
.search-btn { border-left: 1px solid var(--line); }
.search-btn:hover, .theme-toggle:hover { color: var(--text); background: var(--bg-soft); }
.theme-toggle { border: 1px solid var(--line); border-radius: 999px; width: 42px; height: 42px; background: var(--bg-elev); }
[data-theme="dark"] .theme-icon-light { display: none; }
[data-theme="light"] .theme-icon-dark, :root:not([data-theme]) .theme-icon-dark { display: none; }
[data-theme="light"] .theme-icon-light, :root:not([data-theme]) .theme-icon-light { display: inline-flex; }
[data-theme="dark"] .theme-icon-dark { display: inline-flex; }

/* Home */
.home { max-width: 2800px; margin: 0 auto; padding: 1.4rem 1.2rem 3rem; }
.watch { max-width: 1400px; margin: 0 auto; padding: 1.4rem 1.2rem 3rem; }
.home-intro h1 {
  font-size: clamp(1.5rem, 2.4vw, 2.05rem);
  letter-spacing: -.03em; margin: 0 0 .4rem; font-weight: 700;
}
.home-intro { margin: 0 0 1.2rem; }
.lede { margin: 0; color: var(--muted); max-width: 62ch; }
.count { margin: .35rem 0 0; color: var(--muted); font-size: .92rem; }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(max(240px, calc((100% - 3 * var(--gx, 1rem)) / 4)), 1fr));
  gap: 1.15rem 1rem;
}
.card {
  color: inherit; text-decoration: none;
  display: flex; flex-direction: column; gap: .55rem;
  border-radius: 12px;
}
.card:hover .thumb img { transform: scale(1.03); }
.card:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.thumb {
  position: relative; aspect-ratio: 16 / 9;
  border-radius: 12px; overflow: hidden;
  background: var(--bg-soft);
  box-shadow: var(--shadow);
}
.thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .35s ease;
}
.duration {
  position: absolute; right: .4rem; bottom: .4rem;
  background: rgba(0,0,0,.82); color: #fff;
  font-size: .72rem; font-weight: 600;
  padding: .12rem .35rem; border-radius: 4px;
}
.badge {
  position: absolute; left: .4rem; top: .4rem;
  background: color-mix(in srgb, var(--bg-elev) 88%, transparent);
  color: var(--accent-strong);
  font-size: .68rem; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase;
  padding: .15rem .4rem; border-radius: 999px;
  border: 1px solid var(--line);
}
.card-title {
  margin: 0; font-size: 1rem; font-weight: 600;
  letter-spacing: -.01em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-meta { margin: 0; color: var(--muted); font-size: .86rem; }
/* Home grid: text scales with card width (baseline = ~332px card at the old 1400px layout). */
.grid { --gx: clamp(1rem, 1.1vw, 2rem); gap: clamp(1.15rem, 1.25vw, 2.3rem) var(--gx); }
.grid .card { container-type: inline-size; gap: clamp(.55rem, 2.2cqi, 1.1rem); }
.grid .card-title { font-size: clamp(1rem, 4.8cqi, 2rem); }
.grid .card-meta { font-size: clamp(.86rem, 4.15cqi, 1.72rem);  margin-top: calc(.1em - clamp(.55rem, 2.2cqi, 1.1rem)); line-height: 1.35; }
.grid .duration { font-size: clamp(.72rem, 3.5cqi, 1.44rem); }
.grid .badge { font-size: clamp(.68rem, 3.3cqi, 1.36rem); }
.home-intro h1 { font-size: clamp(1.5rem, 2.4vw, 4.1rem); }
.home .lede { font-size: clamp(1rem, 1.1vw, 1.9rem); }
.home-intro { margin-bottom: clamp(1.2rem, 1.2vw, 2.2rem); }
.empty { padding: 3rem 0; color: var(--muted); text-align: center; }

/* Watch layout */
.watch-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  grid-template-areas:
    "player lyrics"
    "meta   lyrics"
    "upnext lyrics";
  gap: 1rem 1.2rem;
  align-items: start;
}
/* Desktop watch: equal, tighter side margins (aligned with the top bar),
   video at 95% of its previous width, and all recovered space given to lyrics.
   Font size on .lyrics-scroll is unchanged. Mobile (max-width: 1100px) is untouched. */
@media (min-width: 1101px) {
  .watch {
    max-width: none;
    width: 100%;
    padding-left: 1.1rem;
    padding-right: 1.1rem;
  }
  /* Previous video width was (layout - 340px - 1.2rem gap), with 1.2rem page padding
     and a 1400px cap. Keep that historical size, then take 95% of it. */
  .watch-layout {
    grid-template-columns: minmax(0, calc(0.95 * (100% - 340px - 1.4rem))) minmax(0, 1fr);
  }
}
@media (min-width: 1400px) {
  /* Historical video width capped at 1400px - 2.4rem padding - 1.2rem gap - 340px. */
  .watch-layout {
    grid-template-columns: calc(0.95 * (1400px - 3.6rem - 340px)) minmax(0, 1fr);
  }
}
@media (min-width: 1101px) {
  .watch-layout.has-video-size {
    grid-template-columns: minmax(0, calc(var(--video-frac, .6) * (100% - 1.2rem))) minmax(0, 1fr);
  }
  .watch-layout.is-resizing { transition: grid-template-columns .4s cubic-bezier(.22, .61, .36, 1); }
}
.size-control {
  float: right; display: flex; align-items: center; gap: .6rem;
  margin: .3rem 0 .4rem 1rem; font-size: .8rem; font-weight: 600; color: var(--muted);
}
.size-slider { position: relative; width: 120px; display: flex; align-items: center; }
.size-control input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 22px; margin: 0;
  background: transparent; cursor: pointer;
}
.size-control input[type="range"]::-webkit-slider-runnable-track { height: 4px; background: transparent; }
.size-slider::before {
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 8px; transform: translateY(-50%);
  background: radial-gradient(circle, var(--muted) 1.8px, transparent 2.3px) left center / 4px 4px no-repeat,
              radial-gradient(circle, var(--muted) 1.8px, transparent 2.3px) center center / 4px 4px no-repeat,
              radial-gradient(circle, var(--muted) 1.8px, transparent 2.3px) right center / 4px 4px no-repeat,
              linear-gradient(var(--line), var(--line)) center / 100% 4px no-repeat;
  border-radius: 999px; padding: 0 6px; background-origin: content-box; background-clip: content-box;
  pointer-events: none; z-index: 1;
}
.size-slider::before { left: 0; right: 0; }
.size-control input[type="range"] { position: relative; z-index: 2; }
.size-control input[type="range"]::-moz-range-track { height: 4px; background: transparent; }
.size-control input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 16px; height: 16px; margin-top: -6px;
  border-radius: 50%; background: var(--accent); border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.3); transition: transform .15s ease;
}
.size-control input[type="range"]::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%; background: var(--accent); border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.3);
}
.size-control input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.15); }
@media (max-width: 1100px) {
  .size-control > label:not(.autoplay-switch),
  .size-control .size-slider { display: none; }
}
.player-wrap { grid-area: player; }
.song-meta {
  grid-area: meta;
  padding-inline: clamp(0.35rem, 3.2vw, 2.75rem);
}
.up-next { grid-area: upnext; }
.player {
  position: relative; aspect-ratio: 16 / 9;
  background: #000; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow);
}
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Mini player: the existing .player (and its iframe) is restyled to
   position:fixed. .player-wrap keeps the original height so the page
   does not jump, and the iframe node is never recreated. */
.player.is-mini {
  position: fixed;
  z-index: 40;
  top: calc(var(--topbar-offset, var(--topbar)) + 0.5rem);
  right: 0.5rem;
  width: var(--mini-player-width, clamp(180px, 25vw, 320px));
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.12);
}
@media (min-width: 600px) and (max-width: 1024px) {
  .player.is-mini {
    width: var(--mini-player-width, 40vw);
  }
}
.mini-player-close {
  display: none;
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 3;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(16, 14, 10, 0.8);
  color: #fff;
  cursor: pointer;
  place-items: center;
  line-height: 0;
}
.player.is-mini .mini-player-close { display: grid; }

.mini-gesture-overlay {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 1;
  touch-action: none;
  background: transparent;
  user-select: none;
  -webkit-user-select: none;
}
.player.is-mini .mini-gesture-overlay { display: block; }

.mini-scrub {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 7px;
  pointer-events: none;
}
.mini-scrub-track {
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  overflow: hidden;
  transition:
    height 200ms cubic-bezier(0.34, 1.45, 0.64, 1),
    background 200ms ease,
    box-shadow 200ms ease;
}
.mini-scrub-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.78);
}
.mini-gesture-overlay.is-seeking .mini-scrub-track {
  height: 11px;
  background: rgba(20, 16, 12, 0.4);
  backdrop-filter: blur(14px) saturate(1.25);
  -webkit-backdrop-filter: blur(14px) saturate(1.25);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16), 0 4px 16px rgba(0, 0, 0, 0.28);
}
.mini-gesture-overlay.is-seeking .mini-scrub-fill {
  background: rgba(255, 255, 255, 0.92);
}
.mini-scrub-times {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .25rem;
  margin-bottom: 6px;
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 200ms cubic-bezier(0.34, 1.45, 0.64, 1),
    transform 200ms cubic-bezier(0.34, 1.45, 0.64, 1);
  font-family: var(--font);
}
.mini-gesture-overlay.is-seeking .mini-scrub-times {
  opacity: 1;
  transform: translateY(0);
}
.mini-scrub-pill {
  background: rgba(16, 14, 10, 0.72);
  backdrop-filter: blur(10px) saturate(1.2);
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
  color: #fff;
  font-size: .68rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  padding: .12rem .42rem;
  border-radius: 999px;
  letter-spacing: .01em;
  line-height: 1.3;
}
.mini-scrub-delta {
  color: #fff;
  font-size: .68rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.65);
  letter-spacing: .01em;
  min-width: 0;
}
.mini-scrub-delta[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
  .mini-scrub-track,
  .mini-scrub-times {
    transition-duration: 0.01ms;
  }
}

.mini-player-close:hover,
.mini-player-close:focus-visible {
  background: rgba(16, 14, 10, 0.95);
  outline: 2px solid #fff;
  outline-offset: 1px;
}


.card-title.has-lyrics,
.watch-title.has-lyrics {
  display: flex;
  align-items: flex-start;
  gap: .4em;
  -webkit-line-clamp: unset;
  overflow: visible;
}
.card-title.has-lyrics .title-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-width: 0;
  flex: 1;
}
.watch-title {
  margin: 0 0 .25rem; font-size: clamp(1.25rem, 2vw, 1.7rem);
  letter-spacing: -.03em;
  font-weight: 700;
}
.watch-title.has-lyrics .title-text { min-width: 0; flex: 1; }
.lyrics-dot {
  flex: none;
  width: .42em;
  height: .42em;
  margin-top: calc((1.5em - .42em) / 2);
  border-radius: 50%;
  background: var(--lyrics-dot);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--lyrics-dot) 35%, transparent);
}
.song-meta .byline { margin: 0 0 .7rem; color: var(--muted); }
.song-meta .note { margin: .4rem 0 0; color: var(--muted); max-width: 70ch; }

.song-story {
  margin: 1.15rem auto 0;
  max-width: 70ch;
  font-family: var(--serif);
  font-size: calc(1.08rem + 2pt);
  line-height: 1.7;
  color: var(--text);
}
.song-story .story-headline {
  font-family: var(--serif);
  font-size: calc(1.32rem + 2pt);
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 .7rem;
  color: var(--text);
}
.song-story p { margin: 0 0 .9rem; }
.song-story .story-intro { color: var(--text); }
.song-story .story-conclusion { margin-bottom: 0; }
.song-story .story-subhead,
.song-story .story-sources h3 {
  font-family: var(--serif);
  font-size: calc(1.12rem + 2pt);
  font-weight: 600;
  line-height: 1.35;
  margin: 1.15rem 0 .4rem;
  color: var(--text);
}
.song-story .story-sources {
  margin-top: 1.15rem;
  padding-top: .85rem;
  border-top: 1px solid var(--line);
  font-size: .95rem;
  color: var(--muted);
}
.song-story .story-sources h3 { margin-top: 0; }
.song-story .story-sources ul {
  margin: 0;
  padding: 0 0 0 1.15rem;
}
.song-story .story-sources li { margin: .2rem 0; }
.song-story.is-collapsed .story-rest { display: none; }
.song-story.is-collapsed .story-preview {
  max-height: var(--preview-h, 12rem);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent);
  mask-image: linear-gradient(to bottom, #000 72%, transparent);
}
.story-toggle {
  display: inline-block;
  border: 0;
  background: transparent;
  color: var(--accent-strong);
  font-family: var(--font);
  font-size: .92rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  margin: .15rem 0 0;
  letter-spacing: .01em;
}
.story-toggle:hover { color: var(--gold); }
.song-story.is-collapsed .story-toggle-less { display: none; }
.song-story:not(.is-collapsed) .story-toggle-more { display: none; }
@media (max-width: 420px) {
  .song-story { font-size: calc(1.04rem + 2pt); }
  .song-story .story-headline { font-size: calc(1.2rem + 2pt); }
}

.meta-row { display: flex; flex-wrap: wrap; gap: .45rem .8rem; font-size: .9rem; color: var(--muted); }

.lyrics-panel, .up-next-list {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.side-col {
  grid-area: lyrics;
  position: sticky; top: calc(var(--topbar-offset, var(--topbar)) + .75rem);
  max-height: calc(100vh - var(--topbar) - 1.5rem);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
  overflow: auto;
}
.side-col > .lyrics-panel:not(.alt-versions) {
  position: static;
  max-height: none;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.side-col .lyrics-scroll {
  flex: 1 1 auto;
  min-height: 0;
}
.side-col > .alt-versions {
  flex: 0 0 auto;
  overflow: visible;
  min-height: auto;
}
.lyrics-panel {
  display: flex; flex-direction: column;
  overflow: hidden;
}
.panel-head {
  padding: .425rem 1.1rem .35rem;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: baseline; justify-content: space-between; gap: .6rem;
}
.panel-head h2 { margin: 0; font-size: .95rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }

.alt-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  padding: .85rem 1.1rem 1.15rem;
}
.alt-item {
  color: inherit; text-decoration: none;
  min-width: 0;
  display: flex; flex-direction: column; gap: .35rem;
}
.alt-item .thumb { border-radius: 8px; box-shadow: none; }
.alt-item .card-title { font-size: .88rem; }
.alt-item .card-meta { font-size: .78rem; }
.alt-versions.is-collapsed .alt-item:nth-child(n + 3) { display: none; }
.alt-more {
  border: 0; background: transparent;
  color: var(--accent-strong);
  font: inherit; font-size: .85rem; font-weight: 600;
  cursor: pointer; padding: 0;
  letter-spacing: .02em;
}
.alt-more:hover { color: var(--gold); }

.lyrics-scroll {
  overflow: auto; padding: 1.15rem clamp(1.3rem, 7%, 2.8rem) 1.6rem;
  font-family: var(--serif);
  font-size: calc(1.14rem + 2.67px); line-height: 1.7;
}
.lyrics-scroll .verse {
  max-width: 46ch;
  margin: 0 auto 1.2rem;
}
.lyrics-scroll .lyrics-placeholder {
  max-width: 46ch;
  margin-left: auto;
  margin-right: auto;
}
.verse { margin: 0 0 1.2rem; }
.verse-label {
  font-family: var(--font);
  font-size: .72rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--gold); margin: 0 0 .25rem;
}
.verse p { margin: 0; }
.lyrics-placeholder {
  font-family: var(--font);
  color: var(--muted);
  background: var(--bg-soft);
  border-radius: 12px;
  padding: 1.1rem 1rem;
}
.lyrics-placeholder strong { display: block; color: var(--text); margin-bottom: .35rem; font-family: var(--font); }

.mobile-tabs { display: none; }
.up-next-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 1.1rem 0 .7rem; }
.up-next .up-next-head h2 { margin: 0; }
.autoplay-switch {
  position: relative; display: inline-flex; align-items: center; gap: .5rem; cursor: pointer;
  font-size: .85rem; font-weight: 600; color: var(--muted); user-select: none;
}
.autoplay-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.autoplay-track {
  position: relative; width: 36px; height: 20px; border-radius: 999px;
  background: var(--line); transition: background .2s ease;
}
.autoplay-knob {
  position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s ease;
}
.autoplay-switch input:checked + .autoplay-track { background: var(--accent); }
.autoplay-switch input:checked + .autoplay-track .autoplay-knob { transform: translateX(16px); }
.autoplay-switch input:focus-visible + .autoplay-track { outline: 2px solid var(--accent); outline-offset: 2px; }
.up-next h2 {
  margin: 1.1rem 0 .7rem; font-size: .95rem;
  letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.up-item {
  display: grid; grid-template-columns: 154px minmax(0, 1fr);
  gap: .7rem; color: inherit; text-decoration: none;
  padding: .45rem; border-radius: 10px;
}
.up-item:hover { background: var(--bg-soft); }
.up-item .thumb { border-radius: 8px; box-shadow: none; }
.up-item .card-title { font-size: .92rem; }
.watch-loading, .watch-error { padding: 3rem 0; color: var(--muted); }

.site-foot {
  border-top: 1px solid var(--line);
  padding: 1.2rem 1.2rem 2rem;
  color: var(--muted); font-size: .88rem; text-align: center;
}
.site-foot p { margin: 0 auto; max-width: 70ch; }

@media (max-width: 1100px) {
  .watch-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "player"
      "meta"
      "tabs"
      "panel";
  }
  .side-col { position: static; max-height: none; overflow: visible; }
  .lyrics-panel { position: static; max-height: none; }
  .mobile-tabs {
    display: flex; grid-area: tabs; gap: .4rem;
    background: var(--bg-soft); padding: .3rem; border-radius: 999px; width: max-content;
  }
  .mobile-tabs button {
    border: 0; background: transparent; color: var(--muted);
    padding: .4rem .95rem; border-radius: 999px; cursor: pointer; font-weight: 600;
  }
  .mobile-tabs button[aria-selected="true"] {
    background: var(--bg-elev); color: var(--text); box-shadow: var(--shadow);
  }
  .tab-panel[hidden] { display: none; }
  .watch-layout .side-col, .watch-layout .up-next { grid-area: panel; }
  .side-col > .alt-versions { order: 2; }
}

@media (max-width: 720px) {
  .topbar { gap: .7rem; padding: 0 .8rem; }
  .home, .watch { padding: 1rem .8rem 2.5rem; }
  .up-item { grid-template-columns: 128px minmax(0, 1fr); }
}

@media (max-width: 420px) {
  .topbar { gap: .45rem; padding: 0 .55rem; }
  .logo-text { display: none; }
  .search input { padding: .45rem .55rem .45rem .75rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card .thumb img { transition: none; }
}

.now-playing {
  margin: 0 0 .6rem; padding: .45rem .7rem; border-radius: 10px;
  background: var(--bg-soft); color: var(--muted); font-size: .9rem;
}
.now-playing a { color: var(--accent-strong); font-weight: 600; text-decoration: none; }
.now-playing a:hover { text-decoration: underline; }
.now-playing span { margin-left: .35rem; }
.up-item.is-playing { background: var(--bg-soft); box-shadow: inset 3px 0 0 var(--accent); }

@media (min-width: 1101px) {
  .watch-layout[data-video-step="1"] .song-story,
  .watch-layout[data-video-step="2"] .song-story { margin-left: clamp(0rem, 2vw, 2.5rem); margin-right: auto; }
}
