/* ================================================================
   ДНЕВНИК — стиль «чёрный + электрический синий» (как на референсе)
   Шрифты: Oswald (заголовки, цифры) + Inter (текст)
   ================================================================ */
:root {
  color-scheme: dark;
  --bg:#000; --surface:#070A11; --surface-2:#0C1322; --line:#18233B; --frame:#173575;
  --ink:#F4F7FC; --ink-soft:#9AA8C2; --ink-faint:#5F6C86;
  --accent:#2F7BFF; --accent-2:#12B5FF; --accent-ink:#8DB8FF; --accent-soft:rgba(47,123,255,.13);
  --warn:#FF5470; --ok:#26D0A0;
  --grad:linear-gradient(180deg,#12B5FF 0%,#2F6BFF 100%);
  --glow:0 10px 32px rgba(47,123,255,.38);
  --bg-glow:radial-gradient(60% 45% at 88% 12%,rgba(30,90,255,.20),transparent 70%),radial-gradient(50% 40% at 4% 78%,rgba(0,190,200,.10),transparent 70%);
  --font-display:'Oswald','Bebas Neue','Arial Narrow',Impact,sans-serif;
  --font-body:'Inter','Segoe UI',system-ui,-apple-system,sans-serif;
  --r:2px;
  box-sizing:border-box;
}
:root[data-theme="light"] {
  color-scheme:light;
  --bg:#F2F5FB; --surface:#FFFFFF; --surface-2:#EAEFF8; --line:#D5DDEC; --frame:#9DB8F2;
  --ink:#0A1020; --ink-soft:#4B5A78; --ink-faint:#8593AE;
  --accent:#1F62F0; --accent-2:#0A9BE0; --accent-ink:#1550C8; --accent-soft:rgba(31,98,240,.10);
  --warn:#D92B4B; --ok:#0E9F77;
  --grad:linear-gradient(180deg,#0A9BE0 0%,#1F62F0 100%);
  --glow:0 10px 26px rgba(31,98,240,.28);
  --bg-glow:radial-gradient(60% 45% at 90% 8%,rgba(31,98,240,.10),transparent 70%);
}

*,*::before,*::after { box-sizing:border-box; }
input,select,textarea,button { font:inherit; -webkit-appearance:none; appearance:none; border-radius:0; }
input::placeholder { color:var(--ink-faint); opacity:1; }
html,body { min-height:100%; overflow-x:hidden; }
html { scroll-padding-top:env(safe-area-inset-top,0px); }
body {
  margin:0; background:var(--bg); color:var(--ink); font-family:var(--font-body);
  -webkit-font-smoothing:antialiased; font-variant-numeric:tabular-nums;
  padding-top:env(safe-area-inset-top,0px);
}
body::before { content:""; position:fixed; inset:0; background:var(--bg-glow); pointer-events:none; z-index:0; }
:focus-visible { outline:2px solid var(--accent-2); outline-offset:2px; }
::selection { background:var(--accent); color:#fff; }
button { cursor:pointer; color:inherit; }
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; }
}

.wrap { position:relative; z-index:1; max-width:560px; margin:0 auto; padding:14px 18px calc(96px + env(safe-area-inset-bottom,0px)); }

/* ---------- Шапка ---------- */
.topbar { display:flex; align-items:center; justify-content:space-between; padding:6px 0 10px; }
.brand { font-family:var(--font-display); font-weight:700; font-size:26px; letter-spacing:.02em; line-height:1; }
.brand .dot { color:var(--accent); }
.brand .sub { font-size:14px; letter-spacing:.14em; color:var(--ink-soft); margin-left:6px; font-weight:500; }
.icon-btn { width:40px; height:40px; border-radius:50%; border:1px solid var(--ink-soft); background:transparent; display:flex; align-items:center; justify-content:center; color:var(--ink); }
.icon-btn:hover { border-color:var(--accent); color:var(--accent-ink); }
.icon-btn svg { width:16px; height:16px; }

.view { display:none; }
.view.active { display:block; }

/* ---------- Типографика-визитка ---------- */
.eyebrow { display:flex; align-items:center; gap:12px; margin:22px 0 10px; font-size:11px; font-weight:600; letter-spacing:.24em; text-transform:uppercase; color:var(--accent); }
.eyebrow .rule { width:34px; height:1px; background:var(--ink-soft); }
.t-outline { display:block; color:transparent; -webkit-text-stroke:2px var(--ink); font-family:var(--font-display); font-weight:700; text-transform:uppercase; line-height:.98; letter-spacing:.01em; }
.t-grad { display:block; font-family:var(--font-display); font-weight:700; text-transform:uppercase; line-height:.98; background:var(--grad); -webkit-background-clip:text; background-clip:text; color:transparent; -webkit-text-fill-color:transparent; }

/* ---------- Hero дня ---------- */
.hero { display:flex; flex-direction:column; gap:26px; }
.hero-copy { min-width:0; }
.hero-title { margin:0; font-size:clamp(44px,14vw,80px); max-width:100%; }
.hero-lead { margin:12px 0 16px; font-size:16px; line-height:1.55; color:var(--ink); max-width:34ch; }
.tags { display:flex; flex-wrap:wrap; gap:10px; }
.tag { border:1px solid var(--line); background:var(--surface); padding:9px 14px; font-size:12.5px; letter-spacing:.06em; color:var(--accent-ink); }
.tag b { color:var(--ink); font-weight:600; }

.datenav { display:flex; align-items:center; gap:6px; margin-top:18px; color:var(--ink-soft); }
.datenav button { background:none; border:1px solid var(--line); width:36px; height:36px; display:flex; align-items:center; justify-content:center; color:var(--ink-soft); }
.datenav button:hover { color:var(--ink); border-color:var(--accent); }
.datenav button svg { width:15px; height:15px; }
.datenav .label { min-width:130px; text-align:center; font-size:12.5px; font-weight:600; letter-spacing:.14em; text-transform:uppercase; color:var(--ink); }

/* рамка с кольцом + плавающие бейджи, как фото на референсе */
.frame { position:relative; border:1px solid var(--frame); padding:14px; margin:0 6px; }
.frame-inner { background:linear-gradient(160deg,var(--surface-2),var(--surface) 70%); aspect-ratio:1/1; display:flex; align-items:center; justify-content:center; }
.ring-wrap { position:relative; width:72%; aspect-ratio:1/1; }
.ring-wrap svg { width:100%; height:100%; transform:rotate(-90deg); }
#ringProgress { transition:stroke-dashoffset .5s ease; filter:drop-shadow(0 0 8px rgba(47,123,255,.55)); }
.ring-center { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; }
.ring-pct { font-family:var(--font-display); font-weight:700; font-size:clamp(40px,12vw,56px); line-height:1; }
.ring-cap { font-size:11px; letter-spacing:.2em; text-transform:uppercase; color:var(--ink-soft); margin-top:6px; }
.float-badge { position:absolute; background:var(--surface); border:1px solid var(--line); padding:12px 16px; min-width:132px; box-shadow:0 12px 30px rgba(0,0,0,.35); }
.float-badge b { display:block; font-family:var(--font-display); font-weight:700; font-size:26px; line-height:1; color:var(--accent); }
.float-badge span { display:block; margin-top:6px; font-size:10.5px; letter-spacing:.14em; text-transform:uppercase; color:var(--ink-soft); }
.fb-top { top:22%; right:-8px; }
.fb-bottom { bottom:18%; left:-10px; }

/* ---------- Секции ---------- */
.section-title { display:flex; align-items:center; gap:12px; margin:34px 0 12px; font-size:11px; font-weight:600; letter-spacing:.24em; text-transform:uppercase; color:var(--accent); }
.section-title::before { content:""; width:34px; height:1px; background:var(--ink-soft); flex-shrink:0; }
.card { background:var(--surface); border:1px solid var(--line); padding:16px 18px; }

.macro-row { display:flex; align-items:center; gap:12px; padding:11px 0; }
.macro-row + .macro-row { border-top:1px solid var(--line); }
.macro-name { width:78px; font-size:11.5px; letter-spacing:.14em; text-transform:uppercase; color:var(--ink-soft); flex-shrink:0; }
.macro-bar { flex:1; height:5px; background:var(--surface-2); overflow:hidden; }
.macro-bar > div { height:100%; background:var(--grad); transition:width .3s ease; }
.macro-bar.over > div { background:var(--warn); }
.macro-val { width:92px; text-align:right; font-size:13px; flex-shrink:0; }
.macro-val b { font-family:var(--font-display); font-size:17px; font-weight:600; }
.macro-val span { color:var(--ink-faint); }

.meal-chips { display:flex; gap:6px; }
.meal-chip { flex:1; padding:10px 2px; text-align:center; border:1px solid var(--line); background:transparent; color:var(--ink-soft); font-size:11px; font-weight:600; letter-spacing:.1em; text-transform:uppercase; }
.meal-chip:hover { border-color:var(--frame); color:var(--ink); }
.meal-chip.active { border-color:var(--accent); background:var(--accent-soft); color:var(--ink); }

.add-box { display:flex; flex-direction:column; gap:12px; }
.add-row { display:flex; gap:8px; }
.add-row input[type=text], .chat-input-row input[type=text], .manual-grid input, .field input, .field select, .gift-code-form input {
  width:100%; padding:13px 14px; border:1px solid var(--line); background:var(--bg); color:var(--ink); font-size:15px;
}
:root[data-theme="light"] .add-row input[type=text], :root[data-theme="light"] .chat-input-row input[type=text], :root[data-theme="light"] .manual-grid input, :root[data-theme="light"] .field input, :root[data-theme="light"] .field select { background:var(--surface); }
.add-row input[type=text]:focus, .chat-input-row input[type=text]:focus, .manual-grid input:focus, .field input:focus, .field select:focus { outline:none; border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-soft); }
.send-btn { width:48px; height:48px; flex-shrink:0; border:none; background:var(--accent); color:#fff; display:flex; align-items:center; justify-content:center; box-shadow:var(--glow); transition:transform .15s ease,filter .15s ease; }
.send-btn.ghost { background:transparent; border:1px solid var(--line); color:var(--ink); box-shadow:none; }
.send-btn svg { width:18px; height:18px; }
.send-btn:hover:not(:disabled) { filter:brightness(1.1); transform:translateY(-1px); }
.send-btn:disabled { opacity:.4; cursor:default; box-shadow:none; }
.hint { font-size:12px; color:var(--ink-faint); line-height:1.5; }
.toggle-manual { align-self:flex-start; background:none; border:none; padding:2px 0; color:var(--ink-soft); font-size:12px; letter-spacing:.06em; text-decoration:underline; text-underline-offset:4px; }
.manual-grid { display:none; grid-template-columns:1fr 1fr; gap:10px; margin-top:2px; }
.manual-grid .full { grid-column:1/-1; }
.manual-grid label, .field label { display:block; margin-bottom:6px; font-size:10.5px; letter-spacing:.16em; text-transform:uppercase; color:var(--ink-soft); }

.btn { padding:13px 20px; border:1px solid var(--line); background:transparent; color:var(--ink); font-size:12.5px; font-weight:700; letter-spacing:.14em; text-transform:uppercase; }
.btn:hover:not(:disabled) { border-color:var(--accent); }
.btn.primary { background:var(--accent); border-color:var(--accent); color:#fff; box-shadow:var(--glow); }
.btn.primary:hover:not(:disabled) { filter:brightness(1.1); }
.btn:disabled { opacity:.5; cursor:default; }

.estimate-card { border:1px dashed var(--accent); background:var(--accent-soft); padding:14px 16px; display:flex; flex-direction:column; gap:10px; }
.estimate-title { font-size:10.5px; letter-spacing:.18em; text-transform:uppercase; color:var(--accent-ink); }
.estimate-name { font-family:var(--font-display); font-size:24px; font-weight:600; text-transform:uppercase; letter-spacing:.02em; }
.estimate-macros { display:flex; gap:16px; flex-wrap:wrap; font-size:13px; color:var(--ink-soft); }
.estimate-macros b { color:var(--ink); }
.estimate-actions { display:flex; gap:8px; }
.estimate-actions .btn { flex:1; }

.thinking { display:flex; align-items:center; gap:8px; font-size:13px; color:var(--ink-soft); padding:2px; }
.dot-pulse { width:6px; height:6px; background:var(--accent); animation:pulse 1s infinite ease-in-out; }
@keyframes pulse { 0%,100% { opacity:.25; } 50% { opacity:1; } }

.meal-group { margin-bottom:18px; }
.meal-group:last-child { margin-bottom:0; }
.meal-group-head { display:flex; align-items:baseline; justify-content:space-between; margin-bottom:4px; font-size:12px; color:var(--ink-soft); }
.meal-group-head .name { font-family:var(--font-display); font-size:17px; font-weight:600; letter-spacing:.06em; text-transform:uppercase; color:var(--ink); }
.log-row { display:flex; align-items:center; gap:12px; padding:10px 0; }
.log-row + .log-row { border-top:1px solid var(--line); }
.log-time { width:42px; flex-shrink:0; font-size:12px; color:var(--ink-faint); }
.log-name { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:14.5px; }
.log-kcal { flex-shrink:0; font-size:14px; font-weight:600; }
.log-del { flex-shrink:0; background:none; border:none; padding:6px; color:var(--ink-faint); }
.log-del:hover { color:var(--warn); }
.log-del svg { width:15px; height:15px; display:block; }
.empty-note { padding:20px 0; text-align:center; font-size:13.5px; color:var(--ink-faint); }

.week-chart { position:relative; display:flex; align-items:flex-end; justify-content:space-between; height:100px; padding:4px 4px 0; }
.week-goalline { position:absolute; left:4px; right:4px; border-top:1px dashed var(--ink-faint); }
.week-col { display:flex; flex-direction:column; align-items:center; justify-content:flex-end; gap:7px; flex:1; height:100%; }
.week-bar-track { width:16px; height:80px; display:flex; flex-direction:column; justify-content:flex-end; }
.week-bar { width:100%; min-height:2px; background:var(--grad); }
.week-bar.over { background:var(--warn); }
.week-bar.today { outline:2px solid var(--ink); outline-offset:1px; }
.week-day { font-size:10.5px; letter-spacing:.1em; text-transform:uppercase; color:var(--ink-faint); }

/* ---------- Ассистент ---------- */
.ai-avatar { width:28px; height:28px; flex-shrink:0; background:var(--accent); color:#fff; display:flex; align-items:center; justify-content:center; }
.ai-avatar svg { width:14px; height:14px; }
.chat-intro { display:flex; gap:12px; align-items:flex-start; padding:6px 0 18px; }
.chat-intro p { margin:0; font-size:14px; line-height:1.55; color:var(--ink-soft); }
.quick-row { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:18px; }
.quick-chip { padding:10px 14px; border:1px solid var(--line); background:var(--surface); color:var(--ink); font-size:12px; letter-spacing:.06em; }
.quick-chip:hover { border-color:var(--accent); }
.chat-log { display:flex; flex-direction:column; gap:14px; margin-bottom:16px; }
.msg { display:flex; gap:10px; }
.msg.user { flex-direction:row-reverse; }
.msg .spacer { width:28px; flex-shrink:0; }
.msg-bubble { max-width:82%; padding:11px 14px; font-size:14.5px; line-height:1.55; white-space:pre-wrap; }
.msg.assistant .msg-bubble { background:var(--surface); border:1px solid var(--line); }
.msg.user .msg-bubble { background:var(--accent); color:#fff; }
.msg-bubble.has-img { padding:6px; }
.msg-bubble.has-img .msg-text { padding:4px 8px; }
.msg-img { display:block; max-width:100%; max-height:240px; margin:0 0 6px; object-fit:cover; }
.chat-input-row { position:sticky; bottom:calc(74px + env(safe-area-inset-bottom,0px)); display:flex; flex-wrap:wrap; align-items:center; gap:8px; padding:10px 0 4px; background:var(--bg); }
.chat-input-row input[type=text] { flex:1; width:auto; }
.chat-preview { flex:0 0 100%; display:none; }
.chat-preview.active { display:block; }
.chat-preview-item { position:relative; display:inline-block; }
.chat-preview-item img { display:block; height:84px; max-width:160px; object-fit:cover; border:1px solid var(--line); }
.chat-preview-remove { position:absolute; top:-7px; right:-7px; width:22px; height:22px; padding:0; border:none; border-radius:50%; background:var(--ink); color:var(--bg); display:flex; align-items:center; justify-content:center; }
.chat-preview-remove svg { width:11px; height:11px; }
.ai-unavailable { padding:16px; border:1px solid var(--line); background:var(--surface); font-size:13.5px; line-height:1.5; color:var(--ink-soft); }

/* ---------- Профиль ---------- */
.field { margin-bottom:12px; }
.field-row { display:flex; gap:10px; }
.field-row .field { flex:1; min-width:0; }
.divider-note { margin:0 0 12px; font-size:13px; line-height:1.5; color:var(--ink-soft); }
.calc-suggest { display:flex; flex-wrap:wrap; gap:8px; margin:12px 0 4px; }
.calc-chip { padding:10px 14px; border:1px solid var(--line); background:transparent; color:var(--ink-soft); text-align:left; font-size:11.5px; letter-spacing:.1em; text-transform:uppercase; }
.calc-chip b { display:block; margin-bottom:3px; font-family:var(--font-display); font-size:20px; letter-spacing:.02em; color:var(--ink); }
.calc-chip.active { border-color:var(--accent); background:var(--accent-soft); }
.profile-actions { margin-top:14px; display:flex; flex-direction:column; gap:8px; }
.profile-actions .btn { width:100%; }
.gift-code-block { margin-top:26px; text-align:center; }
.gift-code-toggle { background:none; border:none; padding:6px; color:var(--ink-faint); font-size:12px; text-decoration:underline; text-underline-offset:4px; }
.gift-code-form { display:none; gap:8px; margin-top:10px; justify-content:center; }
.gift-code-form.active { display:flex; }
.gift-code-form input { width:200px; padding:10px; text-align:center; letter-spacing:.12em; text-transform:uppercase; font-size:14px; }
.gift-code-form button { padding:10px 16px; border:1px solid var(--line); background:transparent; color:var(--ink); font-size:11.5px; font-weight:700; letter-spacing:.12em; text-transform:uppercase; }
.gift-code-msg { min-height:16px; margin-top:8px; font-size:12px; }
.gift-code-msg.success { color:var(--ok); }
.gift-code-msg.error { color:var(--warn); }
.legal { margin-top:22px; text-align:center; font-size:11px; line-height:1.6; color:var(--ink-faint); }

/* ---------- Нижнее меню ---------- */
.bottom-nav { position:fixed; left:0; right:0; bottom:0; z-index:30; display:flex; justify-content:center; background:rgba(0,0,0,.86); backdrop-filter:blur(16px); -webkit-backdrop-filter:blur(16px); border-top:1px solid var(--line); padding-bottom:env(safe-area-inset-bottom,0px); }
:root[data-theme="light"] .bottom-nav { background:rgba(255,255,255,.9); }
.bottom-nav-inner { display:flex; width:100%; max-width:560px; }
.nav-btn { position:relative; flex:1; display:flex; flex-direction:column; align-items:center; gap:5px; padding:12px 4px 10px; background:none; border:none; color:var(--ink-faint); font-size:10.5px; font-weight:600; letter-spacing:.16em; text-transform:uppercase; }
.nav-btn svg { width:20px; height:20px; }
.nav-btn.active { color:var(--accent-ink); }
.nav-btn.active::before { content:""; position:absolute; top:-1px; left:28%; right:28%; height:2px; background:var(--accent); box-shadow:0 0 12px var(--accent); }

/* ---------- Онбординг ---------- */
.onboard-overlay { position:fixed; inset:0; z-index:200; display:none; align-items:flex-end; justify-content:center; background:rgba(0,0,0,.72); backdrop-filter:blur(3px); }
.onboard-overlay.active { display:flex; }
.onboard-card { width:100%; max-width:560px; max-height:92vh; overflow-y:auto; background:var(--surface); border-top:1px solid var(--frame); padding:26px 22px calc(26px + env(safe-area-inset-bottom,0px)); }
@media (min-width:620px) { .onboard-overlay { align-items:center; padding:20px; } .onboard-card { border:1px solid var(--frame); max-height:88vh; } }
.onboard-step { display:none; }
.onboard-step.active { display:block; }
.onboard-icon { width:44px; height:44px; margin-bottom:16px; background:var(--accent); color:#fff; display:flex; align-items:center; justify-content:center; box-shadow:var(--glow); }
.onboard-icon svg { width:22px; height:22px; }
.onboard-title { margin:0 0 10px; font-family:var(--font-display); font-size:32px; font-weight:700; line-height:1; text-transform:uppercase; letter-spacing:.01em; }
.onboard-text { margin:0 0 20px; font-size:14px; line-height:1.6; color:var(--ink-soft); }
.onboard-actions { display:flex; flex-direction:column; gap:10px; margin-top:6px; }
.onboard-actions .btn { width:100%; }
.onboard-skip, .onboard-back { background:none; border:none; padding:6px; color:var(--ink-faint); font-size:12.5px; text-align:center; text-decoration:underline; text-underline-offset:4px; }
.onboard-back { text-align:left; padding-left:0; text-decoration:none; color:var(--ink-soft); }
.goal-chips { display:flex; flex-direction:column; gap:8px; }
.goal-chip { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:13px 14px; border:1px solid var(--line); background:transparent; color:var(--ink); text-align:left; }
.goal-chip .k { font-size:13px; font-weight:600; letter-spacing:.08em; text-transform:uppercase; }
.goal-chip .v { font-size:12.5px; color:var(--ink-soft); }
.goal-chip.active { border-color:var(--accent); background:var(--accent-soft); }
.onboard-result-macros { display:flex; gap:8px; margin:14px 0 20px; }
.onboard-result-macros .m { flex:1; padding:12px 4px; text-align:center; border:1px solid var(--line); }
.onboard-result-macros .m b { display:block; font-family:var(--font-display); font-size:24px; font-weight:700; color:var(--accent-ink); }
.onboard-result-macros .m span { font-size:10px; letter-spacing:.1em; text-transform:uppercase; color:var(--ink-soft); }
.supp-list { display:flex; flex-direction:column; gap:10px; margin:8px 0 18px; }
.supp-item { padding:12px 14px; border:1px solid var(--line); }
.supp-item .t { margin-bottom:3px; font-size:13.5px; font-weight:600; }
.supp-item .d { font-size:12.5px; line-height:1.45; color:var(--ink-soft); }
.onboard-disclaimer { margin:0 0 18px; font-size:11.5px; line-height:1.55; color:var(--ink-faint); }

#toast { position:fixed; left:50%; bottom:calc(92px + env(safe-area-inset-bottom,0px)); transform:translateX(-50%); z-index:500; max-width:90vw; padding:11px 18px; background:var(--ink); color:var(--bg); font-size:13.5px; text-align:center; box-shadow:0 8px 24px rgba(0,0,0,.4); opacity:0; pointer-events:none; transition:opacity .2s; }

/* ================= PRO PAYWALL (всегда тёмный) ================= */
.pro-overlay { position:fixed; inset:0; z-index:300; display:none; background:#000; color:#F4F7FC; overflow-y:auto; }
.pro-overlay.active { display:block; }
.pro-sheet { position:relative; min-height:100%; max-width:560px; margin:0 auto; padding:calc(22px + env(safe-area-inset-top,0px)) 24px calc(26px + env(safe-area-inset-bottom,0px)); display:flex; flex-direction:column; background:radial-gradient(90% 50% at 90% 0%,rgba(30,90,255,.30),transparent 70%),radial-gradient(70% 40% at 0% 90%,rgba(0,190,200,.14),transparent 70%); }
.pro-close { position:absolute; top:calc(18px + env(safe-area-inset-top,0px)); right:18px; z-index:2; width:38px; height:38px; border-radius:50%; border:1px solid #6B7A99; background:transparent; color:#fff; display:flex; align-items:center; justify-content:center; }
.pro-close svg { width:15px; height:15px; }
.pro-content { display:flex; flex-direction:column; flex:1; }
.pro-badge { align-self:flex-start; margin-top:44px; padding:7px 14px; border:1px solid #173575; background:rgba(47,123,255,.12); color:#8DB8FF; font-size:11px; font-weight:600; letter-spacing:.22em; text-transform:uppercase; }
.pro-title { margin:18px 0 12px; font-size:clamp(46px,14vw,74px); }
.pro-title .t-outline { -webkit-text-stroke-color:#F4F7FC; }
.pro-sub { margin:0 0 26px; max-width:38ch; font-size:15px; line-height:1.6; color:#C4CEE2; }
.pro-perks { display:flex; flex-direction:column; gap:14px; margin-bottom:auto; padding-bottom:24px; }
.pro-perk { display:flex; align-items:flex-start; gap:14px; }
.pro-perk-icon { width:32px; height:32px; flex-shrink:0; border:1px solid #173575; background:rgba(47,123,255,.12); color:#12B5FF; display:flex; align-items:center; justify-content:center; }
.pro-perk-icon svg { width:16px; height:16px; }
.pro-perk-text { padding-top:6px; font-size:14px; line-height:1.45; color:#DCE4F2; }
.pro-perk-text b { color:#fff; }
.pro-trial-card { display:none; margin:22px 0 4px; padding:18px; border:1px solid #173575; background:rgba(47,123,255,.10); }
.pro-trial-card.active { display:block; }
.pro-trial-label { font-size:11px; font-weight:600; letter-spacing:.2em; text-transform:uppercase; color:#8DB8FF; }
.pro-trial-time { margin:8px 0 12px; font-family:var(--font-display); font-size:44px; font-weight:700; line-height:1; }
.pro-trial-bar { height:4px; background:rgba(255,255,255,.12); }
.pro-trial-bar > span { display:block; height:100%; width:0; background:linear-gradient(90deg,#12B5FF,#2F6BFF); transition:width .6s ease; }
.pro-trial-note { margin-top:12px; font-size:13px; line-height:1.5; color:#C4CEE2; }
.pro-content.trial-mode .pro-sub, .pro-content.trial-mode .pro-perks { display:none; }
.pro-actions { display:flex; flex-direction:column; gap:10px; margin-top:20px; }
.pro-price-row { display:flex; align-items:baseline; justify-content:center; gap:12px; }
.pro-price-now { font-family:var(--font-display); font-size:46px; font-weight:700; line-height:1; background:linear-gradient(180deg,#12B5FF,#2F6BFF); -webkit-background-clip:text; background-clip:text; color:transparent; -webkit-text-fill-color:transparent; }
.pro-price-old { font-size:16px; color:#6B7A99; text-decoration:line-through; }
.pro-cur { display:flex; justify-content:center; gap:6px; }
.pro-cur button { min-width:74px; padding:7px 12px; border:1px solid #3A4A6B; border-radius:999px; background:transparent; color:#8DB8FF; font:600 12px var(--font-body); letter-spacing:.06em; cursor:pointer; }
.pro-cur button:hover { border-color:#2F7BFF; }
.pro-cur button.active { border-color:transparent; background:linear-gradient(180deg,#12B5FF,#2F6BFF); color:#fff; }
.pro-price-per { font-size:14px; color:#8DB8FF; margin-left:-6px; }
.pro-paylink { display:flex; flex-direction:column; align-items:center; gap:8px; margin-top:6px; text-align:center; }
.pro-paylink[hidden] { display:none; }
.pro-paylink-a { color:#8DB8FF; font-weight:600; font-size:14px; text-decoration:underline; }
.pro-paylink-copy { padding:7px 16px; border:1px solid #3A4A6B; border-radius:999px; background:transparent; color:#8DB8FF; font:600 12px var(--font-body); cursor:pointer; }
.pro-promo-text { min-height:16px; text-align:center; font-size:12px; letter-spacing:.14em; text-transform:uppercase; color:#8DB8FF; }
.pro-btn-main { width:100%; padding:17px; border:none; background:#2F7BFF; color:#fff; font-size:13.5px; font-weight:700; letter-spacing:.16em; text-transform:uppercase; box-shadow:0 12px 34px rgba(47,123,255,.45); }
.pro-btn-main:hover:not(:disabled) { filter:brightness(1.1); }
.pro-btn-main:disabled { opacity:.55; cursor:default; box-shadow:none; }
.pro-btn-main.big { padding:21px; font-size:15px; }
.pro-btn-trial { width:100%; padding:15px; border:1px solid #3A4A6B; background:transparent; color:#F4F7FC; font-size:12.5px; font-weight:700; letter-spacing:.14em; text-transform:uppercase; }
.pro-btn-trial:hover { border-color:#2F7BFF; }
.pro-btn-skip { display:none; width:100%; padding:6px; border:none; background:transparent; color:#8D9BBA; font-size:12.5px; text-decoration:underline; text-underline-offset:4px; }
.pro-btn-skip.show { display:block; }
.pro-status-line { min-height:16px; text-align:center; font-size:12.5px; line-height:1.4; color:#C4CEE2; }
.pro-fine { text-align:center; font-size:11px; line-height:1.5; color:#6B7A99; }

.pro-success { display:none; flex-direction:column; align-items:center; justify-content:center; text-align:center; margin:auto 0; }
.pro-success.active { display:flex; }
.pro-check-circle { width:92px; height:92px; margin-bottom:22px; filter:drop-shadow(0 0 14px rgba(47,123,255,.6)); }
.pro-check-circle .ring { fill:none; stroke:#2F7BFF; stroke-width:2.2; stroke-dasharray:283; stroke-dashoffset:283; animation:proRing .6s cubic-bezier(.65,0,.45,1) forwards; }
.pro-check-circle .tick { fill:none; stroke:#12B5FF; stroke-width:3.4; stroke-linecap:round; stroke-linejoin:round; stroke-dasharray:48; stroke-dashoffset:48; animation:proRing .4s .55s cubic-bezier(.65,0,.45,1) forwards; }
@keyframes proRing { to { stroke-dashoffset:0; } }
.pro-success-title { margin-bottom:10px; font-family:var(--font-display); font-size:38px; font-weight:700; text-transform:uppercase; }
.pro-success-sub { max-width:320px; margin-bottom:26px; font-size:14px; line-height:1.6; color:#C4CEE2; }
.pro-success .pro-btn-main { max-width:280px; }

/* --- восстановление доступа, ссылки --- */
.recovery-panel { display:none; margin-top:10px; text-align:left; }
.recovery-panel.active { display:block; }
.recovery-panel input { width:100%; margin:6px 0 8px; padding:11px 12px; font-size:12px; border:1px solid var(--line); background:var(--bg); color:var(--ink); }
:root[data-theme="light"] .recovery-panel input { background:var(--surface); }
.recovery-panel input:focus { outline:none; border-color:var(--accent); }
.recovery-panel .btn { width:100%; }
.recovery-sep { margin-top:16px; }
.legal a, .pro-fine a { color:var(--accent); text-decoration:underline; text-underline-offset:3px; }

/* ---- язык и согласие ---- */
html.i18n-pending body { visibility:hidden; }
.topbar-actions { display:flex; align-items:center; gap:8px; }
.lang-btn { width:auto; padding:0 12px; font-size:12px; font-weight:700; letter-spacing:.08em; }
.consent-overlay { position:fixed; inset:0; z-index:1000; background:rgba(0,0,0,.65); display:flex; align-items:center; justify-content:center; padding:20px; }
.consent-card { max-width:440px; width:100%; max-height:90vh; overflow:auto; background:var(--surface); color:var(--ink); border:1px solid var(--line); padding:22px; }
.consent-card h2 { font-size:19px; margin:0 0 10px; }
.consent-card p { font-size:14px; line-height:1.55; margin:0 0 10px; }
.consent-card a { color:var(--accent-ink, var(--accent)); }
.consent-check { display:flex; gap:10px; align-items:flex-start; font-size:14px; margin:14px 0; }
.consent-check input { -webkit-appearance:auto; appearance:auto; width:20px; height:20px; flex:none; margin:1px 0 0; accent-color:var(--accent); }
.consent-actions { display:flex; gap:10px; }
.consent-actions .btn { flex:1; }
.consent-actions .btn:disabled { opacity:.45; cursor:not-allowed; }
.ob-lang { margin:0 0 8px auto; }
.pro-lang { position:absolute; top:calc(18px + env(safe-area-inset-top,0px)); left:18px; z-index:2; height:38px; border-color:#6B7A99; color:#fff; }
