/* Европротокол — стиль АПБ: Onest, мягкий серо-зелёный фон,
   зелёный градиент фирменного цвета банка, крупные скругления. Анимации — пружинные, короткие, отключаются при reduce-motion. */
:root {
  --bg: #F1F6F3;
  --card: #FFFFFF;
  --ink: #102019;
  --ink-2: #273A31;
  --muted: #56685F;
  --faint: #85958D;
  --line: #E0E9E4;
  --line-2: #ECF2EE;
  --chip: #EDF3EF;
  --accent: #0F8546;
  --accent-2: #0A6E3A;
  --accent-soft: #E3F3E9;
  --g1: #1BA35A;
  --g2: #0A6E3A;
  --grad: linear-gradient(140deg, var(--g1) 0%, var(--g2) 100%);
  --mesh: radial-gradient(120% 90% at 100% 0%, rgba(184, 240, 120, .38) 0%, transparent 55%), radial-gradient(90% 80% at 0% 100%, rgba(0, 60, 40, .35) 0%, transparent 60%);
  --ok: #17703F;
  --ok-soft: #E3F5EA;
  --warn: #9A4A00;
  --warn-soft: #FFF6E8;
  --warn-line: #F3D7A6;
  --warn-tile: #FFE6BF;
  --bad: #B42318;
  --bad-soft: #FDECEC;
  --bad-line: #F2C9C5;
  --shadow: 0 1px 2px rgba(16, 32, 25, .04), 0 8px 24px rgba(16, 32, 25, .06);
  --shadow-lg: 0 18px 40px rgba(10, 110, 58, .24);
  --btn-shadow: 0 8px 20px rgba(10, 110, 58, .24);
  --glass: rgba(241, 246, 243, .8);
  --car-body: #DAE5DF;
  --car-panel: #FFFFFF;
  --car-panel-2: #F2F7F4;
  --car-glass: #C3E2D0;
  --car-tyre: #273A31;
  --spring: cubic-bezier(.2, .9, .25, 1.15);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --r-xl: 28px;
  --r-lg: 24px;
  --r-md: 16px;
  --r-sm: 14px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0A110D;
  --card: #131C17;
  --ink: #ECF3EF;
  --ink-2: #CFDBD4;
  --muted: #97A89F;
  --faint: #6B7A72;
  --line: #233029;
  --line-2: #1B2520;
  --chip: #19231E;
  --accent: #3DC47D;
  --accent-2: #2DAE69;
  --accent-soft: #12281C;
  --g1: #1E9C57;
  --g2: #0B6A39;
  --mesh: radial-gradient(120% 90% at 100% 0%, rgba(140, 220, 90, .22) 0%, transparent 55%), radial-gradient(90% 80% at 0% 100%, rgba(0, 0, 0, .35) 0%, transparent 60%);
  --ok: #43C27A;
  --ok-soft: #12271B;
  --warn: #F2A64B;
  --warn-soft: #2A2114;
  --warn-line: #4A3819;
  --warn-tile: #3A2C14;
  --bad: #FF6B5E;
  --bad-soft: #2C1515;
  --bad-line: #4E2321;
  --shadow: none;
  --shadow-lg: 0 18px 40px rgba(0, 0, 0, .45);
  --btn-shadow: 0 8px 20px rgba(0, 0, 0, .35);
  --glass: rgba(10, 17, 13, .8);
  --car-body: #25312B;
  --car-panel: #1E2823;
  --car-panel-2: #18211C;
  --car-glass: #285640;
  --car-tyre: #060A08;
  color-scheme: dark;
}

[hidden] { display: none !important; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body {
  font: 15px/1.45 "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { flex: none; }
#app { max-width: 560px; margin: 0 auto; padding: 0 16px calc(120px + env(safe-area-inset-bottom)); }

/* ------------------------------------------------------------------ появление экранов */
#app[data-anim] .view > * { animation: in-fwd .5s var(--ease) both; }
#app[data-anim="back"] .view > * { animation-name: in-back; }
#app[data-anim] .view > *:nth-child(2) { animation-delay: .04s; }
#app[data-anim] .view > *:nth-child(3) { animation-delay: .08s; }
#app[data-anim] .view > *:nth-child(4) { animation-delay: .12s; }
#app[data-anim] .view > *:nth-child(5) { animation-delay: .16s; }
#app[data-anim] .view > *:nth-child(6) { animation-delay: .2s; }
#app[data-anim] .view > *:nth-child(n+7) { animation-delay: .24s; }
@keyframes in-fwd { from { opacity: 0; transform: translate3d(24px, 0, 0); } }
@keyframes in-back { from { opacity: 0; transform: translate3d(-24px, 0, 0); } }
@keyframes rise { from { opacity: 0; transform: translateY(10px) scale(.98); } }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .35; } }
@keyframes shimmer { from { background-position: -200% 0; } to { background-position: 200% 0; } }

/* ------------------------------------------------------------------ заставка */
.splash { height: 86vh; display: grid; place-items: center; }
.splash-mark { width: 56px; height: 56px; border-radius: 18px; background: var(--grad); box-shadow: var(--shadow-lg); animation: breathe 1.4s var(--ease) infinite; }
@keyframes breathe { 50% { transform: scale(.88); opacity: .7; } }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; display: inline-block; opacity: .8; }

/* ------------------------------------------------------------------ шапка */
.bar { display: flex; align-items: center; gap: 12px; padding: 16px 0 6px; min-height: 64px; }
.bar h1 { margin: 0; font-size: 22px; line-height: 1.15; font-weight: 700; letter-spacing: -.02em; flex: 1; }
.round { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--ink); display: grid; place-items: center; padding: 0; transition: transform .15s var(--ease); }
.round:active { transform: scale(.92); }
.steps { display: flex; gap: 6px; margin: 2px 0 0; }
.steps .stp { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; padding: 8px 0 6px; background: none; border: 0; color: var(--faint); font: inherit; font-size: 11.5px; font-weight: 600; text-align: left; -webkit-tap-highlight-color: transparent; }
.steps .stp span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .25s; }
.steps .stp.cur { color: var(--accent); }
.steps button.stp { color: var(--muted); cursor: pointer; }
.steps button.stp:active i { transform: scaleY(1.8); }
.steps button.stp:active span { color: var(--accent); }
.steps i { display: block; height: 5px; border-radius: 5px; background: var(--line); overflow: hidden; position: relative; transition: transform .2s var(--ease); }
.steps i::after { content: ""; position: absolute; inset: 0; background: var(--grad); transform: scaleX(0); transform-origin: left; animation: step-fill .6s var(--ease) forwards; animation-play-state: paused; }
.steps .done i::after, .steps .cur i::after { animation-play-state: running; }
.steps .cur i::after { animation-delay: .15s; }
.steps .done i::after { opacity: .45; }
@keyframes step-fill { to { transform: scaleX(1); } }
#app:not([data-anim]) .steps .done i::after, #app:not([data-anim]) .steps .cur i::after { animation: none; transform: scaleX(1); }
.stepline { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.stepline b { color: var(--ink); font-weight: 600; }

.title { padding: 22px 0 6px; }
.eyebrow { font-size: 13px; font-weight: 600; color: var(--accent); letter-spacing: .01em; }
.title h1 { margin: 4px 0 6px; font-size: 28px; line-height: 1.12; letter-spacing: -.025em; font-weight: 700; }
.lead { margin: 0; color: var(--muted); font-size: 15px; }
h2 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
h3 { margin: 0; font-size: 16px; font-weight: 600; }
.section-h { display: flex; justify-content: space-between; align-items: baseline; margin: 26px 2px 12px; }
.small { font-size: 13px; color: var(--muted); }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ карточки */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; margin: 12px 0; }
.card.soft { background: var(--accent-soft); border-color: transparent; }
.card.ok { background: var(--ok-soft); border-color: transparent; }
.card.warn { background: var(--warn-soft); border-color: var(--warn-line); }
.card.bad { background: var(--card); border-color: var(--bad-line); }
.card.tight { padding: 4px 18px; }
.hero { position: relative; overflow: hidden; background: var(--mesh), var(--grad); background-size: 160% 160%, 100% 100%; animation: mesh-drift 14s ease-in-out infinite alternate; color: #fff; border-radius: var(--r-xl); padding: 22px; margin: 12px 0; box-shadow: var(--shadow-lg); isolation: isolate; }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .09); z-index: -1; }
.hero::before { width: 240px; height: 240px; right: -80px; top: -110px; }
.hero::after { width: 160px; height: 160px; right: 40px; bottom: -110px; background: rgba(255, 255, 255, .06); }
.hero .lead { color: rgba(255, 255, 255, .86); }
.hero h2 { color: #fff; font-size: 24px; letter-spacing: -.02em; }
.tile { width: 48px; height: 48px; border-radius: var(--r-sm); background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.tile.bad { background: var(--bad-soft); color: var(--bad); }
.tile.warn { background: var(--warn-tile); color: var(--warn); }
.tile.ok { background: var(--ok-soft); color: var(--ok); }
.tile.glass { background: rgba(255, 255, 255, .18); color: #fff; }

.row { display: flex; align-items: center; gap: 14px; padding: 14px 0; width: 100%; background: none; border: 0; text-align: left; color: inherit; }
.row + .row { border-top: 1px solid var(--line-2); }
.row .body { flex: 1; min-width: 0; }
.row .t { font-size: 16px; font-weight: 600; }
.row .s { font-size: 13px; color: var(--muted); margin-top: 2px; overflow-wrap: anywhere; }
.row .chev { color: var(--faint); }
.row > .pill { flex: none; max-width: 46%; white-space: normal; text-align: center; line-height: 1.25; }
.kv { display: flex; justify-content: space-between; gap: 14px; padding: 11px 0; font-size: 15px; }
.kv + .kv { border-top: 1px solid var(--line-2); }
.kv .k { color: var(--muted); flex: 0 0 40%; }
.kv .v { text-align: right; font-weight: 500; overflow-wrap: anywhere; }

/* ------------------------------------------------------------------ кнопки */
.btn { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 54px; border: 0; border-radius: var(--r-md); padding: 0 18px; font-weight: 600; font-size: 16px; background: var(--grad); color: #fff; text-decoration: none; transition: transform .18s var(--spring), opacity .2s, box-shadow .2s; box-shadow: var(--btn-shadow); }
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .4; pointer-events: none; box-shadow: none; }
.btn.white { background: #fff; color: var(--accent-2); box-shadow: none; }
.btn.light { background: var(--card); color: var(--ink); border: 1.5px solid var(--line); box-shadow: none; }
.btn.soft { background: var(--accent-soft); color: var(--accent-2); box-shadow: none; }
.btn.danger { background: var(--bad); box-shadow: 0 8px 20px rgba(180, 35, 24, .22); }
.btn.danger-line { background: var(--card); color: var(--bad); border: 1.5px solid var(--bad-line); box-shadow: none; }
.btn.ghost { background: none; color: var(--accent); box-shadow: none; min-height: 46px; }
.btn.sm { min-height: 44px; font-size: 15px; border-radius: 14px; width: auto; padding: 0 16px; }
.btn + .btn { margin-top: 10px; }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn-row .btn + .btn { margin-top: 0; }
.link { background: none; border: 0; padding: 4px 0; color: var(--accent); font-weight: 600; font-size: 15px; }

.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--glass); -webkit-backdrop-filter: blur(18px) saturate(1.6); backdrop-filter: blur(18px) saturate(1.6); border-top: 1px solid var(--line-2); }
#app[data-anim] .dock { animation: dock-in .45s var(--ease) both; }
@keyframes dock-in { from { transform: translateY(100%); } }
.dock .inner { max-width: 560px; margin: 0 auto; }
.dock .hint { font-size: 13px; color: var(--muted); text-align: center; margin: 0 0 8px; }

/* ------------------------------------------------------------------ выбор */
.choice { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r-lg); padding: 16px; margin: 10px 0; transition: border-color .2s, background .2s, transform .18s var(--spring); }
.choice:active { transform: scale(.98); }
.choice .t { font-size: 16px; font-weight: 600; display: block; }
.choice .s { font-size: 13px; color: var(--muted); }
.choice.on { border-color: var(--accent); background: var(--accent-soft); }
.choice .tick { margin-left: auto; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; color: #fff; transition: all .25s var(--spring); flex: none; }
.choice.on .tick { background: var(--accent); border-color: var(--accent); transform: scale(1.05); }
.choice .tick svg { opacity: 0; transform: scale(.4); transition: all .25s var(--spring); }
.choice.on .tick svg { opacity: 1; transform: none; }

.roles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.role { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; text-align: left; padding: 16px; border-radius: var(--r-lg); border: 1.5px solid var(--line); background: var(--card); min-height: 132px; transition: all .25s var(--ease); overflow: hidden; }
.role .t { font-weight: 700; font-size: 16px; }
.role .s { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.role.on { border-color: transparent; background: var(--grad); color: #fff; box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.role.on .s { color: rgba(255, 255, 255, .85); }
.role.on .tile { background: rgba(255, 255, 255, .2); color: #fff; }
.role .who { position: absolute; top: 12px; right: 12px; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: var(--chip); color: var(--muted); }
.role.on .who { background: rgba(255, 255, 255, .22); color: #fff; }

.seg { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--chip); border-radius: 14px; padding: 4px; }
.seg .thumb { position: absolute; top: 4px; bottom: 4px; left: 4px; border-radius: 11px; background: var(--card); box-shadow: 0 1px 3px rgba(18, 24, 38, .12); transition: transform .35s var(--spring), opacity .2s; z-index: 0; }
.seg button { position: relative; z-index: 1; border: 0; background: none; padding: 10px 6px; font-size: 14px; font-weight: 600; color: var(--muted); border-radius: 11px; transition: color .2s; display: flex; align-items: center; justify-content: center; gap: 6px; }
.seg button.on { color: var(--ink); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1.5px solid var(--line); background: var(--card); border-radius: 999px; padding: 9px 14px; font-size: 14px; font-weight: 500; text-align: left; transition: all .22s var(--spring); }
.chip:active { transform: scale(.95); }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip.more { color: var(--accent); border-style: dashed; }

/* ------------------------------------------------------------------ поля */
.field { position: relative; display: block; margin: 10px 0 0; }
.field input, .field textarea { width: 100%; border: 1.5px solid var(--line); background: var(--card); border-radius: var(--r-md); padding: 24px 16px 9px; font-size: 17px; font-weight: 500; outline: none; transition: border-color .2s, box-shadow .2s; }
.field textarea { min-height: 112px; resize: vertical; line-height: 1.45; font-weight: 400; font-size: 16px; }
.field span { position: absolute; left: 17px; top: 17px; font-size: 16px; color: var(--faint); pointer-events: none; transition: all .2s var(--ease); }
.field input:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.field input:focus + span, .field input:not(:placeholder-shown) + span,
.field textarea:focus + span, .field textarea:not(:placeholder-shown) + span { top: 8px; font-size: 12px; color: var(--muted); font-weight: 500; }
.field input.caps { text-transform: uppercase; letter-spacing: .06em; }
.field input[type="datetime-local"] { padding-top: 24px; min-height: 58px; }
.otp { width: 100%; border: 1.5px solid var(--line); background: var(--card); border-radius: var(--r-md); padding: 16px; font-size: 32px; font-weight: 700; letter-spacing: .6em; text-align: center; outline: none; font-variant-numeric: tabular-nums; transition: border-color .2s, box-shadow .2s; }
.otp:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.demo { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; background: var(--warn-soft); color: var(--warn); border-radius: 10px; padding: 6px 10px; margin-top: 10px; }

.check { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0 4px; cursor: pointer; }
.check input { appearance: none; -webkit-appearance: none; width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--line); flex: none; margin: 0; display: grid; place-items: center; transition: all .25s var(--spring); background: var(--card); }
.check input::after { content: ""; width: 12px; height: 7px; border-left: 2.5px solid #fff; border-bottom: 2.5px solid #fff; transform: rotate(-45deg) scale(0); transition: transform .25s var(--spring); margin-top: -3px; }
.check input:checked { background: var(--accent); border-color: var(--accent); }
.check input:checked::after { transform: rotate(-45deg) scale(1); }

/* ------------------------------------------------------------------ статусы */
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; padding: 5px 10px; border-radius: 999px; background: var(--chip); color: var(--muted); white-space: nowrap; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.accent { background: var(--accent-soft); color: var(--accent-2); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.glass { background: rgba(255, 255, 255, .18); color: #fff; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: pulse 1.3s ease-in-out infinite; }

.checks { display: flex; flex-direction: column; gap: 2px; }
.ck { display: flex; align-items: center; gap: 12px; padding: 10px 0; font-size: 15px; animation: rise .4s var(--ease) both; }
.ck .ic { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--chip); color: var(--muted); flex: none; transition: all .3s var(--spring); }
.ck.done .ic { background: var(--ok); color: #fff; animation: pop .45s var(--spring) both; }
.ck.fail .ic { background: var(--bad); color: #fff; }

ul.miss { list-style: none; padding: 0; margin: 8px 0 0; }
ul.miss li { display: flex; align-items: center; gap: 10px; padding: 9px 0; font-size: 14.5px; }
ul.miss li + li { border-top: 1px solid var(--line-2); }
ul.miss li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--bad); flex: none; }
ul.miss li span { flex: 1; }

/* ------------------------------------------------------------------ QR */
.qr-wrap { position: relative; width: 212px; height: 212px; margin: 6px auto 0; border-radius: 22px; background: #fff; padding: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, .18); }
.qr-wrap img { width: 100%; height: 100%; image-rendering: pixelated; display: block; opacity: 0; transition: opacity .4s; }
.qr-wrap img.ready { opacity: 1; }
.qr-wrap .scan { position: absolute; left: 10px; right: 10px; height: 3px; top: 10px; border-radius: 3px; background: linear-gradient(90deg, transparent, var(--accent), transparent); box-shadow: 0 0 14px var(--accent); animation: scan 2.4s ease-in-out infinite; }
@keyframes scan { 50% { top: calc(100% - 13px); } }
.code-big { font-size: 34px; font-weight: 800; letter-spacing: .2em; text-align: center; font-variant-numeric: tabular-nums; margin: 14px 0 2px; }
.duo { display: flex; align-items: center; justify-content: center; gap: 0; margin: 4px 0 10px; }
.ava { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 18px; background: rgba(255, 255, 255, .2); color: #fff; border: 3px solid rgba(255, 255, 255, .35); }
#app[data-anim] .ava { animation: pop .5s var(--spring) both; }
.ava + .link-line { width: 46px; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .5); transform-origin: left; }
#app[data-anim] .link-line { animation: grow .5s .2s var(--ease) both; }
#app[data-anim] .link-line + .ava { animation-delay: .4s; }
@keyframes grow { from { transform: scaleX(0); } }

/* ------------------------------------------------------------------ модели ТС */
.stage { position: relative; display: grid; place-items: center; padding: 6px 0 2px; }
.car { display: block; width: 100%; max-width: 290px; height: auto; max-height: 46vh; margin: 0 auto; overflow: visible; touch-action: manipulation; }
.car .shadow { fill: rgba(18, 24, 38, .10); filter: blur(8px); }
.car .body { fill: var(--car-body); }
.car .panel { fill: var(--car-panel); }
.car .panel-2 { fill: var(--car-panel-2); }
.car .glass { fill: var(--car-glass); }
.car .tyre { fill: var(--car-tyre); }
.car .light { fill: #FFF3C4; }
.car .tail { fill: #F5B8B2; }
.car .line { fill: none; stroke: var(--line); stroke-width: 1.2; }
.car .lbl { font: 600 10px "Onest", sans-serif; fill: var(--faint); text-anchor: middle; letter-spacing: .08em; text-transform: uppercase; }

.vt { transform-box: fill-box; transform-origin: center; transition: opacity .45s var(--ease), transform .55s var(--spring); }
.vt:not(.show) { opacity: 0; transform: scale(.8) translateY(14px); pointer-events: none; }

.arrow { cursor: pointer; }
.arrow .hit-area { fill: transparent; }
.arrow .disc { fill: var(--card); stroke: var(--line); stroke-width: 1.5; transition: fill .25s, stroke .25s; filter: drop-shadow(0 3px 6px rgba(18, 24, 38, .08)); }
.arrow .glyph { fill: var(--ink-2); transition: fill .25s; }
.arrow .mover { transition: transform .45s var(--spring); }
.arrow.on .disc { fill: url(#gradA); stroke: transparent; }
.arrow.on .glyph { fill: #fff; }
.arrow.on .mover { transform: translate(var(--dx), var(--dy)); }
.impact-ring { fill: none; stroke: var(--bad); stroke-width: 2.5; opacity: 0; transform-box: fill-box; transform-origin: center; }
.impact-ring.on { animation: ring 1.8s var(--ease) infinite; }
.impact-dot { fill: var(--bad); opacity: 0; transition: opacity .3s; }
.impact-dot.on { opacity: 1; }
@keyframes ring { 0% { opacity: .9; transform: scale(.4); } 100% { opacity: 0; transform: scale(2.4); } }

.part { fill: var(--car-panel); stroke: var(--car-body); stroke-width: 1.6; cursor: pointer; transition: fill .3s var(--ease), stroke .3s; }
.part.glassy { fill: var(--car-glass); }
.part.tyre { fill: var(--car-tyre); }
.part.on { fill: var(--bad); stroke: #8F1C13; }
.part.ai:not(.on) { fill: var(--warn-tile); stroke: var(--warn); stroke-dasharray: 4 3; animation: ai-glow 1.6s ease-in-out infinite; }
.part.fresh { animation: part-pop .7s var(--spring) both; }
@keyframes part-pop { 0% { fill: var(--car-panel); } 40% { fill: #FF8A7F; } }
@keyframes ai-glow { 50% { fill-opacity: .55; } }
.part:active { filter: brightness(.94); }

.legend { display: flex; gap: 14px; justify-content: center; font-size: 12.5px; color: var(--muted); margin-top: 6px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; vertical-align: -2px; margin-right: 6px; }

/* ------------------------------------------------------------------ фото */
.shot-now { display: flex; gap: 16px; align-items: center; }
.shot-now .pic { width: 92px; height: 92px; border-radius: 22px; background: rgba(255, 255, 255, .16); display: grid; place-items: center; flex: none; }
.shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.shot { position: relative; aspect-ratio: 1; border-radius: 18px; border: 1.5px dashed var(--line); background: var(--card); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 8px; color: var(--faint); font-size: 12px; font-weight: 500; text-align: center; line-height: 1.2; overflow: hidden; transition: transform .18s var(--spring), border-color .2s; }
.shot:active { transform: scale(.96); }
.shot.req { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.shot.has { border: 0; padding: 0; }
.shot.new { animation: pop .5s var(--spring) both; }
.shot.has img { width: 100%; height: 100%; object-fit: cover; }
.shot .badge { position: absolute; left: 6px; bottom: 6px; }
.shot .badge .pill { font-size: 11px; padding: 3px 8px; }
.shot .cap { position: absolute; left: 0; right: 0; top: 0; padding: 6px 8px 14px; font-size: 11px; color: #fff; text-align: left; background: linear-gradient(rgba(0, 0, 0, .5), transparent); }
.shot.loading::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent); background-size: 200% 100%; animation: shimmer 1.1s linear infinite; }

/* ------------------------------------------------------------------ оценка */
.est { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.est .sum { font-size: 32px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1; }
.meter { position: relative; height: 8px; border-radius: 8px; background: var(--chip); margin: 14px 0 6px; overflow: hidden; }
.meter i { position: absolute; top: 0; bottom: 0; border-radius: 8px; background: var(--grad); transition: left .6s var(--ease), width .6s var(--ease); }
table.items { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 8px; }
table.items td { padding: 9px 0; border-top: 1px solid var(--line-2); vertical-align: top; }
table.items td:last-child { text-align: right; white-space: nowrap; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ сводка */
details.acc { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); margin: 10px 0; overflow: hidden; interpolate-size: allow-keywords; }
details.acc summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 16px 18px; cursor: pointer; }
details.acc summary::-webkit-details-marker { display: none; }
details.acc summary .chev { margin-left: auto; color: var(--faint); transition: transform .3s var(--ease); }
details.acc[open] summary .chev { transform: rotate(180deg); }
details.acc::details-content { block-size: 0; overflow: hidden; transition: block-size .35s var(--ease), content-visibility .35s allow-discrete; }
details.acc[open]::details-content { block-size: auto; }
details.acc .in { padding: 0 18px 14px; }
.quote { background: var(--chip); border-radius: 16px; padding: 12px 14px; font-size: 14.5px; white-space: pre-wrap; }

/* ------------------------------------------------------------------ итог */
.done-hero { text-align: center; padding: 30px 0 8px; }
.seal { width: 96px; height: 96px; margin: 0 auto 18px; }
.seal circle { fill: none; stroke-width: 5; }
.seal .bg { stroke: var(--line); }
.seal .fg { stroke: var(--ok); stroke-dasharray: 289; stroke-dashoffset: 289; animation: draw 0.8s .1s var(--ease) forwards; transform: rotate(-90deg); transform-origin: center; }
.seal path { fill: none; stroke: var(--ok); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw .45s .75s var(--ease) forwards; }
.seal.bad .fg, .seal.bad path { stroke: var(--bad); }
.seal.muted .fg, .seal.muted path { stroke: var(--faint); }
@keyframes draw { to { stroke-dashoffset: 0; } }
.dtp-no { display: inline-block; font-size: 22px; font-weight: 800; letter-spacing: .02em; font-variant-numeric: tabular-nums; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 8px 14px; margin-top: 8px; }

.tl { display: flex; flex-direction: column; }
.tl .st { display: flex; gap: 14px; }
.tl .rail { display: flex; flex-direction: column; align-items: center; width: 24px; }
.tl .node { width: 24px; height: 24px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; }
#app[data-anim] .tl .node { animation: pop .4s var(--spring) both; }
.tl .node.cur { background: var(--card); border: 6px solid var(--accent); }
.tl .bar-v { width: 2px; flex: 1; min-height: 20px; background: var(--ok); }
.tl .txt { padding-bottom: 18px; }
.tl .st:last-child .txt { padding-bottom: 0; }

/* ------------------------------------------------------------------ тосты и листы */
.toast { position: fixed; left: 50%; top: calc(12px + env(safe-area-inset-top)); transform: translateX(-50%); max-width: calc(100% - 32px); z-index: 60; background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: 16px; font-size: 14.5px; font-weight: 500; box-shadow: 0 12px 32px rgba(0, 0, 0, .2); animation: toast-in .35s var(--spring) both; }
.toast.bad { background: var(--bad); color: #fff; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, -16px) scale(.96); } }
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(13, 17, 24, .42); display: flex; align-items: flex-end; justify-content: center; animation: fade .25s both; }
@keyframes fade { from { opacity: 0; } }
.sheet { width: 100%; max-width: 560px; background: var(--card); border-radius: 28px 28px 0 0; padding: 10px 18px calc(22px + env(safe-area-inset-bottom)); animation: sheet .4s var(--spring) both; }
.sheet .grab { width: 40px; height: 5px; border-radius: 5px; background: var(--line); margin: 0 auto 16px; }
@keyframes sheet { from { transform: translateY(100%); } }

/* ------------------------------------------------------------------ камера в приложении */
.cam { position: fixed; inset: 0; z-index: 70; background: #000; color: #fff; overflow: hidden; animation: fade .25s both; }
.cam video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cam-top { position: absolute; left: 0; right: 0; top: 0; padding: calc(12px + env(safe-area-inset-top)) 14px 22px; display: flex; align-items: flex-start; gap: 12px; background: linear-gradient(rgba(0, 0, 0, .6), transparent); }
.cam-title { flex: 1; text-align: center; padding-top: 2px; }
.cam-title b { display: block; font-size: 17px; font-weight: 700; }
.cam-title span { display: block; font-size: 13px; opacity: .85; margin-top: 2px; }
.cam .glass { width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .16); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); color: #fff; display: grid; place-items: center; flex: none; transition: transform .15s var(--ease), background .2s; }
.cam .glass:active { transform: scale(.9); }
.cam .glass.on { background: #FFD43B; color: #121826; }
.cam .glass.ghost { visibility: hidden; }
.cam-frame { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); border-radius: 18px; box-shadow: 0 0 0 200vmax rgba(0, 0, 0, .38); transition: width .4s var(--spring), height .4s var(--spring), border-radius .3s; pointer-events: none; }
.cam-frame::before, .cam-frame::after { content: ""; position: absolute; inset: -2px; border-radius: inherit; border: 3px solid #fff; -webkit-mask: linear-gradient(#000 0 0) top left / 34px 34px no-repeat, linear-gradient(#000 0 0) top right / 34px 34px no-repeat, linear-gradient(#000 0 0) bottom left / 34px 34px no-repeat, linear-gradient(#000 0 0) bottom right / 34px 34px no-repeat; mask: linear-gradient(#000 0 0) top left / 34px 34px no-repeat, linear-gradient(#000 0 0) top right / 34px 34px no-repeat, linear-gradient(#000 0 0) bottom left / 34px 34px no-repeat, linear-gradient(#000 0 0) bottom right / 34px 34px no-repeat; }
.cam-frame::after { border-color: #3DC47D; opacity: 0; }
.cam.busy .cam-frame::after { animation: pulse 1s ease-in-out infinite; opacity: 1; }
.cam-frame.wide { width: 90vw; height: 62vh; }
.cam-frame.square { width: 76vw; height: 76vw; }
.cam-frame.plate { width: 82vw; height: 19vw; border-radius: 12px; }
.cam-frame.doc { width: 88vw; height: 56vw; }
.cam-chips { position: absolute; left: 0; right: 0; bottom: calc(132px + env(safe-area-inset-bottom)); display: flex; gap: 8px; overflow-x: auto; padding: 0 14px; scrollbar-width: none; }
.cam-chips::-webkit-scrollbar { display: none; }
.cam-chip { flex: none; display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 999px; padding: 8px 12px; font-size: 13px; font-weight: 600; color: #fff; background: rgba(255, 255, 255, .16); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: background .2s, color .2s; }
.cam-chip.cur { background: #fff; color: #121826; }
.cam-chip.done svg { color: #43C27A; }
.cam-chip .req { width: 6px; height: 6px; border-radius: 50%; background: #FF8A7F; }
.cam-bottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 28px calc(24px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; background: linear-gradient(transparent, rgba(0, 0, 0, .65)); }
.shutter { width: 78px; height: 78px; border-radius: 50%; border: 4px solid #fff; background: transparent; padding: 5px; transition: transform .15s var(--ease); }
.shutter::after { content: ""; display: block; width: 100%; height: 100%; border-radius: 50%; background: #fff; transition: transform .2s var(--spring), background .2s; }
.shutter:active::after { transform: scale(.86); }
.cam.busy .shutter::after { transform: scale(.5); background: #3DC47D; }
.cam-thumb { justify-self: end; position: relative; width: 52px; height: 52px; border-radius: 14px; overflow: hidden; border: 2px solid rgba(255, 255, 255, .8); background: rgba(255, 255, 255, .12); }
.cam-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cam-thumb .spinner { position: absolute; inset: 0; margin: auto; color: #fff; }
.cam-thumb.pop { animation: pop .5s var(--spring) both; }
.cam-gal { justify-self: start; border: 0; background: none; color: #fff; font-size: 14px; font-weight: 600; display: flex; flex-direction: column; align-items: center; gap: 4px; opacity: .9; }
.cam-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.cam-flash.go { animation: flash .35s ease-out; }
@keyframes flash { 0% { opacity: .85; } 100% { opacity: 0; } }
.cam-msg { position: absolute; left: 50%; top: calc(46% + 34vw); transform: translateX(-50%); max-width: 86vw; text-align: center; font-size: 14px; font-weight: 600; padding: 8px 14px; border-radius: 12px; background: rgba(0, 0, 0, .55); }
.cam-msg:empty { display: none; }
.cam-msg.bad { background: rgba(180, 35, 24, .85); }
.cam-msg.ok { background: rgba(23, 112, 63, .85); }

.scan-btn { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; border: 0; border-radius: var(--r-lg); padding: 16px; background: var(--grad); color: #fff; box-shadow: var(--shadow-lg); margin: 8px 0 4px; transition: transform .18s var(--spring); }
.scan-btn:active { transform: scale(.98); }
.scan-btn .t { font-weight: 700; font-size: 16px; display: block; }
.scan-btn .s { font-size: 13px; opacity: .85; display: block; }
.recog { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ================================================================== Страховой Дом: таб-бар, продукты, агенты, управление */
:root {
  --p1: #2a78d6; --p2: #eb6834; --p3: #1baf7a; --p4: #eda100; --p5: #e87ba4; --p6: #008300;
}
:root[data-theme="dark"] {
  --p1: #3987e5; --p2: #d95926; --p3: #199e70; --p4: #c98500; --p5: #d55181; --p6: #008300;
}
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 12; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); background: var(--glass); -webkit-backdrop-filter: blur(18px) saturate(1.6); backdrop-filter: blur(18px) saturate(1.6); border-top: 1px solid var(--line-2); }
.tabbar .inner { max-width: 560px; margin: 0 auto; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: relative; }
.tabbar button { position: relative; z-index: 1; border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px 4px; font-size: 11px; font-weight: 600; color: var(--faint); transition: color .25s; }
.tabbar button.on { color: var(--accent); }
.tabbar button svg { transition: transform .35s var(--spring); }
.tabbar button.on svg { transform: translateY(-1px) scale(1.08); }
.tabbar .pip { position: absolute; top: -8px; height: 3px; border-radius: 3px; background: var(--grad); transition: transform .45s var(--spring), width .3s; }
.tabbar .badge-dot { position: absolute; top: 4px; right: calc(50% - 16px); width: 8px; height: 8px; border-radius: 50%; background: var(--bad); border: 2px solid var(--bg); }

.role-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-2); }
.role-pill.insurer { background: linear-gradient(135deg, #FFE6BF, #FFD08A); color: #6A3A00; }

/* --- главная страхования */
.hero-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.hero-chips span { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; background: rgba(255, 255, 255, .18); font-size: 13.5px; font-weight: 500; }
.hero .big { font-size: 34px; font-weight: 800; letter-spacing: -.025em; line-height: 1.05; }
.carousel { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 2px 16px 8px; scrollbar-width: none; }
.carousel::-webkit-scrollbar { display: none; }
.pcard { scroll-snap-align: start; flex: none; width: 76%; max-width: 300px; text-align: left; border: 1px solid var(--line); background: var(--card); border-radius: var(--r-lg); padding: 16px; display: flex; flex-direction: column; gap: 12px; transition: transform .2s var(--spring); }
.pcard:active { transform: scale(.98); }
.pcard .top { display: flex; justify-content: space-between; align-items: center; }
.pcard .nm { font-size: 17px; font-weight: 700; }
.pcard .ob { font-size: 13px; color: var(--muted); margin-top: 2px; }
.pbar { height: 6px; border-radius: 6px; background: var(--chip); overflow: hidden; }
.pbar i { display: block; height: 100%; border-radius: 6px; background: var(--grad); transform-origin: left; transform: scaleX(var(--k, 0)); transition: transform 1s var(--ease); }
.pbar.warn i { background: #E8811A; }
.pcard .till { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); }

.prod-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ptile { position: relative; overflow: hidden; text-align: left; border: 1px solid var(--line); background: var(--card); border-radius: var(--r-lg); padding: 16px 14px 14px; display: flex; flex-direction: column; gap: 10px; min-height: 148px; transition: transform .2s var(--spring), box-shadow .2s; }
.ptile:active { transform: scale(.97); }
.ptile .t { font-size: 15.5px; font-weight: 700; line-height: 1.2; }
.ptile .s { font-size: 12.5px; color: var(--muted); line-height: 1.3; flex: 1; }
.ptile .from { font-size: 13px; font-weight: 700; color: var(--accent-2); }
.ptile::after { content: ""; position: absolute; right: -30px; top: -30px; width: 90px; height: 90px; border-radius: 50%; background: var(--accent-soft); opacity: .6; z-index: 0; }
.ptile > * { position: relative; z-index: 1; }
#app[data-anim] .prod-grid .ptile { animation: rise .5s var(--ease) both; }
#app[data-anim] .prod-grid .ptile:nth-child(2) { animation-delay: .05s; }
#app[data-anim] .prod-grid .ptile:nth-child(3) { animation-delay: .1s; }
#app[data-anim] .prod-grid .ptile:nth-child(4) { animation-delay: .15s; }
#app[data-anim] .prod-grid .ptile:nth-child(5) { animation-delay: .2s; }
#app[data-anim] .prod-grid .ptile:nth-child(6) { animation-delay: .25s; }

/* --- калькулятор */
.pills { display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); gap: 8px; }
.pill-btn { min-height: 48px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--card); font-size: 14.5px; font-weight: 600; color: var(--ink); padding: 6px 8px; transition: all .22s var(--spring); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.pill-btn.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-2); transform: translateY(-1px); }
.pill-btn:active { transform: scale(.96); }
.stepper { display: flex; align-items: center; justify-content: space-between; background: var(--card); border: 1.5px solid var(--line); border-radius: 16px; padding: 6px; }
.stepper button { width: 44px; height: 44px; border-radius: 12px; border: 0; background: var(--accent-soft); color: var(--accent-2); font-size: 22px; font-weight: 600; display: grid; place-items: center; transition: transform .15s var(--spring); }
.stepper button:active { transform: scale(.9); }
.stepper b { font-size: 20px; font-variant-numeric: tabular-nums; }
.price-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 20px; margin: 16px 0 10px; }
.price-card .sum { font-size: 36px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.05; }
.price-card .lines { margin-top: 12px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.cover-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cover-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; color: rgba(255, 255, 255, .92); }
.cover-list li svg { margin-top: 2px; color: #fff; }
.note { font-size: 12.5px; color: var(--muted); margin: 10px 4px 0; }

/* --- KPI и графики */
.period { margin: 6px 0 4px; }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 14px; min-height: 92px; display: flex; flex-direction: column; justify-content: space-between; }
.kpi .k { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.kpi .v { font-size: 24px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi .sub { font-size: 12px; color: var(--muted); }
.kpi.wide { grid-column: 1 / -1; background: var(--mesh), var(--grad); background-size: 160% 160%, 100% 100%; color: #fff; border: 0; box-shadow: var(--shadow-lg); }
.kpi.wide .k, .kpi.wide .sub { color: rgba(255, 255, 255, .82); }
.kpi.wide .v { font-size: 34px; }
#app[data-anim] .kpi { animation: rise .5s var(--ease) both; }
#app[data-anim] .kpi:nth-child(2) { animation-delay: .04s; } #app[data-anim] .kpi:nth-child(3) { animation-delay: .08s; }
#app[data-anim] .kpi:nth-child(4) { animation-delay: .12s; } #app[data-anim] .kpi:nth-child(5) { animation-delay: .16s; }
#app[data-anim] .kpi:nth-child(n+6) { animation-delay: .2s; }

.chart { position: relative; margin-top: 8px; }
.chart .plot { position: relative; height: 150px; margin-top: 18px; }
.chart svg { width: 100%; height: 150px; display: block; overflow: visible; }
.chart .ylab { position: absolute; left: 0; transform: translateY(-115%); font-size: 10.5px; font-weight: 500; color: var(--faint); background: color-mix(in srgb, var(--card) 85%, transparent); border-radius: 6px; padding: 0 4px 0 0; pointer-events: none; }
.chart .xlabs { position: relative; height: 18px; margin-top: 6px; font-size: 10.5px; font-weight: 500; color: var(--faint); }
.chart .xlabs span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.chart .xlabs span:first-child { transform: none; left: 0 !important; }
.chart .xlabs span:last-child:not(:first-child) { transform: none; left: auto !important; right: 0; }
.chart .bar { fill: var(--accent); transform-box: fill-box; transform-origin: bottom; transform: scaleY(0); animation: bar-up .7s var(--ease) forwards; cursor: pointer; }
.chart .bar.hot { fill: var(--accent-2); }
.chart .hit { fill: transparent; cursor: pointer; }
.chart .base { stroke: var(--line); stroke-width: 1; }
.chart .grid { stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 3 4; }
.chart .ax { font: 500 10px "Onest", sans-serif; fill: var(--faint); }
@keyframes bar-up { to { transform: scaleY(1); } }
.tip { position: absolute; z-index: 3; pointer-events: none; transform: translate(-50%, -100%); background: var(--ink); color: var(--bg); border-radius: 10px; padding: 6px 10px; font-size: 12px; font-weight: 600; white-space: nowrap; box-shadow: 0 6px 18px rgba(0, 0, 0, .18); transition: opacity .15s; }
.tip small { display: block; font-weight: 500; opacity: .75; }

.hbars { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.hbar .row1 { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; margin-bottom: 6px; }
.hbar .row1 b { font-weight: 700; font-variant-numeric: tabular-nums; }
.hbar .row1 .nm { display: flex; align-items: center; gap: 8px; }
.hbar .sw { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.hbar .track { height: 10px; border-radius: 10px; background: var(--chip); overflow: hidden; }
.hbar .fill { height: 100%; border-radius: 10px; transform-origin: left; transform: scaleX(0); animation: grow-x .9s var(--ease) forwards; }
@keyframes grow-x { to { transform: scaleX(1); } }

.lead-row { display: flex; align-items: center; gap: 12px; padding: 14px 0; width: 100%; background: none; border: 0; text-align: left; color: inherit; }
.lead-row + .lead-row { border-top: 1px solid var(--line-2); }
.rank { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: 14px; background: var(--chip); color: var(--muted); flex: none; }
.rank.r1 { background: linear-gradient(135deg, #FFE08A, #F5B731); color: #5A3B00; }
.rank.r2 { background: linear-gradient(135deg, #E9EDF3, #C3CBD8); color: #36404F; }
.rank.r3 { background: linear-gradient(135deg, #F6D3B5, #DDA275); color: #5A2F0E; }
.lead-row .body { flex: 1; min-width: 0; }
.lead-row .nm { font-weight: 700; font-size: 15px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; row-gap: 2px; }
.lead-row .meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.stack { display: flex; gap: 2px; height: 6px; margin-top: 8px; border-radius: 6px; overflow: hidden; }
.stack i { display: block; height: 100%; transform-origin: left; transform: scaleX(0); animation: grow-x .8s var(--ease) forwards; }
.lead-row .amt { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lead-row .amt small { display: block; font-weight: 500; font-size: 12px; color: var(--muted); }
.legend-row { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 12px; color: var(--muted); margin-top: 10px; }
.legend-row span { display: inline-flex; align-items: center; gap: 5px; }
.legend-row i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }

.subtabs { position: sticky; top: 0; z-index: 6; padding: 8px 0; margin: 0 -16px; padding-left: 16px; padding-right: 16px; background: var(--glass); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }

.qr-agent { width: 168px; height: 168px; border-radius: 20px; background: #fff; padding: 8px; margin: 14px auto 6px; box-shadow: 0 10px 30px rgba(0, 0, 0, .18); }
.qr-agent img { width: 100%; height: 100%; display: block; image-rendering: pixelated; opacity: 0; transition: opacity .4s; }
.qr-agent img.ready { opacity: 1; }
.linkbox { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .16); font-size: 13px; font-weight: 600; overflow-wrap: anywhere; text-align: center; }

/* ------------------------------------------------------------------ зелёная тема: детали */
@keyframes mesh-drift { from { background-position: 0% 0%, 0 0; } to { background-position: 100% 100%, 0 0; } }
.btn:not(.light):not(.ghost):not(.soft):not(.white):not(.danger):not(.danger-line)::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .22) 50%, transparent 65%); background-size: 250% 100%; background-position: 130% 0; pointer-events: none; }
#app[data-anim] .dock .btn:not(.light):not(.ghost):not(.soft):not(.white):not(.danger):not(.danger-line)::after { animation: btn-shine 1.4s .5s var(--ease) both; }
@keyframes btn-shine { to { background-position: -30% 0; } }
.greet { font-size: 14.5px; font-weight: 500; color: var(--muted); margin: 18px 0 -16px; }

/* скелетоны вместо «пустого экрана» при загрузке */
.sk { position: relative; overflow: hidden; background: var(--line-2); border-radius: 14px; }
.sk::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
:root[data-theme="dark"] .sk::after { background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .06), transparent); background-size: 200% 100%; }
.sk-hero { height: 196px; border-radius: var(--r-xl); margin: 12px 0; }
.sk-line { height: 22px; width: 46%; margin: 26px 4px 12px; }
.sk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sk-tile { height: 150px; border-radius: 22px; }
.sk-kpi { height: 92px; border-radius: 20px; }
.sk-kpi.wide { grid-column: 1 / -1; height: 112px; }
.sk-card { height: 190px; border-radius: var(--r-lg); margin-top: 12px; }
@media (prefers-reduced-motion: reduce) { .hero, .kpi.wide { animation: none; } .sk::after, .btn::after { animation: none !important; } }
