.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; clip: rect(0,0,0,0); overflow: hidden; white-space: nowrap; border: 0; }
.play-screen { width: 100%; max-width: 780px; margin-inline: auto; padding: 8px 20px 10px; }
.play-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.play-nav > div { display: flex; align-items: center; gap: 16px; }
.playing-draft .play-nav .display-button { position: static; flex: 0 0 36px; }
.playing-draft.host-immersive .play-nav { position: sticky; top: 0; z-index: 4; background: var(--surface); }
.quiet-control { min-height: 36px; padding: 4px 0; border: 0; background: none; color: var(--muted); font-size: 13px; font-weight: 600; }
.quiet-control:hover { color: var(--paper); }
.quiet-control:disabled { opacity: .5; }
#history-count { color: var(--mint); margin-left: 4px; font-variant-numeric: tabular-nums; }
.play-header { display: grid; grid-template-columns: 86px minmax(0, 1fr) auto; align-items: center; gap: 20px; padding: 6px 0 14px; }
.play-brand .brand-lockup { width: 100%; }
/* Keep the menu logo's depth proportional when it becomes a small HUD mark. */
.play-brand .title-tile { border-width: .32cqw; box-shadow: inset 0 .65cqw .65cqw #b0efba55, inset 0 -1.25cqw 1cqw #071c12aa, 0 1.25cqw 0 #07160d; }
.play-brand .tile-letter { text-shadow: 0 .6cqw 0 #d5d4b8, 0 1.25cqw 1cqw #06190dad; }
.play-heading h2 { margin: 3px 0 4px; font-size: 24px; letter-spacing: -.035em; }
.play-heading p { margin: 0; font-size: 12px; line-height: 1.4; color: var(--muted); }
#play-date { color: var(--mint); font: 10px var(--mono); letter-spacing: .07em; }
.play-stats { display: grid; grid-template-columns: minmax(112px, auto) minmax(56px, auto); align-items: start; gap: 22px; }
.play-stats > div, .play-stats > button { display: grid; grid-template-rows: 12px 34px; align-content: start; gap: 4px; text-align: right; }
.play-stats span { color: var(--muted); font: 10px/12px var(--sans); letter-spacing: .1em; }
.play-stats strong { display: block; color: var(--paper); font: 650 28px/34px var(--sans); font-variant-numeric: tabular-nums; }
.play-stats .time-stat strong { color: var(--lime); }
#play-penalty { margin-left: 4px; color: #ffc59e; font: 600 10px var(--sans); letter-spacing: 0; white-space: nowrap; }
#play-points { border: 0; padding: 0; background: none; }
#play-points:hover span { color: var(--mint); }
.play-loading { padding: 48px 12px; text-align: center; color: var(--muted); }
.play-progress { display: flex; align-items: center; gap: 16px; margin-bottom: 10px; }
#play-progress-label { flex: 0 0 auto; color: var(--mint); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.progress-track { flex: 1; height: 4px; background: #2d3d31; border-radius: 4px; overflow: hidden; }
.progress-track i { display: block; height: 100%; background: var(--lime); width: 0; transition: width 200ms; }
.play-rack { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: clamp(4px, 1.2vw, 9px); margin-bottom: 18px; }
.play-slot { min-width: 0; container-type: inline-size; }
.rack-bulbs { display: flex; justify-content: center; gap: 1px; margin-bottom: 5px; }
.rack-bulb { flex-shrink: 0; width: clamp(8px, 25cqw, 12px); height: clamp(11px, 33.33cqw, 16px); color: #7c9181; }
.rack-bulb.is-lit { color: var(--lime); filter: drop-shadow(0 0 4px #d9f77766); }
.rack-bulb.is-lit .bulb-glass { fill: #dcf87c; }
.play-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(5px, 14cqw, 10px); width: 100%; height: clamp(46px, 110cqw, 76px); padding: 6px 1px; border: 1px solid #55735b; border-radius: 7px; color: var(--paper); background: linear-gradient(150deg, #35593f, #203d2a 65%, #193021) border-box no-repeat; box-shadow: inset 0 2px 2px #add1a629, 0 3px 0 #09190f; transition: transform 120ms; }
.play-tile strong { font: 800 clamp(19px, 58cqw, 34px)/1 var(--sans); text-shadow: 0 2px 1px #0006; }
.play-tile:hover:not(:disabled) { transform: translateY(-2px); background-color: #34593d; }
.play-tile:active:not(:disabled) { transform: translateY(3px); }
.play-tile:disabled { cursor: default; }
.play-tile.will-drop { border-color: #d9f777; box-shadow: inset 0 0 0 1px #d9f77755, 0 3px 0 #667841; }
.rack-charges { display: flex; gap: clamp(2px, 7cqw, 5px); }
.rack-charges i { width: clamp(4px, 12cqw, 6px); height: clamp(3px, 9cqw, 5px); border-radius: 3px; background: #102619; box-shadow: inset 0 1px 2px #0005; }
.rack-charges i.charged { background: var(--lime); box-shadow: 0 0 5px #dcf77755; }
.rack-charges i.spending { background: #91b780; box-shadow: none; }
.play-entry { display: grid; grid-template-columns: minmax(0, 1fr) 140px; grid-template-areas: "input submit" "tools tools"; gap: 10px; }
.play-entry-wrap { grid-area: input; display: flex; min-width: 0; border: 1px solid #62775f; border-radius: 6px; background: #0c1710; }
.play-entry-wrap:focus-within { outline: 2px solid var(--mint); outline-offset: 2px; }
.play-entry input { width: 100%; min-width: 0; height: 46px; padding: 0 14px; border: 0; background: none; color: var(--paper); font: 650 23px var(--sans); letter-spacing: .08em; outline: none; }
.play-entry input::placeholder { font-size: 13px; letter-spacing: .08em; color: #8a9d8c; font-weight: 400; }
#play-clear { flex: 0 0 44px; border: 0; background: none; color: #a5bca4; font-size: 26px; }
.play-submit { grid-area: submit; min-height: 46px; border: 0; border-radius: 6px; color: #172214; background: var(--lime); box-shadow: 0 3px 0 #83994d; font-weight: 750; font-size: 15px; }
.play-submit span { margin-left: 12px; }
.play-submit:disabled { filter: saturate(.5); opacity: .6; cursor: default; }
.play-feedback { min-height: 32px; display: flex; align-items: center; margin: 8px 0 0; color: #b8cbb5; font-size: 13px; line-height: 1.4; }
.play-feedback.is-error { color: #ffc59e; }
.play-tools { grid-area: tools; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.play-tools button { min-width: 0; min-height: 42px; padding: 8px 4px; text-align: center; border: 1px solid #45624d; border-radius: 6px; background: #223a2b; box-shadow: 0 2px 0 #0b1b11; }
.play-tools strong { font-size: 13px; font-weight: 650; white-space: nowrap; }
.play-tools strong span { color: var(--mint); margin-left: 7px; }
.play-tools button:hover:not(:disabled) { background: #2b4734; }
.play-tools button:disabled { opacity: .45; cursor: default; }
#play-hint { padding-block: 5px; }
#play-hint strong { display: block; line-height: 16px; }
#hint-remaining { display: block; margin-top: 2px; color: var(--muted); font: 10px/12px var(--sans); white-space: nowrap; }
#hint-remaining[hidden] { display: none; }
.play-tools .hint-paid #hint-cost, .play-feedback.has-hint-penalty { color: #ffc59e; }
.play-tools .hint-paid { border-color: #687454; }
.play-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 0; }
.play-footer > span { font-size: 10px; color: #829585; }
.play-dialog h2 { font-size: 28px; margin: 0; }
.play-dialog .dialog-top { margin-bottom: 20px; }
.play-dialog .rules { margin-top: 0; }
.history-total { color: var(--mint); font-size: 14px; }
.history-list { list-style: none; padding: 0; margin: 18px 0 0; }
.history-list li { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 14px 0; border-top: 1px solid var(--line); }
.history-list li > div { display: grid; gap: 4px; }
.history-list strong { letter-spacing: .04em; }
.history-list span { font-size: 12px; color: var(--muted); }
.history-list b { color: var(--lime); }
.scoring-formula { padding: 18px; margin: 20px 0; border-radius: 6px; background: #223527; font: 16px/1.8 var(--mono); color: var(--lime); }
.result-numbers { display: flex; gap: 30px; margin: 28px 0; }
.result-numbers > div { display: grid; gap: 5px; }
.result-numbers strong { font-size: 28px; color: var(--lime); }
.result-numbers span { font-size: 13px; color: var(--muted); }
.result-history { display: block; margin: 12px auto 0; }
.result-times { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 20px 0; padding: 14px 0; border-block: 1px solid var(--line); }
.result-times dt { color: var(--muted); font-size: 11px; }
.result-times dd { margin: 6px 0 0; color: var(--paper); font-size: 17px; font-weight: 650; font-variant-numeric: tabular-nums; }
.result-times > :nth-child(2) dd { color: #ffc59e; }
.result-times > :last-child dd { color: var(--lime); }
.play-dialog:has(.result-numbers) .dialog-content { padding: 18px 24px; }
.play-dialog:has(.result-numbers) .dialog-top { margin-bottom: 12px; }
.play-dialog:has(.result-numbers) .close { width: 36px; height: 36px; min-height: 36px; }
.play-dialog:has(.result-numbers) .dialog-description { font-size: 14px; line-height: 1.4; margin: 0; }
.play-dialog:has(.result-numbers) .result-times { margin-block: 14px; padding-block: 10px; }
.play-dialog:has(.result-numbers) .result-numbers { margin-block: 16px; }
.play-dialog:has(.result-numbers) .primary { min-height: 44px; padding: 10px; }
.play-dialog:has(.result-numbers) .result-history { min-height: 30px; margin-top: 6px; }
.play-dialog:has(.result-numbers) .ranking-note { margin-top: 8px; font-size: 11px; line-height: 1.4; }
.preview-controls { flex-wrap: wrap; }
.preview-controls .inline-button { color: var(--mint); font-size: 11px; }
.preview-controls .inline-button:disabled { opacity: .4; cursor: default; }
@media (max-width: 640px) {
  .play-screen { padding: 6px 12px 8px; }
  .play-header { grid-template-columns: 72px minmax(0, 1fr) auto; gap: 14px; }
  .play-heading h2 { font-size: 21px; }
  .play-heading p { font-size: 11px; }
  .play-stats { grid-template-columns: minmax(94px, auto) minmax(42px, auto); gap: 14px; }
  .play-stats > div, .play-stats > button { grid-template-rows: 11px 29px; gap: 3px; }
  .play-stats strong { font-size: 24px; line-height: 29px; }
  .play-stats span { font-size: 9px; line-height: 11px; }
}
@media (max-width: 480px) {
  .play-screen { padding-inline: 10px; }
  .play-nav > div { gap: 12px; }
  .play-header { grid-template-columns: 72px minmax(0, 1fr); grid-template-rows: auto auto; gap: 5px 18px; padding: 8px 0 12px; }
  .play-brand { grid-row: 1 / 3; }
  .play-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; grid-column: 2; grid-row: 1; }
  .play-heading h2 { margin: 0; font-size: 20px; }
  #play-date { font-size: 9px; }
  #play-goal { display: none; }
  .play-stats { grid-column: 2; grid-row: 2; grid-template-columns: minmax(92px, 1fr) auto; gap: 12px; }
  .play-stats > div, .play-stats > button { text-align: left; }
  #play-points { text-align: right; }
  .play-stats strong { font-size: 23px; }
  .play-progress { gap: 12px; margin-bottom: 9px; }
  .play-rack { gap: 4px; margin-bottom: 17px; }
  .play-entry { grid-template-columns: minmax(0, 1fr); grid-template-areas: "input" "tools" "submit"; gap: 10px; }
  .play-entry input { font-size: 21px; letter-spacing: .04em; }
  .play-entry input::placeholder { font-size: 14px; }
  .play-tools { gap: 8px; }
  .play-tools button { min-height: 44px; padding-inline: 2px; }
  .play-tools strong { font-size: 12px; }
  .play-tools strong span { margin-left: 3px; }
  .play-feedback { min-height: 36px; font-size: 12px; }
  .play-footer > span { max-width: 185px; line-height: 1.4; }
}
.short-landscape .play-screen { padding-block: 4px; }
.short-landscape .play-header { grid-template-columns: 58px minmax(0, 1fr) auto; gap: 16px; padding: 2px 0 8px; }
.short-landscape .play-heading h2 { font-size: 21px; }
.short-landscape .play-tile { height: 54px; gap: 6px; }
.short-landscape .play-tile strong { font-size: 28px; }
.short-landscape .play-rack { margin-bottom: 12px; }
.short-landscape .play-entry { grid-template-columns: minmax(0, 1fr) 132px; grid-template-areas: "input submit" "tools tools"; gap: 8px; }
.short-landscape .play-entry input, .short-landscape .play-submit { min-height: 42px; height: 42px; }
.short-landscape .play-tools button { min-height: 36px; padding-block: 6px; }
.short-landscape #play-hint { padding-block: 2px; }
.short-landscape .play-feedback { min-height: 26px; margin-top: 6px; }
.short-landscape .play-footer .quiet-control { min-height: 30px; }
@media (prefers-reduced-motion: reduce) { .play-tile, .progress-track i { transition: none; } }
