/* Ясмо — оформление */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0; background: var(--bg); color: var(--ink);
    font: 17px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    min-height: 100vh; display: flex; flex-direction: column;
}
main { width: 100%; max-width: 900px; margin: 0 auto; padding: 24px 16px 48px; flex: 1; }
a { color: var(--brand); }
h1 { font-size: 30px; line-height: 1.2; margin: 0 0 12px; }
h2 { font-size: 22px; margin: 0 0 10px; }
h3 { margin: 0 0 4px; font-size: 19px; }
code { background: var(--accent-soft); padding: 2px 6px; border-radius: 6px; font-size: 14px; word-break: break-all; }

/* Шапка */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px;
       max-width: 900px; width: 100%; margin: 0 auto; padding: 14px 16px; }
.logo { display: inline-flex; align-items: center; text-decoration: none; }
.logo img { display: block; height: 36px; width: auto; }
.top nav { display: flex; align-items: center; gap: 14px; }
.top nav a { text-decoration: none; font-weight: 600; }
.foot { text-align: center; color: var(--muted); font-size: 14px; padding: 20px 16px 28px; }

/* Кнопки */
.btn { display: inline-block; border: 0; cursor: pointer; text-decoration: none; font: inherit; font-weight: 700;
       background: var(--accent); color: #fff; padding: 11px 20px; border-radius: 12px; transition: transform .08s, filter .15s; }

.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: default; }
.btn-small { padding: 7px 13px; font-size: 15px; border-radius: 10px; }
.btn-big { padding: 16px 30px; font-size: 20px; border-radius: 16px; }
.btn-wide { width: 100%; }
.btn-ghost { background: var(--accent-soft); color: var(--accent); }
.btn-danger { background: transparent; color: var(--danger); border: 1.5px solid var(--danger); }
.link { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--brand); cursor: pointer; }
.inline { display: inline; margin: 0; }

/* Блоки */
.card { background: var(--card); border-radius: var(--radius); padding: 24px; margin-bottom: 18px;
        box-shadow: 0 1px 2px rgba(20,30,80,.04), 0 6px 24px rgba(20,30,80,.05); }
.narrow { max-width: 460px; margin-left: auto; margin-right: auto; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.push-right { margin-left: auto; }
.flash { background: #e7f7ec; color: #1b6b37; padding: 12px 16px; border-radius: 12px; margin-bottom: 18px; font-weight: 600; }
.error { background: #fdecec; color: #a12e2e; padding: 12px 16px; border-radius: 12px; margin-bottom: 14px; }
.head-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.head-row h1 { margin: 0; }
.empty { background: var(--card); border: 2px dashed var(--line); border-radius: var(--radius); padding: 36px; text-align: center; color: var(--muted); }

/* Главная */
.hero { text-align: center; padding: 40px 0 28px; }
.hero h1 { font-size: clamp(32px, 7vw, 52px); letter-spacing: -1px; }
.hl { background: linear-gradient(transparent 60%, var(--sun) 60%); padding: 0 4px; }
.lead { font-size: 19px; color: var(--muted); max-width: 620px; margin: 0 auto 26px; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 18px; }
.step { background: var(--card); border-radius: var(--radius); padding: 20px; }
.step b { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
          background: var(--brand); color: #fff; margin-bottom: 8px; }
.step p { margin: 0; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: var(--accent-soft); padding: 6px 12px; border-radius: 99px; font-size: 15px; }

/* Формы */
.form { display: grid; gap: 18px; }
.form label { display: grid; gap: 6px; font-weight: 600; }
.form small { font-weight: 400; color: var(--muted); font-size: 14px; }
input[type=email], input[type=password], input[type=text] {
    font: inherit; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; width: 100%; background: #fff; }
input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--accent-soft); }
.form label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 15px; }
.form label.check.strong { font-weight: 700; font-size: 18px; align-items: center; }
.check input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--brand); }
.group { display: grid; gap: 8px; }
.label { font-weight: 700; }
.subject { border: 1.5px solid var(--line); border-radius: 14px; padding: 14px; margin: 0 0 8px; }
.subject p { margin: 6px 0 8px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.form label.pill { display: inline-block; font-weight: 500; }
.pill input { position: absolute; opacity: 0; pointer-events: none; }
.pill span { display: inline-block; padding: 8px 14px; border: 1.5px solid var(--line); border-radius: 99px; cursor: pointer;
             background: #fff; transition: all .12s; user-select: none; }
.pill.big span { padding: 10px 16px; }
.pill input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.pill input:focus-visible + span { box-shadow: 0 0 0 3px var(--accent-soft); }

/* Кабинет */
.kids { display: grid; gap: 14px; margin-bottom: 14px; }
.kid-card { background: var(--card); border-radius: var(--radius); padding: 20px; border-left: 6px solid var(--accent);
            box-shadow: 0 6px 24px rgba(20,30,80,.05); }
.kid-top { display: flex; gap: 14px; align-items: center; margin-bottom: 10px; }
.kid-top p { margin: 0; }
.kid-icon { font-size: 34px; width: 58px; height: 58px; display: grid; place-items: center;
            background: var(--accent-soft); border-radius: 16px; flex: none; }
.kid-stats { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 10px; font-weight: 600; }
.kid-stats.big { font-size: 19px; justify-content: center; }
.linkbox { margin-bottom: 12px; }
.facts { display: grid; grid-template-columns: 150px 1fr; gap: 10px 14px; margin: 16px 0 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
@media (max-width: 560px) {
    .facts { grid-template-columns: 1fr; gap: 2px; }
    .facts dd { margin-bottom: 10px; }
    h1 { font-size: 26px; }
    .card { padding: 18px; }
    .push-right { margin-left: 0; }
}

/* Страница ребёнка */
.kid-hero { text-align: center; padding: 26px 16px; margin-bottom: 18px; border-radius: var(--radius);
            background: var(--accent-soft); }
.kid-hero h1 { font-size: 38px; }
.kid-big-icon { font-size: 72px; line-height: 1; margin-bottom: 8px; }

/* Текстовые страницы */
.prose h2 { font-size: 19px; margin: 22px 0 6px; }
.prose ul { padding-left: 22px; margin: 6px 0; }
.prose li { margin-bottom: 4px; }
.foot a { color: var(--muted); }
.danger-zone { margin-top: 40px; color: var(--muted); }
.danger-zone summary { cursor: pointer; font-size: 14px; }
.danger-zone input.short { width: 200px; padding: 8px 12px; }

/* Тренажёр */
.level { height: 10px; background: rgba(255,255,255,.7); border-radius: 99px; max-width: 320px; margin: 4px auto 6px; overflow: hidden; }
.level-bar { height: 100%; background: var(--sun); border-radius: 99px; transition: width .5s; }
.kid-hero p { margin: 0; }

.hint-text { margin: 4px 0 22px; }
.progress { height: 8px; background: var(--accent-soft); border-radius: 99px; overflow: hidden; margin-bottom: 8px; }
.progress .bar { height: 100%; background: var(--accent); transition: width .4s; }
.question { font-size: clamp(30px, 8vw, 46px); font-weight: 800; margin: 18px 0 22px; line-height: 1.25; letter-spacing: .5px; }
.question:not(:empty) { min-height: 1.3em; }
.answer-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.answer-row input.answer { font: inherit; font-size: 30px; font-weight: 700; text-align: center; width: 170px; padding: 10px 12px;
          border: 2.5px solid var(--line); border-radius: 16px; }
.answer-row input.answer:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.feedback { min-height: 48px; margin-top: 16px; font-size: 20px; font-weight: 700; display: flex; gap: 12px;
            align-items: center; justify-content: center; flex-wrap: wrap; }
.feedback.good { color: #1b8a45; }

.pop { animation: pop .35s ease-out; }
.shake { animation: shake .35s; }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.15); } 100% { transform: scale(1); opacity: 1; } }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.big-num { font-size: 34px; font-weight: 800; margin: 6px 0; }
@media (prefers-reduced-motion: reduce) { .pop, .shake { animation: none; } }
/* Кабинет: календарь и темы */
.calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; max-width: 420px; margin: 10px 0 6px; }
.calendar span { aspect-ratio: 1; border-radius: 10px; display: grid; place-items: center; font-size: 13px;
                 background: #f0f1f7; color: var(--muted); }
.calendar span.on { background: var(--accent); color: #fff; font-weight: 700; }
.calendar span.part { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.calendar span.today { outline: 2px solid var(--sun); }
.topics { display: grid; gap: 10px; }
.topic-row { display: grid; grid-template-columns: 1fr 90px 50px; gap: 10px; align-items: center; font-size: 15px; }
.meter { height: 10px; background: #f0f1f7; border-radius: 99px; overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 99px; }
.mistakes { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 15px; }
.mistakes li { background: #fff6f5; border-radius: 10px; padding: 8px 12px; }

/* Темы оформления */
.theme-space    { --accent: #4b3cf0; --accent-soft: #ebe8ff; }
.theme-animals  { --accent: #e08a1e; --accent-soft: #fff1dc; }
.theme-football { --accent: #1e9b4c; --accent-soft: #e2f6e9; }
.theme-castle   { --accent: #d6458f; --accent-soft: #fde8f3; }
.theme-dino     { --accent: #5e9c1f; --accent-soft: #edf7df; }
.theme-pirates  { --accent: #2b5f8f; --accent-soft: #e3eef8; }
.theme-blocks   { --accent: #8a5a2b; --accent-soft: #f5ebdf; }
body.kid.theme-space { background: #f1efff; }

/* Игра: дорожка героя, комбо, карта, наклейки, новый уровень */
.trainer { text-align: center; padding: 28px 20px; position: relative; padding-top: 46px; }

.sound:hover { opacity: 1; }
.mission-tag { display: inline-block; margin: 0 0 6px; padding: 4px 12px; border-radius: 99px; background: var(--sun);
               font-weight: 800; font-size: 14px; }
.track { position: relative; height: 46px; margin: 4px 0 10px; border-radius: 99px; background: var(--accent-soft);
         background-image: repeating-linear-gradient(90deg, transparent 0 14px, rgba(255,255,255,.8) 14px 22px);
         background-size: 100% 4px; background-repeat: no-repeat; background-position: 0 50%; }
.track.big { height: 64px; margin: 14px 0 16px; }
.track .runner, .track .goal { position: absolute; top: 50%; font-size: 30px; line-height: 1; height: 1em; white-space: nowrap; transform: translateY(-50%); }
.track.big .runner, .track.big .goal { font-size: 42px; }
.track .runner { left: 0; transition: left .6s cubic-bezier(.3,1.4,.5,1); z-index: 1; padding-left: 6px; }
.track .goal { right: 8px; }
.track .runner.shake { animation: heroshake .35s; }
@keyframes heroshake { 0%, 100% { transform: translateY(-50%); } 20%, 60% { transform: translate(-8px, -50%); } 40%, 80% { transform: translate(8px, -50%); } }

.world h2 { margin-bottom: 4px; }
/* Карта мира: змейка из мест */
.map { margin: 16px 0 4px; }

.map-row.rev { direction: rtl; }
.map-row.rev > * { direction: ltr; }
.map-row::before { content: ''; position: absolute; left: 12.5%; right: 12.5%; top: 28px; border-top: 3px dashed var(--line); z-index: 0; }
.map-turn { height: 18px; position: relative; }
.map-turn::before { content: ''; position: absolute; top: -40px; bottom: -40px; border-left: 3px dashed var(--line); z-index: 0; }
.map-turn.right::before { right: 12.5%; }
.map-turn.left::before { left: 12.5%; }
.node { text-align: center; font-size: 13px; line-height: 1.2; position: relative; z-index: 1; padding: 0 2px; }
.node b { position: relative; display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 6px; border-radius: 50%;
          font-size: 28px; background: #fff; border: 3px solid var(--line); }
.node span { display: block; font-weight: 600; }
.node small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.badge { position: absolute; right: -8px; top: -8px; font-style: normal; font-size: 14px; width: 24px; height: 24px; border-radius: 50%;
         display: grid; place-items: center; background: #fff; box-shadow: 0 1px 4px rgba(29,35,64,.2); }
.node.done b { border-color: var(--accent); background: var(--accent-soft); }
.badge.ok { background: #1b8a45; color: #fff; font-weight: 800; }

.node.here .badge.me { width: 30px; height: 30px; font-size: 18px; top: -12px; right: -12px; animation: bob 1.6s ease-in-out infinite; }
.node.here span { font-weight: 800; }
.node.locked b { filter: grayscale(1); opacity: .45; border-style: dashed; }
.node.locked .badge { filter: none; }
.node.locked span { color: var(--muted); font-weight: 500; }
@media (max-width: 380px) { .node b { width: 50px; height: 50px; font-size: 24px; } .map-row::before { top: 25px; } }
@keyframes bob { 50% { transform: translateY(-4px); } }
.album { display: grid; grid-template-columns: repeat(auto-fill, 64px); gap: 10px; margin-top: 14px; }
.sticker { position: relative; display: grid; place-items: center; aspect-ratio: 1; font-size: 34px; border-radius: 16px;
           background: var(--accent-soft); border: 3px solid #fff; box-shadow: 0 2px 6px rgba(29,35,64,.12); }
.sticker.none { background: #f4f5fa; color: #c3c7d9; font-size: 22px; font-weight: 800; box-shadow: none; border: 2px dashed var(--line); }
.sticker.gold { background: linear-gradient(135deg, #fff3c4, #ffd65c); border-color: #f2b400; }
.sticker i { position: absolute; right: -4px; bottom: -6px; font-style: normal; font-size: 12px; font-weight: 800;
             background: var(--ink); color: #fff; border-radius: 99px; padding: 1px 6px; }
.sticker.big { width: 96px; font-size: 56px; margin: 0 auto 8px; }
.goldtext { color: #c99400; }
.new-sticker { margin: 12px 0; font-weight: 700; }
.levelup { position: fixed; inset: 0; background: rgba(29,35,64,.55); display: grid; place-items: center; padding: 16px; z-index: 10; }
.levelup[hidden] { display: none; }
.levelup-box { background: #fff; border-radius: var(--radius); padding: 28px 22px; max-width: 380px; text-align: center; animation: pop .4s ease-out; }
@media (prefers-reduced-motion: reduce) { .node.here .badge.me, .levelup-box { animation: none; } .track .runner { transition: none; } }

/* Русский язык: пропуск буквы и кнопки-варианты */
.question-word { letter-spacing: 2px; }
.question-text { font-size: clamp(22px, 5.5vw, 30px); }
.blank { display: inline-block; min-width: .9em; padding: 0 4px; margin: 0 2px; border-bottom: 4px solid var(--accent);
         color: var(--accent); background: var(--accent-soft); border-radius: 8px 8px 0 0; }
.choices { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.choices[hidden], .answer-row[hidden] { display: none; }

.choice.letter { font-size: 34px; min-width: 76px; padding: 8px 16px; }

.choice:active:not(:disabled) { transform: scale(.96); }
.choice.yes { background: #e3f7ea; border-color: #1b8a45; color: #1b8a45; }

.choice:disabled { cursor: default; }

/* Подсказка «Поставь Ясмо на экран» */

.install[hidden] { display: none; }
.install-icon img { display: block; border-radius: 10px; }

.install-text span { color: var(--muted); }

/* QR-код в кабинете родителя */
.qrbox { margin: 4px 0 12px; }
.qrbox summary { cursor: pointer; font-weight: 700; color: var(--brand); padding: 4px 0; }
.qrbox-body { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; margin-top: 10px; }
.qrbox .qr { flex: none; border-radius: 12px; border: 1.5px solid var(--line); max-width: 100%; height: auto; }
.qrbox ol { flex: 1 1 240px; margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: 15px; }
section.card > .qrbox { margin: 0; }

/* Объяснение ошибки */
.why { flex-basis: 100%; font-size: 16px; font-weight: 600; color: var(--ink); background: #fff8e1; border-radius: 10px; padding: 8px 12px; }
.mistakes .why { display: inline-block; margin-top: 4px; font-size: 14px; font-weight: 500; padding: 4px 10px; }

/* Записка от родителя и итог дня */
.kid-note { display: flex; gap: 12px; align-items: center; background: #fff; border: 2px dashed var(--accent);
            border-radius: var(--radius); padding: 14px 16px; margin-bottom: 18px; font-size: 19px; font-weight: 600; }
.kid-note span { font-size: 30px; }
.kid-note p { margin: 0; }
.note-form textarea { width: 100%; font: inherit; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; resize: vertical; margin-bottom: 8px; }
.summary { background: var(--accent-soft); border-radius: 12px; padding: 10px 14px; margin: 0 0 12px; font-size: 15px; }
p.summary.card { padding: 14px 18px; margin-bottom: 18px; }

/* Игра-награда */
.reward { margin: 16px 0 6px; }
.reward[hidden] { display: none; }
.btn-reward { background: linear-gradient(135deg, #ff9f1c, #ff5d8f); box-shadow: 0 6px 18px rgba(255, 93, 143, .35); animation: bob 1.8s ease-in-out infinite; }
.btn-reward:disabled { background: #c9ccda; box-shadow: none; animation: none; cursor: default; }
body.game-open { overflow: hidden; }
.game-overlay { position: fixed; inset: 0; z-index: 20; background: rgba(15, 18, 40, .82); display: grid; place-items: center; padding: 10px; }
.game-box {
    position: relative;
    width: min(520px, 100%);
    height: min(760px, calc(100dvh - 20px));
    background: linear-gradient(180deg, var(--accent-soft), #fff);
    border-radius: 22px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.game-head { display: flex; align-items: center; gap: 12px; padding: 10px 14px; font-weight: 800; font-size: 18px; background: #fff; }
.game-score { min-width: 64px; }
.game-lives { flex: 1; letter-spacing: 2px; }
.game-close { background: none; border: 0; font-size: 22px; cursor: pointer; color: var(--muted); }
.game-canvas { flex: 1; width: 100%; touch-action: none; display: block; cursor: none; }
.game-msg { position: absolute; inset: 52px 0 0; display: grid; place-items: center; padding: 16px; background: rgba(255, 255, 255, .55); }
.game-msg[hidden] { display: none; }

.game-msg-box h2 { margin: 0 0 8px; }
.game-msg-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }
.game-big { font-size: 56px; line-height: 1; }
.game-final { font-size: 24px; margin: 6px 0; }
@media (prefers-reduced-motion: reduce) { .btn-reward { animation: none; } }

.game-rules { list-style: none; padding: 0; margin: 10px auto 6px; display: grid; gap: 8px; text-align: left; width: fit-content; max-width: 100%; font-size: 20px; }
.game-rules li { display: flex; align-items: center; gap: 12px; }
.game-rules span { font-size: 36px; line-height: 1; width: 44px; text-align: center; }

/* Цель недели */
.wgoal { background: #fff; border: 2px solid var(--sun); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 18px; }
.wgoal.reached { background: #fff8e1; }
.wgoal-head { font-weight: 800; font-size: 18px; margin-bottom: 8px; }
.wgoal-dots { display: flex; gap: 6px; margin-bottom: 8px; }
.wgoal-dots i { flex: 1; max-width: 46px; height: 30px; border-radius: 10px; background: #f0f1f7; display: grid; place-items: center;
               font-style: normal; font-weight: 800; color: #fff; }
.wgoal-dots i.on { background: #1b8a45; }
.wgoal p { margin: 0; }
.goal-form { display: grid; gap: 8px; }
.goal-form select { font: inherit; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; }

/* Питомец */
.pet { display: flex; gap: 16px; align-items: flex-start; }
.pet-face { font-size: 64px; line-height: 1; flex: none; width: 84px; height: 84px; display: grid; place-items: center;
            background: var(--accent-soft); border-radius: 24px; }
.pet.happy .pet-face { animation: bob 1.4s ease-in-out infinite; }
.pet-info { flex: 1; min-width: 0; }
.pet-name { font-size: 19px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.pet-input { font: inherit; font-size: 17px; padding: 6px 10px; border: 1.5px solid var(--line); border-radius: 10px; width: 9em; margin-right: 6px; }
.pet-mood { margin: 4px 0 6px; font-weight: 600; }
.pet-bar { margin: 0 0 4px; max-width: none; background: #f0f1f7; }

/* Сундук и герои */
.chest { margin: 14px auto 4px; padding: 14px; border-radius: 16px; background: linear-gradient(135deg, #fff3c4, #ffe08a); max-width: 360px; }
.chest[hidden] { display: none; }
.chest-icon { font-size: 52px; line-height: 1; margin-bottom: 4px; }
.chest p { margin: 4px 0 0; }
.heroes-title { margin-top: 22px; }
.heroes { display: flex; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.hero-pick { width: 84px; height: 84px; border-radius: 20px; border: 3px solid var(--line); background: #fff; font-size: 42px;
             display: grid; place-items: center; cursor: pointer; }
.hero-pick.selected { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 4px var(--accent-soft); }
.hero-pick.locked { cursor: default; background: #f4f5fa; border-style: dashed; font-size: 24px; text-align: center; line-height: 1.1; }
.hero-pick.locked small { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .pet.happy .pet-face { animation: none; } }

/* Главная: что внутри */
.features { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 12px; }
.features li { display: flex; gap: 12px; align-items: flex-start; }
.features span { font-size: 28px; line-height: 1; flex: none; width: 36px; text-align: center; }

/* Салют */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 30; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 9px; height: 14px; border-radius: 2px; opacity: 0;
              animation-name: fall; animation-timing-function: cubic-bezier(.25,.6,.4,1); animation-fill-mode: forwards; }
.confetti i.emoji { width: auto; height: auto; font-style: normal; font-size: 24px; }
@keyframes fall {
    0% { transform: translate(0, 0) rotate(0); opacity: 1; }
    100% { transform: translate(var(--x), 105vh) rotate(var(--r)); opacity: .9; }
}
/* Кнопка «прочитай» */
.q-wrap { display: flex; align-items: center; justify-content: center; gap: 8px; }
.speak { flex: none; width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--line); background: #fff; font-size: 22px; cursor: pointer; }
.speak:active { transform: scale(.94); }
.speak[hidden] { display: none; }

/* Было → стало, совет на вечер */
.growth { display: grid; gap: 8px; }
.growth-row { display: grid; grid-template-columns: 1fr auto auto auto 64px; gap: 8px; align-items: center; font-size: 15px; }
.growth-row i { color: var(--muted); font-style: normal; }
.growth-row em { font-style: normal; font-weight: 800; text-align: right; color: var(--muted); }
.growth-row em.up { color: #1b8a45; }
.growth-row em.down { color: #c0392b; }
.tip { background: #fffaf0; border: 2px solid #ffe2a8; }
.tip p { margin: 0; }
.tip-line { background: #fffaf0; }

.focus-tag { display: inline-block; margin: 6px 0 2px; padding: 6px 12px; border-radius: 12px; background: #fff8e1; font-size: 15px; }
.goal-form select[hidden] { display: none; }

.goal-form select, .goal-form input[type=text] { width: 100%; max-width: 100%; box-sizing: border-box; }

/* Календарь двух недель */
.cal2 { max-width: 460px; margin: 12px 0 6px; }
.cal2-head, .cal2-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal2-head b { text-align: center; font-size: 12px; color: var(--muted); font-weight: 700; }
.cal2-head b.we { color: #d6458f; }
.cal2-grid { margin-top: 4px; }
.cal2-grid .day { min-width: 0; position: relative; aspect-ratio: 1; border-radius: 12px; border: 0; padding: 4px 2px; cursor: pointer;
                  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
                  font: inherit; font-size: 14px; font-weight: 700; color: var(--muted); background: #f0f1f7; }
.cal2-grid .day.we { background: #f6eef3; }
.cal2-grid .day i { font-style: normal; font-size: 10px; font-weight: 700; line-height: 1; }
.cal2-grid .day .mon { position: absolute; top: 2px; left: 4px; font-size: 10px; font-weight: 700; color: var(--muted); }
.cal2-grid .day.done { color: #fff; }
.cal2-grid .day.done .mon { color: rgba(255,255,255,.85); }
.cal2-grid .day.good { background: #2bb05e; }
.cal2-grid .day.mid { background: #f0b429; }
.cal2-grid .day.low { background: #e05252; }
.cal2-grid .day.part { background: #fff; border: 2px dashed #c3c7d9; color: var(--ink); }
.cal2-grid .day.future { background: transparent; border: 1.5px dashed var(--line); color: #c3c7d9; cursor: default; }
.cal2-grid .day.today { outline: 3px solid var(--sun); outline-offset: 1px; }
.cal2-grid .day.sel { box-shadow: 0 0 0 3px var(--brand); }
.cal2-grid .day.link::after { content: ''; position: absolute; right: -8px; top: 50%; width: 10px; height: 6px; margin-top: -3px;
                              background: #1b8a45; border-radius: 3px; z-index: 1; }
.cal-info { margin: 8px 0 6px; padding: 10px 12px; background: var(--accent-soft); border-radius: 12px; font-size: 14px; max-width: 460px; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--muted); }
.cal-legend span { display: inline-flex; align-items: center; gap: 5px; }
.lg { display: inline-block; width: 12px; height: 12px; border-radius: 4px; }
.lg.good { background: #2bb05e; } .lg.mid { background: #f0b429; } .lg.low { background: #e05252; }
.lg.part { border: 2px dashed #c3c7d9; width: 8px; height: 8px; } .lg.none { background: #f0f1f7; }

@media (max-width: 400px) { .cal2-grid .day i { font-size: 9px; letter-spacing: -.3px; } .cal2-grid .day { font-size: 13px; } }

/* ================= Живой слой (public/live.js) ================= */
/* Отклик кнопок: пружинят под пальцем */
.btn, .choice, .hero-pick, .sticker, .cal2-grid .day, .pet-face { transition: transform .18s cubic-bezier(.3,1.6,.5,1), box-shadow .2s, filter .2s; }
.btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn:active, .choice:active:not(:disabled), .hero-pick:active { transform: scale(.94); }
.choice:hover:not(:disabled) { border-color: var(--accent); transform: translateY(-2px); }
.sticker:hover { transform: rotate(-6deg) scale(1.08); }

/* Фон мира */
.live body.kid > header, .live body.kid > main, .live body.kid > footer { position: relative; z-index: 1; }
.world-fx { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; transition: opacity .6s; }
.world-fx i { position: absolute; font-style: normal; line-height: 1; color: var(--accent); will-change: transform, opacity; }
.fx-twinkle i { opacity: .5; animation: fx-twinkle ease-in-out infinite; }
.fx-fall i { top: -40px; opacity: .55; animation: fx-fall linear infinite; }
.fx-drift i { left: -60px; opacity: .55; animation: fx-drift linear infinite; }
.fx-rise i { top: auto; bottom: -30px; opacity: .35; animation: fx-rise linear infinite; }
@keyframes fx-twinkle { 0%, 100% { opacity: .15; transform: scale(.7); } 50% { opacity: .75; transform: scale(1.15) rotate(20deg); } }
@keyframes fx-fall { 0% { transform: translate(0, 0) rotate(0); } 100% { transform: translate(var(--sway), var(--path, 110vh)) rotate(540deg); } }
@keyframes fx-drift { 0% { transform: translateX(0); } 100% { transform: translateX(calc(100vw + 120px)); } }
@keyframes fx-rise { 0% { transform: translate(0, 0); opacity: 0; } 10% { opacity: .4; } 100% { transform: translate(var(--sway), calc(-1 * var(--path, 110vh))) rotate(180deg); opacity: 0; } }
.fx-comet { position: absolute; top: 10%; left: -10%; font-size: 30px; opacity: 0; animation: fx-comet 14s ease-in 3s infinite; }
@keyframes fx-comet { 0%, 85% { transform: translate(0, 0) rotate(-20deg); opacity: 0; } 87% { opacity: .9; } 100% { transform: translate(120vw, 40vh) rotate(-20deg); opacity: 0; } }
.fx-cloud { position: absolute; top: 8%; left: -15%; font-size: 64px; opacity: .35; animation: fx-drift 80s linear infinite; }
.fx-waves { position: absolute; left: -50%; right: -50%; bottom: 0; height: 70px; opacity: .25;
            background: radial-gradient(circle at 25px -8px, transparent 28px, var(--accent) 29px) 0 0 / 50px 70px repeat-x;
            animation: fx-waves 9s linear infinite; }
@keyframes fx-waves { to { transform: translateX(50px); } }
body.solving .world-fx { opacity: .35; } /* во время задачи фон тише */
/* Маленький мир в шапке с приветствием */
.kid-hero.has-fx { position: relative; overflow: hidden; }
.kid-hero.has-fx > *:not(.world-fx):not(.scene-deco) { position: relative; z-index: 1; }
.world-fx.in-box { position: absolute; --path: 360px; }
.world-fx.in-box i { opacity: .7; }
.world-fx.in-box.fx-twinkle i { opacity: .6; }
.world-fx.in-box .fx-waves { height: 46px; opacity: .3; }
.world-fx.in-box .fx-cloud { font-size: 44px; top: 4%; }

/* Блоки проявляются при прокрутке */
.live .rv { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s cubic-bezier(.2,.8,.2,1); }
.live .rv.rv-in { opacity: 1; transform: none; }

/* Счётчик подпрыгивает, звезда летит в счётчик */
.bump { display: inline-block; animation: bump .5s cubic-bezier(.3,1.8,.5,1); }
@keyframes bump { 40% { transform: scale(1.3); } }
.fly-star { position: fixed; z-index: 40; font-size: 32px; line-height: 1; pointer-events: none; filter: drop-shadow(0 4px 8px rgba(255,180,0,.5)); }

/* Герой на дорожке: дышит, радуется, смущается */
.runner-face { display: inline-block; font-style: normal; animation: hero-idle 2.4s ease-in-out infinite; transform-origin: 50% 90%; }
.runner-face.hop { animation: hero-hop .65s cubic-bezier(.3,1.6,.5,1); }
.runner-face.oops { animation: hero-oops .7s ease-in-out; }
@keyframes hero-idle { 50% { transform: translateY(-3px) rotate(-3deg); } }
@keyframes hero-hop { 0% { transform: none; } 35% { transform: translateY(-18px) rotate(-12deg) scale(1.15); } 70% { transform: translateY(0) scale(.95, 1.05); } 100% { transform: none; } }
@keyframes hero-oops { 20%, 60% { transform: rotate(-14deg); } 40%, 80% { transform: rotate(10deg); } }

/* Смена экранов и новое задание */
.scr-in { animation: scr-in .45s cubic-bezier(.2,.8,.2,1) both; }
.question.scr-in { animation: q-in .45s cubic-bezier(.2,.9,.3,1.2) both; }
.choices.scr-in, .answer-row.scr-in { animation: scr-in .45s .08s cubic-bezier(.2,.8,.2,1) both; }
@keyframes scr-in { from { transform: translateY(14px); } to { transform: none; } } /* без исчезновения: если анимация задержится, всё равно видно */
@keyframes q-in { from { transform: translateX(40px) scale(.96); } to { transform: none; } }
.q-ok { animation: q-ok .6s ease; }
@keyframes q-ok { 30% { color: #1b8a45; transform: scale(1.06); } }

/* Наклейка переворачивается как карточка, новое место раскрашивается */
.new-sticker .sticker.big { animation: flip-in .8s .2s cubic-bezier(.2,.9,.3,1.3) both; }
@keyframes flip-in { from { transform: perspective(400px) rotateY(180deg) scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.lv-place { animation: colorize 1.2s .15s ease both; }
@keyframes colorize { 0% { filter: grayscale(1); transform: scale(.6); } 50% { transform: scale(1.2); } 100% { filter: none; transform: none; } }
.node.here b { border-color: var(--sun); background: #fff8e1; box-shadow: 0 0 0 5px rgba(255, 200, 61, .35); animation: here-pulse 2.2s ease-in-out infinite; }
@keyframes here-pulse { 50% { box-shadow: 0 0 0 10px rgba(255, 200, 61, .18); } }

/* Питомец: «боинг» и реплика */
.pet-face { position: relative; cursor: pointer; }
.pet-face.boing { animation: boing .6s cubic-bezier(.3,1.8,.5,1); }
@keyframes boing { 30% { transform: scale(1.2, .85) translateY(4px); } 60% { transform: scale(.9, 1.15) translateY(-10px); } }
.pet-mood.pet-say { color: var(--accent); animation: say-in .35s cubic-bezier(.3,1.6,.5,1); }
@keyframes say-in { from { opacity: 0; transform: translateY(6px) scale(.9); } }

/* Календарь родителя — волной */
.live .cal2-grid .day { animation: day-in .4s ease both; }
@keyframes day-in { from { opacity: 0; transform: translateY(8px) scale(.9); } }

/* Если в телефоне включено «уменьшить движение» — всё спокойно */
@media (prefers-reduced-motion: reduce) {
    .world-fx, .fly-star { display: none !important; }
    .runner-face, .scr-in, .q-ok, .bump, .new-sticker .sticker.big, .lv-place, .node.here b, .pet-face.boing, .live .cal2-grid .day, .pet-say { animation: none !important; }
    .live .rv { opacity: 1; transform: none; transition: none; }
}

/* Выбор игры-награды */
.reward-title { font-weight: 800; margin: 0 0 8px; }
.games { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; max-width: 420px; margin: 0 auto; }
.game-pick { display: grid; justify-items: center; gap: 2px; padding: 12px 10px; border-radius: 16px; cursor: pointer; font: inherit;
             border: 0; color: #fff; background: linear-gradient(135deg, #ff9f1c, #ff5d8f); box-shadow: 0 6px 16px rgba(255, 93, 143, .3); }
.game-pick .gp-icon { font-size: 30px; line-height: 1.1; }
.game-pick b { font-size: 15px; line-height: 1.2; }
.game-pick small { font-size: 12px; opacity: .9; }
.game-pick:disabled { cursor: default; background: #d5d8e6; box-shadow: none; color: #5b6180; }
.game-pick.locked { background: #f0f1f7; color: var(--muted); border: 2px dashed var(--line); }
.game-rules.tower { font-size: 17px; }
.game-rules.tower span { font-size: 28px; }
.game-tower .game-canvas { cursor: pointer; }
.game-rules li > span { flex: none; }
.game-msg-box { background: #fff; border-radius: 18px; padding: 22px 20px; text-align: center; box-shadow: 0 10px 30px rgba(29, 35, 64, .18); max-width: min(360px, calc(100% - 8px)); box-sizing: border-box; }
.game-rules em { font-style: normal; }

/* ================= Анкета ребёнка: «создание героя» ================= */
.hero-form h2 { font-size: 22px; margin: 0 0 12px; }
.hero-form .wstep { border: 0; padding: 0; margin: 0 0 6px; }
.hero-form [hidden] { display: none !important; }
.wiz-top { display: none; }
.wiz-on .wiz-top { display: grid; gap: 6px; }
.wiz-bar { height: 8px; background: var(--accent-soft); border-radius: 99px; overflow: hidden; }
.wiz-bar i { display: block; height: 100%; width: 20%; background: linear-gradient(90deg, var(--brand), #ff5d8f); border-radius: 99px; transition: width .4s cubic-bezier(.2,.8,.2,1); }
.wiz-nav { display: none; }
.wiz-on .wiz-nav { display: flex; justify-content: space-between; }
.wiz-error { color: var(--danger); font-weight: 700; margin: 0; }
.wiz-error.shake { animation: shake .35s; }
.step-in { animation: step-in .35s cubic-bezier(.2,.8,.2,1); }
@keyframes step-in { from { transform: translateX(24px); } to { transform: none; } }

/* Живая карточка героя */
.hero-card { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 18px;
             background: var(--accent-soft); border: 2px solid rgba(59, 76, 245, .12); transition: background .3s; }
.hero-card .hc-icon { font-size: 44px; width: 64px; height: 64px; flex: none; display: grid; place-items: center; background: #fff; border-radius: 18px;
                      box-shadow: 0 4px 12px rgba(29,35,64,.08); }
.hero-card .hc-body { display: grid; gap: 2px; min-width: 0; }

.hero-card .hc-subj { font-size: 20px; letter-spacing: 4px; min-height: 1.2em; }

/* Плитки */
.tiles { display: grid; gap: 10px; }
.tiles-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tiles-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tiles-world { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.form label.tile { display: block; font-weight: 500; position: relative; }
.tile input { position: absolute; opacity: 0; pointer-events: none; }
.tile > span { display: grid; justify-items: center; gap: 2px; text-align: center; padding: 14px 8px; height: 100%; box-sizing: border-box;
               border: 2px solid var(--line); border-radius: 18px; background: #fff; cursor: pointer;
               transition: transform .18s cubic-bezier(.3,1.6,.5,1), border-color .2s, background .2s, box-shadow .2s; }
.tile > span:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(29,35,64,.08); }
.tile input:focus-visible + span { box-shadow: 0 0 0 3px var(--accent-soft); }
.tile input:checked + span { border-color: var(--brand); background: #eef0ff; box-shadow: 0 6px 16px rgba(59,76,245,.18); transform: translateY(-2px); }
.tile i { font-style: normal; font-size: 30px; line-height: 1.1; }
.tile b { font-size: 16px; }
.tile small { font-size: 12px; color: var(--muted); font-weight: 500; }
.grade-tile b { font-size: 34px; line-height: 1; color: var(--brand); }
.grade-tile em { font-style: normal; font-size: 11px; color: var(--muted); }
/* Миры — в своих цветах */
.world-tile > span { background: var(--accent-soft); border-color: transparent; }
.world-tile input:checked + span { background: #fff; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), 0 8px 18px rgba(29,35,64,.12); }

/* Предметы */
.subj-list { display: grid; gap: 10px; }
.subj-card { border: 0; padding: 0; margin: 0; }

.subj-tile i { grid-row: span 2; font-size: 32px; }
.subj-tile b { font-size: 18px; }
.subj-tile small { grid-column: 2; }
.subj-tile .tick { grid-row: 1 / span 2; grid-column: 3; font-style: normal; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
                   border: 2px solid var(--line); color: transparent; font-weight: 800; }
.subj-tile input:checked + span .tick { background: var(--brand); border-color: var(--brand); color: #fff; }
.subj-topics { display: none; padding: 10px 6px 4px; }
.subj-card.on .subj-topics { display: block; }
.subj-topics p { margin: 0 0 8px; }
.form-final { align-items: center; }

/* Экран «Готово!» */
.welcome { text-align: center; background: linear-gradient(180deg, var(--accent-soft), #fff); }
.welcome h2 { margin: 4px 0 12px; }
.welcome .hero-card { text-align: left; max-width: 360px; margin: 0 auto 14px; background: #fff; }
.welcome-burst { font-size: 56px; line-height: 1; animation: bump .8s cubic-bezier(.3,1.8,.5,1); }
.welcome-qr .qr { border-radius: 14px; border: 1.5px solid var(--line); max-width: 100%; height: auto; }
@media (max-width: 420px) {
    .tiles-3 .tile i { font-size: 26px; }
    .tiles-3 .tile b { font-size: 14px; }
    .tiles-world { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { .step-in, .welcome-burst { animation: none; } .tile > span { transition: none; } }

/* ================= Страница ребёнка у родителя ================= */
.kid-banner { background: linear-gradient(160deg, var(--accent-soft), #fff 70%); }
.kb-top { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.kb-hero { font-size: 48px; width: 76px; height: 76px; flex: none; display: grid; place-items: center; background: #fff; border-radius: 22px;
           box-shadow: 0 6px 16px rgba(29,35,64,.1); }
.kb-who h1 { margin: 0; font-size: 28px; }
.kb-who p { margin: 2px 0 0; }
.kb-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.kb-stats span { background: #fff; border-radius: 14px; padding: 8px 4px; text-align: center; display: grid; gap: 2px; box-shadow: 0 2px 6px rgba(29,35,64,.05); }
.kb-stats b { font-size: 18px; }

.kb-chips, .kb-weak { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.chip.soft { background: #fff; border: 1.5px dashed var(--line); font-size: 13px; }
.kb-actions { margin-top: 6px; gap: 8px; }
.section-title { font-size: 18px; margin: 26px 4px 10px; color: var(--muted); font-weight: 800; letter-spacing: .3px; }
.today-card p { margin: 0; font-size: 16px; }
.tool-ico { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; margin-right: 10px; font-size: 20px;
            background: var(--accent-soft); vertical-align: middle; }
.card h2 .tool-ico { margin-top: -4px; }
.tools { display: grid; gap: 0; }
.tool { border-top: 5px solid var(--brand); }
.tool-note { border-top-color: #ff5d8f; } .tool-note .tool-ico { background: #ffe3ec; }
.tool-goal { border-top-color: #ffc83d; } .tool-goal .tool-ico { background: #fff3c4; }
.tool-focus { border-top-color: #2bb05e; } .tool-focus .tool-ico { background: #e2f6e9; }

.tool-form { display: grid; gap: 10px; }
.tool-form input[type=text], .tool-form textarea { width: 100%; box-sizing: border-box; font: inherit; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; }
.tool-form .btn { justify-self: start; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-btn { font: inherit; font-size: 14px; padding: 6px 12px; border-radius: 99px; border: 1.5px solid var(--line); background: #fff; cursor: pointer;
            transition: transform .15s cubic-bezier(.3,1.6,.5,1), border-color .2s, background .2s; }
.chip-btn:hover { border-color: var(--brand); transform: translateY(-1px); }
.chip-btn.picked { background: var(--brand); border-color: var(--brand); color: #fff; }
.mini-tiles { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.mini-tile { position: relative; }
.mini-tile input { position: absolute; opacity: 0; pointer-events: none; }
.mini-tile span { display: grid; justify-items: center; padding: 8px 2px; border: 2px solid var(--line); border-radius: 14px; background: #fff; cursor: pointer;
                  transition: transform .15s cubic-bezier(.3,1.6,.5,1), border-color .2s, background .2s; }
.mini-tile b { font-size: 20px; line-height: 1.1; }
.mini-tile small { font-size: 10px; color: var(--muted); }
.mini-tile input:checked + span { border-color: #f0b429; background: #fff8e1; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(240,180,41,.25); }
.mini-tile input:focus-visible + span { box-shadow: 0 0 0 3px var(--accent-soft); }
.focus-group { display: grid; gap: 6px; }
.focus-subj { margin: 4px 0 0; font-weight: 800; font-size: 15px; }
.tool-focus .pill input:checked + span { background: #2bb05e; border-color: #2bb05e; }
.pill.num span { min-width: 34px; text-align: center; }
.pill-plain span { font-weight: 600; }
[data-focus-num][hidden] { display: none !important; }
@media (min-width: 900px) { .tools { grid-template-columns: 1fr 1fr; gap: 0 18px; } .tools .tool-focus { grid-column: 1 / -1; } }
@media (max-width: 420px) { .kb-stats b { font-size: 16px; } .mini-tile b { font-size: 17px; } .kb-who h1 { font-size: 24px; } }

/* ================= Карточка ребёнка в кабинете ================= */
.kc { border-left: 0; border-top: 6px solid var(--accent); background: linear-gradient(170deg, var(--accent-soft), #fff 55%); }
.kc-top { display: flex; gap: 12px; align-items: center; text-decoration: none; color: var(--ink); margin-bottom: 12px; }
.kc-hero { font-size: 36px; width: 60px; height: 60px; flex: none; display: grid; place-items: center; background: #fff; border-radius: 18px;
           box-shadow: 0 4px 12px rgba(29,35,64,.08); }
.kc-who { display: grid; gap: 2px; flex: 1; min-width: 0; }
.kc-who b { font-size: 22px; }
.kc-who small { color: var(--muted); font-size: 14px; }
.kc-go { font-size: 30px; color: var(--muted); line-height: 1; }
.kc-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.kc-stats span { background: #fff; border-radius: 14px; padding: 8px 4px; text-align: center; display: grid; gap: 2px; box-shadow: 0 2px 6px rgba(29,35,64,.05); }
.kc-stats b { font-size: 18px; }
.kc-stats small { font-size: 12px; color: var(--muted); }
.kc-status { display: inline-block; font-weight: 700; font-size: 14px; padding: 6px 12px; border-radius: 99px; margin-bottom: 8px; }
.kc-status.ok { background: #e3f7ea; color: #1b8a45; }
.kc-status.wait { background: #fff4d6; color: #9a6b00; }
.kc-summary { font-size: 14px; color: var(--muted); margin: 0 0 8px; }
.kc-tip { background: #fffaf0; border-radius: 12px; padding: 8px 12px; margin-bottom: 8px; font-size: 14px; }
.kc-tip summary { cursor: pointer; font-weight: 700; }
.kc-tip p { margin: 6px 0 0; }
.kc-actions { gap: 8px; }

/* ================= Сцены мест и переезд на новый уровень ================= */

.kid-hero.scene > *:not(.scene-deco):not(.world-fx) { position: relative; z-index: 1; }
.scene-deco { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.scene-deco .sd { position: absolute; font-style: normal; line-height: 1; opacity: .9; filter: drop-shadow(0 4px 6px rgba(0,0,0,.12)); }

.scene-deco .sd3 { right: 8%; top: 10%; font-size: 30px; animation: sd-float 6s ease-in-out infinite; }
@keyframes sd-float { 50% { transform: translateY(-8px) rotate(6deg); } }
.scene-place { display: inline-block; margin: 0 0 6px; padding: 4px 12px; border-radius: 99px; background: rgba(255,255,255,.75);
               font-weight: 800; font-size: 14px; color: var(--ink); }
.scene-dark h1, .scene-dark .kid-stats, .scene-dark .muted { color: #fff; }
.scene-dark .muted { opacity: .85; }
.scene-dark .level { background: rgba(255,255,255,.25); }
.scene-dark .world-fx i { color: #fff; }
.scene-new { animation: scene-new .9s ease; }
@keyframes scene-new { 0% { filter: brightness(1.6) saturate(.4); } 100% { filter: none; } }
/* Окно «Новое место!» */
.levelup-box { position: relative; overflow: hidden; }
.levelup-box.scene-dark h2, .levelup-box.scene-dark p { color: #fff; }
.lv-kicker { margin: 0 0 6px; font-weight: 800; font-size: 15px; opacity: .85; }
.trip { display: flex; align-items: center; gap: 6px; margin: 6px 0 14px; }
.trip-node { width: 64px; height: 64px; flex: none; display: grid; place-items: center; font-size: 36px; background: #fff; border-radius: 50%;
             box-shadow: 0 4px 12px rgba(0,0,0,.15); }
.trip-to { filter: grayscale(1); opacity: .6; transition: filter .6s .9s, opacity .6s .9s, transform .6s .9s cubic-bezier(.3,1.8,.5,1); }
.trip-road { position: relative; flex: 1; height: 6px; border-radius: 3px;
             background: repeating-linear-gradient(90deg, rgba(255,255,255,.95) 0 8px, transparent 8px 14px); }
.trip-hero { position: absolute; left: -6px; top: 50%; font-style: normal; font-size: 30px; transform: translateY(-60%);
             transition: left 1s cubic-bezier(.45,0,.25,1); }
.levelup-box.go .trip-hero { left: calc(100% - 24px); }
.levelup-box.go .trip-to { filter: none; opacity: 1; transform: scale(1.15); }
@media (prefers-reduced-motion: reduce) {
    .scene-deco .sd3, .scene-new { animation: none; }
    .trip-hero, .trip-to { transition: none; }
}
/* Пейзаж стоит на своей «земле» под полоской уровня и не налезает на текст */
.kid-hero.scene { position: relative; overflow: hidden; transition: background .6s; padding-bottom: 64px; }
.kid-hero.scene::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 54px; z-index: 0;
                         background: linear-gradient(180deg, rgba(255,255,255,0), rgba(255,255,255,.28)); pointer-events: none; }
.scene-deco .sd1 { left: 6%; bottom: 8px; font-size: 44px; }
.scene-deco .sd2 { right: 7%; bottom: 10px; font-size: 36px; }
.scene-deco .sd3 { right: 6%; top: 12px; font-size: 28px; }

/* ================= Миссия-приключение: история, страж, серия, сундук, подсказка питомца, плитки ================= */
.quest-rules { list-style: none; padding: 0; margin: 10px auto 16px; display: grid; gap: 6px; max-width: 340px; text-align: left; }
.quest-rules li { display: flex; gap: 10px; align-items: center; background: var(--accent-soft, #eef0ff); border-radius: 12px; padding: 7px 12px; font-weight: 600; font-size: 15px; }
.quest-rules span { font-size: 22px; width: 28px; text-align: center; flex: none; }
.story { margin: 4px auto 8px; padding: 8px 14px; max-width: 460px; border-radius: 14px; background: #fff8e1; color: #6b4e00;
         font-weight: 700; font-size: 15px; line-height: 1.35; box-shadow: 0 2px 8px rgba(160,120,0,.08); }
.story[hidden] { display: none; }
.boss { display: flex; gap: 12px; align-items: center; margin: 4px auto 10px; padding: 10px 14px; max-width: 460px; border-radius: 16px;
        background: linear-gradient(135deg, #2d2350, #4b3a85); color: #fff; text-align: left; position: relative; overflow: hidden; }
.boss[hidden] { display: none; }
.boss b { font-size: 16px; }
.boss p { margin: 2px 0 0; font-size: 14px; opacity: .92; line-height: 1.35; }
.boss-icon { font-size: 48px; line-height: 1; flex: none; display: inline-block; animation: boss-idle 1.6s ease-in-out infinite; }
@keyframes boss-idle { 50% { transform: translateY(-4px) scale(1.05); } }
.boss.enter { animation: boss-enter .6s cubic-bezier(.3,1.6,.5,1); }
@keyframes boss-enter { 0% { transform: scale(.6); opacity: 0; } 100% { transform: none; opacity: 1; } }
.boss.laugh .boss-icon { animation: boss-laugh .5s ease 2; }
@keyframes boss-laugh { 25% { transform: rotate(-12deg) scale(1.15); } 75% { transform: rotate(12deg) scale(1.15); } }
.boss.beaten { background: linear-gradient(135deg, #1b8a45, #2bb05e); transition: background .4s; }
.boss.beaten .boss-icon { animation: boss-flee 1.2s ease-in forwards; }
@keyframes boss-flee { 20% { transform: rotate(-20deg) scale(1.2); } 100% { transform: translate(260px, -60px) rotate(40deg) scale(.3); opacity: 0; } }
.boss.gone .boss-icon { animation: boss-flee 1.2s ease-in forwards; }
.combo { min-height: 22px; font-weight: 800; font-size: 15px; color: #c2410c; letter-spacing: 1px; }
.combo.hot { text-shadow: 0 0 10px rgba(255,140,0,.45); }
.combo.bonus { font-size: 18px; color: #b45309; }
.pet-tip { display: flex; gap: 10px; align-items: flex-start; text-align: left; margin: 10px auto 0; max-width: 420px; background: #fff;
           border: 2px solid #ffe08a; border-radius: 16px; padding: 8px 12px; color: var(--ink); font-weight: 500; font-size: 15px; line-height: 1.4; }
.pet-tip p { margin: 0; }
.pet-tip-face { font-size: 34px; line-height: 1; flex: none; animation: pet-nod 1s ease 2; }
@keyframes pet-nod { 50% { transform: rotate(-10deg) translateY(-3px); } }
.choice.puff { animation: puff .6s ease forwards; }
@keyframes puff { 50% { transform: scale(1.15); } 100% { transform: scale(.85); opacity: .25; } }
.choice.tile { font-size: 26px; font-weight: 800; min-width: 84px; min-height: 64px; border-radius: 18px; }
.mchest { margin: 12px 0 6px; }
.mchest[hidden], .done-inside[hidden] { display: none; }
.mchest-btn { font-size: 84px; line-height: 1; background: none; border: 0; cursor: pointer; padding: 6px; animation: chest-call 1.4s ease-in-out infinite;
              filter: drop-shadow(0 8px 14px rgba(0,0,0,.18)); }
@keyframes chest-call { 0%, 100% { transform: none; } 10% { transform: rotate(-8deg); } 20% { transform: rotate(8deg); } 30% { transform: none; } }
.mchest-btn.wobble { animation: chest-wobble .45s ease; }
@keyframes chest-wobble { 25% { transform: rotate(-16deg) scale(1.1); } 75% { transform: rotate(16deg) scale(1.1); } }
.mchest-btn.open { animation: chest-open .7s ease forwards; }
@keyframes chest-open { 40% { transform: scale(1.4); } 100% { transform: scale(1.2); } }
.mchest-hint { font-weight: 800; font-size: 18px; margin: 4px 0 0; }
.mchest-prize { font-size: 20px; font-weight: 800; color: #b45309; background: #fff4d6; border-radius: 14px; padding: 8px 14px; display: inline-block; }
.mchest-prize[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) {
    .boss-icon, .boss.enter, .boss.laugh .boss-icon, .mchest-btn, .mchest-btn.wobble, .pet-tip-face { animation: none; }
}

.choices:has(.tile) { display: grid; grid-template-columns: repeat(2, minmax(0, 120px)); }

/* ================= Главная: пробная миссия и миры ================= */
.demo-wrap { margin: 0 auto 22px; max-width: 460px; }
.demo-title { text-align: center; font-size: 20px; margin: 0 0 10px; }
.demo { background: #fff; border-radius: 24px; overflow: hidden; box-shadow: 0 10px 30px rgba(29,35,64,.12); border: 3px solid #1d2340; }
.demo[hidden] { display: none; }
.demo-scene { position: relative; padding: 12px 14px 10px; display: grid; grid-template-columns: 1fr auto; gap: 6px 8px; align-items: center; }
.demo-place, .demo-stars { font-weight: 800; font-size: 14px; background: rgba(255,255,255,.8); border-radius: 99px; padding: 3px 10px; justify-self: start; }
.demo-stars { justify-self: end; }
.demo-track { grid-column: 1 / -1; position: relative; height: 40px; border-radius: 20px; background: rgba(255,255,255,.55);
              background-image: linear-gradient(90deg, rgba(255,255,255,.95) 50%, transparent 50%); background-size: 14px 4px;
              background-repeat: repeat-x; background-position: center; }
.demo-runner { position: absolute; left: 0; top: 2px; font-size: 30px; transition: left .7s cubic-bezier(.45,0,.25,1); }
.demo-goal { position: absolute; right: 6px; top: 3px; font-size: 28px; }
.demo-step { grid-column: 1 / -1; font-size: 13px; font-weight: 700; color: #1d4d47; text-align: center; }

.demo-body .question { font-size: 32px; margin: 10px 0 14px; }
.demo-body .question-text { font-size: 20px; }
.demo-body .boss { margin-top: 0; }
.demo-done { margin: 6px 0 0; }
.demo-end p { margin: 8px 0 12px; }
.demo-actions { justify-content: center; gap: 8px; }
.world-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-top: 10px; }
.world-tile { display: flex; align-items: center; gap: 8px; padding: 12px; border-radius: 16px; font-weight: 800; font-size: 15px; color: var(--ink); }
.world-tile i { font-style: normal; font-size: 30px; line-height: 1; background: rgba(255,255,255,.75); border-radius: 12px; width: 44px; height: 44px; display: grid; place-items: center; flex: none; }
.world-tile.scene-dark { color: #fff; }
@media (prefers-reduced-motion: reduce) { .demo-runner { transition: none; } }
.features + h2 { margin-top: 24px; }

/* ================= Правки по проверке дизайнера (2026-11-06) ================= */
.sound { position: absolute; background: none; border: 0; font-size: 22px; cursor: pointer; opacity: .7; min-width: 44px; min-height: 44px; top: 6px; right: 6px; }

.mchest-btn { margin-top: 18px; }
.demo-body { padding: 14px 14px 18px; text-align: center; min-height: 340px; }
.qbox { display: inline-block; width: .9em; height: 1.05em; vertical-align: -.18em; margin: 0 .08em; border: 3px dashed var(--accent);
        border-radius: 10px; background: var(--accent-soft, #eef0ff); }
/* страж уходит за левый край своей карточки, а не по тексту; на его месте — праздник */
@keyframes boss-flee { 25% { transform: rotate(-15deg) scale(1.15); } 100% { transform: translateX(-90px) rotate(-30deg) scale(.4); opacity: 0; } }
.boss .boss-icon.cheer { animation: cheer .5s cubic-bezier(.3,1.8,.5,1); opacity: 1; transform: none; }
@keyframes cheer { 0% { transform: scale(.3); } 100% { transform: scale(1); } }
.qbox.filled { width: auto; height: auto; padding: 0 .12em; vertical-align: baseline; border-style: solid; border-color: #1b8a45; background: #e3f7ea; color: #1b8a45; }

/* ================= Питомец: выбор, рост, наряды; выбор мира ================= */
.pet-face { position: relative; }
.pet-face .pet-body { display: block; line-height: 1; transition: font-size .4s; }
.pet-face.stage-0 .pet-body { font-size: 52px; }
.pet-face.stage-1 .pet-body { font-size: 46px; }
.pet-face.stage-2 .pet-body { font-size: 54px; }
.pet-face.stage-3 .pet-body { font-size: 60px; }
.pet-face.stage-4 .pet-body { font-size: 64px; filter: drop-shadow(0 0 6px rgba(255,200,61,.6)); }
.pet-face.stage-5 .pet-body { font-size: 66px; filter: drop-shadow(0 0 10px rgba(255,200,61,.95)); }
.pet-wear { position: absolute; left: 50%; transform: translateX(-50%); line-height: 1; pointer-events: none; }
.pet-wear.w-top { top: -6px; font-size: 30px; }
.pet-wear.w-mid { top: 32%; font-size: 26px; }
.pet-wear.w-low { bottom: 2px; font-size: 26px; }
.pet-face.egg-crack .pet-body { animation: egg-shake 1.2s ease-in-out infinite; }
@keyframes egg-shake { 0%, 60%, 100% { transform: none; } 70% { transform: rotate(-12deg); } 80% { transform: rotate(12deg); } 90% { transform: rotate(-6deg); } }
.pet-face.hatched .pet-body { animation: hatch .8s cubic-bezier(.3,1.8,.5,1); }
@keyframes hatch { 0% { transform: scale(.2) rotate(-30deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
.pet-kinds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }

.pet-kind:hover { border-color: var(--accent); }
.pet-wardrobe { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 10px; }
.pet-wardrobe summary { cursor: pointer; font-weight: 800; font-size: 16px; min-height: 44px; display: flex; align-items: center; }
.wears { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin-top: 6px; }
.wear { display: grid; gap: 2px; justify-items: center; padding: 8px 4px; border-radius: 16px; border: 3px solid var(--line); background: #fff;
        font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; min-height: 72px; text-align: center; }
.wear span { font-size: 28px; line-height: 1; }
.wear.selected { border-color: var(--accent); background: var(--accent-soft); }
.wear.locked { cursor: default; border-style: dashed; color: var(--muted); font-weight: 600; font-size: 12px; background: #f7f8fc; }

.world-pick.selected { border-color: #1d2340; box-shadow: 0 0 0 3px #fff inset; }
@media (prefers-reduced-motion: reduce) { .pet-face.egg-crack .pet-body, .pet-face.hatched .pet-body { animation: none; } }
.wear.locked span { font-size: 28px; opacity: .4; filter: grayscale(.6); }
.wear small { display: block; font-size: 11px; font-weight: 600; color: var(--muted); }

/* правки по проверке дизайнера: питомец и миры */
.pet-wear, .pet-wear.w-top, .pet-wear.w-mid, .pet-wear.w-low { top: -8px; right: -8px; left: auto; bottom: auto; transform: none; font-size: 24px;
    width: 36px; height: 36px; display: grid; place-items: center; background: #fff; border-radius: 50%; box-shadow: 0 2px 8px rgba(29,35,64,.18); }
.pet-stage { font-size: 14px; color: var(--muted); font-weight: 700; margin-top: -4px; }
.pet-rename { background: none; border: 0; cursor: pointer; padding: 2px; min-width: 44px; min-height: 44px; font-size: 18px; margin: -10px 0; }
.pet-kind.selected { border-color: var(--accent); background: var(--accent-soft); transform: scale(1.04); }
.pet-confirm { text-align: center; margin-top: 12px; }
.pet-confirm[hidden] { display: none; }
.pet-confirm p { font-weight: 700; margin: 0 0 8px; }
.wear.more { cursor: default; border-style: dashed; color: var(--muted); font-size: 12px; background: #f7f8fc; }
.world-switch summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.world-pick { border: 3px solid transparent; font: inherit; font-weight: 800; cursor: pointer; text-align: left; min-height: 64px; font-size: 14px; overflow-wrap: normal; hyphens: auto; }
.world-pick i { width: 36px; height: 36px; font-size: 24px; }

.pet-kind:focus-visible, .wear:focus-visible, .world-pick:focus-visible, .mchest-btn:focus-visible, .choice:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ================= Встреча у порога ================= */
html.hello-on, html.hello-on body { overflow: hidden; }
.hello { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; text-align: center; overflow: hidden; cursor: pointer;
         animation: hello-in .35s ease both; }
.hello[hidden] { display: none; }
.hello.bye { animation: hello-out .45s ease forwards; }
@keyframes hello-in { from { opacity: 0; } }
@keyframes hello-out { to { opacity: 0; transform: scale(1.06); } }
.hello-stage { position: relative; z-index: 2; padding: 24px; max-width: 420px; }
.hello-hero { font-size: 96px; line-height: 1; animation: hello-hero .9s cubic-bezier(.3,1.5,.5,1) both; filter: drop-shadow(0 10px 16px rgba(0,0,0,.2)); }
@keyframes hello-hero { 0% { transform: translateX(-120vw) rotate(-20deg); } 70% { transform: translateX(12px) rotate(4deg); } 100% { transform: none; } }
.hello-name { font-size: clamp(30px, 9vw, 44px); margin: 14px 0 12px; animation: hello-up .5s .45s ease both; }
.hello-talk { display: flex; gap: 12px; align-items: center; justify-content: center; animation: hello-up .5s .75s ease both; }
.hello-talk .pet-face { width: 72px; height: 72px; background: rgba(255,255,255,.85); border-radius: 22px; flex: none; animation: hello-pet .6s .8s cubic-bezier(.3,1.8,.5,1) both; }
.hello-say { margin: 0; background: #fff; color: var(--ink); border-radius: 18px; padding: 10px 14px; font-weight: 700; font-size: 17px; text-align: left;
             box-shadow: 0 6px 18px rgba(0,0,0,.12); position: relative; }
.hello-tap { margin: 18px 0 0; font-size: 14px; font-weight: 700; opacity: .75; animation: hello-up .5s 1.3s ease both; }
.hello.scene-dark .hello-name, .hello.scene-dark .hello-tap { color: #fff; }
@keyframes hello-up { from { opacity: 0; transform: translateY(14px); } }
@keyframes hello-pet { from { transform: scale(0) rotate(-20deg); } }
.hello-fall i { position: absolute; top: -40px; font-style: normal; font-size: 26px; animation: hello-fall linear infinite; opacity: .9; }
@keyframes hello-fall { to { transform: translateY(110vh) rotate(260deg); } }
/* ================= Письмо от взрослых ================= */
.letter { margin-bottom: 14px; }
.letter-env { width: 100%; display: flex; gap: 14px; align-items: center; text-align: left; font: inherit; cursor: pointer;
              background: linear-gradient(135deg, #fff6e0, #ffe3ec); border: 2px solid #ffc8d6; border-radius: 20px; padding: 14px 16px; color: var(--ink); }
.letter-env[hidden], .letter-paper[hidden] { display: none; }
.env-icon { font-size: 46px; line-height: 1; animation: env-wiggle 2.4s ease-in-out infinite; }
@keyframes env-wiggle { 0%, 80%, 100% { transform: none; } 85% { transform: rotate(-10deg) scale(1.08); } 90% { transform: rotate(10deg) scale(1.08); } }
.env-text { display: grid; gap: 2px; }
.env-text b { font-size: 18px; }
.env-text small { color: var(--muted); font-weight: 600; }
.letter-env.opening .env-icon { animation: env-open .55s ease forwards; }
@keyframes env-open { 50% { transform: scale(1.3) rotate(-8deg); } 100% { transform: scale(.2) translateY(-20px); opacity: 0; } }
.letter-paper { display: flex; gap: 12px; align-items: flex-start; background: #fffdf6; border-radius: 6px 20px 20px 20px; padding: 16px 18px;
                box-shadow: 0 6px 20px rgba(29,35,64,.1); border-left: 5px solid #ff9fbf; font-size: 18px; line-height: 1.45; }
.letter-paper span { font-size: 30px; line-height: 1; }
.letter-paper p { margin: 0; font-weight: 600; white-space: pre-line; }
.letter-paper.unfold { animation: unfold .6s cubic-bezier(.2,.9,.3,1.2); transform-origin: top; }
@keyframes unfold { from { transform: scaleY(.1); opacity: 0; } }
/* ================= Время суток ================= */
.tod-sky { position: absolute; top: 10px; left: 12px; font-size: 26px; line-height: 1; z-index: 1; pointer-events: none; }
.kid-hero.tod-evening::before, .hello.tod-evening::before { content: ''; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(180deg, rgba(255,140,60,.22), transparent 60%); }
.kid-hero.tod-night::before, .hello.tod-night::before { content: ''; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(180deg, rgba(30,30,90,.28), transparent 65%); }
.kid-hero.tod-morning::before, .hello.tod-morning::before { content: ''; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(180deg, rgba(255,230,150,.22), transparent 55%); }
/* ================= Главная: выбор мира для пробной миссии ================= */
.demo-ask { text-align: center; font-weight: 700; margin: 0 0 8px; color: var(--muted); }

.demo-worlds::-webkit-scrollbar { display: none; }
.demo-world { flex: none; display: grid; justify-items: center; gap: 2px; min-width: 64px; min-height: 64px; padding: 6px 8px; border-radius: 16px;
              border: 2px solid var(--line); background: #fff; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.demo-world span { font-size: 26px; line-height: 1; }
.demo-world.selected { border-color: var(--accent); background: var(--accent-soft); }
.demo-scene.scene-dark .demo-step { color: #fff; }
.demo.swap .demo-scene { animation: scene-new .7s ease; }
@media (prefers-reduced-motion: reduce) {
    .hello, .hello.bye, .hello-hero, .hello-name, .hello-talk, .hello-talk .pet-face, .hello-tap, .env-icon, .letter-paper.unfold { animation: none; }
    .hello-fall { display: none; }
}
.kid-hero.scene > .tod-sky { position: absolute !important; top: 10px; left: 12px; z-index: 1; }
.hello-fall { position: absolute; inset: 0; pointer-events: none; }
.demo-worlds { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 10px; scrollbar-width: none; flex-wrap: wrap; justify-content: center; overflow: visible; }

.kid-hero.scene::before { z-index: 0; }
.hello-tap { font-size: 16px; opacity: .9; }
.hello .scene-place { position: relative; margin-bottom: 10px; animation: hello-up .5s .2s ease both; }

/* ================= Напоминания от питомца ================= */

.notify-ask[hidden] { display: none; }
.notify-ask .na-face { font-size: 40px; line-height: 1; flex: none; }

.notify-ask small { color: var(--muted); font-weight: 600; }

.notify-ask.done { border-color: #9fe0b5; background: #effaf2; }
.tool-now { background: var(--accent-soft); font-weight: 700; font-size: 14px; border-radius: 12px; padding: 8px 12px; margin: 0 0 10px; }
.tool-now.ok { background: #e3f7ea; color: #1b8a45; }
.tool-now.wait { background: #fff4d6; color: #8a5a00; }
.tool-notify .mini-tile b { font-size: 15px; }
.tool-notify .mini-tiles { gap: 6px; }
.notify-ask { display: flex; gap: 12px; align-items: center; background: #fff; border: 2px solid #ffe08a; border-radius: 20px; padding: 12px 14px; margin-bottom: 14px; flex-wrap: wrap; }
.notify-ask .na-text { display: grid; gap: 2px; min-width: 0; flex: 1 1 180px; }
.notify-ask .btn { min-height: 44px; flex: 1 1 100%; }
/* ================= Крупный шрифт на телефоне (настройка «размер текста»): ничего не обрезаем и не выталкиваем ================= */
.kb-stats small { font-size: 11px; color: var(--muted); white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.15; }
.hero-card .hc-body b { font-size: 20px; white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: break-word; }
.map-row { list-style: none; margin: 0; padding: 0; display: grid; position: relative; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.node span, .node small { hyphens: auto; overflow-wrap: break-word; }
.pet-kind { display: grid; gap: 4px; justify-items: center; border-radius: 18px; border: 3px solid var(--line); background: #fff; font: inherit; font-weight: 700; cursor: pointer; min-height: 96px; font-size: 13px; overflow-wrap: normal; hyphens: auto; padding: 10px 2px; }
.pet-kind span { line-height: 1; font-size: 40px; max-width: 100%; }
.pet-kind, .wear, .world-pick, .grade-tile, .mini-tile span, .kb-stats span, .kc-stats span { grid-template-columns: minmax(0, 1fr); hyphens: auto; overflow-wrap: break-word; min-width: 0; }
.kb-stats b { overflow-wrap: anywhere; }
.tile, .tile span, .tiles > * { min-width: 0; overflow-wrap: break-word; hyphens: auto; }
.subj-tile > span { justify-items: start; text-align: left; align-items: center; gap: 2px 12px; padding: 12px 14px; grid-template-columns: auto minmax(0, 1fr) auto; }
.pill, .pill span { max-width: 100%; overflow-wrap: break-word; hyphens: auto; }
.hero-form, .hero-form .wstep, .card { min-width: 0; }

/* ================= Отзывы ================= */
.fb-card summary { cursor: pointer; font-weight: 800; font-size: 17px; display: flex; gap: 10px; align-items: center; min-height: 44px; }
.fb-card[open] summary { margin-bottom: 10px; }
.fb-moods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.fb-mood { cursor: pointer; }
.fb-mood input { position: absolute; opacity: 0; pointer-events: none; }
.fb-mood span { display: grid; justify-items: center; gap: 2px; padding: 10px 4px; border: 2px solid var(--line); border-radius: 16px; background: #fff;
                text-align: center; min-width: 0; overflow-wrap: break-word; hyphens: auto; }
.fb-mood b { font-size: 30px; line-height: 1; }
.fb-mood small { font-size: 12px; color: var(--muted); font-weight: 600; }
.fb-mood input:checked + span { border-color: var(--accent); background: var(--accent-soft); }
.fb-mood input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.fb-card textarea { width: 100%; font: inherit; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; margin-bottom: 10px; resize: vertical; }
.kid-mood { margin: 14px 0 6px; }
.kid-mood[hidden] { display: none; }
.kid-mood p { font-weight: 800; font-size: 18px; margin: 0 0 8px; }
.km-row { display: flex; gap: 12px; justify-content: center; }
.km-row button { font-size: 40px; line-height: 1; width: 68px; height: 68px; border-radius: 20px; border: 3px solid var(--line); background: #fff; cursor: pointer; }
.km-row button.picked { border-color: var(--accent); background: var(--accent-soft); transform: scale(1.12); }
.km-row button:disabled:not(.picked) { opacity: .4; }
.km-thanks { font-weight: 700; }

/* ================= Главы, финал, паспорт ================= */
.chapter-tag { display: inline-block; margin: 0 0 4px; padding: 3px 10px; border-radius: 99px; background: var(--accent-soft); font-weight: 800; font-size: 13px; }
.chapter-end { text-align: center; background: linear-gradient(170deg, #fff6d8, #fff 60%); border: 3px solid #ffd36b; }
.ce-trophy { font-size: 80px; line-height: 1; animation: trophy 1.8s ease-in-out infinite; filter: drop-shadow(0 8px 14px rgba(200,140,0,.3)); }
@keyframes trophy { 50% { transform: translateY(-6px) scale(1.05); } }
.chapter-end h2 { margin: 8px 0 6px; }
.ce-ask { font-weight: 800; font-size: 18px; margin: 14px 0 8px; }
.next-world span { display: grid; gap: 2px; text-align: left; }
.next-world small { font-size: 11px; font-weight: 600; opacity: .8; }
.passport { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-top: 10px; }
.stamp { display: grid; justify-items: center; gap: 2px; text-align: center; padding: 12px 8px; border-radius: 16px; border: 2px dashed #d6b46a;
         background: #fffaf0; transform: rotate(-1.5deg); min-width: 0; overflow-wrap: break-word; hyphens: auto; }
.stamp:nth-child(even) { transform: rotate(1.5deg); }
.stamp-icon { font-size: 38px; line-height: 1; }
.stamp b { font-size: 14px; }
.stamp small { font-size: 11px; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .ce-trophy { animation: none; } }
.next-world > span { background: none; }

/* ================= Карта знаний ================= */
.know { background: linear-gradient(170deg, #1d2350, #2d3a7a); color: #fff; }
.know h2 { color: #fff; }
.know .muted { color: rgba(255,255,255,.75); }
.kn-group { margin-top: 14px; }
.kn-group h3 { margin: 0 0 8px; font-size: 16px; color: #ffe9a8; }
.kn-stars { display: flex; flex-wrap: wrap; gap: 8px; }
.kn-star { display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px 6px 8px; border-radius: 99px; background: rgba(255,255,255,.08);
           border: 1.5px solid rgba(255,255,255,.18); font-size: 14px; font-weight: 600; color: rgba(255,255,255,.65); max-width: 100%; overflow-wrap: anywhere; }
.kn-star b { font-size: 18px; line-height: 1; flex: none; }
.kn-star.warm { color: #fff; border-color: rgba(255,217,102,.45); }
.kn-star.lit { color: #1d2350; background: linear-gradient(135deg, #ffe58a, #ffc83d); border-color: #ffd34d; box-shadow: 0 0 14px rgba(255,200,61,.55); }
.kn-mul { width: 100%; display: grid; gap: 6px; }
.kn-mul span { font-size: 14px; font-weight: 700; }
.kn-mul div { display: flex; gap: 6px; flex-wrap: wrap; }
.kn-num { font-style: normal; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; font-weight: 800;
          background: rgba(255,255,255,.08); border: 1.5px solid rgba(255,255,255,.2); color: rgba(255,255,255,.6); }
.kn-num.warm { color: #fff; border-color: rgba(255,217,102,.5); }
.kn-num.lit { background: radial-gradient(circle, #fff3b0, #ffc83d); color: #1d2350; border-color: #ffd34d; box-shadow: 0 0 12px rgba(255,200,61,.7); }
.mastered { margin-top: 8px; font-weight: 800; color: #b07800; background: #fff6d6; border-radius: 12px; padding: 8px 12px; }
.kn-parent h3.kn-p-subj { margin: 16px 0 6px; font-size: 16px; }
.kn-p-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(60px, 1fr) auto; gap: 8px; align-items: center; padding: 6px 0;
            border-bottom: 1px solid #f0f1f7; font-size: 14px; }
.kn-p-row > span { min-width: 0; overflow-wrap: break-word; hyphens: auto; }
.kn-p-row.sub { padding-left: 14px; font-size: 13px; }
.kn-p-row small { font-size: 12px; }
.kn-chip { font-style: normal; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 99px; white-space: nowrap; background: #f3f4f8; color: var(--muted); }
.kn-chip.ok { background: #e3f7ea; color: #1b8a45; }
.kn-chip.good { background: #eaf6ff; color: #1f6fb2; }
.kn-chip.mid { background: #fff4d6; color: #8a5a00; }
.kn-chip.hard { background: #fdecea; color: #c0392b; }
.kn-p-row .kn-chip.none { grid-column: 2 / 4; justify-self: start; }
@media (max-width: 420px) { .kn-p-row { grid-template-columns: minmax(0, 1fr) auto; } .kn-p-row .meter { grid-column: 1 / -1; grid-row: 2; } }

/* ================= Новогодний календарь ================= */
.advent { background: linear-gradient(170deg, #0f3d2e, #1d5c45); color: #fff; }
.advent h2 { color: #fff; }
.advent .muted { color: rgba(255,255,255,.8); }
.advent.soon { background: linear-gradient(170deg, #1d5c45, #2e7d5b); }

.adv-win small { position: absolute; bottom: 1px; right: 4px; font-size: 10px; opacity: .75; }

.adv-win.open { background: rgba(255,255,255,.95); color: var(--ink); border-color: #ffd34d; cursor: pointer; }
.adv-win .adv-wear { position: absolute; top: -6px; left: -4px; font-style: normal; font-size: 14px; }
.adv-win.future { opacity: .35; border-style: dashed; }
.adv-win.ready { cursor: pointer; background: linear-gradient(135deg, #c62828, #ef5350); border-color: #ffd34d; animation: adv-glow 1.6s ease-in-out infinite; }
.adv-win.ready.special { background: linear-gradient(135deg, #f9a825, #ffd54f); color: #5d3a00; }
.adv-win.sleep { cursor: pointer; background: rgba(255,255,255,.12); }
.adv-win.opening { animation: adv-open .5s ease forwards; }
@keyframes adv-glow { 50% { box-shadow: 0 0 12px rgba(255,211,77,.8); } }
@keyframes adv-open { 50% { transform: rotateY(90deg); } 100% { transform: none; } }
.adv-prize { margin-top: 12px; background: #fff; color: var(--ink); border-radius: 14px; padding: 10px 14px; font-weight: 700; line-height: 1.4; }
.adv-prize[hidden] { display: none; }
.wear.season { border-color: #2e7d5b; background: #eaf7f0; }
/* гирлянда на шапке ребёнка с 15 декабря по 10 января */
.kid-hero.xmas { border-top: 0; }
.kid-hero.scene > .garland { position: absolute !important; left: 0; right: 0; top: 0; height: 14px; z-index: 2; pointer-events: none; font-style: normal;
    background: radial-gradient(circle at 8px 6px, #ff5252 4px, transparent 5px) 0 0 / 32px 14px repeat-x,
                radial-gradient(circle at 24px 8px, #ffd54f 4px, transparent 5px) 0 0 / 32px 14px repeat-x,
                linear-gradient(#1b5e20, #1b5e20) 0 2px / 100% 2px no-repeat;
    animation: garland 1.4s steps(2) infinite; }
@keyframes garland { 50% { filter: hue-rotate(120deg) brightness(1.2); } }
@media (prefers-reduced-motion: reduce) { .adv-win.ready, .adv-win.opening, .kid-hero .garland { animation: none; } }
.adv-win { position: relative; aspect-ratio: 1; display: grid; place-items: center; border-radius: 12px; border: 2px solid rgba(255,255,255,.2); background: rgba(255,255,255,.08); color: #fff; font: inherit; font-weight: 800; font-size: 15px; padding: 0; min-width: 0; overflow: hidden; line-height: 1; }
.adv-win.open b { line-height: 1; font-size: min(22px, 5.5vw); }
.adv-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); margin-top: 10px; gap: 4px; }
.install { display: flex; align-items: center; gap: 12px; background: var(--card); border: 2px solid var(--sun); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 18px; flex-wrap: wrap; }
.install-text { display: grid; gap: 2px; font-size: 15px; line-height: 1.3; flex: 1 1 150px; min-width: 0; overflow-wrap: break-word; }
.install-close { background: none; border: 0; color: var(--muted); font-size: 18px; cursor: pointer; padding: 4px; align-self: flex-start; flex: none; }

/* ================= Вкладки экрана ребёнка ================= */

.kid-tabs[hidden] { display: none; }

.kid-tabs button b { font-size: 24px; line-height: 1; transition: transform .2s; }
.kid-tabs button.on { color: var(--ink); background: var(--accent-soft); }
.kid-tabs button.on b { transform: translateY(-2px) scale(1.12); }
.kid-tabs button:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.tab-dot { position: absolute; top: 6px; right: calc(50% - 20px); width: 10px; height: 10px; border-radius: 50%; background: #ff4d6d; box-shadow: 0 0 0 2px #fff; }
html.tabs-on body.kid { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
.tab-panel[hidden] { display: none !important; }
/* на вкладках кроме «Миссии» шапка короче — сразу видно содержимое */
html.tab-rest .kid-hero .kid-big-icon, html.tab-rest .kid-hero .level, html.tab-rest .kid-hero [data-f="tonext"], html.tab-rest .kid-hero .scene-deco { display: none; }
html.tab-rest .kid-hero { padding-bottom: 18px !important; }
html.tab-rest .kid-hero h1 { font-size: 26px; margin: 4px 0 6px; }
/* Во время миссии шапка компактная: задание и кнопка ответа помещаются на первом экране телефона (ТЗ, А5) */
body.solving .kid-hero .kid-big-icon, body.solving .kid-hero .level, body.solving .kid-hero [data-f="tonext"],
body.solving .kid-hero .scene-deco, body.solving .kid-hero .scene-place { display: none; }
body.solving .kid-hero { padding: 12px 16px 14px !important; margin-bottom: 10px; }
body.solving .kid-hero.scene::after { display: none; }
body.solving .kid-hero h1 { font-size: 22px; margin: 0 0 4px; }
/* ================= Питомец-спутник в миссии ================= */
.screen[data-screen="task"] { position: relative; }
.buddy { position: absolute; right: -4px; bottom: -6px; display: flex; align-items: flex-end; gap: 4px; pointer-events: none; z-index: 2; }
.buddy-face { font-size: 34px; line-height: 1; background: #fff; border-radius: 50%; width: 52px; height: 52px; display: grid; place-items: center;
              box-shadow: 0 4px 12px rgba(29,35,64,.15); }
.buddy-say { opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s; background: #fff; border: 2px solid #ffe08a; border-radius: 14px;
             padding: 4px 10px; font-weight: 800; font-size: 14px; margin-bottom: 30px; white-space: nowrap; box-shadow: 0 4px 10px rgba(29,35,64,.1); }
.buddy-say.on { opacity: 1; transform: none; }
.buddy.cheer .buddy-face { animation: buddy-jump .6s cubic-bezier(.3,1.6,.5,1); }
.buddy.worry .buddy-face { animation: buddy-worry .6s ease; }
.buddy.brave .buddy-face { animation: buddy-jump .5s ease 2; }
@keyframes buddy-jump { 40% { transform: translateY(-14px) scale(1.1); } }
@keyframes buddy-worry { 25% { transform: rotate(-12deg); } 75% { transform: rotate(12deg); } }
@media (prefers-reduced-motion: reduce) { .buddy .buddy-face { animation: none !important; } .kid-tabs button b { transition: none; } }

/* ================= Итог недели у родителя ================= */
.week-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 6px 0 10px; }
.week-tiles span { display: grid; gap: 2px; text-align: center; background: var(--accent-soft); border-radius: 14px; padding: 10px 4px; min-width: 0; }
.week-tiles b { font-size: 22px; line-height: 1.1; }
.week-tiles b small { font-size: 13px; color: var(--muted); }
.week-tiles em { font-style: normal; font-size: 11px; color: var(--muted); font-weight: 600; overflow-wrap: break-word; hyphens: auto; }
.week-card p { margin: 6px 0 0; font-size: 15px; }
@media (max-width: 420px) { .week-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Нарисованные питомцы (вместо эмодзи) ---------- */
.pet-img { display: block; width: 1.3em; height: 1.3em; object-fit: contain; }
.pet-face .pet-body .pet-img { width: 1.35em; height: 1.35em; }
.pet-kind span .pet-img { width: 64px; height: 64px; }
.kid-tabs button b .pet-img { width: 1.25em; height: 1.25em; display: inline-block; vertical-align: middle; }
.buddy-face, .pet-tip-face, .na-face { position: relative; }
.buddy-face .pet-img { width: 46px; height: 46px; }
.pet-tip-face .pet-img { width: 48px; height: 48px; }
.na-face .pet-img { width: 52px; height: 52px; }
.kb-stats b .pet-img { width: 1.4em; height: 1.4em; display: inline-block; vertical-align: middle; }
.pic-wear { position: absolute; right: -4px; top: -6px; font-size: 18px; line-height: 1; }
.hero-mascot { float: right; width: 110px; height: 110px; margin: -6px -4px 4px 8px; animation: mascot-wave 2.4s ease-in-out infinite; }
@keyframes mascot-wave { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg) translateY(-4px); } }
@media (min-width: 640px) { .hero-mascot { width: 170px; height: 170px; } }
@media (prefers-reduced-motion: reduce) { .hero-mascot { animation: none; } }

/* ---------- Игровая и «Гонка» (src/play.php, public/play.js) ---------- */

.play-room { background: linear-gradient(170deg, #fff1c2 0%, #ffd9e6 60%, #ddd8ff 100%); border: 3px solid var(--navy); }
.play-pet { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.play-pet-pic { flex: none; font-size: 64px; line-height: 1; }
.play-pet-pic .pet-img { width: 92px; height: 92px; }
.play-say { margin: 0; background: #fff; border: 3px solid var(--navy); border-radius: 18px 18px 18px 4px; padding: 10px 12px; font-weight: 700; font-size: 16px; min-width: 0; }
.play-room.locked { text-align: center; }
.play-room.locked .play-pet { text-align: left; }
.play-meter { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0 0 12px; font-weight: 800; font-size: 14px; }
.play-meter b { display: flex; gap: 3px; }
.play-meter i { font-style: normal; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 2px solid var(--navy); font-size: 14px; }
.play-meter i.full { background: var(--sun); }
.play-game { width: 100%; display: flex; gap: 12px; align-items: center; text-align: left; font: inherit; color: var(--ink); background: #fff;
    border: 3px solid var(--navy); border-radius: 22px; box-shadow: 0 5px 0 var(--navy); padding: 12px; margin-bottom: 12px; cursor: pointer;
    transition: transform 160ms var(--ease-out), box-shadow 160ms var(--ease-out); }
.play-game:active { transform: translateY(3px) scale(.98); box-shadow: 0 2px 0 var(--navy); }
.play-game:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.play-game.soon { opacity: .6; box-shadow: none; cursor: default; }
.pg-ic { width: 60px; height: 60px; flex: none; border-radius: 18px; border: 3px solid var(--navy); display: grid; place-items: center; font-size: 32px; background: #ffe27a; }
.play-game:nth-of-type(2) .pg-ic { background: #d9d2ff; }
.play-game.soon .pg-ic { background: #e8eaf3; }
.pg-t { display: grid; min-width: 0; flex: 1; }
.pg-t b { font-size: 18px; line-height: 1.2; }
.pg-t small { font-size: 13px; color: var(--muted); }
.pg-rec { flex: none; text-align: center; font-size: 11px; font-weight: 800; line-height: 1.1; color: var(--muted); }
.pg-rec b { display: block; font-size: 20px; color: var(--ink); }

.race-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.race-back { width: 44px; height: 44px; border-radius: 14px; background: #fff; border: 3px solid var(--navy); box-shadow: 0 3px 0 var(--navy); font-family: inherit; font-weight: 800; font-size: 24px; line-height: 1; color: var(--ink); cursor: pointer; }
.race-pill { background: #fff; border: 3px solid var(--navy); border-radius: 999px; padding: 4px 12px; font-weight: 800; font-size: 16px; font-variant-numeric: tabular-nums; }

.race-lane { position: relative; height: 48px; border-radius: 14px; background: #fff; border: 3px solid var(--navy); }
.race-lane.ghost-lane { background: #eef0f8; }
.race-lane::after { content: ""; position: absolute; right: 8px; top: 6px; bottom: 6px; width: 14px; border-radius: 3px; background: repeating-linear-gradient(0deg, var(--navy) 0 7px, #fff 7px 14px); }

.race-me, .race-ghost { position: absolute; left: 4px; bottom: 2px; line-height: 1; font-size: 40px; will-change: transform; }
.race-me { transition: transform 250ms var(--ease-out); }

.race-ghost { font-size: 34px; opacity: .55; }
.race-timer { height: 16px; border-radius: 99px; background: #fff; border: 3px solid var(--navy); overflow: hidden; margin-bottom: 14px; }
.race-timer i { display: block; height: 100%; background: linear-gradient(90deg, #2fb36a, var(--sun)); transform-origin: left; }
.race-card { background: #fff; border: 3px solid var(--navy); border-radius: 22px; box-shadow: 0 5px 0 var(--navy); padding: 14px; }
.race-q { font-size: 52px; font-weight: 900; text-align: center; margin: 4px 0 14px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.race-ans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.race-opt { font-family: inherit; font-weight: 900; font-size: 32px; line-height: 1; color: var(--ink); background: #fff; border: 3px solid var(--navy); border-radius: 20px; box-shadow: 0 5px 0 var(--navy);
    padding: 16px 0; cursor: pointer; touch-action: manipulation; transition: transform 120ms var(--ease-out), box-shadow 120ms var(--ease-out), background-color 120ms ease; }
.race-opt:active { transform: translateY(3px) scale(.97); box-shadow: 0 2px 0 var(--navy); }
.race-opt.hit, .race-opt.right { background: #c8f5d8; }
.race-opt.miss { background: #ffd6d6; }
.race-opt:disabled { opacity: .6; }
.race-combo { min-height: 1.4em; text-align: center; font-weight: 800; color: #c2410c; margin: 12px 0 0; }
.race-end { text-align: center; }
.race-end-pet { display: inline-block; font-size: 72px; line-height: 1; }
.race-end-pet .pet-img { width: 110px; height: 110px; }
.race-end h2 { font-size: 26px; margin: 6px 0; }
.race-rec { font-weight: 800; margin: 0 0 6px; }
.race-rec.new { color: #c2410c; font-size: 20px; }
.race-stars { font-size: 30px; font-weight: 900; margin: 4px 0; }
.race-note { color: var(--muted); margin: 4px 0; }
.race-miss { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 12px 0; }
.race-miss b { width: 100%; }
.race-miss span { background: #fff; border: 2px solid var(--navy); border-radius: 12px; padding: 4px 10px; font-weight: 800; white-space: nowrap; }
.race-end .btn { display: block; width: 100%; margin-top: 10px; }
@media (prefers-reduced-motion: reduce) {
    .race-me, .play-game, .race-opt { transition: none; }
    .race-ghost { display: none; }
}
.kid-tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; background: rgba(255,255,255,.97); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(29,35,64,.08); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); backdrop-filter: blur(6px); grid-template-columns: repeat(5, minmax(0, 1fr)); }
.kid-tabs button { position: relative; display: grid; justify-items: center; gap: 2px; font: inherit; font-weight: 700; color: var(--muted); background: none; border: 0; border-radius: 14px; min-height: 56px; cursor: pointer; min-width: 0; font-size: 11px; padding: 6px 0; overflow-wrap: normal; hyphens: auto; letter-spacing: -.01em; }
.race-track { display: grid; margin: 22px 0 14px; gap: 28px; margin-top: 28px; }

.race-me, .race-ghost { bottom: 4px; }
.race-me .pet-img { width: 52px; height: 52px; }
.race-lbl { position: absolute; font-size: 12px; font-weight: 800; white-space: nowrap; top: auto; bottom: calc(100% + 4px); line-height: 1.1; left: auto; right: 4px; }
.pg-ic img { width: 50px; height: 50px; }
.play-game:nth-of-type(3) .pg-ic { background: #c8f0c0; }

/* «Поймай букву» */

.lw-word .gap.done { background: #c8f5d8; border-style: solid; }
.lw-word .gap.was-miss { background: #ffd6d6; }
.lw-hint { text-align: center; font-size: 15px; color: var(--muted); margin: 0 0 8px; }
.lw-sky { position: relative; height: 300px; overflow: hidden; border-radius: 22px; border: 3px solid var(--navy);
    background: linear-gradient(180deg, #2a2f86 0%, #5a3fb0 70%, #8a5cd0 100%); touch-action: manipulation; }
.lw-count { position: absolute; inset: 0; display: grid; place-items: center; font-size: 64px; font-weight: 900; color: #fff; }
.lw-ball { position: absolute; top: 0; width: 22%; aspect-ratio: 1; max-width: 76px; border-radius: 50%; border: 3px solid #0c0f33; box-shadow: 0 4px 0 #0c0f33;
    font-family: inherit; font-weight: 900; font-size: 30px; color: var(--navy); cursor: pointer; padding: 0; touch-action: manipulation; will-change: transform; }
.lw-ball::after { content: ""; position: absolute; left: 50%; top: 100%; width: 2px; height: 22px; background: rgba(255,255,255,.6); }
.lw-ball.caught { opacity: 0; transition: opacity 200ms var(--ease-out); }

/* «Кто где живёт?» */

.hm-em { font-size: 76px; line-height: 1; }
.hm-name { font-size: 18px; text-align: center; overflow-wrap: anywhere; }

.hm-zone { display: grid; justify-items: center; gap: 4px; padding: 12px 4px; border-radius: 20px; border: 3px solid var(--navy); box-shadow: 0 4px 0 var(--navy);
    background: #fff; font: inherit; font-size: 14px; font-weight: 800; color: var(--ink); cursor: pointer; min-width: 0; overflow-wrap: normal; hyphens: auto;
    transition: transform 120ms var(--ease-out), box-shadow 120ms var(--ease-out); }
.hm-zone:active { transform: translateY(3px) scale(.97); box-shadow: 0 1px 0 var(--navy); }
.hm-zone.right { background: #c8f5d8; }
.hm-zone.miss { background: #ffd6d6; }
.hm-zone:disabled { cursor: default; }

.hm-fact { margin-top: 14px; background: #fff; border: 3px solid var(--navy); border-radius: 20px; padding: 12px 14px; font-size: 16px; }
.hm-fact .hm-next { display: block; width: 100%; margin-top: 12px; }
@media (prefers-reduced-motion: reduce) { .hm-zone, .lw-ball.caught { transition: none; } }
.hm-zones { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.hm-zone { display: flex; align-items: center; gap: 12px; padding: 8px 14px; font-size: 17px; text-align: left; justify-content: flex-start; }
.hm-zem { line-height: 1; font-size: 30px; }
.hm-animal { margin: 6px auto 10px; padding: 12px 8px 14px; border-radius: 28px; background: #fff; border: 3px solid var(--navy); box-shadow: 0 6px 0 var(--navy); display: grid; justify-items: center; gap: 4px; width: fit-content; min-width: 150px; max-width: 100%; }
.lw-word { display: flex; justify-content: center; margin: 6px 0 4px; flex-wrap: nowrap; gap: 3px; }

.lw-word .gap { background: #ffe27a; border-style: dashed; flex-grow: 1.7; max-width: 60px; }
.lw-word span { height: 46px; background: #fff; border: 3px solid var(--navy); display: grid; place-items: center; font-weight: 900; flex: 1 1 0; min-width: 0; max-width: 40px; padding: 0; font-size: clamp(15px, 5.6vw, 26px); border-width: 2px; border-radius: 9px; box-shadow: 0 2px 0 var(--navy); }

/* ---------- Нарисованные герои, стражи, трофеи миров (вместо эмодзи; размер как у эмодзи) ---------- */
.wart { display: inline-block; width: 1.25em; height: 1.25em; object-fit: contain; vertical-align: middle; }
.kid-big-icon .wart { width: 1.35em; height: 1.35em; }
.runner-face .wart { width: 1.3em; height: 1.3em; }
.boss-icon .wart { width: 1.4em; height: 1.4em; }
.ce-trophy .wart { width: 1.5em; height: 1.5em; }
.hello-hero .wart { width: 1.3em; height: 1.3em; }

/* ---------- Столбик (public/column.js) ---------- */
.col-open { display: block; margin: 10px auto 0; font: inherit; font-weight: 800; font-size: 16px; color: var(--ink); background: #fff4c2;
    border: 3px solid var(--navy); border-radius: 14px; box-shadow: 0 3px 0 var(--navy); padding: 8px 16px; cursor: pointer;
    transition: transform 120ms var(--ease-out), box-shadow 120ms var(--ease-out); }
.col-open:active { transform: translateY(2px) scale(.98); box-shadow: 0 1px 0 var(--navy); }
.col-open[hidden] { display: none; }
.col-box { margin-top: 10px; }

.col-grid > span { width: var(--cw); text-align: center; position: relative; }

.col-sign { color: #5a6080; }
.col-dot::before { content: ""; position: absolute; top: 0; left: 50%; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: #e8590c; }
.col-line { border-top: 3px solid var(--ink); height: 0; width: auto !important; margin: 2px 0 6px; }

.col-cell.act { border: 3px solid #3b4cf5; background: #eef0ff; box-shadow: 0 0 0 3px #c7cdfd; }
.col-cell.ok { border: 3px solid #2fb36a; background: #c8f5d8; }

.col-say { display: flex; gap: 8px; align-items: flex-end; margin-top: 10px; }
.col-pet { flex: none; font-size: 44px; line-height: 1; }
.col-pet img { width: 60px; height: 60px; display: block; }
.col-bubble { margin: 0; flex: 1; min-width: 0; background: #fff; border: 3px solid var(--navy); border-radius: 16px 16px 16px 4px; padding: 8px 12px;
    font-weight: 700; font-size: 16px; }
.col-pad { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.col-key { font-family: inherit; font-weight: 900; font-size: 26px; color: var(--ink); background: #fff; border: 3px solid var(--navy); border-radius: 14px;
    box-shadow: 0 4px 0 var(--navy); padding: 8px 0; cursor: pointer; touch-action: manipulation;
    transition: transform 100ms var(--ease-out), box-shadow 100ms var(--ease-out); }
.col-key:active { transform: translateY(3px) scale(.97); box-shadow: 0 1px 0 var(--navy); }
.col-back { display: block; margin: 12px auto 0; background: none; border: 0; color: var(--muted); font: inherit; font-size: 15px; text-decoration: underline; cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .col-open, .col-key { transition: none; } }

.col-d { font-variant-numeric: tabular-nums; font-size: 1em; line-height: 1.4em; }
.col-mark { color: #e8590c; font-size: .47em; height: 1.3em; line-height: 1.3em; }
.col-cell { margin: 0 2px; border: 3px dashed #9aa6c8; border-radius: 10px; background: #fffbe8; width: calc(var(--cw) - 4px) !important; font-size: .94em; height: 1.45em; line-height: 1.25em; }
.col-grid { display: grid; grid-auto-rows: auto; justify-content: center; font-weight: 800; color: var(--ink); font-size: 32px; --cw: min(1.32em, 14vw); }
.col-paper { display: flex; padding: 8px 0 12px; border-radius: 16px; border: 2px solid #cfe0f7; background-color: #fff; background-image: linear-gradient(#dbe7f8 1px, transparent 1px), linear-gradient(90deg, #dbe7f8 1px, transparent 1px); background-size: 22px 22px; overflow-x: auto; justify-content: safe center; }
/* деление уголком */
.col-div { grid-auto-rows: 1.4em; }
.col-div .col-d { line-height: 1.4em; }
.col-hl { background: #fff4c2; border-radius: 8px; }
.col-ul { box-shadow: inset 0 -3px 0 var(--ink); }
.col-grid > .col-vbar { width: auto !important; border-left: 3px solid var(--ink); justify-self: start; pointer-events: none; }
.col-grid > .col-hline { width: auto !important; border-top: 3px solid var(--ink); align-self: start; height: 0; pointer-events: none; }
.col-div .col-cell { height: 1.3em; margin: 2px 2px 0; line-height: 1.1em; }
.col-grid.col-div { font-size: 28px; --cw: min(1.2em, 9.6vw); }

/* ---------- «Лестница помощи» ---------- */
.help-ex { margin: 10px auto 0; max-width: 420px; text-align: left; background: #f1f6ff; border: 3px solid #3b4cf5; border-radius: 16px; padding: 10px 14px; color: var(--ink); }
.help-ex p { margin: 4px 0 0; font-size: 15px; }
.help-ex-q { font-size: 26px; font-weight: 900; margin: 4px 0; white-space: nowrap; }
.help-ex-you { font-weight: 800; color: #2a37c4; }

.rest-card p { margin: 6px 0 10px; font-weight: 700; }
.rest-card .btn { display: block; width: 100%; margin-top: 8px; }
.rest-face { display: inline-block; font-size: 56px; line-height: 1; }
.rest-face .pet-img { width: 84px; height: 84px; }
.rest-card { position: fixed; bottom: 84px; z-index: 60; width: min(92vw, 420px); background: #fff; border: 3px solid var(--navy); border-radius: 22px; box-shadow: 0 6px 0 var(--navy), 0 18px 40px rgba(29,35,64,.25); padding: 14px; text-align: center; left: 0; right: 0; margin: 0 auto; transform: none; animation: rest-in 250ms var(--ease-out) both; }
@keyframes rest-in { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .rest-card { animation: none; } }

/* ---------- Без красного (решение Владельца 2026-11-08): неверный ответ «засыпает», верный — светится ---------- */
:root { --ink: #1d2340; --muted: #6b7290; --bg: #f6f7fc; --card: #ffffff; --line: #e3e6f2; --brand: #3b4cf5; --brand-dark: #2a37c4; --sun: #ffc83d; --danger: #d64545; --radius: 18px; --accent: var(--brand); --accent-soft: #eceffe; --ease-out: cubic-bezier(0.23, 1, 0.32, 1); --navy: #1d2340; --sleep-bg: #eceaf6; --sleep-line: #cfcbe6; --sleep-ink: #8b86a8; --calm: #5b47c7; }
.feedback.bad { color: var(--calm); }
.choice { font: inherit; font-size: 20px; font-weight: 700; padding: 12px 18px; border-radius: 14px; cursor: pointer; border: 2.5px solid var(--line); background: #fff; color: var(--ink); transition: transform .08s; position: relative; }
.choice.no { background: var(--sleep-bg); border-color: var(--sleep-line); color: var(--sleep-ink); opacity: 1; }
.choice.no::after { content: "z Z"; position: absolute; right: -6px; top: -14px; font-size: 15px; font-weight: 900; color: #7c6fd6;
    transform: rotate(-12deg); animation: zz-float 1.8s ease-in-out infinite; pointer-events: none; }
@keyframes zz-float { 50% { transform: rotate(-12deg) translateY(-3px); } }
.choice.paw { background: #f1f8ff; border-color: #bcd6f5; color: #7c93b3; opacity: 1; }
.choice.paw::after { content: "🐾"; position: absolute; right: -10px; bottom: -12px; font-size: 20px; pointer-events: none; }
.choice.reveal { background: #e9fbf0; border-color: #2fb36a; color: #1d6b40; opacity: 1; box-shadow: 0 0 0 5px rgba(47,179,106,.18); animation: reveal-glow 1.6s ease-in-out 2; }
.choice.reveal::before { content: "✨"; position: absolute; left: -10px; top: -14px; font-size: 18px; pointer-events: none; }
@keyframes reveal-glow { 50% { box-shadow: 0 0 0 9px rgba(47,179,106,.12); } }
@media (prefers-reduced-motion: reduce) { .choice.no::after, .choice.reveal { animation: none; } }
/* игры и столбик — те же спокойные цвета */
.race-opt.miss, .hm-zone.miss, .lw-word .gap.was-miss { background: var(--sleep-bg); color: var(--sleep-ink); }
.lw-ball.miss { background: #d9d4f5 !important; }
.race-pill.hurry { background: #fff1c2; }
.col-cell.bad { border: 3px solid #f08c00; border-color: #9d90e0; background: var(--sleep-bg); }
.help-ex-box { display: inline-block; min-width: 1.6em; padding: 0 6px; border: 3px solid #3b4cf5; border-radius: 10px; background: #e3e7ff; text-align: center; }
/* уравнение: выбор действия перед столбиком */
.col-ops { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.col-op { font-family: inherit; font-weight: 900; font-size: 24px; color: var(--ink); background: #fff; border: 3px solid var(--navy); border-radius: 16px;
    box-shadow: 0 4px 0 var(--navy); padding: 14px 4px; cursor: pointer; position: relative; font-variant-numeric: tabular-nums;
    transition: transform 120ms var(--ease-out), box-shadow 120ms var(--ease-out); }
.col-op:active { transform: translateY(3px) scale(.97); box-shadow: 0 1px 0 var(--navy); }
.col-op.no { background: var(--sleep-bg); border-color: var(--sleep-line); color: var(--sleep-ink); box-shadow: none; }
.col-op.no::after { content: "z Z"; position: absolute; right: -6px; top: -14px; font-size: 15px; font-weight: 900; color: #7c6fd6; transform: rotate(-12deg); }
/* текстовая задача: «Что сделаем с числами?» */
.op-ask { margin: 10px auto 0; max-width: 420px; text-align: center; }
.op-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.op-btn { font-size: 18px; padding: 10px 6px; }

.op-ok { font-size: 22px; font-weight: 900; color: var(--ink); margin: 6px 0 0; white-space: normal; padding-right: 48px; }

/* ---------- Открытки с мест (src/places.php) ---------- */
.lv-card { margin: 8px 0 12px; background: #fffaf0; border: 2px dashed #e0b85a; border-radius: 14px; padding: 8px 12px; font-size: 15px; text-align: left; color: var(--ink); }
.levelup-box.scene-dark .lv-card { color: var(--ink); }

.pc { background: #fffaf0; border: 2px solid #f0dfb5; border-radius: 16px; padding: 10px; min-width: 0; }
.pc-ic { display: block; font-size: 30px; line-height: 1; margin-bottom: 4px; }
.pc b { display: block; font-size: 15px; overflow-wrap: anywhere; }
.pc p { margin: 4px 0 0; font-size: 13px; line-height: 1.35; color: #4a5070; }
.pc-next { background: #f3f2fa; border-style: dashed; border-color: #cfcbe6; }
.pc-next small { color: var(--muted); font-size: 12px; }
.postcards { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
/* «Живые открытки» */
.pc-sleep { background: #f3f2fa; border-color: #cfcbe6; }
.pc-sleep .pc-ic { filter: grayscale(.85); opacity: .6; }
.pc-wake { display: block; width: 100%; margin-top: 6px; font: inherit; font-size: 13px; font-weight: 700; color: var(--calm); background: #fff;
    border: 2px dashed #b8b0e6; border-radius: 12px; padding: 6px 8px; cursor: pointer; text-align: left; }
.pc-q { font-weight: 800; font-size: 13px; margin: 6px 0; color: var(--ink); }
.pc-opt { display: block; width: 100%; margin-top: 6px; font: inherit; font-size: 13px; font-weight: 700; color: var(--ink); background: #fff;
    border: 2px solid var(--navy); border-radius: 10px; padding: 6px 8px; cursor: pointer; text-align: left; position: relative; }
.pc-opt.no { background: var(--sleep-bg); border-color: var(--sleep-line); color: var(--sleep-ink); }
.pc-opt.no::after { content: "z Z"; position: absolute; right: 4px; top: -10px; font-size: 12px; font-weight: 900; color: #7c6fd6; }
.pc-fact { font-size: 12px; color: #4a5070; margin: 6px 0 0; }
.pc-live { background: #fffaf0; }
.pc-woke { animation: pc-wake 600ms var(--ease-out); }
@keyframes pc-wake { from { transform: scale(.96); box-shadow: 0 0 0 8px rgba(255,200,61,.5); } to { transform: none; box-shadow: none; } }
@media (prefers-reduced-motion: reduce) { .pc-woke { animation: none; } }
/* нарисованные места на карте и в открытках */
.node b .wart { width: 46px; height: 46px; }
.node.here b .wart { width: 50px; height: 50px; }
.node.locked b .wart { filter: none; }
.pc-ic .wart { width: 44px; height: 44px; }

/* ---------- Кабинет родителя: «Главное», «Как Ясмо помогает», свёрнутые настройки ---------- */
.main-card { border: 2px solid #c9d2ff; background: linear-gradient(180deg, #f3f5ff, #fff); }
.main-card p { margin: 0 0 8px; }
.help-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.help-list li { font-size: 15px; line-height: 1.45; }
details.tool > summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; flex-wrap: wrap; }
details.tool > summary::-webkit-details-marker { display: none; }
details.tool > summary::after { content: "›"; margin-left: auto; font-size: 22px; color: var(--muted); transition: transform 160ms var(--ease-out); }
details.tool[open] > summary::after { transform: rotate(90deg); }
details.tool > summary b { font-size: 17px; }
.tool-sum { color: var(--muted); font-size: 14px; min-width: 0; overflow-wrap: anywhere; }
details.tool[open] > summary { margin-bottom: 8px; }
.tools-hint { margin: -4px 0 8px; }
.kn-unmet { margin-top: 10px; }
.kn-unmet summary { cursor: pointer; color: var(--muted); font-size: 14px; }
@media (prefers-reduced-motion: reduce) { details.tool > summary::after { transition: none; } }
.sticker .wart { width: 1.6em; height: 1.6em; }

/* ---------- Главная (2026-11-08): «сначала — родителю», три обещания, день по шагам ---------- */
.home { max-width: 640px; margin: 0 auto; }
.home-hero { margin: 14px 0 0; padding: 18px 18px 20px; border-radius: 26px; border: 3px solid var(--ink);
             background: linear-gradient(170deg, #fff1c2 0%, #ffd9e6 60%, #ddd8ff 100%); }
.home-pet { display: flex; align-items: flex-end; gap: 6px; }
.home-pet-img { width: 128px; height: 128px; flex: none; transform-origin: 50% 100%; animation: home-pet-bob 3.2s var(--ease-out, ease-out) infinite; }
@keyframes home-pet-bob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-6px) rotate(-2deg); } }
.home-say { margin: 0 0 18px; background: #fff; border: 3px solid var(--ink); border-radius: 18px 18px 18px 4px;
            padding: 10px 12px; font-weight: 700; font-size: 16px; line-height: 1.35; min-width: 0; }
.home-hero h1 { font-size: clamp(30px, 7.4vw, 46px); line-height: 1.08; letter-spacing: -.5px; margin: 14px 0 10px; text-wrap: balance; }
.home-hero .lead { margin: 0; font-size: 17px; max-width: none; color: #4b4f6b; }
@media (prefers-reduced-motion: reduce) { .home-pet-img { animation: none; } }
.home-main { background: linear-gradient(180deg, #f3f5ff, #fff); border: 2px solid #c9d2ff; border-radius: 18px; padding: 14px 16px; }
.home-main-h { display: block; font-size: 17px; margin-bottom: 8px; }
.home-main p { margin: 0 0 6px; font-size: 15px; line-height: 1.45; }
.home-main p:last-child { margin: 0; }
.home-note { text-align: center; color: var(--muted); font-size: 13px; margin: 8px 0 0; }
.home-hero .btn-big { display: block; text-align: center; margin-top: 18px; }
.home-hero .home-note { color: #5d6180; }
.home-note.left { text-align: left; }
.day .home-main { margin-top: 10px; }
.home-sec { margin: 30px 0 0; }
.home-sec h2 { font-size: 24px; margin: 0 0 14px; }
.promise { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 16px; }
.promise img { width: 64px; height: 64px; flex: none; }
.promise b { display: block; font-size: 17px; margin-bottom: 3px; }
.promise span { color: var(--muted); font-size: 15px; line-height: 1.45; }
.day { list-style: none; counter-reset: day; margin: 0; padding: 0 0 0 40px; position: relative; }
.day::before { content: ""; position: absolute; left: 15px; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: #d8dcf0; }
.day li { counter-increment: day; position: relative; margin-bottom: 18px; }
.day li:last-child { margin-bottom: 0; }
.day li::before { content: counter(day); position: absolute; left: -40px; top: -2px; width: 32px; height: 32px; border-radius: 50%;
                  background: var(--brand); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: 15px; }
.day li > b { font-size: 17px; }
.day p { margin: 3px 0 0; font-size: 15px; line-height: 1.45; color: var(--muted); }
.day-pics { display: flex; gap: 8px; margin-top: 8px; }
.day-pics img { width: 58px; height: 58px; padding: 4px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.day-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; max-width: 280px; }
.day-opts span { background: #fff; border: 2px solid var(--line); border-radius: 12px; text-align: center; padding: 8px; font-weight: 800; font-size: 19px; }
.day-opts .zz { background: var(--sleep-bg); border-color: var(--sleep-line); color: var(--sleep-ink); }
.home .demo-wrap { margin-top: 34px; }
.home .demo-ask { text-align: center; }
.start { margin: 0 0 6px; padding-left: 22px; display: grid; gap: 8px; font-size: 15px; line-height: 1.45; }
.home-start .btn-big { display: block; text-align: center; margin-top: 16px; }

/* ---------- Главная: питомец на выбор, рост, шаги дня оживают (2026-11-08) ---------- */
.home-pet-img { cursor: pointer; }
.home-pet-img.hop { animation: home-hop 520ms var(--ease-out, ease-out); }
@keyframes home-hop { 0% { transform: translateY(0) scale(1); } 35% { transform: translateY(-14px) scale(1.05, .96); } 70% { transform: translateY(0) scale(.97, 1.03); } 100% { transform: none; } }
.home-say.pop { animation: home-say-pop 300ms var(--ease-out, ease-out); }
@keyframes home-say-pop { from { transform: scale(.94); opacity: .4; } to { transform: none; opacity: 1; } }
.pet-pick { display: flex; gap: 4px; margin-top: 10px; justify-content: space-between; max-width: 340px; }
.pet-pick-b { width: 46px; height: 46px; flex: none; padding: 2px; border-radius: 50%; border: 3px solid transparent; background: rgba(255,255,255,.75); cursor: pointer;
              transition: transform 160ms var(--ease-out, ease-out), border-color 160ms; }
.pet-pick-b img { width: 100%; height: 100%; display: block; }
.pet-pick-b:hover { transform: translateY(-2px); }
.pet-pick-b:active { transform: scale(.94); }
.pet-pick-b[aria-pressed="true"] { border-color: var(--ink); background: #fff; }
.pet-pick-b:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.home-sub { color: var(--muted); margin: -6px 0 12px; font-size: 15px; line-height: 1.45; }
.grow-row { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; align-items: end; }

.grow-row img { width: 100%; height: auto; max-width: 96px; display: block; margin: 0 auto; }
.grow-row li:nth-child(1) img { width: 58%; } .grow-row li:nth-child(2) img { width: 70%; } .grow-row li:nth-child(3) img { width: 82%; } .grow-row li:nth-child(4) img { width: 92%; }
.grow-row b { display: block; font-size: 13px; margin-top: 4px; }
.grow-row small { display: block; font-size: 12px; color: var(--muted); }
.grow-row li {
    text-align: center;
    opacity: 0;
    transform: translateY(14px) scale(.9);
    transition: opacity 400ms var(--ease-out, ease-out), transform 400ms var(--ease-out, ease-out);
    transition-delay: calc(var(--i) * 110ms);
}
.grow-row.in li { opacity: 1; transform: none; }
/* шаги дня: линия заполняется, питомец идёт вниз, шаги зажигаются */
.day::after { content: ""; position: absolute; left: 15px; top: 10px; width: 3px; border-radius: 3px; background: var(--brand);
              height: calc((100% - 20px) * var(--p, 0)); }
.day.still::after { height: calc(100% - 20px); }
.day.anim > li:not(.day-walker) { opacity: .35; transition: opacity 400ms var(--ease-out, ease-out); }
.day.anim > li.lit { opacity: 1; }
.day.anim > li:not(.day-walker)::before { transform: scale(.8); transition: transform 300ms var(--ease-out, ease-out), background 300ms; background: #b9bfe0; }
.day.anim > li.lit::before { transform: none; background: var(--brand); }
.day-walker { position: absolute !important; left: -4px; top: calc((100% - 40px) * var(--p, 0)); margin: 0 !important; z-index: 2; pointer-events: none; }
.day > li.day-walker::before { display: none; }
.day > li.day-walker { counter-increment: none; }
.day-walker img { width: 40px; height: 40px; display: block; filter: drop-shadow(0 3px 4px rgba(29,35,64,.25)); }
.day:not(.anim) .day-walker { display: none; }
.demo-tryerr { text-align: center; margin: -2px 0 10px; font-size: 14px; color: var(--calm); font-weight: 700; }
@media (prefers-reduced-motion: reduce) {
    .home-pet-img.hop, .home-say.pop { animation: none; }
    .grow-row li { opacity: 1; transform: none; transition: none; }
}
.day > li:not(.day-walker)::before { z-index: 1; }

/* ---------- К контрольной и освоенные трудные темы (2026-11-09) ---------- */
.focus-date { display: grid; gap: 6px; margin: 4px 0 12px; font-weight: 700; font-size: 15px; }
.focus-date input { max-width: 220px; font: inherit; padding: 8px 10px; border: 2px solid var(--line); border-radius: 12px; }
.test-card { border: 2px solid #c9d2ff; background: linear-gradient(180deg, #f3f5ff, #fff); }
.test-card h2 { font-size: 19px; margin: 0 0 8px; }
.test-card p { margin: 0 0 6px; font-size: 15px; line-height: 1.45; }
.chip.soft.done { background: #e3f7ea; color: #1b6b3a; }
.weak-eased { margin: 6px 0 0; }

/* ---------- «Часы питомца» (2026-11-09) ---------- */
.play-game:nth-of-type(4) .pg-ic { background: #ffd2c2; }
.ck-say { display: flex; gap: 10px; align-items: center; margin: 4px 0 8px; }
.ck-say p { margin: 0; background: #fff; border: 3px solid var(--navy); border-radius: 18px 18px 18px 4px; padding: 8px 12px; font-weight: 700; font-size: 16px; line-height: 1.35; min-width: 0; }
.ck-pet { flex: none; font-size: 44px; line-height: 1; }
.ck-pet .pet-img { width: 60px; height: 60px; }
.ck-wrap { display: grid; place-items: center; }
.ck-face { width: min(220px, 60vw); height: auto; }
.ck-rim { fill: #fff; stroke: var(--navy); stroke-width: 6; }
.ck-tick { stroke: #9aa0bf; stroke-width: 1.5; }
.ck-tick.big { stroke: var(--navy); stroke-width: 3; }
.ck-num { font-weight: 800; font-size: 20px; font-family: inherit; text-anchor: middle; fill: var(--ink); }
.ck-h, .ck-m, .ck-ghost { stroke-linecap: round; }
.ck-h { stroke: #3b4cf5; stroke-width: 9; }
.ck-m { stroke: #f08c00; stroke-width: 5; }
.ck-ghost { opacity: 0; }
.show-ghost .ck-ghost { opacity: .45; }
.ck-gh { stroke: #2fb36a; stroke-width: 9; }
.ck-gm { stroke: #2fb36a; stroke-width: 5; }
.ck-dot { fill: var(--navy); }
.ck-legend { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 6px; font-size: 13px; color: var(--muted); margin: 4px 0 10px; }
.ck-legend i { display: inline-block; width: 22px; height: 6px; border-radius: 3px; }
.ck-legend i.h { background: #3b4cf5; width: 14px; height: 8px; }
.ck-legend i.m { background: #f08c00; margin-left: 8px; }
.ck-opt { font-size: 28px; padding: 14px 4px; font-variant-numeric: tabular-nums; }
.ck-ctl { display: grid; gap: 10px; }
.ck-row { display: grid; grid-template-columns: 64px 1fr 64px; align-items: center; gap: 8px; }
.ck-lbl { text-align: center; font-weight: 800; font-size: 17px; }
.ck-btn { height: 56px; font-weight: 900; font-size: 24px; line-height: 1; font-family: inherit; color: var(--ink); background: #fff; border: 3px solid var(--navy); border-radius: 18px; box-shadow: 0 4px 0 var(--navy); cursor: pointer; }
.ck-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--navy); }
.ck-row:first-child .ck-btn { background: #e3e6ff; }
.ck-row:nth-child(2) .ck-btn { background: #ffe9c7; }
.ck-done { display: block; width: 100%; margin-top: 2px; }

/* ---------- Таблица умножения сеткой; «Сам или помоги?» (2026-11-09, идеи из проекта брата) ---------- */
.mul-grid { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 3px; max-width: 420px; }
.mg-h { display: grid; place-items: center; font-size: 12px; font-weight: 800; color: var(--muted); }
.mg-c { aspect-ratio: 1; min-width: 0; padding: 0; border: 0; border-radius: 7px; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.mg-c.firm, .mg-legend .firm { background: #bfe8c9; color: #17603a; }
.mg-c.almost, .mg-legend .almost { background: #ffe39a; color: #6b4a00; }
.mg-c.again, .mg-legend .again { background: #ffc9a8; color: #7a3410; }
.mg-c.none, .mg-legend .none { background: #eef0f6; color: #a3a8bf; }
.mg-c.on { outline: 3px solid var(--navy, #1d2340); outline-offset: 1px; }
.mg-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 13px; color: var(--muted); margin: 10px 0 6px; }
.mg-legend i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; margin-right: -6px; }
.mg-info { margin: 0; font-size: 15px; min-height: 1.4em; }
.self-help { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 8px 54px 0 0; } /* справа — место для питомца-помощника */
.self-help .sh-btn { font-size: 17px; }

/* ---------- «Смекалка» и «Запомни и напечатай» (2026-11-09) ---------- */
.play-game:nth-of-type(5) .pg-ic { background: #cfe9ff; }
.play-game:nth-of-type(6) .pg-ic { background: #ffd9ec; }
.sq-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; margin: 8px 0 16px; }
.sq-n {
    min-width: 0;
    height: 52px;
    padding: 0 2px;
    font-size: 20px !important;
    border-radius: 14px;
    background: #fff;
    border: 3px solid var(--navy);
    box-shadow: 0 3px 0 var(--navy);
    display: grid;
    place-items: center;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}
.sq-n.gap { background: #ffe27a; border-style: dashed; }
.sq-n.gap.done { background: #c8f5d8; border-style: solid; }
.tp-show { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin: 10px 0 8px; min-height: 52px; }
.tp-show span { min-width: 30px; height: 48px; padding: 0 4px; border-radius: 12px; background: #fff; border: 3px solid var(--navy); display: grid; place-items: center; font-weight: 900; font-size: 24px; }
.tp-show span.ok { background: #c8f5d8; }
.tp-show span.bad { background: #ffe27a; }
.tp-bar { height: 10px; border-radius: 99px; background: #fff; border: 3px solid var(--navy); overflow: hidden; margin: 0 0 14px; }
.tp-bar i { display: block; height: 100%; background: linear-gradient(90deg, #2fb36a, var(--sun)); transform-origin: left; }
.tp-form { display: grid; gap: 10px; }
.tp-input { font: inherit; font-size: 26px; font-weight: 800; text-align: center; padding: 12px; border: 3px solid var(--navy); border-radius: 18px; background: #fff; }
.tp-form[hidden], .tp-show[hidden], .self-help[hidden] { display: none; }

/* ---------- Значки за достижения — полка медалей (2026-11-09, вариант А) ---------- */
.badges { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 8px; margin-bottom: 18px; }
@media (min-width: 560px) { .badges { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.bg { display: grid; justify-items: center; align-content: start; gap: 4px; text-align: center; min-width: 0; }
.bg-pic { width: 72px; height: 72px; display: grid; place-items: center; }
.bg-pic img { width: 100%; height: 100%; object-fit: contain; filter: grayscale(1); opacity: .45; }
.bg.got .bg-pic img { filter: none; opacity: 1; }
.bg b { font-size: 13px; line-height: 1.2; overflow-wrap: anywhere; color: var(--muted); }
.bg.got b { color: var(--ink); }
.bg-bar { width: 70%; height: 6px; border-radius: 3px; background: #e6e8f2; overflow: hidden; }
.bg-bar i { display: block; height: 100%; background: var(--sun); border-radius: 3px; }
.bg-n { font-size: 11px; color: var(--muted); }
.first-check { border: 2px solid #ffe08a; background: linear-gradient(180deg, #fff8e1, #fff); }
.first-check h2 { font-size: 19px; margin: 0 0 8px; }
.first-check p { margin: 0 0 6px; font-size: 15px; line-height: 1.45; }

/* Главная: мягкие цветные пятна по краям (вариант А, выбор Владельца 2026-11-13). Без красного; пятна стоят на месте при прокрутке.
   На узком экране краёв нет — пятна бледнее, чтобы не мешать тексту. */
body.home-page {
    background:
        radial-gradient(700px 520px at 6% 18%, rgba(255, 224, 138, .85) 0%, rgba(255, 224, 138, 0) 70%),
        radial-gradient(700px 600px at 96% 30%, rgba(214, 208, 255, .85) 0%, rgba(214, 208, 255, 0) 70%),
        radial-gradient(800px 600px at 10% 90%, rgba(201, 240, 220, .85) 0%, rgba(201, 240, 220, 0) 70%),
        radial-gradient(700px 500px at 92% 95%, rgba(255, 224, 200, .8) 0%, rgba(255, 224, 200, 0) 70%),
        #faf8f3;
    background-attachment: fixed;
}
@media (max-width: 760px) {
    body.home-page {
        background:
            radial-gradient(420px 320px at 0% 10%, rgba(255, 224, 138, .5) 0%, rgba(255, 224, 138, 0) 70%),
            radial-gradient(420px 360px at 100% 60%, rgba(214, 208, 255, .5) 0%, rgba(214, 208, 255, 0) 70%),
            #faf8f3;
        background-attachment: scroll; /* на телефонах fixed-фон дёргается */
    }
}

/* Главная: строка про бесплатную проверку и почту (письмо с vc.ru 2026-11-14: «на главной о проверке ни слова, написать некуда») */
.home-trial { margin: 12px 0 0; padding: 10px 14px; background: rgba(255, 255, 255, .7); border: 1px dashed #b9b4e8; border-radius: 12px;
    font-size: 14px; line-height: 1.45; color: #3d4160; text-align: center; }
.home-trial a { color: #3b48e8; font-weight: 600; }
