/* FM app web prototype. Generated by Claude Code (Claude Opus 5.5) -- 2026-11-24 */
:root {
  --ink: #111;
  --muted: #666;
  --line: #e4e4e4;
  --hi: #ececec;
  --accent: #c8000d;
  font-family: "Avenir Next", Avenir, "Helvetica Neue", system-ui, sans-serif;
  --bg: #fff;
  color: var(--ink);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { overscroll-behavior: none; }
[hidden] { display: none !important; }
button { -webkit-tap-highlight-color: transparent; }
.link { font: inherit; font-size: 15px; background: none; border: 0; color: var(--accent); padding: 6px 2px; cursor: pointer; }
.link.light { color: #fff; }
.fine { color: var(--muted); font-size: 11px; }

/* ---------- opening screen ---------- */
.home {
  height: 100dvh; max-width: 760px; margin: 0 auto;
  display: flex; flex-direction: column;
  padding-top: max(14px, env(safe-area-inset-top));
  padding-bottom: max(10px, env(safe-area-inset-bottom));
}
.brand { text-align: center; padding: 6px 16px 0; }
.brand h1 { margin: 0; font-size: 26px; font-weight: 500; letter-spacing: .02em; }
.brand p { margin: 2px 0 0; color: var(--muted); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }

.home { --cs: min(74vw, 340px, 46dvh); }
.home::before { content: ""; flex: 1 1 0; max-height: 9dvh; }
.carousel {
  flex: none; display: flex; align-items: flex-end; gap: 10px;
  overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory;
  padding: 22px calc(50% - var(--cs) / 2) 22px; scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.carousel::-webkit-scrollbar { display: none; }
.album {
  flex: none; width: var(--cs); height: var(--cs); padding: 0; border: 0; background: none;
  scroll-snap-align: center; display: flex; align-items: flex-end; justify-content: center;
  transform: scale(.82); opacity: .55; transition: transform .25s, opacity .25s; cursor: pointer;
}
.album .cv { position: relative; display: block; max-width: 100%; max-height: 100%; }
.album img { max-width: 100%; max-height: var(--cs); display: block; border-radius: 2px; box-shadow: 0 6px 18px rgba(0,0,0,.28); }
.ribbon {
  position: absolute; top: 10px; right: -6px; background: var(--accent); color: #fff;
  font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 3px; box-shadow: 0 2px 6px rgba(0,0,0,.3);
}
.album.active { transform: scale(1); opacity: 1; }
.brand { order: -1; }

.pick { flex: 1; text-align: center; padding: 4px 22px 0; min-height: 0; }
.pick h2 { font-size: 18px; font-weight: 500; margin: 0 0 4px; line-height: 1.25; }
.pick p { margin: 0 0 3px; font-size: 13px; line-height: 1.35; }
.listen { margin-top: 12px; font: inherit; font-size: 16px; padding: 9px 34px; border-radius: 20px; border: 0; background: var(--accent); color: #fff; }

.nowbar {
  position: fixed; z-index: 15; left: 50%; transform: translateX(-50%);
  bottom: max(10px, env(safe-area-inset-bottom)); width: calc(100% - 24px); max-width: 406px;
  padding: 11px 14px; border: 1px solid #d8d8d8; border-radius: 12px; background: rgba(247,247,247,.96);
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  font: inherit; font-size: 13px; text-align: left; color: var(--ink); cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.has-nowbar .home { padding-bottom: 70px; }
.has-nowbar .contents { padding-bottom: 70px; }

/* ---------- player ---------- */
.app {
  max-width: 430px; height: 100dvh; margin: 0 auto;
  display: flex; flex-direction: column;
  padding: max(6px, env(safe-area-inset-top)) 12px 0;
}
.topbar { display: flex; justify-content: space-between; align-items: center; min-height: 34px; }
.topright { display: flex; align-items: center; gap: 6px; }
.head { display: flex; gap: 10px; align-items: flex-start; }
.coverbtn { padding: 0; border: 0; background: none; flex: none; cursor: pointer; }
.cover { width: 76px; height: 68px; object-fit: cover; display: block; border-radius: 2px; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.titles { min-width: 0; }
.titles h1 { font-size: 17px; line-height: 1.2; font-weight: 500; margin: 0 0 3px; }
.titles p { margin: 0; font-size: 12px; line-height: 1.35; }

/* buy strip under the album title */
.buy { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 0; }
.buy p { margin: 0; flex: 1 1 180px; font-size: 12px; color: var(--muted); line-height: 1.35; }
.buybtn {
  font: inherit; font-size: 14px; font-weight: 500; padding: 7px 14px; border-radius: 18px;
  border: 1px solid var(--accent); background: var(--accent); color: #fff; cursor: pointer; text-decoration: none;
}
.buybtn.ghost { background: #fff; color: var(--accent); }

.deck { flex: none; display: flex; justify-content: center; margin-top: 2px; }
#arm { cursor: grab; touch-action: none; }
#turntable.arm-held, .arm-held ~ .ttlayer #arm { cursor: grabbing; }
/* the record player's box keeps the drawing's shape (573 x 538), so the layers
   line up exactly and turn about the right points (2026-12-01) */
.tt { position: relative; flex: none; width: min(100%, calc(42dvh * 573 / 538)); aspect-ratio: 573 / 538; overflow: hidden; }
#turntable, .ttlayer { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#turntable { touch-action: manipulation; -webkit-tap-highlight-color: transparent; cursor: pointer; }
.ttlayer { pointer-events: none; will-change: transform; overflow: visible; }   /* the arm reaches past its own box before it is turned */
.ttlayer #arm { pointer-events: auto; }
#ttSpin, #ttShine { transform-origin: 46.946% 50%; }            /* the record's centre */

/* Things you tap aren't text to select or copy (Fred, 2026-12-01): buttons,
   links, track rows, chips, the record and its label. */
button, a, [role="button"], label, .track, .album, .cv, .chip, .from, .notes, .filmbtn,
.buybtn, .buyhere, .newnote, .nowbar, .themebtn, .tt, .tt *, .buttons, .bk-zoom {
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
#ttArm, #ttShadow { transform-origin: 92.670% 11.896%; }       /* the arm's pivot */

/* A track's film in place of the record (2026-11-30); full screen when sideways */
.film {
  position: relative; width: 100%; max-width: calc(42dvh * 16 / 9);
  background: #000; border-radius: 3px; overflow: hidden;
}
.film[hidden] { display: none; }
.film video { width: 100%; aspect-ratio: 16 / 9; background: #000; display: block; }
.filmx { display: none; }
.filmbar { flex: none; display: flex; align-items: baseline; gap: 10px; margin: 8px 0 6px; font-size: 12px; color: var(--muted); }
.filmbar[hidden] { display: none; }
.filmbar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filmbar .link { white-space: nowrap; flex: none; padding: 0; font-size: 14px; }
.track .filmbtn {
  border: 0; background: none; padding: 0 2px; margin-left: 4px; font-size: 16px; line-height: 1;
  cursor: pointer; vertical-align: -1px;
}

.transport { flex: none; }
.transport[hidden] { display: none; }
.buttons { display: flex; justify-content: center; gap: 14px; margin: 4px 0 8px; }
.buttons button {
  font: inherit; font-size: 15px; width: 104px; height: 36px;
  border: 1px solid #bbb; border-radius: 8px; background: #f6f6f6; color: var(--ink);
}
.buttons button:active { background: #e6e6e6; }
.buttons button:disabled { color: #aaa; border-color: #ddd; background: #fafafa; }
/* Prev and Next (2026-11-30) */
/* Prev/Next as words (Fred, 2026-12-01): the |◀ ▶| symbols read as start/end */
.buttons button.skip { min-width: 58px; padding: 4px 8px; font-size: 13px; line-height: 1.1; font-weight: 600; }
.scrub { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.scrub span { width: 40px; flex: none; }
.scrub span:last-child { text-align: right; }
.scrub input { flex: 1; accent-color: var(--accent); }
.now { margin: 2px 0 6px; font-size: 12px; text-align: center; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.contents {
  flex: 1; min-height: 120px; overflow-y: auto; -webkit-overflow-scrolling: touch;
  border-top: 1px solid var(--line);
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  font-size: 13px;
}
/* Headings start where the track titles start (4 + 24 + 4 px); the track numbers hang to the left of that
   margin, right-aligned, and movements under a heading are indented a little (Fred, 2026-12-02). */
.contents h2 { font-size: 13px; font-weight: 600; margin: 12px 0 2px; padding-left: 32px; }
.contents .gap { height: 8px; }
.track.work .t { font-weight: 600; }   /* a one-track work, bold like the h2 headings (2026-12-02) */
.track {
  display: grid; grid-template-columns: 24px 1fr auto; column-gap: 4px;
  width: 100%; padding: 5px 4px; border: 0; background: none; text-align: left;
  font: inherit; color: inherit; border-radius: 6px;
}
.track .n { color: var(--muted); text-align: right; padding-right: 4px; font-variant-numeric: tabular-nums; }
.track.mvt .t, .track.mvt .notes { padding-left: 14px; }
.track .len { color: var(--muted); font-variant-numeric: tabular-nums; }
.track .notes { grid-column: 2 / 4; color: var(--muted); font-size: 12px; line-height: 1.3; }
.track.current { background: var(--hi); }
.track.current .n { color: var(--accent); font-weight: 600; }
.track.locked .t, .track.locked .n { color: #9a9a9a; }
.track .tag { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); }
.src { display: flex; align-items: center; gap: 8px; padding: 0 4px 6px 32px; }
.src .chip {
  font: inherit; font-size: 12px; padding: 2px 10px; border-radius: 11px; cursor: pointer;
  border: 1px solid #ccc; background: #fff; color: var(--ink);
}
.src .from {
  font: inherit; font-size: 12px; border: 0; background: none; color: var(--accent); padding: 2px 0; cursor: pointer;
  min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left;
}
.newnote {
  display: flex; align-items: center; gap: 10px; width: 100%; margin: 10px 0 2px; padding: 8px;
  border: 1px solid var(--accent); border-radius: 10px; background: #fff6f6;
  font: inherit; font-size: 13px; text-align: left; color: var(--ink); cursor: pointer;
}
.newnote img { width: 44px; height: 44px; object-fit: cover; border-radius: 2px; }
.newnote span:nth-child(2) { flex: 1; }
.newnote b { color: var(--accent); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.newnote .go { font-size: 20px; color: var(--accent); }
.track .lock { width: 11px; height: 13px; fill: #9a9a9a; stroke: #9a9a9a; vertical-align: -1px; }

/* ---------- booklet ---------- */
.booklet {
  position: fixed; inset: 0; z-index: 20; background: #2b2b2b; color: #fff;
  display: flex; flex-direction: column;
  padding: max(6px, env(safe-area-inset-top)) 0 max(8px, env(safe-area-inset-bottom));
}
.bk-what { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.bk-what b { font-weight: 500; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-top { display: flex; gap: 12px; justify-content: space-between; align-items: center; padding: 0 14px; min-height: 40px; font-size: 13px; color: #ccc; }
.bk-stage { flex: 1; position: relative; overflow: hidden; touch-action: pan-y; cursor: pointer; }
.bk-strip { position: absolute; inset: 0; display: flex; transition: transform .35s ease; will-change: transform; }
.bk-slide { flex: none; width: 100%; height: 100%; display: flex; padding: 8px; }
.bk-slide .spread { display: flex; margin: auto; max-width: 100%; max-height: 100%; box-shadow: 0 8px 30px rgba(0,0,0,.5); }
/* zoomed in (Fred, 2026-12-01): the page grows and scrolls inside its slide */
.bk-stage.zoomed { touch-action: pan-x pan-y; cursor: grab; }
.bk-slide.zoomslide { overflow: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.bk-slide.zoomslide .spread, .bk-slide.zoomslide img { max-width: none; max-height: none; flex: none; }
.bk-zoom { display: flex; gap: 8px; margin-left: auto; }
.bk-zoom button {
  width: 44px; height: 40px; padding: 0; border-radius: 10px; border: 1px solid #777;
  background: #444; color: #fff; font: inherit; font-size: 26px; line-height: 1; cursor: pointer;
}
.bk-zoom button:disabled { opacity: .35; cursor: default; }
.bk-slide img { display: block; max-height: 100%; background: #fff; }
.bk-slide .blank { background: transparent; }
.bk-bottom { padding: 6px 18px 0; }
.bk-bottom input { width: 100%; accent-color: #fff; }
.bk-hint { margin: 4px 0 0; text-align: center; font-size: 11px; color: #999; }

/* ---------- sampler sheet ---------- */
.sheet-back {
  position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 30;
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet {
  width: 100%; max-width: 430px; background: #fff; border-radius: 14px 14px 0 0;
  padding: 18px 18px max(18px, env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 10px;
}
.sheet h3 { margin: 0; font-size: 16px; font-weight: 600; }
.sheet p { margin: 0 0 4px; font-size: 14px; color: #444; line-height: 1.4; }
.sheet > div { display: flex; flex-direction: column; gap: 10px; }
.sheet .price { font-size: 28px; font-weight: 500; color: var(--ink); margin: 0; }
.sheet .testnote { font-size: 12px; color: #8a5a00; background: #fff6e0; border-radius: 8px; padding: 8px 10px; }
.sheet-link {
  display: flex; align-items: center; justify-content: center; height: 44px; border-radius: 10px;
  background: var(--accent); color: #fff; text-decoration: none; font-size: 15px;
}
.sheet button { font: inherit; font-size: 15px; height: 44px; border-radius: 10px; border: 1px solid #ccc; background: #f6f6f6; color: var(--ink); }
.sheet button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.sheet button.primary:disabled { opacity: .55; }

/* ---------- the store (2026-11-30): codes, restore, tap to listen, install tip ---------- */
.sheet .storenote { font-size: 12px; color: #555; background: #f3f3f3; border-radius: 8px; padding: 8px 10px; }
.sheet button.link { height: auto; border: 0; background: none; color: var(--accent); padding: 4px 0; font-size: 14px; }
.sheet input {
  font: inherit; font-size: 17px; height: 44px; border-radius: 10px; border: 1px solid #bbb; padding: 0 12px;
  text-transform: none; letter-spacing: .02em;
}
#codeInput { text-transform: uppercase; }
.sheet .sheet-msg { min-height: 1em; margin: 0; font-size: 13px; color: var(--accent); }
.sheet .sheet-msg.good { color: #1d6b32; }
.buy .codelink { font: inherit; font-size: 13px; background: none; border: 0; color: var(--accent); padding: 4px 2px; cursor: pointer; }
.deck { position: relative; }
.taplisten {
  position: absolute; left: 50%; top: 50%; transform: translate(-58%, -50%); z-index: 2;
  font: inherit; font-size: 18px; font-weight: 500; padding: 14px 26px; border: 0; border-radius: 30px;
  background: var(--accent); color: #fff; box-shadow: 0 6px 20px rgba(0,0,0,.3); cursor: pointer;
}
.installtip {
  position: fixed; z-index: 16; left: 50%; transform: translateX(-50%);
  bottom: max(10px, env(safe-area-inset-bottom)); width: calc(100% - 24px); max-width: 406px;
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; font-size: 13px; line-height: 1.35;
  background: #fffbe8; border: 1px solid #e8dca8; border-radius: 12px; box-shadow: 0 4px 16px rgba(0,0,0,.12);
}
.installtip span { flex: 1; }
.installtip button { font: inherit; background: none; border: 0; color: var(--accent); cursor: pointer; padding: 4px; }
.installtip #installGo { font-weight: 600; }

/* ---------- phone turned sideways (Fred, 2026-11-30) ----------
   The record on the left, the album's titles, buttons and tracks on the
   right; a film fills the whole screen, with ✕ to go back to the record. */
@media (orientation: landscape) and (max-height: 540px) {
  /* opening screen: smaller covers so the Listen button stays on screen */
  .home { --cs: min(42dvh, 300px); padding-top: max(6px, env(safe-area-inset-top)); }
  .home::before { display: none; }
  .brand h1 { font-size: 20px; }
  .carousel { padding-top: 10px; padding-bottom: 8px; }
  .pick h2 { font-size: 15px; margin-bottom: 2px; }
  .pick p { font-size: 12px; margin-bottom: 1px; }
  .listen { margin-top: 6px; padding: 6px 30px; font-size: 15px; }

  .app {
    max-width: none; display: grid; column-gap: 18px;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto auto auto auto auto minmax(0, 1fr);
    padding: max(6px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left));
  }
  .app > * { grid-column: 2; }
  .app > .topbar { grid-row: 1; min-height: 28px; }
  .app > .head { grid-row: 2; }
  .app > .buy { grid-row: 3; }
  .app > .filmbar { grid-row: 4; }
  .app > .transport { grid-row: 5; }
  .app > .contents { grid-row: 6; min-height: 0; }
  .app > .deck { grid-column: 1; grid-row: 1 / -1; align-self: center; margin: 0; }
  .tt {
    width: calc((100dvh - max(6px, env(safe-area-inset-top)) - max(8px, env(safe-area-inset-bottom))) * 573 / 538);
  }
  .cover { width: 54px; height: 48px; }
  .titles h1 { font-size: 15px; }
  .buttons { margin: 2px 0 4px; }

  .film {
    position: fixed; inset: 0; z-index: 40; max-width: none; border-radius: 0;
    display: flex; align-items: center; justify-content: center;
  }
  .film video { width: 100%; height: 100%; aspect-ratio: auto; object-fit: contain; }
  .filmx {
    display: block; position: absolute; z-index: 1;
    top: max(10px, env(safe-area-inset-top)); left: max(10px, env(safe-area-inset-left));
    width: 36px; height: 36px; border: 0; border-radius: 50%;
    background: rgba(0, 0, 0, .5); color: #fff; font-size: 17px; cursor: pointer;
  }
}

/* ---------- dark theme (Fred, 2026-11-30) ----------
   html[data-theme] is set from the phone's setting or the moon/sun button. */
.themebtn {
  border: 0; background: none; padding: 6px; margin: 0; cursor: pointer; color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center; -webkit-tap-highlight-color: transparent;
}
.themebtn svg { width: 20px; height: 20px; fill: currentColor; stroke: currentColor; stroke-width: 0; }
.themebtn .sun path { fill: none; stroke-width: 1.8; }
.themebtn .sun { display: none; }
.home { position: relative; }
.homethemebtn { position: absolute; z-index: 2; top: max(8px, env(safe-area-inset-top)); right: max(8px, env(safe-area-inset-right)); }

html[data-theme="dark"] {
  --ink: #ececec;
  --muted: #9b9b9b;
  --line: #2e2e2e;
  --hi: #262626;
  --accent: #e8333d;
  --bg: #121212;
  color-scheme: dark;
}
html[data-theme="dark"] .themebtn .moon { display: none; }
html[data-theme="dark"] .themebtn .sun { display: inline; }
html[data-theme="dark"] .nowbar { background: rgba(34,34,34,.96); border-color: #3a3a3a; color: var(--ink); box-shadow: 0 4px 16px rgba(0,0,0,.5); }
html[data-theme="dark"] .buybtn.ghost { background: transparent; }
html[data-theme="dark"] .buttons button { background: #222; border-color: #444; color: var(--ink); }
html[data-theme="dark"] .buttons button:active { background: #2e2e2e; }
html[data-theme="dark"] .buttons button:disabled { background: #181818; border-color: #2c2c2c; color: #555; }
html[data-theme="dark"] .track.locked .t, html[data-theme="dark"] .track.locked .n { color: #6e6e6e; }
html[data-theme="dark"] .track .lock { fill: #6e6e6e; stroke: #6e6e6e; }
html[data-theme="dark"] .src .chip { background: #222; border-color: #444; }
html[data-theme="dark"] .newnote { background: #2a1416; }
html[data-theme="dark"] .album img, html[data-theme="dark"] .cover { box-shadow: 0 6px 18px rgba(0,0,0,.6); }
html[data-theme="dark"] .sheet { background: #1e1e1e; color: var(--ink); }
html[data-theme="dark"] .sheet p { color: #bdbdbd; }
html[data-theme="dark"] .sheet button { background: #2a2a2a; border-color: #444; color: var(--ink); }
html[data-theme="dark"] .sheet button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
html[data-theme="dark"] .sheet button.link { background: none; border: 0; color: var(--accent); }
html[data-theme="dark"] .sheet input { background: #141414; border-color: #444; color: var(--ink); }
html[data-theme="dark"] .sheet .testnote { background: #3a2c0c; color: #f0c870; }
html[data-theme="dark"] .sheet .storenote { background: #262626; color: #bdbdbd; }
html[data-theme="dark"] .sheet .sheet-msg.good { color: #6fd08a; }
html[data-theme="dark"] .installtip { background: #2c2716; border-color: #5a4e26; color: var(--ink); }
/* the record player: the record gets a faint rim and the tone arm turns silver,
   so neither disappears into the dark page */
html[data-theme="dark"] #turntable .rim { stroke: #3a3a3a; }

/* ---------- dark looks to choose from (Fred, 2026-11-30) ----------
   html[data-dark] picks one; without it, dark is plain black (above).
   Each keeps the black record and the silver arm easy to see. */
#turntable .plinth, #turntable .platter { display: none; }

/* Charcoal: a mid-grey page, so the black record stands out (a little lighter, Fred 2026-11-30) */
html[data-theme="dark"][data-dark="charcoal"] {
  --bg: #37393c; --hi: #45474b; --line: #505357; --muted: #b0b0b0;
}
html[data-theme="dark"][data-dark="charcoal"] .buttons button { background: #424448; border-color: #5f6267; }
html[data-theme="dark"][data-dark="charcoal"] .buttons button:disabled { background: #3b3d40; border-color: #4a4c50; color: #727272; }
html[data-theme="dark"][data-dark="charcoal"] #turntable .rim { stroke: #000; }

/* Spotlight: a dark page with a soft pool of light under the turntable */
html[data-theme="dark"][data-dark="spotlight"] .deck {
  background: radial-gradient(closest-side at 46% 50%, #6a6a6a 0%, #474747 50%, #2a2a2a 80%, rgba(18,18,18,0) 100%);
}
html[data-theme="dark"][data-dark="spotlight"] #turntable .rim { stroke: #555; }

/* Platter: the record sits on a brushed-metal platter, as on a real turntable */
html[data-theme="dark"][data-dark="platter"] #turntable .platter { display: inline; fill: url(#platterMetal); stroke: #2a2a2a; stroke-width: 1.5; }
html[data-theme="dark"][data-dark="platter"] #turntable .rim { stroke: #000; }

/* Walnut: a wooden turntable base behind the record */
html[data-theme="dark"][data-dark="walnut"] #turntable .plinth { display: inline; fill: url(#walnut); stroke: #2a170d; stroke-width: 2; }
html[data-theme="dark"][data-dark="walnut"] #turntable .rim { stroke: #000; }

/* Midnight: deep navy instead of black */
html[data-theme="dark"][data-dark="midnight"] {
  --bg: #0f1a2c; --hi: #1c2a42; --line: #263652; --muted: #9aa6ba;
}
html[data-theme="dark"][data-dark="midnight"] .buttons button { background: #18243a; border-color: #2e3f5e; }
html[data-theme="dark"][data-dark="midnight"] .buttons button:disabled { background: #121d30; border-color: #1f2c44; color: #4f5c72; }
html[data-theme="dark"][data-dark="midnight"] .sheet { background: #16223a; }
html[data-theme="dark"][data-dark="midnight"] #turntable .rim { stroke: #3a4c6e; }

/* ---------- not yours yet: the notice and the sample (Fred, 2026-11-30) ---------- */
.notown { flex: 1 1 100%; font-size: 14px; line-height: 1.45; }
.notown p { margin: 0; font-size: 14px; color: var(--ink); flex: none; }
.notown .link { font-size: 14px; padding: 0; text-decoration: underline; }
.track .spk { font-size: 15px; line-height: 1; margin-right: 2px; }
.track.locked .spk { filter: none; opacity: 1; }
.buybtn { white-space: normal; text-align: left; }
/* the arm lifted off the record: a deeper shadow while it goes home */
/* (the arm's shadow is its own picture now, moved by app.js: 2026-12-01) */

/* ---------- the first screen: one giant button (2026-11-30) ---------- */
.welcome {
  position: fixed; inset: 0; z-index: 70; background: var(--bg); color: var(--ink);
  display: flex; align-items: center; justify-content: center; overflow-y: auto;
  padding: max(16px, env(safe-area-inset-top)) 18px max(16px, env(safe-area-inset-bottom));
}
.welcome[hidden] { display: none; }
.wbox { width: 100%; max-width: 440px; text-align: center; }
.wplay {
  display: flex; flex-direction: column; align-items: center; gap: 18px; width: 100%;
  padding: 26px 18px 30px; border: 0; border-radius: 28px; cursor: pointer;
  background: var(--accent); color: #fff; font: inherit; box-shadow: 0 10px 30px rgba(0,0,0,.25);
  -webkit-tap-highlight-color: transparent;
}
.wplay:active { transform: scale(.98); }
.wphoto { width: min(62vw, 46dvh, 260px); height: min(62vw, 46dvh, 260px); border-radius: 50%; object-fit: cover; border: 5px solid #fff; }
.wplaytext { font-size: 30px; font-weight: 700; line-height: 1.2; }
.wtri { display: inline-block; margin-right: 4px; }
.wname { font-size: 22px; margin: 18px 0 6px; }
.whelp { margin-top: 18px; font-size: 14px; color: var(--muted); text-decoration: underline; }
.welcome h2 { font-size: 22px; margin: 6px 0 10px; }
.wsteps { text-align: left; margin: 8px 0 0; padding-left: 26px; font-size: 18px; line-height: 1.4; }
.wsteps li { margin: 0 0 14px; }
.wsteps .wi { width: 24px; height: 24px; vertical-align: -5px; color: #0a84ff; }
.wfine { display: block; font-size: 14px; color: var(--muted); }
.wthen { font-size: 17px; line-height: 1.45; margin: 10px 0 0; }
@media (orientation: landscape) and (max-height: 540px) {
  .wplay { flex-direction: row; justify-content: center; padding: 18px 24px; }
  .wphoto { width: min(56dvh, 200px); height: min(56dvh, 200px); }
  .wname { margin-top: 10px; }
}

/* the optional email part of the code sheet (2026-11-30) */
.sheet .fine-q { margin: 14px 0 4px; font-size: 13px; color: var(--muted); }

/* No double-tap zoom (Fred, 2026-12-01): tapping Prev Track quickly zoomed the
   whole screen on iPhone. "manipulation" still allows scrolling and pinching. */
html, body, button, a, input, label, .track { touch-action: manipulation; }


/* "All albums" 1.75 times bigger (was 15px) and a little lower, so its top
   isn't blurred under the phone's status bar (Fred, 2026-12-01) */
.topbar #back { font-size: 26px; line-height: 1.15; margin-top: 8px; padding: 4px 2px; }
