/*
 * /play (QUE-1059, Phase 2 W5). Loaded after tokens.css and auth.css; it only adds PlayShell and the parts
 * PLAY_BRIEF.md names (countdown, seated row, team picker). Rules: League Spartan 400 (200 on countdown
 * numerals only), no shadows, no red or green, one gradient button per screen. Only opacity, transform and
 * colors animate. Brief: docs/browser-first/design/phase2/PLAY_BRIEF.md.
 */

/* League Spartan 200, digits, colon and space only (subset of the Extra Light cut, for the countdown). */
@font-face {
  font-family: "League Spartan";
  src: url("/auth/assets/LeagueSpartan-200-numerals.woff2") format("woff2");
  font-weight: 200;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0020, U+0030-0039, U+003A;
}

/* PlayShell: header, then one centered column on bg-alt. No card. */
.qm-header { justify-content: space-between; }
.who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.who[hidden] { display: none; }
.who-email { font-size: 14px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.qm-btn.sm { min-height: 44px; }

.play-shell { display: flex; justify-content: center; min-height: calc(100vh - 68px); padding: 0 20px 56px; }
.play-col { position: relative; width: 100%; max-width: 560px; align-self: center; padding: 96px 0 56px; opacity: 0; }
.play-col[data-ready] { opacity: 1; animation: rise var(--qw-dur-med) var(--qw-ease) both; }
.play-col > .progress { top: 80px; overflow: hidden; }
.play-col[data-working] > .progress { opacity: 1; }

.view { display: grid; min-width: 0; }
.view > .screen { grid-area: 1 / 1; min-width: 0; }
.screen.enter { animation: panel-in var(--qw-dur-med) var(--qw-ease-snap) 60ms both; }
.screen h1 { font-size: 30px; line-height: 1.1; letter-spacing: -0.02em; outline: none; }
.screen .lead { margin-top: 12px; color: var(--ink-2); font-size: 17px; }
.screen .lead + .lead { margin-top: 8px; }
.screen .actions { margin-top: 24px; }
.screen .btns { margin-top: 24px; display: grid; gap: 8px; max-width: 360px; }
.screen .btns .qm-btn.block { margin-top: 0; }
.screen .btns > .qm-btn:not(.block) { justify-self: start; }
.screen .label { display: block; overflow-wrap: anywhere; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--core-ink); margin-bottom: 12px; }
.screen .tag { display: inline-block; margin-bottom: 16px; font-size: 14px; color: var(--ink-2); border: 1px solid var(--line-2); border-radius: 999px; padding: 3px 12px; }

/* Session line and duration chip */
.session-line { margin-top: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 17px; color: var(--ink); }
.session-line .when { overflow-wrap: anywhere; }
.chip { font-size: 14px; color: var(--core-ink); background: var(--alice); border-radius: 999px; padding: 3px 12px; }

/* Countdown: the DS numeral (League Spartan 200), tabular, fixed width per format so nothing shifts. */
.count { margin-top: 32px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 12px; font-weight: 200; font-size: 88px; line-height: 1; letter-spacing: -0.05em; color: var(--ink); font-variant-numeric: tabular-nums; min-height: 88px; }
.count .unit { font-size: 20px; font-weight: 400; letter-spacing: 0; color: var(--ink-2); margin-right: 8px; }
.count .figure { display: inline-flex; overflow: hidden; }
.count .digit { display: inline-block; min-width: .6em; text-align: center; }
.count .digit.roll { animation: digit-in 200ms var(--qw-ease-snap) both; }
.count .sep { display: inline-block; min-width: .3em; text-align: center; }
.count .figure.minutes { min-width: 2.7em; }
.count[data-fade] { animation: crossfade 150ms var(--qw-ease) both; }
@keyframes digit-in { from { opacity: 0; transform: translateY(40%); } to { opacity: 1; transform: none; } }
@keyframes crossfade { from { opacity: .0; } to { opacity: 1; } }
.fine { margin-top: 24px; font-size: 14px; color: var(--ink-2); max-width: 440px; }
.fine + .fine { margin-top: 12px; }
.fine .qm-link { cursor: pointer; background: none; border: 0; padding: 0; font: inherit; font-size: 14px; }
.cal-link { display: inline-block; margin-top: 16px; font-size: 14px; }

/* Team picker: hairline rows, the whole row is a button. */
.teams { margin-top: 24px; border-top: 1px solid var(--line); }
.team-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; min-height: 64px; padding: 12px 4px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: border-color var(--qw-dur-fast) var(--qw-ease); }
.team-row:hover { border-bottom-color: var(--core); }
.team-row:focus-visible { outline: 2px solid var(--core); outline-offset: 2px; }
.team-row .name { font-size: 17px; overflow-wrap: anywhere; }
.team-row .meta { display: block; font-size: 14px; color: var(--ink-2); }
.team-row .arrow { color: var(--core); flex: none; }

/* Seated row: 40px seals side by side (no overlap, so each first name sits under its own seal). */
.seated:empty { display: none; }
.seated { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 8px 12px; }
.seated .person { display: grid; justify-items: start; gap: 4px; width: 64px; }
.seated .seal { width: 40px; height: 40px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; color: #fff; font-size: 17px; line-height: 1; overflow: hidden; border: 2px solid var(--bg-alt); box-sizing: content-box; }
.seated .seal.photo { background: var(--surface-2); }
.seated .seal img { width: 100%; height: 100%; object-fit: cover; }
.seated .name { font-size: 14px; color: var(--ink-2); max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seated .person.rise { animation: rise var(--qw-dur-med) var(--qw-ease) both; }
.seated-line { margin-top: 16px; }

@media (max-width: 480px) {
  .play-shell { padding: 0 20px 40px; align-items: flex-start; }
  .play-col { padding-top: 32px; align-self: flex-start; }
  .play-col > .progress { top: 16px; }
  .count { font-size: 64px; min-height: 64px; }
  .who-email { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .play-col[data-ready], .screen.enter, .seated .person.rise { animation: none; }
  .count .digit.roll { animation: none; }
  .count[data-fade] { animation: crossfade 150ms linear both; }
  .team-row { transition: none; }
}
