/* Шість подарунків для вчителя · 2027 — стилі (mobile-first) */

:root {
  --bg: #f7f2ea;
  --bg-2: #efe7da;
  --surface: #ffffff;
  --ink: #1f2a37;
  --muted: #5c6672;
  --line: #e2d8c9;
  --pine: #24493f;
  --pine-2: #2f6a5a;
  --gold: #c8962e;
  --gold-soft: #f3e3b8;
  --berry: #b5473a;
  --ok: #2f7a4f;
  --ok-bg: #e6f3ea;
  --bad: #a33a2e;
  --bad-bg: #fbe9e5;
  --focus: #1d6fd6;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(31, 42, 55, .06), 0 6px 20px rgba(31, 42, 55, .07);
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gift-color: var(--pine-2);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  background-image: radial-gradient(circle at 10% 0%, #fff8ea 0, transparent 40%), radial-gradient(circle at 100% 20%, #f2eadc 0, transparent 35%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; outline: none; }
img, svg { max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.2; margin: 0 0 .5em; font-weight: 700; color: var(--ink); }
h1 { font-size: clamp(1.7rem, 6vw, 2.8rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.35rem, 4.5vw, 1.8rem); }
.h3, h3 { font-size: 1.25rem; }
.h4, h4 { font-size: 1.05rem; }
p { margin: 0 0 .8em; }
a { color: var(--pine-2); text-underline-offset: 3px; }
a:hover { color: var(--pine); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
h1:focus, [tabindex="-1"]:focus { outline: none; }
h1:focus-visible { outline: none; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.print-only { display: none; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; font-weight: 700; color: var(--gold); margin-bottom: .5rem; }
.lead { font-size: 1.08rem; color: var(--muted); max-width: 46rem; }

.skip-link { position: absolute; left: 12px; top: -60px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { top: 12px; }

/* ---------- Шапка ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(247, 242, 234, .92);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; }
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--pine); font-family: var(--serif); font-weight: 700; font-size: 1.1rem; }
.brand-mark { color: var(--pine); display: inline-flex; }
.brand-year { margin-left: 6px; color: var(--gold); }
.progress { display: flex; align-items: center; gap: 10px; font-size: .9rem; color: var(--muted); }
.progress-label { white-space: nowrap; font-weight: 600; }
.progress-track { width: 84px; height: 8px; background: var(--bg-2); border-radius: 99px; overflow: hidden; display: block; }
.progress-fill { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--pine-2), var(--gold)); border-radius: 99px; transition: width .6s ease; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 18px;
  font: inherit; font-weight: 600; font-size: .98rem; line-height: 1.2;
  border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; text-decoration: none; text-align: center;
  transition: background .2s, transform .15s, box-shadow .2s, color .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--pine); color: #fff; }
.btn-primary:hover { background: var(--pine-2); color: #fff; }
.btn-ghost { background: transparent; color: var(--pine); border-color: var(--line); background: var(--surface); }
.btn-ghost:hover { border-color: var(--pine-2); color: var(--pine); }
.btn-gold { background: var(--gold); color: #1f1a0e; }
.btn-gold:hover { background: #d9a73d; color: #1f1a0e; }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.btn-ghost-light:hover { border-color: #fff; color: #fff; }
.btn-tg { background: #2a9fd8; color: #fff; }
.btn-tg:hover { background: #1f8cc2; color: #fff; }
.btn[disabled] { opacity: .6; cursor: default; }
.ico { width: 18px; height: 18px; flex: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.btn-row.center { justify-content: center; }
.link-btn { background: none; border: 0; padding: 4px; font: inherit; color: var(--muted); text-decoration: underline; cursor: pointer; }
.link-btn:hover { color: var(--ink); }

/* ---------- Картки та загальні блоки ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin-bottom: 16px; }
.disclaimer { background: var(--gold-soft); border-left: 4px solid var(--gold); padding: 12px 14px; border-radius: var(--radius-sm); font-size: .95rem; margin: 0 0 18px; }
.disclaimer.strong { font-weight: 600; }
.tip { background: #eef5f1; border-radius: var(--radius-sm); padding: 10px 14px; }
.pill { display: inline-block; font-family: var(--sans); font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: var(--gold); color: #1f1a0e; padding: 3px 8px; border-radius: 99px; vertical-align: middle; }
.tag { display: inline-block; font-size: .78rem; font-weight: 600; background: var(--bg-2); color: var(--ink); padding: 3px 9px; border-radius: 99px; }
.tag-time { background: #e4efe9; color: var(--pine); }
.tag-score { background: var(--bad-bg); color: var(--bad); }
.chip { display: inline-block; background: var(--bg-2); padding: 4px 10px; border-radius: 99px; margin: 0 6px 6px 0; font-size: .92rem; }
.empty { padding: 18px; text-align: center; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); }

/* ---------- Головна ---------- */
.hero { padding: 36px 0 18px; }
.hero h1 { max-width: 20ch; }
.home-progress { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; max-width: 420px; }
.home-progress-text { font-weight: 700; color: var(--pine); }
.home-progress-track { height: 12px; background: var(--bg-2); border-radius: 99px; overflow: hidden; display: block; }
.home-progress-fill { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--pine-2), var(--gold)); border-radius: 99px; transition: width .8s ease; }

.final-banner { background: var(--pine); color: #fff; border-radius: var(--radius); padding: 18px; margin: 8px 0 20px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.final-banner-text { font-family: var(--serif); font-size: 1.1rem; margin: 0; }

.gift-grid { list-style: none; margin: 16px 0 28px; padding: 0; display: grid; grid-template-columns: 1fr; gap: 16px; }
.gift-box {
  --c: var(--pine-2);
  width: 100%; height: 100%;
  display: flex; align-items: stretch; gap: 14px;
  text-align: left; font: inherit; color: inherit;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; cursor: pointer; box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s;
  position: relative; overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
.gift-box:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(31,42,55,.12); border-color: var(--c); }
.gift-box[data-color="pine"], .gift-view[data-color="pine"] { --c: #2f6a5a; }
.gift-box[data-color="berry"], .gift-view[data-color="berry"] { --c: #b5473a; }
.gift-box[data-color="gold"], .gift-view[data-color="gold"] { --c: #b88520; }
.gift-box[data-color="sky"], .gift-view[data-color="sky"] { --c: #3b78a0; }
.gift-box[data-color="plum"], .gift-view[data-color="plum"] { --c: #6a58a6; }
.gift-box[data-color="ink"], .gift-view[data-color="ink"] { --c: #2b3a55; }

.box-art { position: relative; width: 92px; min-width: 92px; height: 100px; align-self: center; }
.box-base { position: absolute; left: 10px; right: 10px; bottom: 4px; height: 56px; background: var(--c); border-radius: 6px; box-shadow: inset 0 -8px 0 rgba(0,0,0,.12); }
.box-lid { position: absolute; left: 4px; right: 4px; bottom: 58px; height: 18px; background: var(--c); filter: brightness(1.12); border-radius: 5px; transform-origin: 20% 100%; transition: transform .6s cubic-bezier(.3,1.4,.5,1); z-index: 2; }
.box-ribbon { position: absolute; left: 50%; width: 12px; margin-left: -6px; bottom: 4px; height: 72px; background: #e9c46a; z-index: 3; transition: opacity .3s; }
.box-bow { position: absolute; left: 50%; bottom: 74px; width: 40px; height: 22px; margin-left: -20px; z-index: 4; transition: transform .6s cubic-bezier(.3,1.4,.5,1); transform-origin: 30% 100%; }
.box-bow::before, .box-bow::after { content: ""; position: absolute; bottom: 0; width: 18px; height: 16px; border: 4px solid #e9c46a; border-radius: 50% 50% 4px 50%; }
.box-bow::before { left: 0; transform: rotate(-20deg); }
.box-bow::after { right: 0; transform: scaleX(-1) rotate(-20deg); }
.box-glow { position: absolute; left: 50%; bottom: 52px; width: 70px; height: 70px; margin-left: -35px; border-radius: 50%; background: radial-gradient(circle, rgba(233,196,106,.85), rgba(233,196,106,0) 70%); opacity: 0; transform: scale(.4); transition: opacity .5s, transform .6s; z-index: 1; }

.gift-box.is-opening .box-lid, .gift-box.is-open .box-lid { transform: translate(-6px, -22px) rotate(-16deg); }
.gift-box.is-opening .box-bow, .gift-box.is-open .box-bow { transform: translate(-8px, -24px) rotate(-16deg); }
.gift-box.is-opening .box-glow, .gift-box.is-open .box-glow { opacity: 1; transform: scale(1); }
.gift-box.is-opening { animation: wiggle .5s ease; }
@keyframes wiggle { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-1.5deg); } 50% { transform: rotate(1.5deg); } 75% { transform: rotate(-.8deg); } }

.box-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.box-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; flex-wrap: wrap; }
.box-num { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--c); }
.box-status { font-size: .74rem; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: var(--bg-2); color: var(--muted); }
.gift-box.is-open .box-status { background: #e4efe9; color: var(--ok); }
.gift-box.is-open .box-status::before { content: "✓ "; }
.box-title { font-family: var(--serif); font-size: 1.15rem; font-weight: 700; line-height: 1.25; }
.box-teaser { font-size: .92rem; color: var(--muted); }
.box-cta { margin-top: auto; padding-top: 6px; font-weight: 700; color: var(--c); font-size: .95rem; }

.how { margin: 8px 0 24px; }
.how-list { padding-left: 1.2em; margin: 0; display: grid; gap: 6px; }

/* ---------- Промо та поширення ---------- */
.promo {
  display: flex; flex-direction: column; gap: 12px; align-items: flex-start;
  background: linear-gradient(135deg, #fffaf0, #f5ecdb);
  border: 1px solid #e7d5ad; border-radius: var(--radius);
  padding: 20px; margin: 24px 0;
}
.promo-title { font-size: 1.2rem; margin-bottom: .3em; }
.promo p { margin: 0; color: #3e4752; }
.promo-tg { background: linear-gradient(135deg, #eef7fc, #e3f0f7); border-color: #c6e0ef; }
.share { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 24px 0 32px; }

/* ---------- Сторінка подарунка ---------- */
.gift-view { padding-bottom: 24px; }
.crumbs { padding: 16px 0 0; }
.back-link { text-decoration: none; font-weight: 600; display: inline-block; padding: 6px 0; }
.view-head { padding: 14px 0 12px; }
.gift-label { font-weight: 700; color: var(--c, var(--pine-2)); letter-spacing: .08em; text-transform: uppercase; font-size: .78rem; margin-bottom: .4rem; }
.gift-footer { display: flex; flex-wrap: wrap; gap: 10px; margin: 28px 0 0; }

.toolbar { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.toolbar-progress { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.mini-track { flex: 1; max-width: 220px; height: 8px; background: var(--bg-2); border-radius: 99px; overflow: hidden; display: block; }
.mini-fill { display: block; height: 100%; background: var(--pine-2); border-radius: 99px; transition: width .4s ease; }

.sticky-bar {
  position: sticky; bottom: 0; z-index: 10;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: space-between;
  background: rgba(255,255,255,.96); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 12px; margin: 16px 0; box-shadow: 0 -4px 18px rgba(31,42,55,.08);
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
}
.sticky-count { font-weight: 700; }
.sticky-bar .mini-track { min-width: 60px; }

/* ---------- Форми ---------- */
.form { display: grid; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field label, .field legend { font-weight: 700; padding: 0; }
.field legend { margin-bottom: 8px; }
.field-row { display: grid; gap: 16px; }
.req { color: var(--berry); }
input[type="text"], input[type="date"], select {
  font: inherit; font-size: 16px; color: var(--ink);
  min-height: 46px; padding: 10px 12px;
  border: 1.5px solid #cfc3b0; border-radius: var(--radius-sm); background: #fff; width: 100%;
}
input[type="text"]:focus, input[type="date"]:focus, select:focus { border-color: var(--pine-2); outline: 3px solid rgba(47,106,90,.25); outline-offset: 0; }
input[aria-invalid="true"] { border-color: var(--bad); }
.field-error { color: var(--bad); font-weight: 600; margin: 0; font-size: .92rem; }

.seg-group { display: flex; flex-wrap: wrap; gap: 8px; }
.seg { position: relative; }
.seg input, .opt input, .scale-opt input, .check input, .day input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg span { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 8px 14px; border: 1.5px solid #cfc3b0; border-radius: 99px; background: #fff; cursor: pointer; font-weight: 600; transition: background .15s, border-color .15s; }
.seg input:checked + span { background: var(--pine); border-color: var(--pine); color: #fff; }
.seg input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }

/* ---------- Тест ---------- */
.quiz { display: grid; gap: 14px; }
.q-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 0; box-shadow: var(--shadow); min-width: 0; }
.q-item.is-missing { border-color: var(--berry); box-shadow: 0 0 0 3px rgba(181,71,58,.15); }
.q-item legend { display: flex; gap: 10px; align-items: flex-start; font-weight: 700; padding: 0; float: left; width: 100%; margin-bottom: 4px; }
.q-item legend + * { clear: both; }
.q-num { flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--pine); color: #fff; font-size: .85rem; font-weight: 700; }
.q-domain { font-size: .8rem; color: var(--muted); margin: 0 0 10px 38px; }
.q-options { display: grid; gap: 8px; }
.opt { position: relative; display: block; cursor: pointer; }
.opt span { display: block; padding: 12px 14px 12px 44px; border: 1.5px solid #dcd1bf; border-radius: var(--radius-sm); background: #fffdf9; transition: border-color .15s, background .15s; position: relative; }
.opt span::before { content: ""; position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%; border: 2px solid #a99c88; background: #fff; }
.opt input:checked + span { border-color: var(--pine-2); background: #eef5f1; }
.opt input:checked + span::before { border-color: var(--pine-2); background: radial-gradient(circle, var(--pine-2) 45%, #fff 50%); }
.opt input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.opt:hover span { border-color: var(--pine-2); }
.opt input:disabled + span { cursor: default; }
.opt.is-correct span { border-color: var(--ok); background: var(--ok-bg); }
.opt.is-correct span::after { content: "✓"; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--ok); font-weight: 800; }
.opt.is-wrong span { border-color: var(--bad); background: var(--bad-bg); }
.opt.is-wrong span::after { content: "✕"; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--bad); font-weight: 800; }
.opt.is-correct span, .opt.is-wrong span { padding-right: 34px; }
.q-feedback { margin-top: 12px; padding: 10px 12px; border-radius: var(--radius-sm); font-size: .95rem; }
.q-feedback.ok { background: var(--ok-bg); }
.q-feedback.bad { background: var(--bad-bg); }

.result-card { background: var(--surface); border: 2px solid var(--c, var(--pine-2)); border-radius: var(--radius); padding: 20px; margin: 0 0 18px; box-shadow: var(--shadow); }
.big-score { font-size: 2.2rem; color: var(--c, var(--pine-2)); }
.bars { list-style: none; padding: 0; margin: 14px 0; display: grid; gap: 10px; }
.bar { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "label val" "track track"; gap: 4px 10px; align-items: center; }
.bar-label { grid-area: label; font-weight: 600; font-size: .95rem; }
.bar-val { grid-area: val; font-weight: 700; font-variant-numeric: tabular-nums; }
.bar-track { grid-area: track; height: 10px; background: var(--bg-2); border-radius: 99px; overflow: hidden; display: block; }
.bar-fill { display: block; height: 100%; background: var(--gold); border-radius: 99px; }
.bar-fill.low { background: var(--berry); }
.bar-fill.high { background: var(--pine-2); }

/* ---------- Класний керівник ---------- */
.month { border-top: 5px solid var(--c); }
.month.is-current { box-shadow: 0 0 0 3px rgba(200,150,46,.35), var(--shadow); }
.month-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.month-head h2 { margin-bottom: .2em; }
.month-count { font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.month-focus { color: var(--muted); }
.task-list { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 6px; }
.check { position: relative; display: block; cursor: pointer; }
.check span { display: block; padding: 10px 12px 10px 44px; border-radius: var(--radius-sm); background: #fbf8f2; border: 1px solid transparent; position: relative; transition: background .15s; }
.check span::before { content: ""; position: absolute; left: 12px; top: 11px; width: 20px; height: 20px; border-radius: 6px; border: 2px solid #a99c88; background: #fff; }
.check input:checked + span { background: #eef5f1; color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(92,102,114,.5); }
.check input:checked + span::before { background: var(--pine-2); border-color: var(--pine-2); }
.check input:checked + span::after { content: ""; position: absolute; left: 19px; top: 14px; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.check input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.month-grid { display: grid; gap: 14px; }
.month-grid p { margin: 0; }
.dates { margin: 0; padding-left: 1.1em; }

/* ---------- Конструктор цілей ---------- */
.goals-out { margin-top: 18px; }
.out-block { padding: 12px 0; border-top: 1px solid var(--line); }
.out-block:first-of-type { border-top: 0; }
.out-main { font-size: 1.1rem; font-family: var(--serif); }
.out-student { font-size: 1.05rem; background: var(--gold-soft); padding: 10px 14px; border-radius: var(--radius-sm); }
.criteria-list { margin: 0; padding-left: 1.3em; }
.chips { margin: 0; }

/* ---------- Прийоми ---------- */
.filters { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.chip-btn { flex: none; font: inherit; font-weight: 600; font-size: .92rem; min-height: 42px; padding: 8px 14px; border-radius: 99px; border: 1.5px solid #cfc3b0; background: #fff; color: var(--ink); cursor: pointer; }
.chip-btn[aria-pressed="true"] { background: var(--pine); color: #fff; border-color: var(--pine); }
.tech-grid, .cards-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.tech-card, .mini-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; height: 100%; box-shadow: var(--shadow); position: relative; transition: box-shadow .3s, border-color .3s; }
.tech-card header { position: relative; padding-right: 44px; }
.tech-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.tech-tip { font-size: .93rem; color: var(--muted); margin: 0; }
.tech-card.is-picked { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(200,150,46,.35), var(--shadow); }
.fav-btn { position: absolute; top: -6px; right: -6px; width: 44px; height: 44px; border: 0; background: transparent; font-size: 1.5rem; color: var(--gold); cursor: pointer; border-radius: 50%; }
.fav-btn:hover { background: var(--bg-2); }

/* ---------- Lesson Audit ---------- */
.meta-grid { display: grid; gap: 12px; }
.scale-legend ul { margin: 0; padding-left: 1.1em; display: grid; gap: 4px; }
.dir-block { border-top: 5px solid var(--c); }
.crit { border: 0; border-top: 1px solid var(--line); margin: 0; padding: 14px 0 6px; min-width: 0; }
.dir-block h2 + .crit { border-top: 0; padding-top: 4px; }
.crit legend { display: flex; gap: 10px; font-weight: 600; padding: 0; float: left; width: 100%; margin-bottom: 10px; }
.crit legend + * { clear: both; }
.scale-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.scale-opt { position: relative; cursor: pointer; }
.scale-opt span { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 2px; min-height: 58px; padding: 6px 4px; border: 1.5px solid #dcd1bf; border-radius: var(--radius-sm); background: #fffdf9; font-size: .74rem; line-height: 1.15; color: var(--muted); transition: background .15s, border-color .15s; }
.scale-opt span b { font-size: 1.15rem; color: var(--ink); }
.scale-opt:hover span { border-color: var(--c); }
.scale-opt input:checked + span { background: var(--c); border-color: var(--c); color: #fff; }
.scale-opt input:checked + span b { color: #fff; }
.scale-opt input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.placeholder { text-align: center; border-style: dashed; }
.audit-results { margin-top: 8px; }
.res-section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; box-shadow: var(--shadow); }
.res-two { display: grid; gap: 0; }
.profile-grid { display: grid; gap: 16px; align-items: center; }
.radar-wrap { max-width: 440px; margin: 0 auto; width: 100%; }
.radar .r-ring { fill: none; stroke: #e4dacb; stroke-width: 1; }
.radar .r-axis { stroke: #e4dacb; stroke-width: 1; }
.radar .r-area { fill: rgba(106,88,166,.22); stroke: var(--c, #6a58a6); stroke-width: 2.5; stroke-linejoin: round; }
.radar .r-dot { fill: var(--c, #6a58a6); }
.radar .r-label { font-family: var(--sans); font-size: 15px; font-weight: 600; fill: var(--ink); }
.radar .r-pct { fill: var(--muted); font-weight: 700; }
.pill-list { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 6px; }
.pill-list li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 12px; border-radius: var(--radius-sm); background: #eef5f1; }
.pill-list.warm li { background: var(--bad-bg); }
.sub { font-weight: 700; margin: 12px 0 6px; }
.check-list { margin: 0; padding-left: 0; list-style: none; display: grid; gap: 6px; }
.check-list li { padding-left: 26px; position: relative; }
.check-list li::before { content: "✓"; position: absolute; left: 4px; color: var(--ok); font-weight: 800; }
.recs { margin: 0; padding-left: 1.3em; display: grid; gap: 14px; }
.recs li p { margin-bottom: .35em; }
.rec-crit { display: flex; gap: 6px; flex-wrap: wrap; }
.plan { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.week { border-left: 4px solid var(--c); padding: 10px 14px; background: #faf7f1; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.week p { margin-bottom: .4em; }
.week-num { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; color: var(--c); }
.audit-tools { margin-top: 0; }

/* ---------- Аптечка ---------- */
.tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 16px; padding-bottom: 4px; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.tabs [role="tab"] { flex: none; font: inherit; font-weight: 600; font-size: .92rem; min-height: 44px; padding: 8px 14px; border-radius: 99px; border: 1.5px solid #cfc3b0; background: #fff; color: var(--ink); cursor: pointer; }
.tabs [role="tab"][aria-selected="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.daily-card { background: linear-gradient(160deg, #23324a, #2b3a55); color: #f6f1e7; border-radius: var(--radius); padding: 20px; margin: 18px 0; }
.daily-card h2, .daily-card h3 { color: #fff; }
.daily-card .eyebrow { color: #e9c46a; }
.daily-card .muted { color: #c9cfd8; }
.daily-card .tip { background: rgba(255,255,255,.1); }
.daily-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.daily-list li { background: rgba(255,255,255,.08); border-radius: var(--radius-sm); padding: 12px 14px; }
.daily-list p { margin: 0; }
.task-kind { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; color: #e9c46a; margin-bottom: 4px !important; }
.daily-card .btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); }
.daily-card .btn-primary { background: var(--gold); color: #1f1a0e; }
.numbered { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.numbered li { display: flex; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.numbered p { margin: 0; }
.numbered .num { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--bg-2); font-weight: 700; color: var(--c); }
.mini-card p:last-child { margin-bottom: 0; }
.mini-card.is-done { border-color: var(--ok); background: #f5fbf7; }
.days { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.day { position: relative; cursor: pointer; }
.day > span:not(.visually-hidden) { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1.5px solid #cfc3b0; background: #fff; font-weight: 700; font-size: .9rem; }
.day input:checked + span { background: var(--ok); border-color: var(--ok); color: #fff; }
.day input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }

/* ---------- Фінальний екран ---------- */
.final-screen { padding-top: 24px; }
.final-card { background: radial-gradient(circle at 50% 0%, #2f6a5a, #1c3a33 70%); color: #fff; text-align: center; border-radius: 22px; padding: 42px 20px; box-shadow: 0 20px 50px rgba(28,58,51,.3); }
.final-card h1 { color: #fff; }
.final-stars { color: #e9c46a; font-size: 1.6rem; letter-spacing: .4em; margin-bottom: 10px; }
.final-text { font-family: var(--serif); font-size: clamp(1.15rem, 3.8vw, 1.5rem); max-width: 34rem; margin: 0 auto 18px; color: #f3efe6; }

/* ---------- Toast і конфеті ---------- */
.toast { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 600; max-width: calc(100% - 32px); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; z-index: 200; text-align: center; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.confetti-layer { position: fixed; width: 0; height: 0; pointer-events: none; z-index: 150; }
.confetti-piece { position: absolute; left: 0; top: 0; width: 8px; height: 12px; border-radius: 2px; opacity: 0; animation: confetti 1.25s cubic-bezier(.2,.7,.4,1) forwards; }
.confetti-piece.is-star { width: 7px; height: 7px; border-radius: 50%; }
@keyframes confetti {
  0% { opacity: 1; transform: translate(0, 0) rotate(0) scale(.6); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), calc(var(--dy) + 90px)) rotate(var(--rot)) scale(1); }
}

/* ---------- Футер ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 22px 0 calc(28px + env(safe-area-inset-bottom)); font-size: .88rem; color: var(--muted); margin-top: 24px; }
.footer-note { max-width: 46rem; }
.footer-meta { margin: 0; }
.noscript { padding: 20px; }

/* ---------- Планшет і десктоп ---------- */
@media (min-width: 600px) {
  .wrap { padding: 0 24px; }
  .gift-grid { grid-template-columns: repeat(2, 1fr); }
  .gift-box { flex-direction: column; padding: 18px; }
  .box-art { width: 110px; height: 110px; align-self: flex-start; }
  .field-row { grid-template-columns: 1fr 1fr; }
  .meta-grid { grid-template-columns: 1fr 1fr; }
  .scale-opt span { font-size: .82rem; }
  .tech-grid, .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .toolbar { flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; }
  .toolbar .btn-row { margin-top: 0; }
  .promo { flex-direction: row; align-items: center; justify-content: space-between; }
  .promo .btn { flex: none; max-width: 340px; }
  .final-banner { flex-direction: row; align-items: center; justify-content: space-between; }
  .progress-track { width: 120px; }
}
@media (min-width: 900px) {
  .gift-grid { grid-template-columns: repeat(3, 1fr); }
  .month-grid { grid-template-columns: repeat(3, 1fr); }
  .tech-grid, .cards-grid { grid-template-columns: repeat(3, 1fr); }
  .profile-grid { grid-template-columns: 1.1fr 1fr; }
  .res-two { grid-template-columns: 1fr 1fr; gap: 16px; }
  .meta-grid { grid-template-columns: repeat(4, 1fr); }
  .hero { padding: 56px 0 24px; }
}
@media (max-width: 380px) {
  .brand-text { font-size: 1rem; }
  .progress-track { width: 56px; }
  .scale-opt span { font-size: .68rem; }
}

/* ---------- Зменшення руху ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .gift-box:hover { transform: none; }
}

/* ---------- Друк / PDF ---------- */
@media print {
  @page { margin: 14mm 12mm; }
  body { background: #fff; color: #000; font-size: 11pt; display: block; }
  .no-print, .site-header, .site-footer, .crumbs, .gift-footer, .share, .promo, .toast, .skip-link, .sticky-bar, .tabs, .fav-btn { display: none !important; }
  .print-only { display: block; }
  table.print-only { display: table; }
  .wrap { max-width: none; padding: 0; }
  .card, .res-section, .result-card, .q-item, .tech-card, .mini-card, .numbered li, .month { box-shadow: none !important; border: 1px solid #bbb; break-inside: avoid; page-break-inside: avoid; }
  .view-head .lead { font-size: 10pt; }
  h1 { font-size: 20pt; }
  .tabpanel[hidden] { display: none !important; }
  .daily-card { background: #fff !important; color: #000; border: 1px solid #bbb; }
  .daily-card h2, .daily-card h3, .daily-card .eyebrow, .task-kind { color: #000 !important; }
  .daily-list li { background: #fff; border: 1px solid #ddd; }
  .tech-grid, .cards-grid { grid-template-columns: 1fr 1fr; }
  .month-grid { grid-template-columns: 1fr 1fr 1fr; }
  .profile-grid { grid-template-columns: 1fr 1fr; }
  .res-two { grid-template-columns: 1fr 1fr; gap: 12px; }
  .radar-wrap { max-width: 320px; }
  .plan, .recs { break-inside: auto; }
  .week, .recs li { break-inside: avoid; }
  .bar-fill, .mini-fill, .scale-opt input:checked + span, .check input:checked + span::before { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .score-table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 9.5pt; break-before: page; }
  .score-table caption { text-align: left; font-weight: 700; font-size: 12pt; margin-bottom: 6px; }
  .score-table th, .score-table td { border: 1px solid #bbb; padding: 4px 6px; text-align: left; vertical-align: top; }
  .notes-line { margin-top: 8px; color: #555; }
  .print-head { margin-bottom: 10px; }
  .gift-5 > form, .gift-5 .disclaimer.strong { display: none !important; }
  .gift-5 .view-head { display: none; }
  a[href^="http"]::after { content: ""; }
  .opt span, .check span { border-color: #ccc; }
}
