/* RosTransBud Driver: light + yellow, styled after the "Delvora" reference (docs/design/ref-main-delvora.jpg).
   Warm light page, very rounded white cards with soft wide shadows, pill buttons and chips,
   round yellow badges, big bold numbers. Light theme only. Font: Manrope (vendored, Cyrillic + Latin). */

@font-face {
  font-family: "Manrope"; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url("vendor/manrope-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope"; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url("vendor/manrope-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --page: #f3f1ee;
  --card: #ffffff;
  --ink: #18181b;
  --ink-2: #3f3f46;
  --muted: #6b6760;          /* warm grey: 5.6:1 on white, 4.9:1 on the page */
  --soft: #f5f3ef;           /* inner panels, fields */
  --soft-2: #ebe7e1;         /* pill chips, pressed */
  --line: #e9e5df;
  --yellow: #f5c518;
  --yellow-2: #e0b000;
  --yellow-soft: #fdf3c4;
  --yellow-ink: #614700;     /* text on soft yellow: 7.5:1 */
  --red-ink: #b42318;
  --red-soft: #fdeceb;
  --red-line: #f6c9c5;
  --r-card: 24px;
  --r-inner: 18px;
  --r-field: 16px;
  --shadow-card: 0 20px 44px -26px rgb(70 55 20 / .30), 0 2px 8px rgb(70 55 20 / .05);
  --shadow-soft: 0 10px 22px -14px rgb(70 55 20 / .35), 0 1px 3px rgb(70 55 20 / .06);
  --shadow-yellow: 0 10px 22px -10px rgb(224 176 0 / .65);
  --tap: 48px;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(130% 55% at 50% -8%, #fff0b3 0%, rgb(255 240 179 / 0) 62%),
    linear-gradient(180deg, #fbf6e8 0, var(--page) 460px) no-repeat,
    var(--page);
  font: 500 16px/1.45 "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
input, select, textarea, button { font: inherit; color: inherit; }
button, a, label, input, select, textarea, .chip, .cat-btn { touch-action: manipulation; }
button { cursor: pointer; }

/* ---------- icons ---------- */
.ico { display: inline-flex; width: 20px; height: 20px; flex: none; }
.ico svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- round icon buttons ---------- */
.round-btn {
  width: var(--tap); height: var(--tap); flex: none; border-radius: 50%;
  display: inline-grid; place-items: center; padding: 0;
  background: var(--card); color: var(--ink); border: 1px solid rgb(0 0 0 / .04);
  box-shadow: var(--shadow-soft);
  transition: transform .1s ease-out;
}
.round-btn:active { transform: scale(.94); }
.round-btn.round-lg { width: 60px; height: 60px; }
.round-btn.round-lg .ico { width: 22px; height: 22px; }

/* ---------- hero ---------- */
.hero { max-width: 640px; margin: 0 auto; padding: calc(12px + env(safe-area-inset-top)) 16px 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-badge {
  width: 44px; height: 44px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--yellow); color: var(--ink); box-shadow: var(--shadow-yellow);
}
.brand-badge .ico { width: 23px; height: 23px; }
.brand-txt { display: flex; align-items: center; gap: 6px; min-width: 0; }
.brand-txt b { font-size: 20px; font-weight: 800; font-style: italic; letter-spacing: -.03em; white-space: nowrap; }
.brand-tag {
  font-size: 12px; font-weight: 800; letter-spacing: .02em; padding: 3px 9px; border-radius: 999px;
  background: var(--ink); color: var(--yellow);
}

.hero-truck { margin: 6px -14px -2px; position: relative; }
.hero-truck svg { display: block; width: 100%; height: auto; }

.hero-text { padding: 4px 2px 14px; }
.kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 14px; font-weight: 600; color: var(--muted); }
.kicker .k { display: inline-flex; align-items: center; gap: 5px; }
.kicker .ico { width: 16px; height: 16px; }
.headline {
  margin: 6px 0 10px; font-size: 31px; line-height: 1.08; font-weight: 800; font-style: italic; letter-spacing: -.03em;
  overflow-wrap: anywhere;
}
.headline .arrow { color: var(--yellow-2); font-style: normal; }
.headline.placeholder { color: #9b958b; }
.status-pill {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: 999px;
  background: var(--soft-2); color: var(--ink-2); font-size: 13.5px; font-weight: 700;
}
.status-pill:empty { display: none; }
.status-pill .ico { width: 16px; height: 16px; }
.status-pill.ready { background: var(--yellow); color: var(--ink); }
.status-pill.bad { background: var(--red-soft); color: var(--red-ink); }

/* trip card: timeline + From/To rows + big numbers */
.trip-card { padding: 16px; margin-bottom: 0; }
.timeline { display: flex; align-items: center; gap: 0; margin: 2px 2px 14px; }
.tl-node {
  width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--ink); color: #fff;
}
.tl-node .ico { width: 18px; height: 18px; }
.tl-node.end { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.tl-node.end.on { background: var(--yellow); box-shadow: none; }
.tl-node.via { width: 14px; height: 14px; background: var(--soft-2); box-shadow: inset 0 0 0 3px var(--card), 0 0 0 1.5px #c9c3b9; }
.tl-line { flex: 1; height: 0; border-top: 2px dashed #cdc7bd; margin: 0 4px; }
.trip-inner { border-radius: var(--r-inner); background: var(--soft); padding: 4px 14px; }
.tr-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; padding: 10px 0; }
.tr-row + .tr-row { border-top: 1px solid var(--line); }
.tr-row > div { min-width: 0; }
.tr-row .r { text-align: right; }
.tr-row .lbl { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.tr-row b { display: block; font-size: 16px; font-weight: 800; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-row b.none { color: #a29c92; font-weight: 600; }
.tr-row small { display: block; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.tr-via { font-size: 13px; color: var(--muted); font-weight: 600; padding: 0 0 8px; margin-top: -4px; }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding-top: 14px; }
.stat { text-align: center; padding: 0 4px; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat-v { font-size: 28px; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat-v small { font-size: 14px; font-weight: 700; margin-left: 3px; color: var(--muted); letter-spacing: 0; }
.stat-v.err { color: var(--red-ink); }
.stat-l { margin-top: 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
.stat-extra { margin-top: 10px; text-align: center; font-size: 13px; font-weight: 600; color: var(--muted); }

/* ---------- layout ---------- */
#app { max-width: 640px; margin: 0 auto; padding: 16px 16px calc(170px + env(safe-area-inset-bottom)); }
.card {
  background: var(--card); border-radius: var(--r-card); box-shadow: var(--shadow-card);
  padding: 20px 16px; margin-bottom: 16px;
}
.card-title { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.card-title > .ico {
  width: 42px; height: 42px; padding: 10px; border-radius: 50%;
  background: var(--yellow); color: var(--ink); box-shadow: var(--shadow-yellow);
}
.card-title .h-sum { margin-left: auto; }
.card-desc { margin: -8px 0 14px; font-size: 14px; color: var(--muted); }
h3 { font-size: 15px; font-weight: 800; margin: 18px 0 8px; }

/* ---------- fields ---------- */
label, .field-label { display: block; font-size: 13.5px; font-weight: 600; color: var(--muted); margin-bottom: 12px; }
.field { margin-bottom: 14px; }
.field-label { margin-bottom: 8px; }
input, select, textarea {
  display: block; width: 100%; min-width: 0; margin-top: 6px;
  min-height: 52px; padding: 12px 16px;
  border: 1.5px solid transparent; border-radius: var(--r-field);
  background: var(--soft); color: var(--ink);
  font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums;
  transition: transform .1s ease-out;
}
input[type="date"] { -webkit-appearance: none; appearance: none; padding: 10px 8px 10px 14px; font-size: 15.5px; font-weight: 700; letter-spacing: -.01em; }
input::placeholder, textarea::placeholder { color: #a29c92; font-weight: 600; }
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: none; background: var(--card); border-color: var(--yellow-2); box-shadow: 0 0 0 4px rgb(245 197 24 / .32);
}
textarea { resize: vertical; line-height: 1.4; font-weight: 600; }
input.invalid { border-color: #e5847b; background: var(--red-soft); }
.row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 10px; }
.row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 10px; }
/* Keep inputs on one line even when a label wraps to two lines. */
.row2 > label, .row3 > label { display: flex; flex-direction: column; justify-content: flex-end; }
.bal { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-top: 5px; min-height: 1.3em; }
.bal.neg { color: var(--red-ink); }

/* ---------- pill buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 0 20px; border-radius: 999px; border: 0;
  font-size: 15.5px; font-weight: 800; white-space: nowrap; user-select: none;
  transition: transform .1s ease-out;
}
.btn:active { transform: scale(.96); opacity: .9; }
.btn:disabled { opacity: .55; pointer-events: none; }
.btn-primary { background: var(--yellow); color: var(--ink); box-shadow: var(--shadow-yellow); }
.btn-primary:hover { background: #f0bd00; }
.btn-secondary { background: var(--soft-2); color: var(--ink); }
.btn-outline { background: var(--card); color: var(--ink); box-shadow: var(--shadow-soft); }
.btn-block { display: flex; width: 100%; }
.text-destructive { color: var(--red-ink); }
.btn:focus-visible, .round-btn:focus-visible, .chip:focus-visible, .cat-btn:focus-visible,
.toggle button:focus-visible, .pill-cta:focus-visible, .bar-status:focus-visible {
  outline: none; box-shadow: 0 0 0 4px rgb(245 197 24 / .55);
}

/* ---------- pill chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.chips:empty { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 6px 16px; border-radius: 999px; border: 0;
  background: var(--soft-2); color: var(--ink);
  font-size: 15px; font-weight: 700; line-height: 1.2; text-align: left;
  transition: transform .1s ease-out;
}
.chip:active { transform: scale(.96); }
.chip .ico { width: 17px; height: 17px; }
.chip[aria-pressed="true"] { background: var(--yellow); color: var(--ink); font-weight: 800; box-shadow: var(--shadow-yellow); }
.chip.add { background: transparent; box-shadow: inset 0 0 0 1.5px #d4cec5; color: var(--ink-2); }
.chip.sm { font-size: 14px; padding: 4px 14px; }
.chip.car { padding: 6px 8px 6px 16px; }
/* Number plate badge */
.plate {
  display: inline-flex; align-items: center; height: 26px; padding: 0 8px 0 0; border-radius: 6px;
  background: #fff; color: #18181b; box-shadow: inset 0 0 0 1.5px #18181b;
  font: 800 13px/1 "Manrope", ui-monospace, monospace; letter-spacing: .03em; white-space: nowrap; vertical-align: middle;
}
.plate::before { content: ""; align-self: stretch; width: 8px; margin-right: 7px; background: var(--yellow); border-radius: 6px 0 0 6px; box-shadow: inset 0 0 0 1.5px #18181b; }

/* route: one city per row, 2-5 rows */
.cities { list-style: none; margin: 0 0 10px; padding: 0; }
.city-row { display: flex; align-items: center; gap: 8px; position: relative; }
.city-row + .city-row { margin-top: 8px; }
.city-row input { margin-top: 0; flex: 1; }
.city-mark { width: 30px; flex: none; display: grid; place-items: center; align-self: stretch; position: relative; }
.city-mark i { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; position: relative; z-index: 1; }
.city-mark i .ico { width: 16px; height: 16px; }
.city-row.to .city-mark i { background: var(--yellow); color: var(--ink); }
.city-row.via .city-mark i { width: 14px; height: 14px; background: var(--card); box-shadow: 0 0 0 3px #c9c3b9; }
.city-row:not(:last-child) .city-mark::after {
  content: ""; position: absolute; left: 50%; top: 50%; height: calc(100% + 8px); border-left: 2px dashed #cdc7bd; transform: translateX(-1px);
}
.city-row .round-btn { width: 44px; height: 44px; box-shadow: none; background: var(--soft); color: var(--ink-2); }
.city-row .round-btn .ico { width: 18px; height: 18px; }
.city-gap { width: 44px; flex: none; }
.add-city { margin: 0 0 4px 38px; }

/* summary: vertical list of stops */
.stops-v { list-style: none; margin: 0; padding: 10px 0 8px; }
.stops-v li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 10px; position: relative; min-height: 28px; }
.stops-v li + li { margin-top: 6px; }
.stops-v .node { width: 14px; height: 14px; border-radius: 50%; justify-self: center; background: var(--ink); position: relative; z-index: 1; }
.stops-v li.via .node { width: 10px; height: 10px; background: var(--card); box-shadow: 0 0 0 2.5px #c9c3b9; }
.stops-v li.to .node { background: var(--yellow); box-shadow: 0 0 0 2.5px var(--ink); }
.stops-v li:not(:last-child)::after {
  content: ""; position: absolute; left: 10px; top: 50%; height: calc(100% + 6px); border-left: 2px dashed #cdc7bd;
}
.stops-v .stop-txt { min-width: 0; line-height: 1.2; }
.stops-v .lbl { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.stops-v b { display: block; font-size: 16px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stops-v li.via b { font-size: 14.5px; font-weight: 700; color: var(--ink-2); }
.stops-v b.none { color: #a29c92; font-weight: 600; }
.stops-v small { font-size: 12.5px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.trip-inner .stops-v + .tr-row { border-top: 1px solid var(--line); }

.add-inline { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.add-inline input { margin-top: 0; flex: 1 1 140px; }
.add-inline .btn { flex: 0 0 auto; }

/* ---------- expenses ---------- */
.cat-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.cat-btn {
  display: flex; align-items: center; gap: 8px; min-height: 64px; padding: 10px 8px;
  border: 0; border-radius: 20px; background: var(--soft); text-align: left;
  transition: transform .1s ease-out;
}
.cat-btn:active { transform: scale(.97); }
.cat-btn .cat-ico { width: 38px; height: 38px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--card); color: var(--ink); box-shadow: var(--shadow-soft); }
.cat-btn .cat-txt { min-width: 0; line-height: 1.2; }
.cat-btn b { display: block; font-size: 13.5px; font-weight: 800; overflow-wrap: anywhere; hyphens: auto; }
.cat-btn small { display: block; margin-top: 3px; font-size: 12.5px; font-weight: 800; color: var(--yellow-ink); }
.cat-btn.has-items { background: var(--yellow-soft); }
.cat-btn.has-items .cat-ico { background: var(--yellow); box-shadow: var(--shadow-yellow); }
.cat-btn:last-child:nth-child(odd) { grid-column: 1 / -1; }

.exp {
  margin-top: 14px; padding: 14px; border-radius: 22px; background: var(--soft);
  animation: rise .15s ease-out;
}
.exp-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.exp-head .cat-ico { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--yellow); flex: none; }
.exp-head .cat-ico .ico { width: 19px; height: 19px; }
.exp-head b { flex: 1; font-size: 15.5px; font-weight: 800; }
.exp-head .del { width: 44px; height: 44px; color: var(--muted); box-shadow: none; }
.exp input { margin-top: 0; background: var(--card); }
.exp input:focus-visible { background: var(--card); }
.exp .amt { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin-bottom: 8px; }
.exp .amt input { font-size: 24px; font-weight: 800; }
.exp .meta { display: grid; grid-template-columns: minmax(0, 9.5em) minmax(0, 1fr); gap: 8px; margin-bottom: 8px; }
.exp .chips { margin: 10px 0 0; }
.exp .chip { background: var(--card); }
.exp .chip[aria-pressed="true"] { background: var(--yellow); }

/* currency pill toggle */
.toggle { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: center; padding: 4px; gap: 2px; border-radius: 999px; background: var(--card); }
.toggle button {
  min-height: 44px; min-width: 44px; padding: 0 8px; border: 0; border-radius: 999px; background: transparent;
  font-size: 13.5px; font-weight: 800; color: var(--muted);
  transition: transform .1s ease-out;
}
.toggle button[aria-pressed="true"] { background: var(--yellow); color: var(--ink); }

/* ---------- results, hints, alerts, badges ---------- */
.result {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; border-radius: var(--r-inner); background: var(--soft);
}
.result:empty { display: none; }
.result .r-l { font-size: 14px; color: var(--muted); font-weight: 700; }
.result .r-v { font-size: 28px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; text-align: right; line-height: 1.1; }
.result .r-v small { font-size: 14px; font-weight: 700; color: var(--muted); margin-left: 3px; letter-spacing: 0; }
.result .r-v.long { font-size: 19px; letter-spacing: -.01em; }
.result.err { background: var(--red-soft); }
.result.err .r-l, .result.err .r-v { color: var(--red-ink); }
.result.err .r-v { font-size: 15px; font-weight: 700; letter-spacing: 0; }

.hint { font-size: 13.5px; font-weight: 600; color: var(--muted); margin: -4px 2px 12px; }
.hint:empty { display: none; }
.hint.warn {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  color: var(--yellow-ink); background: var(--yellow-soft); padding: 12px 14px; border-radius: var(--r-inner); margin: 0 0 12px;
}
.hint .btn { min-height: 44px; padding: 0 16px; font-size: 14px; }

.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 12px; border-radius: 999px;
  font-size: 13px; font-weight: 800; white-space: nowrap; background: var(--yellow); color: var(--ink);
}
.badge:empty { display: none; }
.badge-outline { background: var(--soft-2); color: var(--ink); }

.alert { border-radius: var(--r-card); padding: 16px; margin-bottom: 16px; font-size: 15px; font-weight: 600; }
.alert-destructive { background: var(--red-soft); color: var(--red-ink); box-shadow: inset 0 0 0 1px var(--red-line); }
.alert b { display: flex; align-items: center; gap: 8px; font-weight: 800; }
.alert ul { margin: 8px 0 0; padding-left: 20px; }

.cost-line { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: end; margin-bottom: 10px; }
.cost-line label { margin: 0; }
.auto {
  display: flex; align-items: center; min-height: 52px; padding: 0 16px; margin-top: 6px;
  border-radius: var(--r-field); background: var(--yellow-soft); color: var(--ink);
  font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums;
}
#costs .hint { margin-top: 2px; }
#total-out { margin-top: 4px; }

.footnote { text-align: center; font-size: 13px; font-weight: 600; color: var(--muted); margin: 12px 0 0; }
#btn-new { min-height: 52px; background: var(--card); box-shadow: var(--shadow-soft); }

/* ---------- install card ---------- */
.install { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; align-items: center; background: linear-gradient(135deg, #fff6cf, var(--card) 70%); }
.install-top { margin: 14px 0 0; }
.install img { width: 52px; height: 52px; border-radius: 14px; box-shadow: var(--shadow-soft); }
.install-text { font-size: 14.5px; line-height: 1.4; color: var(--ink-2); }
.install-text > b { display: block; font-size: 16.5px; font-weight: 800; color: var(--ink); margin-bottom: 2px; }
.ios-share { width: 18px; height: 18px; vertical-align: -3px; color: var(--ink); }
.install-btns { grid-column: 1 / -1; display: flex; gap: 8px; }
.install-btns .btn { flex: 1; }

/* ---------- bottom bar: status pill + Delvora-style CTA ---------- */
.bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  padding: 26px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgb(243 241 238 / 0) 0, rgb(243 241 238 / .94) 30%, var(--page) 100%);
  pointer-events: none;
}
.bar > * { max-width: 608px; margin-left: auto; margin-right: auto; pointer-events: auto; }
.bar-status {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 2px 8px;
  width: max-content; max-width: 100%; min-height: 44px; margin-bottom: 10px; padding: 8px 16px;
  border: 0; border-radius: 999px; background: var(--card); box-shadow: var(--shadow-soft);
  font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; text-align: center;
}
.bar-status .w { font-weight: 600; color: var(--yellow-ink); font-size: 13px; }
.bar-status .e { color: var(--red-ink); display: inline-flex; align-items: center; gap: 6px; }
.bar-status .e .ico { width: 16px; height: 16px; }
.bar-btns { display: flex; align-items: center; gap: 10px; }
.pill-cta {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px;
  height: 64px; padding: 0 18px 0 7px; border: 0; border-radius: 999px;
  background: var(--card); color: var(--ink); box-shadow: var(--shadow-card), 0 0 0 1px rgb(0 0 0 / .03);
  transition: transform .1s ease-out;
}
.pill-cta:active { transform: scale(.98); }
.pill-cta:disabled { opacity: .7; }
.cta-dot { width: 50px; height: 50px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--yellow); box-shadow: var(--shadow-yellow); }
.cta-dot .ico { width: 21px; height: 21px; }
.cta-label { flex: 1; text-align: left; font-size: 17px; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cta-chev { display: inline-flex; color: var(--ink); }
.cta-chev .ico { width: 15px; height: 18px; margin-left: -6px; animation: chev 1.6s infinite; }
.cta-chev .ico:nth-child(1) { opacity: .25; }
.cta-chev .ico:nth-child(2) { opacity: .5; animation-delay: .2s; }
.cta-chev .ico:nth-child(3) { opacity: .85; animation-delay: .4s; }
@keyframes chev { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(3px); } }

.bar { transition: transform .15s ease-out, opacity .15s ease-out; will-change: transform; }
body.typing .bar { transform: translateY(110%); opacity: 0; pointer-events: none; }
body.typing .bar > * { pointer-events: none; }
body.typing #app { padding-bottom: 40vh; }

/* ---------- dialog, list, toast ---------- */
dialog {
  width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 40px);
  border: 0; border-radius: var(--r-card); padding: 20px;
  background: var(--card); color: var(--ink); box-shadow: 0 30px 60px -20px rgb(40 30 10 / .35);
}
dialog::backdrop { background: rgb(40 32 16 / .35); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.dlg-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.dlg-head h2 { margin: 0; font-size: 21px; font-weight: 800; font-style: italic; letter-spacing: -.02em; }
.dlg-head .round-btn { box-shadow: none; background: var(--soft); }
.list { list-style: none; margin: 0; padding: 4px; border-radius: var(--r-inner); background: var(--soft); }
.list li { display: flex; align-items: center; gap: 8px; padding: 2px 2px 2px 12px; min-height: 50px; }
.list li + li { border-top: 1px solid var(--line); }
.list li span { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 15px; font-weight: 700; }
.list li .round-btn { width: 44px; height: 44px; box-shadow: none; background: transparent; color: var(--muted); }
.list .empty { color: var(--muted); font-size: 14px; font-weight: 600; }

.toast {
  position: fixed; left: 50%; bottom: calc(150px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  width: max-content; max-width: calc(100vw - 32px); padding: 12px 18px; border-radius: 20px;
  background: var(--ink); color: #fff; box-shadow: 0 16px 30px -12px rgb(0 0 0 / .45);
  font-size: 14.5px; font-weight: 700; z-index: 20; animation: toast-in .15s ease-out;
}

@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
