/* =========================================================
   Travel Wallet — Design tokens & global styles
   Mobile-first, max-width 430px, Apple-like premium minimalism
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Manrope:wght@600;700;800&display=swap');

:root {
  /* Brand */
  --vine-green: #EF486A;
  --vine-green-light: #F56E8A;
  --vine-green-dark: #C7304F;
  --accent-orange: #F2994A;

  /* Neutrals (light) */
  --white: #FFFFFF;
  --gray-50: #F7F8F7;
  --gray-100: #EEF1EE;
  --gray-200: #E1E5E1;
  --gray-300: #CBD1CC;
  --gray-500: #8B928C;
  --gray-600: #656C67;
  --gray-800: #2B302C;
  --gray-900: #14170F;

  --bg: var(--gray-50);
  --surface: var(--white);
  --surface-alt: var(--gray-100);
  --text: var(--gray-900);
  --text-muted: var(--gray-600);
  --border: var(--gray-200);
  --danger: #D64545;

  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --shadow-soft: 0 2px 10px rgba(20, 23, 15, 0.05), 0 10px 30px rgba(20, 23, 15, 0.06);
  --shadow-pop: 0 8px 24px rgba(20, 23, 15, 0.14);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --t-fast: 150ms;
  --t: 200ms;

  /* Latin fonts first; the system fonts after them cover Chinese, Japanese,
     Korean and Thai, which Inter/Manrope don't include. */
  --font-system-intl: system-ui, -apple-system, 'PingFang TC', 'PingFang SC', 'Hiragino Sans',
    'Apple SD Gothic Neo', 'Noto Sans CJK TC', 'Noto Sans CJK SC', 'Noto Sans CJK JP', 'Noto Sans CJK KR',
    'Noto Sans Thai', 'Thonburi', 'Microsoft JhengHei', 'Microsoft YaHei', 'Yu Gothic', 'Malgun Gothic', 'Leelawadee UI', sans-serif;
  --font-display: 'Manrope', 'Inter', var(--font-system-intl);
  --font-body: 'Inter', var(--font-system-intl);

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

[data-theme='dark'] {
  --bg: #101410;
  --surface: #181C18;
  --surface-alt: #20241F;
  --text: #F2F5F2;
  --text-muted: #9BA39C;
  --border: #2A2F29;
  --vine-green-light: #F56E8A;
  --shadow-soft: 0 2px 10px rgba(0, 0, 0, 0.3), 0 10px 30px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--gray-200);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-tap-highlight-color: transparent;
}

html[data-theme='dark'], [data-theme='dark'] body { background: #05070A; }

body {
  display: flex;
  justify-content: center;
}

button, input, textarea {
  font-family: inherit;
  color: inherit;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; }
p { margin: 0; }

::selection { background: var(--vine-green-light); color: white; }

/* Focus visibility for accessibility */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--vine-green-light);
  outline-offset: 2px;
}

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

/* =========================================================
   App shell
   ========================================================= */
#app {
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  position: relative;
  display: flex;
  flex-direction: column;
  /* clip (not hidden): hidden turns #app into a scroll container, which
     stopped the sticky top bar from sticking. */
  overflow-x: clip;
  box-shadow: var(--shadow-pop);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(14px + var(--safe-top)) 20px 12px;
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
}

/* Header wordmark: VINEdots mark + "VINEdots Travel Wallet", one purple → pink
   gradient from the mark (brand-1 → brand-2) through the text (brand-2 → brand-3). */
:root { --brand-1: #5D3583; --brand-2: #7C3E86; --brand-3: #D3568E; }
[data-theme='dark'] { --brand-1: #9A6BD0; --brand-2: #B266B8; --brand-3: #EC7AA8; } /* same hues, lifted to read on dark */
.brand { display: flex; align-items: center; gap: 8px; min-width: 0; flex-shrink: 1; }
.brand-mark { width: 32px; height: 29px; flex-shrink: 0; }
.brand-text {
  display: flex; flex-direction: column; min-width: 0; line-height: 1.05;
  background: linear-gradient(90deg, var(--brand-2), var(--brand-3));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-family: var(--font-display); white-space: nowrap;
}
.brand-company { font-size: 11px; font-weight: 800; letter-spacing: 0.04em; }
.brand-app { font-size: 17px; font-weight: 800; letter-spacing: -0.01em; }

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  transition: transform var(--t-fast) var(--ease), background var(--t) var(--ease);
}
.icon-btn:active { transform: scale(0.92); }
.icon-btn svg { width: 19px; height: 19px; stroke: var(--text); }

main {
  flex: 1;
  /* room for the bottom nav + floating buttons so the last card isn't hidden */
  padding-bottom: calc(160px + var(--safe-bottom));
  position: relative;
}

.page {
  display: none;
  padding: 4px 20px 24px;
  animation: fadeIn var(--t) var(--ease);
}
.page.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   Bottom navigation
   ========================================================= */
.bottom-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(14px + var(--safe-bottom));
  width: calc(100% - 40px);
  max-width: 390px;
  background: var(--surface);
  border-radius: 24px;
  box-shadow: var(--shadow-pop);
  display: flex;
  padding: 8px;
  z-index: 30;
}

.bottom-nav .nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 4px 6px;
  border-radius: 16px;
  color: var(--text-muted);
  transition: color var(--t) var(--ease), background var(--t) var(--ease);
}
.bottom-nav .nav-btn svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; }
.bottom-nav .nav-btn { min-width: 0; }
.bottom-nav .nav-btn span { font-size: 11px; font-weight: 600; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bottom-nav .nav-btn.active { color: var(--vine-green); background: var(--surface-alt); }

/* Camera FAB */
.fab {
  position: fixed;
  right: calc(50% - 195px + 20px);
  bottom: calc(92px + var(--safe-bottom));
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--vine-green);
  box-shadow: 0 10px 24px rgba(239, 72, 106, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 30;
  transition: transform var(--t-fast) var(--ease);
}
.fab:active { transform: scale(0.92); }
.fab svg { width: 24px; height: 24px; stroke: white; fill: none; stroke-width: 2; }

@media (max-width: 430px) {
  .fab { right: 20px; }
}

/* =========================================================
   Calculator
   ========================================================= */
.rate-tip-row {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  align-items: stretch;
}
.rate-row { display: flex; margin-top: 10px; }

.rate-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
  padding: 10px 8px;
  background: var(--surface);
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-orange);
}
.rate-pill span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rate-pill button.edit-rate {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.rate-pill svg { width: 13px; height: 13px; stroke: currentColor; }
.rate-pill.updating { opacity: 0.6; }

.convert-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 0px 20px;
  margin-top: 0px;
  position: relative;
}

.convert-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 0;
}
.convert-row .ccy-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-transform: uppercase;
}
.convert-row .amount-line {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.convert-row .symbol {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-muted);
}
.convert-row input {
  border: none;
  background: transparent;
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 800;
  width: 100%;
  padding: 0;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.convert-row.result input { color: var(--vine-green); }
.convert-row input::placeholder { color: var(--gray-300); }

.swap-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 0;
}
.swap-divider .line { flex: 1; height: 1px; background: var(--border); }
.swap-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--surface-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--t) var(--ease);
  flex-shrink: 0;
}
.swap-btn svg { width: 17px; height: 17px; stroke: var(--vine-green); }
.swap-btn.spin { transform: rotate(180deg); }

/* Clear + Save Expense, side by side under the keypad */
.calc-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}
.calc-actions .key-clear { flex: 1; padding: 14px 0; }
.calc-actions .save-expense-btn { flex: 2; }

.save-expense-btn {
  min-width: 0;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--vine-green);
  color: white;
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform var(--t-fast) var(--ease), background var(--t) var(--ease);
}
.save-expense-btn:active { transform: scale(0.98); }
.save-expense-btn svg { width: 18px; height: 18px; stroke: white; }
/* Theme-aware muted colors so the label stays readable in light and dark mode */
.save-expense-btn:disabled { background: var(--surface-alt); color: var(--text-muted); box-shadow: none; }
.save-expense-btn:disabled svg { stroke: var(--text-muted); }
.save-expense-btn:disabled:active { transform: none; }

.keypad {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 18px;
}
.keypad button {
  padding: 14px 0;
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  font-size: 19px;
  font-weight: 600;
  font-family: var(--font-display);
  transition: transform var(--t-fast) var(--ease), background var(--t) var(--ease);
}
.keypad button:active { transform: scale(0.94); background: var(--surface-alt); }
.keypad button.key-clear { color: var(--danger); font-size: 15px; font-weight: 700; }
.keypad button.key-back svg { width: 20px; height: 20px; stroke: var(--text); }
.keypad button.key-op {
  background: var(--surface-alt);
  color: var(--vine-green);
  font-size: 22px;
}
.keypad button.key-op.active {
  background: var(--vine-green);
  color: white;
}

button.key-clear {
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  color: var(--danger);
  font-size: 15px;
  font-weight: 700;
}
button.key-clear:active { transform: scale(0.98); }

.tip-btn {
  flex: 1;
  min-width: 0;
  padding: 10px 8px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  color: var(--vine-green);
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform var(--t-fast) var(--ease);
}
.tip-btn:active { transform: scale(0.98); }
.tip-btn svg { width: 15px; height: 15px; stroke: var(--vine-green); flex-shrink: 0; }
.tip-btn:disabled { color: var(--gray-500); }
.tip-btn:disabled svg { stroke: var(--gray-500); }

.tip-grid { display: flex; flex-direction: column; gap: 10px; }
.tip-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 12px 12px 16px;
  border-radius: var(--radius-md);
  background: var(--surface-alt);
  border: 1.5px solid transparent;
}
.tip-row.highlighted {
  background: color-mix(in srgb, var(--vine-green) 12%, var(--surface-alt));
  border-color: var(--vine-green);
}
.tip-row .tip-pct { font-weight: 800; font-size: 15px; font-family: var(--font-display); flex-shrink: 0; }
.tip-row.highlighted .tip-pct { color: var(--vine-green); }
.tip-row .tip-amounts { text-align: right; flex: 1; }
.tip-row .tip-line { display: flex; gap: 10px; justify-content: flex-end; font-size: 12.5px; color: var(--text-muted); }
.tip-row .tip-line.total { font-weight: 700; font-size: 14px; color: var(--text); margin-top: 2px; }
.tip-row.highlighted .tip-line.total { color: var(--vine-green); }

.tip-add-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--vine-green);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-soft);
  transition: transform var(--t-fast) var(--ease);
}
.tip-add-circle:active { transform: scale(0.92); }
.tip-add-circle svg { width: 16px; height: 16px; stroke: currentColor; }
.tip-row.highlighted .tip-add-circle { background: var(--vine-green); color: white; }

/* =========================================================
   Page headers / shared list styles
   ========================================================= */
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 10px 0 16px;
}
.page-head h2 { font-size: 22px; font-weight: 800; }
.page-head .total-pill {
  font-size: 13px;
  font-weight: 700;
  color: var(--vine-green);
  background: var(--surface-alt);
  padding: 6px 12px;
  border-radius: 999px;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  box-shadow: var(--shadow-soft);
  margin-bottom: 12px;
}
.search-bar svg { width: 16px; height: 16px; stroke: var(--text-muted); flex-shrink: 0; }
.search-bar input { border: none; background: transparent; width: 100%; font-size: 16px; -webkit-appearance: none; appearance: none; outline: none; }

/* All sort chips share one row, no scrolling */
.sort-row {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}
.sort-row .chip {
  flex: 1 1 auto; min-width: 0; padding: 7px 4px;
  overflow: hidden; text-overflow: ellipsis; text-align: center;
}
.chip {
  padding: 7px 13px;
  border-radius: 999px;
  background: var(--surface);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  box-shadow: var(--shadow-soft);
  white-space: nowrap;
  flex-shrink: 0;
  transition: background var(--t) var(--ease), color var(--t) var(--ease);
}
.chip.active { background: var(--vine-green); color: white; }
.currency-toggle { display: flex; align-items: center; gap: 5px; }
.currency-toggle svg { width: 13px; height: 13px; stroke: currentColor; }

.card-list { display: flex; flex-direction: column; gap: 10px; }

.item-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: var(--shadow-soft);
  display: flex;
  gap: 12px;
  align-items: center;
}
.item-card .thumb {
  width: 46px; height: 46px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--surface-alt);
  flex-shrink: 0;
}
.item-card .body { flex: 1; min-width: 0; }
.item-card .title { font-weight: 700; font-size: 14.5px; }
.item-card .title.purchased { text-decoration: line-through; color: var(--text-muted); }
.item-card .meta { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.item-card .price { font-family: var(--font-display); font-weight: 800; font-size: 15px; color: var(--vine-green); flex-shrink: 0; }

.checkbox {
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 2px solid var(--gray-300);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--t) var(--ease), border-color var(--t) var(--ease);
}
.checkbox.checked { background: var(--vine-green); border-color: var(--vine-green); }
.checkbox svg { width: 13px; height: 13px; stroke: white; opacity: 0; transition: opacity var(--t) var(--ease); }
.checkbox.checked svg { opacity: 1; }

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state svg { width: 44px; height: 44px; stroke: var(--gray-300); margin-bottom: 12px; }
.empty-state p.hint { font-size: 13px; margin-top: 4px; }

.fab-add {
  position: fixed;
  left: calc(50% - 195px + 20px);
  bottom: calc(92px + var(--safe-bottom));
  height: 48px;
  padding: 0 18px 0 16px;
  border-radius: 24px;
  background: var(--gray-900);
  color: white;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 14px;
  box-shadow: var(--shadow-pop);
  z-index: 30;
}
[data-theme='dark'] .fab-add { background: var(--vine-green-light); }
.fab-add svg { width: 18px; height: 18px; stroke: white; }
@media (max-width: 430px) { .fab-add { left: 20px; } }

/* Expenses summary card */
.summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.summary-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: var(--shadow-soft);
}
.summary-card .label { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.summary-card .value { font-family: var(--font-display); font-size: 20px; font-weight: 800; margin-top: 4px; font-variant-numeric: tabular-nums; }
.summary-card.budget .value.over { color: var(--danger); }
.summary-card.budget .value.ok { color: var(--vine-green); }

/* Notes */
.note-card { background: var(--surface); border-radius: var(--radius-md); padding: 14px 16px; box-shadow: var(--shadow-soft); }
.note-card .note-text { font-size: 14px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.note-card .note-meta { font-size: 11.5px; color: var(--text-muted); margin-top: 8px; display: flex; justify-content: space-between; align-items: center; }
.note-card .note-del { color: var(--danger); display: flex; padding: 4px; }
.note-card .note-del svg { width: 16px; height: 16px; stroke: currentColor; }

/* =========================================================
   Modal / sheet system
   ========================================================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 10, 0.45);
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t) var(--ease);
}
.modal-backdrop.open { opacity: 1; pointer-events: auto; }

.sheet {
  width: 100%;
  max-width: 430px;
  background: var(--surface);
  border-radius: 26px 26px 0 0;
  padding: 10px 20px calc(24px + var(--safe-bottom));
  max-height: 86vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform var(--t) var(--ease);
}
.modal-backdrop.open .sheet { transform: translateY(0); }

.sheet-handle {
  width: 38px; height: 4px;
  background: var(--gray-300);
  border-radius: 3px;
  margin: 8px auto 14px;
}

.sheet h3 { font-size: 18px; font-weight: 800; margin-bottom: 14px; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; font-weight: 700; color: var(--text-muted); margin-bottom: 6px; }
.field input[type="text"],
.field input[type="number"],
.field input[type="date"],
.field input[type="url"],
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--surface-alt);
  font-size: 14.5px;
}
.field textarea { resize: vertical; min-height: 70px; }
.field-row { display: flex; gap: 10px; }
.field-row .field { flex: 1; }

[data-theme='dark'] .field select {
  background: var(--surface);
  color: var(--text);
}

[data-theme='dark'] .field select option {
  background: var(--surface);
  color: var(--text);
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.toggle-row:last-child { border-bottom: none; }
.toggle-row .label-group { display: flex; flex-direction: column; }
.toggle-row .label-group .t { font-weight: 600; font-size: 14.5px; }
.toggle-row .label-group .s { font-size: 12px; color: var(--text-muted); }

.segmented {
  display: flex;
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
  padding: 3px;
}

.segmented button {
  flex: 1;
  padding: 8px 0;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  transition: background var(--t) var(--ease), color var(--t) var(--ease);
}
.segmented button.active {
  background: var(--surface);
  color: var(--vine-green);
  box-shadow: var(--shadow-soft);
}

[data-theme='dark'] .segmented button.active {
  background: var(--vine-green);
  color: #FFFFFF;
}
.btn-primary {
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--vine-green);
  color: white;
  font-weight: 700;
  font-size: 15px;
  margin-top: 6px;
}
.btn-primary:active { transform: scale(0.98); }
.btn-secondary {
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--surface-alt);
  color: var(--text);
  font-weight: 700;
  font-size: 14.5px;
  margin-top: 8px;
}
.btn-danger { color: var(--danger); }

.settings-list .item-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 4px;
  border-bottom: 1px solid var(--border);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  background: transparent;
}
.settings-list .item-btn:last-child { border-bottom: none; }
.settings-list .item-btn svg { width: 16px; height: 16px; stroke: var(--text-muted); }

.action-sheet-options { display: flex; flex-direction: column; gap: 8px; }
.action-sheet-options button {
  padding: 15px;
  border-radius: var(--radius-md);
  background: var(--surface-alt);
  font-weight: 700;
  font-size: 15px;
  text-align: center;
}
.action-sheet-options button.cancel { color: var(--danger); margin-top: 4px; }
.action-sheet-options .opt-dest {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}

/* "Attach to…" picker after taking a photo */
.attach-recent-label { font-size: 13px; color: var(--text-muted); margin: 16px 0 8px; }
.attach-recent { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.attach-recent button {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--surface-alt);
  text-align: left;
}
.attach-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.attach-title { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach-meta { font-size: 12px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach-amount { font-weight: 700; font-size: 14px; white-space: nowrap; }

.photo-add { display: flex; gap: 8px; }
.photo-add .btn-secondary { flex: 1; margin: 0; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.photo-add svg { width: 16px; height: 16px; stroke: currentColor; }

.toast {
  position: fixed;
  bottom: calc(160px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--gray-900);
  color: white;
  padding: 11px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  z-index: 200;
  opacity: 0;
  transition: opacity var(--t) var(--ease), transform var(--t) var(--ease);
  pointer-events: none;
  box-shadow: var(--shadow-pop);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.photo-preview {
  width: 100%;
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  max-height: 220px;
  object-fit: cover;
}

@media (min-width: 431px) {
  body { background: var(--gray-300); padding: 20px 0; }
  [data-theme='dark'] body { background: #05070A; }
}

/* Small helper text under a field label (used in the settings sheet) */
.hint-small {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 500;
}
/* =========================================================
   Draggable camera button
   ========================================================= */
.fab {
  touch-action: none;          /* let the finger drag the button instead of scrolling */
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  transition: transform var(--t-fast) var(--ease), left var(--t) var(--ease), top var(--t) var(--ease);
}
.fab.fab-hidden { display: none; } /* Settings page: nothing to photograph there */
.fab.dragging {
  transition: none;
  transform: scale(1.08);
  box-shadow: 0 14px 30px rgba(239, 72, 106, 0.5);
}

/* =========================================================
   Receipts / photo folders
   ========================================================= */
.head-actions { display: flex; gap: 8px; }
.receipt-badge { display: inline-flex; vertical-align: -2px; margin-left: 6px; }
.receipt-badge svg { width: 14px; height: 14px; stroke: var(--text-muted); }

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.photo-tile {
  position: relative;
  aspect-ratio: 1;
  padding: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-alt);
}
.photo-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-tile span {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 3px 6px;
  font-size: 10.5px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.55));
  text-align: left;
}
.photo-full {
  width: 100%;
  max-height: 60vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  background: var(--surface-alt);
  margin-bottom: 8px;
}
.btn-primary { display: flex; align-items: center; justify-content: center; gap: 8px; }
.btn-primary svg { width: 18px; height: 18px; stroke: currentColor; }

/* =========================================================
   Trips
   ========================================================= */
.trip-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 56%;
  min-width: 0;
  padding: 8px 10px 8px 12px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  transition: transform var(--t-fast) var(--ease);
}
.trip-pill:active { transform: scale(0.96); }
.trip-pill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.trip-pill svg { width: 15px; height: 15px; stroke: var(--vine-green); flex-shrink: 0; }
.trip-pill svg:last-child { stroke: var(--text-muted); width: 14px; height: 14px; }

.trip-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.trip-row {
  display: flex;
  align-items: center;
  border-radius: var(--radius-md);
  background: var(--surface-alt);
  border: 1.5px solid transparent;
}
.trip-row.active { border-color: var(--vine-green); }
.trip-pick {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 4px 12px 14px;
  text-align: left;
}
.trip-check {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid var(--gray-300);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.trip-check svg { width: 12px; height: 12px; stroke: white; opacity: 0; }
.trip-row.active .trip-check { background: var(--vine-green); border-color: var(--vine-green); }
.trip-row.active .trip-check svg { opacity: 1; }
.trip-info { display: flex; flex-direction: column; min-width: 0; }
.trip-name { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trip-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.trip-edit { padding: 12px 14px; display: flex; color: var(--text-muted); }
.trip-edit svg { width: 18px; height: 18px; stroke: currentColor; }

/* Expense amount as paid + converted, stacked */
.price-stack { text-align: right; flex-shrink: 0; }
.price-sub { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; font-variant-numeric: tabular-nums; }
.unconverted-note { margin: -6px 0 12px; }
.field select optgroup { font-weight: 700; }

/* =========================================================
   Spending summary & charts
   Colours validated with the dataviz palette checker against the app's
   own surfaces (#ffffff light, #181C18 dark). Category colours follow the
   category, never its rank. Light and dark are separate validated steps.
   ========================================================= */
:root {
  --chart-accent: #EF486A;                 /* single-series marks (brand) */
  --chart-accent-wash: rgba(239, 72, 106, 0.10);
  --chart-grid: #e1e0d9;
  --chart-axis: #c3c2b7;
  --chart-ref: #52514e;                    /* budget reference line */
  --status-good: #006300;
  --status-critical: #d03b3b;
  --cat-1: #2a78d6;  /* Food & Drinks */
  --cat-2: #eb6834;  /* Shopping */
  --cat-3: #1baf7a;  /* Transport */
  --cat-4: #eda100;  /* Accommodation */
  --cat-5: #e87ba4;  /* Activities */
  --cat-6: #008300;  /* Gifts */
  --cat-7: #4a3aa7;  /* custom 1 */
  --cat-8: #e34948;  /* custom 2 */
  --cat-other: #898781; /* Other: neutral, never a hue */
  /* Shopping priority: deep brand ramp, soft pink → burgundy (brand #EF486A sits in the middle) */
  --prio-1: #F4BFCC;  /* Maybe */
  --prio-2: #F18AA2;  /* Nice to have */
  --prio-3: #EF486A;  /* Want it (default) */
  --prio-4: #C4234F;  /* Really want it */
  --prio-5: #8E1537;  /* Must buy */
}
[data-theme='dark'] {
  --chart-grid: #2c2c2a;
  --chart-axis: #383835;
  --chart-ref: #c3c2b7;
  --status-good: #0ca30c;
  --status-critical: #e66767;
  --cat-1: #3987e5;
  --cat-2: #d95926;
  --cat-3: #199e70;
  --cat-4: #c98500;
  --cat-5: #d55181;
  --cat-6: #008300;
  --cat-7: #9085e9;
  --cat-8: #e66767;
  --cat-other: #898781;
  /* Priority ramp inverted for dark: higher priority = brighter */
  --prio-1: #5E2A36;
  --prio-2: #8E2F45;
  --prio-3: #C93558;
  --prio-4: #F2486C;
  --prio-5: #FF6F8E;
}

.view-switch { margin: -4px 0 16px; }
.view-switch button { display: flex; align-items: center; justify-content: center; gap: 6px; }
.view-switch svg { width: 15px; height: 15px; stroke: currentColor; }

.summary-view { display: flex; flex-direction: column; gap: 12px; }

.sum-card {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 18px 16px;
}

/* Hero figure + budget meter */
.sum-eyebrow { font-size: 12.5px; font-weight: 600; color: var(--text-muted); }
.sum-hero-value {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-top: 4px;
  overflow-wrap: anywhere;
}
.sum-hero-sub { font-size: 12.5px; color: var(--text-muted); margin-top: 4px; }

.meter {
  height: 10px;
  margin-top: 16px;
  border-radius: 999px;
  background: var(--chart-accent-wash);
  overflow: hidden;
}
.meter-fill { height: 100%; border-radius: 999px; background: var(--chart-accent); transition: width 600ms var(--ease); }
.meter-warn { background: rgba(250, 178, 25, 0.18); }
.meter-warn .meter-fill { background: #fab219; }
.meter-over { background: rgba(208, 59, 59, 0.15); }
.meter-over .meter-fill { background: var(--status-critical); }
.meter-caption {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--text-muted);
}
.meter-status { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: var(--text); white-space: nowrap; }
.meter-status svg { width: 14px; height: 14px; stroke: var(--status-critical); }
.meter-status-over { color: var(--status-critical); }

/* KPI tiles */
.kpi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kpi {
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  padding: 12px 14px;
  min-width: 0;
}
.kpi-label { font-size: 11.5px; font-weight: 700; color: var(--text-muted); }
.kpi-value { font-family: var(--font-display); font-size: 19px; font-weight: 800; margin-top: 3px; overflow-wrap: anywhere; }
.kpi-note { font-size: 11.5px; color: var(--text-muted); margin-top: 1px; }

/* Chart cards */
.chart-head { margin-bottom: 10px; }
.chart-title { font-size: 16px; font-weight: 800; }
.chart-sub { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.chart-svg { display: block; width: 100%; height: auto; overflow: visible; touch-action: pan-y; }

.chart-svg .c-grid { stroke: var(--chart-grid); stroke-width: 1; }
.chart-svg .c-axis { stroke: var(--chart-axis); stroke-width: 1; }
.chart-svg .c-tick { fill: var(--text-muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.chart-svg .c-bar { fill: var(--chart-accent); }
.chart-svg .c-ref { stroke: var(--chart-ref); stroke-width: 1.5; }
.chart-svg .c-ref-label { fill: var(--text-muted); font-size: 10.5px; font-weight: 600; paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; }
.chart-svg .c-hit { fill: transparent; cursor: pointer; outline: none; }
.chart-svg .c-hit:focus-visible, .chart-svg .c-hit.is-active { fill: var(--text); fill-opacity: 0.05; }

.chart-svg .c-line { fill: none; stroke: var(--chart-accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-svg .c-area { fill: var(--chart-accent-wash); }
.chart-svg .c-pace { fill: none; stroke: var(--chart-ref); stroke-width: 1.5; stroke-linejoin: round; opacity: 0.7; }
.chart-svg .c-dot { fill: var(--chart-accent); stroke: var(--surface); stroke-width: 2; }
.chart-svg .c-end-label { fill: var(--text); font-size: 11.5px; font-weight: 700; paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; }
.chart-svg .c-cross { stroke: var(--chart-axis); stroke-width: 1; }
.chart-svg .c-overlay { fill: transparent; cursor: crosshair; }

.chart-legend { display: flex; gap: 16px; margin-bottom: 6px; font-size: 12px; color: var(--text-muted); }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.key { display: inline-block; width: 14px; height: 2px; border-radius: 2px; }
.key-spent { background: var(--chart-accent); height: 3px; }
.key-pace { background: var(--chart-ref); opacity: 0.7; }

.pace-status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; margin-bottom: 10px; }
.pace-status svg { width: 16px; height: 16px; flex-shrink: 0; }
.pace-status.is-over { color: var(--status-critical); }
.pace-status.is-over svg { stroke: var(--status-critical); }
.pace-status.is-under { color: var(--status-good); }
.pace-status.is-under svg { stroke: var(--status-good); }

.chart-tip {
  position: absolute;
  z-index: 5;
  max-width: 240px;
  padding: 7px 10px;
  border-radius: 10px;
  background: var(--gray-900);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  box-shadow: var(--shadow-pop);
  pointer-events: none;
}
[data-theme='dark'] .chart-tip { background: #F2F5F2; color: #14170F; }

.chart-table { margin-top: 10px; font-size: 12.5px; }
.chart-table summary { cursor: pointer; color: var(--text-muted); font-weight: 600; }
.chart-table table { width: 100%; margin-top: 8px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.chart-table th, .chart-table td { text-align: right; padding: 5px 2px; border-bottom: 1px solid var(--border); }
.chart-table th:first-child, .chart-table td:first-child { text-align: left; }
.chart-table th { color: var(--text-muted); font-weight: 700; }

/* Category share bar + ranked list */
.share-bar { display: flex; gap: 2px; height: 14px; border-radius: 4px; overflow: hidden; margin: 4px 0 14px; }
.share-seg { min-width: 3px; cursor: pointer; outline: none; transition: opacity var(--t) var(--ease); }
.share-bar:has(.is-active) .share-seg:not(.is-active) { opacity: 0.35; }
.share-seg:focus-visible { box-shadow: inset 0 0 0 2px var(--text); }

.cat-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.cat-line { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 14px; }
.cat-name { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.cat-count { font-size: 11px; font-weight: 700; color: var(--text-muted); background: var(--surface-alt); padding: 1px 7px; border-radius: 999px; }
.swatch { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.cat-amount { font-weight: 700; font-variant-numeric: tabular-nums; }
.cat-pct { color: var(--text-muted); font-weight: 600; font-size: 12.5px; margin-left: 4px; }
.cat-track { height: 6px; margin-top: 6px; border-radius: 3px; background: var(--surface-alt); overflow: hidden; }
.cat-fill { height: 100%; border-radius: 3px; }

/* =========================================================
   Splitting costs & balances
   ========================================================= */
.label-note { font-weight: 600; color: var(--text-muted); margin-left: 6px; }
.btn-link {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 6px; padding: 6px 0;
  color: var(--vine-green); font-weight: 700; font-size: 13.5px;
}
.btn-link svg { width: 15px; height: 15px; stroke: currentColor; }

/* Companions in the trip form */
.member-list { display: flex; flex-wrap: wrap; gap: 6px; }
.member-list:not(:empty) { margin-bottom: 8px; }
.member-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 6px 6px 12px;
  border-radius: 999px;
  background: var(--surface-alt);
  font-size: 13.5px; font-weight: 600;
}
.member-chip button { display: flex; padding: 2px; border-radius: 50%; color: var(--text-muted); }
.member-chip svg { width: 14px; height: 14px; stroke: currentColor; }
.member-add { display: flex; gap: 8px; }
.member-add input { flex: 1; min-width: 0; }
.btn-add-member {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 0 14px; border-radius: var(--radius-sm);
  background: var(--surface-alt); color: var(--vine-green);
  font-weight: 700; font-size: 14px; flex-shrink: 0;
}
.btn-add-member svg { width: 15px; height: 15px; stroke: currentColor; }
.field .member-add input[type="text"] { width: auto; }

/* Split sheet */
.split-total {
  font-family: var(--font-display);
  font-size: 30px; font-weight: 800;
  margin: -4px 0 14px;
}
.split-total span { font-size: 14px; font-weight: 700; color: var(--text-muted); margin-left: 4px; }

.split-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.split-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px 7px 8px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  font-size: 13.5px; font-weight: 700; color: var(--text-muted);
  transition: background var(--t) var(--ease), border-color var(--t) var(--ease), color var(--t) var(--ease);
}
.split-chip svg {
  width: 16px; height: 16px; padding: 2px;
  border-radius: 50%; border: 1.5px solid var(--gray-300);
  stroke: transparent; flex-shrink: 0;
}
.split-chip.on { border-color: var(--vine-green); color: var(--text); background: var(--chart-accent-wash); }
.split-chip.on svg { background: var(--vine-green); border-color: var(--vine-green); stroke: #fff; stroke-width: 3; }

.split-rows { display: flex; flex-direction: column; gap: 14px; }
.split-row-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.split-name { font-weight: 700; font-size: 14.5px; }
.split-amt { font-weight: 700; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.split-pct {
  display: inline-block; min-width: 44px; margin-left: 8px;
  padding: 2px 6px; border-radius: 6px;
  background: var(--surface-alt); color: var(--text-muted);
  font-size: 12px; text-align: center;
}

/* Percentage slider — pink fill up to the thumb */
.split-row input[type="range"] {
  --fill: 50%;
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 28px; margin: 0;
  background: transparent; cursor: pointer;
}
.split-row input[type="range"]::-webkit-slider-runnable-track {
  height: 6px; border-radius: 3px;
  background: linear-gradient(to right, var(--vine-green) var(--fill), var(--surface-alt) var(--fill));
}
.split-row input[type="range"]::-moz-range-track { height: 6px; border-radius: 3px; background: var(--surface-alt); }
.split-row input[type="range"]::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--vine-green); }
.split-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 24px; height: 24px; margin-top: -9px;
  border-radius: 50%; background: #fff;
  border: 2px solid var(--vine-green);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}
.split-row input[type="range"]::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%; background: #fff;
  border: 2px solid var(--vine-green); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}
.split-row input[type="range"]:disabled { cursor: default; opacity: 0.5; }
.split-row input[type="range"]:focus-visible { outline: 2px solid var(--vine-green-light); outline-offset: 2px; border-radius: 4px; }

.split-meta { display: flex; align-items: center; gap: 4px; }
.split-meta svg { width: 13px; height: 13px; stroke: currentColor; flex-shrink: 0; }

/* Saved-split result */
.result-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.result-head h3 { margin: 0; }
.result-icon {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--status-good); flex-shrink: 0;
}
.result-icon svg { width: 17px; height: 17px; stroke: #fff; stroke-width: 3; }
.result-lead { color: var(--text-muted); font-size: 14px; margin-bottom: 14px; }
.result-list { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.result-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; border-radius: var(--radius-md); background: var(--surface-alt);
}
.result-text { font-size: 14px; line-height: 1.4; min-width: 0; }
.result-sub { display: block; font-size: 12.5px; color: var(--text-muted); }

.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--chart-accent-wash); color: var(--vine-green);
  font-weight: 800; font-size: 14px; flex-shrink: 0;
}
.avatar.me { background: var(--vine-green); color: #fff; }

/* Split-the-bill calculator */
.stepper {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px; border-radius: var(--radius-md); background: var(--surface-alt);
  margin-bottom: 14px;
}
.stepper button {
  width: 48px; height: 48px; border-radius: 14px;
  background: var(--surface); box-shadow: var(--shadow-soft);
  font-size: 24px; font-weight: 700; color: var(--vine-green);
}
.stepper button:disabled { color: var(--gray-300); box-shadow: none; }
.stepper-value { font-size: 15px; color: var(--text-muted); }
.stepper-value strong { font-family: var(--font-display); font-size: 26px; color: var(--text); margin-right: 4px; }
.split-each {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 16px; margin-bottom: 8px;
  border-radius: var(--radius-md); border: 1.5px solid var(--vine-green);
  background: var(--chart-accent-wash);
}
.split-each span { font-weight: 600; color: var(--text-muted); }
.split-each strong { font-family: var(--font-display); font-size: 26px; font-weight: 800; }

/* Balances tab */
.bal-list, .pay-list, .history-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.bal-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.bal-row:last-child { border-bottom: none; }
.bal-name { flex: 1; font-weight: 700; font-size: 14.5px; }
.bal-amount { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; }
.bal-amount svg { width: 14px; height: 14px; stroke: currentColor; }
.bal-amount.is-owed { color: var(--status-good); }
.bal-amount.owes { color: var(--status-critical); }
.bal-amount.settled { color: var(--text-muted); }

.pay-list { gap: 8px; margin-bottom: 4px; }
.pay-row {
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: "text amount" "btn btn";
  gap: 8px; padding: 12px; border-radius: var(--radius-md); background: var(--surface-alt);
}
.pay-text { grid-area: text; font-size: 14px; }
.pay-amount { grid-area: amount; font-family: var(--font-display); font-weight: 800; font-size: 16px; }
.pay-btn { grid-area: btn; justify-self: start; }
.pay-empty { display: flex; align-items: center; gap: 8px; color: var(--status-good); font-weight: 700; padding: 8px 0; }
.pay-empty svg { width: 18px; height: 18px; stroke: currentColor; }
#bal-share { display: flex; align-items: center; justify-content: center; gap: 8px; }
#bal-share svg { width: 17px; height: 17px; stroke: currentColor; }

.history-list { margin-top: 8px; }
.history-row { display: flex; align-items: center; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.history-row:last-child { border-bottom: none; }
.history-row > span:first-child { flex: 1; }
.history-date { color: var(--text-muted); margin-left: 6px; font-size: 12px; }
.history-amount { font-weight: 700; font-variant-numeric: tabular-nums; }
.history-undo { display: flex; padding: 4px; color: var(--text-muted); }
.history-undo svg { width: 15px; height: 15px; stroke: currentColor; }

/* Tip + Split side by side */
.rate-tip-row .tip-btn { padding: 12px 8px; }
.rate-row .rate-pill { padding: 9px 12px; }

/* =========================================================
   Favorite currencies
   ========================================================= */
/* Calculator currency label is a button that opens the favorites picker */
.convert-row .ccy-pick {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  align-self: flex-start;
  margin: -4px 0 -2px -6px;
  padding: 4px 6px;
  border-radius: 8px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  transition: background var(--t) var(--ease);
}
.convert-row .ccy-pick:active { background: var(--surface-alt); }
.convert-row .ccy-pick svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 2.5; }

.fav-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.fav-cur {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 12px 6px;
  border-radius: var(--radius-md);
  background: var(--surface-alt);
  border: 1.5px solid transparent;
  transition: border-color var(--t) var(--ease), background var(--t) var(--ease);
}
.fav-cur.active { border-color: var(--vine-green); background: var(--chart-accent-wash); }
.fav-sym { font-family: var(--font-display); font-size: 20px; font-weight: 800; line-height: 1.2; }
.fav-code { font-size: 12px; font-weight: 700; color: var(--text-muted); letter-spacing: 0.04em; }

.fav-chip { gap: 6px; }
.fav-chip-sym { font-weight: 800; color: var(--vine-green); }
#fav-add { margin-bottom: 6px; }
.field select#fav-add, .field select#pick-other, .field select#set-lang {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border); background: var(--surface-alt); font-size: 14.5px; color: var(--text);
}

/* =========================================================
   Expense report export
   ========================================================= */
.icon-chip { display: flex; align-items: center; justify-content: center; padding: 7px 10px; }
.icon-chip svg { width: 15px; height: 15px; stroke: currentColor; }
.export-cta { margin-top: 14px; }

.report-options { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.report-opt {
  display: flex; align-items: center; gap: 14px;
  padding: 14px; border-radius: var(--radius-md);
  background: var(--surface-alt); border: 1.5px solid transparent;
  text-align: left;
  transition: border-color var(--t) var(--ease), background var(--t) var(--ease);
}
.report-opt.active { border-color: var(--vine-green); background: var(--chart-accent-wash); }
.report-opt-icon {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); color: var(--vine-green);
}
.report-opt-icon svg { width: 22px; height: 22px; stroke: currentColor; }
.report-opt-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.report-opt-text strong { font-size: 15px; }
.report-opt-text span { font-size: 12.5px; color: var(--text-muted); }

/* =========================================================
   Account & sign-in
   ========================================================= */
.acct-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 12px 14px; margin-bottom: 16px;
  border-radius: var(--radius-md); background: var(--surface-alt);
  text-align: left; color: var(--text);
}
.acct-row > svg { width: 16px; height: 16px; stroke: var(--text-muted); flex-shrink: 0; }
.acct-row-avatar svg { width: 18px; height: 18px; stroke: currentColor; }
.acct-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.acct-row-text strong { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-row-text span { font-size: 12.5px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-badge {
  font-size: 11.5px; font-weight: 800; padding: 3px 9px; border-radius: 999px;
  background: var(--surface); color: var(--text-muted); flex-shrink: 0;
}
.plan-badge.is-pro { background: var(--vine-green); color: #fff; }

.social-buttons { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.social-buttons:empty { display: none; }
.google-btn { display: flex; justify-content: center; min-height: 44px; }
.apple-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; border-radius: 999px; background: #000; color: #fff;
  font-size: 15px; font-weight: 600;
}
[data-theme='dark'] .apple-btn { background: #fff; color: #000; }
.apple-btn svg { width: 18px; height: 18px; }
/* The apps' own Google button (Google's web button can't run inside an app). */
.google-native-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  height: 44px; border-radius: 999px; background: #fff; color: #1f1f1f;
  border: 1px solid #747775; font-size: 15px; font-weight: 600;
}
[data-theme='dark'] .google-native-btn { background: #131314; color: #e3e3e3; border-color: #8e918f; }
.google-native-btn svg { width: 18px; height: 18px; }
.or-divider { display: flex; align-items: center; gap: 12px; margin: 6px 0 14px; color: var(--text-muted); font-size: 12.5px; }
.or-divider::before, .or-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.field input[type="email"], .field input[type="password"] {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border); background: var(--surface-alt); font-size: 16px; color: var(--text);
}
.form-error { color: var(--danger); font-size: 13.5px; font-weight: 600; margin: -4px 0 10px; }
.acct-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin-top: 4px; }
.acct-note { margin-top: 10px; text-align: center; }

.acct-head { display: flex; align-items: center; gap: 14px; margin: 4px 0 16px; }
.acct-avatar { width: 52px; height: 52px; font-size: 22px; }
.acct-id { display: flex; flex-direction: column; min-width: 0; }
.acct-id strong { font-size: 17px; overflow: hidden; text-overflow: ellipsis; }
.acct-id span { font-size: 13px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; }
.acct-warning {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  padding: 12px; margin-bottom: 12px; border-radius: var(--radius-md);
  background: rgba(250, 178, 25, 0.14); font-size: 13px;
}
.acct-warning > svg { width: 16px; height: 16px; stroke: #b87700; flex-shrink: 0; }
.acct-warning span { flex: 1; min-width: 160px; }
.plan-card {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px; margin-bottom: 10px; border-radius: var(--radius-md); background: var(--surface-alt);
}
.plan-card.is-pro { background: var(--chart-accent-wash); border: 1.5px solid var(--vine-green); }
.plan-label { font-size: 12px; font-weight: 700; color: var(--text-muted); }
.plan-name { display: flex; align-items: center; gap: 6px; font-family: var(--font-display); font-size: 22px; font-weight: 800; }
.plan-name svg { width: 18px; height: 18px; stroke: var(--vine-green); stroke-width: 3; }
.plan-checked { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.plan-card .chip { display: inline-flex; align-items: center; gap: 5px; }
.plan-card .chip svg { width: 13px; height: 13px; stroke: currentColor; }

/* =========================================================
   Pro: tags and upgrade screen
   ========================================================= */
.pro-tag {
  display: inline-flex; align-items: center; gap: 2px;
  margin-left: 6px; padding: 1px 6px 1px 4px; border-radius: 999px;
  background: var(--vine-green); color: #fff;
  font-size: 9.5px; font-weight: 800; letter-spacing: 0.04em; vertical-align: 1px;
}
.pro-tag svg { width: 10px; height: 10px; stroke: currentColor; stroke-width: 2.6; }
.segmented .pro-tag { margin-left: 4px; }
.tab-lock { display: inline-flex; margin-left: 4px; opacity: 0.7; }
.tab-lock svg { width: 12px; height: 12px; stroke: currentColor; stroke-width: 2.4; }

.paywall { text-align: left; }
.paywall-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; margin-bottom: 10px; border-radius: 999px;
  background: var(--vine-green); color: #fff; font-size: 12px; font-weight: 800; letter-spacing: 0.06em;
}
.paywall-badge svg { width: 13px; height: 13px; stroke: currentColor; stroke-width: 2.4; }
.paywall h3 { font-size: 24px; margin-bottom: 6px; }
.paywall-why { font-weight: 700; margin-bottom: 4px; }
.paywall-list { list-style: none; margin: 4px 0 16px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.paywall-list li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-md); }
.paywall-list li.is-focus { background: var(--chart-accent-wash); }
.paywall-list li > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.paywall-list strong { font-size: 14.5px; }
.paywall-list li > span:last-child > span { font-size: 12.5px; color: var(--text-muted); }
.paywall-icon {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-alt); color: var(--vine-green);
}
.paywall-icon svg { width: 18px; height: 18px; stroke: currentColor; }
.paywall-price { text-align: center; font-family: var(--font-display); font-size: 18px; font-weight: 800; min-height: 24px; margin-bottom: 4px; }
.paywall-center { display: block; width: 100%; text-align: center; }
.paywall-yours {
  margin: 8px 0 6px; padding: 10px 12px; border-radius: var(--radius-md);
  background: var(--chart-accent-wash); font-size: 14px; font-weight: 600;
}
.upsell .btn-secondary { margin-top: 8px; }

/* End-of-trip recap (upsell.js) */
.recap { text-align: center; }
.recap-kicker {
  display: inline-flex; align-items: center; gap: 6px; margin-bottom: 6px;
  font-size: 12.5px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--vine-green);
}
.recap-kicker svg { width: 15px; height: 15px; stroke: currentColor; }
.recap h3 { margin: 0 0 10px; font-size: 20px; }
.recap-total { font-family: var(--font-display); font-size: 36px; font-weight: 800; line-height: 1.1; }
.recap-sub { margin: 4px 0 0; color: var(--text-muted); font-size: 13.5px; }
.recap-budget { margin: 8px 0 0; font-size: 14px; font-weight: 700; }
.recap-budget.is-under { color: var(--vine-green); }
.recap-budget.is-over { color: var(--danger, #d64545); }
.recap-top { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 10px 0 0; font-size: 14px; }
.recap-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.recap-locked { position: relative; margin: 16px 0; padding: 12px 14px; border-radius: var(--radius-md); background: var(--surface-alt); overflow: hidden; }
.recap-bars { filter: blur(5px); opacity: 0.6; pointer-events: none; user-select: none; display: flex; flex-direction: column; gap: 10px; }
.recap-bar { display: grid; grid-template-columns: 82px 1fr auto; align-items: center; gap: 8px; font-size: 12.5px; text-align: left; }
.recap-track { height: 8px; border-radius: 4px; background: var(--surface); overflow: hidden; }
.recap-track > span { display: block; height: 100%; border-radius: 4px; }
.recap-lock {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  padding: 12px; font-size: 13.5px; font-weight: 700;
}
.recap-lock .paywall-badge { margin: 0; }
.recap-buddy { margin: 0 0 14px; font-size: 13.5px; color: var(--text-muted); line-height: 1.45; }
.recap .btn-secondary { margin-top: 8px; }

/* =========================================================
   Cloud backup card (account screen)
   ========================================================= */
.sync-card { padding: 14px 16px; margin-bottom: 10px; border-radius: var(--radius-md); background: var(--surface-alt); }
.sync-card.is-ok { background: rgba(12, 163, 12, 0.08); }
.sync-card.is-error { background: rgba(214, 69, 69, 0.08); }
.sync-head { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.sync-head > svg { width: 18px; height: 18px; stroke: var(--vine-green); flex-shrink: 0; }
.sync-card.is-ok .sync-head > svg { stroke: var(--status-good); stroke-width: 3; }
.sync-line { font-size: 13.5px; margin: 4px 0 6px; }
.sync-card .hint-small { margin-bottom: 10px; }
.sync-card .chip { display: inline-flex; align-items: center; gap: 5px; }
.sync-card .chip svg { width: 13px; height: 13px; stroke: currentColor; }

/* Expense list: category spine, filter chips, sort */
.item-card.has-spine { position: relative; overflow: hidden; padding-left: 20px; }
.item-card.has-spine::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: var(--spine-w, 5px);
  background: var(--spine, var(--cat-other));
}
.cat-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.list-toolbar { margin: 4px 0 10px; }
.list-toolbar-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.list-toolbar-row:empty { display: none; }
/* Sort fills the row; the currency toggle sits on the right. */
#exp-sort-btn { flex: 1; min-width: 0; }
#exp-sort-btn span { flex: 1; max-width: none; text-align: left; }
#show-home-btn { flex-shrink: 0; margin-left: auto; }
.filter-chips {
  display: flex; gap: 6px; overflow-x: auto; margin: 0 -20px; padding: 2px 20px 4px;
  scrollbar-width: none; scroll-padding: 0 20px;
}
.filter-chips::-webkit-scrollbar { display: none; }
.filter-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; }
.filter-chip .chip-count { font-size: 11px; opacity: 0.75; font-variant-numeric: tabular-nums; }
.filter-chip.active .cat-dot { box-shadow: 0 0 0 2px #fff; }
.filter-summary { font-size: 12.5px; font-weight: 600; color: var(--text-muted); margin: 8px 4px 0; }
.cat-manage .cat-count { margin-left: 2px; }
.cat-manage-row[disabled] { opacity: 1; cursor: default; }
.btn-danger-text { color: var(--danger); }

/* Shopping: grouped by person */
.list-group { display: flex; flex-direction: column; gap: 10px; }
.list-group + .list-group { margin-top: 12px; }
.list-group-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
  padding: 0 4px; font-size: 13px;
}
.list-group-name { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; color: var(--text); }
.list-group-name svg, .person-tag svg { width: 13px; height: 13px; stroke: currentColor; flex-shrink: 0; }
.list-group-meta { color: var(--text-muted); font-weight: 600; font-size: 12px; white-space: nowrap; }
.person-tag { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; color: var(--vine-green); }
.shared-tag { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; color: var(--text); }
.shared-tag svg { width: 13px; height: 13px; stroke: currentColor; flex-shrink: 0; }

/* Shopping item links */
.item-card .item-link {
  width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-alt); color: var(--vine-green);
}
.item-card .item-link svg { width: 16px; height: 16px; stroke: currentColor; }
.link-row { display: flex; gap: 8px; }
.link-row input { flex: 1; min-width: 0; }
.link-row .btn-secondary {
  width: auto; margin: 0; padding: 0 14px; flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 6px;
}
.link-row svg, .link-actions svg { width: 16px; height: 16px; stroke: currentColor; flex-shrink: 0; }
.link-actions { display: flex; gap: 8px; }
.link-actions:empty { display: none; }
.link-actions .btn-secondary {
  flex: 1; min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.checkbox:disabled { opacity: 0.45; cursor: not-allowed; }
.sort-row .chip svg { width: 13px; height: 13px; stroke: currentColor; vertical-align: -2px; }

/* Expenses: swipe between List / Summary / Balances */
.view-switch button { white-space: nowrap; }
.view-pager {
  display: flex; align-items: flex-start;
  margin: 0 -20px; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
  transition: height 0.2s var(--ease);
}
.view-pager::-webkit-scrollbar { display: none; }
.view-panel {
  flex: 0 0 100%; min-width: 0; box-sizing: border-box; padding: 0 20px 4px;
  scroll-snap-align: start; scroll-snap-stop: always;
}
.filter-chips { overscroll-behavior-x: contain; } /* chips scroll without flipping the tab */

/* Free users: blurred preview + upgrade card */
.locked-panel { position: relative; min-height: 440px; }
.locked-preview {
  filter: blur(7px); opacity: 0.55; pointer-events: none; user-select: none;
  max-height: 560px; overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 55%, transparent);
  mask-image: linear-gradient(#000 55%, transparent);
}
.locked-cta {
  position: absolute; left: 8px; right: 8px; top: 48px;
  background: var(--surface); border-radius: var(--radius-md); box-shadow: var(--shadow-soft), 0 12px 40px rgba(0,0,0,0.18);
  padding: 22px 20px 20px; text-align: center;
}
.locked-cta .paywall-badge { margin: 0 auto 10px; }
.locked-cta h3 { margin: 0 0 6px; font-size: 18px; }
.locked-cta p { margin: 0 0 16px; color: var(--text-muted); font-size: 14px; }
.locked-cta .btn-primary { width: 100%; }

/* Expenses list: currency + sort pills (same look as "Add expense") */
.pill-btn {
  display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 12px;
  border-radius: 16px; background: var(--gray-900); color: #fff;
  font-size: 12.5px; font-weight: 700; white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.14);
}
[data-theme='dark'] .pill-btn { background: var(--vine-green-light); }
.pill-btn svg { width: 14px; height: 14px; stroke: currentColor; flex-shrink: 0; }
.pill-btn svg:last-child:not(:first-child) { width: 12px; height: 12px; opacity: 0.8; }
.pill-btn span { max-width: 110px; overflow: hidden; text-overflow: ellipsis; }

.pill-menu {
  position: fixed; z-index: 60; min-width: 190px; padding: 6px;
  background: var(--surface); border-radius: var(--radius-md);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.22), var(--shadow-soft);
  display: flex; flex-direction: column; animation: fadeIn var(--t) var(--ease);
}
.pill-menu button {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 12px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--text); text-align: left;
}
.pill-menu button:hover, .pill-menu button:focus-visible { background: var(--surface-alt); outline: none; }
.pill-menu button.is-current { color: var(--vine-green); font-weight: 800; }
.pill-menu svg { width: 16px; height: 16px; stroke: currentColor; }

/* Category chips: arrow buttons on desktop only (a mouse can't swipe) */
.chips-scroller { position: relative; }
.chips-arrow { display: none; }
@media (hover: hover) and (pointer: fine) {
  .chips-arrow {
    display: flex; align-items: center; justify-content: center;
    position: absolute; top: 50%; z-index: 2; width: 30px; height: 30px; margin-top: -17px;
    border-radius: 50%; background: var(--surface); color: var(--text);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: opacity var(--t) var(--ease);
  }
  .chips-arrow svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2.4; }
  .chips-arrow.prev { left: -6px; }
  .chips-arrow.prev svg { transform: rotate(180deg); }
  .chips-arrow.next { right: -6px; }
  /* fade the chips under each arrow */
  .chips-scroller::before, .chips-scroller::after {
    content: ""; position: absolute; top: 0; bottom: 4px; width: 44px; z-index: 1; pointer-events: none;
    transition: opacity var(--t) var(--ease);
  }
  .chips-scroller::before { left: -20px; background: linear-gradient(90deg, var(--bg) 40%, transparent); }
  .chips-scroller::after { right: -20px; background: linear-gradient(270deg, var(--bg) 40%, transparent); }
  .chips-scroller.at-start::before, .chips-scroller.at-end::after { opacity: 0; }
  .chips-scroller.at-start .chips-arrow.prev,
  .chips-scroller.at-end .chips-arrow.next { opacity: 0; pointer-events: none; }
}

/* Shopping priority: slider */
.prio-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.prio-value { font-size: 13px; font-weight: 700; color: var(--text); }
.prio-range {
  -webkit-appearance: none; appearance: none; width: 100%; height: 28px; margin: 6px 0 2px;
  background: transparent; padding: 0; border: 0; box-shadow: none; cursor: pointer;
}
.prio-range::-webkit-slider-runnable-track {
  height: 8px; border-radius: 4px;
  background: linear-gradient(90deg, var(--prio-1), var(--prio-2), var(--prio-3), var(--prio-4), var(--prio-5));
  box-shadow: inset 0 0 0 1px rgba(239, 72, 106, 0.25);
}
.prio-range::-moz-range-track {
  height: 8px; border-radius: 4px;
  background: linear-gradient(90deg, var(--prio-1), var(--prio-2), var(--prio-3), var(--prio-4), var(--prio-5));
}
.prio-range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 26px; height: 26px; margin-top: -9px; border-radius: 50%;
  background: var(--prio); border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.prio-range::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--prio); border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.prio-range:focus-visible { outline: 2px solid var(--vine-green); outline-offset: 4px; border-radius: 8px; }
.prio-scale { display: flex; justify-content: space-between; font-size: 11.5px; font-weight: 600; color: var(--text-muted); }

/* =========================================================
   Travel Buddies (group trips)
   ========================================================= */
.avatar[style*="--avatar"] { background: var(--avatar); color: #fff; }
.buddy-list { list-style: none; margin: 4px 0 10px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.buddy-row { display: flex; align-items: center; gap: 10px; }
.buddy-name { flex: 1; min-width: 0; font-weight: 700; font-size: 14.5px; display: flex; flex-direction: column; }
.buddy-status { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.buddy-remove { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--text-muted); }
.buddy-remove svg { width: 14px; height: 14px; stroke: currentColor; }
.buddy-invite { margin-top: 12px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.buddy-invite svg { width: 18px; height: 18px; stroke: currentColor; }

.invite-qr { display: flex; justify-content: center; margin: 6px 0 8px; }
.invite-qr svg { border-radius: 12px; box-shadow: var(--shadow-soft); max-width: 100%; height: auto; }
.invite-center { text-align: center; margin-bottom: 12px; }
.invite-link { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.invite-link input { flex: 1; min-width: 0; font-size: 13px; }

.trip-group {
  display: inline-flex; align-items: center; gap: 3px; margin-left: 8px; padding: 1px 7px;
  border-radius: 999px; background: var(--chart-accent-wash); color: var(--vine-green);
  font-size: 11px; font-weight: 800; vertical-align: 2px;
}
.trip-group svg { width: 12px; height: 12px; stroke: currentColor; }
.trip-cloud { display: inline-flex; margin-left: 7px; color: var(--status-good); vertical-align: -2px; }
.trip-cloud svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2; }
.trips-cloud-note { display: flex; align-items: center; gap: 6px; }
.trips-cloud-note svg { width: 15px; height: 15px; stroke: var(--status-good); stroke-width: 2; flex-shrink: 0; }
.trips-no-backup {
  display: flex; align-items: flex-start; gap: 10px; margin: 4px 0 12px; padding: 10px 12px;
  border-radius: var(--radius-md); background: var(--surface-alt); font-size: 13.5px; line-height: 1.4;
}
.trips-no-backup svg { width: 18px; height: 18px; stroke: var(--text-muted); stroke-width: 2; flex-shrink: 0; margin-top: 1px; }
.trips-no-backup .btn-link { padding: 0; font-size: inherit; font-weight: 700; }

.group-banner {
  display: flex; align-items: flex-start; gap: 8px; margin: 0 0 12px; padding: 10px 12px;
  border-radius: var(--radius-sm); background: var(--surface-alt); color: var(--text-muted);
  font-size: 13px; font-weight: 600; line-height: 1.4;
}
.group-banner svg { width: 15px; height: 15px; stroke: currentColor; flex-shrink: 0; margin-top: 1px; }

.expense-mode { margin-bottom: 12px; }
.expense-mode button { display: flex; align-items: center; justify-content: center; gap: 6px; }
.expense-mode svg { width: 15px; height: 15px; stroke: currentColor; }

.payer-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }

.group-exp-list { list-style: none; margin: 0; padding: 0; }
.group-exp-row {
  display: flex; align-items: center; gap: 10px; padding: 10px 0 10px 10px;
  border-bottom: 1px solid var(--border); box-shadow: inset 3px 0 0 var(--payer);
}
.group-exp-row:last-child { border-bottom: none; }
.group-exp-row .avatar { width: 30px; height: 30px; font-size: 12.5px; }
.group-exp-text { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 14px; }
.group-exp-text strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.group-exp-text span { font-size: 12.5px; color: var(--text-muted); }
.group-exp-amount { text-align: right; font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums; display: flex; flex-direction: column; }
.group-exp-amount span { font-size: 11.5px; font-weight: 600; color: var(--text-muted); }
.invite-link input[readonly] { background: var(--surface-alt); color: var(--text); border-color: var(--border); }
.sheet-body input:disabled, .sheet-body select:disabled, .sheet-body textarea:disabled { opacity: 0.6; cursor: not-allowed; }

/* Install banner (before the app stores) */
.install-banner {
  display: flex; align-items: center; gap: 10px; margin: 8px 20px 4px; padding: 10px 10px 10px 12px;
  border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-soft);
}
.install-banner img { border-radius: 10px; flex-shrink: 0; }
.install-text { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 12.5px; line-height: 1.35; color: var(--text-muted); }
.install-text strong { font-size: 14px; color: var(--text); }
.install-go {
  flex-shrink: 0; height: 32px; padding: 0 14px; border-radius: 16px;
  background: var(--vine-green); color: #fff; font-weight: 800; font-size: 13px;
}
.install-close { flex-shrink: 0; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; color: var(--text-muted); }
.install-close svg { width: 14px; height: 14px; stroke: currentColor; }
.install-icon { border-radius: 12px; }

/* "Your trip is only saved on this phone" (Expenses, no account yet) */
.backup-nudge {
  display: flex; align-items: flex-start; gap: 10px; margin: 0 0 12px; padding: 12px 8px 12px 12px;
  border-radius: var(--radius-md); background: var(--chart-accent-wash); border: 1px solid var(--border);
}
.backup-nudge-icon {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  background: var(--surface); color: var(--vine-green);
}
.backup-nudge-icon svg { width: 18px; height: 18px; stroke: currentColor; }
.backup-nudge-text { flex: 1; min-width: 0; }
.backup-nudge-text p { margin: 0 0 8px; font-size: 13.5px; line-height: 1.4; }
.backup-nudge-go {
  height: 32px; padding: 0 14px; border-radius: 16px;
  background: var(--vine-green); color: #fff; font-weight: 800; font-size: 13px;
}
.sync-free { display: flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 700; margin: 0 0 6px; }
.sync-free svg { width: 14px; height: 14px; stroke: var(--status-good); stroke-width: 3; flex-shrink: 0; }
.sync-card .row-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.acct-optin {
  display: flex; align-items: flex-start; gap: 10px; margin: 0 0 14px; padding: 12px 14px;
  border-radius: var(--radius-md); background: var(--surface-alt); font-size: 14px; line-height: 1.4; cursor: pointer;
}
.acct-optin input { width: 20px; height: 20px; margin: 0; flex-shrink: 0; accent-color: var(--vine-green); cursor: pointer; }
.install-steps { margin: 4px 0 18px; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; font-size: 15px; line-height: 1.45; }
.install-inline { display: inline-flex; vertical-align: -3px; color: #0a84ff; }
.install-inline svg { width: 18px; height: 18px; stroke: currentColor; }

/* Settings footer credit */
.made-by {
  display: flex; align-items: center; justify-content: center; gap: 8px; margin: 18px 0 4px; padding: 8px;
  font-size: 12.5px; color: var(--text-muted); text-decoration: none;
}
.made-by strong { color: var(--text); }
.made-by img { opacity: 0.85; }
[data-theme='dark'] .made-by img { filter: invert(1); }
.made-by:hover span { text-decoration: underline; }

/* Settings: trips row + collapsible groups */
.settings-list .item-btn.item-rich { gap: 12px; padding: 14px 4px; }
.item-rich-icon {
  width: 38px; height: 38px; border-radius: 12px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  background: var(--chart-accent-wash); color: var(--vine-green);
}
.settings-list .item-rich-icon svg { width: 19px; height: 19px; stroke: currentColor; }
.item-rich-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; text-align: left; }
.item-rich-text strong { font-size: 15px; }
.item-rich-text > span { font-size: 12.5px; font-weight: 600; color: var(--text-muted); }
.item-rich-text .item-rich-note { display: inline-flex; align-items: center; gap: 4px; color: var(--vine-green); }
.settings-list .item-rich-note svg { width: 12px; height: 12px; stroke: currentColor; }

.settings-group { border-bottom: 1px solid var(--border); }
.settings-group > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 4px;
}
.settings-group > summary::-webkit-details-marker { display: none; }
.settings-group > summary > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.settings-group > summary strong { font-size: 14.5px; font-weight: 600; color: var(--text); }
.settings-group > summary > span > span { font-size: 12px; color: var(--text-muted); }
.settings-group > summary svg { width: 16px; height: 16px; stroke: var(--text-muted); flex-shrink: 0; transition: transform var(--t) var(--ease); }
.settings-group[open] > summary svg { transform: rotate(180deg); }
.settings-group[open] { padding-bottom: 8px; }
.settings-group .field:first-of-type { margin-top: 2px; }
.settings-list .settings-group .item-btn:last-of-type { border-bottom: none; }
.trips-note { display: flex; align-items: center; gap: 6px; margin: 4px 0 10px; }
.trips-note svg { width: 13px; height: 13px; stroke: currentColor; }

/* Welcome */
.welcome { text-align: center; }
.welcome-icon { border-radius: 16px; margin: 4px auto 10px; display: block; box-shadow: var(--shadow-soft); }
.welcome h3 { margin-bottom: 6px; }
.welcome-card {
  text-align: left; margin: 14px 0 18px; padding: 14px; border-radius: var(--radius-md); background: var(--surface-alt);
}
.welcome-card strong { display: flex; align-items: center; gap: 6px; font-size: 14.5px; }
.welcome-card strong svg { width: 16px; height: 16px; stroke: currentColor; }
.welcome-card p { margin: 6px 0 10px; font-size: 13.5px; color: var(--text-muted); line-height: 1.45; }
.welcome-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px 6px 12px; border-radius: 999px;
  background: var(--surface); box-shadow: var(--shadow-soft); font-size: 12.5px; font-weight: 700;
}
.welcome-pill svg { width: 14px; height: 14px; stroke: currentColor; }
.welcome-pill svg:first-child { stroke: var(--vine-green); }

/* "Look here": the trip button pulses when a trip is waiting */
@keyframes trip-pulse {
  0% { box-shadow: 0 0 0 0 rgba(239, 72, 106, 0.55); }
  70% { box-shadow: 0 0 0 12px rgba(239, 72, 106, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 72, 106, 0); }
}
.trip-pill.pulse { animation: trip-pulse 1.4s ease-out 4; outline: 2px solid var(--vine-green); outline-offset: 1px; }
@media (prefers-reduced-motion: reduce) { .trip-pill.pulse { animation: none; } }
.settings-list .item-btn + .field { margin-top: 14px; }

.legal-links a { color: var(--vine-green); font-weight: 600; }
.settings-legal { text-align: center; font-size: 12px; color: var(--text-muted); margin: 0 0 6px; }
/* Icons inside secondary buttons (e.g. "+ Add a category") stay icon-sized. */
.btn-secondary svg { width: 18px; height: 18px; stroke: currentColor; vertical-align: -4px; margin-right: 2px; flex-shrink: 0; }

/* × on every pop-up sheet: stays at the top right while the sheet scrolls;
   floated so a long title wraps around it instead of running underneath. */
.sheet-close {
  position: sticky; top: 4px; float: right; z-index: 3; margin: 0 -8px 0 8px;
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-alt); color: var(--text-muted);
  transition: color var(--t) var(--ease), background var(--t) var(--ease);
}
.sheet-close:hover { color: var(--text); }
.sheet-close svg { width: 18px; height: 18px; }

/* Version next to Privacy Policy · Terms of Service */
.app-version { color: var(--text-muted); opacity: 0.7; margin-left: 6px; font-weight: 500; }

/* Account: change email / password; Settings: contact support */
.acct-actions { margin: 4px 0 6px; }
.settings-list a.item-btn { text-decoration: none; }

/* Privacy Policy / Terms inside the apps (native.js) */
.page-frame {
  display: block; width: 100%; height: calc(86vh - 80px); border: 0;
  border-radius: var(--radius-md); background: var(--surface);
}

/* Loading: a spinning gold coin (ui.js coinSpinner) */
.coin-loader { display: inline-flex; flex-direction: column; align-items: center; gap: 10px; vertical-align: middle; }
.coin-stage { position: relative; display: inline-block; width: var(--coin, 44px); height: calc(var(--coin, 44px) * 1.25); }
.coin-loader .coin {
  position: absolute; left: 0; top: 0; width: var(--coin, 44px); height: var(--coin, 44px);
  animation: coin-spin 1.1s ease-in-out infinite, coin-hop 1.1s ease-in-out infinite;
  filter: drop-shadow(0 2px 3px rgba(168, 95, 0, 0.25));
}
.coin-shadow {
  position: absolute; left: 18%; right: 18%; bottom: 0; height: 12%; border-radius: 50%;
  background: rgba(0, 0, 0, 0.14); animation: coin-shadow 1.1s ease-in-out infinite;
}
[data-theme='dark'] .coin-shadow { background: rgba(0, 0, 0, 0.45); }
.coin-sparkle {
  position: absolute; color: #FFC93C; font-size: calc(var(--coin, 44px) * 0.28); line-height: 1;
  opacity: 0; animation: coin-twinkle 1.1s ease-in-out infinite;
}
.coin-sparkle.s1 { top: -6%; right: -22%; }
.coin-sparkle.s2 { top: 38%; left: -26%; font-size: calc(var(--coin, 44px) * 0.2); animation-delay: 0.55s; }
.coin-label { font-size: 14px; font-weight: 700; color: var(--text-muted); text-align: center; }
.coin-sm { --coin: 18px; gap: 0; }
.coin-sm .coin-stage { height: var(--coin); }
.coin-sm .coin { animation: coin-spin 0.9s linear infinite; filter: none; }
.coin-sm .coin-shadow { display: none; }
.coin-md { --coin: 44px; }
.coin-lg { --coin: 64px; }

/* Squeezing it flat and back reads as a coin turning over, with its $ always the right way round. */
@keyframes coin-spin {
  0%, 100% { transform: scaleX(1); }
  50% { transform: scaleX(0.08); filter: brightness(0.82); }
}
@keyframes coin-hop {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -14%; }
}
@keyframes coin-shadow {
  0%, 100% { transform: scaleX(1); opacity: 1; }
  50% { transform: scaleX(0.6); opacity: 0.5; }
}
@keyframes coin-twinkle {
  0%, 100% { opacity: 0; transform: scale(0.4) rotate(0deg); }
  50% { opacity: 1; transform: scale(1) rotate(90deg); }
}
@media (prefers-reduced-motion: reduce) {
  .coin-loader .coin, .coin-shadow, .coin-sparkle { animation: coin-pulse 1.6s ease-in-out infinite; }
  @keyframes coin-pulse { 50% { opacity: 0.55; } }
}

.loading-sheet { display: flex; justify-content: center; padding: 34px 0 30px; }
button.is-busy { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.google-native-btn.is-busy > svg:not(.coin) { display: none; }
.sync-head .coin-loader { margin-right: 2px; }

/* ---------- launch animation (#intro, intro.js) ----------
   Dotted continents fly from the foreground into the distance, the logo
   appears, then a dot in the top-right corner grows into a circle that
   reveals the app. The circle is a hole in a mask whose radius (--intro-r)
   is animated, which needs @property; without it intro.js fades instead. */
@property --intro-r { syntax: '<length>'; inherits: false; initial-value: 0px; }

#intro {
  --pin-x: calc(100% - 28px - env(safe-area-inset-right, 0px));
  --pin-y: calc(28px + env(safe-area-inset-top, 0px));
  position: fixed; inset: 0; z-index: 10000; overflow: hidden;
  background:
    radial-gradient(120% 70% at 50% 42%, rgba(255, 255, 255, 0.14), transparent 60%),
    linear-gradient(155deg, #5D3583 0%, #7C3E86 42%, #D3568E 100%);
  color: #fff; cursor: pointer; touch-action: none; user-select: none;
  -webkit-mask: radial-gradient(circle at var(--pin-x) var(--pin-y), transparent var(--intro-r), #000 calc(var(--intro-r) + 0.5px));
  mask: radial-gradient(circle at var(--pin-x) var(--pin-y), transparent var(--intro-r), #000 calc(var(--intro-r) + 0.5px));
}
.intro-sky { position: absolute; inset: 0; perspective: 600px; perspective-origin: 50% 46%; }
.intro-land {
  position: absolute; left: 50%; top: 50%;
  width: var(--s); height: var(--s); margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2);
  opacity: 0; will-change: transform, opacity;
}
.is-playing .intro-land { animation: intro-fly 2.8s cubic-bezier(0.35, 0.1, 0.3, 1) var(--d) both; }
@keyframes intro-fly {
  0%   { transform: translate3d(calc(var(--x) * 0.55), calc(var(--y) * 0.55), 320px) rotate(var(--r)); opacity: 0; }
  12%  { opacity: 0.85; }
  45%  { opacity: 0.6; }
  75%  { opacity: 0; }
  100% { transform: translate3d(calc(var(--x) * 1.6), calc(var(--y) * 1.3), -1300px) rotate(calc(var(--r) * -1)); opacity: 0; }
}

.intro-logo {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; padding-bottom: 6vh; opacity: 0; transform: scale(0.82);
}
.is-playing .intro-logo { animation: intro-logo 0.8s cubic-bezier(0.2, 0.9, 0.3, 1.25) 1.05s forwards; }
.is-reduced .intro-logo { opacity: 1; transform: none; }
@keyframes intro-logo { to { opacity: 1; transform: none; } }
.intro-mark {
  width: 104px; height: 93px; margin-bottom: 14px; background: #fff;
  -webkit-mask: url(icons/vinedots-mark.svg) center / contain no-repeat;
  mask: url(icons/vinedots-mark.svg) center / contain no-repeat;
  filter: drop-shadow(0 6px 18px rgba(40, 10, 60, 0.35));
}
.intro-company { font-family: var(--font-display); font-size: 13px; font-weight: 800; letter-spacing: 0.22em; text-transform: uppercase; opacity: 0.85; }
.intro-app { font-family: var(--font-display); font-size: 32px; font-weight: 800; letter-spacing: -0.01em; }

.intro-pin {
  position: absolute; left: var(--pin-x); top: var(--pin-y);
  width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%;
  background: #fff; opacity: 0; transform: scale(0);
}
.is-dotted .intro-pin { animation: intro-pin 0.35s cubic-bezier(0.3, 1.6, 0.5, 1) forwards, intro-pulse 1.2s ease-out 0.35s infinite; }
@keyframes intro-pin { to { opacity: 1; transform: scale(1); } }
@keyframes intro-pulse {
  from { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.6); }
  to   { box-shadow: 0 0 0 16px rgba(255, 255, 255, 0); }
}

/* The dot opens into the app. */
#intro.is-revealing { animation: intro-open 0.8s cubic-bezier(0.7, 0, 0.3, 1) forwards; pointer-events: none; }
#intro.is-revealing .intro-pin { animation: none; opacity: 0; }
#intro.is-revealing .intro-logo { transition: opacity 0.5s, transform 0.8s; opacity: 0; transform: scale(1.08); }
@keyframes intro-open { to { --intro-r: 125vmax; } } /* corner to far corner */
/* No animatable mask radius (older browsers) or reduced motion: fade instead. */
#intro.no-circle.is-revealing, #intro.is-reduced.is-revealing { animation: none; transition: opacity 0.4s; opacity: 0; }
@media (prefers-reduced-motion: reduce) { .intro-pin { display: none; } }

/* ---------- Underline tabs ("sliders"): Shopping sort, Expenses views + categories ----------
 * Text tabs with one brand underline (.tab-ink, ui.js) that glides to the
 * chosen tab — following the finger while the pager under it is swiped.
 * The row scrolls sideways when it doesn't fit. */
.tab-strip {
  position: relative; /* the tabs' offsetParent, and the underline's frame */
  display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none;
  margin: 0 -20px 14px; padding: 0 20px; scroll-padding: 0 20px;
  overscroll-behavior-x: contain;
}
.tab-strip::-webkit-scrollbar { display: none; }
.tab-strip button {
  flex: 0 0 auto; position: relative; display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 0 11px; margin: 0; background: none; border: 0; border-radius: 0; box-shadow: none;
  font-size: 16px; font-weight: 600; color: var(--text-muted); white-space: nowrap;
  transition: color var(--t) var(--ease);
}
.tab-strip button.active { color: var(--text); font-weight: 800; background: none; }
.tab-ink {
  position: absolute; left: 0; bottom: 3px; height: 3px; width: 0; border-radius: 3px;
  background: var(--vine-green); pointer-events: none;
  transition: transform 260ms var(--ease), width 260ms var(--ease);
}
.tab-ink.no-anim { transition: none; } /* while following a swipe */
.tab-strip .chip-count { font-size: 12px; font-weight: 600; color: var(--text-muted); opacity: 1; }
.tab-strip .cat-dot { width: 8px; height: 8px; }
.tab-strip .filter-chip.active .cat-dot { box-shadow: none; }
/* Expenses: categories a little smaller than the view tabs. */
.view-switch.tab-strip { margin: -2px -20px 16px; }
.list-toolbar .filter-chips.tab-strip { margin-bottom: 4px; }
.list-toolbar .tab-strip button { font-size: 14.5px; padding-bottom: 10px; }

/* Expenses: Sort + currency as plain text buttons, not pills. */
.list-toolbar .pill-btn { background: none; color: var(--text-muted); box-shadow: none; padding: 0 2px; border-radius: 0; }
.list-toolbar .pill-btn.active { color: var(--vine-green); }
[data-theme='dark'] .list-toolbar .pill-btn { background: none; }

/* Page title count as plain text (e.g. Shopping "4 items"). */
.page-head .page-count { font-size: 13px; font-weight: 600; color: var(--text-muted); }

@media (prefers-reduced-motion: reduce) { .tab-ink { transition: none; } }

/* ---------- "Hide from totals" ----------
 * Marked expenses stay on the list, greyed with an eye-off mark; the eye
 * switch next to Receipts leaves them out of totals, charts and reports. */
.item-card.is-hidden-total { opacity: 0.55; }
.item-card.is-hidden-total .price { color: var(--text-muted); }
.hidden-badge { display: inline-flex; vertical-align: -2px; margin-right: 5px; color: var(--text-muted); }
.hidden-badge svg { width: 14px; height: 14px; stroke: currentColor; }
.hide-toggle svg { width: 15px; height: 15px; stroke: currentColor; }
.hide-toggle.active { background: var(--vine-green); color: #fff; }
.hide-row .t { display: inline-flex; align-items: center; gap: 6px; }
.hide-row .t svg { width: 15px; height: 15px; stroke: currentColor; }
.hide-row[hidden] { display: none; }
