/* QwickGames shared styles: brand tokens, the QwickGames bar on game pages, the next-game card. */
:root{
  --qg-ink:#1d1b2e; --qg-paper:#fbf3e4; --qg-card:#fffdf8; --qg-card-2:#f7efe0; --qg-muted:#5d5a6e; --qg-line:#e6dcc8;
  --qg-yellow:#ffc23d; --qg-yellow-ink:#1d1b2e; --qg-shadow:#c98f12; --qg-tile:#1d1b2e; --qg-tile-ink:#fbf3e4; --qg-tile-shadow:#0c0b16;
  --qg-logo-font:'Archivo Black','Arial Black',Impact,sans-serif;
}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --qg-ink:#f3ecdf; --qg-paper:#14131f; --qg-card:#1e1d2c; --qg-card-2:#272637; --qg-muted:#a9a5b9; --qg-line:#34324a;
    --qg-yellow:#ffc23d; --qg-yellow-ink:#14131f; --qg-shadow:#a8770e; --qg-tile:#f3ecdf; --qg-tile-ink:#1d1b2e; --qg-tile-shadow:#8f887a;
  }
}
:root[data-theme="dark"]{
  --qg-ink:#f3ecdf; --qg-paper:#14131f; --qg-card:#1e1d2c; --qg-card-2:#272637; --qg-muted:#a9a5b9; --qg-line:#34324a;
  --qg-yellow:#ffc23d; --qg-yellow-ink:#14131f; --qg-shadow:#a8770e; --qg-tile:#f3ecdf; --qg-tile-ink:#1d1b2e; --qg-tile-shadow:#8f887a;
}

/* Hidden on the live domain: testing-only controls */
.qg-live #replayBtn{display:none!important}

/* ---------- QwickGames bar (top of each game page) ---------- */
.qg-bar{max-width:1040px;margin:0 auto 10px;display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:4px 0 10px;border-bottom:1px solid var(--qg-line);font-family:'Barlow',system-ui,-apple-system,'Segoe UI',sans-serif}
.qg-home{display:flex;align-items:center;gap:8px;color:var(--qg-ink);text-decoration:none;flex:none;border-radius:8px}
.qg-home:focus-visible,.qg-pill:focus-visible,.qg-next-go:focus-visible{outline:3px solid var(--qg-yellow);outline-offset:2px}
.qg-tile{display:inline-grid;place-items:center;flex:none;width:28px;height:30px;border-radius:7px;background:var(--qg-yellow);color:#1d1b2e;
  font:400 19px/1 var(--qg-logo-font);transform:rotate(-9deg);box-shadow:0 3px 0 var(--qg-shadow)}
.qg-speed{display:flex;flex-direction:column;justify-content:center;gap:3px;width:11px;margin-right:-4px;flex:none}
.qg-speed i{display:block;height:2.5px;border-radius:2px;background:var(--qg-yellow)}
.qg-speed i:nth-child(1){width:11px}.qg-speed i:nth-child(2){width:7px;margin-left:4px}.qg-speed i:nth-child(3){width:9px;margin-left:2px}
.qg-word{font:400 19px/1 var(--qg-logo-font);letter-spacing:-.005em}
.qg-word b{font-weight:inherit}
.qg-games{display:flex;gap:6px;min-width:0}
.qg-pill{display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 12px;border-radius:999px;border:1px solid var(--qg-line);
  background:var(--qg-card);color:var(--qg-ink);text-decoration:none;font:600 14px/1 'Barlow',system-ui,sans-serif;white-space:nowrap;transition:border-color .15s,background .15s}
.qg-pill:hover{border-color:var(--g)}
.qg-pill.on{border-color:var(--g);box-shadow:inset 0 -3px 0 var(--g)}
.qg-tick{font-style:normal;font-weight:800;color:var(--g)}
.qg-dot{width:7px;height:7px;border-radius:50%;background:var(--g)}
.qg-sh{display:none}
@media (max-width:640px){
  .qg-full{display:none}.qg-sh{display:inline}
  .qg-word{font-size:17px}.qg-pill{padding:0 10px;height:30px;font-size:13px}
}
@media (max-width:370px){.qg-word{display:none}}

/* ---------- Light/dark switch ---------- */
.qg-theme{display:inline-grid;place-items:center;flex:none;width:36px;height:36px;padding:0;border-radius:10px;border:1px solid var(--qg-line);
  background:var(--qg-card);color:var(--qg-ink);cursor:pointer;transition:border-color .15s}
.qg-theme:hover{border-color:var(--qg-yellow)}
.qg-theme:focus-visible{outline:3px solid var(--qg-yellow);outline-offset:2px}
.qg-theme svg{width:19px;height:19px}
.qg-bar .qg-games{margin-left:auto}
@media (max-width:480px){.qg-bar .qg-word{display:none}.qg-bar .qg-theme{width:32px;height:32px}}

/* ---------- Next game card (inside a game's result card) ---------- */
.qg-next{margin-top:18px;padding-top:16px;border-top:1px dashed var(--qg-line)}
.qg-next-k{font:600 13px/1.2 'Barlow',system-ui,sans-serif;letter-spacing:.08em;text-transform:uppercase;color:var(--qg-muted);margin-bottom:8px}
.qg-next-go{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 16px;border-radius:12px;
  background:var(--qg-card-2);border:1px solid var(--qg-line);border-left:5px solid var(--g);color:var(--qg-ink);text-decoration:none;transition:transform .15s}
.qg-next-go:hover{transform:translateY(-1px)}
.qg-next-go b{display:block;font:400 19px/1.15 var(--qg-logo-font);letter-spacing:0}
.qg-next-go small{display:block;font-size:14px;color:var(--qg-muted);margin-top:3px}
.qg-arrow{font:700 24px/1 'Barlow',sans-serif;color:var(--g)}
@media (prefers-reduced-motion: reduce){.qg-next-go,.qg-pill{transition:none}}

/* ---------- Play fit: the whole scene and the answer box on one screen ----------
   --qg-vh  = visible height of the window (shrinks when a phone keyboard opens)
   --qg-adh = space taken by the bottom banner ad, so the game never sits behind it */
/* Wide screens: scene beside the answer card, scene sized to fit above the bottom ad */
@media (min-width:880px){
  html[data-game] .stage{height:clamp(420px,calc(var(--qg-vh,100vh) - var(--qg-adh,0px) - 24px),790px)}
}
/* Narrower screens: while a round is being played, the scene fills the screen and the
   answer box docks underneath it, like one game console. */
@media (max-width:879px){
  html.qg-play .layout{display:flex;flex-direction:column;gap:0;height:calc(var(--qg-vh,100vh) - var(--qg-adh,0px) - 16px);min-height:430px}
  html.qg-play .stage{flex:1 1 auto;height:auto;min-height:170px;border-radius:16px 16px 0 0;border-bottom:0}
  html.qg-play .panel{flex:none;gap:0;grid-template-columns:minmax(0,1fr)}
  html.qg-play #playCard{min-width:0}
  html.qg-play .entry input{width:0}
  html.qg-play .panel > :not(#playCard){display:none}
  html.qg-play #playCard{border-radius:0 0 16px 16px;border-top:3px solid var(--accent);padding:10px 16px 12px}
  html.qg-play #gamePane .eyebrow{font-size:12px}
  html.qg-play .msg{min-height:18px;margin:4px 0 0;font-size:15px}
  html.qg-play .btn{padding:11px 18px}
  /* Chainlink Climb: clock is already in the scene's corner */
  html.qg-play .clockrow,html.qg-play #fine{display:none}
  html.qg-play .linkrow{margin:6px 0 0;gap:8px}
  html.qg-play .linkrow .chip{font-size:21px;padding:6px 10px}
  html.qg-play .clue{font-size:17px;margin:6px 0 0}
  html.qg-play #form:has(.cells){display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;margin-top:8px}
  html.qg-play #form .entry:has(.cells){flex:1 1 230px;margin:0}
  html.qg-play #form > .row{flex:none}
  html.qg-play .cell{max-width:46px}
  /* Treasure Dig: tide timer is already in the scene's corner */
  html[data-game="dig"].qg-play .timerow,html[data-game="dig"].qg-play #gamePane .row .fine{display:none}
  html.qg-play .prompt{margin:6px 0 0;font-size:14px}
  html.qg-play .word{font-size:40px;margin:2px 0 4px}
  html.qg-play #gamePane .slots{margin:6px 0 8px}
  html.qg-play #gamePane .slot{min-height:38px;padding:9px 6px;font-size:18px}
  html[data-game="dig"].qg-play #gamePane > .row{margin-top:6px!important}
  /* Squirrel Stash */
  html[data-game="stash"].qg-play .timerow{display:none}
  html.qg-play .roundhead{margin:6px 0 0;gap:12px}
  html.qg-play .roundhead .letter{width:52px;height:58px;font-size:38px;border-radius:12px}
  html.qg-play .roundhead .cat span{font-size:13px}
  html.qg-play .roundhead .cat b{font-size:24px}
  html[data-game="stash"].qg-play .entry{margin-top:8px}
  html.qg-play #chips{margin-top:6px;max-height:62px;overflow-y:auto}
}

/* ---------- Player accounts ---------- */
.qg-acct{display:inline-flex;flex:none}
.qg-acct:empty{width:36px;height:36px}
.qg-acct-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;height:36px;border-radius:10px;cursor:pointer;font:600 14px/1 'Barlow',system-ui,sans-serif}
.qg-signin-btn{padding:0 12px 0 10px;border:1px solid var(--qg-line);background:var(--qg-card);color:var(--qg-ink)}
.qg-signin-btn:hover{border-color:var(--qg-yellow)}
.qg-signin-btn svg{width:18px;height:18px}
.qg-avatar{width:36px;padding:0;border:0;background:var(--qg-yellow);color:#1d1b2e;font:400 17px/1 var(--qg-logo-font);box-shadow:0 3px 0 var(--qg-shadow);transform:rotate(-6deg)}
.qg-acct-btn:focus-visible{outline:3px solid var(--qg-yellow);outline-offset:2px}
@media (max-width:480px){.qg-signin-btn span{display:none}.qg-signin-btn{width:36px;padding:0}.qg-bar .qg-acct-btn{height:32px}.qg-bar .qg-avatar,.qg-bar .qg-signin-btn{width:32px}}
.qg-menu{position:absolute;z-index:60;min-width:220px;padding:8px;border-radius:14px;background:var(--qg-card);border:1px solid var(--qg-line);box-shadow:0 14px 40px rgba(15,13,30,.22);font:500 15px/1.3 'Barlow',system-ui,sans-serif;color:var(--qg-ink)}
.qg-menu-who{padding:8px 10px 10px;border-bottom:1px solid var(--qg-line);margin-bottom:6px}
.qg-menu-who b{display:block;font:400 15px/1.2 var(--qg-logo-font)}
.qg-menu-who small{display:block;color:var(--qg-muted);font-size:13px;margin-top:3px;overflow-wrap:anywhere}
.qg-menu a,.qg-menu button{display:block;width:100%;text-align:left;padding:10px;border:0;border-radius:8px;background:none;color:inherit;font:inherit;text-decoration:none;cursor:pointer}
.qg-menu a:hover,.qg-menu button:hover,.qg-menu a:focus-visible,.qg-menu button:focus-visible{background:var(--qg-card-2);outline:none}
.qg-link{border:0;background:none;padding:0;color:inherit;font:inherit;text-decoration:underline;text-underline-offset:2px;cursor:pointer}
.qg-save-nudge{margin:12px 0 0;font:500 14px/1.4 'Barlow',system-ui,sans-serif;color:var(--qg-muted)}
.qg-save-nudge .qg-link{color:var(--qg-ink);font-weight:700}

.qg-dlg{width:min(440px,calc(100vw - 24px));max-height:calc(100dvh - 24px);padding:0;border:0;border-radius:20px;background:var(--qg-card);color:var(--qg-ink);
  box-shadow:0 30px 80px rgba(10,8,25,.35);font:400 16px/1.45 'Barlow',system-ui,sans-serif;overflow:auto}
.qg-dlg::backdrop{background:rgba(16,14,30,.55)}
.qg-dlg-in{padding:28px 26px 22px}
.qg-dlg-x{position:absolute;top:10px;right:10px;margin:0}
.qg-dlg-x button{width:36px;height:36px;border-radius:10px;border:1px solid var(--qg-line);background:var(--qg-card);color:var(--qg-ink);font:600 20px/1 sans-serif;cursor:pointer}
.qg-dlg-tile{display:flex;align-items:center;gap:2px;margin-bottom:12px}
.qg-dlg-tile .qg-tile{width:38px;height:41px;font-size:26px;border-radius:9px}
.qg-dlg-tile .qg-speed{width:14px;margin-right:2px}
.qg-dlg h2{margin:0 0 6px;font:400 26px/1.1 var(--qg-logo-font)}
.qg-dlg-lede{margin:0 0 18px;color:var(--qg-muted)}
.qg-google{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;height:50px;border-radius:12px;border:1px solid var(--qg-line);background:#fff;color:#1f1f1f;font:600 16px/1 'Barlow',system-ui,sans-serif;cursor:pointer}
.qg-google:hover{border-color:#9aa0a6}
.qg-google svg{width:20px;height:20px}
.qg-or{display:flex;align-items:center;gap:10px;margin:18px 0 14px;color:var(--qg-muted);font-size:13px;font-weight:600}
.qg-or::before,.qg-or::after{content:"";flex:1;height:1px;background:var(--qg-line)}
.qg-tabs{display:grid;grid-template-columns:1fr 1fr;gap:4px;padding:4px;border-radius:12px;background:var(--qg-card-2);margin-bottom:14px}
.qg-tabs button{height:38px;border:0;border-radius:9px;background:none;color:var(--qg-muted);font:700 14px/1 'Barlow',system-ui,sans-serif;cursor:pointer}
.qg-tabs button[aria-selected="true"]{background:var(--qg-card);color:var(--qg-ink);box-shadow:0 1px 3px rgba(0,0,0,.12)}
.qg-email{display:grid;gap:12px}
.qg-f{display:grid;gap:6px;font-weight:600;font-size:14px}
.qg-f small{font-weight:500;color:var(--qg-muted)}
.qg-f input{height:46px;padding:0 12px;border-radius:10px;border:1px solid var(--qg-line);background:var(--qg-paper);color:var(--qg-ink);font:500 16px/1 'Barlow',system-ui,sans-serif}
.qg-f input:focus{outline:3px solid var(--qg-yellow);outline-offset:0;border-color:transparent}
.qg-msg{min-height:20px;margin:0;font-size:14px;font-weight:600;color:#c0392b}
.qg-msg.ok{color:#1e7d4f}
.qg-submit{height:50px;border:0;border-radius:12px;background:var(--qg-yellow);color:#1d1b2e;font:400 17px/1 var(--qg-logo-font);box-shadow:0 4px 0 var(--qg-shadow);cursor:pointer}
.qg-submit:active{transform:translateY(2px);box-shadow:0 2px 0 var(--qg-shadow)}
.qg-submit:disabled,.qg-google:disabled{opacity:.6;cursor:wait}
.qg-forgot{justify-self:center;font-size:14px;color:var(--qg-muted)}
.qg-fine{margin:16px 0 0;font-size:13px;color:var(--qg-muted)}
.qg-fine a{color:var(--qg-ink)}

/* AdSense units in the ad spaces */
.ad.qg-ad-live{background:none;border:0;border-radius:0}
