/* Gugu Abacus — the Gugu look (same tokens as gugu-home). */
@font-face { font-family: "Baloo2"; src: url("fonts/Baloo2.ttf") format("truetype"); font-weight: 400 800; font-display: swap; }

:root {
  --night: #2A2480; --ink: #1B1464; --cream: #FFF8E7; --mist: #F1F3F7;
  --sun: #FFC93C; --sky: #4CC3FF; --mint: #2ED3A0; --coral: #FF6B5B;
  --slate: #22263A; --slate-2: #4A5068; --line: #C9CEDA;
  --display: "Baloo2", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: var(--body); line-height: 1.5; }
h1, h2, h3 { font-family: var(--display); margin: 0; line-height: 1.05; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 4px solid var(--sky); outline-offset: 3px; }

/* family bar (verbatim from gugu-home/family-bar) */
.gugu-bar { flex: none; box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 24px; padding: 0 20px; background: #2A2480; color: #E9E7FF; font: 600 12px/1 system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; }
.gugu-bar--deep { background: #1B1464; }
.gugu-bar .gugu-bar__home { display: inline-flex; align-items: center; gap: 6px; padding: 3px 0; color: #fff; font-weight: 700; text-decoration: none; white-space: nowrap; }
.gugu-bar .gugu-bar__home:hover { color: #FFC93C; text-decoration: none; }
.gugu-bar .gugu-bar__home:focus-visible { outline: 2px solid #FFC93C; outline-offset: 2px; border-radius: 4px; }
.gugu-bar svg { flex: none; }
/* this site only: back to the Gugu Games hub, right after Gugu Home */
.gugu-bar .gugu-bar__games { display: inline-flex; align-items: center; gap: 6px; margin-right: auto; padding: 3px 0; color: #fff; font-weight: 700; text-decoration: none; white-space: nowrap; }
.gugu-bar .gugu-bar__games:hover { color: #FFC93C; }
.gugu-bar .gugu-bar__games:focus-visible { outline: 2px solid #FFC93C; outline-offset: 2px; border-radius: 4px; }
.gugu-bar__note { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 560px) { .gugu-bar__note { display: none; } }
@media print { .gugu-bar { display: none; } }

/* header */
.wrap { max-width: 720px; margin: 0 auto; padding: 0 20px; }
.top { background: var(--night); color: #fff; padding: 16px 0 24px; }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.brand { font-weight: 800; font-size: 36px; }
.lang { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--ink); }
.pill { border: 0; border-radius: 999px; padding: 10px 18px; min-height: 44px; font: 700 15px var(--body); cursor: pointer; background: transparent; color: #fff; }
.pill[aria-pressed="true"] { background: var(--sun); color: var(--ink); }

main.wrap { padding-top: 28px; padding-bottom: 56px; }
.tagline { font-size: 22px; font-weight: 700; margin-bottom: 20px; }
.stats { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.stat { display: flex; align-items: center; gap: 10px; margin: 0; padding: 8px 18px; border: 3px solid var(--ink); border-radius: 999px; background: #fff; font-weight: 700; }
.stat strong { font-family: var(--display); font-size: 26px; }

.unlock { border: 3px dashed var(--ink); border-radius: 20px; padding: 12px 18px; margin-bottom: 24px; background: var(--mist); }
.unlock-hint { font-weight: 700; }
.unlock-progress { color: var(--slate-2); }

.levels-title { font-weight: 800; margin-bottom: 10px; }
.chips { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
.chip { min-height: 64px; padding: 8px 18px; border: 4px solid var(--ink); border-radius: 20px; background: #fff; color: var(--ink); font: 700 17px var(--body); box-shadow: 0 4px 0 var(--ink); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--sun); }
.chip.bigkid { border-style: dashed; box-shadow: none; }
.chip:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }

.row { display: flex; gap: 14px; flex-wrap: wrap; }
.big { min-height: 72px; padding: 10px 30px; border: 4px solid var(--ink); border-radius: 24px; background: var(--mint); color: var(--ink); font: 800 24px var(--display); box-shadow: 0 6px 0 var(--ink); cursor: pointer; }
.big.alt { background: #fff; }
.big:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--ink); }
.big.toggle[aria-pressed="true"] { background: var(--sun); }

/* play screen */
.progress { font-weight: 700; color: var(--slate-2); margin-bottom: 6px; }
.question { font-size: 42px; margin: 0 0 16px; }
.feedback { min-height: 40px; margin: 18px 0 8px; font-family: var(--display); font-weight: 800; font-size: 30px; }
.choices { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.choice { min-width: 130px; min-height: 96px; border: 4px solid var(--ink); border-radius: 28px; background: var(--sun); color: var(--ink); font: 800 52px var(--display); box-shadow: 0 6px 0 var(--ink); cursor: pointer; }
.choice:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--ink); }

/* done screen */
.done-title { font-size: 44px; margin-bottom: 8px; }
.summary { font-size: 20px; font-weight: 700; margin: 12px 0 24px; }
.new-sticker { display: flex; align-items: center; gap: 14px; margin: 12px 0 20px; padding: 14px 20px; border: 4px solid var(--ink); border-radius: 24px; background: #fff; box-shadow: 0 6px 0 var(--ink); }
.new-sticker-art svg { width: 72px; height: 72px; display: block; }
.new-sticker strong { font-size: 24px; }

/* stickers screen */
.sticker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 14px; list-style: none; margin: 0 0 24px; padding: 0; }
.sticker-slot { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px; border: 3px solid var(--ink); border-radius: 20px; background: #fff; font-weight: 700; text-align: center; }
.sticker-slot svg { width: 64px; height: 64px; }
.sticker-slot.locked { opacity: .45; border-style: dashed; }

/* phones: the whole play screen (question, abacus, choices) fits without scrolling */
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .top { padding: 8px 0 10px; }
  .nav { gap: 8px; }
  .brand { font-size: 26px; }
  .pill { padding: 6px 14px; min-height: 40px; font-size: 14px; }
  main.wrap { padding-top: 12px; }
  .progress { font-size: 15px; margin-bottom: 2px; }
  .question { font-size: 24px; }
  .feedback { min-height: 30px; margin: 6px 0 4px; font-size: 22px; }
  .choices { gap: 10px; margin-top: 4px; }
  .choice { min-width: 96px; min-height: 60px; border-radius: 22px; font-size: 38px; line-height: 1; }
}

/* phones turned sideways: too short to stack, so the abacus sits on the left
   and the question, feedback and choices on the right */
@media (orientation: landscape) and (max-height: 500px) {
  .wrap { max-width: 920px; padding: 0 16px; }
  .top { padding: 6px 0; }
  .brand { font-size: 24px; }
  .pill { padding: 6px 14px; min-height: 40px; font-size: 14px; }
  main.wrap { padding-top: 8px; padding-bottom: 16px; }
  [data-screen="play"]:not([hidden]) {
    display: grid; grid-template-columns: auto 1fr; column-gap: 24px; align-content: start;
  }
  [data-screen="play"] > * { grid-column: 2; }
  [data-screen="play"] > .abacusbox { grid-column: 1; grid-row: 1 / span 6; align-self: start; margin: 0; }
  .progress { font-size: 15px; margin-bottom: 2px; }
  .question { font-size: 28px; }
  .feedback { min-height: 30px; margin: 6px 0 4px; font-size: 22px; }
  .choices { gap: 10px; margin-top: 4px; justify-content: flex-start; }
  .choice { min-width: 88px; min-height: 68px; border-radius: 22px; font-size: 40px; }
}
