/* Офлайн и родители: карта дня (письмо, Сова, Кот, «Пых спит»), экраны после приключения, вход для взрослых
   и родительская зона — «тетрадь в клетку». Классы карты здесь, потому что их рисует main.js этого исполнителя. */

/* ---------- карта: что сегодня ---------- */
.today-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(330px, 100%), 1fr)); gap: 18px; }
.today-list > :first-child { grid-column: 1 / -1; }
.today {
  grid-template-columns: auto 1fr; grid-template-areas: "hero label" "hero title";
  column-gap: 20px; row-gap: 2px; align-items: center; position: relative;
}
.today-hero { grid-area: hero; width: 84px; height: 84px; display: grid; place-items: center; background: #fff6ea; border: 2px solid rgba(31, 43, 61, .18); }
.today-hero .hero-body { display: block; width: 64px; height: 64px; background: var(--hero, var(--c-pyh)); }
.today-label { grid-area: label; align-self: end; }
.today-title { grid-area: title; align-self: start; }
.today-list > .today:not(:first-child) { min-height: 108px; padding: 16px 18px; }
.today-list > .today:not(:first-child) .today-title { font-size: 25px; }
.today-list > .today:not(:first-child) .today-hero { width: 70px; height: 70px; }
.today-list > .today:not(:first-child) .today-hero .hero-body { width: 52px; height: 52px; }

/* письмо от родителя: конверт «авиа» — полосатая кромка читается как письмо и без букв */
.today.is-letter {
  background: #fffaf0; color: var(--c-ink); border: 9px solid transparent;
  border-image: repeating-linear-gradient(-45deg, #d9574a 0 14px, #fffaf0 14px 22px, #2e6f9e 22px 36px, #fffaf0 36px 44px) 9;
  box-shadow: 0 6px 0 rgba(31, 43, 61, .35);
}
.today.is-letter:active { box-shadow: 0 2px 0 rgba(31, 43, 61, .35); }
.today.is-letter .today-label { font-weight: 700; color: #b2412f; opacity: 1; }
.today-env { background: none; border: 0; color: var(--c-ink); transform: rotate(-6deg); }
.today-env svg { width: 76px; height: 57px; }

.today.is-review { background: var(--c-sova); box-shadow: 0 6px 0 #6b4826; }
.today.is-review:active { box-shadow: 0 2px 0 #6b4826; }
.today.is-kot { background: #ee8a45; color: var(--c-ink); box-shadow: 0 6px 0 #a8731f; } /* светлее var(--c-kot): подпись чернилами 16 px на #e0762c — 4,3, ниже AA */
.today.is-kot:active { box-shadow: 0 2px 0 #a8731f; }
.today.is-kot .today-hero .hero-body { border-radius: 30% 30% 46% 46% / 22% 22% 60% 60%; } /* уши-углы: «кошачий» силуэт */

/* карточка вместо «Приключения дня»: общая раскладка (герой слева, заголовок и подпись справа) */
.sleep-card {
  display: grid; grid-template-columns: auto 1fr; grid-template-areas: "pyh title" "pyh label"; column-gap: 24px; align-items: center;
  padding: 26px 30px; min-height: 150px; position: relative; overflow: hidden;
}
.sleep-card .today-title { grid-area: title; font-family: var(--f-title); font-size: 34px; line-height: 1.1; align-self: end; }
.sleep-card .today-label { grid-area: label; font-size: 17px; align-self: start; max-width: 560px; }

/* Пых спит до завтра: ночная карточка с месяцем */
.sleep-card:not(.is-rest) { color: #eef3fa; background: #24324a radial-gradient(circle at 92% 22%, #f6e3b8 0 26px, transparent 27px); box-shadow: 0 6px 0 #141d2c; }
.sleep-card:not(.is-rest)::after { content: ""; position: absolute; right: calc(8% - 14px); top: calc(22% - 30px); width: 50px; height: 50px; border-radius: 50%; background: #24324a; } /* месяц */
.sleep-card:not(.is-rest) .today-label { opacity: .85; }

/* бесплатная версия, новых на сегодня больше нет: дневная бумажная карточка с Пыхом (не ночь — Пых не спит;
   ни цен, ни «купи»: ребёнок слышит только «новое будет завтра») */
.sleep-card.is-rest { color: var(--c-ink); background: var(--c-card); border: 2px solid var(--c-ink); box-shadow: 0 6px 0 rgba(31, 43, 61, .35); }
.sleep-card.is-rest .today-label { color: var(--c-ink); }
.rest-pyh { grid-area: pyh; display: grid; place-items: end center; width: 104px; }
.rest-pyh img { display: block; height: 96px; width: auto; max-width: 104px; object-fit: contain; filter: drop-shadow(0 3px 0 rgba(34, 48, 74, .18)); }
.sleep-pyh { grid-area: pyh; position: relative; width: 96px; height: 96px; }
/* карточка сна — кнопка: касание — Пых сонно говорит, что спит до завтра (ребёнок не читает подпись) */
button.sleep-card { font: inherit; text-align: left; border: 0; width: 100%; cursor: pointer; touch-action: manipulation; -webkit-touch-callout: none; }
.sleep-z { position: absolute; right: -16px; top: -6px; font-family: var(--f-title); font-size: 22px; color: #f6e3b8; animation: drift 3s ease-in-out infinite; }
.sleep-z i { font-style: normal; font-size: 17px; position: relative; top: 10px; margin-left: 2px; }
.sleep-z b { font-weight: 400; font-size: 13px; position: relative; top: 18px; margin-left: 2px; }
@keyframes drift { 50% { transform: translate(4px, -6px); opacity: .7; } }
.map.is-sleeping .zone-advs .adv { opacity: .45; cursor: default; }
/* рамка — чернилами, а не красным: красный в палитре острова значит «ой», а здесь Пых просто рассказывает */
.map-notice { margin: 0; padding: 14px 18px; background: #fff; border: 2px solid var(--c-ink); font-size: 17px;
  position: sticky; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 3; box-shadow: 0 4px 0 rgba(31, 43, 61, .25); } /* последний на карте, но всегда в окне: липнет к низу экрана */

/* кнопка входа для взрослых: удержание заполняет её слева направо за 2 секунды */
.parent-gate { position: relative; overflow: hidden; touch-action: none; -webkit-touch-callout: none; min-height: 44px; white-space: nowrap; flex-shrink: 0; }
.parent-gate::before { content: ""; position: absolute; inset: 0; width: 0; background: rgba(46, 111, 158, .22); }
.parent-gate.is-holding::before { width: 100%; transition: width 2s linear; }

/* ---------- экраны после приключения ---------- */
.stage-bg.zone-letter { background-color: #fbf1df; }
.stage-bg.zone-night { background-color: #2b3a55; }
.letter-voice { display: grid; justify-items: center; gap: 22px; }
.letter-voice .today-hero { grid-area: auto; width: auto; height: auto; }
.letter-voice .today-env svg { width: 180px; height: 135px; }
.letter-play { width: 112px; height: 112px; border: 0; background: var(--c-pyh); color: #fff; box-shadow: 0 6px 0 var(--c-pyh-dark); display: grid; place-items: center; }
.letter-play svg { width: 56px; height: 56px; margin-left: 6px; }
.letter-play:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--c-pyh-dark); }
.letter-play.is-playing { animation: bob .5s infinite alternate ease-in-out; }
.tired { position: relative; width: 140px; height: 120px; }
.tired .sleep-z { font-size: 54px; right: 0; top: 0; }
.tired .sleep-z i { font-size: 40px; top: 24px; } .tired .sleep-z b { font-size: 28px; top: 44px; }

/* ---------- вход для взрослых ---------- */
.gate, .parent {
  min-height: 100%; background-color: #fbfaf5;
  background-image: linear-gradient(rgba(46, 111, 158, .1) 1px, transparent 1px), linear-gradient(90deg, rgba(46, 111, 158, .1) 1px, transparent 1px);
  background-size: 24px 24px; user-select: text; -webkit-user-select: text;
}
.gate { display: grid; place-items: center; padding: 24px 16px; }
.gate-card { width: min(440px, 100%); background: #fff; border: 2px solid var(--c-ink); box-shadow: 6px 6px 0 var(--c-ink); padding: 26px 28px 24px; display: grid; gap: 12px; }
.gate-card h1 { margin: 0; font-family: var(--f-title); font-weight: 400; font-size: 30px; }
.gate-card p { margin: 0; }
.gate-q { font-family: var(--f-title); font-size: 46px; line-height: 1.1; }
.gate-input { font: inherit; font-size: 34px; font-weight: 700; width: 140px; min-height: 64px; padding: 4px 14px; border: 2px solid var(--c-ink); border-radius: 0; background: #fff; color: var(--c-ink); }
.gate-input:focus { outline: 3px solid var(--c-pyh); outline-offset: 2px; }
.gate-err { color: #b2412f; font-weight: 700; }
.gate-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.gate-actions button, .gate .gate-back { min-height: 52px; padding: 0 20px; border: 1.5px solid var(--c-ink); background: #fff; }

/* ---------- родительская зона: тетрадь в клетку с полями ---------- */
.parent { max-width: none; margin: 0; padding: 0; display: block; }
.p-sheet {
  max-width: 940px; margin: 0 auto; position: relative; display: grid; gap: 18px; align-content: start; min-height: 100vh; min-height: 100dvh;
  padding: max(20px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) 48px 76px;
}
.p-sheet::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50px; width: 2px; background: rgba(217, 87, 74, .5); } /* красное поле */
.p-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.p-head h1 { font-family: var(--f-title); font-weight: 400; font-size: 34px; margin: 0; }
.parent button { min-height: 48px; padding: 0 16px; border: 1.5px solid var(--c-ink); background: #fff; color: var(--c-ink); border-radius: 0; }
.parent button:disabled { opacity: .5; cursor: default; }
.parent button:active:not(:disabled) { transform: translateY(2px); }
.parent h2 { font-family: var(--f-title); font-weight: 400; font-size: 26px; margin: 0 0 6px; }
.parent h3 { font-size: 17px; margin: 18px 0 8px; text-transform: uppercase; letter-spacing: .04em; color: var(--c-muted); }
.parent p { line-height: 1.45; }

.p-tabs { display: flex; flex-wrap: wrap; border-bottom: 2px solid var(--c-ink); }
.parent .p-tabs button { border: 2px solid var(--c-ink); border-bottom: 0; margin: 0 -2px -2px 0; background: #e9f0f5; min-height: 52px; padding: 0 18px; font-weight: 700; }
.parent .p-tabs button[aria-selected="true"] { background: #fff; padding-bottom: 2px; position: relative; z-index: 1; box-shadow: inset 0 4px 0 var(--c-pyh); }
.p-count { display: inline-block; min-width: 24px; padding: 0 6px; margin-left: 4px; background: var(--c-pyh-dark); color: #fff; font-size: 14px; line-height: 24px; text-align: center; } /* белый на тёмно-зелёном — 5,7 (WCAG AA) */

.p-body { display: grid; gap: 12px; align-content: start; }
.p-body > h2:first-child, .p-body > .p-flash + h2 { margin-top: 6px; }
.p-hide { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.p-lead { font-size: 19px; margin: 0; max-width: 680px; }
.p-muted { color: var(--c-muted); font-size: 15px; }
.p-card { background: #fff; border: 1.5px solid var(--c-ink); box-shadow: 4px 4px 0 var(--c-ink); padding: 16px 20px; }
.p-card > :first-child { margin-top: 0; }
.p-card > :last-child { margin-bottom: 0; }
.p-card p { margin: 0 0 8px; }
.p-flash { margin: 0; padding: 12px 16px; background: #e3f3e8; border-left: 6px solid var(--c-ok); font-weight: 700; }
.p-err { margin: 0; color: #b2412f; font-weight: 700; }
.p-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
/* главная кнопка: белый на var(--c-pyh) — 3,4, ниже AA для текста 18 px; на тёмно-зелёном — 5,7 */
.p-primary { background: var(--c-pyh-dark) !important; color: #fff !important; border-color: #2a5216 !important; box-shadow: 0 4px 0 #2a5216; font-weight: 700; }
.p-danger { background: var(--c-oops) !important; color: #fff !important; border-color: #9e3227 !important; font-weight: 700; }
.p-danger-line { border-color: var(--c-oops) !important; color: #b2412f !important; font-weight: 700; }

/* отчёт */
.p-report { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 22px; align-items: start; }
.p-num { margin: 4px 0 10px !important; font-size: 18px; }
.p-num b { font-family: var(--f-title); font-weight: 400; font-size: 52px; line-height: .9; margin-right: 4px; vertical-align: -4px; }
.p-num span { color: var(--c-muted); }
.p-list { margin: 0 0 8px; padding-left: 22px; display: grid; gap: 6px; line-height: 1.4; }
.p-dinner { background: #fffaf0; transform: rotate(-.4deg); } /* листок на холодильник */
.p-dinner ol { counter-reset: q; list-style: none; padding: 0; }
.p-dinner li { counter-increment: q; padding-left: 34px; position: relative; }
.p-dinner li::before { content: counter(q); position: absolute; left: 0; top: -2px; font-family: var(--f-title); font-size: 24px; color: var(--c-pyh); }

/* выбор: цель, лимит, от кого */
.p-opts { display: flex; flex-wrap: wrap; gap: 10px; }
.parent .p-opt { font-weight: 500; }
.parent .p-opt[aria-pressed="true"] { background: var(--c-ink); color: #fff; font-weight: 700; }
.parent .p-opt[aria-pressed="true"]::before { content: "✓ "; }
.p-result { margin: 10px 0 0; padding: 12px 16px; background: #fff; border: 1.5px dashed var(--c-ink); font-size: 18px; }

/* письмо */
.p-letter { display: grid; gap: 16px; max-width: 680px; }
.p-field { display: grid; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.p-field > span, .p-field legend { font-weight: 700; padding: 0; }
.p-field small { font-weight: 500; color: var(--c-muted); }
.parent select, .parent textarea, .parent input[type="text"], .parent input:not([type]) {
  font: inherit; color: var(--c-ink); background: #fff; border: 1.5px solid var(--c-ink); border-radius: 0; min-height: 50px; padding: 8px 12px; width: 100%; max-width: 100%;
}
.parent textarea { resize: vertical; min-height: 76px; line-height: 1.4; }
.parent input[name="fromOwn"] { max-width: 320px; }
.p-radio { position: relative; }
.p-radio input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.p-radio span { display: grid; place-items: center; min-height: 48px; padding: 0 18px; border: 1.5px solid var(--c-ink); background: #fff; }
.p-radio input:checked + span { background: var(--c-ink); color: #fff; font-weight: 700; }
.p-radio input:focus-visible + span { outline: 3px solid var(--c-pyh); outline-offset: 2px; }
.p-rec audio { height: 44px; max-width: 100%; }
.p-rec.is-recording .p-rec-stop { background: var(--c-oops); color: #fff; border-color: #9e3227; }
.p-rec.is-recording .p-rec-stop::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 8px; background: #fff; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.p-rec-status { font-weight: 700; min-height: 1.2em; }
.p-letter > .p-primary { justify-self: start; min-height: 56px; padding: 0 26px; }
.p-letters, .offline-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.p-letters li { display: grid; grid-template-columns: 1fr auto auto; gap: 8px 14px; align-items: center; padding: 12px 14px; background: #fff; border: 1.5px solid var(--c-line); }
.p-letters li.is-done { background: rgba(255, 255, 255, .6); }
.p-note { display: block; margin-top: 2px; }
.p-state { font-size: 15px; color: var(--c-muted); }
.p-letters li:not(.is-done) .p-state { color: var(--c-pyh-dark); font-weight: 700; } /* var(--c-ok) на белом — 4,0 при 15 px */
.p-letters li:not(.is-done) .p-state.is-later { color: var(--c-muted); }   /* придёт завтра / ждёт очереди */
.p-tomorrow { display: block; margin-top: 4px; }
.p-tag { display: inline-block; font-size: 13px; padding: 0 6px; border: 1px solid var(--c-ink); vertical-align: 2px; }

/* без экрана */
.offline-list li { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; padding: 14px 18px; border: 1.5px solid var(--c-ink); }
.offline-list li p { margin: 6px 0 0; }
.p-done { color: var(--c-muted); }

/* время и данные */
.p-alert { border-color: #24324a; background: #eef1f7; }
.p-wipe { border-color: var(--c-oops); box-shadow: 4px 4px 0 var(--c-oops); }
.p-confirm { padding: 14px 16px; margin-bottom: 10px; background: #fdecea; border: 2px solid var(--c-oops); }
.p-confirm p { margin: 0 0 10px; }
.p-asr-status { margin: 8px 0 0 !important; min-height: 1.2em; }

@media (max-width: 700px) {
  .today-list { gap: 14px; }
  .today { column-gap: 14px; padding: 18px; }
  .today .today-title { font-size: 26px; }
  .today-hero { width: 66px; height: 66px; } .today-hero .hero-body { width: 50px; height: 50px; }
  .today-list > .today:not(:first-child) .today-hero { width: 60px; height: 60px; }
  .today-list > .today:not(:first-child) .today-hero .hero-body { width: 44px; height: 44px; }
  .today-env svg { width: 60px; height: 45px; }
  .sleep-card { grid-template-columns: 1fr; grid-template-areas: "pyh" "title" "label"; row-gap: 8px; padding: 22px; }
  .sleep-card .today-title { font-size: 28px; }
  .rest-pyh { width: auto; justify-self: start; } .rest-pyh img { height: 76px; }
  .p-sheet { padding-left: 34px; padding-right: 16px; gap: 14px; }
  .p-sheet::before { left: 18px; }
  .p-head h1 { font-size: 28px; }
  .p-tabs { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 0; gap: 0; }
  .parent .p-tabs button { border-bottom: 2px solid var(--c-ink); margin: 0 -2px -2px 0; padding: 0 6px; font-size: 16px; }
  .parent .p-tabs button[aria-selected="true"] { padding-bottom: 0; }
  .p-report { grid-template-columns: 1fr; }
  .p-card { padding: 14px 16px; box-shadow: 3px 3px 0 var(--c-ink); }
  .p-letters li { grid-template-columns: 1fr auto; }
  .p-letters li > div { grid-column: 1 / -1; }
  .offline-list li { grid-template-columns: 1fr; }
  .offline-list li button { justify-self: start; }
  .gate-q { font-size: 40px; }
}
.p-plan, .p-limit { margin: 0 0 14px; padding: 10px 14px; border: 1.5px dashed var(--c-line, rgba(34,48,74,.25)); font-size: 15px; line-height: 1.45; }

/* согласие родителя: лист поверх зоны для взрослых (форма письма под ним сохраняется) */
.p-consent { position: fixed; inset: 0; z-index: 30; display: flex; padding: max(16px, env(safe-area-inset-top)) 16px 16px; background: rgba(34, 48, 74, .5); overflow-y: auto; }
.p-consent-card { margin: auto; width: min(640px, 100%); background: #fff; border: 2px solid var(--c-ink); box-shadow: 6px 6px 0 var(--c-ink); padding: 24px 26px 22px; display: grid; gap: 12px; }
.p-consent-card h2 { margin: 0; }
.p-consent-card p, .p-consent-card .p-list { margin: 0; }
.p-consent-card .p-row { margin-top: 4px; }
.p-consent-card .p-row button { min-height: 52px; padding: 0 22px; }
/* два независимых согласия (А — микрофон, Б — голосовое письмо): отметка-переключатель на каждое, по умолчанию выключена */
.p-consent-opts { display: grid; gap: 10px; }
.p-consent-opt { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; padding: 12px 14px; border: 1.5px solid var(--c-ink); background: #fbfaf5; cursor: pointer; position: relative; }
.p-consent-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.p-switch { width: 56px; height: 32px; margin-top: 2px; border: 2px solid var(--c-ink); background: #fff; position: relative; flex-shrink: 0; }
.p-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; background: var(--c-muted); transition: transform .15s; }
.p-consent-opt input:checked + .p-switch { background: var(--c-pyh); border-color: var(--c-pyh-dark); }
.p-consent-opt input:checked + .p-switch::after { transform: translateX(24px); background: #fff; }
.p-consent-opt input:focus-visible + .p-switch { outline: 3px solid var(--c-pyh); outline-offset: 2px; }
.p-consent-opt:has(input:checked) { background: #eef6e8; }
.p-consent-text { display: grid; gap: 4px; line-height: 1.4; }
.p-consent-text small { font-size: 14px; }
.p-consent-one { padding: 12px 14px; border: 1.5px solid var(--c-ink); background: #fbfaf5; }
.p-consent-one p { margin: 4px 0 0 !important; }
.p-consents h4 { margin: 0 0 4px; font-size: 17px; }
.p-consent-state { padding: 12px 0 2px; border-top: 1.5px dashed var(--c-line); }
.p-consent-state p { margin: 0 0 8px; }
.parent a { color: var(--c-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.parent a:focus-visible { outline: 3px solid var(--c-pyh); outline-offset: 2px; }

/* подвал: возрастная маркировка и документы сайта */
.p-foot { display: flex; flex-wrap: wrap; gap: 4px 20px; align-items: baseline; margin-top: 10px; padding-top: 12px; border-top: 1.5px dashed var(--c-line); font-size: 15px; color: var(--c-muted); }
.p-foot nav { display: flex; flex-wrap: wrap; gap: 0 16px; }
.p-foot a { color: var(--c-muted); display: inline-block; padding: 6px 0; }
.p-age { font-weight: 700; color: var(--c-ink); }
@media (max-width: 700px) {
  .p-consent-card { padding: 18px 16px 16px; box-shadow: 4px 4px 0 var(--c-ink); font-size: 16px; gap: 10px; }
  .p-consent-card h2 { font-size: 23px; }
  .p-consent-opt { gap: 12px; padding: 10px 12px; }
}

/* ---------- волна вовлечённости: только для взрослого ---------- */
/* предложения над отчётом: выбрать лимит, «Сохранить остров» (на экран «Домой») */
.p-offer { border-style: dashed; box-shadow: 4px 4px 0 var(--c-pyh); }
.p-offer h2 { margin-bottom: 4px; }
.p-offer .p-opts { margin: 4px 0 10px; }
.p-home-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 22px; margin: 4px 0 10px; }
.p-home-steps h3 { margin: 6px 0 6px; }
.p-home-steps ol { margin: 0 0 8px; padding-left: 22px; display: grid; gap: 6px; line-height: 1.4; }
/* на iPad и iPhone одна колонка шагов, и предупреждение «начнётся сначала» — не мелким серым, а заметно */
.p-home-steps:has(> section:only-child) { grid-template-columns: 1fr; max-width: 680px; }
.p-home-warn { padding: 8px 12px; background: #fff6e0; border-left: 6px solid #e0762c; line-height: 1.4; }
.p-ico { width: 20px; height: 20px; vertical-align: -4px; fill: currentColor; }
.p-ico path { fill: none; }
/* дни с Пыхом за 14 дней и рост: во всю ширину отчёта */
.p-grow-card { grid-column: 1 / -1; display: grid; gap: 6px; }
.p-days { margin: 0 !important; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-weight: 700; }
.p-dots { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.p-dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--c-ink); background: #fff; }
.p-dots i.is-on { background: var(--c-pyh); border-color: var(--c-pyh-dark); }
.p-grow { margin: 0 !important; }
.p-grow b, .p-stickers b, .p-tomorrow-hook b { font-weight: 700; }
.p-tomorrow-hook { margin-top: 4px !important; padding-top: 8px; border-top: 1.5px dashed var(--c-line); }
/* переключатель «Спокойные герои» — как отметки согласий */
.p-toggle { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; max-width: 680px; padding: 12px 14px;
  border: 1.5px solid var(--c-ink); background: #fff; cursor: pointer; position: relative; }
.p-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.p-toggle input:checked + .p-switch { background: var(--c-pyh); border-color: var(--c-pyh-dark); }
.p-toggle input:checked + .p-switch::after { transform: translateX(24px); background: #fff; }
.p-toggle input:focus-visible + .p-switch { outline: 3px solid var(--c-pyh); outline-offset: 2px; }
.p-toggle-text { display: grid; gap: 4px; line-height: 1.4; }
.p-toggle-text small { font-size: 14px; }
/* «Данные»: сохранность, пометка тестового устройства, наблюдение */
.p-nostat { padding: 8px 12px; background: #fff6e0; border-left: 6px solid #e0762c; }
.parent .p-observe-text { margin-top: 10px; min-height: 220px; font-size: 14px; line-height: 1.45; font-family: ui-monospace, Menlo, Consolas, monospace; white-space: pre-wrap; }
@media (max-width: 700px) {
  .p-home-steps { grid-template-columns: 1fr; }
  .p-dots { gap: 5px; }
  .p-dots i { width: 14px; height: 14px; }
  .p-toggle { gap: 12px; padding: 10px 12px; }
}

/* ---------- аудит 08.11 (группа F): письма, без экрана, вкладки, документы, сказка на ночь ---------- */
/* подтверждение «Удалить письмо и запись голоса?» — во всю строку письма */
.p-letters li .p-confirm { grid-column: 1 / -1; margin: 0; }
.p-off-when { font-size: 14px; margin-left: 4px; white-space: nowrap; }
.p-days-n { font-weight: 500; color: var(--c-muted); font-size: 15px; }
.p-week-days { margin: 0 0 8px; }
/* фокус: вкладки — видимой рамкой; заголовок и сообщение получают фокус программно (tabindex="-1") — без рамки */
.parent .p-tabs button:focus-visible { outline: 3px solid var(--c-ink); outline-offset: -5px; }
.parent [tabindex="-1"]:focus { outline: none; }
.p-body:focus-visible { outline: 3px solid var(--c-pyh-dark); outline-offset: 4px; }
/* первое из раскрытых писем («Показать все пройденные») — с клавиатуры видно, куда попали */
.parent .p-letters li[data-letter-more]:focus-visible { outline: 3px solid var(--c-pyh-dark); outline-offset: 2px; }

/* документ сайта поверх зоны (и поверх экрана согласия): лист с прокруткой внутри, шапка с «Закрыть» всегда видна */
.p-doc { position: fixed; inset: 0; z-index: 40; display: flex; padding: max(12px, env(safe-area-inset-top)) 12px 12px; background: rgba(34, 48, 74, .55); }
.p-doc-card { margin: auto; width: min(760px, 100%); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); display: grid; grid-template-rows: auto minmax(0, 1fr);
  background: #fff; border: 2px solid var(--c-ink); box-shadow: 6px 6px 0 var(--c-ink); }
.parent .p-doc-head { display: flex; flex-wrap: nowrap; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px 12px; border-bottom: 1.5px dashed var(--c-line); }
.p-doc-head h2 { margin: 0 !important; font-size: 23px !important; line-height: 1.2; min-width: 0; overflow-wrap: break-word; hyphens: auto; -webkit-hyphens: auto; }
.p-doc-head button { flex-shrink: 0; }
.p-doc-body { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 12px 20px 20px; font-size: 16px; line-height: 1.5; }
.p-doc-body h2 { font-size: 20px !important; margin: 20px 0 6px !important; }
.p-doc-body h3 { text-transform: none !important; letter-spacing: 0 !important; color: var(--c-ink) !important; }
.p-doc-body p, .p-doc-body ul, .p-doc-body ol { margin: 0 0 10px; }
.p-doc-body table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin: 10px 0; font-size: 15px; }
.p-doc-body th, .p-doc-body td { border: 1px solid var(--c-line); padding: 6px 8px; text-align: left; vertical-align: top; min-width: 120px; }
.p-doc-body .box { border: 1.5px solid var(--c-line); padding: 10px 12px; margin: 10px 0; background: #fbfaf5; }
.p-doc-body .meta, .p-doc-body .lead { color: var(--c-muted); }
.p-doc-body .req { background: #ffe27a; color: #3a2d00; padding: 0 .25em; font-weight: 600; }
.p-doc-body footer { display: none; }
.p-doc-off { padding: 10px 12px; background: #fff6e0; border-left: 6px solid #e0762c; }

/* сказка на ночь в «Время» */
.p-story { display: grid; gap: 12px; max-width: 680px; }
.p-story > p { margin: 0; }
.p-story .p-toggle { box-shadow: none; }
.p-story-window label { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.parent .p-story-window select { width: auto; min-width: 110px; }
.p-story-night { box-shadow: none; }
@media (max-width: 700px) {
  .p-doc { padding: max(8px, env(safe-area-inset-top)) 8px 8px; }
  .p-doc-card { box-shadow: 4px 4px 0 var(--c-ink); max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); }
  .parent .p-doc-head { padding: 12px 14px 10px; }
  .p-doc-head h2 { font-size: 18px !important; }
  .p-doc-body { padding: 10px 14px 16px; }
}

/* «Для родителей» без сети (parent.js offlineNote): подсказка под ссылками подвала, во всю строку */
.p-foot-note { flex-basis: 100%; margin: 4px 0 0; color: var(--c-ink); font-size: 15px; }
