@import url("/atlas.css");

.play-page {
  --play-bg: #141925;
  --play-border: #414c62;
  --play-dim: #bcc7d8;
  --play-accent: #ffb078;
  --play-hit: #214349;
  --play-near: #523b24;
  --play-miss: #242c3e;
  color-scheme: dark;
}
.play-page [hidden] { display: none !important; }
.play-wrap { width: min(1100px, 100%); margin-inline: auto; padding: clamp(1rem,4vw,3rem); }
.play-intro { margin: .7rem 0 1.65rem; max-width: 68ch; }
.play-intro h1 { font-size: clamp(2.2rem,6vw,4.45rem); line-height: 1; letter-spacing: -.055em; margin: .24em 0; }
.play-intro p { color: var(--play-dim); margin: 0; }
.play-kicker { color: var(--play-accent) !important; font-weight: 800; font-size: .91rem; }
.play-panel { background: var(--play-bg); border: 1px solid var(--play-border); border-radius: 1rem; padding: clamp(.9rem,2.5vw,1.4rem); min-width: 0; }
.play-panel h2 { margin-top: 0; font-size: clamp(1.1rem,3vw,1.4rem); }
.play-layout { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(230px,1fr); gap: 1rem; align-items: start; }
.play-page label { display: grid; gap: .35rem; font-weight: 650; color: #edf0f7; min-width: 0; }
.play-page :is(input, select, textarea, button, .play-action) { min-height: 44px; min-width: 44px; font: inherit; }
.play-page :is(input, select, textarea) { background: #101520; color: #f1f4fb; border: 1px solid #64718a; border-radius: .55rem; padding: .58rem .7rem; width: 100%; }
.play-page :is(button, .play-action) { background: #232c3d; color: #f5f7fa; border: 1px solid #65728b; border-radius: .55rem; padding: .56rem .84rem; font-weight: 750; cursor: pointer; }
.play-page .play-primary { background: #ffb078; color: #231815; border-color: #ffb078; }
.play-page :is(button, .play-action):hover { filter: brightness(1.12); }
.play-page button:disabled { opacity: .65; cursor: default; }
.play-page :is(a, button, input, select, textarea, [tabindex]):focus-visible { outline: 2px solid #ffe1a8; outline-offset: 3px; }
.play-page a.play-action { display: inline-flex; align-items: center; text-decoration: none; text-align: center; justify-content: center; }
.play-actions { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; }
.play-muted, .play-status { color: var(--play-dim); }
.play-status { min-height: 1.45em; margin: .55rem 0; }
.play-section { margin-top: 1rem; }
.play-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .7rem; }
.play-countdown, .play-timer { color: #f7d3b3; font-variant-numeric: tabular-nums; margin: 0; font-weight: 750; }
.play-guess { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: start; gap: .55rem; margin: .9rem 0 0; }
.play-input-wrap { position: relative; }
.play-options { background: #171f2e; border: 1px solid #66738c; padding: .24rem; border-radius: .6rem; margin: .3rem 0 0; list-style: none; }
.play-options li { display: flex; align-items: center; padding: .42rem .6rem; min-height: 44px; cursor: pointer; }
.play-options li[aria-selected="true"], .play-options li:hover { background: #2b3b54; border-radius: .35rem; }
.play-clue-list { display: grid; gap: .75rem; }
.play-clue-row { padding: .6rem; background: #111721; border-radius: .65rem; }
.play-clue-row h3 { margin: 0 0 .45rem; font-size: 1rem; }
.play-clues { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,105px),1fr)); gap: .35rem; margin: 0; }
.play-clues > div { padding: .38rem .45rem; background: var(--play-miss); border: 1px solid #505d76; border-radius: .4rem; }
.play-clues [data-clue="match"] { background: var(--play-hit); border-color: #5badb4; }
.play-clues :is([data-clue="up"],[data-clue="down"]) { background: var(--play-near); border-color: #b09264; }
.play-clues dt { font-size: .77rem; color: #e0e7f3; }
.play-clues dd { margin: .13rem 0 0; font-weight: 700; overflow-wrap: anywhere; font-size: .88rem; }
.play-stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .5rem; margin: .75rem 0; }
.play-stats dt { font-size: .84rem; color: var(--play-dim); }
.play-stats dd { margin: 0; font-size: 1.55rem; font-weight: 800; }
.play-distribution { display: grid; grid-template-columns: auto 1fr auto; gap: .4rem .55rem; align-items: center; font-size: .88rem; }
.play-distribution progress { width: 100%; height: .75rem; accent-color: #f7ad78; }
.play-grid { display: grid; grid-template-columns: repeat(18,minmax(0,1fr)); grid-template-rows: repeat(7,minmax(22px,1fr)) .35rem repeat(2,minmax(22px,1fr)); gap: .16rem; }
.play-cell { display: grid; place-items: center; color: #f4f7fb; background: color-mix(in srgb,#1a2334,var(--family,#9eacc3) 20%); border: 1px solid color-mix(in srgb,#4a566d,var(--family,#9eacc3) 40%); border-radius: .26rem; font-weight: 700; font-size: clamp(.57rem,1.5vw,.86rem); }
.play-cell[data-grid="out"] { color: #97a4ba; background: #171e2b; border-color: #465167; }
.play-cell[data-grid="hit"] { background: #214b42; border-color: #81d7bd; }
.play-cell[data-grid="blank"] { color: #aab7cc; background: #151c28; border-color: #424e65; }
.play-cell[data-grid="miss"] { color: #ffded9; background: #632e36; border-color: #ef959d; }
.play-cell[data-grid="excluded"] { visibility: hidden; }
.play-box-options { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,180px),1fr)); gap: .65rem; margin-bottom: .8rem; }
.play-speed-progress { width: 100%; accent-color: #ffb078; height: .75rem; }
.play-atom { position: relative; border: 1px solid #505c76; border-radius: .8rem; background: radial-gradient(ellipse at center,#242341,#111725 68%); overflow: hidden; min-height: 190px; }
.play-atom :is(canvas,img) { display: block; width: 100%; height: clamp(190px,30vw,310px); object-fit: contain; }
.play-reveal { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 1rem; align-items: center; }
.play-reveal h2 { margin: 0; font-size: clamp(1.45rem,4vw,2.45rem); }
.play-undiscovered { font-size: .91rem; color: var(--play-dim); margin-bottom: 0; }
.play-footer { display: flex; flex-wrap: wrap; gap: .4rem .75rem; margin-top: 1.6rem; }
.play-footer a, .play-sources a { display: inline-flex; min-height: 44px; align-items: center; }
@media (max-width:760px) {
  .play-layout, .play-reveal { grid-template-columns: minmax(0,1fr); }
  .play-cell { border-radius: .14rem; }
  .play-grid { gap: .1rem; }
}

.play-guess > button { margin-top: 1.65rem; }
#speed-missed summary { min-height: 44px; cursor: pointer; }
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(100%,135px),1fr)); gap: .67rem; }
.cards-grid > .collection-card { display: grid; gap: .2rem; justify-items: start; align-content: start; min-height: 138px; padding: .65rem; text-align: left; background: color-mix(in srgb,#1a2231,var(--family,#9eacc3) 12%); border-color: color-mix(in srgb,#64718a,var(--family,#9eacc3) 50%); overflow-wrap: anywhere; }
.collection-card .card-number { font-size: .83rem; color: #d8e0ee; }
.collection-card .card-symbol { color: var(--family,#dce6fb); line-height: 1; font-size: 1.6rem; }
.collection-card .card-rarity { color: #cbd5e5; font-size: .76rem; }
.collection-card img { width: 100%; height: 62px; object-fit: contain; }
.cards-grid > .collection-card[data-locked] { border-color: #434e65; background: linear-gradient(153deg,#202736,#141925); min-height: 138px; justify-items: center; align-content: center; }
.collection-card[data-locked] .card-number { font-size: 1.45rem; color: #aab6cc; }
.cards-cutoffs { display: grid; grid-template-columns: auto 1fr; gap: .35rem 1rem; }
.cards-cutoffs dt { font-weight: 700; }
.cards-cutoffs dd { margin: 0; }
.cards-dialog { width: min(94vw,450px); max-height: 90dvh; overflow: auto; color: #f5f7fa; }
.cards-dialog::backdrop { background: #080b13cc; }
.cards-dialog > button { display: block; margin: 0 0 .65rem auto; }
#card-surfaces { margin-bottom: .7rem; perspective: 750px; }
.card-face { min-height: 320px; background: radial-gradient(ellipse at 50% 46%,color-mix(in srgb,#202639,var(--family,#9eacc3) 15%),#121825 75%); border: 2px solid color-mix(in srgb,#5f6d85,var(--family,#9eacc3) 55%); border-radius: .8rem; padding: 1rem; }
.card-face h2 { margin: .2rem 0; font-size: 1.65rem; }
.card-face img { display: block; width: 100%; height: 130px; object-fit: contain; }
.card-face .card-symbol { font-size: 2.6rem; font-weight: 800; color: var(--family,#dce6fb); }
.card-face dl { display: grid; grid-template-columns: auto 1fr; gap: .3rem .8rem; font-size: .93rem; }
.card-face dd { margin: 0; }
.card-face-entrance { animation: card-turn .37s cubic-bezier(.18,.62,.2,1) both; }
@keyframes card-turn { from { transform: rotateY(87deg); opacity:.25; } to { transform: rotateY(0); opacity:1; } }
#card-code { margin-block: .4rem .7rem; }
@media (prefers-reduced-motion:reduce) { .card-face-entrance { animation: none; } }
.cards-grid > .card-tile[data-locked] { display: grid; border: 1px solid #434e65; border-radius: .55rem; }

.play-input-wrap label { margin-bottom: .35rem; }
#speed-setup .play-status:empty { display: none; }
.daily-game-stack { min-width: 0; }
.play-clue-list:not(:empty) { max-height: min(55vh, 27rem); overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
