/* Gokab game surface — the editorial brand from the Brand & System doc. EVERYTHING is scoped under
   .gk-app so the palette variables, fonts, and resets never touch the kit's Terminal chrome. */

.gk-app {
  --pa-g:   #f1ead9; /* ground   */
  --pa-pan: #fbf7ec; /* panel    */
  --pa-ink: #211c15; /* ink      */
  --pa-mut: #6f6656; /* muted    */
  --pa-ac:  #7a2230; /* vinho — jeopardy / accent  */
  --pa-gr:  #2f6b45; /* forest — safe / correct    */
  --pa-line:#d8cfba; /* hairline */
  --pa-tb:  #cabfa6; /* tile border */

  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  box-sizing: border-box;
  background:
    radial-gradient(1200px 620px at 82% -140px, color-mix(in srgb, var(--pa-ac) 6%, transparent), transparent 62%),
    var(--pa-g);
  color: var(--pa-ink);
  font-family: 'Newsreader', Georgia, serif;
}

.gk-app *, .gk-app *::before, .gk-app *::after { box-sizing: border-box; }
/* The [hidden] attribute must always win over component display rules (e.g. .gk-btn sets display),
   otherwise hidden buttons/regions leak through. */
.gk-app [hidden] { display: none !important; }
.gk-mono { font-family: 'Spline Sans Mono', ui-monospace, Menlo, monospace; }

/* Phone frame — a centred card that fills a phone and re-centres on desktop. */
.gk-frame {
  width: 100%;
  max-width: 340px;
  min-height: 588px;
  display: flex;
  flex-direction: column;
  background: var(--pa-g);
  border: 1px solid var(--pa-line);
  border-radius: 24px;
  padding: 20px 18px 22px;
  box-shadow: 0 22px 46px -22px rgba(0, 0, 0, .55);
}

.gk-screen { display: flex; flex-direction: column; flex: 1; animation: gkIn .45s ease both; }
.gk-screen[hidden] { display: none; }
.gk-center { align-items: center; justify-content: center; text-align: center; }

@keyframes gkIn  { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes gkPulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

/* Type helpers */
.gk-kicker { font-family: 'Spline Sans Mono', monospace; font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--pa-mut); }
.gk-lead   { font-size: 32px; margin-top: 10px; }
.gk-sub    { font-size: 14.5px; font-style: italic; color: var(--pa-mut); }
.gk-safe   { color: var(--pa-gr); }
.gk-danger { color: var(--pa-ac); }

/* Buttons */
.gk-btn {
  display: inline-block;
  border: 1px solid var(--pa-ink);
  border-radius: 8px;
  padding: 12px 28px;
  font-size: 16px;
  font-family: 'Newsreader', serif;
  background: transparent;
  color: var(--pa-ink);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.gk-btn:hover { background: var(--pa-ink); color: var(--pa-pan); }
.gk-btn--block { display: block; width: 100%; text-align: center; }

/* Playing screen */
.gk-header { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px solid var(--pa-line); padding-bottom: 8px; font-family: 'Spline Sans Mono', monospace; font-size: 11px; }
.gk-header__left { color: var(--pa-mut); }

.gk-ticker { margin-top: 8px; height: 3px; overflow: hidden; background: color-mix(in srgb, var(--pa-mut) 22%, transparent); }
.gk-ticker__bar { height: 100%; width: 0; background: var(--pa-ac); }

.gk-timer { margin-top: 11px; height: 5px; border-radius: 3px; overflow: hidden; background: color-mix(in srgb, var(--pa-mut) 20%, transparent); }
.gk-timer__bar { height: 100%; width: 100%; background: var(--pa-ac); }
.gk-timer__bar.is-safe   { background: var(--pa-gr); }
.gk-timer__bar.is-danger { background: var(--pa-ac); }

.gk-prompt { text-align: center; margin-top: 28px; }
.gk-prompt__label { font-family: 'Spline Sans Mono', monospace; font-size: 9.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--pa-mut); }
.gk-prompt__word  { font-size: 40px; line-height: 1.05; margin-top: 6px; }

.gk-options { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 26px; }
.gk-tile {
  background: var(--pa-pan);
  color: var(--pa-ink);
  border: 1px solid var(--pa-tb);
  border-radius: 8px;
  padding: 13px 8px;
  text-align: center;
  font-family: 'Newsreader', serif;
  font-size: 17px;
  cursor: pointer;
  transition: border-color .12s;
}
.gk-tile:hover { border-color: var(--pa-ac); }
.gk-tile.is-correct { background: color-mix(in srgb, var(--pa-gr) 15%, var(--pa-pan)); color: var(--pa-gr); border: 2px solid var(--pa-gr); padding: 12px 8px; }
.gk-tile.is-wrong   { background: color-mix(in srgb, var(--pa-ac) 12%, var(--pa-pan)); color: var(--pa-ac); border: 2px solid var(--pa-ac); padding: 12px 8px; }
.gk-tile.is-dim     { opacity: .42; }
.gk-tile.is-locked  { cursor: default; }
.gk-tile.is-locked:hover { border-color: var(--pa-tb); }

.gk-foot { margin-top: auto; padding-top: 16px; font-size: 12.5px; font-style: italic; text-align: center; min-height: 19px; color: var(--pa-ac); }

/* Transition */
.gk-flash { font-family: 'Spline Sans Mono', monospace; font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--pa-ac); animation: gkPulse 1s ease-in-out infinite; }
.gk-rule  { width: 44px; height: 2px; background: var(--pa-ac); margin: 16px 0; }
.gk-flash-title { font-size: 36px; line-height: 1.15; }

/* Death */
.gk-dead__head   { font-family: 'Spline Sans Mono', monospace; font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--pa-ac); text-align: center; }
.gk-dead__killed { text-align: center; margin-top: 12px; }
.gk-dead__prompt { font-family: 'Spline Sans Mono', monospace; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--pa-mut); }
.gk-dead__your   { font-size: 30px; margin-top: 2px; color: var(--pa-ac); font-style: italic; }
.gk-dead__sub    { font-size: 12.5px; color: var(--pa-mut); }
.gk-dead__answer { margin-top: 12px; border-top: 1px solid var(--pa-line); border-bottom: 1px solid var(--pa-line); padding: 11px 0; text-align: center; }
.gk-dead__answer-word { font-size: 24px; color: var(--pa-gr); }
.gk-dead__gloss  { font-size: 12.5px; font-style: italic; color: var(--pa-mut); margin-top: 3px; }

/* Share card */
.gk-share { background: var(--pa-pan); border: 1px solid var(--pa-tb); border-radius: 9px; padding: 13px 14px; margin-top: 14px; }
.gk-share__title { font-size: 16px; }
.gk-share__hr { width: 100%; height: 1px; background: var(--pa-line); margin: 9px 0; }
.gk-share__line { font-family: 'Spline Sans Mono', monospace; font-size: 11.5px; }
.gk-share__streak { font-family: 'Spline Sans Mono', monospace; font-size: 11.5px; margin-top: 6px; }

.gk-actions { display: flex; gap: 9px; margin-top: auto; padding-top: 16px; }
.gk-reset { font-family: 'Spline Sans Mono', monospace; font-size: 10.5px; text-align: center; margin-top: 10px; color: var(--pa-mut); }

/* Locked-out */
.gk-locked__pct { font-size: 48px; line-height: 1; color: var(--pa-ac); margin-top: 10px; }

.gk-hint { font-family: 'Spline Sans Mono', monospace; font-size: 10px; letter-spacing: .1em; color: var(--pa-mut); margin-top: 14px; }
