/* DSH Mini App — визуал по дизайн-системе DeepSeek Harness.
 * Значения взяты из стилей веб-клиента DSH:
 *   InputBar.module.css       — карточка композера, send-круг, чипы;
 *   TurnTriggerNodeView.css   — сообщение пользователя;
 *   AssistantMarkdown.css     — лента ответа;
 *   ToolRow.module.css        — строка инструмента;
 *   ui-theme/styles/*         — палитра, радиусы, elevation, Montserrat.
 */

@font-face {
  font-family: 'Montserrat';
  src: url('/fonts/montserrat-regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('/fonts/montserrat-medium.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}

/* ── токены DSH ───────────────────────────────────────────────────────────── */
:root {
  /* neutral-bluish 950 / 875 / 850 / 800 / 900 */
  --bg-base: rgb(21, 21, 23);
  --bg-1: rgb(35, 35, 36);
  --bg-2: rgb(44, 44, 46);
  --bg-3: rgb(53, 54, 56);
  --bg-code: rgb(27, 27, 28);
  --input-major: rgb(44, 44, 46);

  --label-primary: rgba(255, 255, 255, 0.96);
  --label-secondary: rgb(183, 200, 254);
  --label-tertiary: rgb(122, 170, 255);
  --label-caption: rgb(139, 143, 148);

  --border-l1: rgba(255, 255, 255, 0.06);
  --border-l2: rgba(255, 255, 255, 0.12);
  --border-l3: rgba(255, 255, 255, 0.16);

  --interactive-hover: rgba(255, 255, 255, 0.08);
  --selector: rgb(53, 54, 56);

  /* info-fill: deepseek-400 в тёмной теме, 500 — в светлой */
  --info-fill: rgb(122, 170, 255);
  --info-hover: rgb(65, 118, 230);
  --brand-ink: rgb(237, 243, 254);

  --ok: rgb(78, 209, 126);
  --ok-soft: rgba(78, 209, 126, 0.16);
  --warn: rgb(247, 173, 49);
  --danger: rgb(242, 90, 90);
  --danger-soft: rgba(242, 90, 90, 0.16);

  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-panel: 28px;
  --radius-pill: 999px;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --t-fast: 0.1s;
  --t-base: 0.2s;
  --t-slow: 0.3s;

  --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.16), 0 1px 2px rgba(0, 0, 0, 0.24);
  --shadow-panel: 0 12px 32px rgba(0, 0, 0, 0.28);
  --skeleton: rgba(255, 255, 255, 0.08);

  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Roboto', 'Segoe UI', sans-serif;
  --font-mono: ui-monospace, 'SF Mono', 'JetBrains Mono', 'Roboto Mono', Menlo, monospace;
  --font-brand: 'Montserrat', var(--font);
  --font-xxs: 12px/18px var(--font);

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

.theme-light {
  --bg-base: rgb(255, 255, 255);
  --bg-1: rgb(247, 248, 250);
  --bg-2: rgb(238, 240, 244);
  --bg-3: rgb(228, 231, 236);
  --bg-code: rgb(247, 248, 250);
  --input-major: rgb(255, 255, 255);

  --label-primary: rgba(21, 21, 23, 0.94);
  --label-secondary: rgb(75, 85, 99);
  --label-tertiary: rgb(107, 114, 128);
  --label-caption: rgb(156, 163, 175);

  --border-l1: rgba(0, 0, 0, 0.04);
  --border-l2: rgba(0, 0, 0, 0.1);
  --border-l3: rgba(0, 0, 0, 0.12);

  --interactive-hover: rgba(38, 49, 72, 0.06);
  --selector: rgb(238, 240, 244);

  --info-fill: rgb(65, 118, 230);
  --info-hover: rgb(86, 134, 254);
  --brand-ink: rgb(21, 21, 23);

  --shadow-soft: 0 2px 8px rgba(16, 24, 40, 0.06), 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-panel: 0 12px 28px rgba(16, 24, 40, 0.1);
  --skeleton: rgba(0, 0, 0, 0.06);
}

@supports (corner-shape: superellipse(1.5)) {
  .panel, .card, .btn, .pill, .field, .toast, .splash-logo, .segmented, .composer, .msg-user { corner-shape: superellipse(1.5); }
  .send, .icon-btn, .splash-bar { corner-shape: round; }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg-base);
  color: var(--label-primary);
  font: 14px/24px var(--font);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: contain;
}

.hidden { display: none !important; }

/* ── шапка ────────────────────────────────────────────────────────────────── */
.top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(10px + var(--safe-top)) 16px 10px;
  background: color-mix(in srgb, var(--bg-base) 84%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-l1);
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-brand);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 0.04em;
}
.brand-mark {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: linear-gradient(145deg, var(--info-fill), var(--info-hover));
  color: #fff;
  font-family: var(--font-brand);
  font-size: 14px;
}
.who {
  margin-left: auto;
  color: var(--label-caption);
  font: var(--font-xxs);
  max-width: 45%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  animation: pulse 2.4s var(--ease) infinite;
}
.status-dot.busy { background: var(--info-fill); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* ── лента чата ───────────────────────────────────────────────────────────── */
.view {
  padding: 16px 12px calc(214px + var(--safe-bottom));
  animation: view-in var(--t-slow) var(--ease) both;
}
@keyframes view-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.chat { display: flex; flex-direction: column; gap: 20px; }
.chat-empty {
  display: grid;
  gap: 10px;
  justify-items: center;
  text-align: center;
  padding: 48px 16px;
  color: var(--label-caption);
}
.chat-empty .hero-mark {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  display: grid;
  place-items: center;
  background: linear-gradient(150deg, var(--info-fill), var(--info-hover));
  color: #fff;
  font-family: var(--font-brand);
  font-size: 24px;
  box-shadow: var(--shadow-soft);
}

/* сообщение пользователя = turn-trigger DSH */
.msg-user {
  min-width: 0;
  border: 0.5px solid var(--border-l1);
  border-radius: var(--radius-xl);
  background: var(--bg-code);
  transition: background-color var(--t-fast) var(--ease);
}
.msg-user .head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  color: var(--label-caption);
  font-size: 14px;
}
.msg-user .head .icon { display: inline-flex; flex: none; }
.msg-user .head .time { margin-left: auto; font: var(--font-xxs); }
.msg-user .head .title { flex: none; }
.msg-user .body {
  padding: 0 16px 12px 40px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--label-primary);
}

/* ответ ассистента = AssistantMarkdown DSH */
.msg-assistant { display: flex; flex-direction: column; }
.msg-assistant .meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--label-caption);
  font: var(--font-xxs);
}
.msg-assistant .meta .who-name { color: var(--label-secondary); font-weight: 500; }
.assistant-body { display: flex; flex-direction: column; gap: 16px; }

/* ── markdown ─────────────────────────────────────────────────────────────── */
.md { display: flex; flex-direction: column; gap: 16px; font-size: 14px; line-height: 24px; color: var(--label-primary); }
.md > * { margin: 0; }
.md h1, .md h2, .md h3 {
  font-family: var(--font-brand);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0.01em;
}
.md h1 { font-size: 20px; }
.md h2 { font-size: 17px; }
.md h3 { font-size: 15px; }
.md ul, .md ol { padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.md li::marker { color: var(--label-caption); }
.md a { color: var(--info-fill); text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--info-fill) 40%, transparent); }
.md code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  padding: 2px 5px;
  border-radius: var(--radius-xs);
  background: var(--bg-code);
  border: 0.5px solid var(--border-l1);
}
.md pre {
  margin: 0;
  padding: 12px 14px;
  overflow-x: auto;
  border-radius: var(--radius-md);
  background: var(--bg-code);
  border: 0.5px solid var(--border-l1);
}
.md pre code { padding: 0; border: none; background: none; font-size: 12.5px; line-height: 1.6; }
.md blockquote {
  padding: 4px 0 4px 14px;
  border-left: 2px solid var(--border-l3);
  color: var(--label-secondary);
}
.md hr { border: none; border-top: 1px solid var(--border-l1); }
.md table { width: 100%; border-collapse: collapse; font-size: 13px; }
.md th, .md td { padding: 8px 10px; border: 1px solid var(--border-l1); text-align: left; }
.md th { background: var(--interactive-hover); font-weight: 500; color: var(--label-secondary); }

/* ── шаги инструментов = ToolRow DSH ──────────────────────────────────────── */
.tools { display: flex; flex-direction: column; gap: 2px; margin-bottom: 4px; }
.tool {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 0 4px;
  color: var(--label-caption);
  font: var(--font-xxs);
  border-radius: var(--radius-sm);
}
.tool .lead { width: 16px; display: inline-flex; justify-content: center; flex: none; }
.tool .name { color: var(--label-secondary); font-size: 13px; }
.tool .sep {
  flex: none;
  width: 2px;
  height: 2px;
  border-radius: 1px;
  margin: 0 6px;
  background: var(--label-caption);
}
.tool .summary {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}
.tool .state { flex: none; font-size: 12px; }
.tool-run .state { color: var(--info-fill); }
.tool-done .state { color: var(--ok); }
.tool-fail .state { color: var(--danger); }

/* ── индикатор активности агента ──────────────────────────────────────────── */
.thinking {
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  width: min(100%, 720px);
  margin: 0 auto 8px;
  padding: 0 8px;
  color: var(--label-caption);
  font: var(--font-xxs);
  transition: color var(--t-base) var(--ease);
}
.thinking .label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.thinking .dots { display: inline-flex; flex: none; gap: 4px; }
.thinking .dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--info-fill);
  animation: dot-wave 1.15s var(--ease) infinite;
}
.thinking .dots i:nth-child(2) { animation-delay: 0.14s; }
.thinking .dots i:nth-child(3) { animation-delay: 0.28s; }
@keyframes dot-wave {
  0%, 100% { transform: translateY(0); opacity: 0.45; }
  50% { transform: translateY(-3px); opacity: 1; }
}
/* Долгая тишина без работающего инструмента: предупреждаем, но точки живут. */
.thinking.soft { color: var(--warn); }
/* Долгая тишина при работающем инструменте или полное молчание: замираем. */
.thinking.stalled { color: var(--warn); }
.thinking.stalled .dots i {
  animation-play-state: paused;
  background: var(--label-caption);
  opacity: 0.5;
}

/* ── композер DSH ─────────────────────────────────────────────────────────── */
.composer-wrap {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(60px + var(--safe-bottom));
  z-index: 7;
  /* Верхний отступ и градиентная маска: лента уходит под зону композера
     плавно, индикатор и кнопки не накладываются на текст. */
  padding: 26px 12px 0;
  background: linear-gradient(
    to bottom,
    transparent 0,
    color-mix(in srgb, var(--bg-base) 88%, transparent) 32%,
    var(--bg-base) 76%
  );
  pointer-events: none;
}
.composer {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(100%, 720px);
  margin: 0 auto;
  padding-top: 8px;
  border-radius: var(--radius-panel);
  background: var(--input-major);
  box-shadow: var(--shadow-soft), 0 0 0 0.5px var(--border-l2);
}
.composer .composer-input {
  min-height: 36px;
  max-height: 168px;
  margin: 0;
  padding: 4px 12px 0 14px;
  border: none;
  outline: none;
  background: none;
  color: var(--label-primary);
  caret-color: var(--info-fill);
  font: 14px/24px var(--font);
  resize: none;
  overflow-y: auto;
}
.composer .composer-input::placeholder { color: var(--label-caption); }
.composer .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 8px 6px;
  min-width: 0;
}
.composer .row .left, .composer .row .right { display: flex; align-items: center; gap: 12px; min-width: 0; }
.composer .mode-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 8px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--label-secondary);
  font: 500 13px/20px var(--font);
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease);
}
.composer .mode-chip:hover { background: var(--interactive-hover); }
.composer .mode-chip.on { color: var(--info-fill); }
.composer .send {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 999px;
  background: var(--info-fill);
  color: #fff;
  cursor: pointer;
  transform: translateY(-2px);
  transition: background-color var(--t-fast) var(--ease), opacity var(--t-fast) var(--ease);
}
.composer .send:hover:not(:disabled) { background: var(--info-hover); }
.composer .send:disabled { opacity: 0.4; cursor: default; }
.composer .send svg { width: 18px; height: 18px; }

/* ── панели и карточки ────────────────────────────────────────────────────── */
.panel {
  background: var(--bg-1);
  border: 0.5px solid var(--border-l2);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-soft);
  padding: 16px;
  margin-bottom: 12px;
}
.panel > h3, .card > h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  font-family: var(--font-brand);
  font-size: 15px;
  font-weight: 500;
}
.panel .hint, .card .meta { color: var(--label-caption); font: var(--font-xxs); }
.panel .row, .card .row { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

.card {
  background: var(--bg-1);
  border: 0.5px solid var(--border-l1);
  border-radius: var(--radius-xl);
  padding: 14px;
  margin-bottom: 10px;
}
.card.active { border-color: var(--info-fill); box-shadow: 0 0 0 1px color-mix(in srgb, var(--info-fill) 30%, transparent); }
.card.plain { background: transparent; border-style: dashed; box-shadow: none; }

.section-title {
  margin: 20px 4px 10px;
  color: var(--label-caption);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ── кнопки ───────────────────────────────────────────────────────────────── */
.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 14px;
  border: 0.5px solid transparent;
  border-radius: var(--radius-md);
  background: var(--bg-2);
  color: var(--label-primary);
  font: 500 13px/20px var(--font);
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn-info { background: var(--info-fill); color: #fff; }
.btn-info:hover { background: var(--info-hover); }
.btn-ghost { background: transparent; border-color: var(--border-l2); color: var(--label-secondary); }
.btn-ghost:hover { background: var(--interactive-hover); }
.btn-danger { background: transparent; border-color: var(--danger-soft); color: var(--danger); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.45; pointer-events: none; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 999px;
  background: var(--selector);
  color: var(--label-primary);
  cursor: pointer;
}
.icon-btn:hover { background: var(--interactive-hover); }

.segmented {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--bg-1);
  border: 0.5px solid var(--border-l2);
  border-radius: var(--radius-lg);
}
.segmented .seg {
  flex: 1;
  height: 32px;
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--label-secondary);
  font: 500 13px/20px var(--font);
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.segmented .seg.on { background: var(--interactive-hover); color: var(--label-primary); }
.segmented .seg[disabled] { opacity: 0.4; pointer-events: none; }

.chip {
  appearance: none;
  height: 28px;
  padding: 0 12px;
  border: 0.5px solid var(--border-l2);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--label-secondary);
  font: 500 13px/20px var(--font);
  cursor: pointer;
}
.chip:hover { background: var(--interactive-hover); }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }

/* ── поля и статусы ───────────────────────────────────────────────────────── */
.field {
  width: 100%;
  padding: 10px 12px;
  border: 0.5px solid var(--border-l2);
  border-radius: var(--radius-md);
  background: var(--bg-2);
  color: var(--label-primary);
  font: 14px/24px var(--font);
}
.field:focus { outline: none; border-color: var(--info-fill); }
.field::placeholder { color: var(--label-caption); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 20px;
  padding: 0 8px;
  border-radius: var(--radius-pill);
  background: var(--interactive-hover);
  color: var(--label-caption);
  font: 600 11px/18px var(--font);
}
.pill-run { background: color-mix(in srgb, var(--info-fill) 18%, transparent); color: var(--info-fill); }
.pill-done { background: var(--ok-soft); color: var(--ok); }
.pill-fail { background: var(--danger-soft); color: var(--danger); }

.kv { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-bottom: 1px solid var(--border-l1); font-size: 13.5px; }
.kv:last-child { border-bottom: none; }
.kv span:first-child { color: var(--label-caption); }
.kv span:last-child { text-align: right; word-break: break-all; font-variant-numeric: tabular-nums; }

/* ── нижняя навигация ─────────────────────────────────────────────────────── */
.tabs {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 8;
  display: flex;
  padding: 6px 8px calc(6px + var(--safe-bottom));
  background: color-mix(in srgb, var(--bg-base) 90%, transparent);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-l1);
}
.tabs button {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  border: none;
  background: none;
  color: var(--label-caption);
  font: 600 11px/16px var(--font);
  padding: 6px 0 4px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}
.tabs button svg { width: 20px; height: 20px; }
.tabs button.active { color: var(--info-fill); }

/* ── тосты ────────────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(150px + var(--safe-bottom));
  z-index: 20;
  max-width: min(92vw, 420px);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-3);
  border: 0.5px solid var(--border-l2);
  box-shadow: var(--shadow-panel);
  color: var(--label-primary);
  font: 13px/20px var(--font);
  transform: translate(-50%, 10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-base) var(--ease), transform var(--t-base) var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { border-color: var(--danger-soft); }

/* ── скелетоны и загрузка ─────────────────────────────────────────────────── */
.skeleton-card { padding: 16px; }
.sk {
  height: 12px;
  border-radius: var(--radius-xs);
  background: linear-gradient(90deg, var(--skeleton) 25%, color-mix(in srgb, var(--skeleton) 40%, transparent) 37%, var(--skeleton) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s var(--ease) infinite;
}
.sk + .sk { margin-top: 10px; }
.sk-title { height: 16px; width: 38%; }
.sk-short { width: 62%; }
.sk-row { height: 44px; border-radius: var(--radius-md); }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

.splash {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 20px;
  padding: 24px;
  background: var(--bg-base);
  background-image: radial-gradient(120% 60% at 50% 0%, color-mix(in srgb, var(--info-fill) 18%, transparent), transparent 62%);
  transition: opacity var(--t-slow) var(--ease), visibility var(--t-slow) var(--ease);
}
.splash.leaving { opacity: 0; visibility: hidden; }
.splash-logo {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-xl);
  background: linear-gradient(150deg, var(--info-fill), var(--info-hover));
  box-shadow: var(--shadow-panel);
  color: #fff;
  font-family: var(--font-brand);
  font-size: 32px;
  animation: breathe 2.6s var(--ease) infinite;
}
@keyframes breathe { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
.splash-title { margin: 0; font-family: var(--font-brand); font-weight: 500; font-size: 26px; letter-spacing: 0.16em; }
.splash-sub { margin: -10px 0 0; color: var(--label-caption); font: var(--font-xxs); text-align: center; }
.splash-bar { position: relative; width: min(240px, 70vw); height: 4px; border-radius: var(--radius-pill); background: var(--border-l2); overflow: hidden; }
.splash-bar::after {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 38%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, transparent, var(--info-fill), transparent);
  animation: bar-run 1.5s var(--ease) infinite;
}
@keyframes bar-run { 0% { transform: translateX(-110%); } 100% { transform: translateX(320%); } }
.splash-steps { display: grid; gap: 7px; min-height: 58px; }
.splash-step { display: flex; align-items: center; gap: 8px; color: var(--label-caption); font: var(--font-xxs); }
.splash-step .tick { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--border-l3); display: grid; place-items: center; font-size: 9px; }
.splash-step.done { color: var(--label-secondary); }
.splash-step.done .tick { background: var(--ok); border-color: var(--ok); color: #06210f; }
.splash-step.active { color: var(--label-primary); }
.splash-step.active .tick { border-color: var(--info-fill); box-shadow: 0 0 0 3px color-mix(in srgb, var(--info-fill) 22%, transparent); }
.splash-foot { position: fixed; bottom: calc(24px + var(--safe-bottom)); color: var(--label-caption); font: var(--font-xxs); letter-spacing: 0.06em; }

.loading { color: var(--label-caption); text-align: center; padding: 48px 0; }

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

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: var(--border-l3); border-radius: var(--radius-pill); }
