/* =========================================================================
   Vision Board Studio — styles
   Theme is driven entirely by CSS custom properties (--t-*) set per theme
   in js/themes.js. Change the theme → the whole UI + board retint.
   ========================================================================= */

/* ---- reset-ish ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--t-body, system-ui, sans-serif);
  color: var(--t-ink, #333);
  background: var(--t-bg, #faf7f2);
  transition: background .5s ease, color .5s ease;
  min-height: 100vh;
  line-height: 1.5;
}
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
h1, h2, h3, p { margin: 0; }
em { font-style: italic; }

:root {
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 12px 40px -12px rgba(20, 10, 30, .28);
  --shadow-sm: 0 4px 18px -8px rgba(20, 10, 30, .3);
  --maxw: 1080px;
}

/* =========================================================================
   Buttons
   ========================================================================= */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  padding: .7em 1.3em; border-radius: 999px;
  font-weight: 600; font-size: .95rem; letter-spacing: .01em;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, opacity .2s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn--primary {
  background: var(--t-accent); color: #fff;
  box-shadow: 0 8px 22px -8px color-mix(in srgb, var(--t-accent) 70%, transparent);
}
.btn--primary:hover { transform: translateY(-2px); }
.btn--primary:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.btn--ghost {
  background: color-mix(in srgb, var(--t-ink) 7%, transparent);
  color: var(--t-ink);
}
.btn--ghost:hover { background: color-mix(in srgb, var(--t-ink) 13%, transparent); }
.btn--lg { padding: .95em 1.9em; font-size: 1.08rem; }
.btn.is-on { background: var(--t-accent); color: #fff; }
.btn.is-on::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor;
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: .4; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.15); } }
@media (prefers-reduced-motion: reduce) { .btn.is-on::before { animation: none; } }

/* =========================================================================
   Screens
   ========================================================================= */
.screen { display: none; min-height: 100vh; padding: clamp(20px, 5vw, 56px); }
.screen.is-active { display: block; animation: fade .5s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.step-head { max-width: var(--maxw); margin: 0 auto 26px; text-align: center; }
.step-head__eyebrow {
  text-transform: uppercase; letter-spacing: .18em; font-size: .72rem;
  font-weight: 600; color: var(--t-accent);
}
.step-head__title {
  font-family: var(--t-display); font-weight: 900;
  font-size: clamp(1.7rem, 4vw, 2.6rem); margin: .25em 0 .1em; line-height: 1.05;
}
.step-head__sub { color: var(--t-ink-soft); max-width: 46ch; margin: 0 auto; }

.step-foot {
  max-width: var(--maxw); margin: 30px auto 0;
  display: flex; justify-content: space-between; gap: 12px;
}

/* =========================================================================
   Welcome
   ========================================================================= */
.screen--welcome {
  display: none; place-items: center; text-align: center; position: relative; overflow: hidden;
}
.screen--welcome.is-active { display: grid; }
.welcome__inner { max-width: 640px; position: relative; z-index: 2; }
.welcome__badge {
  display: inline-block; padding: .5em 1.1em; border-radius: 999px;
  background: color-mix(in srgb, var(--t-accent) 14%, transparent);
  color: var(--t-accent); font-weight: 600; font-size: .82rem;
  letter-spacing: .08em; margin-bottom: 22px;
}
.welcome__title {
  font-family: var(--t-display); font-weight: 900;
  font-size: clamp(2.4rem, 7vw, 4.4rem); line-height: 1.02; margin-bottom: .35em;
}
.welcome__title em { color: var(--t-accent); }

/* magazine ransom-note landing title */
.welcome__title.ransom {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-end;
  gap: .18em .3em; line-height: 1.04; margin: .1em 0 .55em;
}
.ransom__word { display: inline-flex; gap: 2px; }
.ransom__ch {
  display: inline-block;
  font-size: clamp(2.2rem, 8.5vw, 4.6rem); font-weight: 800; line-height: 1;
  padding: .03em .11em; border-radius: 7px;
  box-shadow: 0 9px 20px -9px rgba(20, 10, 30, .55);
}
@media (prefers-reduced-motion: no-preference) {
  .ransom__ch { transition: transform .2s ease; }
  .ransom__ch:hover { transform: rotate(0deg) translateY(-4px) scale(1.06) !important; }
}
.welcome__lede {
  font-size: clamp(1rem, 2.3vw, 1.2rem); color: var(--t-ink-soft);
  max-width: 48ch; margin: 0 auto 32px;
}
.welcome__meta { margin-top: 18px; font-size: .82rem; color: var(--t-ink-soft); }
.welcome__debug {
  margin-top: 14px; font-size: .78rem; color: var(--t-ink-soft);
  text-decoration: underline; text-underline-offset: 3px; opacity: .7;
  transition: opacity .2s, color .2s;
}
.welcome__debug:hover { opacity: 1; color: var(--t-accent); }

.debug-badge {
  position: fixed; left: 14px; bottom: 14px; z-index: 60;
  background: rgba(20,16,32,.9); color: #fff; font-size: .74rem;
  padding: .5em .9em; border-radius: 10px; box-shadow: var(--shadow-sm);
  font-family: var(--t-body); pointer-events: none; letter-spacing: .01em;
}
.debug-badge b { letter-spacing: .1em; color: #ffd27a; }
.debug-badge span { opacity: .75; }

.welcome__orbs { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.orb { position: absolute; border-radius: 50%; filter: blur(38px); opacity: .55; }
.orb--1 { width: 340px; height: 340px; background: var(--t-accent);   top: -80px; left: -60px; }
.orb--2 { width: 300px; height: 300px; background: var(--t-accent-2); bottom: -70px; right: -40px; }
.orb--3 { width: 220px; height: 220px; background: var(--t-card-alt); top: 40%; left: 55%; opacity: .7; }

/* =========================================================================
   Theme picker
   ========================================================================= */
.theme-grid {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px;
}
.theme-card {
  text-align: left; border-radius: var(--radius); padding: 14px;
  background: var(--t-card); box-shadow: var(--shadow-sm);
  border: 2px solid transparent; transition: transform .15s ease, border-color .2s, box-shadow .2s;
  display: flex; flex-direction: column; gap: 4px;
}
.theme-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.theme-card.is-selected { border-color: var(--t-accent); }
.theme-card__preview {
  height: 96px; border-radius: var(--radius-sm); margin-bottom: 8px;
  display: grid; place-items: center; position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--sw1), var(--sw2) 45%, var(--sw3) 75%, var(--sw4));
}
.theme-card__emoji { font-size: 2.4rem; filter: drop-shadow(0 3px 6px rgba(0,0,0,.25)); }
.theme-card__name { font-family: var(--t-display); font-weight: 600; font-size: 1.15rem; }
.theme-card__tag { color: var(--t-ink-soft); font-size: .84rem; }

/* =========================================================================
   Quiz
   ========================================================================= */
.progress {
  max-width: 420px; margin: 18px auto 0; height: 6px; border-radius: 999px;
  background: color-mix(in srgb, var(--t-ink) 10%, transparent); overflow: hidden;
}
.progress__bar {
  display: block; height: 100%; width: 0; border-radius: 999px;
  background: var(--t-accent); transition: width .4s ease;
}
.quiz-card {
  max-width: 660px; margin: 0 auto; background: var(--t-card);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(22px, 4vw, 40px);
}
.quiz__domain {
  text-transform: uppercase; letter-spacing: .16em; font-size: .72rem;
  font-weight: 600; color: var(--t-accent-2);
}
.quiz__title { font-family: var(--t-display); font-weight: 600; font-size: clamp(1.35rem, 3.5vw, 1.9rem); margin: .3em 0; }
.quiz__help { color: var(--t-ink-soft); margin-bottom: 20px; }
.quiz__note { min-height: 1.2em; margin-top: 12px; color: var(--t-accent); font-size: .85rem; opacity: 0; transition: opacity .2s; }
.quiz__note.is-show { opacity: 1; }

.field {
  width: 100%; padding: 14px 16px; border-radius: var(--radius-sm);
  border: 2px solid var(--t-line); background: var(--t-card-alt);
  color: var(--t-ink); font-size: 1.05rem; font-family: inherit; transition: border-color .2s, background .2s;
}
.field:focus { outline: none; border-color: var(--t-accent); background: var(--t-card); }
.field--area { resize: vertical; line-height: 1.6; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: .45em;
  padding: .6em 1em; border-radius: 999px; font-weight: 500; font-size: .95rem;
  background: var(--t-card-alt); border: 2px solid var(--t-line);
  transition: transform .12s, border-color .2s, background .2s, color .2s;
}
.chip:hover { transform: translateY(-2px); }
.chip__emoji { font-size: 1.05em; }
.chip.is-on { background: var(--t-accent); border-color: var(--t-accent); color: #fff; }

.choices { display: grid; gap: 12px; }
.choice {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto;
  gap: 2px 14px; align-items: center; text-align: left;
  padding: 16px 18px; border-radius: var(--radius-sm);
  background: var(--t-card-alt); border: 2px solid var(--t-line);
  transition: transform .12s, border-color .2s;
}
.choice:hover { transform: translateY(-2px); }
.choice.is-on { border-color: var(--t-accent); background: color-mix(in srgb, var(--t-accent) 10%, var(--t-card)); }
.choice__emoji { grid-row: 1 / 3; font-size: 1.8rem; }
.choice__label { font-weight: 600; }
.choice__desc { color: var(--t-ink-soft); font-size: .88rem; }

/* =========================================================================
   Board (result)
   ========================================================================= */
.board-toolbar {
  max-width: 1240px; margin: 0 auto 20px;
  display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; justify-content: space-between;
}
.board-toolbar__title { font-family: var(--t-display); font-weight: 900; font-size: clamp(1.4rem, 3.5vw, 2.1rem); }
.board-toolbar__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.board-stage { position: relative; width: 100%; display: grid; place-items: center; }

/* fullscreen: board-stage fills the screen, board centered on theme bg */
.board-stage:fullscreen,
.board-stage:-webkit-full-screen {
  width: 100vw; height: 100vh; padding: 2.5vh; background: var(--t-bg);
}
.board-stage:fullscreen .board { width: min(100%, calc(95vh * 16 / 10)); }
.board-stage:-webkit-full-screen .board { width: min(100%, calc(95vh * 16 / 10)); }

/* full-size board: as large as fits width AND height, keeping 16:10 */
.screen--board { padding: clamp(8px, 1.5vw, 18px); display: none; place-items: center; min-height: 100vh; }
.screen--board.is-active { display: grid; }

/* floating circular tool buttons, overlaid on the board */
.board-tools {
  position: absolute; top: clamp(10px, 1.6vw, 20px); right: clamp(10px, 1.6vw, 20px);
  display: flex; gap: 9px; z-index: 6;
}
.tool {
  width: clamp(38px, 3.4vw, 48px); height: clamp(38px, 3.4vw, 48px);
  border-radius: 50%; display: grid; place-items: center;
  font-size: clamp(1rem, 1.5vw, 1.25rem); line-height: 1;
  background: color-mix(in srgb, var(--t-card) 82%, transparent);
  color: var(--t-ink);
  border: 1.5px solid color-mix(in srgb, var(--t-ink) 12%, transparent);
  box-shadow: 0 5px 16px -5px rgba(15, 8, 25, .5);
  -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px);
  transition: transform .15s ease, background .2s ease, color .2s ease;
}
.tool:hover { transform: translateY(-2px) scale(1.06); }
.tool:active { transform: translateY(0) scale(.97); }
.tool:focus-visible { outline: 3px solid var(--t-accent); outline-offset: 2px; }
.tool--primary { background: var(--t-accent); color: #fff; border-color: transparent; }
.tool.is-on { background: var(--t-accent); color: #fff; border-color: transparent; }
/* rotate-for-bigger hint — only shown on portrait phones (see mobile block at
   the end of this file, which must stay last so it wins the cascade) */
.rotate-hint {
  display: none; margin: 12px auto 0; text-align: center;
  font-size: .8rem; font-weight: 600; color: var(--t-ink-soft);
}

/* upload hotspots overlaying the canvas photo frames */
.board-hotspots { position: absolute; inset: 0; pointer-events: none; }
.hotspot {
  position: absolute; pointer-events: auto; cursor: pointer;
  border-radius: 8px; background: transparent; border: none;
  display: grid; place-items: center;
  transition: background .18s ease, box-shadow .18s ease;
}
.hotspot:hover { background: color-mix(in srgb, var(--t-accent) 22%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--t-accent) 55%, transparent) inset; }
.hotspot:focus-visible { outline: 3px solid var(--t-accent); outline-offset: 2px; }
.hotspot__hint {
  font-size: clamp(.6rem, 1.3vw, .8rem); font-weight: 700; letter-spacing: .04em;
  color: #fff; background: color-mix(in srgb, var(--t-ink) 82%, transparent);
  padding: .3em .7em; border-radius: 999px; opacity: 0; transform: translateY(4px);
  transition: opacity .18s ease, transform .18s ease; white-space: nowrap;
}
.hotspot:hover .hotspot__hint { opacity: 1; transform: none; }
.hotspot.is-filled .hotspot__hint { content: ""; }
.hotspot.is-filled:hover .hotspot__hint::after { content: " ⟳"; }
/* corner ✕ to drop an uploaded photo and restore the generated artwork.
   Always visible (no hover) so it works on touch screens. */
.hotspot__remove {
  position: absolute; z-index: 4; pointer-events: auto; cursor: pointer;
  width: clamp(24px, 4.5vw, 32px); height: clamp(24px, 4.5vw, 32px); padding: 0;
  transform: translate(-50%, -50%);
  display: grid; place-items: center;
  border: 2px solid rgba(255,255,255,.9); border-radius: 50%;
  background: rgba(22,15,32,.78); color: #fff;
  font-size: clamp(.7rem, 1.8vw, .9rem); line-height: 1;
  box-shadow: 0 2px 8px rgba(0,0,0,.4); opacity: .9;
  transition: opacity .15s ease, transform .15s ease, background .15s ease;
}
.hotspot__remove:hover { opacity: 1; background: #d9534f; transform: translate(-50%, -50%) scale(1.1); }
.hotspot__remove:focus-visible { outline: 3px solid #fff; outline-offset: 2px; opacity: 1; }
.board-hint { max-width: 1240px; margin: 16px auto 0; color: var(--t-ink-soft); font-size: .82rem; text-align: center; }

.board {
  display: block;
  width: min(100%, calc(92vh * 16 / 10));
  height: auto;
  aspect-ratio: 16 / 10;
  border-radius: clamp(12px, 1.4vw, 22px);
  box-shadow: var(--shadow);
  background: var(--t-bg);
}

/* =========================================================================
   Anthem (custom song) modal + player bar
   ========================================================================= */
.anthem-modal {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px;
  background: rgba(15, 8, 25, .55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.anthem-modal.is-open { opacity: 1; pointer-events: auto; }
.anthem-card {
  position: relative; width: min(440px, 100%); background: var(--t-card); color: var(--t-ink);
  border-radius: 20px; padding: 28px; box-shadow: var(--shadow); font-family: var(--t-body);
}
.anthem-card h3 { font-family: var(--t-display); font-weight: 900; font-size: 1.5rem; margin-bottom: 4px; }
.anthem-card > p { color: var(--t-ink-soft); font-size: .9rem; }
.anthem-card__x {
  position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border-radius: 50%;
  background: var(--t-card-alt); color: var(--t-ink); font-size: .85rem;
}
.anthem-field { display: block; margin-top: 18px; }
.anthem-field > span { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--t-accent-2); }
.anthem-row { display: flex; gap: 8px; margin-top: 8px; }
.anthem-row input {
  flex: 1; min-width: 0; padding: 12px 14px; border-radius: 12px; font-size: 1rem; font-family: inherit;
  border: 2px solid var(--t-line); background: var(--t-card-alt); color: var(--t-ink);
}
.anthem-row input:focus { outline: none; border-color: var(--t-accent); background: var(--t-card); }
.anthem-or { text-align: center; color: var(--t-ink-soft); margin: 16px 0 12px; font-size: .85rem; }
.anthem-upload {
  display: block; text-align: center; padding: 14px; border-radius: 12px; cursor: pointer; font-weight: 600;
  border: 2px dashed var(--t-line); color: var(--t-ink); transition: border-color .2s, background .2s;
}
.anthem-upload:hover { border-color: var(--t-accent); background: var(--t-card-alt); }
.anthem-note { margin-top: 14px; font-size: .74rem; color: var(--t-ink-soft); }
/* hidden-but-rendered host: the media plays here as background audio (no video
   popup). opacity:0 + z-index:-1 keeps it playing without being seen. */
.anthem-host {
  position: fixed; right: 0; bottom: 0; width: 300px; height: 170px;
  opacity: 0; pointer-events: none; z-index: -1; overflow: hidden; border: 0;
}
/* compact "now playing" pill */
.anthem-bar {
  position: fixed; right: 16px; bottom: 16px; z-index: 60; display: flex; align-items: center; gap: 8px;
  background: var(--t-card); padding: 6px 8px 6px 14px; border-radius: 999px; box-shadow: var(--shadow); max-width: min(300px, 88vw);
}
.anthem-bar__now { font-size: .82rem; font-weight: 600; color: var(--t-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.anthem-bar__close { width: 24px; height: 24px; border-radius: 50%; background: var(--t-card-alt); color: var(--t-ink); font-size: .68rem; flex-shrink: 0; cursor: pointer; border: none; }
.anthem-presets { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }
.anthem-chip {
  padding: 7px 11px; border-radius: 999px; font-size: .82rem; font-weight: 600; cursor: pointer;
  background: var(--t-card-alt); border: 1.5px solid var(--t-line); color: var(--t-ink); font-family: inherit;
}
.anthem-chip:hover { border-color: var(--t-accent); transform: translateY(-1px); }
.anthem-chip small { color: var(--t-ink-soft); font-weight: 400; margin-left: 3px; }

/* spinning vinyl in the board corner */
.vinyl-wrap {
  position: absolute; left: 14px; bottom: 14px; z-index: 6;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  transition: transform .15s ease;
}
.vinyl-wrap:hover { transform: scale(1.05); }
.vinyl {
  width: clamp(58px, 6.5vw, 92px); aspect-ratio: 1; border-radius: 50%; padding: 0; border: none; cursor: pointer;
  position: relative;
  background:
    repeating-radial-gradient(circle at 50% 50%, rgba(255,255,255,.06) 0 1px, rgba(0,0,0,0) 1px 4px),
    radial-gradient(circle at 50% 50%, var(--t-accent) 0 15%, #141418 15% 19%, #2a2a30 19% 62%, #1e1e23 62% 100%);
  box-shadow: 0 6px 18px -4px rgba(0,0,0,.6), inset 0 0 0 1px rgba(255,255,255,.06);
  animation: vinyl-spin 3.6s linear infinite;
}
.vinyl::after { content: ""; position: absolute; top: 50%; left: 50%; width: 6px; height: 6px; margin: -3px; border-radius: 50%; background: #0c0c0f; }
.vinyl::before { content: ""; position: absolute; inset: 7%; border-radius: 50%; background: radial-gradient(circle at 32% 28%, rgba(255,255,255,.22), transparent 46%); }
.vinyl.is-playing { animation-duration: 1.9s; }
@keyframes vinyl-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .vinyl { animation: none; } }
.vinyl__label {
  font-family: var(--t-body); font-size: .66rem; font-weight: 600; color: var(--t-ink); cursor: pointer;
  background: color-mix(in srgb, var(--t-card) 82%, transparent); padding: 3px 9px; border-radius: 999px;
  max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-shadow: 0 3px 10px -4px rgba(0,0,0,.4);
}

/* =========================================================================
   Toast
   ========================================================================= */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px);
  background: var(--t-ink); color: var(--t-bg);
  padding: .7em 1.3em; border-radius: 999px; font-weight: 600; font-size: .9rem;
  box-shadow: var(--shadow); opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s; z-index: 50;
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* =========================================================================
   Print (fallback export)
   ========================================================================= */
@media print {
  .screen:not(.screen--board) { display: none !important; }
  .board-toolbar, .board-hint { display: none !important; }
  .screen--board { padding: 0; }
  .board { box-shadow: none; }
}

/* =========================================================================
   Shared-board view mode (read-only): the viewer isn't the author, so the
   editing tools are hidden and a "make your own" call-to-action appears.
   ========================================================================= */
.make-your-own {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 45;
  display: none; align-items: center; gap: 8px;
  background: var(--t-accent); color: #fff; border: none; cursor: pointer;
  padding: 11px 22px; border-radius: 999px; font-family: var(--t-body);
  font-weight: 700; font-size: .95rem; box-shadow: 0 8px 26px -6px rgba(0,0,0,.5);
  transition: transform .15s ease;
}
.make-your-own:hover { transform: translateX(-50%) translateY(-2px); }
.view-mode .make-your-own { display: inline-flex; }
.view-mode [data-action="regenerate"],
.view-mode [data-action="edit"],
.view-mode [data-action="share"] { display: none; }
.view-mode .board-hotspots { display: none; }   /* viewers can't add/replace photos */
.view-mode .vinyl-wrap { display: none; }        /* nor change the anthem (the pill still shows the song) */

/* =========================================================================
   Phone layout (kept LAST so these overrides beat the base component rules
   that appear earlier in the file). Board stays upright and full-width; the
   floating controls move clear of it so nothing overlaps the poster.
   ========================================================================= */
@media (max-width: 640px) {
  /* fill the phone: near edge-to-edge. Normal mode only needs room for the
     tools bar (the vinyl shows the song); the shared view also shows the pill. */
  .screen--board { min-height: 100svh; padding: 8px 4px 66px; align-content: center; }
  .view-mode .screen--board { padding-bottom: 106px; }
  /* tall portrait poster (matches board.js portrait dims, 1080×1800). Width is
     capped by available height so the 3:5 aspect is always preserved. */
  .board { width: min(100%, calc((100svh - 114px) * 3 / 5)); aspect-ratio: 3 / 5; }

  /* tools → a floating pill bar pinned to the bottom, clear of the board */
  .board-tools {
    position: fixed; top: auto; left: 50%; right: auto;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    gap: 7px; padding: 7px 9px; border-radius: 999px; z-index: 30;
    background: color-mix(in srgb, var(--t-card) 90%, transparent);
    box-shadow: 0 10px 28px -8px rgba(0,0,0,.55);
    -webkit-backdrop-filter: blur(9px); backdrop-filter: blur(9px);
    max-width: calc(100vw - 12px);
  }
  .tool { width: 40px; height: 40px; font-size: 1.05rem; }

  /* vinyl → top-left corner, out of the bottom cluster */
  .vinyl-wrap { position: fixed; top: 10px; left: 10px; bottom: auto; z-index: 30;
    flex-direction: row; align-items: center; gap: 8px; }
  .vinyl { width: 42px; }
  .vinyl__label { max-width: 52vw; font-size: .62rem; }

  /* the vinyl already shows the song on mobile, so hide the redundant pill —
     except in the shared view, where the vinyl is hidden */
  .anthem-bar { display: none; left: 50%; right: auto; transform: translateX(-50%);
    max-width: calc(100vw - 20px); bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
  .view-mode .anthem-bar { display: flex; }

}
