:root {
  --bg: #fff8ec; --ink: #2b2b2b; --muted: #7a6f63; --card: #ffffff; --shadow: #f0d9b5;
  --primary: #ff8a3d; --primary-dark: #d86a22; --ok: #3cc47c; --bad: #ff5a5f; --warm: #ffd166;
  --radius: 24px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Nunito", "Segoe UI", system-ui, sans-serif; font-size: 18px; }
body { min-height: 100dvh; user-select: none; -webkit-user-select: none; overscroll-behavior: none; }
#app { max-width: 560px; margin: 0 auto; padding: 16px; }
.screen { display: flex; flex-direction: column; gap: 16px; }
.center { align-items: center; text-align: center; justify-content: center; min-height: 80dvh; }
h1 { font-size: 28px; margin: 0; } h2 { font-size: 22px; margin: 8px 0; }
.muted { color: var(--muted); }
.loading { text-align: center; margin-top: 40vh; color: var(--muted); }
button { font: inherit; color: inherit; border: 0; cursor: pointer; touch-action: manipulation; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--card);
  border-radius: var(--radius); padding: 14px 20px; min-height: 56px; font-weight: 700;
  box-shadow: 0 4px 0 var(--shadow); text-decoration: none; color: inherit; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--shadow); }
.btn.big { min-height: 72px; font-size: 22px; width: 100%; }
.btn.primary { background: var(--primary); color: #fff; box-shadow: 0 4px 0 var(--primary-dark); }
.btn.warm { background: var(--warm); }
.btn[disabled] { opacity: .45; }
.input { font: inherit; font-size: 22px; padding: 16px; border-radius: var(--radius); border: 3px solid var(--shadow);
  width: 100%; max-width: 360px; background: #fff; }
.logo { width: 120px; height: 120px; border-radius: 28px; }
.link { color: var(--muted); text-align: center; margin-top: 24px; }
.topbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topbar .title { flex: 1; }
.chip { display: inline-flex; align-items: center; gap: 8px; background: var(--card); border-radius: 999px;
  padding: 8px 14px; box-shadow: 0 3px 0 var(--shadow); font-weight: 800; font-size: 20px; min-height: 48px; }
.chip.wide { width: 100%; justify-content: center; font-size: 18px; }
.ava { width: 40px; height: 40px; } .ico { width: 28px; height: 28px; }
.actions { display: grid; gap: 12px; }
.island { background: var(--c); border-radius: 32px; padding: 16px; box-shadow: 0 6px 0 rgba(0,0,0,.08); }
.stops { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.stop { background: rgba(255,255,255,.85); border-radius: 20px; min-height: 96px; padding: 10px; display: flex;
  flex-direction: column; justify-content: space-between; text-align: left; font-weight: 700;
  box-shadow: 0 4px 0 rgba(0,0,0,.1); }
.stop.bonus { background: rgba(255,255,255,.6); }
.stop.review { background: #fff; outline: 3px dashed rgba(0,0,0,.15); }
.stars { color: #f5b400; font-size: 22px; letter-spacing: 2px; } .stars.big { font-size: 56px; }
.kids { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.kid { background: var(--card); border-radius: 28px; padding: 16px; display: flex; flex-direction: column;
  align-items: center; gap: 8px; font-size: 22px; font-weight: 800; box-shadow: 0 5px 0 var(--shadow); min-height: 170px; }
.kid img { width: 110px; height: 110px; }
.lesson { display: flex; flex-direction: column; gap: 14px; }
.lesson-top { display: flex; align-items: center; gap: 12px; }
.progress { flex: 1; height: 18px; background: #fff; border-radius: 999px; overflow: hidden; box-shadow: inset 0 2px 0 var(--shadow); }
.progress .fill { height: 100%; width: 0; background: var(--ok); transition: width .3s; }
.stage { display: flex; flex-direction: column; gap: 16px; }
.speaker { display: flex; justify-content: center; gap: 20px; }
.btn-round { width: 72px; height: 72px; border-radius: 50%; background: var(--card); box-shadow: 0 4px 0 var(--shadow);
  font-size: 30px; display: inline-flex; align-items: center; justify-content: center; }
.btn-round.small { width: 52px; height: 52px; font-size: 22px; }
.btn-round img { width: 44px; height: 44px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.card { background: var(--card); border-radius: 26px; min-height: 140px; display: flex; align-items: center;
  justify-content: center; padding: 12px; box-shadow: 0 5px 0 var(--shadow); }
.card.ok { background: #dff7e9; box-shadow: 0 5px 0 var(--ok); }
.pic { width: 110px; height: 110px; object-fit: contain; pointer-events: none; }
.pic-text { font-size: 26px; font-weight: 800; text-align: center; word-break: break-word; }
.pic-text.small { font-size: 18px; }
.hero { display: flex; justify-content: center; background: var(--card); border-radius: 32px; padding: 16px;
  box-shadow: 0 5px 0 var(--shadow); }
.hero .pic { width: 180px; height: 180px; }
.intro { display: flex; flex-direction: column; gap: 16px; text-align: center; }
.word { font-size: 40px; font-weight: 900; }
.btn-next { background: var(--primary); color: #fff; border-radius: var(--radius); min-height: 72px; font-size: 24px;
  font-weight: 800; box-shadow: 0 5px 0 var(--primary-dark); }
.btn-hint { align-self: center; background: none; font-size: 18px; color: var(--muted); min-height: 48px; }
.slots { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.slot { width: 48px; height: 60px; border-bottom: 5px solid var(--shadow); font-size: 36px; font-weight: 900;
  display: flex; align-items: center; justify-content: center; }
.slot.filled { border-color: var(--ok); }
.letters, .chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.letter { width: 72px; height: 72px; border-radius: 20px; background: var(--card); font-size: 34px; font-weight: 900;
  box-shadow: 0 4px 0 var(--shadow); }
.chip-word { min-height: 64px; padding: 10px 18px; border-radius: 20px; background: var(--card); font-size: 24px;
  font-weight: 800; box-shadow: 0 4px 0 var(--shadow); }
.letter.used, .chip-word.used { visibility: hidden; }
.hint { outline: 4px solid var(--warm); }
.phrase { min-height: 64px; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; font-size: 26px; font-weight: 800; }
.grid-mem { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mcard { position: relative; aspect-ratio: 3 / 4; border-radius: 18px; background: #7bdff2; box-shadow: 0 4px 0 #4bb7cc; }
.mcard .front, .mcard .back { position: absolute; inset: 0; align-items: center; justify-content: center; font-size: 34px; }
.mcard .back { display: flex; } .mcard .front { display: none; }
.mcard.open .front { display: flex; } .mcard.open .back { display: none; }
.mcard.open { background: var(--card); box-shadow: 0 4px 0 var(--shadow); }
.mcard.done { background: #dff7e9; }
.mcard .pic { width: 72px; height: 72px; }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.35); display: flex; align-items: center; justify-content: center; z-index: 10; }
.dialog { background: var(--card); border-radius: 28px; padding: 24px; display: grid; gap: 12px; width: min(90vw, 360px);
  text-align: center; font-size: 22px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #2b2b2b; color: #fff;
  padding: 14px 22px; border-radius: 999px; z-index: 20; font-weight: 700; max-width: 90vw; text-align: center; }
.result .hero-ico { width: 160px; height: 160px; }
.card-info { background: var(--card); border-radius: 24px; padding: 16px; box-shadow: 0 4px 0 var(--shadow); }
.week { display: flex; gap: 10px; } .dot { width: 28px; height: 28px; border-radius: 50%; background: #eee; }
.dot.on { background: var(--ok); }
.stickers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.sticker { background: var(--card); border-radius: 22px; padding: 10px; display: flex; flex-direction: column;
  align-items: center; gap: 6px; box-shadow: 0 4px 0 var(--shadow); min-height: 120px; }
.sticker img { width: 80px; height: 80px; }
button.sticker img { filter: grayscale(1); opacity: .5; }
.cost { font-weight: 800; }
.prizes { display: grid; gap: 12px; }
.prize { background: var(--card); border-radius: 24px; padding: 14px; display: grid; grid-template-columns: auto 1fr auto;
  gap: 6px 12px; align-items: center; box-shadow: 0 4px 0 var(--shadow); }
.prize .emoji { font-size: 40px; grid-row: span 2; } .prize .btn { grid-column: 2 / 4; }
.requests { padding-left: 20px; }
/* экран родителя: обычная плотность, не детская */
body.parent { user-select: text; -webkit-user-select: text; font-size: 16px; }
.parent .panel { background: var(--card); border-radius: 16px; padding: 14px; box-shadow: 0 2px 0 var(--shadow); display: grid; gap: 8px; }
.parent .row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.parent input, .parent select { font: inherit; padding: 8px 10px; border-radius: 10px; border: 2px solid var(--shadow); background: #fff; }
.parent input[type=number] { width: 80px; }
.parent .btn { min-height: 44px; padding: 8px 14px; }
@media (max-width: 360px) { .stops, .kids { grid-template-columns: 1fr; } .card { min-height: 124px; } }
