:root {
  --rose: #B5617A;
  --rose-deep: #8E4459;
  --rose-soft: #F4E3E8;
  --on-rose: #FFFFFF;
  --cream: #FFF7E1;
  --bg: #FBF7F4;
  --card: #FFFFFF;
  --ink: #2E2427;
  --ink-2: #6E6266;
  --ink-3: #A0959A;
  --line: #EEE5E2;
  --good: #3F7D5C;
  --good-soft: #E3F1E8;
  --warn: #A9701A;
  --warn-soft: #FBEFD9;
  --bad: #B23A3A;
  --bad-soft: #F9E1E0;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(46, 36, 39, .05), 0 4px 16px rgba(46, 36, 39, .05);
  --serif: ui-serif, "New York", "Iowan Old Style", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
/* Dark colors: used when the phone is in dark mode (Automatic), or when the couple picks Dark. */
@media (prefers-color-scheme: dark) {
  :root:not([data-mode="light"]) {
    --rose: #D98AA0;
    --rose-deep: #F0B3C4;
    --rose-soft: #3A2830;
    --on-rose: #2A1820;
    --cream: #3A3426;
    --bg: #161214;
    --card: #221C1F;
    --ink: #F4ECEE;
    --ink-2: #BFB2B6;
    --ink-3: #85797D;
    --line: #342B2F;
    --good: #7CC49C;
    --good-soft: #1F3328;
    --warn: #E5B160;
    --warn-soft: #3A2E1A;
    --bad: #F08A84;
    --bad-soft: #3D2120;
    --shadow: none;
    color-scheme: dark;
  }
}
:root[data-mode="dark"] {
  --rose: #D98AA0;
  --rose-deep: #F0B3C4;
  --rose-soft: #3A2830;
  --on-rose: #2A1820;
  --cream: #3A3426;
  --bg: #161214;
  --card: #221C1F;
  --ink: #F4ECEE;
  --ink-2: #BFB2B6;
  --ink-3: #85797D;
  --line: #342B2F;
  --good: #7CC49C;
  --good-soft: #1F3328;
  --warn: #E5B160;
  --warn-soft: #3A2E1A;
  --bad: #F08A84;
  --bad-soft: #3D2120;
  --shadow: none;
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font: 16px/1.4 var(--sans); -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: var(--rose); }
h1, h2, h3 { margin: 0; font-weight: 600; }
.serif { font-family: var(--serif); }

#app { max-width: 560px; margin: 0 auto; min-height: 100vh; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 5;
  padding: calc(var(--safe-top) + 10px) 16px 10px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.6) blur(18px); -webkit-backdrop-filter: saturate(1.6) blur(18px);
  display: flex; align-items: center; gap: 8px; min-height: 52px;
}
.topbar h1 { font: 700 28px/1.15 var(--serif); letter-spacing: -.01em; flex: 1; }
.topbar .back { color: var(--rose); font-weight: 600; display: flex; align-items: center; gap: 2px; font-size: 17px; padding: 6px 6px 6px 0; }
.topbar .act { color: var(--rose); font-weight: 600; font-size: 16px; padding: 6px 2px; }
.round-btn { width: 36px; height: 36px; border-radius: 50%; background: var(--rose); color: var(--on-rose); display: grid; place-items: center; font-size: 22px; line-height: 1; box-shadow: 0 2px 8px rgba(181, 97, 122, .35); }

main { padding: 4px 16px calc(96px + var(--safe-bottom)); outline: none; }

/* ---------- tab bar ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 6;
  display: flex; justify-content: center;
  background: color-mix(in srgb, var(--card) 90%, transparent);
  backdrop-filter: saturate(1.6) blur(18px); -webkit-backdrop-filter: saturate(1.6) blur(18px);
  border-top: 1px solid var(--line);
  padding-bottom: var(--safe-bottom);
}
.tabbar .inner { display: flex; width: 100%; max-width: 560px; }
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0 6px; color: var(--ink-3); font-size: 10.5px; font-weight: 600; }
.tab svg { width: 25px; height: 25px; }
.tab[aria-current="page"] { color: var(--rose); }

/* ---------- cards & lists ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 14px; }
.card.flush { padding: 0; overflow: hidden; }
.section-label { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); margin: 22px 4px 8px; display: flex; justify-content: space-between; align-items: baseline; }
.section-label a, .section-label button { text-transform: none; letter-spacing: 0; font-weight: 600; color: var(--rose); font-size: 14px; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); min-height: 52px; width: 100%; text-align: left; }
.row:last-child { border-bottom: 0; }
.row .main { flex: 1; min-width: 0; }
.row .t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.row .s { color: var(--ink-2); font-size: 14px; margin-top: 1px; }
.row .r { text-align: right; flex-shrink: 0; }
.row .amt { font-weight: 600; font-variant-numeric: tabular-nums; }
.chev { color: var(--ink-3); flex-shrink: 0; }
button.row:active, .tap:active { background: var(--rose-soft); }

.pill { display: inline-block; font-size: 12.5px; font-weight: 600; padding: 3px 9px; border-radius: 99px; background: var(--line); color: var(--ink-2); white-space: nowrap; }
.pill.good { background: var(--good-soft); color: var(--good); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.rose { background: var(--rose-soft); color: var(--rose-deep); }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex-shrink: 0; padding: 7px 14px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); font-size: 14px; font-weight: 600; color: var(--ink-2); }
.chip[aria-pressed="true"] { background: var(--rose); border-color: var(--rose); color: var(--on-rose); }
.chip .n { opacity: .7; margin-left: 4px; font-weight: 500; }

.seg { display: flex; background: var(--line); border-radius: 10px; padding: 2px; margin-bottom: 14px; }
.seg button { flex: 1; padding: 7px; border-radius: 8px; font-weight: 600; font-size: 14px; color: var(--ink-2); }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }

.search { width: 100%; padding: 10px 14px 10px 36px; border-radius: 12px; border: 0; background: var(--line); margin-bottom: 10px; font-size: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23999' stroke-width='2'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='M11 11l4 4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 12px center; }
.search:focus { outline: 2px solid var(--rose); }

/* ---------- home ---------- */
.hero {
  border-radius: 22px; padding: 22px 20px 20px; color: #fff; margin-bottom: 14px; position: relative; overflow: hidden;
  background: radial-gradient(120% 90% at 100% 0%, var(--hero3, #D58BA0) 0%, transparent 60%), linear-gradient(150deg, var(--hero1, #B5617A), var(--hero2, #8E4459));
}
.hero.photo { min-height: 260px; display: flex; flex-direction: column; justify-content: flex-end; background-size: cover; background-position: center 30%; text-shadow: 0 1px 8px rgba(0,0,0,.35); }
.hero.photo::after { display: none; }

/* personalize */
.swatches { display: flex; gap: 12px; flex-wrap: wrap; padding: 4px 0 2px; }
.swatch { width: 40px; height: 40px; border-radius: 50%; border: 3px solid var(--card); box-shadow: 0 0 0 1px var(--ink-3); position: relative; }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2.5px var(--ink); }
.swatch-name { font-size: 13px; color: var(--ink-2); margin-top: 8px; }
.photo-row { display: flex; align-items: center; gap: 14px; }
.thumb { width: 64px; height: 64px; border-radius: 14px; background: var(--line) center/cover; flex-shrink: 0; display: grid; place-items: center; color: var(--ink-3); font-size: 26px; }
.photo-row .btns { display: flex; gap: 8px; flex-wrap: wrap; }
.share-btn svg { flex-shrink: 0; }
.share-btn { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; margin-top: 12px; padding: 10px; border-radius: 12px; background: var(--rose-soft); color: var(--rose-deep); font-weight: 600; font-size: 15px; }
.hero::after { content: ""; position: absolute; right: -30px; bottom: -40px; width: 160px; height: 160px; border-radius: 50%; border: 14px solid rgba(255,247,225,.13); }
.hero .names { font: 600 26px/1.15 var(--serif); }
.hero .date { opacity: .9; font-size: 14.5px; margin-top: 4px; }
.hero .count { display: flex; align-items: baseline; gap: 8px; margin-top: 18px; }
.hero .big { font: 700 56px/1 var(--serif); font-variant-numeric: tabular-nums; }
.hero .unit { font-size: 16px; opacity: .92; }
.hero .place { font-size: 13.5px; opacity: .85; margin-top: 8px; }

.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat { background: var(--bg); border-radius: 12px; padding: 10px 12px; }
.stat .k { font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.stat .v { font: 700 21px/1.2 var(--sans); font-variant-numeric: tabular-nums; margin-top: 2px; }
.stats.three { grid-template-columns: repeat(3, 1fr); }
.stats.three .v { font-size: 18px; }
.stat { min-width: 0; }
.stat .v { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.bar { height: 10px; border-radius: 99px; background: var(--line); overflow: hidden; position: relative; margin: 10px 0 6px; }
.bar > span { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; }
.bar .b1 { background: color-mix(in srgb, var(--rose) 35%, transparent); }
.bar .b2 { background: var(--rose); }
.bar.over .b1 { background: color-mix(in srgb, var(--bad) 40%, transparent); }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--ink-2); flex-wrap: wrap; }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: 0; }

.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; margin-bottom: 10px; font-size: 14.5px; font-weight: 500; }
.alert.bad { background: var(--bad-soft); color: var(--bad); }
.alert.warn { background: var(--warn-soft); color: var(--warn); }
.alert.good { background: var(--good-soft); color: var(--good); }
.alert.info { background: var(--rose-soft); color: var(--rose-deep); }
.alert .x { margin-left: auto; font-size: 20px; line-height: 1; opacity: .6; padding: 0 2px; }

.ring-wrap { display: flex; align-items: center; gap: 16px; }
.ring { width: 84px; height: 84px; flex-shrink: 0; }
.ring text { font: 700 19px var(--sans); fill: var(--ink); }
.meals { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.meal { background: var(--cream); border-radius: 10px; padding: 6px 10px; font-size: 14px; }
.meal b { font-variant-numeric: tabular-nums; margin-left: 4px; }

/* ---------- checklist ---------- */
.check { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--ink-3); flex-shrink: 0; display: grid; place-items: center; transition: transform .15s; }
.check svg { width: 15px; height: 15px; opacity: 0; }
.check.on { background: var(--good); border-color: var(--good); color: #fff; }
.check.on svg { opacity: 1; }
.check:active { transform: scale(.85); }
.done-row .t { color: var(--ink-3); text-decoration: line-through; font-weight: 500; }
.task-row { padding-left: 12px; }
.task-row .t { white-space: normal; font-weight: 500; }

/* ---------- vendors ---------- */
.vcard { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.vcard:last-child { border-bottom: 0; }
.vtop { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.vfoot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; gap: 8px; }
.mini-btn { white-space: nowrap; flex-shrink: 0; font-size: 13.5px; font-weight: 600; color: var(--rose); background: var(--rose-soft); padding: 6px 12px; border-radius: 99px; }
.prog { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; margin-top: 10px; }
.prog > span { display: block; height: 100%; background: var(--good); border-radius: 99px; }

/* ---------- guests ---------- */
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; flex-shrink: 0; background: var(--cream); color: var(--rose-deep); }
.rsvp { min-width: 74px; text-align: center; }
.tables { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.table-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; text-align: left; }
.table-card .num { font: 700 13px var(--sans); color: var(--rose); letter-spacing: .04em; }
.table-card .nm { font-weight: 600; margin: 2px 0 10px; min-height: 2.6em; line-height: 1.3; }
.seats { display: flex; flex-wrap: wrap; gap: 4px; }
.seats i { width: 12px; height: 12px; border-radius: 50%; background: var(--line); }
.seats i.f { background: var(--rose); }
.seats i.o { background: var(--bad); }

/* ---------- day-of ---------- */
.timeline { position: relative; }
.tl { display: flex; gap: 14px; padding: 12px 16px; width: 100%; text-align: left; border-bottom: 1px solid var(--line); }
.tl:last-child { border-bottom: 0; }
.tl .time { width: 78px; white-space: nowrap; flex-shrink: 0; font-weight: 700; color: var(--rose); font-variant-numeric: tabular-nums; font-size: 14.5px; padding-top: 1px; }
.call { color: var(--rose); font-weight: 600; text-decoration: none; }

/* ---------- forms ---------- */
.field { display: block; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.field:last-child { border-bottom: 0; }
.field .lbl { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 4px; }
.field input:not([type=checkbox]), .field select, .field textarea {
  width: 100%; border: 0; background: transparent; padding: 2px 0; font-size: 17px; outline: none; border-radius: 0;
}
.field textarea { resize: vertical; min-height: 64px; }
.field select { -webkit-appearance: none; appearance: none; }
.field .hint { font-size: 13px; color: var(--ink-3); margin-top: 4px; }
.field.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.field.toggle .lbl { margin: 0; font-size: 16px; color: var(--ink); font-weight: 500; }
.field:focus-within { background: color-mix(in srgb, var(--cream) 55%, transparent); }
.switch { appearance: none; -webkit-appearance: none; width: 51px; height: 31px; border-radius: 99px; background: var(--line); position: relative; transition: background .2s; flex-shrink: 0; cursor: pointer; margin: 0; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.2); transition: transform .2s; }
.switch:checked { background: var(--good); }
.switch:checked::after { transform: translateX(20px); }
.form-section { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); padding: 18px 16px 6px; background: var(--bg); }
.seg-input { display: flex; gap: 6px; margin-top: 4px; flex-wrap: wrap; }
.seg-input label { flex: 1 1 auto; position: relative; }
.seg-input input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.seg-input span { display: block; text-align: center; padding: 8px; border-radius: 10px; background: var(--line); font-weight: 600; font-size: 15px; }
.seg-input input:checked + span { background: var(--rose); color: var(--on-rose); }
.seg-input input:focus-visible + span { outline: 2px solid var(--rose); outline-offset: 2px; }

.btn { display: block; width: 100%; padding: 14px; border-radius: 14px; font-weight: 700; font-size: 16px; text-align: center; background: var(--rose); color: var(--on-rose); }
.btn.ghost { background: var(--rose-soft); color: var(--rose-deep); }
.btn.danger { background: transparent; color: var(--bad); }
.btn + .btn { margin-top: 10px; }
.add-row { color: var(--rose); font-weight: 600; justify-content: center; }

/* ---------- sheet ---------- */
.scrim { position: fixed; inset: 0; background: rgba(20, 12, 15, .38); z-index: 20; animation: fade .2s; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 21; margin: 0 auto; max-width: 560px;
  background: var(--bg); border-radius: 20px 20px 0 0; max-height: 92vh; display: flex; flex-direction: column;
  animation: up .28s cubic-bezier(.2, .8, .2, 1); box-shadow: 0 -10px 40px rgba(0,0,0,.18);
}
.sheet-head { display: flex; align-items: center; padding: 14px 16px 10px; gap: 10px; border-bottom: 1px solid var(--line); }
.sheet-head h2 { flex: 1; text-align: center; font-size: 17px; }
.sheet-head button { color: var(--rose); font-weight: 600; font-size: 16px; min-width: 60px; }
.sheet-head button.save { font-weight: 700; text-align: right; }
.sheet-head button.cancel { text-align: left; }
.sheet-body { overflow-y: auto; padding: 0 0 calc(24px + var(--safe-bottom)); -webkit-overflow-scrolling: touch; }
.sheet-body .card { margin: 14px 16px; }
.grab { width: 38px; height: 5px; border-radius: 9px; background: var(--ink-3); opacity: .4; margin: 8px auto 0; }
@keyframes up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.toast { position: fixed; left: 50%; bottom: calc(92px + var(--safe-bottom)); transform: translate(-50%, 20px); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 99px; font-weight: 600; font-size: 14.5px; opacity: 0; transition: .25s; pointer-events: none; z-index: 30; white-space: nowrap; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- welcome ---------- */
.welcome { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: calc(var(--safe-top) + 30px) 24px calc(var(--safe-bottom) + 30px); max-width: 480px; margin: 0 auto; }
.welcome img { width: 84px; height: 84px; border-radius: 20px; box-shadow: 0 8px 24px rgba(181, 97, 122, .35); }
.welcome h1 { font: 700 36px/1.1 var(--serif); margin: 24px 0 10px; }
.welcome p { color: var(--ink-2); font-size: 17px; margin: 0 0 28px; }
.welcome ul { list-style: none; padding: 0; margin: 0 0 32px; }
.welcome li { display: flex; gap: 12px; align-items: center; padding: 7px 0; font-weight: 500; }
.welcome li span { width: 34px; height: 34px; border-radius: 10px; background: var(--rose-soft); display: grid; place-items: center; font-size: 17px; }
.brand { font-size: 13px; color: var(--ink-3); text-align: center; margin-top: 24px; letter-spacing: .04em; }

.empty { text-align: center; color: var(--ink-2); padding: 28px 16px; }
.muted { color: var(--ink-2); }
.small { font-size: 13.5px; }
.right { text-align: right; }
.good-t { color: var(--good); } .bad-t { color: var(--bad); } .warn-t { color: var(--warn); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

@media (min-width: 600px) { .tables { grid-template-columns: repeat(3, 1fr); } }

.btn { text-decoration: none; }
.demo-bar { display: flex; align-items: center; gap: 10px; justify-content: space-between; padding: 11px 14px; margin-bottom: 12px; border-radius: 12px;
  background: var(--rose); color: var(--on-rose); font-size: 14.5px; text-decoration: none; }
.demo-bar b { font-weight: 700; }
.foot-link { color: var(--ink-3); text-decoration: underline; text-underline-offset: 2px; }
.foot-meta { display: inline-block; margin-top: 6px; letter-spacing: 0; font-size: 12px; }
.welcome .brand .foot-link { display: inline-block; margin-top: 8px; letter-spacing: 0; font-size: 12px; }
@media print {
  .tabbar, .topbar .act, .topbar .round-btn, .no-print { display: none !important; }
  body, .card { background: #fff; box-shadow: none; }
  main { padding-bottom: 0; }
}

/* photo shortcut on the Home countdown card */
.hero-photo-btn { position: absolute; top: 14px; right: 14px; z-index: 1; display: flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 99px; font-size: 13px; font-weight: 600; color: #fff; cursor: pointer; text-shadow: none;
  background: rgba(255, 255, 255, .2); border: 1px solid rgba(255, 255, 255, .35); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.hero-photo-btn.icon { width: 36px; height: 36px; padding: 0; justify-content: center; background: rgba(0, 0, 0, .25); }
.hero-photo-btn:active { transform: scale(.95); }
.hero-photo-btn.inline { position: relative; top: auto; right: auto; display: inline-flex; margin-top: 16px; }

/* ================= Money Planner additions ================= */
.hero.money { padding: 22px 20px 18px; }
.hero.money .k { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .9; }
.hero.money .big { font: 700 52px/1.05 var(--serif); margin-top: 8px; font-variant-numeric: tabular-nums; }
.hero.money .sub { font-size: 14.5px; opacity: .92; margin-top: 6px; }
.hero.money .opa { opacity: .8; }
.hero.money .next { display: inline-block; margin-top: 14px; padding: 6px 12px; border-radius: 99px; background: rgba(255, 255, 255, .18); font-size: 13.5px; font-weight: 600; }
.hbar { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .25); overflow: hidden; margin-top: 14px; }
.hbar span { display: block; height: 100%; background: #fff; border-radius: 99px; }
.btn.big-add { font-size: 17px; padding: 15px; margin-bottom: 4px; box-shadow: 0 4px 14px color-mix(in srgb, var(--rose) 35%, transparent); }

.pnav { display: flex; align-items: center; gap: 8px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 8px; margin-bottom: 14px; }
.pnav > button { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--rose); background: var(--rose-soft); flex-shrink: 0; }
.pnav > button:disabled { opacity: .35; }
.pnav .mid { flex: 1; text-align: center; min-width: 0; }
.pnav .mid b { font-size: 16px; }
.linkish { color: var(--rose); font-weight: 600; font-size: inherit; text-decoration: underline; text-underline-offset: 2px; }

.vcard.tap { display: block; width: 100%; text-align: left; }
.vcard .t { font-weight: 600; }
.vcard .amt { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.prog { margin-top: 8px; }

.off-row { opacity: .5; }
.check.ghost { border-style: dashed; }

.month-pick { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-top: 6px; }
.month-pick input { position: absolute; opacity: 0; pointer-events: none; }
.month-pick span { display: block; text-align: center; padding: 8px 0; border-radius: 10px; background: var(--line); font-weight: 700; font-size: 14px; color: var(--ink-2); }
.month-pick input:checked + span { background: var(--rose); color: var(--on-rose); }

.mrow { display: grid; grid-template-columns: 36px 1fr 74px; align-items: center; gap: 8px; padding: 5px 0; }
.mrow .mn { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.mrow .mbars { display: flex; flex-direction: column; gap: 3px; }
.mrow .mbars span { display: block; height: 7px; border-radius: 99px; min-width: 2px; }
.mrow .mbars .in { background: var(--good); }
.mrow .mbars .out { background: var(--rose); }
.mrow .mv { text-align: right; font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; }

.goal .gtop { display: flex; gap: 14px; align-items: center; width: 100%; text-align: left; }
.goal .gtop .main { flex: 1; min-width: 0; }
.goal .gtop .t { font: 600 19px/1.2 var(--serif); }
.ring.sm { width: 64px; height: 64px; }
.ring.sm text { font-size: 18px; }
.k-label { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 4px; }
.avatar { background: var(--rose-soft); color: var(--rose-deep); }

/* ================= Bigger screens (added in 1.2.0) =================
   Under 768px wide nothing below applies, so phones look exactly as before.
   768-1023px (tablets, small windows): a wider single column, pop-ups open as centered dialogs.
   1024px and up (laptops, desktops): side navigation, columns, centered dialogs. */
.side-brand, .side-foot { display: none; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }

@media (min-width: 768px) {
  .sheet { top: 0; bottom: 0; margin: auto; width: min(560px, calc(100vw - 48px)); height: fit-content; max-height: min(780px, calc(100vh - 48px));
    border-radius: 20px; animation: pop .2s ease-out; box-shadow: 0 24px 70px rgba(0, 0, 0, .28); }
  .sheet .grab { display: none; }
  .sheet-head { padding-top: 16px; }
  .sheet-body { padding-bottom: 20px; }
  .toast { bottom: calc(100px + var(--safe-bottom)); }
}

@media (min-width: 768px) and (max-width: 1023.98px) {
  #app, .tabbar .inner { max-width: 720px; }
  .topbar { padding-left: 24px; padding-right: 24px; }
  main { padding-left: 24px; padding-right: 24px; }
}

@media (min-width: 1024px) {
  body.has-nav #app { max-width: none; padding-left: 240px; }
  body.has-nav .topbar, body.has-nav main { max-width: 1180px; margin: 0 auto; padding-left: 40px; padding-right: 40px; }
  body.has-nav main.narrow, body.has-nav .topbar.narrow { max-width: 820px; }
  body.has-nav .topbar { padding-top: 26px; padding-bottom: 12px; }
  .topbar h1 { font-size: 34px; }
  main { padding-bottom: 56px; }

  /* side navigation instead of the bottom tab bar */
  .tabbar { top: 0; right: auto; width: 240px; display: block; padding: 0; border-top: 0; border-right: 1px solid var(--line);
    background: var(--card); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .tabbar .inner { flex-direction: column; gap: 4px; max-width: none; height: 100%; padding: 26px 14px 22px; }
  .side-brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 24px; font: 700 17.5px/1.2 var(--serif); color: var(--ink); white-space: nowrap; }
  .side-brand img { width: 38px; height: 38px; border-radius: 10px; }
  .side-foot { display: block; margin-top: auto; padding: 0 12px; font-size: 11.5px; letter-spacing: .06em; color: var(--ink-3); }
  .tab { flex: 0 0 auto; flex-direction: row; gap: 13px; padding: 11px 12px; border-radius: 12px; font-size: 15.5px; color: var(--ink-2); }
  .tab svg { width: 22px; height: 22px; }
  .tab[aria-current="page"] { background: var(--rose-soft); color: var(--rose-deep); }
  .toast { bottom: 36px; left: calc(50% + 120px); }

  /* columns */
  .dash { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 0 32px; align-items: start; }
  .dash.bills { grid-template-columns: minmax(0, 1.5fr) minmax(350px, 1fr); }
  .dash.debt { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .dash > .col > .section-label:first-child { margin-top: 6px; }
  .dash > .col > .card:first-child, .dash > .col > .hero:first-child { margin-top: 0; }
  .dash.bills .col > .share-btn { margin-top: 0; }
  .groups { columns: 2; column-gap: 32px; }
  .groups > .grp { break-inside: avoid; display: flow-root; }
  .groups > .grp > .section-label:first-child { margin-top: 8px; }
  .ggrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; margin-bottom: 14px; }
  .ggrid > .card { margin: 0; }
  .hero.money { padding: 28px 28px 24px; }
  .hero.money .big { font-size: 64px; }
  body.has-nav main:not(.narrow) > .btn, body.has-nav main:not(.narrow) > .share-btn { max-width: 420px; }
  .seg { max-width: 520px; }
  .pnav { max-width: none; }
}

/* mouse and trackpad: show what can be clicked */
@media (hover: hover) and (pointer: fine) {
  button.row:hover, button.tap:hover, .vcard.tap:hover { background: color-mix(in srgb, var(--rose-soft) 55%, transparent); }
  .tab:not([aria-current="page"]):hover { color: var(--ink); }
  .btn:hover, .share-btn:hover, .round-btn:hover, .mini-btn:hover { filter: brightness(1.06); }
}
@media (min-width: 1024px) and (hover: hover) and (pointer: fine) {
  .tab:not([aria-current="page"]):hover { background: var(--bg); }
}

/* =====================================================================
   Aura + widgets look (1.3.0). Look only: every screen, button and saved field is the same as 1.2.0.
   Soft glow behind white frosted-glass tiles, thin serif numbers (Instrument Serif) and Inter text.
   Glow colors come from the chosen color preset (--g1/--g2/--g3, set in app.js applyTheme).
   Fonts are bundled in fonts/ (SIL Open Font License) so the app works offline.
   ===================================================================== */
@font-face { font-family: "Instrument Serif"; src: url("fonts/InstrumentSerif-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("fonts/InstrumentSerif-Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-var.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  --g1: #B9E7CB; --g2: #FFD5B8; --g3: #D7CEF6;
  --base: #F5F8F5; --bg: rgba(255, 255, 255, .5);
  --glass: rgba(255, 255, 255, .58); --glass-strong: rgba(255, 255, 255, .86); --glass-edge: rgba(255, 255, 255, .9);
  --card: var(--glass); --line: rgba(40, 24, 32, .08); --track: rgba(40, 24, 32, .08);
  --ink: #1F1A1E; --ink-2: #5C5360; --ink-3: #6F6673;
  --ink-tile: #1F1A1E; --on-ink: #FFFFFF;
  --act-tile: #1F1A1E; --on-act: #FFFFFF; --act-edge: transparent; --glow-strength: 1;
  --good: #2F7650; --warn: #94600F; --bad: #B0302E;
  --good-soft: rgba(47, 118, 80, .12); --warn-soft: rgba(196, 140, 40, .16); --bad-soft: rgba(176, 48, 46, .11);
  --cream: rgba(248, 226, 188, .55);
  --radius: 26px;
  --shadow: 0 6px 24px rgba(70, 40, 60, .07);
  --blur: blur(20px) saturate(1.5);
  --serif: "Instrument Serif", ui-serif, Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-mode="light"]) {
    --base: #0C0B10; --bg: rgba(255, 255, 255, .05);
    --glass: rgba(255, 255, 255, .065); --glass-strong: rgba(26, 23, 31, .9); --glass-edge: rgba(255, 255, 255, .11);
    --line: rgba(255, 255, 255, .08); --track: rgba(255, 255, 255, .11);
    --ink: #F3F1F7; --ink-2: #CAC5D4; --ink-3: #B9B3C5;
    --ink-tile: #F3F1F7; --on-ink: #14121A;
    --act-tile: #2D2933; --on-act: #F3F1F7; --act-edge: rgba(255, 255, 255, .14); --glow-strength: .55;
    --good: #82CFA4; --warn: #F0BE70; --bad: #FFA39B;
    --good-soft: rgba(130, 207, 164, .13); --warn-soft: rgba(240, 190, 112, .13); --bad-soft: rgba(255, 143, 134, .13);
    --cream: rgba(255, 255, 255, .08);
    --shadow: none;
  }
}
:root[data-mode="dark"] {
  --base: #0C0B10; --bg: rgba(255, 255, 255, .05);
  --glass: rgba(255, 255, 255, .065); --glass-strong: rgba(26, 23, 31, .9); --glass-edge: rgba(255, 255, 255, .11);
  --line: rgba(255, 255, 255, .08); --track: rgba(255, 255, 255, .11);
  --ink: #F3F1F7; --ink-2: #CAC5D4; --ink-3: #B9B3C5;
  --ink-tile: #F3F1F7; --on-ink: #14121A;
  --act-tile: #2D2933; --on-act: #F3F1F7; --act-edge: rgba(255, 255, 255, .14); --glow-strength: .55;
  --good: #82CFA4; --warn: #F0BE70; --bad: #FFA39B;
  --good-soft: rgba(130, 207, 164, .13); --warn-soft: rgba(240, 190, 112, .13); --bad-soft: rgba(255, 143, 134, .13);
  --cream: rgba(255, 255, 255, .08);
  --shadow: none;
}
/* No frosted glass (older browsers) or "Reduce transparency" turned on: plain, nearly solid tiles */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root { --glass: rgba(255, 255, 255, .9); --glass-strong: rgba(255, 255, 255, .97); }
  :root[data-mode="dark"] { --glass: rgba(36, 32, 42, .94); --glass-strong: rgba(30, 27, 35, .98); }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { @media (prefers-color-scheme: dark) {
  :root:not([data-mode="light"]) { --glass: rgba(36, 32, 42, .94); --glass-strong: rgba(30, 27, 35, .98); } } }
@media (prefers-reduced-transparency: reduce) {
  :root { --glass: rgba(255, 255, 255, .92); --glass-strong: rgba(255, 255, 255, .98); --blur: none; }
  :root[data-mode="dark"] { --glass: rgba(36, 32, 42, .95); --glass-strong: rgba(30, 27, 35, .98); }
}

html { background: var(--base); }
body { background: transparent; }
body { font-family: var(--sans); font-size: 15.5px; color: var(--ink); }
/* the glow: three soft lights, fixed behind everything */
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: var(--glow-strength);
  background:
    radial-gradient(60% 34% at 8% 4%, var(--g2) 0%, transparent 70%),
    radial-gradient(58% 40% at 100% 24%, var(--g3) 0%, transparent 72%),
    radial-gradient(75% 45% at 28% 82%, var(--g1) 0%, transparent 72%),
    var(--base); }
#app { position: relative; z-index: 0; }
a { color: var(--rose); }
.num { font-variant-numeric: tabular-nums; }
.acc { color: var(--rose); }

/* glass surfaces */
.card, .w, .table-card, .chip, .seg, .search, .round-btn, .tabbar, .pnav, .demo-bar.glassy {
  background: var(--glass); border: 1px solid var(--glass-edge);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); box-shadow: var(--shadow); }
.card { border-radius: var(--radius); }
.card.flush { padding: 0; }

/* top bar */
.topbar { background: linear-gradient(to bottom, color-mix(in srgb, var(--base) 82%, transparent) 55%, transparent); backdrop-filter: none; -webkit-backdrop-filter: none; }
.topbar h1 { font: 400 34px/1.05 var(--serif); letter-spacing: -.01em; }
.topbar .back, .topbar .act { color: var(--ink); }
.round-btn { width: 40px; height: 40px; color: var(--ink); font-size: 24px; box-shadow: var(--shadow); }
main { padding-bottom: calc(108px + var(--safe-bottom)); }

/* greeting line on Home */
.hello { margin: 4px 4px 14px; }
.hello small { display: block; font-size: 13px; color: var(--ink-2); font-weight: 500; }
.hello b { display: block; font: 400 34px/1.05 var(--serif); letter-spacing: -.01em; font-weight: 400; }

/* section headings */
.section-label { font: 400 25px/1.1 var(--serif); text-transform: none; letter-spacing: -.005em; color: var(--ink); margin: 26px 6px 10px; align-items: center; }
.section-label .pill { font-family: var(--sans); }
.section-label a, .section-label button { font-family: var(--sans); color: var(--rose); font-size: 14px; }
.sub-label { font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 16px 0 0; }

/* ---------- widget tiles ---------- */
.bento { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.w { border-radius: var(--radius); padding: 15px; position: relative; min-width: 0; text-align: left; display: block; color: inherit; font: inherit; }
.w.wide { grid-column: span 2; }
.w .k { font-size: 12.5px; font-weight: 600; color: var(--ink-2); display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.w .mid { font: 400 38px/1 var(--serif); margin: 12px 0 3px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w .mid small { font: 500 12.5px var(--sans); color: var(--ink-2); margin-left: 5px; letter-spacing: 0; }
.w.small-mid .mid { font-size: 28px; }
.w .sub { font-size: 12.5px; color: var(--ink-2); }
.w .thin { height: 4px; border-radius: 99px; background: var(--track); margin-top: 10px; overflow: hidden; }
.w .thin i { display: block; height: 100%; border-radius: 99px; background: var(--rose); }
.w .thin i.bad { background: var(--bad); }
.w.ink { background: var(--act-tile); color: var(--on-act); border-color: var(--act-edge); backdrop-filter: none; -webkit-backdrop-filter: none;
  display: flex; flex-direction: column; justify-content: space-between; min-height: 112px; }
.w.ink .k { color: inherit; opacity: .72; }
.w.ink .mid { font-size: 29px; margin: 14px 0 0; white-space: normal; }
.w.ink .sub { color: inherit; opacity: .7; margin-top: 2px; }
.plus { width: 32px; height: 32px; border-radius: 50%; background: rgba(127, 127, 127, .24); display: grid; place-items: center; font-size: 21px; line-height: 1; }
.more-tile { display: none; }
button.w.tap:active { transform: scale(.98); }
.w.lead { padding: 18px; }
.w.lead .it { font: italic 400 19px var(--serif); color: var(--ink-2); }
.w.lead .big { font: 400 66px/.95 var(--serif); letter-spacing: -.02em; margin: 2px 0 6px; white-space: nowrap; }
.w.lead .big small { font: 500 14px var(--sans); color: var(--ink-2); margin-left: 6px; letter-spacing: 0; }
.w.lead .s { font-size: 13px; color: var(--ink-2); }
.w.lead .big-bar { height: 6px; margin-top: 12px; }
.tchip { position: absolute; top: 15px; right: 15px; font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 99px; background: color-mix(in srgb, var(--rose) 13%, transparent); color: var(--rose); }
.ringrow { display: flex; align-items: flex-end; justify-content: space-between; margin-top: 12px; gap: 6px; }
.ringrow .v { font: 400 34px/1 var(--serif); }
.ringrow .v small { display: block; font: 500 12px var(--sans); color: var(--ink-2); margin-top: 5px; }
.ring-s { width: 46px; height: 46px; flex-shrink: 0; }
.bigring { display: flex; align-items: center; gap: 16px; }
.bigring .ring-s { width: 88px; height: 88px; }
.bigring .big { font-size: 52px !important; }

/* Home countdown tile (glass; the couple's photo still fills it when they add one) */
.hero { background: var(--glass); color: var(--ink); border-radius: var(--radius); padding: 20px 18px 18px; margin: 0; }
.hero::after { display: none; }
.hero .names { font: 400 30px/1.05 var(--serif); }
.hero .date { color: var(--ink-2); opacity: 1; font-size: 13.5px; margin-top: 5px; }
.hero .count { margin-top: 14px; gap: 10px; }
.hero .big { font: 400 84px/.92 var(--serif); letter-spacing: -.03em; }
.hero .unit { font: italic 400 21px var(--serif); color: var(--ink-2); opacity: 1; }
.hero .place { color: var(--ink-2); opacity: 1; font-size: 13px; }
.hero-photo-btn { color: var(--rose); background: color-mix(in srgb, var(--rose) 11%, transparent); border-color: color-mix(in srgb, var(--rose) 22%, transparent); }
.hero.photo { color: #fff; border-color: transparent; min-height: 280px; }
.hero.photo .date, .hero.photo .unit, .hero.photo .place { color: #fff; opacity: .92; }
.hero.photo .hero-photo-btn { color: #fff; background: rgba(0, 0, 0, .28); border-color: rgba(255, 255, 255, .35); }

.money-line { display: flex; justify-content: space-between; align-items: baseline; font-size: 13.5px; color: var(--ink-2); font-weight: 600; }
.money-line b { font: 400 30px/1 var(--serif); color: var(--ink); }
.bar { background: var(--track); }
.legend i { vertical-align: -1px; }
.meal { background: var(--track); border-radius: 12px; }

/* lists inside glass */
.row { border-bottom-color: var(--line); }
.row .s { color: var(--ink-2); }
.row .amt { font-weight: 600; }
.avatar { background: color-mix(in srgb, var(--rose) 12%, transparent); color: var(--rose); }
button.row:active, .tap:active { background: color-mix(in srgb, var(--rose) 8%, transparent); }
.check { border-color: var(--ink-3); }
.check.on { background: var(--rose); border-color: var(--rose); color: var(--on-rose); }
.prog { background: var(--track); }
.prog > span { background: var(--rose); }
.vcard { border-bottom-color: var(--line); }
.mini-btn { background: color-mix(in srgb, var(--rose) 12%, transparent); color: var(--rose); }
.mini-btn.plain { background: var(--track); color: var(--ink-2); }
.pill { background: var(--track); color: var(--ink-2); }
.pill.rose { background: color-mix(in srgb, var(--rose) 13%, transparent); color: var(--rose); }
.stat { background: var(--track); border-radius: 16px; }
.stat .v { font: 400 28px/1.1 var(--serif); }
.ring text { font: 400 24px var(--serif); }
.empty { color: var(--ink-2); }
.brand { color: var(--ink-3); }
.timeline .tl { border-bottom-color: var(--line); }
.tl .time { color: var(--rose); }
.call { color: var(--rose); }

/* chips & segmented controls: the active one is a dark ink pill */
.chip { border-radius: 99px; color: var(--ink-2); box-shadow: none; }
.chip[aria-pressed="true"] { background: var(--ink-tile); border-color: var(--ink-tile); color: var(--on-ink); }
.seg { border-radius: 99px; padding: 3px; box-shadow: none; }
.seg button { border-radius: 99px; padding: 8px; }
.seg button[aria-pressed="true"] { background: var(--ink-tile); color: var(--on-ink); box-shadow: none; }
.search { border-radius: 99px; box-shadow: none; }
.search:focus { outline: 2px solid var(--rose); }

/* seating */
.table-card { border-radius: 22px; }
.table-card .num { color: var(--rose); }
.table-card .nm { font: 400 21px/1.15 var(--serif); }
.seats i { background: var(--track); }
.seats i.f { background: var(--rose); }

/* buttons: the main action is ink, the second choice is glass */
.btn { background: var(--ink-tile); color: var(--on-ink); border-radius: 99px; font-weight: 600; }
.btn.ghost { background: var(--glass); color: var(--ink); border: 1px solid var(--glass-edge); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); }
.btn.danger { background: transparent; border: 0; color: var(--bad); }
.share-btn { background: color-mix(in srgb, var(--rose) 11%, transparent); color: var(--rose); border-radius: 99px; }
.linkish { color: var(--rose); }

/* alerts */
.alert { border-radius: 18px; }
.alert.info { background: color-mix(in srgb, var(--rose) 10%, var(--glass)); color: var(--ink); border: 1px solid var(--glass-edge); }
.alert.info .linkish, .alert.info b { color: var(--rose); }
.alert.remind { background: var(--glass-strong); color: var(--ink); border: 1px solid var(--glass-edge); box-shadow: var(--shadow); }
.alert.remind .mini-btn { display: inline-block; margin-top: 8px; background: var(--ink-tile); color: var(--on-ink); }
.alert .x { color: inherit; }

/* backup screen */
.last-bk { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); font-weight: 600; color: var(--ink-2); }
.last-bk b { color: var(--ink); font-weight: 600; }
.btns-row { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.steps { margin: 0; padding-left: 20px; } .steps li { margin: 4px 0; }

/* floating glass tab bar (phones and tablets) */
.tabbar { left: 12px; right: 12px; bottom: calc(10px + var(--safe-bottom)); max-width: 536px; margin: 0 auto; padding: 5px; border-radius: 32px;
  border: 1px solid var(--glass-edge); box-shadow: 0 10px 30px rgba(40, 30, 70, .12); background: var(--glass-strong); }
.tabbar .inner { gap: 2px; }
.tab { border-radius: 26px; padding: 7px 0 5px; color: var(--ink-3); font-size: 10.5px; }
.tab svg { width: 23px; height: 23px; }
.tab[aria-current="page"] { color: var(--ink); background: var(--track); }

/* dialogs */
.sheet { background: var(--glass-strong); backdrop-filter: blur(30px) saturate(1.4); -webkit-backdrop-filter: blur(30px) saturate(1.4); border-radius: 26px 26px 0 0; }
.sheet .card { background: var(--glass); }
.sheet-head { border-bottom-color: var(--line); }
.sheet-head h2 { font: 400 22px/1.1 var(--serif); }
.sheet-head button { color: var(--rose); }
.form-section { background: transparent; color: var(--ink-2); }
.field { border-bottom-color: var(--line); }
.field:focus-within { background: color-mix(in srgb, var(--rose) 6%, transparent); }
.switch { background: var(--track); }
.switch:checked { background: var(--rose); }
.seg-input span { background: var(--track); border-radius: 99px; }
.seg-input input:checked + span { background: var(--ink-tile); color: var(--on-ink); }
.swatch { border-color: var(--base); }

.toast { background: var(--ink-tile); color: var(--on-ink); bottom: calc(96px + var(--safe-bottom)); }
.demo-bar { background: var(--ink-tile); color: var(--on-ink); border-radius: 18px; }

/* welcome */
.welcome h1 { font: 400 44px/1.02 var(--serif); }
.welcome li span { background: var(--glass); border: 1px solid var(--glass-edge); }

@media (min-width: 768px) {
  .bento { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
  .more-tile { display: block; }
  .bento > .hero, .bento > .w.lead { grid-column: span 2; grid-row: span 2; display: flex; flex-direction: column; justify-content: flex-end; }
  .bento > .w.lead { justify-content: flex-start; }
  .bento > .w.lead .big-bar { margin-top: auto; }
  .w.lead .big { font-size: 92px; margin-top: 8px; }
  .bento > .w.lead .s { margin-bottom: 16px; }
  .hero .big { font-size: 108px; }
  .hero { min-height: 250px; }
  .sheet { border-radius: 26px; }
  .tabbar { max-width: 600px; }
}
@media (min-width: 1024px) {
  body.has-nav #app { padding-left: 252px; }
  .topbar h1, .hello b { font-size: 46px; }
  body.has-nav .topbar { padding-top: 30px; }
  .w .mid { font-size: 42px; }
  .w.lead .big { font-size: 118px; }
  .hero .big { font-size: 132px; }
  .dash.home { margin-top: 4px; }
  /* floating glass sidebar */
  .tabbar { top: 16px; bottom: 16px; left: 16px; right: auto; width: 220px; max-width: none; margin: 0; border-radius: 26px; padding: 0;
    background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--glass-edge); box-shadow: var(--shadow); }
  .tabbar .inner { padding: 20px 12px 18px; gap: 3px; }
  .side-brand { font: 400 22px/1.1 var(--serif); padding: 0 6px 22px; }
  .tab { border-radius: 14px; padding: 10px 12px; font-size: 14.5px; color: var(--ink-2); }
  .tab[aria-current="page"] { background: var(--ink-tile); color: var(--on-ink); }
  .toast { left: calc(50% + 126px); bottom: 36px; }
  body.has-nav .card.wgrid > .row, body.has-nav .card.wgrid > .vcard { border-bottom-color: var(--line); }
  body.has-nav .card.wgrid > :nth-child(odd) { border-right-color: var(--line); }
}
@media (min-width: 1024px) and (hover: hover) and (pointer: fine) {
  .tab:not([aria-current="page"]):hover { background: var(--track); }
}
@media (hover: hover) and (pointer: fine) {
  button.w.tap:hover { background: color-mix(in srgb, var(--glass) 70%, var(--glass-edge)); }
  .w.ink:hover { filter: brightness(1.12); }
}
@media print {
  body::before { display: none; }
  .card, .w { backdrop-filter: none; -webkit-backdrop-filter: none; border-color: #ddd; }
  .w.ink { display: none; }
}
/* Home has no visible title bar (the greeting is the title), so the bar takes no space */
.topbar:has(> h1.sr:only-child) { min-height: 0; padding-top: calc(var(--safe-top) + 6px); padding-bottom: 0; background: none; }
@media (min-width: 1024px) { body.has-nav .topbar:has(> h1.sr:only-child) { padding-top: 18px; padding-bottom: 0; } }
@media (min-width: 768px) { .bento > .w.lead:has(.bigring) { justify-content: center; } }

/* Instrument Serif has one weight; never fake-bold it */
.serif { font-weight: 400 !important; font-size: 26px !important; line-height: 1.1; }

/* =====================================================================
   Money Planner parts in the Aura look (1.3.0)
   ===================================================================== */
.side-safe { display: none; }
@media (min-width: 1024px) {
  .side-safe { display: block; margin-top: auto; margin-bottom: 14px; padding: 12px 13px; border-radius: 16px; background: var(--track); text-align: left; font-size: 12.5px; color: var(--ink-2); line-height: 1.35; }
  .side-safe b { display: block; color: var(--ink); font-size: 13px; font-weight: 600; margin-bottom: 2px; }
  .side-safe.warn b { color: var(--warn); }
  .side-safe + .side-foot { margin-top: 0; }
  body.has-nav .topbar:has(> h1.sr) { padding-top: 18px; }
}
.topbar > h1.sr + .round-btn { margin-left: auto; }
.topbar:has(> h1.sr) { min-height: 0; padding-bottom: 0; background: none; }
.w.small-mid .mid { font-size: 28px; }
.card.small-card { padding: 12px 16px; }

/* month and pay-period pickers */
.pnav { border-radius: 99px; padding: 6px; box-shadow: none; }
.pnav > button { border-radius: 50%; background: color-mix(in srgb, var(--rose) 12%, transparent); color: var(--rose); }
.pnav .mid b { font: 400 21px/1.1 var(--serif); }

/* budget, goals, debt */
.vcard .amt { font-weight: 600; }
.goal .gtop .t { font: 400 23px/1.15 var(--serif); }
.ring.sm text { font: 400 22px var(--serif); fill: var(--ink); }
.k-label { font: 600 12.5px var(--sans); letter-spacing: 0; text-transform: none; color: var(--ink-2); }
.month-pick span { background: var(--track); border-radius: 99px; }
.month-pick input:checked + span { background: var(--ink-tile); color: var(--on-ink); }
.mrow .mbars .out { background: var(--rose); }
.ring-wrap .serif { font-size: 26px !important; }
.off-row { opacity: .5; }
.check.on { background: var(--rose); border-color: var(--rose); color: var(--on-rose); }
.btn.big-add { box-shadow: none; }
/* the payday chip sits on its own line on phones, so it never covers the lead-in */
@media (max-width: 767.98px) { .w.lead .tchip { position: static; display: inline-block; margin-bottom: 6px; } }
.section-label > .muted { font: 600 14px var(--sans); color: var(--ink-2); }
