@font-face {
  font-family: "Rubik";
  src: url("fonts/Rubik-var.woff2") format("woff2");
  font-weight: 500 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #4A2FBD;
  --ink: #1B1245;
  --ink2: #E4DCFF;
  --surface: #FFFFFF;
  --yellow: #FFC53D;
  --pink: #E5226B;
  --rus: #FF86B1;
  --ok: #3DDC84;
  --ok-ink: #0F7A40;
  --bad: #FF7A7A;
  --bad-ink: #C21A3A;
  --todo: #6A4FD6;
  --soon: #8B78E0;
  --line: #1B1245;
  --shadow: 0 8px 0 #1B1245;
  --shadow-sm: 0 5px 0 #1B1245;
  --radius: 34px;
  --radius-btn: 26px;
  --font: "Rubik", system-ui, -apple-system, sans-serif;
  --btn-min: 52px;
  --pad: clamp(12px, 2.2vw + 6px, 24px);
  --max: 980px;
  --chrome: 0px;
  --kb-inset: 0px;
  --fs-body: clamp(16px, 2.2vw + 8px, 24px);
  --fs-title: clamp(22px, 4vw + 8px, 42px);
  --fs-h2: clamp(18px, 2vw + 12px, 28px);
  --fs-tile: clamp(20px, 2vw + 16px, 32px);
  --fs-sub: clamp(14px, 1.4vw + 10px, 22px);
  --fs-prompt: clamp(22px, 2.6vw + 14px, 32px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-body);
  font-weight: 500;
  line-height: 1.35;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background-color: var(--bg);
  overflow-x: clip;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
}

body, #app {
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 22px 22px, rgba(255,255,255,.13) 3.5px, transparent 4px),
    radial-gradient(circle at 100% 0, rgba(106,79,214,.55) 0 150px, transparent 151px),
    radial-gradient(circle at 0 100%, rgba(59,34,160,.7) 0 190px, transparent 191px);
  background-size: 44px 44px, auto, auto;
  background-repeat: repeat, no-repeat, no-repeat;
}

body { min-height: 100dvh; min-height: 100svh; }

button {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  font-family: inherit;
  font-weight: 700;
}

#app {
  min-height: 100dvh;
  min-height: 100svh;
  padding-top: calc(var(--pad) + env(safe-area-inset-top, 0px));
  padding-right: calc(var(--pad) + env(safe-area-inset-right, 0px));
  padding-left: calc(var(--pad) + env(safe-area-inset-left, 0px));
  padding-bottom: calc(var(--pad) + env(safe-area-inset-bottom, 0px) + var(--chrome) + var(--kb-inset));
}

.wrap { max-width: var(--max); margin: 0 auto; width: 100%; }

.top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: clamp(12px, 2vw, 20px);
  color: var(--ink);
  min-width: 0;
}

.top h1, .top .title {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: clamp(20px, 3vw + 10px, 34px);
  font-weight: 800;
  line-height: 1.15;
  color: var(--ink);
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
}

.top.home {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.hello-row {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.6vw, 14px);
  min-width: 0;
  width: 100%;
}

.hello-ill {
  width: clamp(52px, 12vw, 88px);
  height: clamp(52px, 12vw, 88px);
  flex: none;
}
.hello-ill svg { width: 100%; height: 100%; display: block; }

.hello-row h1 {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: var(--fs-title);
  font-weight: 800;
  line-height: 1.15;
  color: var(--ink);
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.hello-sub {
  margin: 0;
  width: 100%;
  font-size: clamp(16px, 2.4vw + 10px, 24px);
  font-weight: 500;
  color: var(--ink2);
  overflow-wrap: break-word;
  word-break: normal;
}

.btn, .crumb-link, .next, .exam-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--btn-min);
  min-width: var(--btn-min);
  padding: 12px 20px;
  font-size: clamp(16px, 1.6vw + 12px, 24px);
  font-weight: 800;
  line-height: 1.2;
  color: var(--ink);
  background: var(--surface);
  border: 4px solid var(--line);
  border-radius: var(--radius-btn);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
}

.btn.primary, .next, .exam-btn {
  background: var(--yellow);
}

.btn.wide, .exam-btn, .next { width: 100%; }

.btn:disabled, .crumb-link:disabled { opacity: .45; cursor: default; box-shadow: none; }

.btn-back, .crumb-link {
  position: relative;
  flex: none;
  padding: 0 22px 0 14px;
  height: 64px;
  min-height: 64px;
  background: var(--card);
  color: var(--ink);
}

.crumb-ico { display: block; flex: none; }

.stars {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  height: clamp(44px, 8vw, 60px);
  padding: 0 clamp(10px, 2vw, 22px) 0 clamp(8px, 1.5vw, 14px);
  background: var(--yellow);
  border: 4px solid var(--line);
  border-radius: 30px;
  box-shadow: var(--shadow-sm);
  font-size: clamp(18px, 4vw, 28px);
  font-weight: 800;
  color: var(--ink);
}
.stars svg { width: clamp(22px, 5vw, 36px); height: clamp(22px, 5vw, 36px); display: block; }

.lead, .home-note, .meta, .muted {
  color: var(--ink2);
  font-size: clamp(16px, 1.6vw + 12px, 24px);
  font-weight: 500;
  margin: 0 0 16px;
}

.section-title {
  margin: 16px 0 10px;
  color: var(--ink);
  font-size: var(--fs-h2);
  font-weight: 800;
}

.tiles {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(12px, 2.5vw, 22px);
}

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: clamp(132px, 28vw, 220px);
  min-width: 0;
  padding: clamp(14px, 2vw, 22px) clamp(12px, 2vw, 16px);
  border: 4px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 0 #0A0720;
  cursor: pointer;
  color: var(--ink);
  text-align: center;
}
.tile.math { background: var(--yellow); }
.tile.russian, .tile.rus, .tile.bank { background: var(--rus); }
.tile.mix { background: var(--ok); }
.tile.soon {
  background: var(--soon);
  border-style: dashed;
  box-shadow: 0 10px 0 rgba(27,18,69,.55);
  cursor: default;
  color: var(--ink);
}
.tile .tile-ico, .tile .ico {
  width: clamp(72px, 18vw, 112px);
  height: clamp(72px, 18vw, 112px);
  border-radius: 0;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tile .tile-ico svg, .tile .ico svg { width: 100%; height: 100%; display: block; overflow: visible; }
.title.has-ico {
  display: flex;
  align-items: center;
  gap: 8px;
}
.title-ico {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  display: block;
}
.title-ico svg { width: 100%; height: 100%; display: block; overflow: visible; }
.tile-title, .tile .name {
  font-size: var(--fs-tile);
  font-weight: 800;
  line-height: 1.15;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
}
.tile-sub, .tile .meta, .tile-progress {
  font-size: var(--fs-sub);
  font-weight: 600;
  margin-top: 2px;
  overflow-wrap: break-word;
  word-break: normal;
}

.exam-btn {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 4px 0 18px;
  min-height: clamp(64px, 10vw, 88px);
  padding: 12px 16px;
  font-size: clamp(22px, 2.4vw + 14px, 32px);
  border-radius: 28px;
  box-shadow: 0 8px 0 #0A0720;
}
.exam-btn-title { font-size: inherit; font-weight: 800; line-height: 1.1; }
.exam-btn-sub {
  font-size: clamp(14px, 1.2vw + 10px, 20px);
  font-weight: 700;
  opacity: 0.85;
  line-height: 1.2;
}

.path-block { margin: 8px 0 24px; }

.path {
  display: grid;
  grid-template-columns: minmax(0, 1fr);   /* 2026-12-06-1: одна тема – одна длинная строка */
  gap: clamp(10px, 2vw, 16px);
  align-items: stretch;
  justify-items: stretch;
}

.path-connector { display: none; }

.path-node {
  position: relative;
  appearance: none;
  -webkit-appearance: none;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  align-self: stretch;
  justify-content: flex-start;
  justify-self: stretch;
  min-height: clamp(108px, 24vw, 140px);
  height: 100%;
  width: 100%;
  min-width: 0;
  padding: 10px 12px 12px;
  background: var(--todo);
  color: var(--ink);
  border: 4px solid var(--line);
  border-radius: 30px;
  box-shadow: var(--shadow);
  cursor: pointer;
  text-align: left;
  overflow: hidden;
  box-sizing: border-box;
}
.path-node.is-done { background: var(--yellow); color: var(--ink); }
.path-node.is-progress {
  background: var(--card);
  color: var(--ink);
}
.path-node.is-final { background: var(--ok); color: var(--ink); }

.path-dot {
  position: static;
  flex: none;
  align-self: flex-start;
  z-index: 1;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0;
  color: var(--ink);
  max-width: calc(100% - 2px);
  margin: 0 0 6px;
  padding: 3px 8px;
  border-radius: 10px;
  border: 2px solid var(--line);
  background: var(--card);
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
  text-align: center;
}
.path-node.is-done .path-dot,
.path-node.is-progress .path-dot,
.path-node.is-final .path-dot {
  background: var(--card);
  color: var(--ink);
  border-color: var(--line);
}
.path-label {
  flex: 1 1 auto;
  min-width: 0;
  font-size: clamp(18px, 2vw + 12px, 26px);
  font-weight: 800;
  line-height: 1.2;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: auto;
  -webkit-hyphens: auto;
  max-width: 100%;
}
.path-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 10px;
  margin-top: auto;
  padding-top: 8px;
  min-width: 0;
}
.path-progress {
  font-size: clamp(14px, 1.6vw + 10px, 20px);
  font-weight: 800;
}
.path-continue, .path-complete {
  font-size: clamp(13px, 1.4vw + 10px, 18px);
  font-weight: 800;
  white-space: nowrap;
  line-height: 1.2;
}
.path-continue { color: #C41058; }
.path-node:not(.is-progress):not(.is-done):not(.is-final) .path-continue { color: var(--ink); }
.path-complete { color: inherit; }

.memo-link-row { margin: -8px 0 20px; }
.memo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 18px;
  font-size: clamp(16px, 1.4vw + 12px, 20px);
}

.exam-block {
  margin: 32px 0 8px;
  padding: 8px 0 calc(24px + env(safe-area-inset-bottom, 0px));
}
.exam-block .section-title { margin-top: 0; }
.exam-block .exam-btn { margin: 8px 0 0; }

.badge-check {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 4px solid var(--line);
  background: var(--ok);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.path-node .badge { display: none; }

#app.is-play {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  height: 100svh;
  overflow: hidden;
  padding-bottom: 0;
}
#app.is-play .wrap {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 100%;
}
.play-screen {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.play-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.play-dock {
  flex: none;
  position: sticky;
  bottom: 0;
  z-index: 8;
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom, 0px));
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 22px 22px, rgba(255,255,255,.13) 3.5px, transparent 4px);
  background-size: 44px 44px;
  box-shadow: 0 -10px 16px rgba(26, 16, 70, .18);
}
.play-dock .btn, .play-dock .next { width: 100%; margin: 0; }
.play-dock .keypad { margin: 0 auto 8px; }
@media (max-height: 720px) {
  .play-dock .keypad[data-keypad="1"] .btn { min-height: 44px; }
  .play-dock .keypad.letters .btn { min-height: 36px; padding: 4px 0; }
}
.play-main { display: flex; flex-direction: column; gap: 16px; }

.qcard, .memo, .error-box, .fb, .feedback, .picker {
  background: var(--card);
  border: 4px solid var(--line);
  border-radius: clamp(22px, 4vw, 36px);
  box-shadow: 0 10px 0 #0A0720;
  padding: clamp(14px, 2.4vw, 24px);
}

.qcard { text-align: center; }
.qcard h2 { margin: 0 0 8px; font-size: clamp(16px, 1.6vw + 12px, 24px); font-weight: 700; }
.prompt {
  margin: 0;
  font-size: var(--fs-prompt);
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
}
.prompt.big { font-size: clamp(32px, 8vw, 88px); font-weight: 800; }

.sequence {
  font-size: clamp(22px, 2.6vw + 14px, 32px);
  font-weight: 700;
  line-height: 1.5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 4px;
}

.blank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--btn-min);
  min-width: 72px;
  padding: 8px 12px;
  margin: 0 4px;
  font-size: clamp(20px, 2vw + 14px, 28px);
  font-weight: 800;
  font-family: inherit;
  border-radius: 16px;
  border: 4px solid var(--line);
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 4px 0 #0A0720;
  cursor: pointer;
}
.blank.active:not(:disabled) { background: var(--card2); }
.blank:disabled { cursor: default; }

.answer-wrap { width: 100%; display: flex; justify-content: center; margin-top: 8px; }
.blank.answer-field {
  width: 100%;
  max-width: 520px;
  min-height: 76px;
  min-width: 0;
  font-size: clamp(22px, 2.6vw + 14px, 32px);
  justify-content: flex-start;
  padding: 14px 18px;
  text-align: left;
}

.btn-col { display: flex; flex-direction: column; flex-wrap: wrap; gap: 12px; justify-content: center; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

.btn-row.choices {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  width: 100%;
}
.btn-row.choices .btn {
  min-height: clamp(56px, 8vw + 40px, 112px);
  font-size: clamp(18px, 2vw + 14px, 32px);
  font-weight: 800;
  height: auto;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
  box-shadow: var(--shadow);
  border-radius: 30px;
}
.btn-row.choices .btn.selected { background: var(--yellow); }

.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 100%;
  max-width: 360px;
  margin: 8px auto 0;
}
/* высота не меньше 44px: берём как у остальных кнопок --btn-min (52px), шрифт цифр тот же, что на живом сайте */
.keypad[data-keypad="1"] .btn { min-height: var(--btn-min); }
.keypad.letters {
  grid-template-columns: repeat(11, minmax(0, 1fr));
  max-width: 100%;
  gap: 6px;
}
.keypad.letters .btn {
  min-width: 0;
  min-height: 48px;
  padding: 6px 0;
  font-size: clamp(14px, 1.6vw + 10px, 18px);
  box-shadow: 0 3px 0 #0A0720;
}
.keypad.letters .wide-key { grid-column: span 3; }
.keypad .btn { width: 100%; }

.feedback, .fb {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
  padding: 16px 20px;
}
.fb-ico, .mascot-wrap { flex: none; width: clamp(64px, 14vw, 92px); height: clamp(64px, 14vw, 92px); }
.fb-ico svg, .mascot-wrap svg { width: 100%; height: 100%; display: block; }
.feedback-title, .fb-title { font-size: clamp(22px, 2.6vw + 14px, 32px); font-weight: 800; line-height: 1.1; margin: 0 0 6px; }
.feedback.ok .feedback-title, .fb.right .fb-title { color: var(--ok-ink); }
.feedback.bad .feedback-title, .fb.wrong .fb-title { color: var(--bad-ink); }
.feedback.ok { background: var(--card); }
.feedback.bad { background: var(--card); }
.fb-txt { flex: 1; min-width: 0; }
.fb-exp, .feedback p, .feedback div:last-child {
  font-size: clamp(16px, 1.6vw + 12px, 24px);
  font-weight: 600;
  margin: 0;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
}
.fb.hint { justify-content: center; }
.fb-hint { font-size: clamp(18px, 2vw + 12px, 28px); font-weight: 700; margin: 0; }
.next {
  width: auto;
  min-width: min(100%, 200px);
  height: auto;
  min-height: clamp(56px, 8vw + 40px, 88px);
  font-size: clamp(20px, 2.2vw + 14px, 32px);
  flex: none;
}

.result-score, .result-grade { color: var(--ink); font-size: clamp(22px, 2.6vw + 14px, 32px); font-weight: 800; margin: 8px 0; }
.short-note {
  background: var(--yellow);
  color: var(--ink);
  border: 4px solid var(--line);
  border-radius: 20px;
  padding: 12px 16px;
  font-weight: 700;
  margin: 0 0 16px;
}

.progress-bar {
  height: 16px;
  border-radius: 8px;
  background: #3B22A0;
  border: 2px solid var(--line);
  overflow: hidden;
  margin: 8px 0 12px;
}
.progress-bar span { display: block; height: 100%; background: var(--ok); }

.times-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  margin: 12px 0 20px;
  max-width: 100%;
}

.times-table, .tbl {
  display: grid;
  grid-template-columns: repeat(11, minmax(0, 1fr));
  gap: 3px;
  margin: 0;
  min-width: 0;
  width: 100%;
}
.times-table .c, .tbl .c {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  min-width: 0;
  padding: 1px;
  background: var(--card);
  color: var(--ink);
  border: 2px solid var(--line);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.times-table .c.h { background: var(--yellow); font-weight: 800; }
.times-table .c.corner { background: var(--pink); color: var(--ink); font-weight: 800; }
.times-table .c.hl { background: var(--card2); }
.times-table .c.h.hl { background: var(--pink); color: var(--ink); }
.times-table .c.pick { background: var(--ok); font-weight: 800; box-shadow: 0 0 0 3px rgba(255,255,255,.08); }

.clock-wrap {
  margin: 4px auto;
  width: min(280px, 70vw, 36dvh);
  min-width: min(220px, 100%);
  max-width: 100%;
}
.clock-wrap svg { width: 100%; height: auto; display: block; }
.clock-choice svg { width: min(160px, 36vw, 28dvh); min-width: min(120px, 100%); height: auto; display: block; margin: 0 auto; }
.clock-choices { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 12px; }
.clock-choice {
  min-height: var(--btn-min);
  min-width: 140px;
  flex: 1 1 140px;
  max-width: 220px;
  padding: 10px;
  background: var(--card);
  border: 4px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}
.clock-choice.selected { background: var(--yellow); }

.memo { color: var(--ink); font-weight: 600; }
.memo div, .memo-line { margin: 8px 0; color: var(--ink); }
.memo .muted, .card .muted, .qcard .muted, .memo .lead, .card .lead:not(.dark) { color: var(--ink); }
.memo-h {
  margin: 20px 0 10px;
  color: var(--ink);
  font-size: var(--fs-h2);
  font-weight: 800;
}
.memo-roman {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}
.memo-roman-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  margin: 0;
  padding: 8px 4px;
  background: var(--card2);
  color: var(--ink);
  border: 3px solid var(--line);
  border-radius: 14px;
  font-weight: 800;
  text-align: center;
}
.memo-roman-cell b { font-size: clamp(16px, 1.6vw + 12px, 22px); color: var(--ink); }
.memo-roman-cell span { font-size: clamp(14px, 1.2vw + 10px, 18px); font-weight: 700; color: var(--ink); }
.error-box { color: var(--bad-ink); font-weight: 700; }

.picker h2 { margin: 0 0 8px; font-size: clamp(20px, 2vw + 14px, 28px); }
.picker-group { margin: 20px 0 0; }
.picker-group + .picker-group { margin-top: 20px; }
.picker-group + .btn-col { margin-top: 20px; }
.picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}
.picker-head h3 { margin: 0; font-size: clamp(18px, 1.8vw + 12px, 26px); font-weight: 800; color: var(--ink); }
.mix-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: stretch;
  min-width: 0;
  width: 100%;
}
.mix-check {
  display: flex;
  align-items: center;
  gap: 8px;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 52px;
  height: 100%;
  padding: 8px 8px;
  overflow-wrap: break-word;
  word-break: normal;
  background: var(--card);
  color: var(--ink);
  border: 4px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 4px 0 #0A0720;
  font-size: clamp(16px, 1.4vw + 12px, 22px);
  font-weight: 700;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
}
.mix-check.on {
  background: var(--yellow);
  color: var(--ink);
}
.mix-mark {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  box-sizing: border-box;
  border-radius: 50%;
  border: 2px solid #9A94B0;
  background: var(--card2);
  position: relative;
}
.mix-check.on .mix-mark {
  border-color: #1B8F4E;
  background: var(--ok);
}
.mix-check.on .mix-mark::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 6px;
  height: 11px;
  border: solid var(--edge);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}
.mix-label {
  flex: 1;
  min-width: 0;
  color: var(--ink);
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
}
@media (max-width: 339px) {
  .mix-grid { grid-template-columns: 1fr; }
}
.crumb-sep, .crumb-current { color: var(--ink2); font-weight: 600; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }

@media (max-width: 359px) {
  .path { grid-template-columns: 1fr; }
}

@media (max-width: 699px) {
  :root { --chrome: 72px; }
  .top:not(.home) {
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    grid-template-areas:
      "back home . stars"
      "title title title title";
    align-items: center;
    column-gap: 8px;
    row-gap: 8px;
  }
  .top:not(.home) .btn-back { grid-area: back; }
  .top:not(.home) .crumb-home { grid-area: home; }
  .top:not(.home) .title { grid-area: title; }
  .top:not(.home) .stars { grid-area: stars; justify-self: end; }
  .top:not(.home) .btn-back,
  .top:not(.home) .crumb-home {
    width: 52px;
    min-width: 52px;
    height: 52px;
    min-height: 52px;
    padding: 0;
  }
  .top:not(.home) .crumb-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .feedback, .fb { flex-wrap: wrap; }
  .next { width: 100%; }
}

@media (min-width: 400px) {
  .btn-row.choices { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 560px) {
  .tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 400px) {
  .times-table, .tbl { gap: 3px; }
  .times-table .c, .tbl .c { font-size: 14px; min-height: 34px; border-radius: 8px; }
}

@media (min-width: 700px) {
  .crumb-home .crumb-ico { display: none; }
  .times-table, .tbl { gap: 4px; }
  .times-table .c, .tbl .c { font-size: 20px; min-height: 44px; border-width: 3px; border-radius: 10px; padding: 4px 2px; }
}

@media (min-width: 900px) {
  .path { grid-template-columns: minmax(0, 1fr); }
  .times-table .c, .tbl .c { font-size: 22px; min-height: 48px; }
}

@media (max-height: 500px) and (orientation: landscape) {
  :root { --chrome: 28px; }
  .tile { min-height: 110px; }
  .path-node { min-height: 72px; }
  .hello-ill { width: 48px; height: 48px; }
  .exam-btn { min-height: 56px; margin-bottom: 10px; }
}

/* ---------- учётки, профили, страница родителя ---------- */
.card {
  background: var(--card);
  color: var(--ink);
  border: 4px solid var(--line);
  border-radius: clamp(22px, 4vw, 36px);
  box-shadow: 0 10px 0 #0A0720;
  padding: clamp(14px, 2.4vw, 24px);
  margin: 0 0 22px;
}
.lead.dark, .muted.dark { color: var(--ink); }
.note { margin-top: 18px; font-size: clamp(14px, 1.2vw + 10px, 18px); }

.tile.weak { background: #FF9F43; grid-column: 1 / -1; }
.tile.kid { background: var(--yellow); }
.tile.guest { background: var(--card); }
.kid-ico { width: clamp(72px, 18vw, 120px); height: clamp(72px, 18vw, 120px); }
.kid-ico svg, .pc-ava svg { width: 100%; height: 100%; display: block; }
.tile.kid, .tile.guest { min-height: clamp(150px, 32vw, 230px); }

.home-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 26px; }
.home-actions .btn { font-size: clamp(15px, 1.2vw + 11px, 20px); min-height: 52px; padding: 8px 18px; }
.btn.danger { background: var(--bad); }

.tg-enter { min-width: min(100%, 320px); }
.tg-alt {
  margin: 16px auto 0;
  max-width: 280px;
  font-size: 14px;
  font-weight: 600;
  color: #5A5280;
  text-align: center;
}
.tg-alt summary { cursor: pointer; list-style: none; }
.tg-alt summary::-webkit-details-marker { display: none; }
.tg-widget {
  min-height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 12px 0;
  color-scheme: light;
  background: transparent;
}
/* large-виджет Telegram: 238×40, data-radius=20. overflow+isolation+transform — чтобы Safari обрезал тёмный прямоугольник iframe */
.tg-widget-clip {
  width: 238px;
  height: 40px;
  border-radius: 20px;
  overflow: hidden;
  isolation: isolate;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  background: transparent;
  color-scheme: light;
  line-height: 0;
}
.tg-widget-clip iframe {
  display: block;
  width: 238px;
  height: 40px;
  border: 0;
  background-color: transparent;
  color-scheme: light;
  border-radius: 20px;
}


.pw-card { text-align: center; }
.pw-ava { margin: 0 auto 8px; }
.pw-hint { margin: 0 0 12px; color: var(--ink); font-size: var(--fs-h2); font-weight: 800; }
.pw-slots {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  gap: 12px;
  margin: 10px auto 18px;
}
.pw-slot {
  width: clamp(56px, 16vw, 84px);
  height: clamp(56px, 16vw, 84px);
  padding: 6px;
  border: 4px dashed rgba(255,255,255,.7);
  border-radius: 22px;
  background: rgba(255,255,255,.12);
  display: grid;
  place-items: center;
  box-sizing: border-box;
}
.pw-slot.full { border: 4px solid var(--line); background: var(--card); }
.pw-slot svg, .pic-btn svg, .ava-btn svg {
  width: 100%;
  height: 100%;
  display: block;
  margin: 0;
  padding: 0;
  vertical-align: middle;
}
.form-card .pw-slot { border-color: #B9AEF0; background: var(--card2); }
.form-card .pw-slot.full { border-color: var(--line); background: var(--card); }

.pic-grid, .ava-grid {
  display: grid;
  gap: clamp(8px, 2vw, 14px);
  max-width: 520px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  justify-items: stretch;
  box-sizing: border-box;
}
.pic-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 0;
  margin-bottom: 16px;
}
.ava-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 8px;
  margin-bottom: 16px;
}
.pic-btn, .ava-btn {
  aspect-ratio: 1;
  width: 100%;
  min-width: 48px;
  min-height: 48px;
  padding: clamp(6px, 1.6vw, 12px);
  background: var(--card);
  border: 4px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 5px 0 #0A0720;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-sizing: border-box;
}
.pic-btn.on, .ava-btn.on { background: var(--yellow); }
.pic-btn.on { opacity: .5; }
.ava-btn.on { box-shadow: 0 0 0 4px var(--pink), 0 5px 0 #0A0720; }

.f-label { font-weight: 700; margin: 14px 0 6px; font-size: clamp(16px, 1.2vw + 12px, 22px); }
.f-input {
  width: 100%;
  min-height: 56px;
  padding: 8px 16px;
  font: inherit;
  font-size: max(18px, 1.2vw + 12px);
  font-weight: 700;
  color: var(--ink);
  background: var(--card2);
  border: 4px solid var(--line);
  border-radius: 18px;
}
.form-actions {
  margin-top: 18px;
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
}
.form-card .btn-row { margin-top: 10px; }

.pc-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.pc-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.pc-ava { width: clamp(56px, 12vw, 80px); height: clamp(56px, 12vw, 80px); flex: none; }
.pc-name { min-width: 0; }
.pc-name h2 { margin: 0; font-size: var(--fs-h2); }
.pc-sum { font-size: clamp(14px, 1.2vw + 10px, 18px); font-weight: 600; }
.pc-pct { font-size: 1.35em; font-weight: 800; margin-right: 2px; }
.pc-count span { white-space: nowrap; }
.pc-count { font-size: clamp(12px, 0.8vw + 9px, 15px); color: var(--muted, var(--mut)); margin-top: 2px; font-variant-numeric: tabular-nums; }
.pt { display: flex; flex-direction: column; gap: 10px; margin: 8px 0 14px; }
.pt-subj { margin: 4px 0 0; font-size: clamp(16px, 1.3vw + 12px, 22px); font-weight: 800; color: var(--ink); }
.pt-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px;
  padding: 10px 12px;
  border: 3px solid var(--edge);
  border-radius: 16px;
  font-size: clamp(14px, 1.2vw + 10px, 19px);
  font-weight: 600;
  background: var(--card);
  color: var(--ink);
}
.pt-row.weak { background: var(--card2); border-color: var(--bad-ink); }
.pt-row.idle { background: var(--card2); border-color: var(--edge); color: var(--ink); }
.pt-row.mastered { background: var(--card2); border-color: var(--edge); }
.pt-name { flex: 1 1 55%; min-width: 0; font-weight: 700; color: var(--ink); }
.pt-status {
  font-weight: 800; font-size: .85em; white-space: nowrap;
  border-radius: 999px; padding: 2px 10px; border: 2px solid var(--line);
  background: var(--card); color: var(--ink);
}
.pt-row.idle .pt-status { background: var(--card2); }
.pt-row.mastered .pt-status { background: var(--ok); }
.pt-bar { flex: 1 1 120px; height: 14px; border-radius: 7px; background: var(--card2); border: 2px solid var(--line); overflow: hidden; }
.pt-bar span { display: block; height: 100%; background: var(--ok); }
.pt-row.weak .pt-bar span { background: var(--bad-ink); }
.pt-row.idle .pt-bar span { background: #B8B0D6; }
.pt-val { font-weight: 800; white-space: nowrap; color: var(--ink); }
.pt-acc { flex: 1 1 100%; font-size: clamp(12px, 1vw + 10px, 16px); font-weight: 600; color: var(--ink); opacity: .9; }
.pt-flag { background: var(--bad-ink); color: var(--ink); border-radius: 10px; padding: 1px 10px; font-size: .85em; font-weight: 800; }
.pt-idle { margin: 0; border: 0; }
.pt-idle summary {
  cursor: pointer; font-weight: 700; color: var(--ink);
  padding: 6px 2px; font-size: clamp(14px, 1.1vw + 11px, 18px);
}
.pt-idle .pt { margin: 8px 0 0; }
.pm-title { margin: 12px 0 6px; font-size: clamp(16px, 1.2vw + 12px, 22px); }
.pm { margin: 0 0 14px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: clamp(14px, 1.2vw + 10px, 19px); }
.pm li { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.pm-text { min-width: 0; font-weight: 600; }
.pm b { white-space: nowrap; color: var(--bad-ink); }
.pc-confirm p { margin: 0 0 10px; font-weight: 700; }

@media (min-width: 560px) {
  .ava-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); max-width: none; width: 100%; margin-left: auto; margin-right: auto; }
  .pt-name { flex: 1 1 50%; }
}

/* ---------- герои ---------- */
.mini-hero-slot { display: flex; flex: none; }
.mini-hero-slot:empty { display: none; }
.mini-hero {
  position: relative;
  width: 60px;
  height: 60px;
  padding: 0;
  border: 4px solid var(--line);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 70%, var(--card2) 0%, var(--card2) 70%);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.mini-hero img {
  position: absolute;
  left: 50%;
  display: block;
  pointer-events: none;
  transform: translateX(-50%);
}
.mini-hero.whole img { width: 56px; height: 56px; bottom: -3px; }
/* голова подростка и старше обрезана по шее: низ уходит за край кружка */
.mini-hero.neck img { width: 66px; height: 66px; bottom: -14px; }
.mini-hero.is-happy img { animation: mh-happy .8s ease-in-out 2; }
.mini-hero.is-sad img { animation: mh-sad 1.3s ease-in-out 1; }
@keyframes mh-happy {
  0%, 100% { transform: translateX(-50%) translateY(0) rotate(0); }
  35% { transform: translateX(-50%) translateY(-9px) rotate(-7deg); }
  70% { transform: translateX(-50%) translateY(0) rotate(5deg); }
}
@keyframes mh-sad {
  0%, 100% { transform: translateX(-50%) translateY(0) rotate(0); }
  30% { transform: translateX(-50%) translateY(5px) rotate(-6deg); }
  60% { transform: translateX(-50%) translateY(5px) rotate(5deg); }
}

.hero-card {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2vw, 18px);
  width: 100%;
  margin: 0 0 clamp(14px, 2vw, 22px);
  padding: 12px clamp(12px, 2vw, 20px) 12px 12px;
  background: var(--card);
  border: 4px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.hc-img {
  flex: none;
  width: clamp(84px, 22vw, 124px);
  height: clamp(84px, 22vw, 124px);
  border: 3px solid var(--line);
  border-radius: 24px;
  background: radial-gradient(circle at 50% 62%, var(--card2) 0%, var(--card2) 75%);
  overflow: hidden;
}
.hc-img img { display: block; width: 100%; height: 100%; }
.hc-img.egg img { animation: zg-wobble 2.6s ease-in-out infinite; transform-origin: 50% 86%; }
.hc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.hc-name { font-size: var(--fs-h2); font-weight: 800; line-height: 1.1; overflow-wrap: break-word; }
.hc-stage { font-size: clamp(14px, 1vw + 11px, 18px); font-weight: 600; color: var(--ink); }
.hc-cel {
  align-self: flex-start;
  padding: 2px 10px;
  background: var(--yellow);
  border: 3px solid var(--line);
  border-radius: 12px;
  font-size: clamp(14px, 1vw + 11px, 18px);
  font-weight: 800;
}
.hc-bar { height: 14px; background: var(--card); border: 3px solid var(--line); border-radius: 10px; overflow: hidden; }
.hc-bar span { display: block; height: 100%; background: var(--ok); }
.hc-hint { font-size: clamp(14px, 1vw + 11px, 18px); font-weight: 500; line-height: 1.3; overflow-wrap: break-word; }
.hc-go { font-size: clamp(14px, 1vw + 11px, 18px); font-weight: 800; color: #6B1BA8; }

.ph {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0 4px;
  padding: 10px;
  background: var(--card);
  border: 3px solid var(--line);
  border-radius: 20px;
}
.ph-img { flex: none; width: 64px; height: 64px; }
.ph-img img { display: block; width: 64px; height: 64px; }
.ph-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; font-size: 16px; }
.ph-hint, .ph-meta { font-size: 15px; line-height: 1.3; }
.ph-meta { color: var(--ink); }

.zg-cel {
  margin: 0 0 12px;
  padding: 10px 14px;
  background: var(--yellow);
  border: 4px solid var(--line);
  border-radius: 20px;
  font-weight: 800;
  color: var(--ink);
}
.zg-scene {
  position: relative;
  width: 100%;
  margin: 0 auto 16px;
  overflow: hidden;
  background: var(--card2);
  border: 4px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--shadow);
  contain: layout paint;
}
.zg-scene.landscape { aspect-ratio: 16 / 9; max-width: calc((100vh - 110px) * 16 / 9); min-width: min(100%, 560px); }
.zg-scene.portrait { aspect-ratio: 9 / 16; max-width: 640px; }
.zg-bg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; }
.zg-i, .zg-hero, .zg-chest { position: absolute; display: block; }
.zg-i { height: auto; pointer-events: none; user-select: none; }
.zg-chest { padding: 0; border: 0; background: none; cursor: pointer; aspect-ratio: 1; }
.zg-chest img { display: block; width: 100%; height: 100%; pointer-events: none; }
.zg-chest:focus-visible { outline: 4px solid var(--yellow); outline-offset: -20%; }
.zg-badge {
  position: absolute;
  top: 38%;
  right: 12%;
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border: 3px solid var(--line);
  border-radius: 14px;
  background: var(--pink);
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
  line-height: 22px;
}
.zg-hero { aspect-ratio: 1; pointer-events: none; transition: left 2.4s linear, top 2.4s linear; }
.zg-hero img { display: block; width: 100%; height: 100%; transform-origin: 50% 86%; }
.zg-hero.walker img { animation: zg-breathe 2.4s ease-in-out infinite; }
.zg-hero.walker.moving img { animation: zg-bob .4s ease-in-out infinite alternate; }
.zg-hero.walker.flip img { scale: -1 1; }
.zg-hero.walker.on-swing img { animation: zg-swing 2.2s ease-in-out infinite; transform-origin: 50% -30%; }
.zg-hero.idle img { animation: zg-breathe 3s ease-in-out infinite; }
.zg-hero.egg img { animation: zg-wobble 2.6s ease-in-out infinite; }
@keyframes zg-bob { from { transform: translateY(0) rotate(-2deg); } to { transform: translateY(-4%) rotate(2deg); } }
@keyframes zg-breathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.03, .97); } }
@keyframes zg-swing { 0%, 100% { transform: rotate(-7deg); } 50% { transform: rotate(7deg); } }
@keyframes zg-wobble {
  0%, 60%, 100% { transform: rotate(0); }
  70% { transform: rotate(-6deg); }
  80% { transform: rotate(5deg); }
  90% { transform: rotate(-3deg); }
}
.zg-info { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.zg-chest-panel h2, .zg-col h2 { margin: 0 0 12px; font-size: var(--fs-h2); }
.zg-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.zg-item, .zc {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 6px;
  background: var(--card);
  border: 3px solid var(--line);
  border-radius: 18px;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  overflow-wrap: break-word;
  min-width: 0;
}
.zg-item.new { background: var(--card2); }
.zg-item img, .zc img { width: 96px; height: 96px; max-width: 100%; display: block; object-fit: contain; }
.zg-empty, .zg-faded { margin: 8px 0 0; font-size: 16px; line-height: 1.35; }
.zc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.zc b { font-size: 15px; }
.zc-st { font-size: 13px; font-weight: 500; color: var(--ink); }
.zc.locked { background: var(--card2); color: #3A3358; }
@media (min-width: 700px) { .zc-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (max-width: 699px) {
  .top:not(.home) {
    grid-template-columns: auto auto 1fr auto auto;
    grid-template-areas:
      "back home . hero stars"
      "title title title title title";
  }
  .top:not(.home) .mini-hero-slot { grid-area: hero; }
}
@media (prefers-reduced-motion: reduce) {
  .mini-hero img, .zg-hero img, .hc-img.egg img { animation: none !important; }
  .zg-hero { transition: none; }
}

/* ---------- герои 2026-12-05-4: по одному на предмет + заяц ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hero-cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin: 0 0 clamp(14px, 2vw, 22px); }
@media (min-width: 760px) { .hero-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.hero-cards .hero-card { margin: 0; align-items: flex-start; padding: 10px 12px 10px 10px; }
.hero-cards .hc-img { width: clamp(72px, 19vw, 96px); height: clamp(72px, 19vw, 96px); border-radius: 20px; }
.hero-cards .hc-name { font-size: clamp(18px, 1vw + 14px, 22px); }
.hero-cards .hc-stage, .hero-cards .hc-hint { font-size: clamp(14px, .6vw + 12px, 16px); }
.hero-card.bonus { background: var(--card2); }
.hc-subj { font-size: 13px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; color: #6B1BA8; }
.hc-zagon {
  grid-column: 1 / -1; justify-self: start;
  padding: 10px 18px; border: 3px solid var(--line); border-radius: 999px;
  background: var(--card2); color: var(--ink); font: inherit; font-weight: 800; cursor: pointer;
}
.hero-cards.in-zagon { margin-top: 14px; }
.ht-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 4px; }
.ht {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 4px 2px; border: 2px solid var(--line); border-radius: 12px; background: var(--card);
  font-size: 13px; line-height: 1.15; min-width: 0;
}
.ht b { font-size: 15px; }
.ht i { font-style: normal; letter-spacing: 1px; color: #6B1BA8; }
.ht em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.ht.done { background: var(--card2); }
.ht.done i { color: #138A44; }
.ht.faded { background: var(--card2); border-style: dashed; }
.ht.faded em { color: #A2480C; }
.ph-list { display: flex; flex-direction: column; gap: 0; }
.ph-list .ph { align-items: flex-start; }
.ph-list .ph-img, .ph-list .ph-img img { width: 56px; height: 56px; }
.zc-subj { font-size: 12px; font-weight: 700; color: #6B1BA8; }
.zg-hero .zg-accs { position: absolute; inset: 0; pointer-events: none; }
.zg-hero.walker.flip { scale: -1 1; }
.zg-hero.walker.flip img { scale: none; }
.zg-acc { position: absolute; display: block; height: auto; max-width: none; }
.zg-hero.walker img.zg-acc { animation: none; }
.zg-hero.idle { pointer-events: auto; padding: 0; border: 0; background: none; cursor: pointer; }
.zg-leg-h { margin: 16px 0 8px; font-size: 18px; }
.zg-leg-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 0; }
.zg-leg-cells { display: flex; gap: 8px; }
.zg-leg { display: grid; place-items: center; width: 64px; height: 64px; border: 3px solid var(--line); border-radius: 16px; background: var(--card2); }
.zg-leg.empty { border-style: dashed; color: #8A7BB8; font-size: 24px; font-weight: 800; background: var(--card2); }
.items-wait { margin-top: 18px; }
.ph-bar { height: 12px; }

/* 2026-12-05-4: необязательная картинка-пароль */
.pw-set { margin: 4px 0 8px; }
.f-note { margin: 6px 0; font-size: 15px; color: var(--ink); opacity: .8; }
.f-ok { margin: 6px 0; padding: 8px 12px; border-radius: 12px; background: var(--card2); color: var(--ok-ink); font-weight: 700; font-size: 15px; }
.pw-toggle { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 14px 6px 6px; border: 3px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); font: inherit; font-weight: 800; cursor: pointer; }
.pw-knob { position: relative; width: 52px; height: 30px; border-radius: 999px; background: var(--card2); transition: background .15s; flex: none; }
.pw-knob::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--card); border: 2px solid var(--line); box-sizing: border-box; transition: transform .15s; }
.pw-toggle.on .pw-knob { background: var(--ok); }
.pw-toggle.on .pw-knob::after { transform: translateX(22px); }
.pw-toggle:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.pw-forgot { margin: 12px 0 0; font-size: 14px; opacity: .75; text-align: center; }
.pc-pw { margin: 8px 0 0; font-size: 14px; opacity: .8; }

/* 2026-12-05-4: естествознание и познание мира */
.tile.science { background: #7EE2A8; }
.tile.world { background: #8EC5FF; }
/* длинные слова в названиях тем (естествознание, познание мира) – чуть мельче, чтобы не рвались посередине */
.path.long-words .path-label { font-size: clamp(16px, 1.6vw + 11px, 22px); }

/* 2026-12-05-5: литературное чтение и казахский */
.tile.reading { background: #FFB27A; }
.tile.kazakh { background: #6FD6E8; }
.keypad.kk .btn { font-family: var(--font); }

/* 2026-12-06-1: темы длинными строками – значок «иконка · N четв.» слева сверху, название, у начатой темы полоска */
.path-node {
  min-height: 0;
  height: auto;
  padding: 10px 16px 12px;
  border-radius: 24px;
}
.path-node .path-label { font-size: clamp(18px, 1.2vw + 14px, 24px); line-height: 1.22; hyphens: manual; -webkit-hyphens: manual; }
.path.long-words .path-label { font-size: clamp(17px, 1vw + 13px, 22px); }
.path-node .path-dot { margin-bottom: 4px; white-space: nowrap; }
.path-node.is-progress { background: var(--todo); color: var(--ink); }
.path-node.is-progress .path-progress { color: var(--ink); }
.path-foot { justify-content: flex-start; gap: 10px; padding-top: 8px; }
.path-bar { flex: 1 1 auto; max-width: 220px; height: 8px; border-radius: 6px; background: rgba(255,255,255,.35); overflow: hidden; }
.path-bar > span { display: block; height: 100%; background: var(--yellow); border-radius: 6px; }
.path-progress { font-size: clamp(13px, 0.6vw + 11px, 16px); font-weight: 700; white-space: nowrap; }
.path-complete { font-size: clamp(13px, 0.6vw + 11px, 16px); }
.path-sub { font-size: clamp(13px, 0.6vw + 11px, 16px); font-weight: 700; opacity: .85; margin-top: 2px; }
.path-note { font-size: clamp(13px, 0.6vw + 11px, 16px); font-weight: 700; line-height: 1.25; }
.path-node.is-locked { background: #6E6790; color: var(--ink); cursor: not-allowed; box-shadow: none; opacity: .92; }
.path-node.is-locked .path-dot { background: var(--card2); }
/* выбор тем для контрольной предмета */
.exam-pick-quick { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; }
.exam-pick-quick .btn { flex: 1 1 auto; min-width: 0; }
.mix-grid.one-col { grid-template-columns: minmax(0, 1fr); }
.mix-check .mix-q { flex: none; margin-left: auto; font-size: 12px; font-weight: 800; padding: 2px 8px; border-radius: 10px; border: 2px solid var(--line); background: var(--card); color: var(--ink); white-space: nowrap; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.exam-total { font-size: 18px; font-weight: 800; color: var(--ink); margin: 14px 0 0; }

/* кабинет родителя: предмет – отдельный блок, «Не начато» сразу под заголовком */
.pt-block { background: var(--card2); border: 1.5px solid var(--edge); border-radius: 16px; padding: 12px 12px 10px; margin: 0 0 18px; }
.pt-block .pt-subj { margin: 0; }
.pt-block .pt-idle { margin: 6px 0 0; }
.pt-block > .pt { margin: 10px 0 2px; }
.pc-weak { background: var(--card2); border: 1.5px solid var(--edge); border-radius: 16px; padding: 12px; margin: 0 0 18px; }
.pc-weak-title { margin: 0; font-size: clamp(16px, 1.3vw + 12px, 22px); font-weight: 800; color: var(--ink); }
.pc-weak-hint { margin: 4px 0 8px; font-size: 14px; line-height: 1.35; color: var(--muted, var(--mut)); }
.pc-weak ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pc-weak li { display: flex; justify-content: space-between; gap: 10px; font-size: 15px; font-weight: 600; }
.pc-weak li b { color: #C03A3A; white-space: nowrap; }

/* шапка ребёнка: цель дня, серия, звёзды */
.daily { background: var(--card); border: 3px solid var(--ink, var(--edge)); border-radius: 22px; padding: 12px 14px; margin: 0 0 14px;
  box-shadow: 0 5px 0 var(--ink, #0A0720); color: var(--ink, var(--ink)); }
.daily .dg { display: flex; align-items: center; gap: 12px; }
.daily .dg-ring { flex: 0 0 auto; }
.daily .dg-arc { transition: stroke-dashoffset .5s ease; }
.daily .dg-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.daily .dg-text b { font-size: clamp(16px, 1.2vw + 12px, 21px); font-weight: 800; line-height: 1.2; }
.daily .dg-sub { font-size: 15px; font-weight: 600; color: var(--muted, var(--mut)); }
.daily .ds-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.daily .ds-streak, .daily .ds-stars { font-weight: 800; font-size: 16px; background: var(--card2); border-radius: 999px; padding: 5px 12px; white-space: nowrap; }
.daily .ds-streak.zero { background: var(--card2); font-weight: 700; color: #4B4270; }
.daily.done { background: var(--card); }
.daily.cel { animation: daily-pop .6s ease 2; }
@keyframes daily-pop { 50% { transform: scale(1.03); } }
.daily-toast { position: fixed; left: 50%; top: 18px; transform: translateX(-50%); z-index: 50; background: #2FB463; color: var(--ink);
  font-weight: 800; font-size: 18px; padding: 12px 20px; border-radius: 999px; box-shadow: 0 6px 18px rgba(0,0,0,.2); transition: opacity .5s, transform .5s; }
.daily-toast.out { opacity: 0; transform: translateX(-50%) translateY(-12px); }
.daily-toast .dt-fx { display: inline-block; animation: daily-pop .5s ease 3; }
@media (prefers-reduced-motion: reduce) { .daily.cel, .daily-toast .dt-fx { animation: none; } .daily .dg-arc { transition: none; } }
.pt-block .pt-sum { margin: 4px 0 0; font-size: 15px; font-weight: 600; color: var(--muted, var(--mut)); }
.pt-block .pt-sum span { white-space: nowrap; }

/* кабинет родителя – отчёт (2026-12-06-1) */
.rp-sec { background: var(--card2); border: 1.5px solid var(--edge); border-radius: 16px; padding: 12px; margin: 0 0 14px; color: var(--ink, var(--ink)); }
.rp-sec h3 { margin: 0 0 8px; font-size: clamp(17px, 1.2vw + 13px, 22px); font-weight: 800; }
.rp-sub { font-size: 14px; font-weight: 600; color: var(--muted, var(--mut)); margin-left: 4px; white-space: nowrap; }
.rp-note { margin: 6px 0 0; font-size: 14px; line-height: 1.35; color: var(--muted, var(--mut)); }
.rp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.rp-cell { background: var(--card); border-radius: 12px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.rp-cell span { font-size: 13px; font-weight: 600; color: var(--muted, var(--mut)); }
.rp-cell b { font-size: 19px; font-weight: 800; white-space: nowrap; }
.rp-needs .rp-note { margin: 0 0 8px; }
.rp-need { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--card); border-radius: 12px; padding: 8px 10px; margin-top: 6px; }
.rp-need-t { display: flex; flex-direction: column; min-width: 0; }
.rp-need-t b { font-size: 15px; overflow-wrap: anywhere; }
.rp-need-t span { font-size: 13px; color: var(--muted, var(--mut)); font-weight: 600; }
.rp-need .btn.small, .btn.small { padding: 6px 12px; font-size: 14px; min-height: 0; white-space: nowrap; flex: 0 0 auto; }
.rp-recent ul, .rp-wrong ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rp-recent li { background: var(--card); border-radius: 12px; padding: 8px 10px; font-size: 15px; font-weight: 600; }
.rp-exam { background: var(--card); border-radius: 12px; padding: 8px 10px; margin-top: 6px; }
.rp-exam-h { display: flex; gap: 8px; align-items: baseline; }
.rp-exam-h span { flex: 1 1 auto; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.rp-pct { font-size: 18px; }
.rp-exam-t { font-size: 13px; color: var(--muted, var(--mut)); margin-top: 2px; }
.rp-exam-t.ok { color: #2A8A4B; font-weight: 700; }
.rp-wrong summary, .rp-subjects > summary, .rp-heroes > summary { cursor: pointer; font-weight: 800; padding: 4px 0; }
.rp-subjects > summary, .rp-heroes > summary { font-size: clamp(17px, 1.2vw + 13px, 22px); }
.rp-wrong li { border-top: 1px solid var(--edge); padding-top: 6px; font-size: 14px; }
.rp-ans { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 2px; color: var(--muted, var(--mut)); }
.rp-ans b { color: #2A8A4B; }
.rp-subj { display: flex; flex-direction: column; gap: 2px; background: var(--card); border-radius: 12px; padding: 8px 10px; margin-top: 6px; }
.rp-subj span { font-size: 14px; color: var(--muted, var(--mut)); font-weight: 600; }
.rp-subj.none span { font-style: italic; }

/* ---------- главная (2026-12-06-1): предметы на первом экране ---------- */
.top.home.compact-top { gap: 4px; }
.top.home .hello-row h1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.daily { display: flex; align-items: center; gap: 10px; padding: 8px 12px; margin: 0 0 12px; max-height: 90px; box-sizing: border-box; box-shadow: 0 4px 0 var(--ink, #0A0720); }
.daily .dg-ring { width: 54px; height: 54px; flex: 0 0 54px; }
.daily .dg-text { flex: 1 1 auto; min-width: 0; gap: 0; }
.daily .dg-text b { font-size: 16px; line-height: 1.2; }
.daily .dg-sub { font-size: 13px; }
.daily .ds-col { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: 0 0 auto; }
.daily .ds-streak, .daily .ds-stars { font-size: 14px; padding: 3px 10px; }
.daily .ds-stars b { font-weight: 800; }
.tiles.subjects { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tiles.subjects .tile { min-height: 116px; padding: 10px 8px 14px; gap: 4px; box-shadow: 0 6px 0 #0A0720; border-width: 3px; }
.tiles.subjects .tile .tile-ico { width: 52px; height: 52px; }
.tiles.subjects .tile-title { font-size: clamp(15px, 1vw + 12px, 22px); }
.tiles.subjects .tile-sub { display: none; }
.tile-hero { position: absolute; top: 4px; right: 4px; width: 40px; height: 40px; border-radius: 12px; background: rgba(255,255,255,.75); overflow: hidden; }
.tile-hero img { width: 100%; height: 100%; object-fit: contain; display: block; }
.tile-hbar { position: absolute; left: 12px; right: 12px; bottom: 6px; height: 4px; border-radius: 4px; background: rgba(27,18,69,.15); overflow: hidden; }
.tile-hbar span { display: block; height: 100%; background: #2FB463; border-radius: 4px; }
.tiles.extras { margin-top: 14px; }
.tiles.extras:empty { display: none; }
.zagon-col { margin-top: 14px; }
@media (min-width: 560px) {
  .tiles.subjects { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .tiles.subjects .tile { min-height: 150px; }
  .tiles.subjects .tile .tile-ico { width: 72px; height: 72px; }
  .tiles.subjects .tile-sub { display: block; font-size: 14px; }
  .tile-hero { width: 52px; height: 52px; }
}
/* карточка героя на странице предмета – компактная */
.subj-hero { align-items: center; padding: 8px 12px 8px 8px; }
.subj-hero .hc-img { width: 72px; height: 72px; flex: 0 0 72px; border-radius: 16px; }
.subj-hero .hc-name { font-size: clamp(17px, 1vw + 13px, 21px); }
.subj-hero .hc-hint { font-size: 14px; }

/* iPad/тач: цели нажатия в кабинете родителя не меньше 44 px (2026-12-06-1) */
.rp-need .btn.small, .btn.small { min-height: 44px; }
.rp-wrong summary, .rp-subjects > summary, .rp-heroes > summary { min-height: 44px; display: flex; align-items: center; }
.soon-box { text-align: center; padding: 22px 16px; }
.soon-box p { margin: 0; font-size: 20px; font-weight: 800; color: var(--ink, var(--ink)); }


/* ===================== Тема v6 (дизайнер «Фриланс Дизайн», утверждено Игорем) =====================
   Слой поверх старых стилей: палитра, заголовки Philosopher, золотые и каменные кнопки, главная с героями. */
@font-face {
  font-family: "Philosopher";
  src: url("fonts/Philosopher-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
:root {
  --bg0: #0D0A24; --bg1: #171243;
  --card: #1D1850; --card2: #262063; --edge: #3C3585;
  --gold: #F6C453; --gold2: #FFE08A; --goldd: #A9741A;
  --ink: #FFF4DC; --mut: #CBC4F0; --dark: #2B1A02;
  --ink2: #CBC4F0;
  --bg: #171243;
  --surface: #262063;
  --line: #3C3585;
  --todo: #2C2675; --soon: #3A3392;
  --shadow: 0 6px 0 rgba(4, 2, 20, .7);
  --shadow-sm: 0 4px 0 #0A0720;
  --ok-ink: #5EE08F; --bad-ink: #FF8A8A;
  --head: "Philosopher", "Rubik", system-ui, sans-serif;
}
html { background: var(--bg0); }
body {
  color: var(--ink);
  background-color: var(--bg0);
  background-image:
    radial-gradient(1.5px 1.5px at 30px 40px, rgba(255, 255, 255, .7), transparent),
    radial-gradient(1px 1px at 120px 90px, rgba(255, 255, 255, .6), transparent),
    radial-gradient(1.5px 1.5px at 250px 30px, rgba(255, 233, 168, .7), transparent),
    radial-gradient(1px 1px at 340px 120px, rgba(255, 255, 255, .5), transparent),
    radial-gradient(120% 50% at 50% -8%, rgba(110, 80, 230, .40), transparent 62%),
    radial-gradient(90% 40% at 100% 100%, rgba(60, 40, 160, .35), transparent 70%),
    linear-gradient(180deg, var(--bg1), var(--bg0) 70%);
  background-size: 390px 260px, 390px 260px, 390px 260px, 390px 260px, auto, auto, auto;
  background-repeat: repeat, repeat, repeat, repeat, no-repeat, no-repeat, no-repeat;
  background-attachment: scroll, scroll, scroll, scroll, fixed, fixed, fixed;
}
#app { background: transparent; }
.play-dock { background-image: none; box-shadow: none; }

/* заголовки – Philosopher; задания и цифры – Rubik */
h1, h2, h3, .tile-title, .section-title, .hc-name, .rp-sec h3, .picker h2, .exam-btn-title, .pc-name h2, .zg-col h2 {
  font-family: var(--head);
  font-weight: 700;
  letter-spacing: 0;
}
.prompt, .qcard, .keypad, .blank, .btn-row.choices .btn, .path-label { font-family: var(--font); }
.muted, .lead, .short-note, .note, .tile-sub, .path-sub, .path-note { color: var(--mut); }
.lead.dark, .muted.dark { color: var(--mut); }

/* карточки – камень */
.card, .picker, .form-card, .pw-card, .error-box, .memo, .qcard, .rp-sec, .pt-block, .daily, .hero-card, .exam-block .exam-btn {
  background: linear-gradient(180deg, var(--card2), var(--card));
  border-color: var(--edge);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.rp-cell, .rp-need, .rp-exam, .rp-subj, .rp-recent li { background: #120E38; color: var(--ink); }
.pc-weak { background: #2A1838; border-color: #6B3A5C; }
.error-box { color: var(--ink); }

/* кнопки: золотая основная, каменная второстепенная */
.btn {
  background: linear-gradient(#3A3392, #241E66);
  border: 2px solid var(--gold);
  color: var(--gold2);
  box-shadow: 0 5px 0 #0A0720, inset 0 1px 0 rgba(255, 255, 255, .2);
}
.btn.primary {
  background: linear-gradient(#FFE08A, #F6C453 55%, #E2A733);
  color: var(--dark);
  border-color: var(--goldd);
  box-shadow: 0 5px 0 #7A5210, inset 0 2px 0 rgba(255, 255, 255, .55);
}
.btn.danger { background: linear-gradient(#7A2340, #5A1830); border-color: #FF8A8A; color: #FFE1E5; }
.btn[disabled] { opacity: .5; }
/* круглые «Назад» и «Домой» – 52 px */
.top .btn-back, .top .crumb-home, .top [data-act="back"] {
  width: 52px; height: 52px; min-width: 52px; min-height: 52px; padding: 0; border-radius: 50%;
  display: inline-grid; place-items: center;
  background: linear-gradient(#3A3392, #241E66); border: 2px solid var(--gold); color: var(--gold2);
  box-shadow: 0 4px 0 #0A0720, inset 0 1px 0 rgba(255, 255, 255, .25);
}
.top .btn-back svg, .top .crumb-home svg { color: var(--gold2); }
.top .crumb-home svg path { fill: none; stroke: var(--gold2); stroke-width: 9; }
.stars {
  background: linear-gradient(#FFE08A, #F6C453); color: var(--dark); border: 2px solid var(--goldd);
  box-shadow: 0 3px 0 #7A5210;
}
.stars svg path { fill: var(--dark); }

/* списки тем */
.path-node { background: linear-gradient(180deg, var(--card2), var(--card)); border-color: var(--edge); color: var(--ink); box-shadow: 0 4px 0 #0A0720; }
.path-node.is-progress { background: linear-gradient(180deg, #2E2878, #221C62); }
.path-node.is-done { background: linear-gradient(180deg, #1F4A3A, #173A2E); border-color: #3E8E67; }
.path-node.is-locked { opacity: .6; }
.path-dot { background: #0F0B30; color: var(--gold2); border-color: var(--gold); }
.path-bar { background: #0B0820; }
.path-bar > span { background: linear-gradient(90deg, var(--gold), var(--gold2)); }
.path-progress { color: var(--gold2); }   /* 6-4: текст «начато / пройдено N%» был светлым на жёлтой заливке */
.section-title { color: var(--gold2); }
.subj-sub { margin: 4px 2px 12px; color: var(--mut); font-size: var(--fs-sub); }
.mult-link { margin-top: 14px; }

/* выбор в контрольной */
.mix-check { background: #120E38; border-color: var(--edge); color: var(--ink); }
.mix-check.on { border-color: var(--gold); background: #2A2270; }
.mix-mark { border-color: var(--gold); background: #0F0B30; }
.mix-check.on .mix-mark { background: var(--gold); }

/* ---------- экран задания: спокойный ---------- */
.play-screen .prompt, .qcard { color: var(--ink); }
.btn-row.choices .btn, .clock-choice {
  min-height: 64px;
  background: linear-gradient(#2A2370, #201A5C);
  border: 2px solid var(--edge);
  color: var(--ink);
  box-shadow: 0 5px 0 #0A0720;
}
.btn-row.choices .btn.on, .btn-row.choices .btn.selected, .btn-row.choices .btn[aria-pressed="true"], .clock-choice.selected {
  border-color: var(--gold);
  background: linear-gradient(#3F3797, #2B2478);
  box-shadow: 0 5px 0 #0A0720, 0 0 0 4px rgba(246, 196, 83, .3), 0 0 22px rgba(246, 196, 83, .35);
}
.blank { background: #0F0B30; border-color: var(--edge); color: var(--gold2); }
.blank.active { border-color: var(--gold); background: #2A2270; }
.keypad .btn { background: linear-gradient(#2A2370, #201A5C); border-color: var(--edge); color: var(--ink); }
.fb { background: linear-gradient(180deg, var(--card2), var(--card)); border-color: var(--edge); color: var(--ink); }
.fb.right, .feedback.ok { border-color: #3E8E67; background: linear-gradient(180deg, #1F4A3A, #173A2E); }
.fb.wrong, .feedback.bad { border-color: #A8506A; background: linear-gradient(180deg, #4A1F33, #3A1828); }
.fb.hint { background: transparent; border: 0; box-shadow: none; padding: 4px 2px; text-align: center; }
.fb.hint .fb-hint { color: var(--mut); font-size: 16px; margin: 0; }
.fb-ico { display: none; }
.play-dock { background: linear-gradient(180deg, rgba(13, 10, 36, 0), rgba(13, 10, 36, .96) 30%); }
.progress-bar { background: #0B0820; border-color: rgba(255, 255, 255, .14); }
/* головка героя в шапке задания – 56 px */
.mini-hero-slot .mini-hero { width: 56px; height: 56px; }

/* ---------- главная v6 ---------- */
.top.home .hello-row h1 { font-size: clamp(24px, 3vw + 14px, 36px); color: var(--ink); text-shadow: 0 2px 0 rgba(0, 0, 0, .45); }
.top.home .hello-ill { border-radius: 50%; border: 3px solid var(--gold); box-shadow: 0 0 0 3px rgba(246, 196, 83, .25); overflow: hidden; }
.tiles.subjects.st-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tiles.subjects .tile.st {
  --acc: #8E7CFF;
  position: relative; overflow: hidden; display: block; text-align: left;
  min-height: 0; height: clamp(90px, calc((100svh - 290px) / 4), 120px); padding: 0; gap: 0;
  border-radius: 20px; border: 2px solid var(--acc);
  background: linear-gradient(180deg, var(--card2), var(--card));
  box-shadow: 0 5px 0 rgba(4, 2, 20, .7), 0 0 22px -8px var(--acc);
  color: var(--ink);
}
.tile.st .st-art { position: absolute; right: -6px; bottom: -4px; width: 58%; height: 100%; display: flex; align-items: flex-end; justify-content: flex-end; pointer-events: none; }
.tile.st .st-art img { width: auto; height: 118%; max-width: none; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .5)); }
.tile.st.egg .st-art img { height: 92%; margin-right: 6px; margin-bottom: 6px; }
.tile.st .st-ico { width: 56px; height: 56px; margin: 0 10px 12px 0; opacity: .9; }
.tile.st .st-ico svg { width: 100%; height: 100%; }
.tile.st .st-body { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-start; gap: 3px; padding: 9px 10px 10px 12px; }
.tile.st .tile-title { font-size: 17px; line-height: 1.1; color: var(--ink); text-shadow: 0 2px 3px rgba(0, 0, 0, .85); overflow-wrap: normal; word-break: normal; hyphens: manual; max-width: 100%; }
.tile.st .st-hn { font-size: 12.5px; font-weight: 700; line-height: 1.2; color: var(--acc); filter: brightness(1.25); text-shadow: 0 1px 2px rgba(0, 0, 0, .9);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; margin-top: auto; margin-bottom: 12px; }
.tile.st[data-tile="mix"] .st-hn { display: none; }
.tile.st .tile-hbar { position: absolute; left: 12px; right: 12px; bottom: 9px; height: 6px; border-radius: 4px; background: rgba(11, 8, 32, .85); border: 1px solid rgba(255, 255, 255, .12); overflow: hidden; display: block; margin: 0; width: auto; }
.tile.st .tile-hbar span { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--acc), #fff8); }
.tile.st::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(29, 24, 80, .92) 0%, rgba(29, 24, 80, .55) 45%, transparent 75%); pointer-events: none; }
.tile.st .st-body { z-index: 2; }
.tile.st .st-chip { position: absolute; right: 8px; top: 8px; z-index: 3; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 10px; background: rgba(10, 7, 32, .8); border: 1px solid var(--gold); color: var(--gold2); }
.tile.weak { background: linear-gradient(180deg, #4A1F33, #3A1828); border-color: #A8506A; color: var(--ink); }
.home-actions .btn { background: transparent; border-color: var(--edge); color: var(--mut); box-shadow: none; }

/* шапка цели дня – одной строкой */
.daily { padding: 6px 12px; gap: 10px; border-radius: 18px; margin-bottom: 10px; }
.top.home.compact-top { margin-bottom: 8px; }
.daily .dg-ring { width: 48px; height: 48px; flex: 0 0 48px; }
.daily .dg-ring circle:first-child { stroke: #0B0820; }
.daily .dg-ring text { fill: var(--ink); }
.daily .dg-text b { font-size: 15px; color: var(--ink); }
.daily .dg-sub { font-size: 13px; color: var(--mut); }
.daily .ds-streak { background: rgba(255, 154, 60, .15); color: #FFD3A8; }
.daily .ds-streak.zero { background: transparent; color: var(--mut); }
.daily .ds-stars.stars {
  /* 6-5: не наследовать тёмный --card2 у .daily .ds-stars; иначе --dark на тёмном фоне (как у Игоря: ⭐ 252) */
  background: linear-gradient(#FFE08A, #F6C453); background-color: #F6C453;
  color: var(--dark); border: 2px solid var(--goldd);
  box-shadow: 0 2px 0 #7A5210; border-radius: 999px; padding: 3px 10px; min-height: 0; width: auto; height: auto;
}
.daily .ds-stars.stars b { color: var(--dark); }

/* 6-5: подписи героев и плашка «яйцо вылупится» – старые цвета светалой темы на тёмном фоне */
.hc-subj, .zc-subj, .hc-go, .ht i { color: var(--gold2); }
.zg-cel, .hc-cel { color: var(--dark); }
.ht.done i { color: #8BE0B0; }
.ht.faded em { color: #FFC59A; }

/* нижняя панель «Предметы / Загон» */
.bnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; gap: 12px; justify-content: center;
  padding: 8px 18px calc(8px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, rgba(13, 10, 36, 0), rgba(13, 10, 36, .95) 30%);
}
.bnav button {
  flex: 1; max-width: 260px; min-height: 52px; border-radius: 18px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font: 700 17px var(--font); color: var(--mut);
  background: var(--card); border: 2px solid var(--edge); box-shadow: 0 4px 0 #0A0720; cursor: pointer;
}
.bnav button.on { color: var(--dark); background: linear-gradient(#FFE08A, #F6C453); border-color: var(--goldd); box-shadow: 0 4px 0 #7A5210; }
.bnav svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
#app:has(.bnav) { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }

/* 2026-12-06-5: нижняя панель как в магазине Индиры, вместо плашки ⏪/🏠 */
html.has-tabbar { --chrome: calc(64px + var(--tg-safe-area-inset-bottom, 0px) + var(--tg-content-safe-area-inset-bottom, 0px)); }
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: none;
  background: color-mix(in srgb, #0D0A24 92%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-top: 1px solid rgba(228, 220, 255, .16);
  padding: 0 4px calc(env(safe-area-inset-bottom, 0px) + var(--tg-safe-area-inset-bottom, 0px) + var(--tg-content-safe-area-inset-bottom, 0px));
}
html.has-tabbar .tabbar { display: flex; }
.tabbar button {
  flex: 1; min-height: 56px; min-width: 44px; border: 0; background: none;
  color: var(--ink2); opacity: .72; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px;
  font: 700 11px var(--font); letter-spacing: .04em; cursor: pointer; padding: 6px 0;
}
.tabbar svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }
.tabbar button[aria-current="page"] { color: #FFE08A; opacity: 1; }
.tabbar button[aria-current="page"] svg { fill: color-mix(in srgb, #F6C453 45%, transparent); }
@media (prefers-reduced-motion: reduce) {
  .tabbar { -webkit-backdrop-filter: none; backdrop-filter: none; }
}

@media (min-width: 700px) {
  .tiles.subjects.st-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  .tiles.subjects .tile.st { height: auto; aspect-ratio: 4 / 5; }
  .tile.st .st-art { width: 100%; height: 56%; top: 6px; bottom: auto; right: 0; justify-content: center; align-items: flex-end; }
  .tile.st .st-art img { height: 100%; }
  .tile.st::after { background: linear-gradient(180deg, transparent 50%, rgba(29, 24, 80, .9) 66%); }
  .tile.st .st-body { justify-content: flex-end; max-width: none; padding: 12px 14px 24px; }
  .tile.st .tile-title { font-size: 21px; }
  .tile.st .st-hn { font-size: 14px; max-width: 100%; margin-top: 0; margin-bottom: 0; }
  .tile.st[data-tile="mix"] .st-hn { display: block; white-space: normal; }
  .tile.st .tile-hbar { bottom: 12px; left: 14px; right: 14px; height: 8px; }
  .tile.st .st-ico { width: 84px; height: 84px; margin: 0 0 28px; }
}
@media (min-width: 1000px) and (max-height: 900px) {
  .tiles.subjects .tile.st { aspect-ratio: 4 / 4.2; }
}

/* заготовка: баннер «Путь героя» на экране предмета (ждёт картинки дизайнера) */
.subj-hero.has-banner { display: block; padding: 0; overflow: hidden; }
.subj-hero.has-banner .hc-banner { display: block; width: 100%; height: auto; aspect-ratio: 800 / 330; object-fit: cover; }
.subj-hero.has-banner .hc-body { padding: 10px 14px 12px; }

/* ---------- аватары v6: круг с золотой рамкой ---------- */
.avatar-img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.hello-ill, .kid-ico, .pc-ava, .pw-ava { border-radius: 50%; overflow: hidden; border: 3px solid var(--gold); box-shadow: 0 0 0 3px rgba(246, 196, 83, .2); background: #0F0B30; }
.ava-grid { display: grid; grid-template-columns: repeat(4, 78px); justify-content: space-between; gap: 12px 8px; max-width: 360px; }
.ava-btn {
  position: relative; width: 78px; height: 78px; min-width: 0; min-height: 0; padding: 0; border-radius: 50%;
  border: 3px solid var(--gold); background: #0F0B30; overflow: visible; box-shadow: 0 4px 0 #0A0720;
}
.ava-btn .avatar-img { border-radius: 50%; }
.ava-btn.on {
  background: #0F0B30; border-width: 4px;
  box-shadow: 0 0 0 4px rgba(246, 196, 83, .35), 0 0 24px rgba(246, 196, 83, .55);
}
.ava-btn.on::after {
  content: ""; position: absolute; right: -2px; bottom: -2px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--gold) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%232B1A02' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/></svg>") center/18px no-repeat;
  border: 2px solid var(--goldd);
}
@media (min-width: 700px) {
  .ava-grid { grid-template-columns: repeat(4, 140px); max-width: 620px; gap: 18px; justify-content: start; }
  .ava-btn { width: 140px; height: 140px; }
  .ava-btn.on::after { width: 34px; height: 34px; background-size: 22px; }
}
@media (min-width: 1100px) {
  .ava-grid { grid-template-columns: repeat(4, 160px); max-width: 700px; }
  .ava-btn { width: 160px; height: 160px; }
}

/* круглые кнопки без подписей на любой ширине (подпись остаётся для экранного диктора) */
.top .crumb-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.top .btn-back, .top .crumb-home { flex: 0 0 52px; gap: 0; }
@media (min-width: 701px) { .top:not(.home) { column-gap: 10px; } .top:not(.home) .title { margin-left: 6px; } }
.top .crumb-home .crumb-ico { display: block; }
.top .btn-back, .top .crumb-home { width: 52px; height: 52px; min-width: 52px; min-height: 52px; padding: 0; }
/* сплошной цвет под золотыми градиентами – для проверки контраста и старых браузеров */
.btn.primary, .stars, .bnav button.on { background-color: #F6C453; }

/* гость: спокойная плашка «прогресс не сохраняется» */
.guest-note {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 14px 0 6px; padding: 12px 14px;
  border-radius: 16px; border: 1px solid var(--edge); background: rgba(29, 24, 80, .85); color: var(--mut);
}
.guest-note p { flex: 1 1 200px; margin: 0; font-size: 15px; line-height: 1.35; color: var(--mut); }
.guest-note .btn.small { flex: 0 0 auto; min-height: 44px; }
.feedback + .guest-note, .fb + .guest-note { margin-top: 10px; }
.play-dock .guest-note.in-dock { margin: 0 0 10px; padding: 10px 12px; background: #1D1850; }
.play-dock .guest-note.in-dock p { font-size: 14px; }
.play-dock:has(.guest-note) { flex-wrap: wrap; }
/* узкие телефоны (360): сетка аватаров сжимается, не вылезая за карточку */
.ava-grid { grid-template-columns: repeat(4, minmax(0, 78px)); }
.ava-btn { width: 100%; height: auto; aspect-ratio: 1 / 1; }
@media (min-width: 700px) { .ava-grid { grid-template-columns: repeat(4, minmax(0, 140px)); } }
@media (min-width: 1100px) { .ava-grid { grid-template-columns: repeat(4, minmax(0, 160px)); } }
@media (max-width: 699px) { .ava-grid { column-gap: 5px; } }

/* 6-1 fix: на телефоне название во всю ширину, под ним слева имя формы и полоска, справа колонка героя 40% – без наложений */
@media (max-width: 699px) {
  .tiles.subjects .tile.st { height: clamp(88px, calc((100svh - 278px) / 4), 124px); display: grid; grid-template-columns: minmax(0, 1fr) 40%; grid-template-rows: auto minmax(0, 1fr); column-gap: 6px; padding: 9px 8px 6px 12px; }
  .tile.st::after { display: none; }
  .tile.st .st-body { display: contents; }
  .tile.st .tile-title { grid-column: 1 / -1; grid-row: 1; font-size: 16.5px; line-height: 1.05; }
  .tile.st:has(.st-chip) .tile-title { padding-right: 62px; }
  .tile.st .st-art { position: static; grid-column: 2; grid-row: 2; width: auto; height: auto; min-height: 0; align-self: stretch; display: flex; align-items: center; justify-content: center; overflow: hidden; }
  .tile.st .st-art img, .tile.st.egg .st-art img { height: 100%; width: auto; max-width: 100%; max-height: 100%; margin: 0; object-fit: contain; }
  .tile.st .st-art .st-ico { width: auto; height: 100%; max-width: 100%; aspect-ratio: 1; margin: 0; }
  .tile.st .st-hn { grid-column: 1; grid-row: 2; align-self: end; max-width: none; margin: 0 0 12px; font-size: 12px; line-height: 1.12;
    white-space: normal; overflow-wrap: break-word; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .tile.st .tile-hbar { left: 12px; right: calc(40% + 14px); bottom: 9px; }
}
@media (min-width: 700px) and (max-width: 899px) {
  .tile.st .st-art { height: 50%; }
  .tile.st .tile-title { font-size: 19px; }
}
/* очень низкие/узкие телефоны: имя формы в одну строку с многоточием, чтобы не наезжало на название */
@media (max-width: 699px) and (max-height: 650px), (max-width: 374px) {
  .tile.st .st-hn { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11.5px; }
}

/* ---------- 6-2: письменное сложение и вычитание столбиком ---------- */
.qcard .col-prompt { margin-bottom: 6px; }
.colx {
  --cw: 50px; --ch: 60px; --mh: 30px;
  display: grid; grid-template-columns: 34px repeat(var(--w), var(--cw)); column-gap: 6px; row-gap: 6px;
  justify-content: center; align-items: center; margin: 4px auto 6px; width: max-content;
  font-family: "Rubik", system-ui, sans-serif; font-variant-numeric: tabular-nums; color: var(--ink);
}
.colx .cx { display: flex; align-items: center; justify-content: center; height: var(--ch); font-size: 38px; font-weight: 700; line-height: 1; }
.colx .cx.op { font-size: 36px; color: var(--gold2); height: var(--ch); align-self: center; }
.colx .cx.op-sp, .colx .cx.mark-sp { height: var(--mh); }
.colx .cx.dg { border-radius: 10px; background: rgba(255, 255, 255, .04); }
.colx .cx.mark {
  height: var(--mh); width: 30px; justify-self: center; padding: 0; font: 700 18px "Rubik", system-ui, sans-serif; color: var(--gold2);
  border: 2px dashed rgba(203, 196, 240, .45); border-radius: 8px; background: transparent; cursor: pointer;
}
.colx .cx.mark.on { border-style: solid; border-color: var(--gold); background: rgba(246, 196, 83, .12); }
.colx .cx.line { grid-column: 1 / -1; height: 0; border-top: 4px solid var(--ink); border-radius: 2px; margin: 2px 0; }
.colx .cx.op-sp + .cx.dg { }
.colx .cx.ans { border: 3px solid var(--edge); border-radius: 12px; background: #0B0820; color: var(--ink); }
.colx .cx.ans.active { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(246, 196, 83, .25); }
.colx .cx.ans.filled { color: #FFF4DC; }
.colx .cx.ans.ok { border-color: #6FD36B; }
.colx .cx.ans.bad { border-color: #FF7B8A; }
@media (max-width: 360px) { .colx { --cw: 44px; --ch: 54px; } .colx .cx { font-size: 34px; } }
@media (min-width: 700px) { .colx { --cw: 66px; --ch: 78px; --mh: 36px; column-gap: 8px; grid-template-columns: 44px repeat(var(--w), var(--cw)); } .colx .cx { font-size: 50px; } .colx .cx.op { font-size: 46px; } .colx .cx.mark { width: 38px; font-size: 22px; } }

/* 6-2: «Родителям» – круглая кнопка 44 px справа в строке приветствия */
.top.home .hello-row { display: flex; align-items: center; gap: 12px; }
.top.home .hello-row h1 { flex: 1 1 auto; min-width: 0; }
.parent-btn {
  flex: 0 0 auto; margin-left: auto; display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: none; border: 0; padding: 0; cursor: pointer; color: var(--mut); font: 700 10.5px "Rubik", system-ui, sans-serif;
}
.parent-btn .pb-ico {
  width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--card); border: 2px solid var(--edge); box-shadow: 0 3px 0 #0A0720; color: var(--gold2);
}
.parent-btn:active .pb-ico { transform: translateY(2px); box-shadow: 0 1px 0 #0A0720; }
.parent-btn .pb-lbl { line-height: 1; letter-spacing: .01em; }
.mix-subj-line { margin: -4px 0 6px; font-size: 15px; font-weight: 700; color: var(--mut); }

/* 6-2: четверть полным текстом у правого края строки темы, по центру по высоте; название слева, переносится */
.path-node { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; align-items: center; }
.path-node > .path-dot, .path-node > .path-label, .path-node > .path-sub, .path-node > .path-foot { grid-column: 1; }
.path-node > .path-dot { justify-self: start; }
.path-node > .path-pills {
  grid-column: 2; grid-row: 1 / span 8; align-self: center; justify-self: end;
  display: flex; flex-direction: column; align-items: flex-end; gap: 5px;
}
.path-q, .path-t, .mix-q, .mix-t {
  font: 700 12.5px "Rubik", system-ui, sans-serif; line-height: 1.1; white-space: nowrap;
  padding: 4px 9px; border-radius: 999px; border: 1.5px solid rgba(246, 196, 83, .55); color: var(--gold2); background: rgba(10, 7, 32, .55);
}
/* 6-2: метка предстоящей контрольной (data/upcoming.json) – второй «обвод» рядом с четвертью, свой коралловый цвет */
.path-t, .mix-t { border-color: rgba(255, 128, 110, .8); color: #FFC2B8; background: rgba(255, 96, 80, .16); }
@media (min-width: 600px) { .path-node > .path-pills, .mix-check .mix-pills { flex-direction: row; align-items: center; } }
.soon-block { margin-bottom: 14px; }
.soon-cap { margin: 0 0 6px 4px; font: 700 13px "Rubik", system-ui, sans-serif; color: #FFC2B8; letter-spacing: .01em; }
.soon-block .path-node { border-color: rgba(255, 128, 110, .45); }
.exam-pick-quick .soon-btn { border-color: rgba(255, 128, 110, .8); color: #FFD5CE; }
.mix-check .mix-pills { flex: none; margin-left: 10px; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.mix-check .mix-label { flex: 1 1 auto; min-width: 0; overflow-wrap: break-word; }
.exam-block { margin-top: 10px; }
.hero-card.teaser .hc-hint { opacity: .9; }

/* 6-2: на телефоне имя в приветствии не обрезается из-за кнопки «Родителям»: аватар и звёзды компактнее, h1 до 2 строк */
@media (max-width: 499px) {
  .top.home .hello-row { gap: 8px; }
  .top.home .hello-row .hello-ill { width: 46px; height: 46px; flex: none; }
  .top.home .hello-row h1 { font-size: 22px; line-height: 1.08; white-space: normal; overflow: hidden; text-overflow: clip;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow-wrap: break-word; hyphens: manual; }
  .top.home .hello-row > .stars { flex: none; padding: 4px 10px; min-height: 0; height: auto; gap: 5px; }
  .top.home .hello-row > .stars svg { width: 20px; height: 20px; }
  .top.home .hello-row > .stars b { font-size: 18px; }
}

/* 6-3: свёрнутые «По предметам» и «Герои» в кабинете – стрелка ▸/▾ и строка-итог вместо пустой рамки */
.rp-subjects > summary, .rp-heroes > summary { list-style: none; display: flex; flex-wrap: wrap; align-items: center; column-gap: 10px; row-gap: 2px; }
.rp-subjects > summary::-webkit-details-marker, .rp-heroes > summary::-webkit-details-marker { display: none; }
.rp-chev { flex: none; width: 22px; color: var(--gold); font-size: 18px; line-height: 1; }
.rp-chev::before { content: "\25B8"; }
details[open] > summary .rp-chev::before { content: "\25BE"; }
.rp-sum-t { flex: 0 1 auto; }
.rp-sum-line { flex: 1 1 100%; padding-left: 32px; font: 600 15px "Rubik", system-ui, sans-serif; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 700px) { .rp-sum-line { flex: 1 1 auto; padding-left: 0; text-align: right; } }
details[open] > summary .rp-sum-line { display: none; }

/* 6-3: строка-пояснение под фишками тулпара */
.ht-note { display: block; grid-column: 1 / -1; margin-top: 6px; font-size: 13px; font-weight: 700; line-height: 1.3; color: var(--mut); }
.path-node.locked .path-sub, .path-sub { white-space: normal; }

/* 6-3: яйцо «вот-вот вылупится» (заработана последняя форма, а показ ограничен яйцами) – золотое свечение */
@keyframes egg-glow-pulse {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(255, 214, 102, .55)) drop-shadow(0 0 10px rgba(255, 196, 61, .35)); }
  50% { filter: drop-shadow(0 0 9px rgba(255, 224, 138, .95)) drop-shadow(0 0 22px rgba(255, 196, 61, .7)); }
}
.egg-glow img { animation: egg-glow-pulse 2.2s ease-in-out infinite; filter: drop-shadow(0 0 8px rgba(255, 214, 102, .8)); }
.hc-img.egg.egg-glow img, .zg-hero.egg.egg-glow img { animation: egg-glow-pulse 2.2s ease-in-out infinite, zg-wobble 2.6s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  .egg-glow img, .hc-img.egg.egg-glow img, .zg-hero.egg.egg-glow img { animation: none !important; filter: drop-shadow(0 0 8px rgba(255, 214, 102, .85)) drop-shadow(0 0 18px rgba(255, 196, 61, .5)); }
}

/* 6-3: темы на замке (data/locks.json) и всплывающая подсказка */
.path-node.is-locked.by-lock { opacity: .55; filter: grayscale(.85); cursor: default; }
.path-node.is-locked.by-lock .path-note { font-weight: 800; }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px); z-index: 1000;
  max-width: min(92vw, 420px); padding: 12px 18px; border-radius: 16px; background: #1D1850; color: #FFF4DC; border: 1px solid #3C3585;
  font-weight: 800; font-size: 16px; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,.45); opacity: 0; pointer-events: none;
  transition: opacity .2s ease, transform .2s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }
/* 6-3: в плитке картинка обрезается контейнером – свечение плотнее, чтобы не было «квадрата» */
@keyframes egg-glow-pulse-tight {
  0%, 100% { filter: drop-shadow(0 0 2px rgba(255, 214, 102, .7)) drop-shadow(0 0 5px rgba(255, 196, 61, .45)); }
  50% { filter: drop-shadow(0 0 4px rgba(255, 224, 138, 1)) drop-shadow(0 0 8px rgba(255, 196, 61, .75)); }
}
.tile.st.egg-glow .st-art img { animation: egg-glow-pulse-tight 2.2s ease-in-out infinite; filter: drop-shadow(0 0 3px rgba(255, 214, 102, .9)) drop-shadow(0 0 6px rgba(255, 196, 61, .6)); }
@media (prefers-reduced-motion: reduce) {
  .tile.st.egg-glow .st-art img { animation: none !important; filter: drop-shadow(0 0 3px rgba(255, 214, 102, .9)) drop-shadow(0 0 6px rgba(255, 196, 61, .6)); }
}

/* 6-4: вопрос задания над часами и в тренировке */
.qcard h2.q-title { color: var(--ink); font-family: var(--font); line-height: 1.3; }
/* 6-4: «Дополнительно» на главной – таблица умножения и смешанная контрольная */
.home-sec { margin: 8px 2px 4px; font-size: 15px; line-height: 18px; font-weight: 800; color: var(--mut); }
/* «Дополнительно» – подпись в промежутке между рядами (без отдельной строки), чтобы все 8 плиток оставались на первом экране */
.home-more { position: relative; margin-top: 26px; }
.home-more .home-sec { position: absolute; left: 4px; top: -21px; margin: 0; font-size: 14px; line-height: 16px; }
@media (max-width: 699px) {
  .tiles.subjects .tile.st { height: clamp(86px, calc((100svh - 290px) / 4), 124px); }
}
@media (min-width: 700px) {
  /* iPad/компьютер: «Дополнительно» занимает две пустые клетки второго ряда, сетка остаётся 4×2 */
  .home-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 26px 16px; }
  .home-tiles > .st-grid:first-child { display: contents; }
  .home-more { grid-column: span 2; margin-top: 0; }
  .home-more .st-grid.st-more { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* 6-4: кабинет родителя – «⚙ Настройки» рядом с именем, предмет героя отдельной строкой */
.pc-head .pc-name { flex: 1 1 auto; }
.pc-head .pc-set { margin-left: auto; }
.ph-subj { font-size: 14px; font-weight: 800; color: var(--mut); text-transform: none; }
.ph-name { margin-top: 2px; }
.f-name { font-size: clamp(18px, 1.4vw + 14px, 24px); font-weight: 800; padding: 8px 2px; }
.form-del { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--edge); }
.btn.danger-ghost { background: transparent; color: var(--bad-ink); border-color: var(--bad-ink); box-shadow: none; }
/* 6-4: тонкая плашка ⏪/🏠 – показывается при прокрутке вверх (html.mini-on), прячется при прокрутке вниз */
.mini-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 900; display: flex; gap: 10px; align-items: center;
  padding: calc(6px + env(safe-area-inset-top, 0px)) var(--pad) 6px; background: #0D0A24;
  border-bottom: 1px solid var(--edge); box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
  transform: translateY(-110%); visibility: hidden; transition: transform .2s ease, visibility 0s linear .2s; }
html.mini-on .mini-bar { transform: none; visibility: visible; transition: transform .2s ease; }
.mini-btn { width: 44px; height: 40px; border-radius: 14px; border: 2px solid var(--gold); background: var(--card2); font-size: 22px; line-height: 1; cursor: pointer; padding: 0; }
@media (prefers-reduced-motion: reduce) { .mini-bar, html.mini-on .mini-bar { transition: none; } }
/* 6-4: контраст (WCAG AA) – тёмный текст на светлых заливках, светлый текст на закрытых темах */
.path-node.is-final, .path-node.is-final .path-label, .path-node.is-final .path-sub, .path-node.is-final .path-progress { color: var(--dark); }
.path-node.is-locked .path-sub, .path-node.is-locked .path-note { color: var(--ink); }

/* Тестовая версия: плашка всегда с тёмным текстом на золотом фоне (контраст AA). */
.test-banner { position: sticky; top: 0; z-index: 950; display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  justify-content: center; background: #FFC53D; color: #1B1245; font-weight: 800; font-size: 15px; letter-spacing: .02em;
  text-align: center; padding: calc(8px + env(safe-area-inset-top, 0px)) 12px 8px; border-bottom: 3px solid #1B1245; }
.test-banner[hidden] { display: none; }
.test-banner .btn { color: #1B1245; border-color: #1B1245; background: #FFF6D6; font-weight: 800; }
html.test-site { scroll-padding-top: 48px; }
