/* Стиль «Лесная книжка на картоне». Токены — из дизайн-системы «Думка»:
   https://claude.ai/artifact/DFBDgy7HXNz2Fz3pK6PzBs */
@import url("https://fonts.googleapis.com/css2?family=PT+Serif:wght@700&family=Nunito:wght@400;700;800&display=swap");

:root {
  --paper: #fff8e7;
  --paper-deep: #f1ead2;
  --card: #ffffff;
  --kraft: #e4d6b5;
  --kraft-line: #d8c9a3;
  --ink: #2f3a2a;
  --muted: #5e6650;
  --forest: #2f5d34;
  --vowel: #d0392f;
  --consonant: #2a5fb8;
  --go: #3e8e41;
  --go-deep: #2a6b2d;
  --go-tint: #edf7e6;
  --sun: #ffb300;
  --sun-deep: #c68400;
  --hill: #b7d6a3;
  --hill-far: #cfe3bf;
  --miss: #c62828;
  --miss-tint: #ffecec;
  --record: #b84300;
  --avatar-fox: #ffe9d6;
  --avatar-leaf: #e3f2e1;
  --avatar-sky: #e8eefc;
  --font-serif: "PT Serif", Georgia, serif;
  --font-sans: "Nunito", "Segoe UI", Arial, sans-serif;
}

/* Фон страницы: бумага сверху, к низу темнее; холмы и лес — декор позади всего */
html {
  min-height: 100%;
  background: linear-gradient(var(--paper) 0, var(--paper) 55%, var(--paper-deep) 100%) fixed;
}
body::before, body::after, html::before, html::after {
  content: '';
  position: fixed;
  z-index: -1;
  pointer-events: none;
}
body::before { left: -80px; bottom: -110px; width: 380px; height: 300px; border-radius: 50%; background: var(--hill); opacity: .55; }
body::after { right: 200px; bottom: -150px; width: 520px; height: 300px; border-radius: 50%; background: var(--hill-far); opacity: .6; }
html::before { content: '🌲'; left: 40px; bottom: 120px; font-size: 80px; }
html::after { content: '🍄'; left: 120px; bottom: 60px; font-size: 52px; }
@media (max-width: 900px) { html::before, html::after { display: none; } }

h1, h2 { font-family: var(--font-serif); }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 700;          /* весь сайт жирным Nunito — тонкий текст первокласснику читать хуже */
  background: transparent;
  color: var(--ink);
  user-select: none;
}
button, input { font-weight: inherit; }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  font-size: 26px;
}
.topbar a { text-decoration: none; color: var(--muted); }
.stars { font-weight: bold; display: flex; align-items: center; gap: 14px; }
.reset-btn {
  font-size: 17px;
  font-weight: bold;
  padding: 7px 16px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(#ff8a65, #f4511e);
  color: #fff;
  box-shadow: 0 4px 0 #bf360c;
  cursor: pointer;
  transition: transform .1s, filter .15s;
}
.reset-btn:hover { filter: brightness(1.08); }
.reset-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #bf360c; }
.reset-btn .ico { display: inline-block; transition: transform .4s; }
.reset-btn:hover .ico { transform: rotate(-180deg); }

/* Окно подтверждения */
.modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.modal {
  background: #fff;
  border-radius: 28px;
  padding: 30px 40px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .2);
  font-size: 26px;
}
.modal .big { font-size: 64px; }
.modal p { margin: 10px 0 24px; }
.modal .buttons { display: flex; gap: 16px; justify-content: center; }

h1 { text-align: center; font-size: 44px; margin: 10px 0 30px; }

.vowel { color: var(--vowel); }
.consonant { color: var(--consonant); }

/* Не больше 4 плиток в ряду: 8 игр — ровно два ряда; меню чтения целиком помещается в экран ноутбука */
.menu {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  max-width: calc(4 * 210px + 3 * 16px);
  margin: 0 auto;
  padding: 0 20px;
}
.tile {
  width: 210px;
  height: 130px;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 6px 0 var(--kraft);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--ink);
  font-size: 20px;
  font-weight: bold;
  text-align: center;
  transition: transform .15s;
}
.tile:hover { transform: translateY(-4px); }
.tile .icon { font-size: 46px; margin-bottom: 6px; }
@media (max-width: 640px) { .menu { gap: 14px; padding: 0 16px; } .tile { width: calc(50% - 7px); height: 120px; font-size: 18px; } .tile .icon { font-size: 40px; } }
.tile.soon { opacity: .45; pointer-events: none; }

.big-btn {
  font-family: var(--font-sans);
  font-size: 26px;
  font-weight: 800;
  padding: 14px 34px;
  border: none;
  border-radius: 20px;
  background: var(--go);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 5px 0 var(--go-deep);
}
.big-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--go-deep); }
.big-btn.secondary { background: var(--sun); color: var(--ink); box-shadow: 0 5px 0 var(--sun-deep); }

.hidden { display: none !important; }

/* Карточки ответов (игры 2 и 3) */
.game { display: flex; flex-direction: column; align-items: center; }
.progress { font-size: 22px; color: var(--muted); margin-bottom: 10px; }
/* Задание в игре — книжный заголовок, как на макете */
.task { font-family: var(--font-serif); font-size: 40px; font-weight: 700; color: var(--ink); text-align: center;
        min-height: 36px; margin-bottom: 24px; }
.cards { display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; margin: 20px 0; }
.card {
  min-width: 170px;
  height: 170px;
  padding: 0 16px;
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 6px 0 var(--kraft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 96px;
  font-weight: bold;
  cursor: pointer;
  border: 5px solid transparent;
}
.card:hover { transform: translateY(-3px); }
.card.right { border-color: var(--go); background: var(--go-tint); }
.card.wrong { animation: shake .4s; opacity: .4; pointer-events: none; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-12px); }
  75% { transform: translateX(12px); }
}

.card.shake { animation: shake .4s; }

.fading { opacity: 0; }
.cards, .word, .picture, .slots { transition: opacity .3s; }

.finish, .intro { text-align: center; font-size: 40px; margin-top: 40px; }
.finish .big, .intro .big { font-size: 120px; }
.intro h1 { margin: 10px 0 30px; }
.big-btn:disabled { background: #9e9e9e; box-shadow: 0 5px 0 #757575; cursor: default; }

.help-btn { font-size: 22px; background: none; border: none; color: var(--muted); cursor: pointer; }

/* Вход родителя */
.login { text-align: center; margin: -10px auto 30px; max-width: 640px; color: var(--muted); font-size: 20px; }
.login-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.login-btn {
  font-size: 20px;
  padding: 12px 24px;
  border-radius: 14px;
  border: 2px solid #ddd;
  background: #fff;
  cursor: pointer;
}
.login-btn.google b { color: #4285f4; }
.login-btn:disabled { opacity: .5; cursor: default; }
.link-btn { background: none; border: none; color: var(--consonant); font-size: inherit; cursor: pointer; text-decoration: underline; }
#account { font-size: 18px; }

/* Разделы меню */
.section { text-align: center; font-family: var(--font-serif); font-size: 30px; color: var(--forest); margin: 20px 0 12px; }
.menu + .section { margin-top: 24px; }
body { padding-bottom: 40px; }

/* Уровни */
.levels { display: flex; gap: 10px; justify-content: center; align-items: center; margin: 0 0 28px; font-size: 24px; color: var(--muted); }
.level-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 3px solid var(--kraft);
  background: #fff;
  font-size: 24px;
  font-weight: bold;
  color: var(--muted);
  cursor: pointer;
}
.level-btn.active { border-color: var(--go); background: var(--go); color: #fff; }
.finish .buttons { display: flex; gap: 20px; justify-content: center; }
.voice-btn {
  height: 48px;
  padding: 0 20px;
  border-radius: 24px;
  border: 3px solid var(--kraft);
  background: #fff;
  font-size: 20px;
  font-weight: bold;
  color: var(--muted);
  cursor: pointer;
}
.voice-btn.active { border-color: var(--consonant); background: var(--consonant); color: #fff; }

/* Карточки со словами (обратный режим, слоги) — мельче */
.card.text { font-size: 56px; min-width: 200px; height: 120px; }

/* Логотип «Думка» — книжным шрифтом, лесным цветом */
.logo { color: var(--forest); }
.tile, .card, .key, .level-btn, .voice-btn, .login-btn, .big-btn, .reset-btn, input, button { font-family: var(--font-sans); }
.card, .tile { font-weight: 800; }
/* ---------- Меню взрослого ---------- */
.pm-wrap { position: relative; display: inline-flex; }
.parent-btn {
  display: flex; align-items: center; gap: 4px; height: 48px; padding: 0 12px;
  border-radius: 999px; border: 3px solid var(--kraft); background: var(--card); color: var(--ink); cursor: pointer;
}
.parent-btn:hover { border-color: var(--kraft-line); }
.parent-menu {
  position: absolute; right: 0; top: 58px; z-index: 50; width: 300px; padding: 10px;
  background: var(--card); border-radius: 22px; box-shadow: 0 10px 40px rgba(0, 0, 0, .18);
  display: flex; flex-direction: column; font-size: 20px; font-weight: 800;
}
.pm-head { padding: 8px 14px 12px; font-size: 15px; color: var(--muted); border-bottom: 2px solid var(--paper); margin-bottom: 6px; }
.pm-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: none; border-radius: 14px;
  background: none; text-align: left; font-size: 20px; font-weight: 800; color: var(--ink); cursor: pointer;
}
.pm-item:hover { background: var(--paper); }
.pm-item.off { color: var(--muted); cursor: default; }
.pm-item.off:hover { background: none; }
.pm-item.danger { color: var(--miss); border-top: 2px solid var(--paper); border-radius: 0 0 14px 14px; }

/* ---------- Вход «Только для взрослых» ---------- */
.modal.gate { width: 400px; max-width: calc(100vw - 32px); box-sizing: border-box; background: var(--paper);
              display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 28px; }
.modal.gate h2 { margin: 0; font-size: 30px; }
.gate-lock { color: var(--muted); }
.gate-q { font-size: 22px; color: var(--muted); }
.gate-answer { width: 150px; height: 60px; text-align: center; font-size: 34px; font-weight: 800; color: var(--ink);
               border: 3px solid var(--kraft); border-radius: 16px; background: var(--card); }
.gate-keys { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: 100%; }
.gate-key { height: 60px; border: none; border-radius: 14px; background: var(--card); box-shadow: 0 4px 0 var(--kraft);
            font-size: 28px; font-weight: 800; color: var(--ink); cursor: pointer; }
.gate-key:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--kraft); }
.gate-key[data-k="OK"] { background: var(--go); color: #fff; box-shadow: 0 4px 0 var(--go-deep); }
.shake { animation: shake .4s; }

.big-btn.danger { background: var(--card); color: var(--miss); border: 3px solid var(--miss); box-shadow: 0 5px 0 var(--kraft); }

/* ---------- Кто сегодня читает? ---------- */
.who { display: flex; flex-direction: column; align-items: center; padding: 10px 20px 60px; }
.who h1 { font-size: 50px; margin: 10px 0 4px; }
.who-hint { font-size: 26px; color: var(--muted); margin: 0 0 30px; }
.kids { display: flex; flex-wrap: wrap; gap: 28px; justify-content: center; }
.kid-card {
  width: 250px; height: 300px; border: none; border-radius: 26px; background: var(--card); box-shadow: 0 6px 0 var(--kraft);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; cursor: pointer;
  transition: transform .15s;
}
.kid-card:hover { transform: translateY(-4px); }
.kid-avatar { width: 140px; height: 140px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 88px; }
.kid-name { font-size: 40px; font-weight: 800; }
.kid-card.add { width: 200px; background: none; box-shadow: none; border: 4px dashed var(--kraft-line); color: var(--muted); gap: 6px; }
.kid-card.add .plus { font-size: 56px; line-height: 1; }
.kid-card.add b { font-size: 20px; }
.kid-card.add small { font-size: 15px; }

.child-chip {
  display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 14px 0 6px; border-radius: 999px;
  border: 3px solid var(--kraft); background: var(--card); font-size: 24px; font-weight: 800; cursor: pointer; color: var(--muted);
}
.chip-avatar { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 26px; }

/* ---------- Окно «Новый ребёнок» ---------- */
.modal.editor { width: 560px; max-width: calc(100vw - 32px); box-sizing: border-box; background: var(--paper); text-align: left;
                display: flex; flex-direction: column; gap: 18px; padding: 28px 32px; font-size: 18px; }
.modal.editor h2 { margin: 0; font-size: 32px; }
.field { display: flex; flex-direction: column; gap: 8px; color: var(--muted); }
.field input { height: 58px; padding: 0 18px; font-size: 28px; font-weight: 800; color: var(--ink);
               border: 3px solid var(--kraft); border-radius: 16px; background: var(--card); }
.field input:focus { outline: 3px solid var(--consonant); outline-offset: 1px; }
.pets { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.pet { height: 70px; border-radius: 18px; border: 3px solid var(--kraft); background: var(--card); font-size: 40px; cursor: pointer; }
.pet.active { border: 5px solid var(--go); background: var(--go-tint); }
.voices-row { display: flex; gap: 10px; }
.voices-row .voice-btn { flex: 1; }
.ed-error { margin: 0; color: var(--miss); }
.modal.editor .buttons { display: flex; justify-content: flex-end; gap: 14px; flex-wrap: wrap; }

/* ---------- Кабинет ---------- */
.cab-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 16px 24px; }
.back-link { font-size: 20px; color: var(--consonant); text-decoration: none; }
.cab-label { font-size: 18px; color: var(--muted); }
.cabinet { display: flex; flex-wrap: wrap; gap: 32px; max-width: 1180px; margin: 0 auto; padding: 8px 24px 60px; box-sizing: border-box; }
.cab-nav { flex: 1 1 200px; max-width: 250px; display: flex; flex-direction: column; gap: 6px; }
.cab-nav a { padding: 12px 16px; border-radius: 14px; text-decoration: none; font-size: 20px; color: var(--ink); }
.cab-nav a.active { background: var(--card); box-shadow: 0 4px 0 var(--kraft); font-weight: 700; }
.cab-nav a.off { color: var(--muted); pointer-events: none; }
.cab-nav small { font-size: 14px; }
.cab-main { flex: 999 1 560px; min-width: 0; }
.cab-main section { display: flex; flex-direction: column; gap: 20px; }
.cab-main h1 { text-align: left; margin: 0; font-size: 40px; }
.cab-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.cab-note { margin: 0; font-size: 17px; color: var(--muted); }
.kid-rows { display: flex; flex-direction: column; gap: 18px; }
.kid-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 16px 20px; background: var(--card);
           border-radius: 26px; box-shadow: 0 6px 0 var(--kraft); }
.row-avatar { width: 72px; height: 72px; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 44px; }
.kid-info { flex: 1; min-width: 160px; display: flex; flex-direction: column; gap: 4px; }
.kid-row-name { font-size: 30px; font-weight: 800; }
.small-btn { height: 46px; padding: 0 18px; border-radius: 14px; border: 3px solid var(--kraft); background: var(--card);
             font-size: 18px; color: var(--ink); cursor: pointer; }
.small-btn.danger { border-color: transparent; background: none; color: var(--miss); }
.cab-block { background: var(--card); border-radius: 26px; box-shadow: 0 6px 0 var(--kraft); padding: 22px 26px;
             display: flex; flex-direction: column; gap: 12px; }
.cab-block h2 { margin: 0; font-size: 24px; }
.provider { display: flex; justify-content: space-between; font-size: 20px; color: var(--muted); padding: 4px 0; }
.provider.on { color: var(--ink); }
.provider.on span { color: var(--go-deep); font-weight: 700; }
.danger-zone { background: var(--miss-tint); box-shadow: none; border: 3px solid #f3c4c4; }
.danger-zone h2 { color: var(--miss); }
.danger-zone p { margin: 0; font-size: 18px; }

/* ---------- Статистика ---------- */
.stat-kids { display: flex; gap: 10px; flex-wrap: wrap; }
.stat-kid { display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 14px 0 4px; border-radius: 999px;
            border: 3px solid var(--kraft); background: var(--card); font-size: 20px; font-weight: 800; cursor: pointer; }
.stat-kid.active { border-color: var(--go); background: var(--go-tint); }
.stats { display: flex; flex-direction: column; gap: 20px; }
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; }
@media (max-width: 640px) { .stat-tiles { grid-template-columns: 1fr; } }
.stat-tile { background: var(--card); border-radius: 26px; box-shadow: 0 6px 0 var(--kraft); padding: 18px 22px;
             display: flex; flex-direction: column; gap: 4px; }
.stat-tile b { font-family: var(--font-serif); font-size: 40px; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat-tile span { font-size: 16px; color: var(--muted); }

.bars { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; height: 200px; padding-top: 8px; }
.bar-col { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; outline: none; }
.bar-value { min-height: 20px; font-size: 15px; font-weight: 700; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.bar-track { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center;
             border-bottom: 2px solid var(--kraft); }
.bar { width: min(44px, 70%); background: var(--go); border-radius: 4px 4px 0 0; }
.bar-label { font-size: 14px; color: var(--muted); }
.bar-label.today { color: var(--ink); font-weight: 800; }
/* Подсказка при наведении и фокусе с клавиатуры */
.bar-col:hover .bar, .bar-col:focus .bar { background: var(--go-deep); }
.bar-col:hover::after, .bar-col:focus::after {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%);
  z-index: 5; width: max-content; max-width: 220px; padding: 8px 12px; border-radius: 12px;
  background: var(--ink); color: #fff; font-size: 14px; line-height: 1.35; white-space: normal; text-align: center;
}
.bar-col:first-child:hover::after, .bar-col:first-child:focus::after { left: 0; transform: none; }
.bar-col:last-child:hover::after, .bar-col:last-child:focus::after { left: auto; right: 0; transform: none; }

.stat-table { width: 100%; border-collapse: collapse; font-size: 17px; }
.stat-table th { text-align: left; font-size: 14px; color: var(--muted); font-weight: 700; padding: 6px 8px; border-bottom: 2px solid var(--kraft); }
.stat-table td { padding: 10px 8px; border-bottom: 1px solid var(--paper-deep); font-variant-numeric: tabular-nums; }
.stat-table td:not(:first-child), .stat-table th:not(:first-child) { text-align: right; }

.hard-list { display: flex; flex-direction: column; gap: 8px; }
.hard-row { display: flex; align-items: baseline; gap: 14px; padding: 8px 12px; border-radius: 14px; background: var(--paper); }
.hard-target { font-size: 26px; font-weight: 800; min-width: 120px; }
.hard-given { flex: 1; font-size: 18px; color: var(--muted); }
.hard-count { font-size: 18px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }

/* Темы «Что любит» */
.themes { display: flex; flex-wrap: wrap; gap: 8px; }
.theme-btn { height: 42px; padding: 0 14px; border-radius: 999px; border: 3px solid var(--kraft); background: var(--card);
             font-size: 16px; font-weight: 700; color: var(--ink); cursor: pointer; }
.theme-btn.active { border-color: var(--go); background: var(--go-tint); }
.theme-btn:disabled { opacity: .45; cursor: default; }

/* «Задания на сегодня»: жёлудь за звезду */
.acorn-pop { position: fixed; top: 70px; right: 40px; font-size: 32px; font-weight: 800; color: var(--forest);
             pointer-events: none; animation: acorn-up 1.2s ease-out forwards; }
@keyframes acorn-up { from { opacity: 0; transform: translateY(10px); } 20% { opacity: 1; }
                      to { opacity: 0; transform: translateY(-30px); } }

/* «Задания на сегодня» — карточка на главной */
.plan-card { max-width: 640px; margin: 0 auto 24px; background: var(--card); border-radius: 26px;
             box-shadow: 0 6px 0 var(--kraft); padding: 20px 26px; }
.plan-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.plan-head h2 { font-family: var(--font-serif); margin: 0; }
.plan-meta { font-size: 22px; font-weight: 800; color: var(--muted); white-space: nowrap; }
.plan-list { font-size: 22px; line-height: 1.7; padding-left: 28px; margin: 12px 0 16px; }
.plan-list .done { color: var(--muted); }
.plan-off { font-size: 22px; color: var(--muted); }
@media (max-width: 640px) { .plan-card { margin: 0 16px 20px; } .plan-head { flex-direction: column; } }

/* «Обучение» в редакторе ребёнка и полоса плана в статистике */
.modal.editor { max-height: calc(100vh - 32px); overflow-y: auto; }   /* с блоком «Обучение» окно выше экрана ноутбука */
.plan-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.day-btn { min-width: 46px; height: 42px; border-radius: 12px; border: 2px solid var(--kraft); background: var(--card);
           font: inherit; font-weight: 800; color: var(--ink); cursor: pointer; }
.day-btn.active { background: var(--go-tint); border-color: var(--go); }
.day-btn:disabled { opacity: .4; cursor: default; }
.plan-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.plan-day { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 0; border-radius: 14px;
            background: var(--paper-deep); font-size: 14px; color: var(--muted); }
.plan-day b { font-size: 24px; height: 30px; }
.plan-day.closed { background: var(--go-tint); color: var(--go-deep); }

/* Питомец на главной */
.pet-home { max-width: 640px; margin: 0 auto 16px; display: flex; align-items: center; gap: 18px; background: var(--card);
            border-radius: 26px; box-shadow: 0 6px 0 var(--kraft); padding: 12px 26px; }
.pet-art { flex: none; width: 120px; height: 132px; border: 0; background: none; padding: 0; cursor: pointer; display: block; }
.pet-art svg { width: 100%; height: 100%; display: block; }
.pet-link { flex: 1; color: inherit; text-decoration: none; }
.pet-text { flex: 1; display: flex; flex-direction: column; gap: 4px; font-size: 18px; color: var(--muted); }
.pet-text b { font-family: var(--font-serif); font-size: 26px; color: var(--ink); }
.pet-bar { height: 14px; border-radius: 7px; background: var(--paper-deep); overflow: hidden; margin-top: 6px; }
.pet-bar i { display: block; height: 100%; background: var(--go); border-radius: 7px; }
.egg.ready { animation: egg-pulse 1.4s ease-in-out infinite; }
.wobble { animation: egg-wobble .5s; }
@keyframes egg-wobble { 25% { transform: rotate(-8deg); } 75% { transform: rotate(8deg); } }
@keyframes egg-pulse { 50% { transform: scale(1.05); } }
.modal.hatch { width: 560px; max-width: calc(100vw - 32px); box-sizing: border-box; background: var(--paper);
               max-height: calc(100vh - 32px); overflow-y: auto; }
.modal.hatch h2 { margin: 6px 0 14px; }
.hatch-art { width: 160px; height: 176px; margin: 0 auto; }
.hatch-art svg { width: 100%; height: 100%; }
.hatch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; margin-bottom: 14px; }
.hatch-pick { border: 2px solid var(--kraft); border-radius: 18px; background: var(--card); padding: 4px; cursor: pointer;
              font: inherit; font-size: 14px; font-weight: 800; color: var(--ink); }
.hatch-pick svg { width: 100%; height: auto; display: block; }
.hatch-pick:hover, .hatch-pick:focus-visible { border-color: var(--go); }
.hatch-name { display: flex; gap: 8px; justify-content: center; margin-bottom: 10px; }
.hatch-name input { height: 52px; width: 240px; max-width: 60vw; text-align: center; font-size: 26px; font-weight: 800;
                    border: 3px solid var(--kraft); border-radius: 16px; background: var(--card); color: var(--ink); }
@media (max-width: 640px) { .pet-home { margin: 0 16px 16px; padding: 10px 14px; gap: 10px; } .pet-art { width: 92px; height: 101px; } .pet-text b { font-size: 22px; } }

/* Домик питомца */
.house { max-width: 760px; margin: 0 auto; padding: 0 16px 40px; text-align: center; box-sizing: border-box; }
.house-meadow { background: var(--go-tint); border-radius: 30px; box-shadow: 0 6px 0 var(--kraft); padding: 16px; }
.house-pet { width: 240px; height: 264px; max-width: 70vw; border: 0; background: none; cursor: pointer; padding: 0; }
.house-pet svg { width: 100%; height: 100%; display: block; }
.house-pet.hop { animation: pet-hop .5s ease-out; }
@keyframes pet-hop { 40% { transform: translateY(-24px); } }
.house h1 { margin: 16px 0 0; }
.house h2 { margin: 28px 0 12px; }
.house-stage, .house-meta { color: var(--muted); font-size: 20px; margin: 6px 0; }
.house .pet-bar { max-width: 420px; margin: 8px auto; }
.album { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.album-cell { background: var(--card); border-radius: 18px; box-shadow: 0 4px 0 var(--kraft); padding: 4px; font-weight: 800; color: var(--muted); }
.album-cell svg { width: 100%; height: auto; display: block; }
.album-cell.locked svg { filter: brightness(0) opacity(.18); }
/* Магазин и шкаф в Домике */
.shop-tabs { display: flex; gap: 10px; justify-content: center; margin: 24px 0 6px; }
.shop-tab { height: 50px; padding: 0 22px; border-radius: 16px; border: 3px solid var(--kraft); background: var(--card);
            font-size: 20px; color: var(--muted); cursor: pointer; }
.shop-tab.active { border-color: var(--go); background: var(--go); color: #fff; }
.shop-slot { margin: 18px 0 8px; text-align: left; font-family: var(--font-serif); }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.shop-card { background: var(--card); border-radius: 20px; box-shadow: 0 5px 0 var(--kraft); padding: 6px 8px 12px;
             display: flex; flex-direction: column; align-items: center; gap: 6px; border: 3px solid transparent; }
.shop-card.trying { border-color: var(--go); }
.shop-price { color: var(--muted); font-size: 17px; }
.shop-card .small-btn { height: auto; min-height: 46px; white-space: normal; line-height: 1.2; }
.shop-look { width: 100%; border: 0; background: none; padding: 0; cursor: pointer; }
.shop-look svg { width: 100%; height: auto; display: block; }
.small-btn.go { background: var(--go); border-color: var(--go); color: #fff; }
.small-btn:disabled { cursor: default; opacity: .75; }
#try-off { margin-top: 6px; }
@media (max-width: 640px) { .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .shop-card .small-btn { padding: 0 8px; font-size: 15px; } }

/* Кабинет: вкладка «Обучение» */
.learn-rows { display: flex; flex-direction: column; gap: 20px; }
.learn-head { display: flex; align-items: center; gap: 14px; font-size: 26px; }
.learn-block h2 { font-size: 20px; margin: 10px 0 4px; }
.learn-saved { min-height: 22px; }
.learn-levels { display: grid; grid-template-columns: 1fr; gap: 6px; }
.learn-level { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
               padding: 6px 0; border-bottom: 2px solid var(--paper); }
.learn-level .plan-row { margin-top: 0; }
.learn-level .level-btn { min-width: 44px; height: 40px; }
.kid-pet svg { width: 100%; height: 100%; display: block; }
