/* ---------- главная ---------- */
.hero { background: linear-gradient(180deg, var(--yellow) 0%, var(--bg) 100%); padding-block: var(--s6) var(--s5); }
.hero__grid { display: grid; gap: var(--s5); align-items: center; }
.hero__copy { display: grid; gap: var(--s4); }
.hero__text { font-size: 18px; color: var(--ink-soft); max-width: 46ch; }
.hero__art { display: none; width: 100%; height: auto; max-width: 440px; justify-self: center; mix-blend-mode: multiply; }
.hero__ages { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; }
.search--big { padding: var(--s1) var(--s1) var(--s1) var(--s4); border-radius: var(--r-md); box-shadow: var(--shadow); max-width: 640px; }
.search--big .input { min-height: 52px; font-size: 17px; }
@media (min-width: 960px) {
  .hero { padding-block: var(--s7) var(--s6); }
  .hero__grid { grid-template-columns: 1.4fr 1fr; }
  .hero__art { display: block; }
}
.chips--big .chip { min-height: 40px; padding-inline: var(--s4); font-size: 15px; }
.authors { list-style: none; padding: 0; display: grid; gap: var(--s3); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .authors { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.author-pill { display: flex; align-items: center; gap: var(--s3); text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s3); }
.author-pill:hover { border-color: var(--accent); }
.author-pill__pic { width: 60px; height: 60px; border-radius: 50%; background: var(--purple); display: grid; place-items: center; overflow: hidden; font: 600 22px var(--font-text); flex: none; }
.author-pill__pic img { width: 100%; height: 100%; object-fit: cover; }
.cabinet-cta { display: flex; flex-direction: column; gap: var(--s4); align-items: flex-start; background: var(--blue); border-color: transparent; }
@media (min-width: 640px) { .cabinet-cta { flex-direction: row; align-items: center; justify-content: space-between; } }

/* ---------- раздел ---------- */
.count-h1 { font-size: .55em; font-weight: 800; color: var(--ink-soft); vertical-align: middle; margin-left: .2em; }
.toolbar__right { display: flex; gap: var(--s3); align-items: center; flex-wrap: wrap; }
.select--auto { width: auto; min-width: 11em; }
.chips--active { margin-bottom: var(--s4); align-items: center; }
.chip__x { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; min-height: 24px; color: var(--ink); }
.cards--3 { grid-template-columns: 1fr; }
@media (min-width: 640px) { .cards--3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1200px) { .cards--3 { grid-template-columns: repeat(3, 1fr); } }
.seo-text { max-width: 70ch; color: var(--ink-soft); }
#catalog .catalog { margin-top: var(--s2); }

/* ---------- произведение ---------- */
.work { padding-bottom: var(--s5); display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4); }
.work-head { display: grid; gap: var(--s2); }
.work-meta { color: var(--ink-soft); font-weight: 700; }
.work-lead { font-size: 18px; color: var(--ink-soft); max-width: 60ch; }
.btn.is-playing { box-shadow: 0 0 0 3px var(--yellow); }
.work-body { display: grid; gap: var(--s5); padding-block: var(--s4); border-block: 1px solid var(--line); }
.work-pic img { width: 100%; max-height: 480px; object-fit: contain; border-radius: var(--r-md); background: var(--peach); }
@media (min-width: 960px) {
  .work-body--pic { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
}
.work-cover img { width: 100%; max-height: 420px; object-fit: cover; border-radius: var(--r-md); }
.work-after { display: grid; gap: var(--s3); }
.talk { padding: var(--s3) var(--s4); }
.talk summary { cursor: pointer; min-height: 28px; display: flex; align-items: center; line-height: 1.3; }
.talk ul { margin: var(--s3) 0 0; padding-left: 1.2em; }
.about-author h2 { font-size: 20px; margin-bottom: var(--s2); }
.poem, .prose, .twister__text { font-size: calc(var(--fs-text) * var(--text-scale, 1)); }
.read-progress { position: fixed; top: 0; left: 0; right: 0; height: 4px; z-index: 50; background: transparent; }
.read-progress span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .1s linear; }
.site-header { top: 0; }

/* режим «Учить наизусть» */
.memo { background: var(--yellow); border-radius: var(--r-md); padding: 6px 10px; margin-bottom: var(--s3); display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; position: sticky; top: 0; z-index: 5; }
.memo[hidden] { display: none; }
.memo__step { font-weight: 800; font-size: 14px; margin: 0; flex: 1 1 160px; min-width: 0; }
.memo .work-actions { gap: 6px; flex: 0 1 auto; }
.memo .btn { min-height: 34px; padding: 0 12px; font-size: 13px; }
.memo .btn--text { padding-inline: 4px; min-height: 34px; }
.memo > .muted { display: none; }
.line.is-memo { cursor: pointer; }
.line.is-memo .w.is-hidden { color: transparent; background: rgb(41 60 52 / .14); border-radius: 6px; user-select: none; }
.line.is-memo.is-revealed .w.is-hidden { color: inherit; background: none; }
.icon-btn .count[hidden] { display: none; }
.hero__art { mix-blend-mode: normal; border-radius: var(--r-md); }

/* ---------- статические страницы ---------- */
.static-page { max-width: 760px; padding-bottom: var(--s5); }
.static-page h1 { margin-bottom: var(--s4); }
.static-page__body h2 { font-size: 22px; margin: var(--s5) 0 var(--s2); }
.static-page__body p, .static-page__body ul { margin-bottom: var(--s3); }
.static-page__body ul { padding-left: 1.3em; }
.static-page__body li + li { margin-top: 4px; }

/* Скороговорка: крупный текст и тренажёр темпа */
.twister { margin: 8px 0 24px; padding: 24px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); }
.twister__text { font: 400 calc(var(--fs-text) * var(--text-scale, 1))/var(--lh-text) var(--font-text); margin: 0 0 20px; white-space: pre-line; }
.twister__word { border-radius: 8px; padding: 0 .12em; transition: background-color .12s; }
.twister__word.is-on { background: #ffe39a; color: #3a2a00; box-shadow: 0 0 0 2px #ffe39a; }
.twister__controls { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.twister__controls [aria-pressed="true"] { background: var(--link, #3e6553); color: #fff; border-color: transparent; }
.twister__hint { margin: 8px 0 0; }
@media (prefers-reduced-motion: reduce) { .twister__word { transition: none; } }

/* Азбука и цифры */
.learn-legend { display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap; margin: 0 0 20px; color: var(--ink-soft); }
.learn-dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; margin-right: -8px; }
.learn-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
.learn-grid--digits { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
.learn-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 112px; padding: 12px 8px; border-radius: 8px; text-decoration: none; color: var(--ink); text-align: center; transition: transform .12s; }
.learn-tile:hover { transform: translateY(-2px); }
/* Карточки: картинка на белом, без цвета колоды — иначе в «Цветах» розовый круг лежит на розовом (05.12.2026). */
.learn-tile.learn-tile--card { background: var(--surface); box-shadow: 0 0 0 1px rgba(0,0,0,.06); }
.learn-tile--card img { display: block; object-fit: contain; }
.learn-tile__main { font-size: 2.4rem; font-weight: 800; line-height: 1; }
.learn-tile__sub { font-size: .8rem; opacity: .8; overflow-wrap: anywhere; }
.learn-card { display: grid; gap: 24px; padding: 28px; border-radius: 24px; align-items: center; margin-bottom: 20px; }
.learn-card__sign { font-size: clamp(5rem, 22vw, 9rem); font-weight: 800; line-height: 1; text-align: center; }
.learn-card__title { margin: 0 0 8px; }
.learn-card__word { display: flex; align-items: center; gap: 16px; margin: 16px 0; }
.learn-card__emoji { font-size: 4.5rem; line-height: 1; }
.learn-card__text { font-size: 1.8rem; margin: 0; }
.learn-card__img { max-width: 100%; height: auto; border-radius: 8px; margin: 8px 0; }
.learn-things { font-size: 2.2rem; line-height: 1.3; display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.learn-pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 24px; }
@media (min-width: 720px) { .learn-card { grid-template-columns: 260px 1fr; } }
@media (prefers-reduced-motion: reduce) { .learn-tile { transition: none; } .learn-tile:hover { transform: none; } }
.learn-tile, .learn-card, .learn-dot { background: var(--tone); }

/* Карточки */
.deck-tile { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink); padding: 20px; border-radius: 8px; background: var(--tone); }
.deck-tile__art { font-size: 3.4rem; line-height: 1.1; }
.deck-tile__art img { width: 96px; height: 96px; object-fit: cover; border-radius: 8px; }
.deck { padding: 24px; border-radius: 24px; background: var(--tone); max-width: 680px; margin: 0 auto 24px; }
.deck__modes { display: flex; gap: 10px; justify-content: center; margin-bottom: 16px; }
.deck__stage { display: flex; flex-direction: column; align-items: center; gap: 14px; min-height: 360px; }
.deck-card { width: 100%; max-width: 420px; min-height: 280px; border: 0; border-radius: 8px; background: var(--surface); box-shadow: 0 4px 0 rgba(0,0,0,.08); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 16px; cursor: pointer; font: inherit; color: var(--ink); }
.deck-card__word { font-size: clamp(2rem, 9vw, 3.2rem); font-weight: 800; }
.deck-card__caption { color: var(--ink-soft); }
.deck-art { display: flex; align-items: center; justify-content: center; }
.deck-art img { max-width: 100%; max-height: 240px; border-radius: 8px; }
.deck-art__emoji { font-size: 5rem; line-height: 1.1; }
.deck-art--big .deck-art__emoji { font-size: clamp(5rem, 24vw, 8rem); }
.deck__nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; max-width: 420px; }
.deck__ask { font-size: 1.2rem; font-weight: 700; margin: 0; }
.deck__options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; max-width: 420px; }
.deck__option { font-size: 1.1rem; min-height: 52px; }
.deck__option.is-right { background: #b9e3c6; border-color: #3e8f5a; }
.deck__option.is-wrong { background: var(--yellow); border: 2px dashed var(--warm); color: var(--ink); opacity: 1; text-decoration: none; animation: vb-shake .35s; }
.deck__msg { min-height: 1.5em; font-weight: 700; margin: 0; }
.deck__done { font-size: 2rem; font-weight: 800; margin: 20px 0 0; }
.deck-list--compact { opacity: .95; }

/* Игры */
.game .deck__stage { gap: 16px; }
.game-slots { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.game-slot { width: 48px; height: 56px; border-radius: 8px; background: var(--surface); border-bottom: 4px solid var(--ink-soft); display: inline-flex; align-items: center; justify-content: center; font-size: 1.8rem; font-weight: 800; }
.game-tray { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.game-letter { font-size: 1.5rem; font-weight: 800; min-width: 52px; min-height: 52px; }
.game-letter:disabled { opacity: .35; }
.game-sum { display: flex; flex-direction: column; align-items: center; }
.game-sum__sign { font-size: 2rem; font-weight: 800; margin: 0; }
.game-board { display: grid; gap: 10px; width: 100%; max-width: 420px; }
.game-board--3 { grid-template-columns: repeat(3, 1fr); }
.game-board--4 { grid-template-columns: repeat(4, 1fr); }
.game-card { aspect-ratio: 1; border: 0; border-radius: 8px; background: var(--ink-soft); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; padding: 4px; }
.game-card::before { content: "?"; font-weight: 800; }
.game-card.is-open, .game-card.is-found { background: var(--surface); color: var(--ink); }
.game-card.is-open::before, .game-card.is-found::before { content: none; }
.game-card.is-found { box-shadow: inset 0 0 0 3px #3e8f5a; }
.game-card .deck-art__emoji { font-size: 2.4rem; }
.game-card img { max-height: 80px; }
.played { font-size: .8rem; font-weight: 700; color: #1f5a38; }

/* Видео */
.video-box { position: relative; aspect-ratio: 16 / 9; max-width: 860px; margin: 16px 0; border-radius: 8px; overflow: hidden; background: #1d2b26; }
.video-box iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-box__play { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; padding: 0; background: transparent; cursor: pointer; }
.video-box__play img { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-box__btn { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 84px; height: 84px; border-radius: 50%; background: rgba(255,255,255,.92); color: var(--ink); font-size: 2.2rem; display: flex; align-items: center; justify-content: center; padding-left: 6px; }
.video-thumb { width: 100%; height: auto; border-radius: 8px; }

/* Азбука и цифры: игры на странице */
.learned-btn.is-on { background: #b9e3c6; border-color: #3e8f5a; color: #14431f; }
.learn-done { margin: 20px 0 0; }
.learn-progress { font-weight: 700; margin: 0 0 12px; }
.learn-tile { position: relative; }
.learn-tile.is-learned::after { content: "✓"; position: absolute; top: 6px; right: 8px; width: 22px; height: 22px; border-radius: 50%; background: #3e8f5a; color: #fff; font-size: 14px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.learn-sec h2 { margin-bottom: 8px; }
/* Звуки буквы: цвета как в школе — гласный красный, твёрдый синий, мягкий зелёный */
.learn-sound--vowel { --snd: #c8372f; --snd-bg: #fdecea; }
.learn-sound--hard { --snd: #2a62bd; --snd-bg: #e8f0fc; }
.learn-sound--soft { --snd: #24804a; --snd-bg: #e6f5ec; }
.learn-sounds { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.learn-sound { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 12px 14px; border-radius: 8px; background: var(--snd-bg); }
.learn-sound__sign { flex: none; min-width: 64px; height: 64px; padding: 0 8px; border-radius: 8px; background: var(--snd); color: #fff; font-size: 1.6rem; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.learn-sound__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.learn-sound__text small { color: var(--snd); font-weight: 800; }
.learn-sound__play { flex: none; width: 48px; height: 48px; border: 0; border-radius: 50%; background: #fff; color: var(--snd); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.learn-sound__play:focus-visible { outline: 3px solid var(--snd); outline-offset: 2px; }
.learn-sounds__note { margin: 12px 0 0; }
.learn-sounds__legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 10px 0 0; font-size: .85rem; font-weight: 700; }
.learn-sounds__legend span { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-soft); }
.learn-sounds__legend span::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--snd); }
.learn-pair { display: flex; gap: 14px; flex-wrap: wrap; }
.learn-pair__cell { display: flex; flex-direction: column; align-items: center; min-width: 140px; padding: 14px 24px; border-radius: 8px; background: var(--tone); }
.learn-pair__cell span { font-size: 5rem; font-weight: 800; line-height: 1.05; }
.learn-pair__cell small { color: var(--ink-soft); font-weight: 700; }
.learn-words { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.learn-words li { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px; border-radius: 8px; background: var(--tone); text-align: center; }
.learn-words__pic { font-size: 3rem; line-height: 1.1; }
.learn-words__word { font-weight: 800; font-size: 1.1rem; }
.learn-acts { display: grid; gap: 16px; grid-template-columns: 1fr; margin-top: 12px; }
@media (min-width: 900px) { .learn-acts { grid-template-columns: 1fr 1fr; } }
.learn-act { border: 1px solid var(--line); border-radius: 8px; padding: 16px; background: var(--surface); }
.learn-act h3 { margin: 0 0 4px; }
.learn-act__modes { display: flex; gap: 8px; margin-bottom: 8px; }
.learn-facts { padding-left: 20px; margin: 8px 0 16px; }
.learn-facts li { margin-bottom: 6px; }
.learn-comp { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 8px; }
.learn-comp li { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 8px 12px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); }
.learn-comp__eq { font-weight: 800; min-width: 110px; }
.learn-comp__pic { font-size: 1.5rem; }
.trace { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.trace__canvas { touch-action: none; border-radius: 8px; background: #fff; border: 2px dashed var(--line); cursor: crosshair; max-width: 100%; }
.trace__status.is-win { color: #1f5a38; font-weight: 800; }
.find-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.find-tile { aspect-ratio: 1; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font: 800 2rem/1 var(--font-ui); color: var(--ink); cursor: pointer; }
.find-tile.is-found { background: #b9e3c6; border-color: #3e8f5a; }
.find-tile.is-miss { background: var(--yellow); border-style: dashed; animation: vb-shake .35s; }
.count-item { position: relative; border: 0; background: none; font-size: 2.2rem; line-height: 1.2; cursor: pointer; padding: 4px; }
.count-item.is-counted { opacity: .55; }
.count-item__n { position: absolute; right: -2px; top: -2px; min-width: 22px; height: 22px; border-radius: 8px; background: #3e8f5a; color: #fff; font: 800 13px/22px var(--font-ui); text-align: center; }
.ten-box { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 8px; background: #ffe39a; font: 800 1.2rem/1 var(--font-ui); }
.learn-act .deck__options { max-width: none; }

/* Узкие экраны: ничего не должно шире окна */
.learn-acts { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .learn-acts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.learn-act, .learn-act > * { min-width: 0; }
.deck__options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.deck__option { white-space: normal; overflow-wrap: anywhere; padding: 8px 10px; line-height: 1.25; height: auto; }
.deck__modes { flex-wrap: wrap; }
.deck, .deck__stage { min-width: 0; }
.trace__canvas { height: auto; aspect-ratio: 1 / 1; }
.find-tile { min-width: 0; font-size: clamp(1.4rem, 7vw, 2rem); }
.learn-things { overflow-wrap: anywhere; }
@media (max-width: 420px) {
  .deck { padding: 14px; border-radius: 8px; }
  .learn-act { padding: 12px; }
  .learn-comp__eq { min-width: 0; }
  .learn-pair__cell { min-width: 0; flex: 1 1 120px; padding: 12px 10px; }
  .btn { white-space: normal; text-align: center; }
}

/* «С чего начать»: выбор возраста и шаги маршрута */
.hero__start { margin: var(--s4) 0 0; }
.start-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; max-width: 760px; }
.start-step { display: flex; gap: 14px; min-width: 0; padding: 16px; border-radius: 8px; background: #fff; border: 1px solid var(--line, #eadfd2); }
.start-step__num { flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--tone); font-weight: 800; font-size: 1.2rem; display: flex; align-items: center; justify-content: center; }
.start-step__body { min-width: 0; }
.start-step h2 { font-size: 1.15rem; margin: 0 0 4px; }
.start-step p { margin: 0 0 10px; color: var(--ink-soft); }
.start-tip { max-width: 760px; margin: var(--s5) 0; padding: 16px 20px; border-radius: 8px; background: var(--yellow, #fff3c4); }
.start-tip h2 { font-size: 1.15rem; margin: 0 0 6px; }
.start-tip ul { margin: 0; padding-left: 20px; }
@media (max-width: 560px) { .start-step { padding: 12px; gap: 10px; } .start-step__num { width: 36px; height: 36px; font-size: 1rem; } }
.author-pill { min-width: 0; }
.author-pill > span:last-child { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 400px) { .author-pill { gap: var(--s2); padding: var(--s2); } .author-pill__pic { width: 44px; height: 44px; font-size: 16px; } }

/* Живой помощник (helper.js): стоит у нижнего края, ходит, машет, прыгает, моргает, говорит */
.helper { position: fixed; left: calc(var(--page-left, 0px) + var(--side, 0px)); bottom: 6px; z-index: 40; width: var(--helper-w, 84px); pointer-events: none; opacity: 0; transition: transform 0s linear; will-change: transform; }
.helper.is-ready { opacity: 1; }
.helper__body { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; pointer-events: auto; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.helper__body:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 8px; }
.helper__flip { display: block; transform-origin: 50% 100%; animation: h-breathe 3.2s ease-in-out infinite; }
.helper.is-back .helper__flip { transform: scaleX(-1); animation: none; }
.helper__svg { display: block; width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 3px 4px rgba(60, 40, 20, .18)); }
.helper__svg * { transform-box: fill-box; }
.helper__say { position: absolute; left: 6px; bottom: calc(100% + 8px); width: max-content; max-width: min(230px, calc(100vw - 28px)); margin: 0; padding: 10px 14px; border-radius: 18px 18px 18px 4px; background: #fff; border: 2px solid var(--ink); font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; pointer-events: auto; opacity: 0; visibility: hidden; transform: scale(.6); transform-origin: 20px 100%; transition: opacity .2s, transform .25s cubic-bezier(.3, 1.6, .5, 1), visibility 0s .25s; }
.helper.is-right .helper__say { left: auto; right: 6px; border-radius: 18px 18px 4px 18px; transform-origin: calc(100% - 20px) 100%; }
.helper.is-saying .helper__say { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.h-eye { transform-origin: 50% 50%; animation: h-blink 4.2s infinite; }
.h-tail { transform-origin: 0% 100%; animation: h-wag 1.6s ease-in-out infinite; }
.h-ear { transform-origin: 50% 100%; animation: h-ear 3.4s ease-in-out infinite; }
.h-ear-r { animation-delay: .4s; }
.h-arm, .h-arm2 { transform-origin: 30% 90%; }
.h-arm2 { transform-origin: 70% 10%; }
.h-mouth-open { opacity: 0; transform-origin: 50% 0%; }
.h-beak { transform-origin: 50% 0%; }
.helper.is-waving .h-arm { animation: h-wave .45s ease-in-out 4; }
.helper.is-jumping .helper__body { animation: h-jump .9s cubic-bezier(.3, .6, .4, 1); }
.helper.is-thinking .helper__body { animation: h-think 1.2s ease-in-out; }
.helper.is-walking .helper__body { animation: h-step .36s ease-in-out infinite; }
.helper.is-walking .h-foot-l { animation: h-foot .36s ease-in-out infinite; }
.helper.is-walking .h-foot-r { animation: h-foot .36s ease-in-out -.18s infinite; }
.helper.is-walking .h-arm, .helper.is-walking .h-arm2 { animation: h-swing .36s ease-in-out infinite; }
.helper.is-talking .h-mouth-open { opacity: 1; animation: h-talk .28s ease-in-out infinite; }
.helper.is-talking .h-beak { animation: h-talk .28s ease-in-out infinite; }
.helper.is-talking .helper__body { animation: h-nod .56s ease-in-out infinite; }
@keyframes h-breathe { 50% { transform: scale(1.03, .97); } }
@keyframes h-blink { 0%, 93%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.08); } }
@keyframes h-wag { 50% { transform: rotate(14deg); } }
@keyframes h-ear { 0%, 80%, 100% { transform: rotate(0); } 88% { transform: rotate(-9deg); } 94% { transform: rotate(6deg); } }
@keyframes h-wave { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(38deg) translateY(-6%); } }
@keyframes h-swing { 50% { transform: rotate(-16deg); } }
@keyframes h-jump { 0%, 100% { transform: translateY(0) scale(1); } 12% { transform: translateY(0) scale(1.1, .86); } 45% { transform: translateY(-46px) scale(.94, 1.08); } 78% { transform: translateY(0) scale(1.08, .9); } }
@keyframes h-think { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-9deg); } 60% { transform: rotate(7deg); } }
@keyframes h-step { 50% { transform: translateY(-5px) rotate(3deg); } }
@keyframes h-foot { 50% { transform: translateY(-22%) rotate(-12deg); } }
@keyframes h-talk { 50% { transform: scaleY(.35); } }
@keyframes h-nod { 50% { transform: translateY(-2px); } }
body:has(.helper) .site-footer { padding-bottom: 110px; }
@media (max-width: 560px) { .helper { width: var(--helper-wm, 64px); } .helper__say { font-size: .9rem; padding: 8px 12px; } }
@media (prefers-reduced-motion: reduce) { .helper *, .helper__body, .helper__flip { animation: none !important; } .helper { transition: none !important; } }
.can-say { cursor: pointer; }
.can-say:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.say-icon { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 1px solid var(--line); color: var(--link); vertical-align: middle; position: relative; top: -1px; }
.say-icon .icon { width: 13px; height: 13px; margin: 0; }
.say-row { display: flex; align-items: center; gap: 8px; }
.say-row .say-icon { flex: none; top: 0; }
.learn-words li { position: relative; }
.learn-words li .say-icon { position: absolute; top: 6px; right: 6px; }
.start-step__links { display: flex; flex-wrap: wrap; gap: 8px; }
.learn-card__body, .learn-card__word { min-width: 0; }
.learn-card__text { min-width: 0; font-size: clamp(1.3rem, 6.4vw, 1.8rem); }
.learn-act__modes { flex-wrap: wrap; }
.learn-act__modes .btn { min-width: 0; }
.learn-sound__play { width: 36px; height: 36px; }
.learn-sound__play .icon { width: 16px; height: 16px; }
@media (max-width: 400px) { .learn-act__modes .btn { padding-inline: 12px; font-size: .9rem; } }
body:has(.bk-overlay) .helper { display: none; }
/* У частей с собственным поворотом в рисунке (уши зайчика) точку отсчёта не трогаем, иначе они уезжают */
.helper__svg [transform] { transform-box: view-box; transform-origin: 0 0; animation: none; }
/* В блоке «Об авторе» имя автора на карточках не повторяем */
.cards--same-author .card__author { display: none; }
.about-author__more { font-size: 1rem; margin: var(--s4) 0 var(--s3); }
.about-author .cards { margin-bottom: var(--s3); }

/* ---------- произведение: шапка с фактами, тренажёр с панелью действий ---------- */
.kicker { display: flex; align-items: center; gap: 6px; }
.kicker .icon { width: 18px; height: 18px; color: var(--accent); }
.work-facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s2); }
.fact { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 var(--s3); border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--line); font-weight: 700; font-size: 14px; color: var(--ink-soft); }
.fact .icon { width: 17px; height: 17px; color: var(--accent); }
.fact a { color: var(--ink); text-decoration: none; font-weight: 800; }
.fact a:hover { text-decoration: underline; }
.work-sounds { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin: 0; }
.work-sounds .icon { width: 18px; height: 18px; color: var(--accent); }
.twister__controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); }
.tempo { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 64px; padding: 6px 4px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg, #faf9f3); font: 800 15px var(--font-ui); color: var(--ink); cursor: pointer; }
.tempo .icon { width: 26px; height: 26px; color: var(--accent); }
.tempo:hover { background: #f2f1e8; }
.tempo[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.tempo[aria-pressed="true"] .icon { color: #fff; }
.twister__controls [data-tempo-stop] { grid-column: 1 / -1; }
.twister .work-bar { margin: var(--s4) calc(var(--s5) * -1) calc(var(--s5) * -1); padding: var(--s3) var(--s5) var(--s4); border-top: 1px solid var(--line); background: #faf9f3; border-radius: 0 0 16px 16px; }
@media (max-width: 560px) { .twister { padding: var(--s4); } .twister .work-bar { margin: var(--s4) calc(var(--s4) * -1) calc(var(--s4) * -1); padding: var(--s3) var(--s4) var(--s3); } .tempo { font-size: 14px; } }
.marks { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s3) var(--s4); display: grid; gap: var(--s2); }
.marks__who { margin: 0; font-size: 14px; color: var(--ink-soft); font-weight: 700; }
.marks .btn { min-height: 40px; padding-inline: var(--s3); font-size: 14px; }
.twister__controls[hidden], .twister__status[hidden] { display: none; }
/* Телефон: подпись и значок никогда не стоят в два этажа. Кнопки темпа — только слово, в одну строку */
@media (max-width: 560px) {
  .tempo { flex-direction: row; min-height: 44px; font-size: 15px; padding: 0 6px; border-radius: var(--r-sm); }
  .tempo .icon { display: none; }
  .twister__controls { gap: 6px; }
}
@media (max-width: 719px) {
  .work-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tool { flex-direction: row; gap: 8px; min-height: 44px; padding: 0 10px; font: 700 14px var(--font-ui); letter-spacing: 0; white-space: nowrap; justify-content: center; }
  .tool .icon { width: 20px; height: 20px; }
}
@media (max-width: 719px) { .work-bar__main > .btn { flex: 1 1 100%; white-space: nowrap; } }

/* Главная: плитки разделов из меню сайта */
.menu-tiles { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); grid-template-columns: 1fr; }
.menu-tile { display: flex; align-items: center; gap: var(--s3); min-width: 0; padding: var(--s3) var(--s4); border-radius: var(--r-md); background: var(--tone); color: var(--ink); text-decoration: none; min-height: 72px; transition: box-shadow .15s, transform .15s; }
.menu-tile:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.menu-tile__icon { flex: none; width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, .75); display: grid; place-items: center; color: var(--accent); }
.menu-tile__icon .icon { width: 24px; height: 24px; }
.menu-tile__text { min-width: 0; display: grid; gap: 2px; }
.menu-tile b { font-size: 1.05rem; font-weight: 800; }
.menu-tile small { color: var(--ink-soft); font-weight: 600; font-size: 13px; }
@media (min-width: 560px) { .menu-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .menu-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tool-size { align-self: center; }
@media (max-width: 719px) { .tool-size { grid-column: 1 / -1; justify-self: stretch; display: grid; grid-template-columns: 1fr 1fr; } .tool-size button { min-height: 44px; } }

/* Сворачиваемые блоки («Поговорим», «Текстовая версия»): значок слева, стрелка справа */
.talk summary, .text-version summary { list-style: none; gap: var(--s2); font-weight: 800; }
.talk summary::-webkit-details-marker, .text-version summary::-webkit-details-marker { display: none; }
.talk summary .icon, .text-version summary .icon { width: 20px; height: 20px; color: var(--accent); flex: none; }
.talk summary::after, .text-version summary::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--ink-soft); border-bottom: 2px solid var(--ink-soft); transform: rotate(45deg); transition: transform .15s; flex: none; }
.talk[open] summary::after, .text-version[open] summary::after { transform: rotate(-135deg); }

/* Занятие на сегодня */
.today { list-style: none; margin: 0 0 var(--s4); padding: 0; display: grid; gap: var(--s3); max-width: 760px; counter-reset: step; }
.today-step { display: flex; gap: var(--s4); align-items: center; padding: var(--s4); border-radius: var(--r-md); background: var(--tone); min-width: 0; }
.today-step__sign { flex: none; width: 76px; height: 76px; border-radius: 8px; background: rgba(255, 255, 255, .75); display: grid; place-items: center; font: 800 2.1rem/1 var(--font-ui); color: var(--ink); }
.today-step__sign .icon { width: 38px; height: 38px; color: var(--accent); }
.today-step__body { min-width: 0; display: grid; gap: 4px; }
.today-step h2 { margin: 0; font-size: 1.15rem; }
.today-step__what { margin: 0; color: var(--ink-soft); font-weight: 600; overflow-wrap: anywhere; }
.today-step__actions { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s2); }
.today-done[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.today-step.is-done { opacity: .85; }
.today-all { display: flex; align-items: center; gap: var(--s2); margin: 0 0 var(--s3); padding: var(--s3) var(--s4); border-radius: var(--r-md); background: var(--yellow); font-weight: 800; max-width: 760px; }
.today-all .icon { width: 24px; height: 24px; color: var(--warm); }
.today-note { max-width: 760px; }
@media (max-width: 480px) { .today-step { flex-direction: column; align-items: flex-start; } .today-step__sign { width: 60px; height: 60px; font-size: 1.7rem; border-radius: 8px; } .today-step__actions .btn { flex: 1 1 100%; } }
/* баннер на главной */
.today-banner { display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap; margin-top: var(--s5); padding: var(--s4); border-radius: var(--r-md); background: #fff; border: 1px solid var(--line); }
.today-banner__text { flex: 1 1 260px; min-width: 0; }
.today-banner h2 { margin: 0 0 4px; font-size: 1.15rem; }
.today-banner p { margin: 0; color: var(--ink-soft); }
.today-banner__chips { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s2); }
.today-banner .menu-tile__icon { background: var(--yellow); }
/* «Попробуй ещё»: мягкое покачивание и тёплый жёлтый вместо красного и зачёркивания */
@keyframes vb-shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
@media (prefers-reduced-motion: reduce) { .deck__option.is-wrong, .find-tile.is-miss { animation: none; } }

/* Курс для родителей */
.course-module h2 { display: flex; align-items: center; gap: var(--s2); }
.course-module h2 .icon { width: 26px; height: 26px; color: var(--accent); }
.lessons { list-style: none; margin: var(--s3) 0 0; padding: 0; display: grid; gap: var(--s2); max-width: 820px; }
.lesson-row a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); color: var(--ink); text-decoration: none; }
.lesson-row a:hover { border-color: var(--accent); }
.lesson-row__n { width: 32px; height: 32px; border-radius: 50%; background: var(--mint); display: grid; place-items: center; font-weight: 800; color: var(--accent); }
.lesson-row__text { display: grid; gap: 2px; min-width: 0; }
.lesson-row__text small { color: var(--ink-soft); font-weight: 600; }
.lesson-row__min { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-soft); font-size: 13px; font-weight: 700; white-space: nowrap; }
.lesson-row__min .icon { width: 16px; height: 16px; }
.lesson-row__ok { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; color: transparent; }
.lesson-row__ok .icon { width: 14px; height: 14px; }
.lesson-row.is-done .lesson-row__ok { background: var(--accent); border-color: var(--accent); color: #fff; }
.course-note { max-width: 820px; margin-top: var(--s5); }
@media (max-width: 560px) { .lesson-row a { grid-template-columns: auto minmax(0, 1fr) auto; } .lesson-row__min { display: none; } }
.lesson { display: grid; gap: var(--s4); max-width: 760px; padding-bottom: var(--s5); }
.lesson__text { font-size: 18px; line-height: 1.7; }
.lesson__text h2 { font-size: 1.3rem; margin: var(--s5) 0 var(--s2); }
.lesson__text ul { padding-left: 1.2em; }
.lesson__text li { margin-bottom: var(--s2); }
.lesson-try, .lesson-check { display: grid; gap: var(--s2); }
.lesson-try { background: var(--yellow); border-color: transparent; }
.lesson-try h2, .lesson-check h2 { display: flex; align-items: center; gap: var(--s2); margin: 0; font-size: 1.1rem; }
.lesson-try h2 .icon, .lesson-check h2 .icon { width: 22px; height: 22px; color: var(--warm); }
.lesson-check ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.lesson-note { font-size: 14px; }
.lesson-done[aria-pressed="true"] { background: var(--ok-bg, #e1f1e6); border-color: #b9d6c3; color: var(--accent); }

/* Читаем по слогам */
.reading__pick { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.reading__cons { min-width: 48px; min-height: 48px; padding: 6px 12px; border: 2px solid #2a62bd; border-radius: 8px; background: #fff; color: #2a62bd; font: inherit; font-size: 1.4rem; font-weight: 800; cursor: pointer; }
.reading__cons[aria-pressed="true"] { background: #2a62bd; color: #fff; }
.reading__row { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.reading__syl { display: inline-flex; align-items: baseline; justify-content: center; min-width: 76px; min-height: 64px; padding: 8px 14px; border: 0; border-radius: 8px; background: #f3f0ea; font: inherit; font-size: 2.2rem; font-weight: 800; line-height: 1; cursor: pointer; }
.reading__syl:hover { background: #e9e4da; }
.reading__c { color: #2a62bd; }
.reading__v { color: #c8372f; }
.reading__sum { margin: 8px 0 0; font-size: 1.5rem; font-weight: 800; min-height: 2rem; }
.reading__list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.reading__list--wide { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.reading__item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 64px; padding: 10px 14px; border: 0; border-radius: 8px; background: #f3f0ea; font: inherit; cursor: pointer; text-align: left; }
.reading__item:hover { background: #e9e4da; }
.reading__emoji { font-size: 2rem; line-height: 1; }
.reading__text { font-size: 1.7rem; font-weight: 800; letter-spacing: .06em; overflow-wrap: normal; }
.reading__s { white-space: nowrap; }
.reading__s:nth-child(odd) { color: #2a62bd; }
.reading__s:nth-child(even) { color: #c8372f; }
.reading__w { white-space: nowrap; }
.reading__adult { padding: 16px 18px; border-radius: 8px; background: #fff7e0; }
.reading__adult h2 { margin-top: 0; }
@media (max-width: 480px) { .reading__syl { min-width: 64px; font-size: 1.9rem; } .reading__list { grid-template-columns: 1fr; } .reading__text { font-size: 1.5rem; } }

/* ЖЁСТКОЕ ПРАВИЛО: значок и слово на кнопке всегда в одну строку, на любой ширине экрана */
.tempo, .tool { flex-direction: row !important; gap: 8px; }
.tempo { min-height: 48px; padding: 0 10px; font-size: 16px; white-space: nowrap; }
.tempo .icon { display: inline-block !important; width: 22px; height: 22px; flex: none; }
.tool { min-height: 48px; padding: 0 10px; font-size: 15px; white-space: nowrap; }
.tool .icon { flex: none; width: 20px; height: 20px; }
.tool span { overflow-wrap: normal; }
.work-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 360px) { .tempo { font-size: 14px; padding: 0 4px; gap: 4px; } .tempo .icon { width: 18px; height: 18px; } }
@media (min-width: 720px) { .work-tools { grid-template-columns: none; } }

/* Понимание прочитанного */
.quiz, .retell { margin: 20px 0; }
.quiz h2, .retell h2 { display: flex; align-items: center; gap: 8px; margin-top: 0; }
.quiz__q { margin: 16px 0; padding-top: 12px; border-top: 1px dashed var(--line); }
.quiz__text { font-weight: 800; margin: 0 0 10px; }
.quiz__answers { display: flex; flex-wrap: wrap; gap: 10px; }
.quiz__a { min-height: 48px; padding: 8px 16px; border: 2px solid var(--line); border-radius: 8px; background: #fff; font: inherit; font-weight: 700; cursor: pointer; text-align: left; }
.quiz__a:hover { background: #f2f1e8; }
.quiz__a.is-right { background: #e6f5ec; border-color: #24804a; color: #1d5e37; }
.quiz__a.is-wrong { background: #fff3cc; border-color: #e0b100; color: #6b5200; }
.quiz__msg, .retell__msg { margin: 8px 0 0; font-weight: 800; }
.retell__slots { list-style: none; margin: 14px 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.retell__slot { position: relative; min-height: 130px; border: 2px dashed var(--line); border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.retell__slot.is-filled { border-style: solid; border-color: #24804a; padding: 0; }
.retell__num { font-size: 1.6rem; font-weight: 800; opacity: .35; }
.retell__slot.is-filled .retell__num { display: none; }
.retell__pool { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.retell__card { display: flex; flex-direction: column; gap: 4px; width: 100%; padding: 6px; border: 2px solid var(--line); border-radius: 8px; background: #fff; font: inherit; font-size: .9rem; font-weight: 700; cursor: pointer; }
.retell__card img { width: 100%; height: auto; border-radius: 8px; display: block; }
.retell__card.is-wrong { animation: retell-shake .5s; border-color: #e0b100; }
.retell__slot .retell__card { border: 0; }
@keyframes retell-shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
@media (prefers-reduced-motion: reduce) { .retell__card.is-wrong { animation: none; } }
.gloss { padding: 0 .1em; border: 0; border-bottom: 2px dotted #c8892f; border-radius: 4px; background: #fff3d6; color: inherit; font: inherit; cursor: help; }
.gloss:hover { background: #ffe39a; }
.gloss-pop { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 90; display: flex; align-items: center; gap: 12px; width: min(92vw, 520px); padding: 14px 16px; border-radius: 8px; background: #fff; box-shadow: 0 8px 30px rgba(0,0,0,.22); border: 2px solid #c8892f; }
.gloss-pop[hidden] { display: none; }
.gloss-pop__emoji { font-size: 2.4rem; line-height: 1; }
.gloss-pop__img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; }
.gloss-pop__body { flex: 1; min-width: 0; }
.gloss-pop__text { margin: 2px 0 0; }
.gloss-pop__close { flex: none; width: 40px; height: 40px; border: 0; border-radius: 50%; background: #f3f0ea; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.tile__img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; display: block; margin-bottom: 8px; }

/* Математика, фигуры, внимание */
.numline { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0 16px; padding: 0; }
.numline a { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; min-height: 36px; border-radius: 8px; background: #f3f0ea; color: inherit; text-decoration: none; font-weight: 700; }
.numline .is-on a { background: var(--accent, #3e6553); color: #fff; }
.game-shape { display: inline-flex; }
.game-sum--shapes { display: flex; align-items: flex-end; justify-content: center; gap: 28px; }
.game-big { font-size: 2.4rem; line-height: 1.3; margin: 8px 0; }
.game-row { letter-spacing: .08em; white-space: pre-wrap; }
.game-gone { text-align: center; }

/* Прописи и раскраски */
.coloring-grid { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.coloring-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px; border-radius: 8px; background: #fff; border: 1px solid var(--line); color: inherit; text-decoration: none; font-weight: 700; text-align: center; }
.coloring-tile:hover { background: #f2f1e8; }
.coloring-tile img { width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: contain; }
.propis-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.propis, .coloring-sheet { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 16px; max-width: 820px; margin: 0 auto 24px; }
.propis__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; border-bottom: 2px solid #222; margin-bottom: 8px; }
.propis__head h1 { margin: 0; font-size: 1.6rem; }
.propis__name { flex: 1; display: flex; gap: 8px; margin: 0; }
.propis__name span { flex: 1; border-bottom: 1px solid #222; }
.propis__hint { margin: 0 0 8px; font-size: .9rem; }
.propis__row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; border-top: 1px solid #ddd; }
.propis__cell { width: 100%; height: auto; display: block; }
.propis__guide { stroke: #c9d8ee; stroke-width: .6; stroke-dasharray: 2 2; }
.propis__base { stroke: #7da0d6; stroke-width: .8; }
.propis__sample { stroke: #222; stroke-width: 4; }
.propis__dots { stroke: #666; stroke-width: 2.4; stroke-dasharray: .1 5; }
.propis__dots.is-faint { stroke: #bbb; }
.propis__arrow { fill: #e8743b; }
.propis__start { fill: #e8743b; }
.propis__num { fill: #fff; font: 800 6px Nunito, system-ui, sans-serif; }
.coloring-sheet { text-align: center; }
.coloring-sheet img { max-width: 100%; height: auto; }
.print-only { display: none; }

/* Раскраска на экране: на телефоне картинка сверху, под ней инструменты; на компьютере инструменты справа */
.paint { display: grid; gap: 12px; margin-bottom: 8px; }
.paint__main { min-width: 0; }
.paint__title { font-size: 20px; margin: 2px 0 2px; line-height: 1.25; }
.paint__hint { margin: 0 0 8px; font-size: 13px; color: var(--ink-soft); }
.paint__board { position: relative; width: 100%; aspect-ratio: 1; max-width: 100%; margin: 0 auto; background: #fff;
  border-radius: 8px; box-shadow: 0 0 0 1px var(--line); overflow: hidden; touch-action: none;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.paint__stage { position: absolute; inset: 0; touch-action: none; }
.paint:not(.is-ready) .paint__board { background: #fff linear-gradient(90deg, #fff, #f3f2ea, #fff) 0 0 / 200% 100%; }
.paint__fit { position: absolute; right: 8px; bottom: 8px; min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line);
  background: rgb(255 255 255 / .92); font: 600 13px var(--font-ui); color: var(--ink); cursor: pointer; }
.paint__fit[hidden], .paint__brush[hidden] { display: none; }
.paint__side { display: grid; gap: 10px; min-width: 0; }
.paint__dock { display: grid; gap: 10px; min-width: 0; }
/* Телефон и планшет: инструменты и цвета всегда внизу экрана, картинка над ними целиком */
@media (max-width: 959px) {
  .paint__dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 46; gap: 6px;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); background: var(--surface, #fff);
    border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgb(0 0 0 / .1); }
  .paint__dock > * { width: 100%; max-width: 640px; margin-inline: auto; }
  .paint__dock .paint__tool { min-height: 36px; }
  .paint__dock .paint__palette { gap: 5px 4px; }
  .paint__dock .paint__color { max-width: 34px; }
  body:has(.paint__dock) { padding-bottom: var(--dock-h, 130px); }
  .paint__dock .paint__brush { flex-wrap: nowrap; font-size: 12px; }
  .paint__dock .paint__label { display: none; }
  .paint__dock .paint__size { width: 32px; height: 32px; }
  body:has(.paint__dock) .toasts { bottom: calc(var(--dock-h, 130px) + 12px); }
}
@media (min-width: 640px) and (max-width: 959px) { .paint__dock .paint__palette { grid-template-columns: repeat(16, minmax(0, 1fr)); } }
.paint__tools, .paint__actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.paint__actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.paint__tool, .paint__act { display: flex; align-items: center; justify-content: center; gap: 4px; min-width: 0; min-height: 40px; padding: 0 4px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); cursor: pointer;
  font: 600 clamp(11px, 3.3vw, 13px) var(--font-ui); white-space: nowrap; }
.paint__tool .icon, .paint__act .icon { width: 17px; height: 17px; }
.paint__tool span, .paint__act span { overflow: hidden; text-overflow: ellipsis; }
.paint__tool:hover, .paint__act:hover { background: #f2f1e8; }
.paint__tool.is-on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.paint__tool[disabled] { opacity: .45; cursor: default; background: #fff; }
.paint__brush { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; font-size: 13px; }
.paint__sizes { display: flex; align-items: center; gap: 6px; }
.paint__label { color: var(--ink-soft); margin-right: 2px; }
.paint__size { width: 36px; height: 36px; padding: 0; border-radius: 50%; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; cursor: pointer; }
.paint__size i { display: block; border-radius: 50%; background: var(--ink); }
.paint__size.is-on { border-color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.paint__inside { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.paint__inside input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
.paint__palette { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; }
.paint__color { width: 100%; max-width: 44px; aspect-ratio: 1; justify-self: center; padding: 0; border-radius: 50%; cursor: pointer;
  background: var(--c); border: 2px solid rgb(0 0 0 / .14); }
.paint__color.is-on { border-color: var(--ink); box-shadow: inset 0 0 0 3px #fff; }
.paint__modes { display: inline-flex; gap: 4px; margin: 0 0 8px; padding: 3px; border-radius: 999px; background: #eceade; }
.paint__modes[hidden] { display: none; }
.paint__mode { min-height: 32px; padding: 0 14px; border: 0; border-radius: 999px; background: none; color: var(--ink);
  font: 700 13px var(--font-ui); cursor: pointer; }
.paint__mode.is-on { background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .15); }
.paint__color { position: relative; }
.paint__num { position: absolute; inset: 0; display: grid; place-items: center; font: 800 15px var(--font-ui); color: #fff;
  text-shadow: 0 0 3px rgb(0 0 0 / .55); pointer-events: none; }
.paint__color[data-color="#ffffff"] .paint__num, .paint__color[data-color="#fdd835"] .paint__num,
.paint__color[data-color="#ffccbc"] .paint__num { color: var(--ink); text-shadow: none; }
.is-marked .paint__color.is-unused { display: none; }
.paint__owner { display: grid; gap: 4px; padding: 8px; border: 1px dashed var(--line); border-radius: 8px; }
.paint__owner p { margin: 0; font-size: 12px; color: var(--ink-soft); }
.paint__credit { margin: 6px 0 0; font-size: 11px; color: var(--ink-soft); text-align: center; }
.paint__credit a { color: inherit; }
.paint-more { margin-top: 24px; }
.paint-teaser { display: flex; align-items: center; gap: 14px; margin: 0 0 var(--s4); padding: 10px 14px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--surface); color: inherit; text-decoration: none; }
.paint-teaser:hover { background: #f2f1e8; }
.paint-teaser img { width: 54px; height: 72px; object-fit: contain; flex: none; background: #fff; border-radius: 6px; box-shadow: 0 0 0 1px var(--line); }
.paint-teaser__body { display: grid; gap: 2px; flex: 1; min-width: 0; }
.paint-teaser__body .muted { font-size: 13px; }
.paint-teaser__go { flex: none; gap: 6px; }
@media (max-width: 479px) { .paint-teaser__go { display: none; } }
.paint-more h2 { font-size: 20px; margin: 0; }
@media (max-width: 479px) { .paint__tool .icon, .paint__act .icon { display: none; } }   /* на телефоне подписи без значков */
@media (min-width: 960px) {
  .paint { grid-template-columns: minmax(0, 1fr) 240px; gap: 24px; align-items: start; }
  .paint__title { font-size: 28px; }
  .paint__side { position: sticky; top: 76px; padding-top: 62px; gap: 14px; }
  .paint__dock { gap: 14px; }
  .paint__tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .paint__palette { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
  .paint__actions { grid-template-columns: 1fr; }
  .paint__tool, .paint__act { font-size: 14px; }
}
@media print {
  @page { size: A4; margin: 10mm; }
  .no-print, .site-header, header.site-header, .site-footer, footer, .helper, .skip-link, .toasts, nav.crumbs { display: none !important; }
  body { background: #fff !important; }
  .propis, .coloring-sheet { border: 0; padding: 0; max-width: none; margin: 0; }
  .print-only { display: block !important; }
  .propis__arrow, .propis__start { fill: #444; }
  .propis__row { break-inside: avoid; }
}

/* Наклейки, повторение, отчёт */
.stickers { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.sticker { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 8px; border-radius: 8px; background: #f3f0ea; text-align: center; opacity: .6; filter: grayscale(1); }
.sticker.is-got { opacity: 1; filter: none; background: #fff3cc; box-shadow: 0 2px 0 rgba(0,0,0,.08); }
.sticker__pic { font-size: 3rem; line-height: 1; }
.sticker__pic img { width: 64px; height: 64px; object-fit: contain; }
.sticker__title { font-size: 1rem; }
.sticker__hint { font-size: .85rem; color: var(--ink-soft, #666); }
.album-link { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 16px; }
.review h2 { display: flex; align-items: center; gap: 8px; margin-top: 0; }
.review__list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; }
.review__item { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; background: #f3f0ea; }
.review__sign { font-size: 2rem; font-weight: 800; min-width: 2ch; text-decoration: none; color: inherit; }
.review__ask { font-weight: 700; flex: 1; }
.review__item.is-done { background: #e6f5ec; font-weight: 700; }
.report h3 { margin-bottom: 4px; }
@media print { .kids, .tabs--cabinet, .crumbs, .page-head { display: none !important; } .report { border: 0; } }
.game-clock { display: inline-flex; margin: 8px 0; }

/* === Страница произведения: три колонки на компьютере, компактные кнопки на телефоне === */
.wrap--work { max-width: 1240px; }
.work-layout { display: block; }
.work-aside { display: none; }
.marks-inline { display: block; }
.work-layout > .work { width: 100%; max-width: none; margin: 0; }
.aside-box { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; }
.aside-box h2 { margin: 0 0 8px; font: 800 .8rem/1.2 var(--font-ui); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft, #666); }
.aside-list, .aside-menu { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.aside-list a { display: block; padding: 6px 8px; border-radius: 8px; color: inherit; text-decoration: none; font-weight: 600; line-height: 1.3; }
.aside-list a:hover, .aside-menu a:hover { background: #f2f1e8; }
.aside-menu a { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; color: inherit; text-decoration: none; font-weight: 700; }
.aside-menu a[aria-current="page"] { background: #e8efe9; color: var(--accent, #3e6553); }
.aside-menu .icon { width: 18px; height: 18px; flex: none; color: var(--accent, #3e6553); }
.aside-more { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; padding: 4px 8px; font-weight: 700; font-size: .9rem; text-decoration: none; }
.aside-more .icon { width: 16px; height: 16px; }
.aside-marks .marks { border: 0; padding: 0; background: none; }
.aside-marks .work-actions { display: grid; gap: 6px; }
.aside-marks .btn { width: 100%; justify-content: flex-start; }

/* кнопки темпа и действий: компактные, не растянутые на весь экран */
.twister__controls { display: flex; flex-wrap: wrap; gap: 8px; grid-template-columns: none; }
.tempo { flex: 0 0 auto; min-height: 42px; padding: 0 16px; font-size: 15px; }
.work-tools { display: flex; flex-wrap: wrap; gap: 8px; grid-template-columns: none; }
.tool { min-height: 40px; padding: 0 12px; font-size: 14px; }
.twister__hint { max-width: 60ch; }
.work-bar { margin: 10px 0 0; }
.work .marks .btn { min-height: 40px; padding: 0 14px; font-size: 14px; }

@media (max-width: 719px) {
  .twister__controls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
  .tempo { min-height: 40px; padding: 0 6px; border: 0; border-radius: 0; font-size: 14px; background: #fff; border-right: 1px solid var(--line); }
  .tempo:last-of-type { border-right: 0; }
  .tempo .icon { width: 18px; height: 18px; }
  .twister__hint { display: none; }
  .work-tools { display: flex; flex-wrap: nowrap; justify-content: space-between; gap: 6px; }
  .tool { flex: 1 1 0; min-width: 0; padding: 0; justify-content: center; }
  .tool span:not([data-fav-label]) { display: none; }
  .tool [data-fav-label] { display: none; }
  .tool-size { flex: 1.4 1 0; display: flex; }
  .tool-size button { flex: 1; }
  .work .marks { padding: 8px 10px; gap: 6px; }
  .work .marks__who { display: none; }
  .work .marks .work-actions { display: flex; flex-wrap: nowrap; gap: 6px; }
  .work .marks .btn { flex: 1 1 0; min-width: 0; min-height: 38px; padding: 0 6px; font-size: 13px; gap: 4px; }
  .work .marks .btn .muted { display: none; }
}
@media (min-width: 1080px) {
  .work-body--pic { grid-template-columns: minmax(0, 1fr) 230px; }
}
@media (max-width: 719px) {
  :root { --helper-w: 58px; }
  .tool-size { flex: 1.5 1 0; min-width: 0; }
  .tool-size button { padding: 0 2px; min-width: 0; flex: 1; justify-content: center; }
}

/* === Списки: на компьютере четыре колонки и пониже картинки, на телефоне — компактные строки === */
@media (min-width: 1100px) {
  .wrap--list { max-width: 1240px; }
  .wrap--list .cards, .wrap--list .cards--3 { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .wrap--list .cards--4 { grid-template-columns: repeat(4, 1fr); }
  .wrap--list .card__cover { aspect-ratio: 2 / 1; }
}
@media (max-width: 559px) {
  .card { display: grid; grid-template-columns: 104px minmax(0, 1fr); }
  .card__cover { aspect-ratio: auto; height: 100%; min-height: 104px; }
  .card__body { padding: 8px 12px; gap: 2px; min-width: 0; }
  .card__lead { display: none; }
  .card__meta { font-size: 11px; }
  .card__title { font-size: 1.05rem; }
  .card__foot { padding-top: 2px; gap: 10px; font-size: 12px; }
  .card__fav { top: 4px; right: 4px; width: 34px; height: 34px; min-height: 0; }
  .cards { gap: 8px; }
}
@media (max-width: 719px) {
  .quick-filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--gutter, 16px) * -1); padding-inline: var(--gutter, 16px); }
  .quick-filters::-webkit-scrollbar { display: none; }
  .quick-filters__label { display: none; }
  .quick-filters .chip { flex: none; min-height: 36px; padding-inline: 14px; font-size: 14px; }
}

/* === Страница стиха: компактная шапка, значки вместо кнопок, действия под текстом === */
.work-bar--top, .work-bar--bottom { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 0 0; }
.work-bar--bottom { margin: var(--s3) 0 var(--s2); }
.itools, .itool-size { display: inline-flex; align-items: center; gap: 6px; }
.itool { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink-soft); font: 600 13px var(--font-ui); cursor: pointer; }
.itool .icon { width: 19px; height: 19px; }
.itool:hover { background: #f2f1e8; color: var(--ink); }
.itool[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); background: var(--mint); }
.itool--sound { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.itool--sound:hover { background: var(--accent-hover); color: var(--on-accent); }
.itool--sound .i-off, .itool--sound.is-playing .i-on { display: none; }
.itool--sound.is-playing .i-off { display: block; }
.work-note { font-size: 13px; margin-bottom: var(--s3); }
.itool-size { margin-left: 6px; }
@media print { .work-bar--top, .work-bar--bottom, .work-note { display: none !important; } }

.work-head--compact { gap: 6px; }
.work-head--compact .work-title { margin: 0; }
.work-note--top { margin: -2px 0 0; font-size: 13px; color: var(--ink-soft); }
.work-head--compact .fact { min-height: 26px; padding: 0 8px; font-size: 12px; font-weight: 600; gap: 5px; }
.work-head--compact .fact .icon { width: 14px; height: 14px; }

/* === Стих: инструменты. Телефон — один ряд значков; компьютер — правая панель, как колонка фильтров в каталоге === */
.work-top { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s3); }
.work-cols { display: flex; flex-direction: column; gap: var(--s3); }
.work-main { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4); }
.work-side { order: -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 0 0; }
.work-side .side-sec { display: contents; }
.work-side .side-h, .work-side .itool__t { display: none; }
@media (min-width: 1100px) {
  .work-pic--head img { width: 100%; height: auto; aspect-ratio: 2 / 1; max-height: none; object-fit: cover; border-radius: var(--r-md); }
  .work-top { grid-template-columns: minmax(0, 1fr) 220px; gap: var(--s5); align-items: start; padding-bottom: var(--s4); border-bottom: 1px solid var(--line); }
  .work-cols { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: var(--s5); align-items: start; margin-top: var(--s2); }
  .work-main .work-body { border-top: 0; padding-top: 0; }
  .work-main .cards--4, .work-main .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .work-side { order: 0; display: grid; gap: var(--s3); align-self: start; position: sticky; top: 76px; }
  .work-side .side-sec { display: grid; gap: 2px; align-content: start; }
  .work-side .side-h { display: block; font-size: 13px; font-weight: 600; color: var(--ink-soft); margin-bottom: 2px; }
  .work-side .itool { width: 100%; justify-content: flex-start; gap: 10px; height: 32px; padding: 0 8px; border: 0; background: none; border-radius: 8px; font: 600 14px var(--font-ui); color: var(--ink); }
  .work-side .itool:hover { background: #efeee4; }
  .work-side .itool .icon { color: var(--accent); width: 20px; height: 20px; flex: none; }
  .work-side .itool__t { display: inline; }
  .work-side .itool--sound { background: none; color: var(--ink); }
  .work-side .itool--sound:hover { background: #efeee4; color: var(--ink); }
  .work-side .itool[aria-pressed="true"] { background: var(--mint); color: var(--accent); }
  .work-side .itools { display: grid; gap: 2px; }
  .work-side .itool-size { margin: 0; display: flex; gap: 6px; }
  .work-side .itool-size .itool { width: auto; min-width: 44px; justify-content: center; border: 1px solid var(--line); background: var(--surface); }
}

/* Картинка произведения: одна рамка 3:2 для любых исходников, ничего не обрезается, ширина как у текста */
.work-pic--wide { position: relative; isolation: isolate; width: 100%; aspect-ratio: 3 / 2; max-height: 440px; margin: 0; overflow: hidden; border-radius: var(--r-md); background: var(--peach); }
.work-pic--wide::before { content: ""; position: absolute; inset: -24px; z-index: -1; background: var(--pic) center / cover; filter: blur(24px) saturate(1.1); opacity: .65; }
.work-pic--wide img { display: block; width: 100%; height: 100%; max-height: none; object-fit: contain; border-radius: 0; background: none; }

@media (max-width: 1099px) { .work-pic--head { max-width: 360px; } .work-pic--head img { height: auto; aspect-ratio: 2 / 1; object-fit: cover; max-height: none; } }

/* Оценка и просмотры */
.reactions { display: inline-flex; gap: 6px; }
.reactions .itool { gap: 6px; padding: 0 10px; }
.reactions .itool.is-on { color: var(--accent); border-color: var(--accent); background: var(--mint); }
.reactions-row { display: flex; align-items: center; gap: var(--s3); font-size: 14px; }
@media (min-width: 1100px) {
  .work-side .reactions { display: flex; gap: 6px; }
  .work-side .reactions .itool { width: auto; min-width: 64px; justify-content: center; border: 1px solid var(--line); background: var(--surface); }
  .work-side .reactions .itool.is-on { background: var(--mint); border-color: var(--accent); color: var(--accent); }
}

/* сказка: обложка справа в шапке, как картинка у стиха */
.work-top--tale { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s3); }
.work-top--tale .tale-hero__cover { max-width: 180px; aspect-ratio: 4 / 5; border-radius: var(--r-md); }
.work-top--tale .tale-hero__cover span { font-size: 80px; }
.work-top__info { display: grid; gap: var(--s3); align-content: start; min-width: 0; }
.work-top__read { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); }
@media (min-width: 720px) { .work-top--tale { grid-template-columns: minmax(0, 1fr) 180px; gap: var(--s5); align-items: start; padding-bottom: var(--s4); border-bottom: 1px solid var(--line); } }

/* карточка с текстом: стих, рассказ, скороговорка, текст сказки */
.work-body { padding: var(--s5) var(--s6); }
.work-main .work-body { border-top: 1px solid var(--line); padding-top: var(--s5); }
.twister { margin: 0; padding: var(--s5) var(--s6); }
.work-body .prose, .work-body .poem { max-width: none; }
@media (max-width: 560px) { .work-body, .twister { padding: var(--s4); border-radius: 8px; } }
@media print { .work-body, .twister, .text-version { background: none; border: 0; box-shadow: none; padding: 0; } }

/* белый блок, как все остальные, углы 8px */
.work-body, .twister, .text-version {
  background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: none; color: inherit;
}
@media (max-width: 560px) { .work-body, .twister { border-radius: 8px; } }
@media print { .work-body, .twister, .text-version { border: 0; padding: 0; } }

/* === Страница буквы: общий верх, карточки в две колонки, кольцо прогресса === */
.learn-main { container-type: inline-size; min-width: 0; }
.learn-hero { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); grid-template-areas: "head head" "sign pic" "act act";
  gap: 8px 20px; align-items: center; padding: 16px 22px 18px; border-radius: 20px; background: var(--tone); margin-bottom: var(--s4); }
.learn-hero__head { grid-area: head; }
.learn-hero__head h1 { margin: 0; font-size: clamp(24px, 3vw, 32px); line-height: 1.15; }
.learn-hero__head p { margin: 2px 0 0; font-size: 14px; line-height: 1.4; color: var(--ink-soft); }
.learn-hero__sign { grid-area: sign; font-size: clamp(4.5rem, 24cqw, 9.5rem); font-weight: 800; line-height: 1; text-align: center; min-width: 0; }
.learn-hero__pic { --sky1: #c4e5f8; --sky2: #eaf7ee; grid-area: pic; position: relative; margin: 0; min-width: 0; justify-self: center;
  width: min(100%, 333px); aspect-ratio: 4 / 3; filter: drop-shadow(0 3px 5px rgba(60, 80, 60, .16)); }
.tone-peach .learn-hero__pic { --sky1: #ffd8b5; --sky2: #fff1dc; }
.tone-purple .learn-hero__pic { --sky1: #dccdf3; --sky2: #f3ecfb; }
.learn-scene { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: url("../img/scene-hills.41c6338cb031.svg") center bottom / cover no-repeat, linear-gradient(var(--sky1), var(--sky2));
  -webkit-mask: url("../img/scene-mask.fe56d310f7a9.svg") center / 100% 100% no-repeat; mask: url("../img/scene-mask.fe56d310f7a9.svg") center / 100% 100% no-repeat; }
.learn-hero__pic::after { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: url("../img/scene-frame.73dc5375078e.svg") center / 100% 100% no-repeat; }
.learn-scene img { max-width: 80%; max-height: 74%; width: auto; height: auto; object-fit: contain; display: block; margin-bottom: 26px; filter: drop-shadow(0 6px 5px rgba(40, 70, 40, .22)); }
.learn-hero__emoji { font-size: clamp(3.2rem, 13cqw, 5rem); line-height: 1; margin-bottom: 24px; filter: drop-shadow(0 6px 5px rgba(40, 70, 40, .22)); }
.learn-hero__pic figcaption { position: absolute; z-index: 3; left: 50%; bottom: 14px; transform: translateX(-50%); max-width: calc(100% - 40px);
  padding: 3px 18px; border-radius: 999px; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .14);
  font-weight: 800; font-size: clamp(1rem, 3.6cqw, 1.3rem); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.learn-hero__actions { grid-area: act; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.learn-hero__actions .btn { white-space: nowrap; padding-inline: 12px; }

.learn-box { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px 16px; margin-bottom: var(--s4); min-width: 0; }
.learn-box h2 { margin: 0 0 8px; font-size: 1.15rem; line-height: 1.25; }
.learn-box > p.muted { margin: 0 0 8px; }
.learn-duo { display: grid; gap: var(--s4); grid-template-columns: minmax(0, 1fr); margin-bottom: var(--s4); }
.learn-duo > .learn-box { margin-bottom: 0; }
@container (min-width: 600px) { .learn-duo { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); } }
.learn-box .learn-words { margin-top: 0; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.learn-box .learn-words li { padding: 10px 6px; }
.learn-box .learn-words__pic { font-size: 2.4rem; }
.learn-box .learn-pair { flex-wrap: nowrap; gap: 10px; }
.learn-box .learn-pair__cell { flex: 1 1 0; min-width: 0; padding: 8px 10px; }
.learn-box .learn-pair__cell span { font-size: 3.6rem; }

.learn-syl { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.learn-syl__b { min-width: 64px; padding: 8px 16px; border: 0; border-radius: 12px; background: var(--tone); color: var(--ink);
  font: 800 1.6rem/1.2 var(--font-ui); cursor: pointer; transition: transform .12s; }
.learn-syl__b:hover { transform: translateY(-2px); }
.learn-syl__b:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .learn-syl__b { transition: none; } .learn-syl__b:hover { transform: none; } }

/* Страница числа: длинное число мельче, на картинке — столько предметов, сколько число; десятки — плашками */
.learn-hero__things { display: flex; flex-wrap: wrap; justify-content: center; align-content: center; gap: 2px 6px; max-width: 78%; margin-bottom: 30px;
  font-size: clamp(2.2rem, 9cqw, 3.6rem); line-height: 1.1; filter: drop-shadow(0 6px 5px rgba(40, 70, 40, .22)); }
.learn-hero__things.is-many { font-size: clamp(1.6rem, 6.5cqw, 2.6rem); max-width: 70%; }
.learn-hero__tens { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; max-width: 76%; margin-bottom: 30px; }
.learn-hero__tens span { display: inline-flex; align-items: center; justify-content: center; min-width: 52px; min-height: 52px; border-radius: 12px;
  background: #fff; border: 3px solid #f0a05a; font-weight: 800; font-size: 1.35rem; color: var(--ink); box-shadow: 0 5px 6px rgba(40, 70, 40, .18); }
.learn-hero__tens.is-many { gap: 4px; max-width: 70%; }
.learn-hero__tens.is-many span { min-width: 40px; min-height: 40px; font-size: 1.05rem; border-width: 2px; }
/* Телефон (решение владельца 04.12): без рамки и без картинки-заглушки — она повторяет блоки ниже.
   Крупная буква/цифра слева, заголовок справа, кнопки под ними. Загруженная настоящая картинка остаётся, но без рамки. */
@media (max-width: 719px) {
  .learn-hero--stub { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "sign head" "act act"; gap: 8px 16px; }
  .learn-hero--stub .learn-hero__pic { display: none; }
  .learn-hero--stub .learn-hero__sign { font-size: clamp(3.6rem, 18vw, 5.5rem); padding-inline: 4px; }
  .learn-hero--stub .learn-hero__sign--long { font-size: clamp(3rem, 14vw, 4.4rem); }
  .learn-hero__pic { filter: none; }
  .learn-hero__pic::after { content: none; }
  .learn-scene { background: none; -webkit-mask: none; mask: none; }
  .learn-hero__pic figcaption { box-shadow: none; }
}
.learn-hero__sign--long { font-size: clamp(3.6rem, 17cqw, 7.5rem); letter-spacing: -.02em; }
.learn-box .learn-things { margin: 4px 0 8px; font-size: clamp(2rem, 6cqw, 2.8rem); }
.learn-box .learn-things span { cursor: pointer; }
.learn-things--empty { opacity: .55; }
.learn-tens { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; padding: 0; }
.learn-tens span { display: inline-flex; align-items: center; justify-content: center; min-width: 46px; min-height: 46px; border-radius: 10px;
  background: var(--surface-2, #f3f0ea); border: 2px solid var(--line); font-weight: 800; font-size: 1.1rem; }
.learn-box .numline { margin-bottom: 0; }
.learn-duo > .learn-box:only-child { grid-column: 1 / -1; }
.learn-ring { display: grid; justify-items: center; gap: 6px; padding: 0 8px; }
.learn-ring__dial { position: relative; width: 112px; aspect-ratio: 1; border-radius: 50%; display: grid; place-content: center; text-align: center;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), #e6e5da 0); }
.learn-ring__dial::before { content: ""; position: absolute; inset: 11px; border-radius: 50%; background: var(--bg); }
.learn-ring__dial > * { position: relative; }
.learn-ring__dial b { font-size: 1.9rem; line-height: 1; }
.learn-ring__dial span { font-size: 13px; color: var(--ink-soft); font-weight: 600; }
.learn-ring p { margin: 0; font-size: 13px; color: var(--ink-soft); text-align: center; }
@media (max-width: 480px) {
  .learn-hero { padding: 12px 14px 14px; gap: 6px 12px; border-radius: 16px; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
  .learn-hero__actions .btn { padding-inline: 10px; font-size: 14px; }
  .learn-box { padding: 12px; }
}

/* Картинка и текст — один белый блок; оценка и кнопки — отдельный блок под ним */
.work-card { background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.work-main .work-card .work-body { border: 0; border-radius: 0; background: none; }
/* картинка с теми же отступами от краёв, что у текста, как фото в посте соцсети */
.work-card .work-pic--wide { width: auto; margin: var(--s5) var(--s6) 0; border-radius: var(--r-md); max-height: 440px; }
@media (max-width: 560px) { .work-card .work-pic--wide { margin: var(--s4) var(--s4) 0; } }
.work-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3) var(--s5); padding: var(--s3) var(--s5); background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.work-bar__part { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); min-width: 0; }
.work-bar__q { font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.work-bar .itools { flex-wrap: wrap; }
.work-bar .itool { width: auto; height: 36px; gap: 8px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font: 600 14px var(--font-ui); color: var(--ink); }
.work-bar .itool .icon { color: var(--accent); width: 20px; height: 20px; flex: none; }
.work-bar .itool__t { display: inline; }
.work-bar .itool:hover { background: #efeee4; }
.work-bar .itool[aria-pressed="true"], .work-bar .itool.is-on { background: var(--mint); border-color: var(--accent); color: var(--accent); }
.work-bar { justify-content: flex-start; }
/* телефон: оценка — две равные кнопки, ниже действия сеткой 2×2, всё по ширине блока */
@media (max-width: 560px) {
  .work-card, .work-bar { border-radius: 8px; }
  .work-bar { display: grid; gap: var(--s2); padding: var(--s3); }
  .work-bar__part { display: block; }
  .work-bar .reactions, .work-bar .itools { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); width: 100%; }
  .work-bar .itool { width: 100%; justify-content: center; padding: 0 8px; }
  .work-bar .reactions .itool { min-width: 0; }
}
@media print { .work-card { border: 0; } .work-bar { display: none; } }

/* Стрелки к соседним материалам под блоком кнопок */
.work-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
.work-nav__link { display: flex; align-items: center; gap: var(--s3); min-width: 0; padding: var(--s3) var(--s4); background: #fff; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); text-decoration: none; }
.work-nav__link:hover { background: #efeee4; }
.work-nav__link span { display: grid; min-width: 0; }
.work-nav__link small { font-size: 12px; font-weight: 600; color: var(--ink-soft); }
.work-nav__link b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.work-nav__link .icon { flex: none; width: 22px; height: 22px; color: var(--accent); }
.work-nav__link--prev .icon { transform: scaleX(-1); }
.work-nav__link--next { justify-content: flex-end; text-align: right; }
@media (max-width: 560px) { .work-nav { gap: var(--s2); } .work-nav__link { padding: var(--s3); gap: var(--s2); } .work-nav__link b { font-size: 14px; } }
@media print { .work-nav { display: none; } }
.infinite-status { text-align: center; margin: var(--s3) 0; min-height: 1.2em; }
