/*
 * The online game (content/generator.php). Plain CSS on purpose: no build
 * step, loaded only on the two game pages (see start_boilerplate.php).
 * Colours follow the app (Design/Theme.swift); the content pages share the
 * look through the kc-* classes in scss/style.scss.
 */

.kg, .kg-about, .kg-stage {
  --kg-ground: #f4f1fd;
  --kg-panel: #ffffff;
  --kg-line: #e3ddf6;
  --kg-ink: #241f4d;
  --kg-dim: #625d80;
  --kg-accent: #6a5ae0;
  --kg-accent-deep: #4d38c7;
  --kg-sun: #ffcc33;
  --kg-sun-deep: #dba400;
  --kg-good: #1faa6c;
  --kg-good-deep: #14804f;
  --kg-skip: #f58a1f;
  --kg-skip-deep: #c66a0c;
  --kg-shadow: rgba(60, 45, 130, 0.14);
  --kg-radius: 22px;
}

.kg button, .kg-stage button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.kg button:focus-visible, .kg a:focus-visible,
.kg-stage button:focus-visible {
  outline: 3px solid var(--kg-ink);
  outline-offset: 3px;
}
.kg [hidden], .kg-stage[hidden], .kg-stage [hidden] { display: none !important; }

/* ================================================================= home */

.kg {
  background: var(--kg-ground);
  color: var(--kg-ink);
}
.kg-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 28px 16px 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}

.kg-head h1 {
  margin: 0;
  font-size: clamp(2rem, 7.5vw, 3.1rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
  color: var(--kg-accent-deep);
  background: linear-gradient(100deg, #5a45d6, #c63fa4 58%, #f08a24);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.kg-head p {
  margin: 8px auto 0;
  max-width: 44ch;
  color: var(--kg-dim);
  font-size: 1.02rem;
  line-height: 1.45;
  text-wrap: balance;
}

/* --- mode switcher: two real pages --- */

.kg-modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  width: min(100%, 520px);
  padding: 6px;
  background: var(--kg-panel);
  border-radius: 20px;
  box-shadow: 0 6px 18px var(--kg-shadow);
}
.kg-mode {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 11px 8px;
  border-radius: 15px;
  color: var(--kg-dim);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.kg-mode:hover { color: var(--kg-ink); background: var(--kg-ground); }
.kg-mode.is-on, .kg-mode.is-on:hover { background: var(--kg-accent); color: #fff; }
.kg-mode-name { font-weight: 800; font-size: 1.05rem; line-height: 1.2; }
.kg-mode-desc { font-size: 0.78rem; line-height: 1.25; opacity: 0.92; }

/* --- "How to Play" (Act & Guess): the steps of the word generator --- */

.kg-howto {
  width: min(100%, 560px);
  padding: 16px 20px;
  text-align: left;
  background: var(--kg-panel);
  border-radius: 18px;
  box-shadow: 0 4px 14px var(--kg-shadow);
}
.kg-howto h2 { margin: 0 0 8px; font-size: 1.1rem; font-weight: 800; color: var(--kg-ink); }
.kg-howto ol { margin: 0; padding-left: 1.3em; font-weight: 600; line-height: 1.45; }
.kg-howto li + li { margin-top: 4px; }
.kg-howto li::marker { color: var(--kg-accent); font-weight: 800; }
.kg-howto p { margin: 10px 0 0; color: var(--kg-dim); font-size: 0.88rem; line-height: 1.45; }
.kg-howto p strong { color: var(--kg-ink); }

/* --- "best on a phone" (Hold & Guess on a computer) --- */

.kg-notice {
  display: flex;
  align-items: center;
  gap: 16px;
  width: min(100%, 520px);
  padding: 12px 16px;
  text-align: left;
  background: var(--kg-panel);
  border: 2px solid var(--kg-accent);
  border-radius: 18px;
  line-height: 1.45;
}
.kg-notice img { flex: none; width: 112px; height: 112px; border-radius: 10px; }

/* --- decks: vivid tiles, like the app's grid --- */

/* Flex, not grid: a last row that is not full sits in the middle. */
.kg-decks {
  --kg-cols: 2;
  --kg-gap: 10px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--kg-gap);
  width: 100%;
}

.kg .kg-deck {
  flex: 0 0 calc((100% - (var(--kg-cols) - 1) * var(--kg-gap)) / var(--kg-cols) - 0.5px);
}

.kg .kg-deck {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 118px;
  padding: 12px 8px 10px;
  border-radius: 20px;
  background: var(--c, #9e7aff);
  color: var(--kg-ink);
  box-shadow: 0 5px 0 rgba(36, 31, 77, 0.16), 0 8px 18px var(--kg-shadow);
  border: 4px solid transparent;
  opacity: 0.8;
  transition: transform 0.12s ease, opacity 0.15s, border-color 0.15s;
}
.kg .kg-deck:hover { opacity: 0.92; }
.kg .kg-deck:active { transform: translateY(3px) scale(0.98); }
.kg .kg-deck[aria-pressed="true"] { opacity: 1; border-color: var(--kg-ink); }
.kg-deck-emoji {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  font-size: 1.7rem;
  line-height: 1;
}
.kg-deck-name { font-weight: 800; font-size: 0.98rem; line-height: 1.15; text-wrap: balance; overflow-wrap: anywhere; }
.kg-deck-count { font-size: 0.75rem; font-weight: 600; opacity: 0.85; }
.kg-deck-check {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.95);
  color: transparent;
  font-size: 0.8rem;
  font-weight: 900;
}
.kg-deck[aria-pressed="true"] .kg-deck-check { background: var(--kg-ink); border-color: var(--kg-ink); color: #fff; }

/* --- round length, sound --- */

.kg-controls { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px 14px; }
.kg-time {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  background: var(--kg-panel);
  border-radius: 999px;
  box-shadow: 0 4px 14px var(--kg-shadow);
}
.kg-time-label { padding: 0 8px 0 12px; font-size: 0.82rem; font-weight: 600; color: var(--kg-dim); }
.kg .kg-time button { min-width: 52px; padding: 8px 12px; border-radius: 999px; font-weight: 700; color: var(--kg-dim); }
.kg .kg-time button.is-on { background: var(--kg-accent); color: #fff; }
.kg .kg-sound {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--kg-panel);
  box-shadow: 0 4px 14px var(--kg-shadow);
}
/* Sound on / off: two drawings, one shown. */
.kg-sound { display: inline-grid; place-items: center; }
.kg-ico { width: 24px; height: 24px; }
.kg-sound .kg-ico-off, .kg-sound[aria-pressed="false"] .kg-ico-on { display: none; }
.kg-sound[aria-pressed="false"] .kg-ico-off { display: block; }
.kg-sound[aria-pressed="false"] { color: var(--kg-dim); }

/* --- the big button: it stays in reach while the deck grid scrolls --- */

.kg-go {
  position: sticky;
  bottom: 14px;
  z-index: 20;
  display: flex;
  justify-content: center;
  width: 100%;
  pointer-events: none;
}
.kg-go > * { pointer-events: auto; }
body:has(#android-app-banner) .kg-go, body:has(.sb-mobile) .kg-go { bottom: 96px; }

.kg .kg-start, .kg-stage .kg-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-width: min(100%, 300px);
  padding: 14px 34px;
  border-radius: 20px;
  background: var(--kg-sun);
  color: var(--kg-ink);
  font-weight: 800;
  font-size: 1.35rem;
  line-height: 1.15;
  box-shadow: 0 6px 0 var(--kg-sun-deep), 0 12px 24px var(--kg-shadow);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.kg .kg-start:active, .kg-stage .kg-btn:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 var(--kg-sun-deep), 0 6px 14px var(--kg-shadow);
}
.kg-start small { font-size: 0.8rem; font-weight: 600; opacity: 0.8; }
.kg .kg-start:disabled { background: #dcd8ea; color: var(--kg-dim); box-shadow: 0 6px 0 #c4bfd8; cursor: default; }

/* --- what the app adds, in one line --- */

.kg-more { margin: 0; max-width: 48ch; font-size: 0.95rem; line-height: 1.45; text-wrap: balance; }
.kg-more a { color: var(--kg-accent-deep); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* ================================================= about / how to / FAQ */

.kg-about { background: #fff; color: var(--kg-ink); padding: 44px 16px 56px; }
.kg-about-wrap { max-width: 760px; margin: 0 auto; }
.kg-about h2 { margin: 0 0 10px; font-size: 1.5rem; font-weight: 800; color: var(--kg-ink); }
.kg-about h3 { margin: 0 0 4px; font-size: 1.02rem; font-weight: 700; color: var(--kg-ink); }
.kg-about p { margin: 0; color: var(--kg-dim); font-size: 1rem; line-height: 1.6; }
.kg-about-block + .kg-about-block { margin-top: 34px; }
.kg-steps { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; counter-reset: kg-step; }
.kg-steps li {
  counter-increment: kg-step;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--kg-ground);
  border-radius: 16px;
  font-weight: 600;
  line-height: 1.4;
}
.kg-steps li::before {
  content: counter(kg-step);
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--kg-accent);
  color: #fff;
  font-weight: 800;
}
.kg-faq { display: grid; gap: 16px; margin-top: 14px; }
.kg-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.kg-links a {
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--kg-ground);
  color: var(--kg-accent-deep);
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
}
.kg-links a:hover { background: var(--kg-accent); color: #fff; }
.kg-cta {
  margin-top: 40px;
  padding: 28px 20px;
  text-align: center;
  border-radius: var(--kg-radius);
  background: linear-gradient(135deg, #4d38c7, #7a3fc0);
  color: #fff;
}
.kg-cta h2 { color: #fff; }
.kg-cta p { margin: 0 auto 18px; max-width: 52ch; color: rgba(255, 255, 255, 0.9); }

/* ======================================================== full-screen game */

html.kg-playing, html.kg-playing body { overflow: hidden; overscroll-behavior: none; }
html.kg-playing .sb, html.kg-playing #android-app-banner { display: none !important; }

.kg-stage {
  position: fixed;
  inset: 0;
  z-index: 3000;
  color: #fff;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 128, 191, 0.20) 0 9vmin, transparent calc(9vmin + 1px)),
    radial-gradient(circle at 88% 12%, rgba(87, 158, 255, 0.20) 0 11vmin, transparent calc(11vmin + 1px)),
    radial-gradient(circle at 80% 86%, rgba(255, 204, 51, 0.16) 0 13vmin, transparent calc(13vmin + 1px)),
    radial-gradient(circle at 8% 84%, rgba(107, 204, 102, 0.16) 0 7vmin, transparent calc(7vmin + 1px)),
    linear-gradient(140deg, #4d38c7 0%, #301c85 55%, #1f145c 100%);
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  transition: background-color 0.12s;
}
.kg-stage.is-correct { background: var(--kg-good); }
.kg-stage.is-skip { background: var(--kg-skip); }
.kg-stage[data-screen="timeup"] { background: #e5484d; }

.kg-rot { position: absolute; inset: 0; container-type: size; }
.kg-rot.is-rotated { inset: auto; top: 50%; left: 50%; transform-origin: center center; }

.kg-screen {
  display: none;
  position: absolute;
  inset: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: calc(env(safe-area-inset-top) + 18px) calc(env(safe-area-inset-right) + 20px)
           calc(env(safe-area-inset-bottom) + 18px) calc(env(safe-area-inset-left) + 20px);
  text-align: center;
}
.kg-screen.is-active { display: flex; }

.kg-stage .kg-x {
  position: absolute;
  top: calc(env(safe-area-inset-top) + 10px);
  right: calc(env(safe-area-inset-right) + 12px);
  z-index: 5;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  font-size: 1.2rem;
  font-weight: 700;
}
.kg-stage button:focus-visible { outline-color: #fff; }

/* Sound on/off sits left of the close button for the whole round. */
.kg-stage .kg-mute {
  position: absolute;
  top: calc(env(safe-area-inset-top) + 10px);
  right: calc(env(safe-area-inset-right) + 64px);
  z-index: 6;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}
.kg-stage .kg-mute[aria-pressed="false"] { color: rgba(255, 255, 255, 0.6); }
.kg-stage[data-screen="timeup"] .kg-mute, .kg-stage[data-screen="results"] .kg-mute,
.kg-stage.is-correct .kg-mute, .kg-stage.is-skip .kg-mute { display: none; }

/* --- ready --- */

.kg-ready-deck { margin: 0; font-weight: 700; font-size: 1.05rem; opacity: 0.85; }
.kg-ready-icons {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  border-radius: var(--kg-radius);
  background: rgba(255, 255, 255, 0.12);
  border: 3px solid transparent;
  font-size: 3.2rem;
  line-height: 1;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.kg-ready-icons .is-lift { animation: kg-lift 1.6s ease-in-out infinite; }
/* The phone, drawn (used when the emoji are off): sideways, as it is held. */
.kg-phone {
  display: block;
  width: 2em;
  height: 1.05em;
  border: 0.11em solid #fff;
  border-radius: 0.2em;
  background: rgba(255, 255, 255, 0.18);
}
.kg-ready-icons.is-ok { border-color: #6ee7a8; box-shadow: 0 0 30px rgba(110, 231, 168, 0.5); }
.kg-ready-icons.is-ok .is-lift { animation: none; }
@keyframes kg-lift {
  0%, 100% { transform: translateY(6px) rotate(-8deg); }
  50%      { transform: translateY(-8px) rotate(0deg); }
}
.kg-ready-title { margin: 0; font-size: clamp(1.7rem, 6vw, 2.6rem); font-weight: 800; line-height: 1.1; color: #fff; text-wrap: balance; }
.kg-ready-hint { margin: 0; max-width: 40ch; line-height: 1.5; color: rgba(255, 255, 255, 0.88); text-wrap: balance; }
.kg-tips { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.kg-tips li { padding: 8px 16px; border-radius: 999px; background: rgba(255, 255, 255, 0.14); font-weight: 600; font-size: 0.95rem; }
.kg-stage .kg-ghost { padding: 12px 18px; font-weight: 700; color: rgba(255, 255, 255, 0.9); text-decoration: underline; text-underline-offset: 4px; }

/* --- countdown --- */

.kg-count { font-size: clamp(7rem, 38vh, 14rem); font-size: clamp(7rem, 46cqh, 14rem); font-weight: 800; line-height: 1; color: var(--kg-sun); }
.kg-count.is-pop { animation: kg-pop 0.85s ease-out; }
@keyframes kg-pop {
  0%   { transform: scale(1.6); opacity: 0.2; }
  35%  { transform: scale(1);   opacity: 1; }
  100% { transform: scale(0.92); opacity: 0.9; }
}

/* --- play --- */

.kg-screen[data-screen="play"] { gap: 0; }
.kg-topbar {
  position: absolute;
  top: calc(env(safe-area-inset-top) + 10px);
  left: calc(env(safe-area-inset-left) + 16px);
  right: calc(env(safe-area-inset-right) + 116px);
  display: flex;
  align-items: center;
  gap: 12px;
}
.kg-timer { font-size: 1.7rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.kg-timer.is-urgent { color: #ffd0d0; animation: kg-pulse 1s infinite; }
@keyframes kg-pulse { 50% { opacity: 0.35; } }
.kg-score { padding: 4px 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.18); font-weight: 800; }

.kg-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2vmin;
  width: min(86%, 560px);
  width: min(86cqw, 150cqh, 760px);
  max-height: 64%;
  padding: 4vmin 5vmin;
  border-radius: 32px;
  background: #fff;
  color: var(--kg-ink);
  box-shadow: 0 10px 0 rgba(0, 0, 0, 0.18), 0 24px 50px rgba(0, 0, 0, 0.3);
  transition: filter 0.35s ease, opacity 0.35s ease;
}
.kg-card-emoji { font-size: 24vmin; font-size: min(26cqw, 30cqh); line-height: 1.05; }
.kg-card-word {
  font-size: 9vmin;
  font-size: clamp(1.9rem, min(11cqw, 13cqh), 6rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.kg-card.is-blurred { filter: blur(22px); opacity: 0.6; }
.kg-peek {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  padding: 12px 24px;
  border-radius: 999px;
  background: rgba(31, 20, 92, 0.82);
  font-size: clamp(1.15rem, 3.4vmin, 1.7rem);
  font-weight: 800;
  white-space: nowrap;
  pointer-events: none;
}
.kg-verdict {
  position: absolute;
  font-size: clamp(2.6rem, 13vmin, 7rem);
  font-size: clamp(2.6rem, min(15cqw, 26cqh), 8rem);
  font-weight: 900;
  color: #fff;
  text-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
  text-transform: uppercase;
}
.kg-stage.is-correct .kg-card, .kg-stage.is-skip .kg-card,
.kg-stage.is-correct .kg-peek, .kg-stage.is-skip .kg-peek { visibility: hidden; }

.kg-answer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(env(safe-area-inset-bottom) + 20px);
  display: flex;
  justify-content: center;
  gap: 14px;
  padding: 0 16px;
}
.kg-stage .kg-answer button {
  flex: 0 1 220px;
  padding: 14px 16px;
  border-radius: 18px;
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.kg-stage .kg-answer button:active { transform: translateY(4px); }
.kg-stage .kg-skip { background: var(--kg-skip); box-shadow: 0 6px 0 var(--kg-skip-deep); }
.kg-stage .kg-correct { background: var(--kg-good); box-shadow: 0 6px 0 var(--kg-good-deep); }
.kg-stage .kg-skip:active { box-shadow: 0 2px 0 var(--kg-skip-deep); }
.kg-stage .kg-correct:active { box-shadow: 0 2px 0 var(--kg-good-deep); }
.kg-stage.is-correct .kg-answer, .kg-stage.is-skip .kg-answer { visibility: hidden; }
/* With the buttons on screen the card sits a little higher. */
.kg-screen[data-screen="play"].has-buttons { padding-bottom: calc(env(safe-area-inset-bottom) + 96px); padding-top: calc(env(safe-area-inset-top) + 64px); }

/* --- time up --- */

.kg-timeup { margin: 0; font-size: clamp(2.8rem, 15vmin, 8rem); font-weight: 900; line-height: 1.05; color: #fff; text-wrap: balance; animation: kg-pop 0.85s ease-out; }

/* --- results --- */

.kg-screen[data-screen="results"] { justify-content: flex-start; overflow-y: auto; gap: 12px; -webkit-overflow-scrolling: touch; }
.kg-result-num { margin-top: 10px; font-size: clamp(4.5rem, 20vw, 7rem); font-weight: 800; line-height: 1; color: var(--kg-sun); }
.kg-result-label { margin: 0; font-size: 1.2rem; font-weight: 700; }
.kg-result-skipped { margin: 0; color: rgba(255, 255, 255, 0.75); font-weight: 600; }
.kg-result-list { list-style: none; width: min(100%, 460px); margin: 6px 0; padding: 0; display: grid; gap: 6px; }
.kg-result-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-radius: 14px;
  background: #fff;
  color: var(--kg-ink);
  font-weight: 700;
  text-align: left;
}
.kg-result-list .m { width: 1.2em; font-weight: 900; color: var(--kg-good); }
.kg-result-list .e { font-size: 1.3rem; line-height: 1; }
.kg-result-list li.is-skipped { background: rgba(255, 255, 255, 0.78); }
.kg-result-list li.is-skipped .m { color: var(--kg-skip-deep); }
.kg-result-list li.is-skipped .w { text-decoration: line-through; opacity: 0.7; }
.kg-result-actions { display: grid; justify-items: center; gap: 4px; width: min(100%, 460px); margin-top: 6px; }
.kg-result-cta {
  width: min(100%, 460px);
  margin-top: 8px;
  padding: 18px 16px;
  border-radius: var(--kg-radius);
  background: rgba(255, 255, 255, 0.12);
}
.kg-result-cta h3 { margin: 0 0 4px; font-size: 1.15rem; font-weight: 800; color: #fff; }
.kg-result-cta p { margin: 0 0 12px; color: rgba(255, 255, 255, 0.88); line-height: 1.45; }
.kg-stage .app-badges, .kg-cta .app-badges { justify-content: center; margin: 0; }

/* A handful of paper bits when a round ends well. */
.kg-confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.kg-confetti i {
  position: absolute;
  top: -20px;
  width: 10px;
  height: 16px;
  border-radius: 3px;
  animation: kg-fall linear forwards;
}
@keyframes kg-fall { to { transform: translateY(110vh) rotate(720deg); } }

/* ============================================================ bigger screens */

@media (min-width: 520px) {
  .kg-decks { --kg-cols: 3; }
}

@media (min-width: 760px) {
  .kg-wrap { padding-top: 40px; gap: 22px; }
  .kg-mode { padding: 14px 10px; }
  .kg-mode-name { font-size: 1.2rem; }
  .kg-mode-desc { font-size: 0.85rem; }
  .kg-decks { --kg-cols: 4; --kg-gap: 12px; }
  .kg .kg-deck { min-height: 138px; }
  .kg-deck-emoji { width: 60px; height: 60px; font-size: 2.05rem; }
  .kg-deck-name { font-size: 1.05rem; }
  .kg-go { position: static; }
  .kg-ready-icons { font-size: 4.2rem; }
  .kg-ready-hint { font-size: 1.25rem; max-width: 46ch; }
  .kg-ready-title { font-size: clamp(2.4rem, 5vw, 3.6rem); }
  .kg-ready-deck { font-size: 1.3rem; }
  .kg-tips li { font-size: 1.1rem; }
  .kg-stage .kg-btn { font-size: 1.6rem; padding: 18px 48px; }
  .kg-result-list, .kg-result-actions, .kg-result-cta { width: min(100%, 560px); }
  .kg-result-list li { font-size: 1.15rem; padding: 12px 18px; }
  .kg-result-label { font-size: 1.5rem; }
  .kg-timer { font-size: 2.4rem; }
  .kg-score { font-size: 1.2rem; padding: 6px 20px; }
  .kg-stage .kg-answer button { font-size: 1.4rem; padding: 18px 20px; flex-basis: 260px; }
  .kg-answer { bottom: calc(env(safe-area-inset-bottom) + 28px); gap: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .kg *, .kg-stage * { animation: none !important; transition: none !important; }
}
