/* ============================================================
   BODY PROTOCOL — детский режим (ТЗ-37)
   Свой экран поверх приложения: крупно, ярко, одно действие на экран.
   Шрифт от 20px, кнопки от 64px — под палец ребёнка 6–8 лет.
   ============================================================ */
/* Темы. Ребёнок выбирает сам (kids-rewards.js → body[data-kid-theme]);
   по умолчанию «Солнышко» — светлая и тёплая. Фигурки упражнений
   берут цвет из темы (--kfig), у родителя остаются прежними. */
:root, body[data-kid-theme="sun"] {
  --kid-bg: #fff6e6; --kid-bg-2: #ffe2b3;
  --kid-card: rgba(255, 255, 255, .88); --kid-line: rgba(120, 72, 0, .14);
  --kid-text: #3b2400; --kid-muted: #8a6634;
  --kid-btn: #ff8a00; --kid-btn-ink: #ffffff; --kid-err: #d23c3c;
  --kid-hi: #ffe7b8; --kid-hi-line: #ffb347;
  --kfig: #ff7a00; --kfig-far: #ffb870; --kfig-prop: #3a9be0;
}
body[data-kid-theme="sea"] {
  --kid-bg: #e8f5ff; --kid-bg-2: #bfe2ff;
  --kid-card: rgba(255, 255, 255, .9); --kid-line: rgba(10, 70, 130, .14);
  --kid-text: #0b2e4f; --kid-muted: #4d6f8f;
  --kid-btn: #1d8cf8; --kid-btn-ink: #ffffff; --kid-err: #d23c3c;
  --kid-hi: #d3ebff; --kid-hi-line: #6fb6ff;
  --kfig: #1572d3; --kfig-far: #84bdf3; --kfig-prop: #ff8a00;
}
body[data-kid-theme="forest"] {
  --kid-bg: #effaea; --kid-bg-2: #cdeec1;
  --kid-card: rgba(255, 255, 255, .9); --kid-line: rgba(20, 90, 30, .14);
  --kid-text: #183d16; --kid-muted: #4f7a4a;
  --kid-btn: #2fa84f; --kid-btn-ink: #ffffff; --kid-err: #d23c3c;
  --kid-hi: #dcf3d2; --kid-hi-line: #7fcf8f;
  --kfig: #23863e; --kfig-far: #95d6a2; --kfig-prop: #ff8a00;
}
body[data-kid-theme="candy"] {
  --kid-bg: #fff0f7; --kid-bg-2: #ffd3ea;
  --kid-card: rgba(255, 255, 255, .9); --kid-line: rgba(150, 20, 80, .14);
  --kid-text: #4a0f31; --kid-muted: #9a4f78;
  --kid-btn: #ff3d8b; --kid-btn-ink: #ffffff; --kid-err: #c4232e;
  --kid-hi: #ffe0ef; --kid-hi-line: #ff8fc0;
  --kfig: #e0307a; --kfig-far: #f7a3c9; --kfig-prop: #7a5cff;
}
body[data-kid-theme="space"] {
  --kid-bg: #120c2e; --kid-bg-2: #24124f;
  --kid-card: rgba(255, 255, 255, .08); --kid-line: rgba(255, 255, 255, .1);
  --kid-text: #ffffff; --kid-muted: #d6cff5;
  --kid-btn: #ffb01f; --kid-btn-ink: #1a1000; --kid-err: #ff8a8a;
  --kid-hi: #3b2a80; --kid-hi-line: #8f7cff;
  --kfig: #ffd04d; --kfig-far: #c9861f; --kfig-prop: #8fd8ff;
}

/* Взрослое приложение у ребёнка не показывается вовсе */
body.kid-mode #app,
body.kid-mode #nav,
body.kid-mode #rest-mini,
body.kid-mode #rest-overlay,
body.kid-mode #sync-badge { display: none !important; }
body.kid-mode { background: var(--kid-bg); }

.kid-screen {
  position: fixed; inset: 0; z-index: 900;
  overflow-y: auto;
  padding: max(20px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
  background: radial-gradient(120% 80% at 50% 0%, var(--kid-bg-2) 0%, var(--kid-bg) 70%);
  color: var(--kid-text);
  font-size: 20px; line-height: 1.35;
  display: flex; flex-direction: column;
}
/* Приглашение — поверх всего, включая экран входа */
.kid-invite { z-index: 2000; }

.kid-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.kid-hello { font-size: 26px; font-weight: 800; }
.kid-stars {
  flex: 0 0 auto; padding: 8px 14px; border-radius: 999px;
  background: var(--kid-card); font-weight: 800; font-size: 20px;
}

.kid-center {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 14px; max-width: 460px; width: 100%; margin: 0 auto;
}
.kid-big-emoji { font-size: 96px; line-height: 1; }
.kid-h { font-size: 30px; font-weight: 800; }
.kid-p { color: var(--kid-muted); font-size: 21px; }

.kid-btn {
  width: 100%; min-height: 72px; margin-top: 18px;
  border: 0; border-radius: 24px;
  background: var(--kid-btn); color: var(--kid-btn-ink);
  font: inherit; font-size: 26px; font-weight: 800;
  box-shadow: 0 6px 0 rgba(0, 0, 0, .35);
  cursor: pointer;
}
.kid-btn:active { transform: translateY(3px); box-shadow: 0 3px 0 rgba(0, 0, 0, .35); }
.kid-btn:disabled { opacity: .6; }
.kid-err { color: var(--kid-err); font-size: 18px; }

/* ---------- Фигурка упражнения (kids-data.js) ---------- */
.kid-fig { display: block; overflow: visible; }
.kid-fig path, .kid-fig line { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.kid-fig .kbody { stroke: #ffd04d; stroke-width: 7; }
.kid-fig .knear { stroke: #ffd04d; stroke-width: 5.5; }
.kid-fig .kfar { stroke: #c9861f; stroke-width: 5; }
.kid-fig .kh { fill: #ffd04d; }
.kid-screen .kid-fig .kbody, .kid-screen .kid-fig .knear { stroke: var(--kfig); }
.kid-screen .kid-fig .kfar { stroke: var(--kfig-far); }
.kid-screen .kid-fig .kh { fill: var(--kfig); }
.kid-screen .kid-fig .kp { stroke: var(--kfig-prop); }
.kid-screen .kid-fig .kfloor { stroke: var(--kid-line); }
.kid-fig .kfloor { stroke: rgba(255, 255, 255, .22); stroke-width: 1.5; }
.kid-fig .kp { stroke: #8fd8ff; stroke-width: 2.2; }
.kid-fig .kp.dash { stroke-dasharray: 2 2; }
.kid-fig .kball { fill: #ff6b8b; }

/* Библиотека у родителя */
.kid-lib { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.kid-lib-item { background: var(--panel-2); border: 1px solid var(--stroke); border-radius: 16px; padding: 8px 10px 10px; cursor: pointer; }
.kid-lib-item .kid-fig { width: 100%; height: auto; aspect-ratio: 1; background: #1a1240; border-radius: 12px; }
.kid-lib-item .name { margin-top: 6px; font-weight: 700; font-size: .9rem; }
.kid-lib-item .sub { color: var(--muted); font-size: .78rem; }
.kid-ex-hero { background: #1a1240; border-radius: 18px; padding: 8px; }
.kid-ex-hero .kid-fig { width: 100%; height: auto; max-width: 320px; margin: 0 auto; }
.kid-task { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--stroke); }
.kid-task .kid-fig { flex: 0 0 auto; background: #1a1240; border-radius: 10px; }
.kid-task .grow { flex: 1; min-width: 0; }

/* ---------- Экран ребёнка (kids-play.js) ---------- */
:where(.kid-screen button) { font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }
.kid-streak { margin-top: 6px; color: var(--kid-btn); font-weight: 800; }
.kid-progress { display: flex; align-items: center; gap: 12px; margin: 16px 0 10px; font-weight: 800; }
.kid-bar { flex: 1; height: 16px; border-radius: 99px; background: var(--kid-card); overflow: hidden; }
.kid-bar i { display: block; height: 100%; border-radius: 99px; background: var(--kid-btn); transition: width .4s; }
.kid-list { display: flex; flex-direction: column; gap: 8px; }
.kid-item {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 72px; padding: 8px 12px;
  border: 0; border-radius: 20px; background: var(--kid-card); text-align: left; cursor: pointer;
}
.kid-item .kid-fig { flex: 0 0 auto; }
.kid-item.done { opacity: .62; }
.kid-mark { font-size: 26px; width: 32px; text-align: center; }
.kid-item-txt { display: flex; flex-direction: column; min-width: 0; }
.kid-item-txt b { font-size: 21px; }
.kid-item-txt span { color: var(--kid-muted); font-size: 17px; }
.kid-allset { margin-top: 18px; padding: 18px; border-radius: 20px; background: var(--kid-card); text-align: center; font-size: 24px; font-weight: 800; }
.kid-btn.ghost { background: var(--kid-card); color: var(--kid-text); box-shadow: none; }

.kid-taskbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 800; color: var(--kid-muted); }
.kid-back { width: 56px; height: 56px; border: 0; border-radius: 18px; background: var(--kid-card); font-size: 28px; cursor: pointer; }
.kid-hero { display: flex; justify-content: center; margin-top: 4px; }
.kid-hero .kid-fig { width: min(240px, 62vw); height: auto; }
.kid-name { text-align: center; font-size: 28px; font-weight: 800; margin-top: 4px; }
.kid-screen > .kid-p { text-align: center; }
.kid-count { text-align: center; font-size: 30px; font-weight: 800; color: var(--kid-muted); margin: 6px 0; }
.kid-count b { font-size: 64px; color: var(--kid-text); display: inline-block; }
.kid-count b.bump { animation: kidBump .25s ease-out; }
@keyframes kidBump { 40% { transform: scale(1.35); color: var(--kid-btn); } }
.kid-plus {
  width: 100%; min-height: 120px; border: 0; border-radius: 32px; margin-top: 4px;
  background: var(--kid-btn); color: var(--kid-btn-ink); font-size: 56px; font-weight: 900;
  box-shadow: 0 8px 0 rgba(0, 0, 0, .35); cursor: pointer; touch-action: manipulation;
}
.kid-plus:active { transform: translateY(4px); box-shadow: 0 4px 0 rgba(0, 0, 0, .35); }
.kid-row { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; }
.kid-link { border: 0; background: none; color: var(--kid-muted); font-size: 18px; padding: 14px 6px; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.kid-screen > .kid-link, .kid-center > .kid-link { display: block; margin: 8px auto 0; }

.kid-ring { position: relative; width: 190px; height: 190px; margin: 6px auto; }
.kid-ring svg { display: block; }
.kid-ring b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 60px; font-weight: 900; }
.kid-ring .kr-bg { fill: none; stroke: var(--kid-card); stroke-width: 12; }
.kid-ring .kr-fg { fill: none; stroke: var(--kid-btn); stroke-width: 12; stroke-linecap: round; transition: stroke-dashoffset .2s linear; }

.kid-fails { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 24px; }
.kid-fail {
  display: flex; flex-direction: column; align-items: center; gap: 8px; min-height: 140px; padding: 16px 8px;
  border: 0; border-radius: 24px; background: var(--kid-card); font-size: 21px; font-weight: 800; cursor: pointer;
}
.kid-fail span { font-size: 56px; line-height: 1; }
.kid-tip { margin: 10px 0 4px; padding: 16px; border-radius: 20px; background: var(--kid-card); font-size: 22px; text-align: center; }
.kid-pop { animation: kidPop .35s ease-out; }
@keyframes kidPop { from { transform: scale(.85); opacity: 0; } }

.kid-confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 950; }
.kid-confetti span { position: absolute; top: -40px; animation: kidFall 2.6s ease-in forwards; }
@keyframes kidFall { to { transform: translateY(110vh) rotate(540deg); } }
@media (prefers-reduced-motion: reduce) {
  .kid-confetti, .kid-count b.bump, .kid-pop { animation: none; }
}
.kid-news { width: 100%; margin-top: 12px; padding: 14px 16px; border: 0; border-radius: 20px; background: #2e7d4f; color: #fff; font-weight: 800; font-size: 19px; text-align: left; cursor: pointer; }

/* ---------- Ребёнок у родителя (kids-parent.js) ---------- */
.kid-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.kid-sum > div { background: var(--panel-2); border: 1px solid var(--stroke); border-radius: 16px; padding: 12px 8px; text-align: center; }
.kid-sum b { display: block; font-size: 1.15rem; }
.kid-sum span { color: var(--muted); font-size: .75rem; }
.kid-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.kid-cal > span { text-align: center; color: var(--muted); font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; }
.kc { position: relative; aspect-ratio: 1; border: 0; border-radius: 10px; font: inherit; font-size: .85rem; font-weight: 700; color: #fff; cursor: pointer; }
.kc.all { background: #2e8b57; }
.kc.part { background: #c89b1a; color: #1a1000; }
.kc.none { background: #a83a3a; }
.kc.wait { background: var(--panel-2); border: 1px dashed var(--stroke-hi); color: var(--text); }
.kc.rest { background: var(--panel-2); color: var(--muted); }
.kc.fut { background: transparent; color: var(--muted-2); cursor: default; }
.kc.today { outline: 2px solid var(--volt); outline-offset: 1px; }
.kc i { position: absolute; top: 2px; right: 4px; font-style: normal; color: #ffd04d; font-size: .7rem; }
.kid-cal-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 8px; color: var(--muted); font-size: .75rem; }
.kid-cal-legend .kc { width: 14px; height: 14px; aspect-ratio: auto; border-radius: 4px; cursor: default; margin-left: 6px; }
.kid-week-row { display: flex; gap: 10px; padding: 7px 0; border-top: 1px solid var(--stroke); font-size: .88rem; }
.kid-week-row b { flex: 0 0 26px; text-transform: uppercase; color: var(--muted); font-size: .75rem; padding-top: 2px; }
.kid-week-row span { flex: 1; min-width: 0; }
.kid-ed-day { display: flex; align-items: center; justify-content: space-between; }
.kid-ed-day .chip-btn { padding: 3px 10px; font-size: .66rem; }
.kid-stepper { display: flex; align-items: center; gap: 6px; }
.kid-stepper .btn { flex: 1; padding-left: 0; padding-right: 0; }
.kid-stepper b { flex: 1.2; text-align: center; font-size: 1.8rem; }

/* ---------- Чат (kids-chat.js) ---------- */
.chat-day { text-align: center; color: var(--muted); font-size: .72rem; margin: 10px 0 6px; }
.chat-msg { max-width: 82%; margin: 4px 0; padding: 8px 12px; border-radius: 16px; background: var(--panel-2); border: 1px solid var(--stroke); }
.chat-msg.mine { margin-left: auto; background: rgba(var(--acc-rgb), .16); border-color: rgba(var(--acc-rgb), .35); border-bottom-right-radius: 6px; }
.chat-msg.theirs { margin-right: auto; border-bottom-left-radius: 6px; }
.chat-text { white-space: pre-wrap; word-break: break-word; }
.chat-meta { margin-top: 2px; font-size: .68rem; color: var(--muted); text-align: right; }
.chat-ref { font-size: .7rem; color: var(--muted); margin-bottom: 2px; }
.chat-empty { color: var(--muted); text-align: center; padding: 18px 8px; font-size: .9rem; }
.chat-box { max-height: 46vh; overflow-y: auto; padding: 4px 2px; }
.chat-badge { display: inline-block; padding: 1px 8px; border-radius: 99px; background: var(--volt); color: var(--volt-ink); font-size: .72rem; font-weight: 800; }
.chat-input-row { display: flex; gap: 8px; align-items: flex-end; }
.chat-input-row textarea { flex: 1; min-width: 0; resize: none; }
.chat-input-row .btn { flex: 0 0 auto; width: auto; }

/* Чат на экране ребёнка: крупнее, ярче, кнопки быстрых ответов */
.kid-top-r { display: flex; align-items: center; gap: 8px; }
.kid-chat-btn { position: relative; width: 52px; height: 52px; border: 0; border-radius: 18px; background: var(--kid-card); font-size: 26px; cursor: pointer; }
.kid-chat-btn i { position: absolute; top: -4px; right: -4px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 99px; background: #ff5a7a; color: #fff; font-style: normal; font-size: 14px; font-weight: 900; line-height: 22px; }
.kid-msg-card { display: block; width: 100%; margin-top: 12px; padding: 14px 16px; border: 0; border-radius: 20px; background: var(--kid-card); text-align: left; font-size: 19px; cursor: pointer; }
.kid-msg-card.new { background: var(--kid-hi); box-shadow: 0 0 0 2px var(--kid-hi-line) inset; }
.kid-chat { flex: 1; padding: 10px 0; font-size: 20px; }
.kid-chat .chat-msg { background: var(--kid-card); border: 0; border-radius: 20px; padding: 10px 14px; }
.kid-chat .chat-msg.mine { background: var(--kid-btn); color: var(--kid-btn-ink); }
.kid-chat .chat-msg.mine .chat-meta, .kid-chat .chat-msg.mine .chat-ref { color: var(--kid-btn-ink); opacity: .75; }
.kid-chat .chat-meta, .kid-chat .chat-ref, .kid-chat .chat-day { color: var(--kid-muted); font-size: 14px; }
.kid-chat .chat-empty { color: var(--kid-muted); font-size: 20px; }
.kid-quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.kid-quick-btn { min-height: 60px; border: 0; border-radius: 18px; background: var(--kid-card); font-size: 18px; font-weight: 800; cursor: pointer; padding: 6px; }
.kid-quick-btn:active { transform: scale(.96); }
.kid-chat-row { position: sticky; bottom: 0; display: flex; gap: 8px; padding: 10px 0 0; background: var(--kid-bg); }
.kid-chat-row input { flex: 1; min-width: 0; height: 60px; padding: 0 16px; border: 0; border-radius: 20px; background: #fff; color: #1a1040; font: inherit; font-size: 20px; }
.kid-send { flex: 0 0 60px; height: 60px; border: 0; border-radius: 20px; background: var(--kid-btn); color: var(--kid-btn-ink) !important; font-size: 26px; cursor: pointer; }
/* Кнопка-ссылка «Открыть в приложении» выглядит как обычная кнопка */
a.kid-btn { display: flex; align-items: center; justify-content: center; text-decoration: none; box-sizing: border-box; }
.kid-small { font-size: 16px; }

/* ---------- Награды, замок, настройки ребёнка (kids-rewards.js) ---------- */
.kid-rw-btn { display: block; width: 100%; margin-top: 14px; min-height: 60px; border: 0; border-radius: 20px; background: var(--kid-card); font-size: 20px; font-weight: 800; cursor: pointer; }
.kid-gear { display: block; margin: 18px auto 0; width: 44px; height: 44px; border: 0; border-radius: 14px; background: transparent; color: var(--kid-muted); font-size: 22px; opacity: .55; cursor: pointer; }
.kid-rw-top { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.kid-rw-top > div { padding: 14px; border-radius: 20px; background: var(--kid-card); text-align: center; }
.kid-rw-top b { display: block; font-size: 30px; }
.kid-rw-top span { color: var(--kid-muted); font-size: 16px; }
.kid-gift { margin-top: 12px; padding: 16px; border-radius: 22px; background: var(--kid-hi); box-shadow: 0 0 0 2px var(--kid-hi-line) inset; }
.kid-gift.done { background: #2e7d4f; }
.kid-gift-h { font-size: 22px; font-weight: 800; margin-bottom: 10px; }
.kid-gift-p { margin-top: 8px; color: var(--kid-muted); font-size: 18px; }
.kid-gift.done, .kid-gift.done .kid-gift-p { color: #fff; }
.kid-sub-h { font-size: 22px; margin: 18px 0 8px; }
.kid-stickers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.kid-sticker { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border-radius: 18px; background: var(--kid-card); text-align: center; }
.kid-sticker span { font-size: 40px; line-height: 1.1; }
.kid-sticker b { font-size: 14px; font-weight: 700; }
.kid-sticker.locked { opacity: .45; }
.kid-sticker.locked b { font-weight: 500; color: var(--kid-muted); }
.kid-new-st { font-size: 34px; vertical-align: middle; }
.kid-lock-input { width: 160px; height: 64px; border: 0; border-radius: 18px; text-align: center; font: inherit; font-size: 32px; font-weight: 800; color: #1a1040; background: #fff; }
.kid-set { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.kid-set-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 60px; padding: 0 16px; border: 0; border-radius: 18px; background: var(--kid-card); font-size: 19px; text-align: left; cursor: pointer; }
.kid-set-row b { color: var(--kid-muted); font-weight: 700; font-size: 16px; text-align: right; }
.kid-set-row.danger { color: var(--kid-err); justify-content: center; }
.kc.sick { background: #4a6fa5; }
.kid-rem-all { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.kid-rem-all input { flex: 0 0 auto; width: 110px; }
.kid-rem-all .btn { flex: 1; font-size: .72rem; padding-left: 8px; padding-right: 8px; }
.kid-rem-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid var(--stroke); }
.kid-rem-row i { color: var(--muted); font-style: normal; font-size: .8rem; }
.kid-rem-row input { width: 120px; }

/* Два вида упражнения рядом: сбоку и спереди */
.kid-views { display: flex; justify-content: center; gap: 6px; width: 100%; }
.kid-views figure { flex: 1 1 0; min-width: 0; margin: 0; text-align: center; }
.kid-views .kid-fig { width: 100%; height: auto; max-width: 240px; margin: 0 auto; }
.kid-views figcaption { margin-top: -4px; font-size: 14px; color: var(--kid-muted, var(--muted)); }
.kid-ex-hero .kid-views figcaption { font-size: .75rem; color: #c9c2ee; }

/* Светлые темы: карточки с тонкой рамкой, чтобы не растворялись в фоне */
.kid-screen .kid-item, .kid-screen .kid-rw-btn, .kid-screen .kid-quick-btn, .kid-screen .kid-fail,
.kid-screen .kid-set-row, .kid-screen .kid-sticker, .kid-screen .kid-rw-top > div, .kid-screen .kid-back,
.kid-screen .kid-msg-card, .kid-screen .kid-chat-btn, .kid-screen .kid-tip, .kid-screen .kid-allset,
.kid-screen .kid-stars, .kid-screen .kid-chat .chat-msg.theirs, .kid-screen .kid-btn.ghost {
  box-shadow: 0 0 0 1px var(--kid-line) inset;
}
.kid-chat-row input { box-shadow: 0 0 0 1px var(--kid-line) inset; }
/* Молния взрослого приложения — поверх детского экрана */
body.kid-mode #confetti { z-index: 960; }

/* Выбор темы и праздника */
.kid-themes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.kid-theme { position: relative; min-height: 96px; padding: 12px; border: 0; border-radius: 22px; text-align: left; font-size: 19px; font-weight: 800; cursor: pointer; }
.kid-theme span { display: block; font-size: 30px; }
.kid-theme.on { outline: 4px solid var(--kid-btn); outline-offset: 2px; }
.kid-parties { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 10px; }
.kid-party { min-height: 64px; border: 0; border-radius: 18px; background: var(--kid-card); font-size: 19px; font-weight: 800; cursor: pointer; }
.kid-party.on { background: var(--kid-btn); color: var(--kid-btn-ink); }
.kid-row2 { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 14px; }
.kid-row2 .kid-rw-btn { margin-top: 0; }
.kid-theme-btn { min-width: 64px; min-height: 60px; border: 0; border-radius: 20px; background: var(--kid-card); font-size: 26px; cursor: pointer; }
/* Календарь вперёд: будущий день с заданиями и «особый день» */
.kc.fut { cursor: pointer; }
.kc.fut.plan { background: var(--panel-2); color: var(--text); border: 1px solid var(--stroke); }
.kc u { position: absolute; bottom: 2px; right: 4px; text-decoration: none; font-size: .62rem; color: var(--volt); font-weight: 800; }
.kc.special { box-shadow: 0 0 0 2px var(--volt) inset; }
.kid-cal-legend .kc.special { background: transparent; }

/* ---------- Питание (kids-food.js) ---------- */
.kid-meals { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.kid-meal { display: flex; flex-direction: column; gap: 6px; min-height: 92px; padding: 10px 12px; border: 0; border-radius: 20px; background: var(--kid-card); text-align: left; cursor: pointer; }
.kid-meal-h { font-size: 18px; font-weight: 800; }
.kid-meal-h b { float: right; font-size: 22px; }
.kid-meal-dishes { font-size: 26px; letter-spacing: 2px; }
.kid-meal.st-all { box-shadow: 0 0 0 3px #2fa84f inset; }
.kid-meal.st-part { box-shadow: 0 0 0 3px #f2b705 inset; }
.kid-meal.st-none { opacity: .6; }
.kid-dishes { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin: 14px 0; }
.kid-dish { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border-radius: 18px; background: var(--kid-card); text-align: center; font-size: 16px; font-weight: 700; box-shadow: 0 0 0 1px var(--kid-line) inset; }
.kid-dish span { font-size: 44px; line-height: 1; }
.kid-food-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.kid-food-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 104px; padding: 10px 4px; border: 0; border-radius: 22px; background: var(--kid-card); font-size: 17px; font-weight: 800; cursor: pointer; box-shadow: 0 0 0 1px var(--kid-line) inset; }
.kid-food-btn span { font-size: 42px; line-height: 1; }
.kid-food-btn.on { background: var(--kid-btn); color: var(--kid-btn-ink); }

/* Родитель: меню и отметки дня */
.kid-food-row { display: grid; grid-template-columns: 96px 1fr; gap: 2px 10px; padding: 7px 0; border-top: 1px solid var(--stroke); font-size: .86rem; }
.kid-food-row i { grid-column: 2; font-style: normal; color: var(--muted); font-size: .78rem; }
.kid-menu-meal { padding: 6px 0; border-top: 1px solid var(--stroke); }
.kid-menu-meal > b { display: block; font-size: .8rem; color: var(--muted); margin-bottom: 4px; }
.kid-menu-items { display: flex; flex-wrap: wrap; gap: 6px; }
.kid-menu-items .chip-btn { width: auto; padding: 5px 10px; font-size: .74rem; }
.kid-dish-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
.kid-dish-pick { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border: 1px solid var(--stroke); border-radius: 14px; background: var(--panel-2); color: var(--text); font: inherit; font-size: .74rem; cursor: pointer; }
.kid-dish-pick span { font-size: 28px; }

/* ---------- Медали дня ---------- */
.kid-medal-line { margin: 4px 0 10px; padding: 10px 14px; border-radius: 16px; background: var(--kid-card); font-size: 17px; font-weight: 700; box-shadow: 0 0 0 1px var(--kid-line) inset; }
.kid-medal-line.gold { background: #ffe9a8; color: #5a3d00; box-shadow: 0 0 0 2px #f2b705 inset; }
.kid-medal-big { font-size: 140px; animation: kidSpin 1.2s ease-out; }
@keyframes kidSpin { from { transform: scale(.3) rotate(-30deg); } 60% { transform: scale(1.15) rotate(8deg); } }
.kid-shelf { margin-top: 12px; padding: 14px; border-radius: 22px; background: var(--kid-card); box-shadow: 0 0 0 1px var(--kid-line) inset; }
.kid-shelf-h { font-size: 19px; font-weight: 800; margin-bottom: 8px; }
.kid-shelf-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.kid-shelf-days span { display: flex; flex-direction: column; align-items: center; font-size: 22px; line-height: 1.1; }
.kid-shelf-days i { font-style: normal; font-size: 11px; opacity: .6; }
.kid-shelf-p { margin-top: 10px; padding: 10px 12px; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--stroke); }
.kid-shelf-p .kid-shelf-h { font-size: .9rem; margin-bottom: 6px; }
.kid-shelf-p .kid-shelf-days span { font-size: 16px; }
.kid-shelf-p .kid-shelf-days i { font-size: 9px; color: var(--muted); }
.kc s { position: absolute; top: 1px; left: 3px; text-decoration: none; font-size: .7rem; line-height: 1; }
.kid-medal-p { margin: 4px 0 8px; font-weight: 800; }
@media (prefers-reduced-motion: reduce) { .kid-medal-big { animation: none; } }

/* ---------- Подарок-сюрприз (kids-gift.js) ---------- */
.kid-giftbox-card { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; margin-top: 12px; padding: 16px; border: 0; border-radius: 24px;
  background: linear-gradient(135deg, #ff6fb1, #ffb01f); color: #fff; text-align: center; cursor: pointer; box-shadow: 0 8px 20px rgba(255, 111, 177, .35); }
.kid-giftbox-card b { font-size: 21px; }
.kid-giftbox-card span:last-child { font-size: 17px; opacity: .95; }
.kid-giftbox { display: inline-block; font-size: 58px; line-height: 1; animation: kidShake 1.6s ease-in-out infinite; }
.kid-giftbox.big { font-size: 140px; cursor: pointer; }
.kid-giftbox.opening { animation: kidOpen .9s ease-in forwards; }
@keyframes kidShake { 0%, 60%, 100% { transform: rotate(0); } 65% { transform: rotate(-12deg) scale(1.05); } 72% { transform: rotate(12deg) scale(1.08); } 79% { transform: rotate(-8deg); } 86% { transform: rotate(6deg); } }
@keyframes kidOpen { 0% { transform: scale(1); } 40% { transform: scale(1.25) rotate(-10deg); } 70% { transform: scale(.9) rotate(10deg); } 100% { transform: scale(2.2); opacity: 0; } }
.kid-gift-title { font-size: 30px; font-weight: 900; color: var(--kid-btn); margin: 4px 0 8px; }
@media (prefers-reduced-motion: reduce) { .kid-giftbox, .kid-giftbox.opening { animation: none; } }
