/* Гараж — нічна приладова панель: темна кабіна з глибиною, точні цифри
   «приладовим» накресленням, один акцент — червоний (заливки, смужки,
   стрілка; червоний ТЕКСТ — лише світлішим --red-ink).
   Рух: один оркестрований момент — запуск (світлова смуга, стрілка до упору
   й назад); решта руху відповідає на дію людини. Усе — transform/opacity.
   ⚠️ Увесь рух живе в @media (prefers-reduced-motion: no-preference) внизу:
   без нього застосунок статичний і так само повний. */
:root {
  --bg: #0b0c0e;
  --panel: #15171a;
  --panel-2: #1c1f23;
  --panel-hi: #1b1e22;
  --line: #2a2d31;
  --line-2: #383c42;
  --text: #f2f3f5;
  --muted: #9ba1a8;
  --red: #e3001b;
  --red-ink: #ff5a6a;     /* червоний ТЕКСТ (контраст 5.1:1 на --panel) */
  --red-glow: rgba(227, 0, 27, .45);
  --amber: #f2a900;
  --ok: #6f7780;
  --r: 6px;
  --r-lg: 10px;
  --gap: 16px;
  --vh-stable: 100vh;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --f-num: "DIN Alternate", "Bahnschrift", "Roboto Condensed", sans-serif-condensed,
    -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
/* ⚠️ display:flex у класі перебиває атрибут hidden — без цього затемнення й
   порожня плашка висіли поверх екрана */
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font: 15px/1.45 -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(68px + env(safe-area-inset-bottom));
  min-height: var(--vh-stable);
}
/* Відблиск «запалювання» згори кабіни — окремим нерухомим шаром, щоб не
   перемальовувався під час прокрутки */
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(90% 34% at 50% -6%, rgba(227, 0, 27, .13), transparent 70%),
    linear-gradient(180deg, #101215 0, var(--bg) 46%); }
.num, .big, td.n, .kpi b, .row .v, .dial-foot b, .readout dd { font-variant-numeric: tabular-nums; }

/* ─────────────── заставка ─────────────── */
.splash { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(70% 40% at 50% 46%, rgba(227, 0, 27, .12), transparent 70%), var(--bg);
  /* якщо скрипт не доїхав — заставка не висить вічно поверх усього */
  animation: splash-safe .4s 12s forwards; }
.splash-in { width: min(72%, 280px); text-align: center; }
.lightbar { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; height: 6px; transform: skewX(-24deg); }
.lightbar i { background: var(--red); border-radius: 1px; box-shadow: 0 0 10px var(--red-glow); opacity: .9; }
.splash-name { margin-top: 26px; font: 600 22px/1.2 var(--f-num); letter-spacing: .2em; text-transform: uppercase;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-left: .2em; }
.splash-sub { margin-top: 8px; font-size: 12px; color: var(--muted); letter-spacing: .06em; }
.splash.out { opacity: 0; pointer-events: none; }
@keyframes splash-safe { to { opacity: 0; visibility: hidden; } }

/* ─────────────── шапка ─────────────── */
.top { position: relative; padding: 16px var(--gap) 12px; border-bottom: 1px solid var(--line); overflow: hidden; }
.brand { display: flex; align-items: center; gap: 10px; font: 600 17px/1.25 var(--f-num); letter-spacing: .1em;
  text-transform: uppercase; color: var(--text); }
.brand .mark { width: 22px; height: 3px; background: var(--red); display: inline-block; flex: none;
  transform: skewX(-24deg); box-shadow: 0 0 10px var(--red-glow); }
#car-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top .sub { font-size: 12px; color: var(--muted); margin: 2px 0 0 32px; min-height: 1em; }
/* бігунок звʼязку: видно лише коли запит триває довше за мить */
.top::after { content: ""; position: absolute; left: 0; bottom: 0; width: 34%; height: 2px; opacity: 0;
  background: linear-gradient(90deg, transparent, var(--red) 60%, #ff7a86); }

main { padding: var(--gap); max-width: 720px; margin: 0 auto; outline: none; }
h2 { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 600; letter-spacing: .16em;
  text-transform: uppercase; color: var(--muted); margin: 26px 0 10px; }
h2::before { content: ""; width: 10px; height: 2px; background: var(--red); transform: skewX(-24deg); flex: none; }
h2:first-child { margin-top: 4px; }

.panel { background: linear-gradient(180deg, var(--panel-hi), var(--panel) 46%, #121417);
  border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .045), 0 10px 24px -14px rgba(0, 0, 0, .8); }
.panel + .panel { margin-top: 8px; }

/* ─────────────── приладка ─────────────── */
.cluster { padding: 18px 14px 6px; position: relative; overflow: hidden; }
.cluster::before { content: ""; position: absolute; left: 50%; top: -30%; width: 120%; height: 90%;
  transform: translateX(-50%); pointer-events: none;
  background: radial-gradient(closest-side, rgba(227, 0, 27, .10), transparent); }
.dial { position: relative; width: min(100%, 272px); margin: 0 auto; }
.dial-svg { display: block; width: 100%; height: auto; overflow: visible; }
.dial-track { fill: none; stroke: #24272b; stroke-width: 7; }
.dial-arc { fill: none; stroke: var(--text); stroke-width: 7; }
.dial-arc.warn { stroke: var(--amber); }
.dial-arc.over { stroke: var(--red); }
.dial-tick { stroke: #4a4f56; stroke-width: 1.5; }
.dial-tick.major { stroke: #8c929a; stroke-width: 2; }
.dial-tick.red { stroke: var(--red); }
.needle { transform-origin: 120px 112px; }
.needle .glow { stroke: var(--red); stroke-width: 7; stroke-linecap: round; opacity: .28; }
.needle .pin { stroke: #ff2b43; stroke-width: 2.5; stroke-linecap: round; }
.dial-center { position: absolute; left: 0; right: 0; top: 30%; text-align: center; pointer-events: none; }
.big { font: 500 42px/1.05 var(--f-num); letter-spacing: 0; white-space: nowrap; }
.big small { display: block; font: 400 12px/1.4 var(--f-num); color: var(--muted); letter-spacing: .2em;
  text-transform: uppercase; margin-top: 2px; }
.caption { font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.dial-foot { position: absolute; left: 0; right: 0; bottom: 3%; text-align: center; pointer-events: none; }
.dial-foot b { display: block; font: 500 19px/1.1 var(--f-num); }
.dial-foot span { font-size: 9px; letter-spacing: .16em; color: var(--muted); }
.dial-foot.warn b { color: var(--amber); }
.dial-foot.over b { color: var(--red-ink); }
.dial-name { text-align: center; color: var(--muted); font-size: 13px; margin: 6px 0 4px; }
.readout { margin: 10px 0 0; }
.readout div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 2px;
  border-top: 1px solid var(--line); font-size: 13px; }
.readout dt { color: var(--muted); flex: none; }
.readout dd { margin: 0; text-align: right; }
.meta { color: var(--muted); font-size: 13px; margin-top: 6px; }

.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.kpi { position: relative; background: linear-gradient(180deg, var(--panel-hi), var(--panel));
  border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px 12px 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .045); overflow: hidden; }
.kpi::before { content: ""; position: absolute; left: 12px; top: 0; width: 18px; height: 2px; background: var(--line-2); }
.kpi:first-child::before { background: var(--red); box-shadow: 0 0 8px var(--red-glow); }
.kpi b { display: block; font: 500 21px/1.2 var(--f-num); margin-top: 4px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.kpi span { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

.actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
button, .btn {
  font: inherit; color: var(--text); background: linear-gradient(180deg, #23272c, var(--panel-2));
  border: 1px solid var(--line-2); border-radius: var(--r); padding: 11px 12px; min-height: 44px;
  cursor: pointer; text-align: center; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
  touch-action: manipulation; user-select: none; -webkit-user-select: none;
}
button:active { background: var(--panel-2); border-color: #4a4f56; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--text); outline-offset: 2px; }
button.primary { background: linear-gradient(180deg, #f2112d, #c40018); border-color: #f2112d; color: #fff;
  font-weight: 600; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 6px 18px -8px var(--red); }
button.primary:active { background: #b80016; border-color: #b80016; box-shadow: inset 0 2px 6px rgba(0, 0, 0, .35); }
button.ghost { background: transparent; box-shadow: none; border-color: var(--line); }
button.ghost:active { background: var(--panel-2); }
button.danger { background: transparent; color: var(--red-ink); border-color: var(--line); box-shadow: none; }
button[disabled] { opacity: .5; cursor: default; }

/* ─────────────── списки ─────────────── */
.panel > .row:first-child { margin-top: -6px; }
.panel > .row:last-child { margin-bottom: -6px; }
.row { display: grid; grid-template-columns: 4px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 12px 0; border: 0; border-bottom: 1px solid var(--line); width: 100%; background: none;
  border-radius: 0; text-align: left; min-height: 56px; box-shadow: none; position: relative; }
.row:active { background: none; }
/* підсвітка натиску — окремим шаром на всю ширину панелі */
.row::after { content: ""; position: absolute; inset: 0 -14px; background: #fff; opacity: 0; pointer-events: none; }
.row:active::after { opacity: .05; }
.row:last-child { border-bottom: 0; }
.row .bar { width: 4px; align-self: stretch; border-radius: 2px; background: var(--ok); }
.row.overdue .bar { background: var(--red); box-shadow: 0 0 10px var(--red-glow); }
.row.soon .bar { background: var(--amber); box-shadow: 0 0 10px rgba(242, 169, 0, .3); }
.row.never .bar { background: repeating-linear-gradient(180deg, var(--red) 0 4px, transparent 4px 8px); }
.row .t { font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.row .d { font-size: 13px; color: var(--muted); }
.row .v { text-align: right; white-space: nowrap; font-family: var(--f-num); font-size: 16px; }
.row .v small { display: block; color: var(--muted); font-size: 12px; font-family: inherit; }
.state-overdue { color: var(--red-ink); }
.state-soon { color: var(--amber); }

.seg { display: flex; gap: 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
  margin-bottom: 12px; background: var(--panel); }
.seg button { flex: 1; border: 0; border-radius: 0; background: transparent; color: var(--muted);
  padding: 9px 4px; min-height: 44px; font-size: 13px; box-shadow: none; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: linear-gradient(180deg, #24282d, var(--panel-2)); color: var(--text);
  box-shadow: inset 0 -2px 0 var(--red); }

.bars .b { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 12px; margin: 12px 0; }
.bars .num { font-family: var(--f-num); font-size: 16px; }
.bars .track { grid-column: 1 / -1; height: 6px; background: #101214; border-radius: 3px; overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .6); }
.bars .fill { height: 100%; border-radius: 3px; transform-origin: 0 50%;
  background: linear-gradient(90deg, #a80014, var(--red) 70%, #ff4057); }
.bars .fill.alt { background: linear-gradient(90deg, #565c64, #9ba1a8); }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
td { padding: 9px 0; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
td.n { text-align: right; white-space: nowrap; font-family: var(--f-num); font-size: 15px; padding-left: 10px; }
tr.cheap td:first-child::before { content: ""; display: inline-block; width: 8px; height: 8px;
  background: var(--red); margin-right: 8px; vertical-align: middle; box-shadow: 0 0 8px var(--red-glow);
  transform: skewX(-24deg); }

.chart { width: 100%; height: 180px; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .ax { fill: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.chart .ln { fill: none; stroke-width: 2; stroke-linejoin: round; }
.chart .l0 { stroke: var(--red); }
.chart .l1 { stroke: var(--text); }
.chart .l2 { stroke: var(--muted); stroke-dasharray: 4 3; }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); flex-wrap: wrap; margin-top: 4px; }
.legend i { display: inline-block; width: 14px; height: 2px; vertical-align: middle; margin-right: 6px; }
.legend .k0 { background: var(--red); } .legend .k1 { background: var(--text); } .legend .k2 { background: var(--muted); }

.banner { border: 1px solid var(--line); border-left: 3px solid var(--amber); padding: 10px 12px;
  font-size: 13px; color: var(--muted); border-radius: var(--r); margin-bottom: 12px; background: rgba(242, 169, 0, .05); }
.empty { color: var(--muted); padding: 16px 0; margin: 0; }
.err { color: var(--red-ink); font-size: 13px; margin-top: 4px; min-height: 0; }

/* ─────────────── кістяк (поки їдуть дані) ─────────────── */
.sk { background: var(--panel-2); border-radius: var(--r); position: relative; overflow: hidden; }
.sk::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .06), transparent); }
.sk-dial { width: 200px; height: 200px; border-radius: 50%; margin: 6px auto 14px; background: none;
  border: 7px solid var(--panel-2); }
.sk-kpi { height: 66px; border-radius: var(--r-lg); }
.sk-line { height: 14px; margin: 6px 0; }
.sk-line.w40 { width: 40%; } .sk-line.w60 { width: 60%; } .sk-line.w80 { width: 80%; }
.sk-row { padding: 10px 0; border-bottom: 1px solid var(--line); }
.sk-row:last-child { border-bottom: 0; }

/* ─────────────── аркуш ─────────────── */
.sheet-wrap { position: fixed; inset: 0; background: rgba(0, 0, 0, .66); z-index: 20; display: flex;
  align-items: flex-end; justify-content: center; }
.sheet-wrap.closing { pointer-events: none; }
.sheet { position: relative; background: linear-gradient(180deg, #1b1e22, var(--panel) 120px);
  border-top: 2px solid var(--red); width: 100%; max-width: 720px;
  max-height: 88vh; overflow: auto; padding: 22px var(--gap) calc(16px + env(safe-area-inset-bottom));
  border-radius: 14px 14px 0 0; box-shadow: 0 -18px 50px -10px rgba(0, 0, 0, .9), 0 -1px 22px -6px var(--red-glow); }
.sheet::before { content: ""; position: absolute; top: 8px; left: 50%; width: 36px; height: 4px; margin-left: -18px;
  border-radius: 2px; background: var(--line-2); }
.sheet h3 { margin: 0 0 12px; font: 600 15px/1.3 var(--f-num); letter-spacing: .12em; text-transform: uppercase; }
label { display: block; font-size: 12px; color: var(--muted); margin: 12px 0 4px; letter-spacing: .04em; }
input, select, textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--text); background: #0d0e10;
  border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; min-height: 44px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .5);
}
input:focus, select:focus, textarea:focus { border-color: #6b727b; }
input[readonly], textarea[readonly] { color: var(--muted); }
textarea { min-height: 96px; resize: vertical; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chips button { min-height: 44px; padding: 6px 12px; font-size: 13px; }
.chips button.on { border-color: var(--red); box-shadow: inset 0 -2px 0 var(--red); }
.check { display: flex; align-items: center; gap: 10px; margin-top: 12px; color: var(--text); font-size: 15px;
  min-height: 44px; }
.check input { width: 22px; height: 22px; min-height: 0; accent-color: var(--red); flex: none; box-shadow: none; }
.sheet .foot, .panel .foot { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 8px; margin-top: 18px; }
.line-row { display: grid; grid-template-columns: 112px minmax(0, 1fr) 84px 44px; gap: 6px; margin-top: 6px; }
.line-row select, .line-row input { padding-left: 10px; padding-right: 6px; }
.line-row button { min-height: 44px; padding: 0; }

/* ─────────────── нижня панель ─────────────── */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line);
  background: linear-gradient(180deg, #121417, var(--bg));
  padding-bottom: env(safe-area-inset-bottom); }
/* вогник активного розділу: один, переїжджає між вкладками (--tab ставить скрипт) */
.tabs::before { content: ""; position: absolute; top: -1px; left: 0; width: calc(100% / 4); height: 2px;
  background: linear-gradient(90deg, transparent, var(--red) 22%, var(--red) 78%, transparent);
  box-shadow: 0 0 14px 1px var(--red-glow); transform: translateX(calc(var(--tab, 0) * 100%)); }
.tabs button { border: 0; border-radius: 0; background: transparent; color: var(--muted); font-size: 11px;
  letter-spacing: .04em; min-height: 60px; padding: 8px 2px 6px; box-shadow: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.tabs button:active { background: transparent; }
.tabs svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round; }
.tabs button.on { color: var(--text); }

.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(76px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, #262a2f, var(--panel-2)); border: 1px solid var(--line-2);
  border-radius: var(--r-lg); padding: 10px 14px; z-index: 30; display: flex; gap: 14px; align-items: center;
  max-width: calc(100% - 32px); box-shadow: 0 14px 34px -10px rgba(0, 0, 0, .9); overflow: hidden; }
.toast button { min-height: 44px; padding: 4px 12px; flex: none; }
/* смужка часу, поки ще можна повернути */
.toast.undo::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--red); transform-origin: 0 50%; }

@media (max-width: 380px) {
  .big { font-size: 38px; }
  .line-row { grid-template-columns: 104px minmax(0, 1fr) 72px 44px; }
}

/* ─────────────── рух ─────────────── */
@media (prefers-reduced-motion: no-preference) {
  /* заставка: вогні біжать зліва направо, назва проступає */
  .lightbar i { opacity: .1; animation: seg 1.25s linear infinite; }
  .lightbar i:nth-child(2) { animation-delay: .07s; } .lightbar i:nth-child(3) { animation-delay: .14s; }
  .lightbar i:nth-child(4) { animation-delay: .21s; } .lightbar i:nth-child(5) { animation-delay: .28s; }
  .lightbar i:nth-child(6) { animation-delay: .35s; } .lightbar i:nth-child(7) { animation-delay: .42s; }
  .lightbar i:nth-child(8) { animation-delay: .49s; } .lightbar i:nth-child(9) { animation-delay: .56s; }
  .lightbar i:nth-child(10) { animation-delay: .63s; } .lightbar i:nth-child(11) { animation-delay: .70s; }
  .lightbar i:nth-child(12) { animation-delay: .77s; }
  @keyframes seg { 0% { opacity: .1; } 8% { opacity: 1; } 45% { opacity: .9; } 70%, 100% { opacity: .1; } }
  .splash-name { animation: name-in .7s .15s var(--ease) both; }
  .splash-sub { animation: fade .6s .45s both; }
  @keyframes name-in { from { opacity: 0; letter-spacing: .5em; } }
  @keyframes fade { from { opacity: 0; } }
  .splash { transition: opacity .32s ease-out, transform .32s ease-out; }
  .splash.out { transform: scale(1.05); }

  /* бігунок звʼязку: чекає 0,25 с, тож швидка відповідь його не блимає */
  body.busy .top::after { animation: run 1.1s .25s ease-in-out infinite; }
  @keyframes run { 0% { opacity: 1; transform: translateX(-100%); } 100% { opacity: 1; transform: translateX(300%); } }

  /* вхід екрана: блоки по черзі, рядки списку — слідом */
  main.enter > * { animation: rise .34s var(--ease) both; }
  main.enter > :nth-child(2) { animation-delay: .04s; } main.enter > :nth-child(3) { animation-delay: .08s; }
  main.enter > :nth-child(4) { animation-delay: .12s; } main.enter > :nth-child(5) { animation-delay: .16s; }
  main.enter > :nth-child(6) { animation-delay: .20s; } main.enter > :nth-child(7) { animation-delay: .24s; }
  main.enter > :nth-child(n+8) { animation-delay: .28s; }
  @keyframes rise { from { opacity: 0; transform: translateY(10px); } }
  main.enter .row { animation: slide .3s var(--ease) both; animation-delay: .16s; }
  main.enter .row:nth-child(2) { animation-delay: .20s; } main.enter .row:nth-child(3) { animation-delay: .24s; }
  main.enter .row:nth-child(4) { animation-delay: .28s; } main.enter .row:nth-child(5) { animation-delay: .32s; }
  main.enter .row:nth-child(6) { animation-delay: .36s; } main.enter .row:nth-child(n+7) { animation-delay: .40s; }
  @keyframes slide { from { opacity: 0; transform: translateX(-10px); } }

  /* приладка: дуга й стрілка виїжджають на значення… */
  main.enter .dial-arc { animation: arc-in .9s .1s var(--ease) both; }
  main.enter .needle { animation: needle-in .9s .1s var(--ease) both; }
  @keyframes arc-in { from { stroke-dasharray: 0 360; } }
  @keyframes needle-in { from { transform: rotate(0deg); } }
  /* …а при запуску — до упору й назад, як після повороту ключа */
  main.boot .dial-arc { animation: arc-boot 1.5s .15s cubic-bezier(.45, 0, .2, 1) both; }
  main.boot .needle { animation: needle-boot 1.5s .15s cubic-bezier(.45, 0, .2, 1) both; }
  @keyframes arc-boot { 0% { stroke-dasharray: 0 360; } 45%, 52% { stroke-dasharray: 270 360; } }
  @keyframes needle-boot { 0% { transform: rotate(0deg); } 45%, 52% { transform: rotate(270deg); } }
  main.boot .dial-tick { animation: fade .5s both; }
  main.enter .dial-center, main.enter .dial-foot { animation: fade .5s .2s both; }

  main.enter .bars .fill { animation: grow .6s .25s var(--ease) both; }
  main.enter .bars .b:nth-child(2) .fill { animation-delay: .31s; }
  main.enter .bars .b:nth-child(3) .fill { animation-delay: .37s; }
  main.enter .bars .b:nth-child(n+4) .fill { animation-delay: .43s; }
  @keyframes grow { from { transform: scaleX(0); } }
  main.enter .chart .draw { stroke-dasharray: 1; animation: draw 1.1s .25s ease-out both; }
  @keyframes draw { from { stroke-dashoffset: 1; } }
  main.enter .chart .area, main.enter .chart .l2 { animation: fade .8s .6s both; }

  .sk::after { animation: shimmer 1.2s linear infinite; }
  @keyframes shimmer { to { transform: translateX(100%); } }

  /* натиск: кнопка «втискається» */
  button { transition: transform .12s var(--ease), background-color .15s, border-color .15s, color .2s; }
  button:active { transform: scale(.96); transition-duration: .04s; }
  .row:active, .seg button:active { transform: none; }
  .row::after { transition: opacity .25s; }
  .row:active::after { transition-duration: 0s; }
  .tabs svg { transition: transform .28s var(--ease); }
  .tabs button.on svg { transform: translateY(-1px) scale(1.08); }
  .tabs::before { transition: transform .32s var(--ease); }
  input, select, textarea { transition: border-color .15s; }

  .sheet-wrap { animation: fade .22s ease-out both; }
  .sheet { animation: up .34s var(--ease) both; }
  .sheet-wrap.closing { animation: fade-out .2s ease-in both; }
  .sheet-wrap.closing .sheet { animation: down .2s ease-in both; }
  @keyframes up { from { transform: translateY(48px); opacity: 0; } }
  @keyframes down { to { transform: translateY(48px); opacity: 0; } }
  @keyframes fade-out { to { opacity: 0; } }

  .toast { animation: toast-in .3s var(--ease) both; }
  .toast.out { animation: toast-out .18s ease-in both; }
  @keyframes toast-in { from { opacity: 0; transform: translate(-50%, 14px) scale(.96); } }
  @keyframes toast-out { to { opacity: 0; transform: translate(-50%, 10px); } }
  .toast.undo::after { animation: drain 10s linear both; }
  @keyframes drain { to { transform: scaleX(0); } }
}

/* Головна: одне число, стан, дії, найближче (спрощено 22.11.2026) */
.home-odo { padding: 18px 16px 14px; }
.home-odo .big { font-size: 40px; font-weight: 700; letter-spacing: .02em; }
.home-odo .big { display: flex; align-items: baseline; }
.home-odo .big small { display: inline; font-size: 15px; color: var(--muted); margin-left: 6px; font-weight: 500; }
.home-odo .when { color: var(--muted); font-size: 13px; margin-top: 2px; }
.peers { margin-bottom: 14px; }
