/* We're Just Kidz — shared game styles */
:root {
  --bg: #EEF3F6;
  --panel: #FFFFFF;
  --ink: #1F2140;
  --muted: #555A7A;
  --accent: #5A2FE0;
  --good: #0B7A6F;
  --soft: #DCE3EC;
  --tile: #F5F6FB;
  --star: #F2B21B;
  --coral: #FF5A5F;
  --sun: #FFC21A;
  --teal: #12B5A6;
  --violet: #7B4DFF;
  --orange: #FF8A1F;
  --display: "Baloo 2", "Trebuchet MS", system-ui, sans-serif;
  --body: "Nunito", "Trebuchet MS", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15182E; --panel: #20244A; --ink: #EEF0FA; --muted: #B4B8D6; --accent: #A98BFF;
    --good: #6FE0C2; --soft: #343A66; --tile: #2A2F5A; --star: #F2C24B;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { min-height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--body); font-size: 18px; line-height: 1.5;
  padding: 16px max(16px, env(safe-area-inset-right)) 24px max(16px, env(safe-area-inset-left));
}
.wjk-app { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.wjk-home { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; color: var(--muted); text-decoration: none; font: 700 0.95rem var(--display); min-height: 44px; }
.wjk-home img { width: 32px; height: 32px; }
.wjk-home:hover { color: var(--ink); }
.wjk-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.wjk-head h1 { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(1.6rem, 4vw, 2.1rem); line-height: 1.1; }
.wjk-stars { display: flex; gap: 5px; flex-wrap: wrap; }
.wjk-stars svg { width: 26px; height: 26px; }
.wjk-stars .on { fill: var(--star); }
.wjk-stars .off { fill: var(--soft); }

.panel { background: var(--panel); border-radius: 24px; padding: 20px 22px; display: flex; flex-direction: column; gap: 12px; }
.label { font: 800 0.8rem var(--display); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.big { font-size: 1.3rem; line-height: 1.45; margin: 0; text-wrap: balance; }
.ask { font: 800 1.45rem var(--display); color: var(--accent); margin: 0; }

.btn {
  font: 800 1.1rem var(--display); border: 0; border-radius: 999px; padding: 12px 28px; min-height: 48px;
  cursor: pointer; background: var(--accent); color: #fff; align-self: center;
}
.btn.ghost { background: transparent; color: var(--accent); border: 2px solid var(--soft); }
.btn.small { font-size: 0.95rem; padding: 8px 16px; min-height: 44px; }
.btn:disabled { opacity: .45; cursor: default; }
.speak { align-self: flex-start; }

.tile {
  background: var(--panel); border: 4px solid transparent; border-radius: 22px; color: var(--ink);
  cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  font: 800 1.05rem var(--display); padding: 12px 8px; min-height: 64px; transition: transform .2s, opacity .3s, border-color .2s;
}
.tile.right { border-color: var(--good); }
.tile.dim { opacity: .4; }
.wjk-motion .tile.right { animation: wjk-hop .6s ease; }
@keyframes wjk-hop { 0%,100% { transform: translateY(0); } 40% { transform: translateY(-10px) scale(1.04); } }
.wjk-motion .wiggle { animation: wjk-wiggle .4s ease; }
@keyframes wjk-wiggle { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

.grid { display: grid; gap: 12px; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); }
@media (max-width: 480px) { .grid.wrap-sm { --cols: 2 !important; } }

.feedback { min-height: 2.4em; font: 800 1.2rem var(--display); text-align: center; margin: 0; }
.feedback.yes { color: var(--good); }

.choice-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.chip {
  font: 800 1rem var(--display); border: 2px solid var(--soft); background: var(--panel); color: var(--ink);
  border-radius: 999px; padding: 10px 20px; min-height: 48px; cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }

.done { text-align: center; align-items: center; padding: 30px 20px; }
.done h2 { margin: 0; font: 800 1.8rem var(--display); }
.done p { margin: 0; color: var(--muted); }

.wjk-foot { display: flex; justify-content: center; margin-top: 8px; }
.wjk-grown { font: 700 0.95rem var(--display); color: var(--muted); background: transparent; border: 0; padding: 10px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; min-height: 44px; }
.wjk-settings .row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.wjk-settings .row > div:first-child { font-weight: 800; }
.wjk-settings small { display: block; color: var(--muted); font-weight: 400; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg button { font: 700 0.95rem var(--display); min-width: 48px; min-height: 44px; border-radius: 12px; border: 2px solid var(--soft); background: transparent; color: var(--ink); cursor: pointer; padding: 0 12px; }
.seg button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.note { font-size: 0.9rem; color: var(--muted); margin: 0; }

button:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .tile { transition: none; } }

.wjk-who { align-self: flex-start; margin-top: -8px; font: 700 0.95rem var(--display); color: var(--good); text-decoration: none; background: var(--panel); border-radius: 999px; padding: 6px 14px; min-height: 36px; display: inline-flex; align-items: center; }
.wjk-who:hover { text-decoration: underline; }
