/* Fulla on the web, built from the Android app's own measures (ui/theme/Type.kt, ui/components/Pieces.kt):
   the same sizes, the same 20 px side inset, the same hairlines, rows and chips. Colours are CSS variables
   written by the page from core/design/Colors.kt (Theme.kt). */

@font-face {
  font-family: "Archivo";
  src: url("archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --tabbar: 64px;
  --inset: 20px;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--paper);
  color: var(--ink);
  font-family: "Archivo", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 22px;
  font-weight: 400;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  text-rendering: optimizeLegibility;
}
body { margin: 0; min-height: 100vh; min-height: 100dvh; background: var(--paper); }
h1, h2, p { margin: 0; font-weight: inherit; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
.hidden { display: none; }

/* ── type (FullaType) ───────────────────────────────────────────────────── */
.t-screen { font-size: 28px; line-height: 34px; font-weight: 600; font-stretch: 100%; }
.t-title { font-size: 20px; line-height: 26px; font-weight: 600; }
.t-secondary, .muted { font-size: 14px; line-height: 19px; }
.muted { color: var(--ink-muted); }
.t-section { font-size: 14px; line-height: 19px; font-weight: 600; letter-spacing: 0.2px; text-transform: uppercase; color: var(--ink-muted); }
.t-label { font-size: 12px; line-height: 15px; font-weight: 500; }
.t-amount, .amount { font-size: 17px; line-height: 22px; font-weight: 500; font-stretch: 88%; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.amount.in { color: var(--in); }
.amount.out { color: var(--ink); }
.warn { color: var(--warning); }
.problem { color: var(--danger); font-size: 14px; line-height: 19px; padding: 4px var(--inset); }

/* ── page ───────────────────────────────────────────────────────────────── */
#app { max-width: 640px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; }
.screen { flex: 1; display: flex; flex-direction: column; padding-top: env(safe-area-inset-top); padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom)); }
.screen.no-tabs { padding-bottom: env(safe-area-inset-bottom); }

/* TabHeader / BackHeader: 64 high, title 28, actions at the end */
.header { height: 64px; flex: none; display: flex; align-items: center; padding: 0 4px 0 var(--inset); gap: 0; background: var(--paper); }
.header.back { padding-left: 4px; }
.header h1 { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header.back h1 { font-size: 20px; line-height: 26px; font-weight: 600; padding-left: 4px; }
.icon-btn { width: 48px; height: 48px; flex: none; display: inline-flex; align-items: center; justify-content: center; border: 0; background: none; border-radius: 50%; color: var(--ink); }
.icon-btn:active { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.icon-btn.accent { color: var(--accent); }
svg.icon { flex: none; display: block; fill: currentColor; }

/* the bottom bar: a gold pill behind the tab that is on (LiquidTabBar) */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: var(--paper); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabbar-inner { max-width: 640px; margin: 0 auto; height: var(--tabbar); padding: 8px 12px; display: flex; position: relative; }
.tab { flex: 1; position: relative; border: 0; background: none; color: var(--ink-muted); display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 12px; line-height: 15px; font-weight: 500; padding: 0; }
.tab::before { content: ""; position: absolute; inset: 0 4px; border-radius: 16px; background: var(--highlight); opacity: 0; transition: opacity 160ms var(--ease); }
.tab.selected { color: var(--on-highlight); }
.tab.selected::before { opacity: 1; }
.tab > * { position: relative; }

/* Section: small capitals, room above and below, no line of its own */
.section { padding: 24px var(--inset) 8px; display: flex; align-items: center; }
.section.first { padding-top: 8px; }
.section > :first-child { flex: 1; }
.t-section-note { margin-left: 12px; text-align: right; font-size: 13px; line-height: 17px; color: var(--ink-muted); }

/* ListRow: 56 high, 20 inset, 14 gap, a hairline indented to the text */
.rows { display: flex; flex-direction: column; }
.row { position: relative; display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 10px var(--inset); width: 100%; border: 0; background: none; text-align: left; }
.row::after { content: ""; position: absolute; left: var(--inset); right: 0; bottom: 0; height: 1px; background: var(--line); }
.row.flat::after { display: none; }
.row.tap { cursor: pointer; }
.row.tap:active { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.row .text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row .title { font-size: 16px; line-height: 22px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .sub { font-size: 14px; line-height: 19px; color: var(--ink-muted); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.row .lead { color: var(--ink-muted); }
.row .chev { color: var(--ink-muted); }
.row.archived { opacity: 0.6; }
.day { padding: 16px var(--inset) 6px; }

/* MemberBadge */
.badge { width: 32px; height: 32px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; color: var(--paper); font-size: 12px; line-height: 15px; font-weight: 500; background: var(--ink-muted); }

/* Chip (FilterChip): a check when it is on */
.chips { display: flex; gap: 8px; padding: 4px var(--inset); overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap; }
.chips::-webkit-scrollbar { display: none; }
.chips.wrap { flex-wrap: wrap; overflow: visible; }
.chip { flex: none; height: 32px; padding: 0 12px; display: inline-flex; align-items: center; gap: 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font-size: 14px; line-height: 20px; font-weight: 500; white-space: nowrap; transition: background-color 140ms; }
.chip.selected { background: var(--highlight); color: var(--on-highlight); border-color: transparent; padding-left: 8px; }

/* PrimaryButton / SecondaryButton */
.btn { width: 100%; min-height: 56px; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 16px; border: 1px solid transparent; border-radius: 16px; background: none; font-size: 16px; line-height: 22px; text-align: center; transition: transform 120ms var(--ease); }
.btn:active { transform: scale(0.985); }
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.primary[disabled] { background: var(--line); color: var(--ink-muted); }
.btn.secondary { min-height: 48px; padding: 12px; border-color: var(--line); color: var(--ink); }
.btn.quiet { min-height: 48px; color: var(--ink-muted); }
.btn.danger { background: var(--danger); color: var(--on-accent); }
.btn.danger-line { min-height: 48px; border-color: var(--danger); color: var(--danger); }
.actions { padding: 12px var(--inset) 16px; display: flex; flex-direction: column; gap: 8px; }
.actionbar { position: sticky; bottom: calc(var(--tabbar) + env(safe-area-inset-bottom)); background: var(--paper); border-top: 1px solid var(--line); }
.actionbar.no-tabs { bottom: env(safe-area-inset-bottom); }

/* fields */
.field { display: flex; flex-direction: column; gap: 6px; padding: 8px var(--inset); }
.field .label { font-size: 12px; line-height: 15px; font-weight: 500; color: var(--ink-muted); }
.input, .select { width: 100%; min-height: 56px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); font-size: 16px; }
.input:focus, .select:focus { outline: 2px solid var(--highlight); outline-offset: -1px; border-color: transparent; }
.select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z' fill='%23888'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 24px; padding-right: 44px; }
.field small { font-size: 12px; line-height: 16px; color: var(--ink-muted); }

/* SwitchRow */
.switch { appearance: none; -webkit-appearance: none; flex: none; width: 52px; height: 32px; border-radius: 16px; background: var(--paper-high); border: 2px solid var(--ink-muted); position: relative; margin: 0; transition: background-color 160ms; }
.switch::after { content: ""; position: absolute; top: 6px; left: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--ink-muted); transition: all 160ms var(--ease); }
.switch:checked { background: var(--accent); border-color: var(--accent); }
.switch:checked::after { top: 2px; left: 22px; width: 24px; height: 24px; background: var(--on-accent); }

/* ── Add ────────────────────────────────────────────────────────────────── */
.add { flex: none; height: 100dvh; min-height: 0; overflow: hidden; }
.add .body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.entry-amount { padding: 8px var(--inset); text-align: right; font-size: 44px; line-height: 48px; font-weight: 500; font-stretch: 75%; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.entry-amount.in { color: var(--in); }
.entry-sum { padding: 0 var(--inset); text-align: right; }
.pick { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; justify-content: flex-end; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 8px 16px; }
.tile { min-height: 72px; padding: 10px 4px; border: 0; border-radius: 16px; background: var(--paper-high); color: var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 12px; line-height: 15px; font-weight: 500; min-width: 0; }
.tile .label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile.selected { background: var(--highlight); color: var(--on-highlight); }
.tile:active { transform: scale(0.97); }
.details-line { display: flex; align-items: center; min-height: 48px; padding: 8px var(--inset); border: 0; background: none; text-align: left; width: 100%; color: var(--ink-muted); font-size: 14px; line-height: 19px; }
.details-line span { flex: 1; }
.details-line svg { color: var(--accent); }
.keypad { background: var(--paper-high); padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: 3fr 1fr; gap: 6px; }
.keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.key { height: 56px; border: 0; border-radius: 14px; background: var(--paper); color: var(--ink); font-size: 26px; font-weight: 400; font-variant-numeric: tabular-nums; display: flex; align-items: center; justify-content: center; padding: 0; }
.key:active { background: color-mix(in srgb, var(--ink) 10%, var(--paper)); }
.keyside { display: grid; grid-template-rows: 56px 1fr; gap: 6px; }
.key.save { height: auto; border-radius: 16px; background: var(--line); color: var(--ink-muted); }
.key.save.ready { background: var(--accent); color: var(--on-accent); }
.key.save:disabled { cursor: default; }

/* bottom sheet / dialog */
.scrim { position: fixed; inset: 0; z-index: 30; background: rgba(0, 0, 0, 0.4); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 640px; max-height: 88dvh; overflow-y: auto; background: var(--paper); border-radius: 28px 28px 0 0; padding: 16px 0 calc(16px + env(safe-area-inset-bottom)); }
.sheet .grab { width: 32px; height: 4px; border-radius: 2px; background: var(--line); margin: 0 auto 12px; }
.sheet h2 { padding: 0 var(--inset) 8px; }

/* ── Overview ───────────────────────────────────────────────────────────── */
.period { display: flex; align-items: center; padding: 0 8px; }
.period .label { flex: 1; text-align: center; }
.figures { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; padding: 8px var(--inset) 16px; }
.figure .t-label { color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.2px; }
.figure .v { font-size: 20px; line-height: 26px; font-weight: 500; font-stretch: 88%; font-variant-numeric: tabular-nums; }
.figure.in .v { color: var(--in); }
.meter { height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; margin: 6px 0; }
.meter > div { height: 100%; border-radius: 2px; background: var(--tile, var(--out-surface)); transition: width 400ms var(--ease); }
.meter.paid > div { background: var(--in-surface); }
.empty { padding: 56px var(--inset); text-align: center; display: flex; flex-direction: column; gap: 8px; align-items: center; }

/* category glyph beside a row */
.glyph { width: 40px; height: 40px; border-radius: 12px; flex: none; display: inline-flex; align-items: center; justify-content: center; color: var(--tile, var(--ink-muted)); background: color-mix(in srgb, var(--tile, var(--ink-muted)) 14%, var(--paper)); }

/* ── toast ──────────────────────────────────────────────────────────────── */
.toast { position: fixed; left: 16px; right: 16px; bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + 16px); max-width: 480px; margin: 0 auto; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 12px; background: var(--ink); color: var(--paper); font-size: 14px; line-height: 19px; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25); animation: rise 220ms var(--ease); }
.toast.no-tabs { bottom: calc(env(safe-area-inset-bottom) + 16px); }
.toast-action { border: 0; background: none; font-weight: 600; color: var(--highlight); padding: 4px 8px; }
@keyframes rise { from { transform: translateY(10px); opacity: 0; } }

/* ── welcome (the Android welcome screen: the mark, left aligned, buttons at the bottom) ── */
.welcome { padding: calc(env(safe-area-inset-top) + 16px) var(--inset) calc(env(safe-area-inset-bottom) + 24px); min-height: 100dvh; }
.welcome .lang { align-self: flex-end; width: 150px; }
.welcome .grow { flex: 1; }
.welcome .mark { color: var(--highlight); margin-top: 12vh; }
.welcome .name { font-size: 56px; line-height: 60px; font-weight: 700; font-stretch: 100%; letter-spacing: -0.5px; margin-top: 24px; }
.welcome .lead { font-size: 20px; line-height: 26px; font-weight: 600; margin-top: 16px; }
.welcome .copy { color: var(--ink-muted); margin-top: 8px; }
.welcome .buttons { display: flex; flex-direction: column; gap: 8px; margin-top: 24px; }
.form { display: flex; flex-direction: column; }
.hint { margin: 8px var(--inset); padding: 14px 16px; border-radius: 16px; background: var(--paper-high); display: flex; flex-direction: column; gap: 8px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } }
.tile .icon { margin-bottom: 0; }
.chip svg { margin-right: 0; }
.wrap-row { display: contents; }
.searchbox { display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 16px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink-muted); }
.searchbox input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 16px; color: var(--ink); }
.searchbox:focus-within { outline: 2px solid var(--highlight); outline-offset: -1px; border-color: transparent; }
.row .icon-btn { width: 40px; height: 40px; margin: -8px -8px -8px 0; color: var(--ink-muted); }
.pad { padding: 0 var(--inset) 8px; }
.period .icon-btn[disabled] { color: var(--line); }
.row .text .meter { margin: 6px 0 2px; }

/* ── settings, forms ────────────────────────────────────────────────────── */
.pad { padding: 4px var(--inset) 8px; }
.row .lead { display: inline-flex; color: var(--ink-muted); }
.row .check { display: inline-flex; color: var(--accent); }
.row .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.row .glyph { width: 40px; height: 40px; }
.row .glyph.sub { margin-left: 24px; }
.text-btn { border: 0; background: none; padding: 8px; font-weight: 500; font-size: 14px; color: var(--ink); }
.text-btn.danger { color: var(--danger); }
.form-label { padding: 16px var(--inset) 4px; color: var(--ink-muted); }
.form-screen .body { flex: 1; min-height: 0; padding-bottom: 8px; }
.form-screen { padding-bottom: 0; }
.actionbar .actions { padding-top: 12px; }
.summary { margin: 16px var(--inset) 8px; padding: 14px; border-radius: 16px; background: var(--paper-high); display: flex; flex-direction: column; gap: 4px; }
.summary p.muted { font-size: 14px; line-height: 19px; }
.icon-grid { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px var(--inset); }
.pick-icon { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--paper-high); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; }
.pick-icon.selected { background: var(--highlight); color: var(--on-highlight); }
.code { letter-spacing: 1px; }
.flush { padding-left: 0; padding-right: 0; }
.center { text-align: center; }
.welcome .lang { display: flex; justify-content: flex-end; align-items: center; width: auto; align-self: stretch; }
.welcome .lang .select { width: 150px; min-height: 40px; }
.welcome .mark { color: var(--highlight); margin-top: 0; display: block; }
.welcome .mark-icon { fill: currentColor; }
.welcome { gap: 0; }
.welcome .buttons .rows { margin: 0 calc(var(--inset) * -1); width: calc(100% + var(--inset) * 2); }
.sheet .rows { margin: 0; }
.sheet > .t-label { display: block; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.2px; padding: 16px var(--inset) 2px; }

/* TripToggle: "Everyday / trip", a pill of two options */
.toggle { display: flex; gap: 4px; margin: 8px var(--inset); padding: 4px; border-radius: 14px; background: var(--paper-high); }
.toggle-option { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 8px; border: 0; border-radius: 10px; background: var(--paper); color: var(--ink); font-size: 16px; line-height: 22px; transition: background 160ms var(--ease), color 160ms var(--ease); }
.toggle-option span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toggle-option.selected { background: var(--highlight); color: var(--on-highlight); }

/* the jar and the liquid behind tiles and bars */
.jar { position: relative; margin: 8px 8px; }
.liquid-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.jar-figure { position: absolute; left: 24px; right: 24px; text-align: center; font-size: 52px; line-height: 56px; font-weight: 500; font-stretch: 75%; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ink); }
.jar-figure.on-liquid { color: var(--paper); }
.tiles-row { display: flex; gap: 10px; padding: 5px 16px; }
.lq-tile { position: relative; overflow: hidden; flex: 1; min-width: 0; min-height: 104px; padding: 12px 14px; border-radius: 20px; background: var(--paper-high); display: flex; flex-direction: column; gap: 2px; border: 0; text-align: left; color: var(--ink); }
.lq-tile > *:not(canvas) { position: relative; }
.lq-tile .t-label { color: var(--ink-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lq-tile .value { font-size: 20px; line-height: 26px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lq-tile .value.in { color: var(--in); } .lq-tile .value.out { color: var(--out); }
.lq-tile .ctx { font-size: 12px; line-height: 15px; font-weight: 500; }
.lq-bar { position: relative; overflow: hidden; display: flex; align-items: center; gap: 12px; margin: 4px 16px; padding: 10px 14px; min-height: 56px; border-radius: 16px; background: var(--paper-high); width: calc(100% - 32px); border: 0; text-align: left; color: var(--ink); }
.lq-bar > *:not(canvas) { position: relative; }
.lq-bar .text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lq-bar .title { font-size: 16px; line-height: 22px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lq-bar .ctx { font-size: 12px; line-height: 15px; font-weight: 500; color: var(--ink-muted); }
.lq-bar .detail { font-size: 12px; line-height: 15px; font-weight: 500; }
.lq-bar .amount { white-space: nowrap; }
.lq-bar .lead.in { color: var(--in); } .lq-bar .lead.warn { color: var(--warning); } .lq-bar .lead { color: var(--ink-muted); display: inline-flex; }
.progress { height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; margin-top: 6px; }
.progress > div { height: 100%; border-radius: 2px; background: var(--out-surface); }
.progress.over > div { background: var(--danger); }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; margin-right: 4px; border: 0; border-radius: 20px; background: var(--highlight); color: var(--on-highlight); font-size: 16px; }
.row.indent1 { padding-left: calc(var(--inset) + 18px); } .row.indent2 { padding-left: calc(var(--inset) + 36px); }
.lq-tile.spacer { background: none; min-height: 0; }
.vials { display: flex; align-items: flex-end; gap: 8px; padding: 12px 16px; }
.vial { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.vial .top { color: var(--ink); white-space: nowrap; }
.vial-glass { position: relative; width: 100%; height: 132px; }
.vial-icon { display: inline-flex; width: 18px; height: 18px; color: var(--ink-muted); }
.vial .name { color: var(--ink-muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; }
.plain-btn { border: 0; background: none; text-align: left; width: 100%; }
.range { margin-top: -4px; }
.pill-label { font-size: 16px; line-height: 22px; }
@media (max-width: 359px) { .pill-label { display: none; } }
.swatches { display: flex; gap: 4px; padding: 8px 16px; overflow-x: auto; scrollbar-width: none; }
.swatch { flex: none; width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; border: 0; background: none; border-radius: 50%; }
.swatch-dot { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.dots { display: inline-flex; gap: 4px; } .dot-c { width: 20px; height: 20px; border-radius: 50%; display: inline-block; }
.qr { margin: 8px 48px; padding: 16px; border-radius: 16px; background: #fff; color: #000; }
.qr svg { display: block; width: 100%; height: auto; }
.amount.neg { color: var(--out); } .amount.muted { color: var(--ink-muted); }

/* the tour: a dimmed screen with a hole over the part being named */
.tour { position: fixed; inset: 0; z-index: 60; }
.tour-dim { position: absolute; inset: 0; background: color-mix(in srgb, var(--ink) 60%, transparent); }
.tour-hole { position: absolute; border-radius: 16px; box-shadow: 0 0 0 100vmax color-mix(in srgb, var(--ink) 60%, transparent); }
.tour-card { position: absolute; left: 16px; right: 16px; max-width: 608px; margin: 0 auto; padding: 20px; border-radius: 20px; background: var(--paper); display: flex; flex-direction: column; gap: 4px; }
.tour-card.bottom { bottom: calc(16px + env(safe-area-inset-bottom)); } .tour-card.top { top: calc(16px + env(safe-area-inset-top)); } .tour-card.mid { top: 50%; transform: translateY(-50%); }
.tour-text { margin-bottom: 8px; }
.tour-buttons { display: flex; gap: 8px; } .tour-buttons .btn { flex: 1; }
.tour-skip { align-self: flex-end; margin-top: 4px; }

/* "set up my project": numbered steps */
.setup-step { display: flex; align-items: center; gap: 14px; padding: 8px var(--inset); }
.setup-step .num { width: 20px; text-align: center; }
.setup-step .text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.setup-step .sub { font-size: 14px; line-height: 19px; color: var(--ink-muted); }
.setup-progress { padding: 4px var(--inset); }
.setup-buttons { display: flex; flex-direction: column; align-items: flex-end; }

/* 0.1.40: the round Add button in the middle of the bar, raised above it; its own highlight, no pill */
.tab.tab-add::before { display: none; }
.tab.tab-add .add-fab { width: 56px; height: 56px; margin-top: -28px; border-radius: 50%; background: var(--highlight); color: var(--on-highlight);
  display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22); transition: transform 160ms var(--ease); }
.tab.tab-add:active .add-fab { transform: scale(0.94); }

/* Cards: the rows of a section in one rounded surface, with room around it */
.rows.card, .card { margin: 0 16px; background: var(--paper-high); border-radius: 20px; overflow: hidden; }
.rows.card .row { padding-left: 16px; padding-right: 16px; }
.rows.card .row::after { left: 16px; }
.rows.card > .row:last-child::after { display: none; }
.rows.card + .rows.card { margin-top: 12px; }

/* Settings in blocks: a title and what the block is for, above its card */
.group-title { padding: 28px var(--inset) 10px; display: flex; flex-direction: column; gap: 2px; }
.group-title.first { padding-top: 12px; }
.group-title h3 { margin: 0; font-size: 20px; line-height: 26px; font-weight: 600; color: var(--ink); }
.group-title p { margin: 0; font-size: 14px; line-height: 19px; color: var(--ink-muted); }

/* A goal that is reached fills green */
.progress.paid > div { background: var(--in-surface); }

/* The month day by day */
.calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; padding: 12px; }
.cal-head { text-align: center; font-size: 12px; line-height: 16px; color: var(--ink-muted); }
.cal-day { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-radius: 10px; font-size: 12px; color: var(--ink); }
.cal-day.quiet { color: var(--ink-muted); }
.cal-day.empty { visibility: hidden; }
.cal-day.today { box-shadow: inset 0 0 0 2px var(--highlight); }
.cal-legend { grid-column: 1 / -1; margin: 6px 0 0; font-size: 14px; line-height: 19px; color: var(--ink-muted); }

/* The demo says so at the top, with the way to one's own household */
.demo-notice { align-self: flex-start; margin: 4px var(--inset); padding: 8px 14px; border: 0; border-radius: 999px; background: var(--highlight); color: var(--on-highlight);
  font-size: 13px; line-height: 17px; font-weight: 600; display: inline-flex; align-items: center; gap: 2px; }

/* Messages at the top, never over the tabs */
.toast, .toast.no-tabs { top: calc(env(safe-area-inset-top) + 72px); bottom: auto; }
