/* RAD Flipbook · loud, mobile-first, Spotify-Wrapped energy.
   The palette rotates per card via CSS variables on .stage.
   Mobile = vertical card. Desktop ≥ 900px = landscape two-pane flashcard. */

:root {
  --bg-0: #08000f;
  --bg-1: #170029;
  --ink: #fff8ff;
  --ink-dim: rgba(255, 248, 255, 0.62);
  --accent-1: #ff1493;
  --accent-2: #ffe60d;
  --accent-3: #00e5ff;
  --accent-4: #c6ff00;
  --sa-top: env(safe-area-inset-top, 0px);
  --sa-bottom: env(safe-area-inset-bottom, 0px);
  --dock-height: 64px;
  --dock-room: calc(var(--dock-height) + 28px + var(--sa-bottom));
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg-0);
  color: var(--ink);
  font-family: "Space Grotesk", -apple-system, system-ui, sans-serif;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
html { scroll-behavior: smooth; }

body {
  background:
    radial-gradient(1200px 600px at 20% 0%, color-mix(in oklab, var(--accent-1) 28%, transparent), transparent 60%),
    radial-gradient(900px 500px at 90% 30%, color-mix(in oklab, var(--accent-3) 22%, transparent), transparent 60%),
    radial-gradient(1000px 700px at 50% 100%, color-mix(in oklab, var(--accent-4) 18%, transparent), transparent 65%),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-0) 100%);
  transition: background 0.6s ease;
  padding-bottom: var(--dock-room);
  -webkit-tap-highlight-color: transparent;
}

body::after {
  content: "";
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' seed='3'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.08 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: 0.5;
  pointer-events: none;
  mix-blend-mode: overlay;
  z-index: 1;
}

/* topbar */
.topbar {
  position: relative;
  z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(12px + var(--sa-top)) 22px 8px;
}
.brand {
  display: inline-flex; align-items: baseline; gap: 8px;
  font-family: "Bricolage Grotesque", "Space Grotesk", sans-serif;
}
.brand-mark {
  font-weight: 900;
  font-size: 28px;
  letter-spacing: -0.02em;
  color: var(--accent-2);
  text-shadow: 2px 2px 0 var(--accent-1);
}
.brand-sub {
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--ink);
}
.rad-link {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-dim);
  text-decoration: none;
  padding: 9px 13px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  transition: all 0.2s ease;
  white-space: nowrap;
  touch-action: manipulation;
}
.rad-link:hover, .rad-link:active { color: var(--ink); border-color: var(--accent-2); }
.topbar-actions { display: inline-flex; gap: 8px; align-items: center; }
.lib-trigger {
  background: transparent;
  display: inline-flex; align-items: center; gap: 6px;
}
.lib-heart { color: var(--accent-1); font-size: 13px; }
.lib-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px; font-weight: 700;
  background: var(--accent-2);
  color: #0a0014;
  border-radius: 999px;
  margin-left: 4px;
}
.lib-count[data-empty="1"] { background: rgba(255,255,255,0.12); color: var(--ink-dim); }

/* save button state */
.dock-save .save-heart { font-size: 16px; color: var(--ink); transition: color .15s ease, transform .2s ease; }
.dock-save[aria-pressed="true"] { background: color-mix(in oklab, var(--accent-1) 28%, transparent); border: 1px solid color-mix(in oklab, var(--accent-1) 60%, transparent); }
.dock-save[aria-pressed="true"] .save-heart { color: var(--accent-1); transform: scale(1.18); }
@keyframes heartPop {
  0% { transform: scale(1); }
  40% { transform: scale(1.5); }
  100% { transform: scale(1.18); }
}
.dock-save.just-saved .save-heart { animation: heartPop 0.4s ease; }

/* ── library sheet ─────────────────────────────────────── */
.library {
  position: fixed; inset: 0;
  z-index: 100;
  display: none;
}
.library[aria-hidden="false"] { display: block; }
.library-backdrop {
  position: absolute; inset: 0;
  background: rgba(5, 0, 12, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.library-sheet {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(960px, calc(100% - 24px));
  max-height: min(85dvh, 820px);
  background: linear-gradient(180deg, #1a002a 0%, #08000f 100%);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 24px;
  box-shadow: 0 40px 100px -20px rgba(0,0,0,0.8);
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: sheetIn 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
@keyframes sheetIn {
  from { opacity: 0; transform: translate(-50%, -46%) scale(0.96); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.library-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 20px 22px 12px;
  gap: 12px;
}
.library-title {
  font-family: "Bricolage Grotesque", "Space Grotesk", sans-serif;
  font-weight: 900;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.library-title .lib-h { color: var(--accent-1); margin-right: 4px; }
.library-sub {
  margin-top: 4px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-dim);
  text-transform: uppercase;
}
.library-close {
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.08);
  border: 0;
  border-radius: 999px;
  color: var(--ink);
  font-size: 22px;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  touch-action: manipulation;
}
.library-close:hover { background: rgba(255,255,255,0.16); }

.library-actions {
  display: flex; gap: 8px;
  padding: 0 22px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  align-items: center;
}
.library-btn {
  font-family: "Bricolage Grotesque", "Space Grotesk", sans-serif;
  font-weight: 900;
  font-size: 12px;
  letter-spacing: 0.08em;
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  touch-action: manipulation;
}
.library-play {
  background: linear-gradient(120deg, var(--accent-1), var(--accent-3));
  color: #0a0014;
  box-shadow: 0 10px 24px -10px var(--accent-1);
}
.library-play:hover { transform: translateY(-1px); }
.library-stop {
  background: rgba(255,255,255,0.1);
  color: var(--ink);
  border: 1px solid rgba(255,255,255,0.2);
}
.library-clear {
  background: transparent;
  color: var(--ink-dim);
  margin-left: auto;
  padding: 10px 12px;
  letter-spacing: 0.08em;
  font-size: 11px;
}
.library-clear:hover { color: var(--accent-1); }

.library-grid {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px 22px 22px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}
.lib-card {
  display: flex; flex-direction: column;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  text-align: left;
  position: relative;
}
.lib-card:hover { transform: translateY(-2px); border-color: color-mix(in oklab, var(--accent-1) 50%, transparent); background: rgba(255,255,255,0.06); }
.lib-card.is-playing { border-color: var(--accent-2); box-shadow: 0 0 0 2px color-mix(in oklab, var(--accent-2) 50%, transparent); }
.lib-card-thumb {
  aspect-ratio: 16 / 9;
  background: #000;
  background-size: cover; background-position: center;
  position: relative;
}
.lib-card-thumb::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,0.7));
}
.lib-card-rm {
  position: absolute;
  top: 6px; right: 6px;
  z-index: 2;
  width: 26px; height: 26px;
  border: 0;
  border-radius: 999px;
  background: rgba(10, 0, 25, 0.78);
  color: var(--ink);
  font-size: 14px;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.15s;
}
.lib-card:hover .lib-card-rm { opacity: 1; }
.lib-card-rm:hover { background: var(--accent-1); color: #0a0014; }
.lib-card-meta {
  padding: 10px 12px 12px;
}
.lib-card-artist {
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-2);
  font-weight: 700;
}
.lib-card-title {
  font-family: "Bricolage Grotesque", "Space Grotesk", sans-serif;
  font-weight: 800;
  font-size: 14px;
  color: var(--ink);
  margin-top: 2px;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.lib-card-year {
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px;
  color: var(--ink-dim);
  margin-top: 6px;
}

.library-empty {
  padding: 26px 22px 32px;
  text-align: center;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: var(--ink-dim);
  letter-spacing: 0.04em;
}
.library-empty-heart { color: var(--accent-1); font-size: 14px; margin: 0 2px; }
.library.has-saves .library-empty { display: none; }
.library:not(.has-saves) .library-grid { display: none; }
.library:not(.has-saves) .library-actions .library-play,
.library:not(.has-saves) .library-actions .library-clear { opacity: 0.45; pointer-events: none; }

/* play-all banner on main page when active */
.playall-banner {
  position: fixed;
  left: 50%;
  top: calc(8px + var(--sa-top));
  transform: translateX(-50%);
  z-index: 35;
  background: var(--accent-2);
  color: #0a0014;
  font-family: "Bricolage Grotesque", "Space Grotesk", sans-serif;
  font-weight: 900;
  font-size: 11px;
  letter-spacing: 0.12em;
  padding: 8px 14px;
  border-radius: 999px;
  display: none;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 30px -8px rgba(0,0,0,0.6);
}
.playall-banner.show { display: inline-flex; }
.playall-banner button {
  background: rgba(10, 0, 25, 0.8);
  color: var(--accent-2);
  border: 0;
  border-radius: 999px;
  padding: 3px 8px;
  font-family: inherit;
  font-weight: 800;
  font-size: 10px;
  letter-spacing: 0.1em;
  cursor: pointer;
}

/* stage / card — mobile single column */
.stage {
  position: relative; z-index: 5;
  max-width: 520px;
  margin: 0 auto;
  padding: 6px 12px 12px;
}
.card {
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 22px;
  padding: 12px 14px 16px;
  box-shadow:
    0 30px 80px -20px rgba(0,0,0,0.6),
    0 0 0 1px color-mix(in oklab, var(--accent-1) 18%, transparent) inset;
  animation: cardIn 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to   { opacity: 1; transform: none; }
}

.video-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(255,255,255,0.06);
}
.video-wrap iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
}
.mute-toggle {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 12px 0 10px;
  border: 0;
  border-radius: 999px;
  font-family: "Bricolage Grotesque", "Space Grotesk", sans-serif;
  font-weight: 800;
  font-size: 11.5px;
  letter-spacing: 0.1em;
  background: rgba(10, 0, 25, 0.78);
  color: var(--accent-2);
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 230, 13, 0.45);
  box-shadow: 0 6px 20px -6px rgba(0,0,0,0.7);
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  animation: muteNudge 1.8s ease-in-out 1.2s 2;
}
.mute-toggle .mute-icon { font-size: 16px; }
.mute-toggle.is-on {
  color: var(--ink);
  border-color: rgba(255,255,255,0.22);
  animation: none;
}
.mute-toggle.is-on .mute-label { display: none; }
.mute-toggle.is-on { padding: 0 11px; }
@keyframes muteNudge {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}

.video-skeleton {
  position: absolute; inset: 0;
  background:
    linear-gradient(120deg, transparent, color-mix(in oklab, var(--accent-3) 22%, transparent), transparent);
  background-size: 250% 100%;
  animation: shimmer 1.6s linear infinite;
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -100% 0; } }

.meta { margin-top: 12px; }
.micro {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-dim);
  display: flex; gap: 6px; flex-wrap: wrap;
  line-height: 1.3;
}
.micro-artist { color: var(--accent-2); font-weight: 700; }
.micro-title  { color: var(--ink); font-weight: 700; }
.micro-dot    { opacity: 0.4; }
.meta-sub {
  margin-top: 3px;
  font-size: 12px;
  color: var(--ink-dim);
  font-family: "JetBrains Mono", monospace;
}
.meta-sub .dot { margin: 0 6px; opacity: 0.4; }

.fact {
  margin: 12px 2px 4px;
  font-family: "Bricolage Grotesque", "Space Grotesk", sans-serif;
  font-weight: 800;
  font-size: clamp(22px, 5.2vw, 26px);
  line-height: 1.14;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-wrap: balance;
}
.fact::before {
  content: "“";
  display: block;
  font-size: 48px;
  line-height: 0.5;
  color: var(--accent-3);
  margin-bottom: 4px;
  font-family: serif;
  opacity: 0.9;
}
.fact::after {
  content: "”";
  display: inline-block;
  font-family: serif;
  color: var(--accent-3);
  font-size: 1.1em;
  line-height: 0;
  margin-left: 4px;
  vertical-align: -4px;
  opacity: 0.9;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 14px;
}
.stat {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 8px 6px;
  text-align: center;
  min-height: 50px;
  display: flex; flex-direction: column; justify-content: center;
}
.stat-num {
  display: block;
  font-family: "Bricolage Grotesque", "Space Grotesk", sans-serif;
  font-weight: 800;
  font-size: 17px;
  color: var(--accent-4);
  letter-spacing: -0.01em;
  line-height: 1;
}
.stat-label {
  display: block;
  margin-top: 3px;
  font-size: 9.5px;
  font-family: "JetBrains Mono", monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.tags {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 12px;
}
.tag {
  font-size: 11px;
  font-family: "JetBrains Mono", monospace;
  padding: 4px 9px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--accent-1) 18%, transparent);
  border: 1px solid color-mix(in oklab, var(--accent-1) 45%, transparent);
  color: var(--ink);
  letter-spacing: 0.04em;
}

/* related row */
.related { margin-top: 14px; }
.related-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 8px;
}
.related-list {
  display: grid;
  gap: 6px;
}
.rel-card {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 10px;
  align-items: center;
  padding: 6px 8px 6px 6px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.rel-card:hover {
  background: rgba(255,255,255,0.08);
  border-color: color-mix(in oklab, var(--accent-1) 45%, transparent);
  transform: translateY(-1px);
}
.rel-thumb {
  width: 64px; height: 36px;
  border-radius: 6px;
  background: #000;
  background-size: cover; background-position: center;
  flex-shrink: 0;
}
.rel-meta { min-width: 0; }
.rel-artist {
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent-2);
  font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rel-title {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: var(--ink);
  margin-top: 1px;
  line-height: 1.18;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.counter {
  margin-top: 12px;
  text-align: center;
  font-size: 11px;
  font-family: "JetBrains Mono", monospace;
  letter-spacing: 0.12em;
  color: var(--ink-dim);
}

/* floating dock */
.dock {
  position: fixed;
  left: 50%;
  bottom: calc(14px + var(--sa-bottom));
  transform: translateX(-50%);
  z-index: 40;
  display: flex; align-items: center;
  gap: 6px;
  padding: 8px;
  height: var(--dock-height);
  max-width: calc(100% - 20px);
  background: rgba(10, 0, 25, 0.78);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 999px;
  box-shadow:
    0 24px 60px -12px rgba(0,0,0,0.8),
    0 0 0 1px color-mix(in oklab, var(--accent-1) 14%, transparent) inset;
}
.dock-sep {
  display: inline-block;
  width: 1px;
  height: 28px;
  background: rgba(255,255,255,0.16);
  margin: 0 4px;
}
.dock-btn {
  font-family: "Bricolage Grotesque", "Space Grotesk", sans-serif;
  font-weight: 900;
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  text-decoration: none;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  color: var(--ink);
}
.dock-icon {
  width: 44px; height: 44px;
  background: rgba(255,255,255,0.08);
  font-size: 18px;
  flex-shrink: 0;
}
.dock-icon:hover, .dock-icon:active { background: rgba(255,255,255,0.18); transform: translateY(-1px); }

.dock-primary {
  background: linear-gradient(120deg, var(--accent-1), var(--accent-3));
  color: #0a0014;
  font-size: 14px;
  letter-spacing: 0.08em;
  padding: 0 22px;
  height: 44px;
  box-shadow: 0 10px 28px -8px var(--accent-1);
  white-space: nowrap;
}
.dock-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 36px -8px var(--accent-1); }
.dock-primary:active { transform: translateY(0); }
.big-emoji { font-size: 18px; }

.dock-pill {
  height: 44px;
  padding: 0 16px;
  background: rgba(255,255,255,0.06);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
}
.dock-pill:hover, .dock-pill:active { background: rgba(255,255,255,0.14); }
.dock-link { color: var(--accent-2); }
.dock-pill-label { white-space: nowrap; }

/* toast */
.toast {
  position: fixed;
  left: 50%;
  top: calc(70px + var(--sa-top));
  transform: translate(-50%, -16px);
  background: var(--accent-4);
  color: #0a0014;
  font-family: "Bricolage Grotesque", "Space Grotesk", sans-serif;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.05em;
  padding: 10px 18px;
  border-radius: 999px;
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.footer {
  position: relative; z-index: 5;
  text-align: center;
  font-size: 11px;
  color: var(--ink-dim);
  font-family: "JetBrains Mono", monospace;
  padding: 8px 16px 4px;
  letter-spacing: 0.05em;
}
.footer a { color: var(--ink-dim); }

/* ── small phones ─────────────────────────────────────── */
@media (max-width: 460px) {
  .topbar { padding: calc(12px + var(--sa-top)) 14px 4px; }
  .brand-sub { font-size: 12px; letter-spacing: 0.15em; }
  .brand-mark { font-size: 26px; }
  .rad-link { font-size: 10.5px; padding: 8px 11px; }
  .stage { padding: 4px 10px 10px; }
  .card { padding: 10px 12px 14px; border-radius: 18px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .dock { gap: 4px; padding: 6px; }
  .dock-icon { width: 40px; height: 40px; }
  .dock-primary { padding: 0 14px; height: 40px; font-size: 12.5px; letter-spacing: 0.06em; }
  .big-emoji { font-size: 15px; }
  /* compact dock — keep save heart, drop share+learn pills */
  .dock-pill:not(.dock-save) { display: none; }
  .dock-save .save-label { display: none; }
  .dock-save { padding: 0 12px; }
  .dock-sep { display: none; }
  .fact { font-size: clamp(21px, 5.6vw, 25px); }
}

/* extra small */
@media (max-width: 340px) {
  .rad-link { display: none; }
  .dock-primary > span:not(.big-emoji) { font-size: 11.5px; }
}

/* ── desktop ≥ 900px — landscape two-pane flashcard ───── */
@media (min-width: 900px) {
  .stage {
    max-width: 1360px;
    padding: 14px 28px 16px;
  }
  .card {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    grid-template-areas:
      "video meta"
      "video fact"
      "video related"
      "stats tags";
    column-gap: 26px;
    row-gap: 14px;
    padding: 20px 22px 20px;
    border-radius: 26px;
    align-items: start;
    min-height: calc(100dvh - 200px);
  }

  .video-wrap { grid-area: video; border-radius: 16px; align-self: stretch; }
  .meta       { grid-area: meta;  margin-top: 0; padding-right: 4px; }
  .fact       { grid-area: fact;  margin: 0; align-self: start; }
  .related    { grid-area: related; margin-top: 0; align-self: end; }
  .stats      { grid-area: stats; margin-top: 0; }
  .tags       { grid-area: tags;  margin-top: 0; align-self: end; }

  .micro { font-size: 13px; }
  .meta-sub { font-size: 12.5px; margin-top: 4px; }

  .fact {
    font-size: clamp(22px, 1.85vw, 26px);
    line-height: 1.22;
  }
  .fact::before {
    font-size: 36px;
    line-height: 0.4;
    margin-bottom: 2px;
    display: inline-block;
    margin-right: 4px;
    vertical-align: -6px;
  }
  .fact::after { font-size: 1em; vertical-align: -2px; }

  .stats { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .stat { padding: 10px 6px; min-height: 56px; }
  .stat-num { font-size: 20px; }
  .stat-label { font-size: 10px; }

  .counter { display: none; }
  .footer { display: none; }
}

/* ultra wide — even more room for the video */
@media (min-width: 1500px) {
  .stage { max-width: 1500px; padding: 18px 40px 20px; }
  .card { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); column-gap: 32px; }
  .fact { font-size: clamp(24px, 1.7vw, 28px); }
}

/* short laptop screens — keep video and text compact */
@media (min-width: 900px) and (max-height: 820px) {
  .stage { padding-top: 10px; padding-bottom: 14px; }
  .card { padding: 16px 18px 16px; column-gap: 22px; row-gap: 12px; }
  .fact { font-size: clamp(18px, 1.55vw, 22px); }
  .stat { min-height: 50px; padding: 8px 6px; }
  .stat-num { font-size: 18px; }
}

/* reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  html { scroll-behavior: auto; }
}
