/* VL Iyer's Wedding Planner — Apple-style design system
   iOS Human Interface conventions: system type, grouped lists, translucent bars,
   sheets, 44pt touch targets, safe areas, light & dark appearance. */

:root {
  color-scheme: light dark;

  /* Brand tint (maroon) and accent (gold) */
  --tint: #8E1B1B;
  --tint-pressed: #6F1414;
  --tint-soft: rgba(142, 27, 27, 0.10);
  --gold: #B8902A;
  --gold-soft: rgba(201, 162, 39, 0.16);
  --on-tint: #FFFFFF;

  /* iOS system colours */
  --bg: #F2F2F7;                 /* systemGroupedBackground */
  --bg-elevated: #FFFFFF;        /* secondarySystemGroupedBackground */
  --bg-tertiary: #F2F2F7;
  --bar: rgba(249, 249, 249, 0.82);
  --fill: rgba(118, 118, 128, 0.12);
  --fill-strong: rgba(118, 118, 128, 0.20);
  --label: #000000;
  --label-2: rgba(60, 60, 67, 0.62);
  --label-3: rgba(60, 60, 67, 0.32);
  --separator: rgba(60, 60, 67, 0.20);
  --green: #248A3D;
  --green-soft: rgba(52, 199, 89, 0.16);
  --red: #D70015;
  --red-soft: rgba(255, 59, 48, 0.12);
  --orange: #C93400;
  --orange-soft: rgba(255, 149, 0, 0.16);
  --blue: #0066CC;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: ui-serif, "New York", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-rounded: ui-rounded, "SF Pro Rounded", var(--font);

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.04);
  --shadow-float: 0 10px 40px rgba(0, 0, 0, 0.16);

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --nav-h: 52px;
  --tab-h: 0px;
  --ease: cubic-bezier(0.32, 0.72, 0, 1); /* iOS sheet curve */
}

@media (prefers-color-scheme: dark) {
  :root {
    --tint: #FF7A6E;
    --tint-pressed: #FF9A90;
    --tint-soft: rgba(255, 122, 110, 0.16);
    --gold: #E5C158;
    --gold-soft: rgba(229, 193, 88, 0.16);
    --on-tint: #1C0505;

    --bg: #000000;
    --bg-elevated: #1C1C1E;
    --bg-tertiary: #2C2C2E;
    --bar: rgba(22, 22, 24, 0.80);
    --fill: rgba(118, 118, 128, 0.24);
    --fill-strong: rgba(118, 118, 128, 0.36);
    --label: #FFFFFF;
    --label-2: rgba(235, 235, 245, 0.62);
    --label-3: rgba(235, 235, 245, 0.30);
    --separator: rgba(84, 84, 88, 0.60);
    --green: #30D158;
    --green-soft: rgba(48, 209, 88, 0.18);
    --red: #FF453A;
    --red-soft: rgba(255, 69, 58, 0.18);
    --orange: #FF9F0A;
    --orange-soft: rgba(255, 159, 10, 0.18);
    --blue: #0A84FF;
    --shadow-card: none;
    --shadow-float: 0 10px 40px rgba(0, 0, 0, 0.6);
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
}

body {
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--label);
  background: var(--bg);
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  padding-left: var(--safe-left);
  padding-right: var(--safe-right);
}

img { max-width: 100%; display: block; }
a { color: var(--tint); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--tint) 55%, transparent); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Typography ---------- */
.large-title { font-size: 34px; line-height: 1.2; font-weight: 700; letter-spacing: 0.01em; }
.title-1 { font-size: 28px; line-height: 1.2; font-weight: 700; }
.title-2 { font-size: 22px; line-height: 1.25; font-weight: 700; }
.title-3 { font-size: 20px; line-height: 1.25; font-weight: 600; }
.headline { font-size: 17px; font-weight: 600; }
.body { font-size: 17px; }
.callout { font-size: 16px; }
.subhead { font-size: 15px; }
.footnote { font-size: 13px; }
.caption { font-size: 12px; }
.serif { font-family: var(--font-serif); letter-spacing: 0; }
.muted { color: var(--label-2); }
.faint { color: var(--label-3); }
.tint { color: var(--tint); }
.gold { color: var(--gold); }
.danger { color: var(--red); }
.success { color: var(--green); }
.bold { font-weight: 600; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Navigation bar ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  padding-top: var(--safe-top);
  background: var(--bar);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid var(--separator);
}
.navbar-inner {
  position: relative;
  max-width: 1120px;
  margin: 0 auto;
  height: var(--nav-h);
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.nav-brand { display: flex; align-items: center; gap: 8px; flex-shrink: 0; transition: opacity .25s; }
.nav-brand img { height: 42px; width: auto; }
@media (min-width: 761px) {
  :root { --nav-h: 64px; }
  .nav-brand img { height: 50px; }
}

/* Compact title (iOS large-title collapse) */
.nav-title {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -30%);
  max-width: calc(100% - 150px);
  font-size: 17px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .25s var(--ease);
}
.navbar.show-title .nav-title { opacity: 1; transform: translate(-50%, -50%); pointer-events: auto; cursor: pointer; }
.navbar.show-title .nav-brand { opacity: 0; pointer-events: none; }
.navbar.show-title .nav-back span { display: none; }
@media (min-width: 761px) { .nav-title { display: none; } }
.nav-brand .logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
  .nav-brand .logo-light { display: none; }
  .nav-brand .logo-dark { display: block; }
}
.nav-back {
  display: inline-flex; align-items: center; gap: 2px;
  color: var(--tint); font-size: 17px; min-height: 44px; margin-left: -6px;
}
.nav-back i { font-size: 20px; width: 20px; text-align: center; }
.nav-links { display: flex; gap: 4px; margin: 0 auto; list-style: none; }
.nav-links a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 999px;
  color: var(--label); font-size: 15px; font-weight: 500;
  transition: background .2s;
}
.nav-links a:hover { background: var(--fill); }
.nav-links a.active { background: var(--tint-soft); color: var(--tint); font-weight: 600; }
.nav-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(145deg, #A62B2B, #6F1414);
  color: #FFF; font-weight: 600; font-size: 14px; letter-spacing: 0;
  flex-shrink: 0; position: relative; overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { width: 64px; height: 64px; font-size: 24px; }
.avatar .dot {
  position: absolute; top: 1px; right: 1px; width: 9px; height: 9px;
  border-radius: 50%; background: var(--red); border: 1.5px solid var(--bg-elevated);
}
.avatar-button { border-radius: 50%; padding: 5px; margin: -5px; }

/* ---------- Tab bar (phones) ---------- */
.tabbar { display: none; }

@media (max-width: 760px) {
  :root { --tab-h: 50px; }
  .nav-links, .nav-desktop-only { display: none !important; }
  .tabbar {
    display: flex;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 100;
    padding: 0 var(--safe-right) var(--safe-bottom) var(--safe-left);
    background: var(--bar);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-top: 0.5px solid var(--separator);
  }
  .tabbar a {
    flex: 1;
    height: var(--tab-h);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    color: var(--label-2);
    font-size: 10px; font-weight: 500; letter-spacing: 0.01em;
  }
  .tabbar a i { font-size: 21px; height: 24px; display: flex; align-items: center; }
  .tabbar a.active { color: var(--tint); }
  .tabbar a:active { opacity: .6; }
}

/* ---------- Page layout ---------- */
.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 12px 16px calc(32px + var(--tab-h) + var(--safe-bottom));
}
.page-narrow { max-width: 680px; }

.page-header {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
  padding: 8px 4px 14px;
}
.page-header .subtitle { color: var(--label-2); font-size: 15px; margin-top: 2px; }

.section { margin-top: 28px; }
.section:first-child { margin-top: 0; }
.section-header {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 0 16px 7px;
  font-size: 13px; text-transform: uppercase; letter-spacing: 0.02em; color: var(--label-2);
}
.section-header.big {
  text-transform: none; letter-spacing: -0.01em;
  font-size: 22px; font-weight: 700; color: var(--label);
  padding: 0 4px 10px;
}
.section-header a, .section-header button { text-transform: none; font-size: 15px; color: var(--tint); letter-spacing: -0.01em; }
.section-footer { padding: 7px 16px 0; font-size: 13px; color: var(--label-2); }

.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; gap: 12px; }
.row-wrap { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.spacer { flex: 1; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid-2 { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
@media (max-width: 480px) {
  .grid { grid-template-columns: 1fr; gap: 14px; }
}

/* ---------- Grouped inset list ---------- */
.list {
  background: var(--bg-elevated);
  border-radius: var(--radius);
  overflow: hidden;
  list-style: none;
}
.list-row {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  min-height: 44px;
  padding: 11px 16px;
  color: var(--label);
  background: var(--bg-elevated);
  width: 100%;
  text-align: left;
}
.list-row + .list-row::before,
.list > li + li > .list-row::before {
  content: "";
  position: absolute; top: 0; right: 0;
  left: var(--sep-inset, 16px);
  border-top: 0.5px solid var(--separator);
}
.list-row.has-icon { --sep-inset: 58px; }
.list-row.has-thumb { --sep-inset: 80px; }
a.list-row:active, button.list-row:active { background: var(--fill); }
.list-row .content { flex: 1; min-width: 0; }
.list-row .title { font-size: 17px; }
.list-row .subtitle { font-size: 15px; color: var(--label-2); margin-top: 1px; }
.list-row .detail { color: var(--label-2); font-size: 17px; text-align: right; }
.list-row .chevron { color: var(--label-3); font-size: 14px; }
.list-row.destructive { color: var(--red); justify-content: center; }
.list-row.action { color: var(--tint); }
.list-row.center { justify-content: center; }

.icon-tile {
  width: 30px; height: 30px; border-radius: 7px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  color: #FFF; font-size: 15px; background: var(--tint);
}
.icon-tile.gold { background: #C49A2C; }
.icon-tile.green { background: #34C759; }
.icon-tile.blue { background: #007AFF; }
.icon-tile.orange { background: #FF9500; }
.icon-tile.gray { background: #8E8E93; }
.icon-tile.purple { background: #AF52DE; }

.thumb { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; flex-shrink: 0; background: var(--fill); }

/* ---------- Cards ---------- */
.card {
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  position: relative;
}
.card-body { padding: 16px; }
a.card { color: inherit; display: block; transition: transform .2s var(--ease); }
a.card:active { transform: scale(0.98); }

/* Service card */
.service-card { display: flex; flex-direction: column; }
.service-card .media { position: relative; aspect-ratio: 16 / 10; background: var(--fill); }
.service-card .media img { width: 100%; height: 100%; object-fit: cover; }
.service-card .media .pill {
  position: absolute; left: 10px; top: 10px;
  background: rgba(0, 0, 0, 0.45);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  color: #FFF; font-size: 12px; font-weight: 600;
  padding: 4px 9px; border-radius: 999px;
}
.service-card .card-body { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.service-card .name { font-size: 17px; font-weight: 600; line-height: 1.3; }
.service-card .desc { font-size: 15px; color: var(--label-2); }
.service-card .price-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 8px; }
.price { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.price-unit { font-size: 13px; color: var(--label-2); font-weight: 400; }

/* Quote card */
.quote-card .card-body { display: flex; flex-direction: column; gap: 12px; }
.quote-card .meta { display: flex; flex-direction: column; gap: 4px; font-size: 15px; color: var(--label-2); }
.quote-card .meta i { width: 18px; text-align: center; color: var(--gold); margin-right: 6px; }
.quote-card .footer {
  display: flex; align-items: flex-end; justify-content: space-between;
  border-top: 0.5px solid var(--separator); padding-top: 12px;
}
.quote-card .total { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 44px; padding: 0 18px;
  border-radius: var(--radius);
  font-size: 17px; font-weight: 600; line-height: 1;
  white-space: nowrap; text-align: center;
  background: var(--tint); color: var(--on-tint);
  transition: opacity .15s, transform .15s, background .15s;
  user-select: none; -webkit-user-select: none;
}
.btn:active { opacity: .75; transform: scale(0.97); }
.btn:disabled, .btn.is-loading { opacity: .45; pointer-events: none; }
.btn-tinted { background: var(--tint-soft); color: var(--tint); }
.btn-gray { background: var(--fill); color: var(--label); }
.btn-plain { background: transparent; color: var(--tint); padding: 0 8px; font-weight: 400; }
.btn-plain.bold { font-weight: 600; }
.btn-danger { background: var(--red-soft); color: var(--red); }
.btn-gold { background: linear-gradient(145deg, #E5C158, #C49A2C); color: #3A1A00; }
.btn-white { background: #FFFFFF; color: #6F1414; }
.btn-sm { min-height: 32px; padding: 0 14px; font-size: 15px; border-radius: 999px; }
.btn-lg { min-height: 50px; font-size: 17px; border-radius: 14px; padding: 0 22px; }
.btn-block { width: 100%; }
.btn-capsule { border-radius: 999px; }
.btn-icon {
  width: 36px; height: 36px; min-height: 0; padding: 0; border-radius: 50%;
  background: var(--fill); color: var(--tint); font-size: 16px;
}
.btn-icon.plain { background: transparent; }
.btn-icon.add { background: var(--tint); color: var(--on-tint); width: 32px; height: 32px; font-size: 15px; }
.btn-icon.danger { color: var(--red); }
.btn.is-loading::after {
  content: ""; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 999px;
  font-size: 12px; font-weight: 600; line-height: 1.2; white-space: nowrap;
  background: var(--fill); color: var(--label-2);
}
.badge.tint { background: var(--tint-soft); color: var(--tint); }
.badge.gold { background: var(--gold-soft); color: var(--gold); }
.badge.green { background: var(--green-soft); color: var(--green); }
.badge.red { background: var(--red-soft); color: var(--red); }
.badge.orange { background: var(--orange-soft); color: var(--orange); }

/* ---------- Forms ---------- */
.field-group { background: var(--bg-elevated); border-radius: var(--radius); overflow: hidden; }
.field {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  min-height: 44px; padding: 0 16px;
  background: var(--bg-elevated);
}
.field + .field::before {
  content: ""; position: absolute; top: 0; right: 0; left: 16px;
  border-top: 0.5px solid var(--separator);
}
.field > label { width: 34%; max-width: 140px; flex-shrink: 0; font-size: 17px; color: var(--label); }
.field.stacked { flex-direction: column; align-items: stretch; gap: 2px; padding-top: 10px; padding-bottom: 10px; }
.field.stacked > label { width: auto; max-width: none; font-size: 13px; color: var(--label-2); }
.field input, .field select, .field textarea {
  flex: 1; min-width: 0;
  border: 0; outline: 0; background: transparent;
  font-size: 17px; /* ≥16px prevents iOS zoom on focus */
  padding: 11px 0;
  color: var(--label);
  -webkit-appearance: none; appearance: none;
}
.field.stacked input, .field.stacked textarea, .field.stacked select { padding: 4px 0; }
.field textarea { resize: vertical; min-height: 88px; line-height: 1.4; }
.field select { padding-right: 18px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='16' viewBox='0 0 10 16'%3E%3Cpath d='M1 6l4-4 4 4M1 10l4 4 4-4' fill='none' stroke='%238E8E93' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right center; }
/* Native dropdown lists (Windows/Android draw them outside the page): give options real colours */
select { color-scheme: light dark; }
select option, select optgroup { background-color: var(--bg-elevated); color: var(--label); direction: ltr; }
.field input[type="date"], .field input[type="time"] { text-align: right; min-height: 22px; }
.field input::placeholder, .field textarea::placeholder { color: var(--label-3); }
.field .prefix { color: var(--label-2); }
.form-hint { font-size: 13px; color: var(--label-2); padding: 7px 16px 0; line-height: 1.4; }
.form-error {
  background: var(--red-soft); color: var(--red);
  border-radius: var(--radius); padding: 12px 14px; font-size: 15px;
  display: flex; gap: 10px; align-items: flex-start;
}
.form-info {
  background: var(--gold-soft); color: var(--label);
  border-radius: var(--radius); padding: 12px 14px; font-size: 15px;
  display: flex; gap: 10px; align-items: flex-start;
}
.form-info i { color: var(--gold); margin-top: 2px; }

/* Standalone search field */
.search {
  position: relative; display: flex; align-items: center;
  background: var(--fill); border-radius: 10px; height: 38px;
}
.search i { position: absolute; left: 10px; color: var(--label-2); font-size: 15px; pointer-events: none; }
.search input {
  width: 100%; height: 100%; border: 0; outline: 0; background: transparent;
  padding: 0 12px 0 34px; font-size: 17px; color: var(--label);
  -webkit-appearance: none; appearance: none;
}
.search input::placeholder { color: var(--label-2); }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }

/* Segmented control */
.segmented {
  display: flex; padding: 2px; border-radius: 9px; background: var(--fill);
  position: relative;
}
.segmented > * {
  flex: 1; min-height: 32px; padding: 0 10px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 7px; font-size: 14px; font-weight: 500; color: var(--label);
  transition: background .2s, box-shadow .2s;
  white-space: nowrap;
}
.segmented > .active {
  background: var(--bg-elevated); font-weight: 600;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12), 0 3px 1px rgba(0, 0, 0, 0.04);
}
@media (prefers-color-scheme: dark) { .segmented > .active { background: #636366; } }

/* iOS switch */
.switch { position: relative; width: 51px; height: 31px; flex-shrink: 0; }
.switch input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch .track {
  position: absolute; inset: 0; border-radius: 999px; background: var(--fill-strong);
  transition: background .25s;
}
.switch .track::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%;
  background: #FFF; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15), 0 3px 1px rgba(0, 0, 0, 0.06);
  transition: transform .25s var(--ease);
}
.switch input:checked + .track { background: #34C759; }
.switch input:checked + .track::after { transform: translateX(20px); }

/* Chips (horizontal filter) */
.chips {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  padding: 2px 16px; margin: 0 -16px;
  scroll-snap-type: x proximity;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; scroll-snap-align: start;
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 34px; padding: 0 14px; border-radius: 999px;
  background: var(--bg-elevated); color: var(--label);
  font-size: 15px; font-weight: 500;
  border: 0.5px solid var(--separator);
}
.chip.active { background: var(--tint); color: var(--on-tint); border-color: transparent; }
.chip i { font-size: 13px; }

/* Stepper */
.stepper {
  display: inline-flex; align-items: center;
  background: var(--fill); border-radius: 9px; height: 34px; flex-shrink: 0;
}
.stepper button {
  width: 38px; height: 34px; display: flex; align-items: center; justify-content: center;
  color: var(--label); font-size: 14px;
}
.stepper button:active { background: var(--fill-strong); }
.stepper button:first-child { border-radius: 9px 0 0 9px; }
.stepper button:last-child { border-radius: 0 9px 9px 0; }
.stepper input {
  width: 64px; height: 34px; border: 0; outline: 0; background: transparent;
  text-align: center; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums;
  border-left: 0.5px solid var(--separator); border-right: 0.5px solid var(--separator);
  -moz-appearance: textfield;
}
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ---------- Sheets (modals) ---------- */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(0, 0, 0, 0.4);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity .3s var(--ease), visibility 0s .3s;
}
.sheet-backdrop.open { opacity: 1; visibility: visible; transition: opacity .3s var(--ease); }
.sheet {
  width: 100%; max-width: 560px;
  max-height: calc(100dvh - var(--safe-top) - 12px);
  background: var(--bg);
  border-radius: 14px 14px 0 0;
  display: flex; flex-direction: column;
  transform: translateY(100%);
  transition: transform .4s var(--ease);
  box-shadow: var(--shadow-float);
  overflow: hidden;
}
.sheet-backdrop.open .sheet { transform: none; }
.sheet-grabber { width: 36px; height: 5px; border-radius: 3px; background: var(--fill-strong); margin: 6px auto 0; flex-shrink: 0; }
.sheet-header {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  min-height: 52px; padding: 0 8px; flex-shrink: 0;
}
.sheet-header h2 { font-size: 17px; font-weight: 600; text-align: center; grid-column: 2; }
.sheet-header .left { grid-column: 1; justify-self: start; }
.sheet-header .right { grid-column: 3; justify-self: end; }
.sheet-body {
  padding: 4px 16px calc(24px + var(--safe-bottom));
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  display: flex; flex-direction: column; gap: 20px;
}
.sheet-body > * { flex-shrink: 0; }
@media (min-width: 761px) {
  .sheet-backdrop { align-items: center; padding: 24px; }
  .sheet { border-radius: 16px; max-height: min(86vh, 860px); transform: translateY(24px) scale(.98); opacity: 0; transition: transform .35s var(--ease), opacity .25s; }
  .sheet-backdrop.open .sheet { transform: none; opacity: 1; }
  .sheet-grabber { display: none; }
  .sheet-body { padding-bottom: 24px; }
}
body.sheet-open { overflow: hidden; }

/* Action sheet & alert */
.action-sheet {
  width: 100%; max-width: 440px; padding: 8px 8px calc(8px + var(--safe-bottom));
  display: flex; flex-direction: column; gap: 8px;
  transform: translateY(110%); transition: transform .4s var(--ease);
}
.sheet-backdrop.open .action-sheet { transform: none; }
.action-group {
  background: color-mix(in srgb, var(--bg-elevated) 88%, transparent);
  -webkit-backdrop-filter: blur(30px); backdrop-filter: blur(30px);
  border-radius: 14px; overflow: hidden;
}
.action-group .action-title { padding: 14px 16px; text-align: center; font-size: 13px; color: var(--label-2); border-bottom: 0.5px solid var(--separator); }
.action-group button {
  display: block; width: 100%; min-height: 57px; font-size: 20px; color: var(--blue);
  border-top: 0.5px solid var(--separator);
}
.action-group button:first-child, .action-group .action-title + button { border-top: 0; }
.action-group button.destructive { color: var(--red); }
.action-group button.cancel { font-weight: 600; }
.action-group button:active { background: var(--fill); }
@media (min-width: 761px) {
  .action-sheet { transform: scale(.96); opacity: 0; transition: transform .25s var(--ease), opacity .2s; padding-bottom: 8px; }
  .sheet-backdrop.open .action-sheet { transform: none; opacity: 1; }
}

.alert-backdrop { align-items: center !important; padding: 24px; }
.alert {
  width: 270px; border-radius: 14px; overflow: hidden; text-align: center;
  background: color-mix(in srgb, var(--bg-elevated) 92%, transparent);
  -webkit-backdrop-filter: blur(30px); backdrop-filter: blur(30px);
  transform: scale(1.12); opacity: 0; transition: transform .25s var(--ease), opacity .2s;
}
.sheet-backdrop.open .alert { transform: none; opacity: 1; }
.alert .alert-text { padding: 19px 16px 18px; }
.alert h3 { font-size: 17px; font-weight: 600; margin-bottom: 4px; }
.alert p { font-size: 13px; line-height: 1.35; }
.alert .alert-actions { display: flex; border-top: 0.5px solid var(--separator); }
.alert .alert-actions button { flex: 1; min-height: 44px; font-size: 17px; color: var(--blue); }
.alert .alert-actions button + button { border-left: 0.5px solid var(--separator); }
.alert .alert-actions button.primary { font-weight: 600; }
.alert .alert-actions button.destructive { color: var(--red); }

/* ---------- Toast (iOS-style notification) ---------- */
.toast-host {
  position: fixed; left: 0; right: 0; top: calc(var(--safe-top) + 8px); z-index: 500;
  display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none;
  padding: 0 12px;
}
.toast {
  pointer-events: auto;
  display: flex; align-items: center; gap: 10px;
  max-width: 420px; width: max-content;
  padding: 10px 14px 10px 12px; border-radius: 999px;
  background: color-mix(in srgb, var(--bg-elevated) 86%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  font-size: 15px; font-weight: 500;
  transform: translateY(-140%); opacity: 0;
  transition: transform .45s var(--ease), opacity .3s;
}
.toast.show { transform: none; opacity: 1; }
.toast i { font-size: 18px; color: var(--green); }
.toast.error i { color: var(--red); }
.toast a { font-weight: 600; margin-left: 4px; }

/* ---------- Home ---------- */
.hero {
  position: relative; overflow: hidden;
  border-radius: var(--radius-xl);
  padding: 24px 20px 22px;
  display: grid; grid-template-columns: 1fr; gap: 28px; align-items: center;
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(229, 193, 88, 0.35), transparent 60%),
    linear-gradient(160deg, #8E1B1B 0%, #4A0A0A 100%);
  color: #FFF;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 4px 14px 4px 4px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 0.5px solid rgba(255, 255, 255, 0.18);
}
.hero-badge .mascot-avatar {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  background: #FFF8E6; overflow: hidden;
  display: flex; align-items: flex-start; justify-content: center;
}
.hero-badge .mascot-avatar img { width: 34px; height: auto; margin-top: 3px; }
.hero .eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: #E5C158; }
.hero h1 { font-family: var(--font-serif); font-size: clamp(32px, 6vw, 52px); line-height: 1.08; font-weight: 700; margin: 16px 0 10px; letter-spacing: 0; }
.hero p { font-size: 17px; line-height: 1.45; color: rgba(255, 255, 255, 0.82); max-width: 560px; }
.hero .actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.hero .btn-glass { background: rgba(255, 255, 255, 0.16); color: #FFF; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.hero-art { display: none; }
@media (max-width: 600px) {
  .hero .actions .btn { flex: 1 1 140px; }
}
@media (min-width: 761px) {
  .hero { grid-template-columns: minmax(0, 1fr) auto; padding: 44px 44px; gap: 40px; }
  .hero-badge .mascot-avatar { display: none; }
  .hero-badge { padding-left: 14px; min-height: 30px; }
  .hero-art {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
    width: 300px; padding: 28px 24px; border-radius: 24px;
    background: rgba(255, 255, 255, 0.08);
    -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
    border: 0.5px solid rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  }
  .hero-art img { width: 252px; height: auto; }
  .hero-art .art-caption { font-size: 13px; color: rgba(255, 255, 255, 0.7); text-align: center; line-height: 1.4; }
  .hero-art .art-caption strong { color: #E5C158; font-weight: 600; }
}

/* Up-next card (home, signed in) */
.up-next { display: grid; gap: 14px; }
.up-next .top { display: flex; align-items: flex-start; gap: 12px; }
.up-next .countdown {
  flex-shrink: 0; width: 64px; height: 64px; border-radius: 16px;
  background: var(--tint-soft); color: var(--tint);
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1;
}
.up-next .countdown strong { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.up-next .countdown span { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; margin-top: 4px; }
.quick-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.quick-action {
  background: var(--bg-elevated); border-radius: var(--radius-lg); box-shadow: var(--shadow-card);
  padding: 14px; display: flex; flex-direction: column; gap: 10px; color: var(--label); min-height: 96px;
  text-align: left; width: 100%;
}
.quick-action:active { transform: scale(.97); }
.quick-action .name { font-size: 15px; font-weight: 600; }
.quick-action .hint { font-size: 13px; color: var(--label-2); margin-top: -6px; }

/* Progress */
.progress { height: 6px; border-radius: 3px; background: var(--fill); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #C49A2C, #E5C158); transition: width .4s var(--ease); }
.progress-label { display: flex; justify-content: space-between; font-size: 13px; color: var(--label-2); margin-bottom: 6px; }
.progress-label strong { color: var(--label); font-weight: 600; }
.checklist-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.checklist-chips .chip { min-height: 28px; padding: 0 10px; gap: 5px; font-size: 13px; background: var(--bg-tertiary); border-style: dashed; }
.checklist-chips .chip i { font-size: 11px; }
.checklist-chips button.chip { min-height: 32px; color: var(--tint); border-color: color-mix(in srgb, var(--tint) 45%, transparent); }
.checklist-chips .chip.done { border-style: solid; background: var(--green-soft); color: var(--green); border-color: transparent; }

.cat-scroller {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr);
  gap: 12px; overflow-x: auto; scrollbar-width: none;
  padding: 2px 16px 4px; margin: 0 -16px; scroll-snap-type: x mandatory;
}
.cat-scroller::-webkit-scrollbar { display: none; }
.cat-tile {
  scroll-snap-align: start;
  background: var(--bg-elevated); border-radius: var(--radius-lg);
  padding: 14px; display: flex; flex-direction: column; gap: 10px;
  color: var(--label); box-shadow: var(--shadow-card);
  min-height: 112px;
}
.cat-tile:active { transform: scale(.97); }
.cat-tile .icon-tile { width: 36px; height: 36px; border-radius: 9px; font-size: 17px; }
.cat-tile .name { font-size: 15px; font-weight: 600; line-height: 1.25; }

.steps { counter-reset: step; }
.steps .list-row .num-badge {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--gold-soft); color: var(--gold); font-weight: 700; font-size: 15px;
}

/* ---------- Planner ---------- */
.planner-header { padding: 4px 4px 16px; }
.planner-header h1 { font-family: var(--font-serif); font-size: 30px; line-height: 1.15; font-weight: 700; letter-spacing: 0; }
.planner-header .row-wrap { margin-top: 10px; }

.item-row { align-items: flex-start; padding-top: 12px; padding-bottom: 12px; }
.item-row .content { display: flex; flex-direction: column; gap: 3px; }
.item-row .name { font-size: 17px; font-weight: 600; line-height: 1.3; }
.item-row .desc { font-size: 14px; color: var(--label-2); }
.item-row .rate { font-size: 14px; color: var(--label-2); font-variant-numeric: tabular-nums; }
.item-row .controls { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; min-height: 34px; }
.item-row .fixed-label { font-size: 14px; color: var(--label-2); }
.item-label {
  display: inline-flex; align-items: center; gap: 5px;
  margin-bottom: 4px; padding: 3px 9px; border-radius: 999px;
  background: var(--tint-soft); color: var(--tint);
  font-size: 12px; font-weight: 600; letter-spacing: 0.02em; line-height: 1.3;
}
.item-label i { font-size: 10px; }
.item-label.is-unset { background: transparent; color: var(--label-2); border: 1px dashed var(--separator); font-weight: 500; }
button.item-label:active { opacity: .6; }
.btn-icon.add.added { background: var(--green-soft); color: var(--green); }
.item-row .line-total { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; margin-left: auto; }
.item-row .planner-note {
  margin-top: 8px; padding: 10px 12px; border-radius: 10px;
  background: var(--gold-soft); font-size: 14px; line-height: 1.45;
}
.item-row .planner-note .label { font-size: 12px; font-weight: 600; color: var(--gold); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 3px; display: flex; justify-content: space-between; align-items: center; }
.note-link { color: var(--tint); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; word-break: break-word; }
.note-link i { font-size: 0.75em; }

.total-bar {
  position: sticky; z-index: 50;
  bottom: calc(var(--tab-h) + var(--safe-bottom) + 10px);
  margin-top: 24px;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 12px 12px 18px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--bg-elevated) 82%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.14);
  border: 0.5px solid var(--separator);
}
.total-bar .label { font-size: 12px; color: var(--label-2); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; }
.total-bar .amount { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.total-bar .btn { margin-left: auto; }

.frozen-banner {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--orange-soft); color: var(--label);
  padding: 12px 14px; border-radius: var(--radius); font-size: 15px;
}
.frozen-banner i { color: var(--orange); font-size: 18px; margin-top: 1px; }

.empty {
  text-align: center; padding: 40px 24px;
  background: var(--bg-elevated); border-radius: var(--radius-lg);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.empty .empty-icon {
  width: 64px; height: 64px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--gold-soft); color: var(--gold); font-size: 26px; margin-bottom: 6px;
}
.empty p { color: var(--label-2); font-size: 15px; max-width: 360px; }
.empty .row-wrap { justify-content: center; margin-top: 10px; }

.prompt-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-elevated); border-radius: var(--radius);
  padding: 12px 12px 12px 14px;
}
.prompt-card .content { flex: 1; min-width: 0; font-size: 15px; }

/* Install hint (iOS Safari) */
.install-hint {
  position: fixed; z-index: 200;
  left: 12px; right: 12px; bottom: calc(var(--tab-h) + var(--safe-bottom) + 12px);
  max-width: 420px; margin: 0 auto;
  display: flex; gap: 12px; align-items: center;
  padding: 12px 12px 12px 12px; border-radius: 18px;
  background: color-mix(in srgb, var(--bg-elevated) 88%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px);
  box-shadow: var(--shadow-float);
  font-size: 14px; line-height: 1.35;
  animation: hint-in .5s var(--ease) both;
}
.install-hint img { width: 44px; height: 44px; border-radius: 10px; flex-shrink: 0; }
.install-hint .share-glyph { color: var(--blue); }
@keyframes hint-in { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Login */
.auth-wrap { max-width: 420px; margin: 0 auto; padding-top: 12px; }
.auth-logo { display: flex; justify-content: center; margin: 8px 0 18px; }
.auth-logo img { width: 220px; height: auto; }
.auth-logo .logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
  .auth-logo .logo-light { display: none; }
  .auth-logo .logo-dark { display: block; }
}

/* Footer */
.site-footer {
  max-width: 1120px; margin: 0 auto;
  padding: 24px 20px calc(24px + var(--tab-h) + var(--safe-bottom));
  font-size: 13px; color: var(--label-2); text-align: center; line-height: 1.6;
}
.site-footer a { color: var(--label-2); text-decoration: underline; text-underline-offset: 2px; }
.standalone .site-footer { display: none; }

/* Admin table-like lists */
.admin-row .content .title { font-weight: 600; }
.admin-row .actions { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
@media (max-width: 600px) {
  .admin-row { flex-wrap: wrap; }
  .admin-row .actions { width: 100%; justify-content: flex-end; padding-left: 0; }
  .admin-row.has-thumb { flex-wrap: nowrap; }
  .admin-row.has-thumb .actions { width: auto; }
}

/* ---------- Planning assistant (chat) ---------- */
.chat-page .site-footer, .chat-page .install-hint { display: none; }
.chat-page { --dock-h: 120px; --kb: 0px; }
.chat {
  max-width: 760px; margin: 0 auto;
  padding: 0 12px calc(var(--dock-h) + var(--tab-h) + var(--safe-bottom) + var(--kb) + 12px);
}
.chat-context {
  position: sticky; top: calc(var(--nav-h) + var(--safe-top)); z-index: 30;
  display: flex; align-items: center; gap: 4px;
  padding: 8px 0;
  background: linear-gradient(var(--bg) 70%, transparent);
}
.context-pill {
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 8px;
  min-height: 40px; padding: 0 14px; border-radius: 999px;
  background: var(--bg-elevated); box-shadow: var(--shadow-card);
  border: 0.5px solid var(--separator);
  font-size: 15px; text-align: left;
}
.context-pill .context-label { font-size: 12px; font-weight: 600; color: var(--gold); text-transform: uppercase; letter-spacing: 0.05em; flex-shrink: 0; }
.context-pill .context-title { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.context-pill i { color: var(--label-2); font-size: 12px; }

.chat-log { display: flex; flex-direction: column; gap: 4px; padding-top: 4px; }
.chat-day { align-self: center; font-size: 12px; color: var(--label-2); font-weight: 600; margin: 10px 0 6px; }

.msg-row { display: flex; align-items: flex-end; gap: 8px; max-width: 100%; animation: msg-in .35s var(--ease) both; }
.msg-row.user { justify-content: flex-end; }
.msg-row.bot .avatar-slot { width: 30px; flex-shrink: 0; align-self: flex-end; }
.msg-row.bot .avatar-slot img {
  width: 30px; height: 30px; border-radius: 50%; object-fit: cover; object-position: top;
  background: #FFF8E6; border: 0.5px solid var(--separator);
}
.msg-row + .msg-row.user, .msg-row.bot + .msg-row.bot { margin-top: 0; }
.msg-row.user + .msg-row.bot, .msg-row.bot + .msg-row.user { margin-top: 10px; }
@keyframes msg-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }

.bubble {
  max-width: min(78%, 520px);
  padding: 9px 14px; border-radius: 20px;
  font-size: 16px; line-height: 1.38; word-wrap: break-word; overflow-wrap: anywhere;
}
.msg-row.user .bubble { background: var(--tint); color: var(--on-tint); border-bottom-right-radius: 6px; }
.msg-row.bot .bubble { background: var(--bg-elevated); color: var(--label); border-bottom-left-radius: 6px; box-shadow: var(--shadow-card); }
@media (prefers-color-scheme: dark) { .msg-row.bot .bubble { background: #26252A; } }
.bubble strong { font-weight: 600; }
.bubble.error { background: var(--red-soft) !important; color: var(--red) !important; }

.typing { display: inline-flex; gap: 4px; padding: 14px 16px; }
.typing span { width: 8px; height: 8px; border-radius: 50%; background: var(--label-3); animation: typing 1.2s infinite ease-in-out; }
.typing span:nth-child(2) { animation-delay: .15s; }
.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }

/* Rich cards inside the chat */
.chat-card { flex: 1; min-width: 0; max-width: 560px; }
.chat-card .card { border-radius: 18px; }
.svc-carousel {
  display: grid; grid-auto-flow: column; grid-auto-columns: 210px; gap: 10px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  padding: 2px 2px 6px; margin: 0 -12px 0 -2px; padding-right: 12px;
}
.svc-carousel::-webkit-scrollbar { display: none; }
.svc-card { scroll-snap-align: start; display: flex; flex-direction: column; }
.svc-card .media { aspect-ratio: 4 / 3; background: var(--fill); }
.svc-card .media img { width: 100%; height: 100%; object-fit: cover; }
.svc-card .body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.svc-card .cat { font-size: 11px; font-weight: 600; color: var(--gold); text-transform: uppercase; letter-spacing: 0.04em; }
.svc-card .name { font-size: 15px; font-weight: 600; line-height: 1.25; }
.svc-card .desc { font-size: 13px; color: var(--label-2); }
.svc-card .foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 8px; }
.svc-card .price { font-size: 15px; }
.svc-card .estimate { font-size: 12px; color: var(--label-2); }

.quote-summary .card-body { display: flex; flex-direction: column; gap: 12px; }
.quote-summary .head { display: flex; gap: 12px; align-items: flex-start; }
.quote-summary .title { font-family: var(--font-serif); font-size: 19px; font-weight: 700; line-height: 1.2; flex: 1; }
.quote-summary .meta { font-size: 14px; color: var(--label-2); margin-top: 3px; }
.quote-summary .total { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.quote-summary .breakdown { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.quote-summary .breakdown div { display: flex; justify-content: space-between; gap: 8px; color: var(--label-2); }
.quote-summary .breakdown span:last-child { color: var(--label); font-variant-numeric: tabular-nums; }
.quote-summary .missing { display: flex; flex-wrap: wrap; gap: 6px; }
.quote-summary .missing button { min-height: 30px; font-size: 13px; color: var(--tint); border-style: dashed; border-color: color-mix(in srgb, var(--tint) 45%, transparent); background: transparent; }
.quote-summary .actions { display: flex; gap: 8px; }
.quote-summary .actions .btn { flex: 1; }

.chat-form .card-body { display: flex; flex-direction: column; gap: 12px; }
.chat-form .field-group { background: var(--bg); }
@media (prefers-color-scheme: dark) { .chat-form .field-group, .chat-form .field { background: #2C2C2E; } }
.chat-form .field { background: transparent; }
.chat-form.done { opacity: .6; pointer-events: none; }

.confirm-card { display: flex; flex-direction: column; gap: 10px; }
.confirm-card .row-wrap .btn { flex: 1 1 auto; }

.list-card .list-row { cursor: pointer; }
.list-card .check { color: var(--tint); font-size: 18px; }

/* Dock: suggestions + composer */
.chat-dock {
  position: fixed; z-index: 90; left: 0; right: 0;
  bottom: calc(var(--tab-h) + var(--safe-bottom) + var(--kb));
  padding: 6px 12px 8px;
  background: var(--bar);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-top: 0.5px solid var(--separator);
}
.chat-dock > * { max-width: 760px; margin-left: auto; margin-right: auto; }
.chat-suggestions {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  padding: 2px 0 8px;
}
.chat-suggestions::-webkit-scrollbar { display: none; }
.chat-suggestions button {
  flex-shrink: 0; min-height: 34px; padding: 0 14px; border-radius: 999px;
  background: var(--bg-elevated); color: var(--tint);
  border: 0.5px solid color-mix(in srgb, var(--tint) 35%, var(--separator));
  font-size: 15px; font-weight: 500; white-space: nowrap;
}
.chat-suggestions button:active { background: var(--tint-soft); }
.composer {
  display: flex; align-items: flex-end; gap: 8px;
  background: var(--bg-elevated);
  border: 0.5px solid var(--separator);
  border-radius: 22px; padding: 4px 4px 4px 14px;
}
.composer textarea {
  flex: 1; border: 0; outline: 0; background: transparent; resize: none;
  font-size: 17px; line-height: 1.35; padding: 7px 0; max-height: 132px;
  color: var(--label);
}
.composer textarea::placeholder { color: var(--label-3); }
.composer .send {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--tint); color: var(--on-tint); font-size: 15px;
  transition: opacity .15s, transform .15s;
}
.composer .send:disabled { opacity: .3; }
.composer .send:not(:disabled):active { transform: scale(.9); }
.chat-footnote { font-size: 11px; color: var(--label-3); text-align: center; padding-top: 6px; }
@media (max-width: 760px) {
  .chat-page.keyboard-open .tabbar { display: none; }
  .chat-page.keyboard-open { --tab-h: 0px; }
  .chat-page.keyboard-open .chat-footnote { display: none; }
}

/* Utilities */
.mt-0 { margin-top: 0 !important; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.text-center { text-align: center; }
.w-full { width: 100%; }

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

@media print {
  .navbar, .tabbar, .total-bar, .site-footer, .install-hint { display: none !important; }
}
