/* Web player (P1-438). Colours, fonts and radii from the brand tokens in
   site.css (generated from lib/brand/); no colour literals here. */
@font-face { font-family: "Atkinson Hyperlegible Next"; src: url("/fonts/AtkinsonHyperlegibleNext-Regular.woff2") format("woff2"); font-weight: 400 500; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible Next"; src: url("/fonts/AtkinsonHyperlegibleNext-Bold.woff2") format("woff2"); font-weight: 600 800; font-display: swap; }

.play-body { --lyrics: "Atkinson Hyperlegible Next", var(--font); --target: 48px; }
.play-lyric-font { font-family: var(--lyrics); }
.play { padding-block: 8px 120px; max-width: 52rem; }
.play-noscript { padding-block: 2rem; }
.play-error { color: var(--grammar-noun-feminine); font-weight: 600; }
.play-note { background: var(--surface-callout); border-radius: var(--radius-s); padding: 10px 14px; }
.play-sub { color: var(--text-soft); font-size: var(--step-1); margin-top: -0.3em; }
.play-help { font-size: var(--step--1); }
.play-small { min-height: 40px; padding: 0 14px; font-size: var(--step--1); }

.play-account { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px;
  color: var(--muted); font-size: var(--step--1); padding-block: 8px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.play-account p { margin: 0; }

/* Sign-in */
.play-signin { max-width: 30rem; }
.play-lede { color: var(--text-soft); }
.play-actions { display: flex; flex-direction: column; gap: 10px; margin: 1.2rem 0; }
.play-email { margin: 0.4rem 0 1.2rem; }
.play-email summary { cursor: pointer; color: var(--link); font-size: var(--step--1); text-decoration: underline; width: fit-content; }
.play-email .play-actions { margin-top: 0.8rem; }
.play-actions label { font-weight: 600; }
.play-actions input, .play-pickers select {
  min-height: var(--target); border-radius: var(--radius-s); border: 1px solid var(--surface-action-outline);
  background: var(--bg-raised); color: var(--text); font: inherit; padding: 0 12px;
}
button.button { font: inherit; font-weight: 600; cursor: pointer; }
button.button-primary { border: 0; }
.play-big { min-height: 56px; width: 100%; justify-content: center; font-size: var(--step-0); }

/* Home */
.play-pickers { display: flex; flex-wrap: wrap; gap: 12px 20px; margin-bottom: 0.6rem; }
.play-pickers label { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.play-albums { list-style: none; margin: 1rem 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.play-album-card { display: flex; align-items: center; gap: 14px; padding: 10px; min-height: 96px; border-radius: var(--radius-m);
  background: var(--bg-band); border: 1px solid var(--line); color: var(--text); text-decoration: none; }
.play-album-card:hover { border-color: var(--surface-action-outline); color: var(--text); }
.play-album-card img, .play-cover-blank { width: 76px; height: 76px; border-radius: var(--radius-s); object-fit: cover; flex: none; background: var(--surface-artwork-fallback); }
.play-album-text, .play-song-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.play-album-text small, .play-song-text small { color: var(--muted); font-size: var(--step--1); }
.play-album-text .play-lyric-font, .play-song-text .play-lyric-font { color: var(--text-soft); }
.play-lock { margin-inline-start: auto; }
.play-empty { color: var(--muted); }

/* Album */
.play-songs { list-style: none; padding: 0; margin: 1.2rem 0; }
.play-songs li + li { border-top: 1px solid var(--line); }
.play-song-row { display: flex; gap: 14px; align-items: center; padding: 12px 6px; min-height: 64px; color: var(--text); text-decoration: none; }
.play-song-row:hover { color: var(--text); background: var(--bg-band); }
.play-track { width: 2ch; text-align: end; color: var(--muted); flex: none; }
.play-boss { background: color-mix(in srgb, var(--seed-gold) 14%, transparent); border-radius: var(--radius-s); }
.play-boss small { color: var(--accent); }

/* Now playing */
.play-controls { position: sticky; top: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px;
  padding: 10px 0; background: var(--bg); border-bottom: 1px solid var(--line); }
.play-round { width: var(--target); height: var(--target); border-radius: var(--radius-pill); border: 1px solid var(--surface-action-outline);
  background: var(--bg-raised); color: var(--text); font: 600 1.1rem/1 var(--font); cursor: pointer; }
.play-round:hover { border-color: var(--seed-lavender); }
.play-main { width: 60px; height: 60px; background: var(--accent); color: var(--accent-ink); border: 0; font-size: 1.4rem; }
.play-main::before, #play-mini-toggle::before { content: "▶"; }
.play-main[data-playing="1"]::before, #play-mini-toggle[data-playing="1"]::before { content: "❚❚"; }
.play-seek { flex: 1 1 160px; display: flex; }
.play-seek input { width: 100%; accent-color: var(--accent); min-height: var(--target); }
.play-time { color: var(--muted); font-variant-numeric: tabular-nums; font-size: var(--step--1); }
.play-check { display: flex; gap: 8px; align-items: center; font-size: var(--step--1); color: var(--text-soft); margin-bottom: 0.6rem; }
.play-check input { width: 20px; height: 20px; accent-color: var(--accent); }

.play-lyrics { list-style: none; padding: 0; margin: 0.6rem 0 2rem; }
.play-line { position: relative; padding: 10px 52px 10px 14px; border-radius: var(--radius-s); border-inline-start: 4px solid transparent; opacity: 0.72; }
.play-line[aria-current] { opacity: 1; background: var(--surface-plum); border-inline-start-color: var(--accent); }
.play-line p { margin: 0; }
.play-line-text { font-size: 1.35rem; line-height: 1.5; font-weight: 600; }
.play-line-translation { color: var(--text-soft); font-size: var(--step-0); }
.play-word { font: inherit; color: var(--word-colour, var(--text)); background: none; border: 0; padding: 2px 1px; margin: 0;
  cursor: pointer; border-radius: 4px; text-decoration: underline dotted color-mix(in srgb, var(--word-colour, var(--text)) 50%, transparent);
  text-underline-offset: 0.25em; }
.play-word:hover { background: var(--surface-callout); }
.play-line-seek { position: absolute; inset-inline-end: 6px; top: 8px; width: 40px; height: 40px; border-radius: var(--radius-pill);
  border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; }
.play-line-seek:hover, .play-line-seek:focus-visible { color: var(--text); border-color: var(--seed-lavender); }

.play-lesson { background: var(--bg-band); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 16px 18px; }
.play-lesson h2 { font-size: var(--step--1); text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); }
.play-forms { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 0; list-style: none; }

/* Mini player while browsing */
.play-mini { position: fixed; inset-inline: 0; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px var(--gutter); background: var(--surface-dusk); border-top: 1px solid var(--surface-action-outline); }
.play-mini[hidden] { display: none; }
#play-mini-toggle { background: var(--accent); color: var(--accent-ink); border: 0; }

/* Word sheet */
.play-sheet { width: min(32rem, calc(100vw - 32px)); border: 1px solid var(--surface-action-outline); border-radius: var(--radius-m);
  background: var(--bg-raised); color: var(--text); padding: 22px; }
.play-sheet::backdrop { background: color-mix(in srgb, var(--surface-stage-bottom) 70%, transparent); }
.play-sheet h2 { color: var(--word-colour, var(--text)); font-size: var(--step-2); margin-bottom: 0.2em; }
.play-emoji { font-size: 2rem; margin: 0; }
.play-meaning { font-size: var(--step-1); }
.play-word-line { color: var(--text-soft); border-inline-start: 3px solid var(--line); padding-inline-start: 10px; }
.play-sheet-actions { display: flex; flex-wrap: wrap; gap: 10px; }

@media (max-width: 560px) {
  .play-line-text { font-size: 1.2rem; }
  .play-controls { gap: 6px; }
  .play-time { width: 100%; text-align: center; }
}
@media (prefers-reduced-motion: reduce) { .play * { transition: none !important; } }
