:root {
  --bg: #FFF8F1;
  --surface: #FFFFFF;
  --surface-2: #FFF1E6;
  --surface-3: #FBE3D3;
  --border: #F1DDCF;
  --text: #2B1D16;
  --muted: #7A6A60;
  --faint: #A8978C;
  --accent: #F2552C;
  --accent-ink: #FFFFFF;
  --accent-soft: rgba(242, 85, 44, 0.10);
  --danger: #D9342B;
  --ok: #2E9E5B;
  --warn: #E89A2C;
  --radius: 16px;
  --radius-sm: 10px;
  --head: 'Nunito', 'Manrope', system-ui, sans-serif;
  --body: 'Manrope', system-ui, -apple-system, sans-serif;
  --shadow: 0 10px 40px rgba(120, 60, 30, 0.12);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

h1, h2, h3, .h { font-family: var(--head); letter-spacing: -0.01em; line-height: 1.1; margin: 0; font-weight: 900; }
h1 { font-size: clamp(36px, 8vw, 72px); }
h2 { font-size: clamp(28px, 5vw, 44px); }
h3 { font-size: 22px; }
p { margin: 0; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.accent { color: var(--accent); }
.small { font-size: 14px; }
.tiny { font-size: 12px; }
.center { text-align: center; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 560px; }

/* ---------- Header ---------- */
.header { position: sticky; top: 0; z-index: 20; background: rgba(255, 248, 241, 0.88); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.header .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 12px; }
.logo { font-family: var(--head); font-weight: 900; font-size: 26px; letter-spacing: -0.01em; color: var(--text); text-decoration: none; display: flex; align-items: center; gap: 8px; }
.logo i { width: 30px; height: 30px; border-radius: 9px; background: url(/img/favicon.svg) center/cover no-repeat; display: inline-block; }
.header nav { display: flex; gap: 8px; align-items: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 24px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 700; font-size: 16px; text-decoration: none; cursor: pointer;
  transition: transform 0.12s ease, background 0.2s ease, border-color 0.2s ease, opacity 0.2s;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #E04A22; }
.btn-outline { background: transparent; border-color: var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--muted); }
.btn-ghost { background: transparent; color: var(--muted); min-height: 40px; padding: 0 12px; }
.btn-ghost:hover { color: var(--text); }
.btn-danger { background: transparent; border-color: rgba(255, 90, 78, 0.5); color: var(--danger); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.45; pointer-events: none; }
.btn .spinner { width: 18px; height: 18px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.card-tight { padding: 14px 16px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack-lg { display: flex; flex-direction: column; gap: 24px; }
.row { display: flex; gap: 12px; align-items: center; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 720px) { .grid-3 { grid-template-columns: 1fr; } }

.badge { flex: none; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; background: var(--surface-3); color: var(--muted); }
.badge-accent { background: var(--accent-soft); color: var(--accent); }
.badge-ok { background: rgba(61, 220, 151, 0.12); color: var(--ok); }
.badge-warn { background: rgba(255, 181, 71, 0.12); color: var(--warn); }
.badge-danger { background: rgba(255, 90, 78, 0.12); color: var(--danger); }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; color: var(--muted); font-weight: 600; }
.input {
  width: 100%; height: 54px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); font: inherit; font-size: 17px; outline: none; transition: border-color 0.2s;
}
textarea.input { height: auto; min-height: 90px; padding: 14px 16px; resize: vertical; }
.input:focus { border-color: var(--accent); }
.input.invalid { border-color: var(--danger); }
.input-unit { position: relative; }
.input-unit .input { font-size: 32px; font-family: var(--head); height: 80px; text-align: center; padding-right: 56px; padding-left: 56px; }
.input-unit span { position: absolute; right: 20px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 18px; }
.error { color: var(--danger); font-size: 14px; }
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-size: 14px; color: var(--muted); line-height: 1.45; }
.check input { appearance: none; flex: 0 0 22px; width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--border); background: var(--surface-2); margin: 0; cursor: pointer; display: grid; place-items: center; }
.check input:checked { background: var(--accent); border-color: var(--accent); }
.check input:checked::after { content: ''; width: 6px; height: 11px; border: solid var(--accent-ink); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) translate(-1px, -1px); }
.check a { color: var(--text); }

/* ---------- Landing ---------- */
.hero { position: relative; overflow: hidden; padding: 48px 0 56px; }
.hero::before {
  content: ''; position: absolute; inset: -20% -10% auto auto; width: 70vw; height: 70vw; max-width: 760px; max-height: 760px;
  background: radial-gradient(circle, rgba(214, 255, 61, 0.16), transparent 60%); pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; position: relative; }
@media (max-width: 880px) { .hero-grid { grid-template-columns: 1fr; } }
.hero h1 span { color: var(--accent); }
.hero-lead { font-size: 18px; color: var(--muted); max-width: 520px; margin-top: 20px; }
.hero-cta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 32px; max-width: 480px; }
.sex-btn {
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 18px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); cursor: pointer; text-align: left; transition: border-color 0.2s, transform 0.12s;
}
.sex-btn:hover { border-color: var(--accent); }
.sex-btn:active { transform: scale(0.98); }
.sex-btn b { font-family: var(--head); font-size: 22px; font-weight: 800; }
.sex-btn small { color: var(--accent); font-weight: 700; display: flex; align-items: center; gap: 6px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 24px; color: var(--muted); font-size: 14px; }
.hero-points span::before { content: '✓'; color: var(--accent); margin-right: 6px; font-weight: 800; }

.mock { background: var(--surface); border: 1px solid var(--border); border-radius: 24px; padding: 20px; box-shadow: var(--shadow); max-width: 420px; justify-self: center; width: 100%; }
.mock-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.mock-ex { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--surface-2); border-radius: 12px; }
.mock-ex + .mock-ex { margin-top: 8px; }
.mock-num { width: 32px; height: 32px; border-radius: 10px; background: var(--surface-3); display: grid; place-items: center; font-weight: 800; font-size: 14px; flex: none; }
.mock-ex.done .mock-num { background: var(--accent); color: var(--accent-ink); }
.mock-macros { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 16px; }
.mock-macros div { background: var(--surface-2); border-radius: 12px; padding: 10px; text-align: center; }
.mock-macros b { display: block; font-family: var(--head); font-size: 20px; }
.mock-macros span { font-size: 11px; color: var(--muted); text-transform: uppercase; }

.section { padding: 64px 0; border-top: 1px solid var(--border); }
.section-head { max-width: 640px; margin-bottom: 32px; }
.section-head p { color: var(--muted); margin-top: 12px; font-size: 17px; }
.step-num { font-family: var(--head); font-size: 44px; color: var(--accent); line-height: 1; }
.feature-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 14px; }
.feature-icon svg { width: 22px; height: 22px; }

.price-card { position: relative; display: flex; flex-direction: column; gap: 6px; }
.price-card .price { font-family: var(--head); font-size: 40px; line-height: 1.1; }
.price-card .price small { font-size: 16px; color: var(--muted); font-family: var(--body); text-transform: none; }
.price-card.featured { border-color: var(--accent); }
.price-card .badge { position: absolute; top: 16px; right: 16px; }

.faq details { border-bottom: 1px solid var(--border); padding: 18px 0; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 17px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--accent); font-size: 22px; line-height: 1; transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); margin-top: 10px; }

.footer { border-top: 1px solid var(--border); padding: 40px 0 56px; color: var(--faint); font-size: 13px; }
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--text); }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 16px; }

/* ---------- Quiz ---------- */
.quiz { min-height: 100vh; display: flex; flex-direction: column; }
.quiz-top { position: sticky; top: 0; z-index: 10; background: var(--bg); padding: 12px 0 0; }
.quiz-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 44px; }
.quiz-back { display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; color: var(--muted); cursor: pointer; padding: 8px 0; font-size: 15px; }
.quiz-back:hover { color: var(--text); }
.quiz-stage { display: flex; gap: 8px; align-items: center; }
.progress { height: 4px; background: var(--surface-3); border-radius: 4px; overflow: hidden; margin-top: 8px; }
.progress > div { height: 100%; background: var(--accent); width: 0; transition: width 0.35s ease; border-radius: 4px; }
.quiz-body { flex: 1; padding: 28px 0 120px; }
.quiz-title { font-size: clamp(28px, 6vw, 38px); }
.quiz-sub { color: var(--muted); margin-top: 10px; }
.options { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }
.options.grid { display: grid; grid-template-columns: 1fr 1fr; }
.option {
  position: relative; display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px 18px; min-height: 68px;
  background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius); cursor: pointer; text-align: left;
  transition: border-color 0.15s, background 0.15s, transform 0.12s;
}
.option:hover { border-color: #F2B49C; }
.option:active { transform: scale(0.99); }
.option.selected { border-color: var(--accent); background: linear-gradient(0deg, var(--accent-soft), var(--accent-soft)), var(--surface); }
.option-text { flex: 1; min-width: 0; }
.option-text b { display: block; font-family: var(--head); font-weight: 800; font-size: 19px; letter-spacing: 0.02em; }
.option-text span { display: block; color: var(--muted); font-size: 14px; margin-top: 2px; }
.option-media { flex: none; width: 60px; height: 92px; display: grid; place-items: center; margin: -8px 0; }
.option-media svg { height: 100%; width: auto; }
.option-icon { flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; font-size: 22px; }
.option .tick { flex: none; width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--border); display: grid; place-items: center; }
.option.selected .tick { background: var(--accent); border-color: var(--accent); }
.option.selected .tick::after { content: ''; width: 6px; height: 11px; border: solid var(--accent-ink); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) translate(-1px, -1px); }
.options.grid .option { flex-direction: column; align-items: stretch; text-align: center; padding: 14px 12px 16px; }
.options.grid .option-media { width: 100%; height: 120px; }
.options.grid .option-text b { font-size: 22px; }
.age-card .age-num { font-family: var(--head); font-size: 44px; font-weight: 600; line-height: 1; color: var(--text); }
.option.selected .age-num { color: var(--accent); }

.subq + .subq { margin-top: 28px; }
.subq h3 { font-size: 18px; margin-bottom: 12px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { padding: 12px 18px; border-radius: 999px; border: 1.5px solid var(--border); background: var(--surface); cursor: pointer; font-weight: 700; }
.pill.selected { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

.quiz-footer { position: fixed; left: 0; right: 0; bottom: 0; padding: 16px 0 calc(16px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--bg) 30%); z-index: 10; }

.info-screen { text-align: left; }
.info-big { font-family: var(--head); font-size: 64px; color: var(--accent); line-height: 1; font-weight: 900; }
.timeline { display: flex; flex-direction: column; gap: 0; margin-top: 24px; }
.timeline-item { display: grid; grid-template-columns: 56px 1fr; gap: 14px; padding-bottom: 18px; position: relative; }
.timeline-item::before { content: ''; position: absolute; left: 27px; top: 40px; bottom: 0; width: 2px; background: var(--border); }
.timeline-item:last-child::before { display: none; }
.timeline-item .tw { width: 56px; height: 40px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; font-weight: 800; font-size: 13px; color: var(--accent); }
.timeline-item b { display: block; }
.timeline-item span { color: var(--muted); font-size: 14px; }

/* Loading */
.loading-list { display: flex; flex-direction: column; gap: 16px; margin-top: 32px; }
.loading-row .row-between { font-weight: 700; font-size: 15px; }
.loading-row .progress { height: 6px; }

/* ---------- Result ---------- */
.result-hero { padding-top: 8px; }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 20px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; }
.kpi b { display: block; font-family: var(--head); font-size: 28px; line-height: 1.1; }
.kpi span { color: var(--muted); font-size: 13px; }
.chart-card { margin-top: 16px; }
.chart-legend { display: flex; justify-content: space-between; margin-top: 8px; font-size: 13px; color: var(--muted); }
.checklist { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; }
.checklist li::before { content: ''; flex: none; width: 20px; height: 20px; margin-top: 2px; border-radius: 6px; background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d6ff3d' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/14px no-repeat; }
.week-chips { display: flex; gap: 4px; }
.week-chip { flex: 1 1 0; min-width: 0; padding: 10px 2px; border-radius: 10px; background: var(--surface-2); text-align: center; font-size: 13px; }
.week-chip.on { background: var(--accent); color: var(--accent-ink); font-weight: 800; }
.locked-row { position: relative; }
.locked-row .blur { filter: blur(6px); user-select: none; pointer-events: none; }
.lock-overlay { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 13px; font-weight: 700; }
.ex-line { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.ex-line:last-child { border-bottom: 0; }

/* Paywall */
.plan-options { display: flex; flex-direction: column; gap: 10px; }
.plan-opt { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--radius); border: 1.5px solid var(--border); background: var(--surface); cursor: pointer; }
.plan-opt.selected { border-color: var(--accent); }
.plan-opt .radio { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border); display: grid; place-items: center; }
.plan-opt.selected .radio { border-color: var(--accent); }
.plan-opt.selected .radio::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.plan-opt .po-main { flex: 1; }
.plan-opt .po-main b { font-family: var(--head); font-size: 20px; font-weight: 800; }
.plan-opt .po-price { text-align: right; }
.plan-opt .po-price b { font-family: var(--head); font-size: 22px; display: block; }
.terms-box { background: var(--surface-2); border-radius: 12px; padding: 14px 16px; font-size: 14px; color: var(--muted); }
.terms-box b { color: var(--text); }

/* ---------- Toast & modal ---------- */
.toast { pointer-events: none; position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: var(--surface-3); color: var(--text); padding: 12px 18px; border-radius: 12px; box-shadow: var(--shadow); opacity: 0; transition: 0.25s; z-index: 100; width: max-content; max-width: calc(100% - 32px); text-align: center; font-weight: 600; font-size: 14px; }
.toast.show { opacity: 1; transform: translateX(-50%); }
.toast.err { background: #FDE2DD; color: #A2241B; }
.modal-back { position: fixed; inset: 0; background: rgba(43, 29, 22, 0.45); display: grid; place-items: end center; z-index: 50; padding: 16px; }
@media (min-width: 640px) { .modal-back { place-items: center; } }
.modal { width: 100%; max-width: 480px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 24px; max-height: calc(100vh - 32px); overflow: auto; }

/* ---------- Cabinet ---------- */
.cab { padding: 20px 0 100px; }
.tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 4px 0 12px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; padding: 10px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); cursor: pointer; font-weight: 700; font-size: 14px; color: var(--muted); white-space: nowrap; }
.tab.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.week-nav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 4px; }
.week-nav::-webkit-scrollbar { display: none; }
.wk { flex: none; width: 48px; height: 56px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 11px; color: var(--muted); }
.wk b { font-family: var(--head); font-size: 20px; color: var(--text); line-height: 1.1; }
.wk.active { border-color: var(--accent); }
.wk.current b { color: var(--accent); }
.wk.complete { background: var(--accent-soft); }
.day-card { padding: 0; overflow: hidden; }
.day-head { display: flex; align-items: center; gap: 14px; padding: 16px 18px; cursor: pointer; width: 100%; background: none; border: 0; text-align: left; }
.day-head .wd { flex: none; width: 48px; height: 48px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; font-family: var(--head); font-size: 18px; }
.day-card.done .wd { background: var(--accent); color: var(--accent-ink); }
.day-head .dh-main { flex: 1; min-width: 0; }
.day-head .dh-main b { display: block; font-family: var(--head); font-size: 18px; font-weight: 800; }
.day-head .chev { transition: transform 0.2s; color: var(--muted); }
.day-card.open .chev { transform: rotate(180deg); }
.day-body { padding: 0 18px 18px; display: none; }
.day-card.open .day-body { display: block; }
.exercise { padding: 14px 0; border-top: 1px solid var(--border); }
.exercise .ex-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.exercise .ex-name { font-weight: 800; }
.exercise .ex-rx { flex: none; font-family: var(--head); font-size: 20px; color: var(--accent); white-space: nowrap; }
.exercise .ex-cue { color: var(--muted); font-size: 14px; margin-top: 6px; }
.exercise .ex-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.list-plain { margin: 0; padding-left: 18px; color: var(--muted); font-size: 14px; }
.list-plain li + li { margin-top: 4px; }
.meal { padding: 14px 0; border-top: 1px solid var(--border); }
.meal:first-child { border-top: 0; padding-top: 0; }
.macro-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.macro-bar div { background: var(--surface-2); border-radius: 12px; padding: 12px 8px; text-align: center; }
.macro-bar b { display: block; font-family: var(--head); font-size: 22px; line-height: 1.1; }
.macro-bar span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.day-pills { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 4px; }
.day-pills::-webkit-scrollbar { display: none; }
.shop-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); cursor: pointer; }
.shop-item.checked .si-name { text-decoration: line-through; color: var(--faint); }
.shop-item .si-name { flex: 1; }
.product { display: flex; flex-direction: column; gap: 10px; }
.product-art { height: 120px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; color: var(--accent); position: relative; overflow: hidden; }
.product-art svg { width: 48px; height: 48px; }
.product-art .badge { position: absolute; top: 10px; left: 10px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 999px; }
.qty button { width: 36px; height: 36px; border: 0; background: none; cursor: pointer; font-size: 18px; }
.qty span { min-width: 24px; text-align: center; font-weight: 800; }
.cart-bar { position: fixed; left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); max-width: 560px; margin: 0 auto; z-index: 30; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }
.table-wrap { overflow-x: auto; }
.empty { text-align: center; padding: 32px 16px; color: var(--muted); }

.fade-in { animation: fade 0.3s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- Режим тренировки (сайт) ---------- */
.player { position: fixed; inset: 0; z-index: 40; background: var(--bg); overflow-y: auto; }
.player-top { position: sticky; top: 0; z-index: 2; background: var(--bg); padding: 12px 0; border-bottom: 1px solid var(--border); }
.set-head, .set-row { display: flex; align-items: center; gap: 8px; }
.set-head span { flex: 1; text-align: center; font-size: 10px; font-weight: 800; color: var(--faint); text-transform: uppercase; letter-spacing: 0.04em; }
.set-head span:first-child { flex: 0 0 40px; text-align: left; }
.set-head span:last-child { flex: 0 0 52px; }
.set-row { padding: 4px; border-radius: 12px; transition: background 0.2s; }
.set-row > b { flex: 0 0 40px; font-size: 16px; }
.set-row.done { background: var(--accent-soft); }
.set-input { flex: 1; min-width: 0; height: 46px; text-align: center; font-size: 18px; font-weight: 800; padding: 0 6px; }
.set-check { flex: 0 0 52px; height: 46px; border-radius: 12px; border: 0; background: var(--surface-3); color: var(--muted); font-size: 20px; font-weight: 900; cursor: pointer; }
.set-check.on { background: var(--accent); color: var(--accent-ink); }
.rest-bar { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); max-width: 560px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(12px); border: 1px solid var(--border); border-radius: 20px; z-index: 45; }
.pr-banner { position: fixed; top: 84px; left: 12px; right: 12px; max-width: 560px; margin: 0 auto; display: flex; gap: 12px; align-items: center; padding: 14px 16px; background: var(--accent); color: var(--accent-ink); border-radius: 18px; z-index: 46; font-size: 28px; box-shadow: var(--shadow); }
.pr-banner b { font-family: var(--head); font-size: 18px; }
.faces { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.face { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 2px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); cursor: pointer; }
.face span { font-size: 26px; }
.face small { font-size: 10px; color: var(--muted); line-height: 1.2; }
.face.on { border-color: var(--accent); background: var(--accent-soft); }
.heatmap { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 1fr); gap: 3px; }
.heatmap i { display: block; aspect-ratio: 1; border-radius: 3px; background: var(--surface-3); }
.heatmap i.on { background: var(--accent); }
.insight { display: flex; gap: 12px; align-items: flex-start; }
.insight .ico { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 18px; background: var(--surface-2); }
.app-banner { display: flex; align-items: center; gap: 14px; }
.app-banner img { width: 48px; height: 48px; border-radius: 12px; }

/* Сайт, открытый с экрана «Домой» (PWA): отступ под «чёлку» */
@media (display-mode: standalone) {
  .header { padding-top: env(safe-area-inset-top); }
  .player-top { padding-top: calc(12px + env(safe-area-inset-top)); }
}
