/* ============================================================
   Базовые компоненты и инфографика редизайна (kaplia-redesign, шаги 3–4).
   Префикс .kp-…, только var(--…). Разметку отдают модули
   public/assets/js/ui/*.js. Геометрия — общая, цвета — из темы:
   в светлой новые компоненты берут проектные светлые значения.
   ============================================================ */

/* ── AppShell ── */
.kp-shell {
  box-sizing: border-box;
  min-height: 100dvh;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: env(safe-area-inset-top) var(--gutter) calc(var(--nav-h) + env(safe-area-inset-bottom) + var(--sp-4));
  background: var(--bg-screen);
  color: var(--text);
  font-family: var(--font-text);
  font-size: var(--fs-body-rd);
}
.kp-shell--home { background: var(--bg-home); }
.kp-shell--sos { background: var(--bg-sos); }
.kp-shell--no-nav { padding-bottom: calc(env(safe-area-inset-bottom) + var(--sp-6)); }
.kp-shell * { box-sizing: border-box; }
.kp-mono { font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.kp-overline { margin: var(--sp-4) 0 var(--sp-2); font-size: var(--fs-overline); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-secondary); }
.kp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── BottomNav (Main.dc.html) ── */
.kp-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  max-width: var(--content-max); margin: 0 auto;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding: var(--nav-pad-top) 0 env(safe-area-inset-bottom);
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: start;
  background: var(--glass-nav);
  -webkit-backdrop-filter: blur(var(--nav-blur)); backdrop-filter: blur(var(--nav-blur));
  border-top: 1px solid var(--border);
  box-sizing: border-box;
}
.kp-nav__btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--sp-1);
  min-width: 56px; min-height: 48px; margin: 0 auto; padding: 0;
  border: 0; background: none; cursor: pointer;
  color: var(--text-secondary); font: 500 var(--fs-nav) var(--font-text); text-decoration: none;
}
.kp-nav__btn[aria-current="page"] { color: var(--nav-active); }
.kp-nav__btn svg { fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.kp-nav__btn[aria-current="page"] .kp-nav__drop { fill: var(--accent); fill-opacity: .25; }
.kp-nav__sos-slot { display: flex; justify-content: center; }
.kp-nav__sos {
  display: flex; align-items: center; justify-content: center;
  width: var(--sos-btn); height: var(--sos-btn); margin-top: calc(-1 * var(--sos-lift));
  border: 0; border-radius: var(--r-full); cursor: pointer;
  background: var(--danger); color: var(--on-primary);
  font: 700 var(--fs-sos) var(--font-text);
  box-shadow: var(--sos-btn-shadow);
}

/* ── ScreenHeader ── */
.kp-header {
  position: sticky; top: 0; z-index: 40;
  display: grid; grid-template-columns: 44px 1fr minmax(44px, auto); align-items: center;
  min-height: var(--header-h);
  margin: 0 calc(-1 * var(--gutter));
  padding: calc(env(safe-area-inset-top) + var(--sp-2)) var(--sp-3) var(--sp-1) var(--sp-2);
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
  border-bottom: 1px solid transparent;
}
.kp-header.is-compact {
  background: var(--glass-nav);
  -webkit-backdrop-filter: blur(var(--nav-blur)); backdrop-filter: blur(var(--nav-blur));
  border-bottom-color: var(--border);
}
.kp-header__back {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0; border: 0; border-radius: var(--r-full);
  background: none; color: var(--accent-light); cursor: pointer;
}
.kp-header__back svg { fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.kp-header__title { margin: 0; text-align: center; font-size: var(--fs-header-title); font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kp-header--large .kp-header__title { opacity: 0; transform: translateY(4px); transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease); }
.kp-header--large.is-compact .kp-header__title { opacity: 1; transform: none; }
.kp-header__right { display: flex; justify-content: flex-end; align-items: center; min-width: 44px; }
.kp-title-lg { margin: var(--sp-2) 0 var(--sp-4); font-size: var(--fs-screen-title); font-weight: 700; letter-spacing: -.01em; }
.kp-sentinel { height: 1px; margin-bottom: -1px; }

/* ── Card ── */
.kp-card {
  display: block; padding: var(--sp-4);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-l);
  box-shadow: var(--card-shadow); color: var(--text); text-decoration: none;
}
.kp-card--active { border-color: var(--accent-light-a30); }
.kp-card__title { margin: 0 0 var(--sp-2); font-size: var(--fs-card-title); font-weight: 600; }

/* ── Button ── */
.kp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  min-height: var(--control-h); padding: 0 var(--sp-6);
  border: 1px solid transparent; border-radius: var(--r-full);
  font: 600 var(--fs-card-title) var(--font-text); text-decoration: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.kp-btn--cta { min-height: var(--cta-h); width: 100%; }
.kp-btn--primary { background: var(--accent); color: var(--on-accent); }
.kp-btn--secondary { background: transparent; border-color: var(--border); color: var(--text); }
.kp-btn--ghost { background: transparent; color: var(--accent-light); }
.kp-btn:disabled, .kp-btn[aria-disabled="true"] { background: var(--bg-alt); border-color: var(--border); color: var(--text-secondary); cursor: not-allowed; }
.kp-btn:focus-visible, .kp-chip:focus-visible, .kp-switch:focus-visible, .kp-seg__opt:focus-visible, .kp-key:focus-visible, .kp-nav__btn:focus-visible, .kp-header__back:focus-visible {
  outline: 2px solid var(--accent-light); outline-offset: 2px;
}

/* ── Chip / ChipToggle ── */
.kp-chips { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.kp-chip {
  min-height: var(--chip-h); padding: 0 var(--sp-4);
  border: 1px solid var(--border); border-radius: var(--r-full);
  background: transparent; color: var(--text); font: 500 var(--fs-label) var(--font-text);
  cursor: pointer; white-space: nowrap;
}
.kp-chip[aria-pressed="true"] { background: var(--accent-a15); border-color: var(--accent); color: var(--accent-light); }

/* ── Switch 52×32 ── */
.kp-switch {
  position: relative; flex-shrink: 0;
  width: var(--switch-w); height: var(--switch-h); padding: 0;
  border: 0; border-radius: var(--r-full); background: var(--border); cursor: pointer;
}
.kp-switch::before { content: ""; position: absolute; inset: -6px 0; } /* тап-зона 44 px */
.kp-switch__knob {
  position: absolute; top: 3px; left: 3px;
  width: var(--switch-knob); height: var(--switch-knob); border-radius: var(--r-full);
  background: var(--text-secondary);
  transition: transform var(--dur) var(--ease);
}
.kp-switch[aria-checked="true"] { background: var(--accent); }
.kp-switch[aria-checked="true"] .kp-switch__knob { transform: translateX(20px); background: var(--on-primary); }
.kp-switch:disabled { opacity: .5; cursor: not-allowed; }
.kp-row { display: flex; align-items: center; gap: var(--sp-3); min-height: var(--control-h); padding: var(--sp-3) var(--sp-4); }
.kp-row + .kp-row { border-top: 1px solid var(--border); }

/* ── Segmented ── */
.kp-seg { display: flex; gap: var(--sp-1); padding: var(--sp-1); border-radius: var(--r-full); background: var(--bg-alt); border: 1px solid var(--border); }
.kp-seg__opt { flex: 1; min-height: var(--tap-min); border: 0; border-radius: var(--r-full); background: transparent; color: var(--text-secondary); font: 500 var(--fs-label) var(--font-text); cursor: pointer; }
.kp-seg__opt[aria-checked="true"] { background: var(--accent-a15); color: var(--accent-light); font-weight: 600; }

/* ── BottomSheet ── */
.kp-sheet-root { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; justify-content: center; }
.kp-sheet-scrim { position: absolute; inset: 0; background: var(--sheet-scrim); animation: kp-fade var(--dur) var(--ease); }
.kp-sheet {
  position: relative; width: 100%; max-width: var(--content-max); max-height: 90dvh; overflow: auto;
  display: flex; flex-direction: column; gap: var(--sp-3);
  padding: var(--sp-px10, 10px) var(--gutter) calc(28px + env(safe-area-inset-bottom));
  background: var(--surface); color: var(--text);
  border-top: 1px solid var(--border); border-radius: var(--r-l) var(--r-l) 0 0;
  box-shadow: var(--sheet-shadow);
  animation: kp-sheet-in var(--dur) var(--ease);
  touch-action: pan-y;
}
.kp-sheet.is-closing { transform: translateY(100%); transition: transform var(--dur) var(--ease); }
.kp-sheet:focus { outline: none; } /* программный фокус для ловушки — без рамки (фаза 2, progress) */
.kp-sheet__handle { align-self: center; width: 40px; height: 4px; border-radius: var(--r-full); background: var(--border); flex-shrink: 0; }
.kp-sheet__handle-hit { align-self: stretch; display: flex; justify-content: center; padding: var(--sp-2) 0; margin: calc(-1 * var(--sp-2)) 0 0; cursor: grab; touch-action: none; }
.kp-sheet__title { margin: 0; font-size: var(--fs-sheet-title); font-weight: 600; }

/* ── ProgressDots / StepProgress ── */
.kp-dots { display: flex; justify-content: center; gap: var(--sp-2); }
.kp-dots__dot { width: var(--dot-size); height: var(--dot-size); border-radius: var(--r-full); background: var(--border); transition: transform var(--dur) var(--ease), background-color var(--dur) var(--ease); }
.kp-dots__dot.is-active { background: var(--accent); transform: scaleX(1.5); }
.kp-steps { flex: 1; display: flex; gap: 5px; }
.kp-steps__seg { flex: 1; height: var(--step-seg-h); border-radius: var(--r-full); background: var(--border); }
.kp-steps__seg.is-done { background: var(--accent); }
.kp-steps__seg.is-current { background: var(--accent-light); }

/* ── CodeCells (поведение — widgets/otp_input.js) ── */
.kp-code { display: flex; justify-content: center; gap: var(--sp-3); }
.kp-code__cell {
  display: flex; align-items: center; justify-content: center;
  width: var(--code-cell-w); height: var(--code-cell-h);
  border: 1.5px solid var(--border); border-radius: var(--r-m); background: var(--bg-alt);
  font: 700 var(--fs-code) var(--font-num); font-variant-numeric: tabular-nums; color: var(--text);
}
.kp-code--6 { gap: var(--sp-2); }
.kp-code--6 .kp-code__cell { width: var(--code-cell-w6); height: var(--code-cell-h6); font-size: var(--fs-code6); }
.kp-code__cell:not(:empty) { border-color: var(--accent); background: var(--accent-a12); }
.kp-code__cell.auth-code-cell--active { border-color: var(--accent-light); box-shadow: 0 0 0 4px var(--accent-a15); }
.kp-code:focus-within .kp-code__cell.auth-code-cell--active:empty::after { content: ""; width: 2px; height: 30px; background: var(--accent-light); animation: kp-caret 1s steps(1) infinite; }
.kp-code__cell.auth-code-cell--error { border-color: var(--danger); }
.kp-code.shake { animation: kp-shake var(--dur) var(--ease); }
@keyframes kp-shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

/* ── Keypad (Pin.dc.html) ── */
.kp-keypad { display: grid; grid-template-columns: repeat(3, var(--key-size)); justify-content: center; gap: var(--sp-4) var(--sp-6); }
.kp-key {
  display: flex; align-items: center; justify-content: center; justify-self: center;
  width: var(--key-size); height: var(--key-size);
  border: 1px solid var(--border); border-radius: var(--r-full); background: var(--surface-sos);
  color: var(--text); font: 600 var(--fs-key) var(--font-num); cursor: pointer;
}
.kp-key--ghost { border-color: transparent; background: transparent; }
.kp-key svg { fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* ── Toast ── */
.kp-toast-host { position: fixed; left: 50%; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + var(--sp-3)); z-index: 120; width: calc(100% - 2 * var(--gutter)); max-width: calc(var(--content-max) - 2 * var(--gutter)); transform: translateX(-50%); display: flex; flex-direction: column; gap: var(--sp-2); pointer-events: none; }
.kp-toast {
  display: flex; align-items: center; gap: var(--sp-3); min-height: var(--control-h); padding: var(--sp-2) var(--sp-4);
  border: 1px solid var(--border); border-radius: var(--r-m); background: var(--surface); color: var(--text);
  box-shadow: var(--toast-shadow); font-size: var(--fs-label); pointer-events: auto;
  animation: kp-in-up var(--dur) var(--ease);
}
.kp-toast__text { flex: 1; }
.kp-toast.is-leaving { opacity: 0; transition: opacity var(--dur) var(--ease); }

/* ── OfflineBar ── */
.kp-offline {
  position: fixed; top: 0; left: 0; right: 0; z-index: 110;
  max-width: var(--content-max); margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + var(--sp-1)) var(--gutter) var(--sp-1);
  display: flex; align-items: center; justify-content: center; gap: var(--sp-2);
  background: var(--bg-alt); color: var(--text-secondary); border-bottom: 1px solid var(--border);
  font-size: var(--fs-caption); transform: translateY(-100%); transition: transform var(--dur) var(--ease);
}
.kp-offline.is-on { transform: none; }
.kp-offline svg { fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; }

/* ── Skeleton (анимация — motion.css .kp-skeleton) ── */
.kp-skel-stack { display: flex; flex-direction: column; gap: var(--sp-3); }
.kp-skel-row { display: flex; gap: var(--sp-3); }

/* ── EmptyState ── */
.kp-empty { display: flex; flex-direction: column; align-items: center; gap: var(--sp-2); padding: var(--sp-6) var(--sp-4); text-align: center; }
.kp-empty__drop { overflow: visible; }
.kp-empty__drop path { fill: var(--accent-light); animation: kp-empty-drop 3s var(--ease) infinite; }
.kp-empty__text { margin: 0; font-size: var(--fs-caption); color: var(--text-secondary); }
.kp-empty .kp-btn { margin-top: var(--sp-2); }

/* ── LockedOverlay (Про) ── */
.kp-locked { position: relative; border-radius: var(--r-l); overflow: hidden; }
.kp-locked__content { filter: var(--locked-blur); pointer-events: none; user-select: none; }
.kp-locked__veil {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--sp-2);
  padding: var(--sp-4); text-align: center; background: var(--sheet-scrim); color: var(--text);
}
.kp-locked__veil svg { fill: none; stroke: var(--accent-light); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.kp-locked__text { margin: 0; font-size: var(--fs-label); }
.kp-badge-pro { padding: 2px var(--sp-2); border-radius: var(--r-full); background: var(--accent-a15); color: var(--accent-light); font-size: var(--fs-micro); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }

/* ══ Инфографика ══════════════════════════════════════════ */
.kp-ig { position: relative; display: flex; align-items: center; justify-content: center; gap: var(--sp-5); color: var(--text); }
.kp-ig svg { display: block; overflow: visible; }
.kp-ig__cap { margin: 0; font-size: var(--fs-micro); color: var(--text-secondary); text-align: center; }
.kp-ig--col { flex-direction: column; gap: var(--sp-2); }
.kp-ig-num { font-family: var(--font-num); font-weight: 800; font-variant-numeric: tabular-nums; }
.kp-ig-text { font-family: var(--font-text); font-size: var(--fs-ig-axis); }
.kp-f-accent { fill: var(--accent); } .kp-f-light { fill: var(--accent-light); } .kp-f-text { fill: var(--text); }
.kp-f-sec { fill: var(--text-secondary); } .kp-f-alt { fill: var(--bg-alt); } .kp-f-border { fill: var(--border); }
.kp-f-surface { fill: var(--surface); } .kp-f-primary { fill: var(--primary); } .kp-f-white { fill: var(--on-primary); }
.kp-f-none { fill: none; }
.kp-s-accent { stroke: var(--accent); } .kp-s-light { stroke: var(--accent-light); } .kp-s-border { stroke: var(--border); }
.kp-s-text { stroke: var(--text); }

/* Сосуд */
.kp-vessel { position: relative; width: 100%; margin: 0 auto; }
.kp-vessel--L { max-width: 390px; }
.kp-vessel--M { width: 120px; }
.kp-vessel--S { width: 24px; height: 28px; display: inline-block; vertical-align: middle; }
.kp-vessel svg { width: 100%; height: auto; }
.kp-vessel__water { transition: transform 1.2s var(--ease); }
.kp-vessel__tilt { transform-box: view-box; transform: rotate(var(--kp-tilt, 0deg)); transition: transform var(--dur) linear; }
.kp-vessel__wave { animation: kp-ripple 6s linear infinite; --period: -170px; }
.kp-vessel__wave--back { animation-duration: 9s; animation-direction: reverse; }
.kp-vessel--still .kp-vessel__wave { animation: none; }
.kp-vessel__num { position: absolute; left: 0; right: 0; top: 41.8%; display: flex; flex-direction: column; align-items: center; pointer-events: none; }
.kp-vessel__days { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: var(--fs-hero-xl); font-weight: 800; line-height: 1; letter-spacing: -.04em; color: var(--on-primary); text-shadow: var(--vessel-num-shadow); }
.kp-vessel__label { margin-top: var(--sp-1); font-size: var(--fs-card-title); font-weight: 600; color: var(--text); }
.kp-vessel--M .kp-vessel__num { top: 46%; }
.kp-vessel--M .kp-vessel__days { font-size: var(--fs-infographic); text-shadow: none; }
.kp-vessel--empty .kp-vessel__days { color: var(--text-secondary); }
.kp-vessel__pill { position: absolute; left: 0; right: 0; bottom: 2px; display: flex; justify-content: center; }
.kp-vessel__pill span { padding: 6px 14px; border-radius: var(--r-full); background: var(--glass-nav); border: 1px solid var(--border); font-size: var(--fs-caption); color: var(--text-secondary); }
.kp-vessel__fx path, .kp-vessel__fx ellipse { transform-box: fill-box; transform-origin: center; }

/* Тепловая карта */
.kp-heat { display: grid; grid-template-columns: repeat(7, 22px); gap: 5px; }
.kp-heat__c { position: relative; display: block; width: 22px; height: 22px; border-radius: var(--r-full); background: var(--bg-alt); }
.kp-heat__c--0 { background: var(--heat-0); } .kp-heat__c--1 { background: var(--heat-1); }
.kp-heat__c--2 { background: var(--heat-2); } .kp-heat__c--3 { background: var(--heat-3); }
.kp-heat__c--mid { background: var(--heat-mid); } .kp-heat__c--high { background: var(--heat-high); }
.kp-heat__c--today-empty { background: var(--accent-a15); }
.kp-heat__c--sober { background-image: var(--heat-drop); }
.kp-heat__c--today { box-shadow: 0 0 0 2px var(--accent-light); }
.kp-heat__c--relapse::after { content: ""; position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; background: var(--text-secondary); transform: rotate(45deg); }

/* До / сейчас */
.kp-bn { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.kp-bn__bars { display: flex; align-items: flex-end; gap: 6px; height: 80px; }
.kp-bn__bar { display: block; width: 22px; border-radius: var(--radius-check); background: var(--border); transform-origin: bottom; }
.kp-bn__bar--now { background: var(--accent); }
.kp-bn__l { font-size: var(--fs-small); color: var(--text-secondary); }
.kp-bn__empty { margin: 0; max-width: 240px; font-size: var(--fs-caption); color: var(--text-secondary); text-align: center; }

/* Монеты, бутылки */
.kp-coins__sum { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: var(--fs-infographic); font-weight: 800; }
.kp-coins__sub { font-size: var(--fs-small); color: var(--text-secondary); }
.kp-coins__txt { display: flex; flex-direction: column; gap: var(--sp-1); }
.kp-btl { display: grid; grid-template-columns: repeat(10, 14px); gap: 6px; }
.kp-btl__txt { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: var(--fs-label); }

/* Рост при первом появлении (ui/motion.js firstVisible) */
.kp-ig-line { stroke-dasharray: 100; --len: 100; }
.kp-ig-grow-y { transform-box: fill-box; transform-origin: bottom; }
.kp-ig-pop { transform-box: fill-box; transform-origin: center; }
.kp-pending .kp-ig-line { stroke-dashoffset: var(--len); }
.kp-pending .kp-ig-grow-y { transform: scaleY(0); }
.kp-pending .kp-ig-pop, .kp-pending .kp-ig-fade { opacity: 0; }
.kp-grow .kp-ig-line { animation: kp-draw var(--dur-grow) var(--ease) both; }
.kp-grow .kp-ig-grow-y { animation: kp-grow-y var(--dur-grow) var(--ease) both; animation-delay: calc(var(--i, 0) * 40ms); }
.kp-grow .kp-ig-pop { animation: kp-pop var(--dur-grow) var(--ease) both; }
.kp-grow .kp-ig-fade { animation: kp-fade var(--dur-grow) var(--ease) both; }

/* ══ Анимации-утилиты ══ */
.kp-digits { display: inline-flex; }
.kp-digit { position: relative; display: inline-block; overflow: hidden; vertical-align: bottom; }
.kp-digit__old { position: absolute; inset: 0; animation: kp-digit-out var(--dur) var(--ease) both; animation-delay: calc(var(--i, 0) * 40ms); }
.kp-digit__new { display: inline-block; animation: kp-digit-in var(--dur) var(--ease) both; animation-delay: calc(var(--i, 0) * 40ms); }
.kp-digits--fade { animation: kp-fade 150ms var(--ease); }

/* Сцены: веха, запечатывание капсулы */
.kp-scene {
  position: fixed; inset: 0; z-index: 200;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--sp-4);
  background: var(--bg-screen); color: var(--text); cursor: pointer; text-align: center; padding: var(--gutter);
  animation: kp-fade var(--dur) var(--ease);
}
.kp-scene svg { overflow: visible; }
.kp-scene__flash { fill: var(--accent-light); opacity: 0; animation: kp-flash 2.5s var(--ease) both; }
.kp-scene__ring { fill: none; stroke: var(--accent-light); stroke-width: 1.5; transform-box: fill-box; transform-origin: center; opacity: 0; animation: kp-ring 1.4s var(--ease) both; }
.kp-scene__name { margin: 0; font-size: var(--fs-sheet-title); font-weight: 700; }
.kp-scene__letter { display: inline-block; white-space: pre; animation: kp-letter var(--dur) var(--ease) both; animation-delay: calc(600ms + var(--i, 0) * 50ms); }
.kp-scene__line { margin: 0; max-width: 300px; color: var(--text-secondary); font-size: var(--fs-body-rd); animation: kp-fade var(--dur) var(--ease) both; animation-delay: 1.6s; }
.kp-scene__skip { position: absolute; bottom: calc(env(safe-area-inset-bottom) + var(--sp-6)); font-size: var(--fs-caption); color: var(--text-secondary); }
.kp-seal__wave { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; transform-box: fill-box; transform-origin: center; animation: kp-wave-collapse 600ms var(--ease) 200ms both; }
.kp-seal__drop { transform-box: fill-box; transform-origin: center; fill: var(--warning); animation: kp-amber 900ms var(--ease) 600ms both; }
.kp-seal__stamp { opacity: 0; animation: kp-fade var(--dur) var(--ease) 1.5s both; }
.kp-seal__stamp circle { fill: var(--primary); stroke: var(--accent-light); stroke-width: 1.5; }
.kp-seal__stamp path { stroke: var(--accent-light); stroke-width: 1.5; stroke-linecap: round; }
.kp-scene.is-final * { animation: none !important; opacity: 1; }
.kp-scene.is-final .kp-scene__flash, .kp-scene.is-final .kp-scene__ring, .kp-scene.is-final .kp-seal__wave { opacity: 0; }

/* Капля дня (dailyDropScene) */
.kp-drop-fall { animation: kp-drop-fall 1.2s var(--ease) both; }
.kp-drop-ring { fill: none; stroke: var(--accent-light); stroke-width: 1.5; transform-box: fill-box; transform-origin: center; opacity: 0; animation: kp-ring 800ms var(--ease) 900ms both; }

/* Растекание (фолбэк без View Transitions) */
.kp-spread-in { animation: kp-fade var(--dur-spread) var(--ease); }
