:root {
  color-scheme: light dark;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;

  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-md: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.375rem;
  --text-2xl: 1.75rem;
  --leading: 1.45;
  --leading-tight: 1.2;
  --weight-regular: 400;
  --weight-medium: 600;
  --weight-bold: 700;

  --color-bg: #faf7f2;
  --color-surface: #ffffff;
  --color-surface-2: #f4eee5;
  --color-text: #2a2622;
  --color-text-muted: #6b625a;
  --color-text-subtle: #776d64;
  --color-border: #ece5da;
  --color-border-strong: #948776;
  --color-primary: #7a2e2e;
  --color-primary-soft: #f6e9e6;
  --color-on-primary: #ffffff;
  --color-accent: #2f5d50;
  --color-accent-soft: #e6f0ec;
  --color-highlight: #b8873b;
  --color-highlight-soft: #f8efdd;
  --color-highlight-text: #8a5f1f;
  --color-danger: #a02c2c;
  --color-danger-soft: #fbeaea;
  --color-focus: #8a5f1f;
  --color-scrim: rgb(42 38 34 / 0.4);

  --radius-s: 6px;
  --radius-m: 12px;
  --radius-l: 16px;
  --radius-xl: 20px;
  --radius-pill: 999px;

  --shadow-1: 0 1px 2px rgb(42 38 34 / 0.06), 0 1px 3px rgb(42 38 34 / 0.08);
  --shadow-2: 0 8px 24px rgb(40 20 10 / 0.12);
  --shadow-3: 0 -8px 30px rgb(40 20 10 / 0.16);

  --dur-fast: 120ms;
  --dur: 200ms;
  --ease: cubic-bezier(0.2, 0, 0, 1);

  --tap: 44px;
  --tap-comfort: 48px;
  --measure: 36rem;
  --page-max: 1120px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);

  --bg: var(--color-bg); --card: var(--color-surface); --ink: var(--color-text);
  --ink2: var(--color-text-muted); --ink3: var(--color-text-subtle);
  --line: var(--color-border); --soft: var(--color-surface-2);
  --red: var(--color-primary); --red-soft: var(--color-primary-soft);
  --green: var(--color-accent); --green-soft: var(--color-accent-soft);
  --gold: var(--color-highlight); --gold-soft: var(--color-highlight-soft);
  --r: var(--radius-l);
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #1c1917;
    --color-surface: #26221f;
    --color-surface-2: #302b27;
    --color-text: #f2ece4;
    --color-text-muted: #b5aba1;
    --color-text-subtle: #a29890;
    --color-border: #3a332e;
    --color-border-strong: #857a6e;
    --color-primary: #e39a8f;
    --color-primary-soft: #3a2422;
    --color-on-primary: #2a1816;
    --color-accent: #7fbfa8;
    --color-accent-soft: #1f302a;
    --color-highlight: #e0b56a;
    --color-highlight-soft: #332a1c;
    --color-highlight-text: #e0b56a;
    --color-danger: #ef9a90;
    --color-danger-soft: #3a2220;
    --color-focus: #e0b56a;
    --color-scrim: rgb(0 0 0 / 0.55);
    --shadow-1: 0 0 0 1px var(--color-border);
  }
  .top { background: var(--color-surface); color: var(--color-text); }
  .icon-btn, .back { color: var(--color-text); }
}

@media (prefers-reduced-motion: reduce) {
  :root { --dur-fast: 0ms; --dur: 0ms; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0ms !important; animation-duration: 0ms !important; }
}

* { box-sizing: border-box; }
html, body { margin: 0; overflow-x: clip; overflow-y: visible; }
body {
  background: var(--color-bg);
  color: var(--color-text);
  font: var(--weight-regular) var(--text-md)/var(--leading) var(--font);
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: var(--text-xl); line-height: var(--leading-tight); font-weight: var(--weight-bold); }
h2 { font-size: var(--text-lg); line-height: var(--leading-tight); font-weight: var(--weight-bold); }
.num { font-variant-numeric: tabular-nums; }
.sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.stack { display: flex; flex-direction: column; gap: var(--gap, var(--space-4)); }
.stack > * { min-width: 0; max-width: 100%; }
.cluster { display: flex; flex-wrap: wrap; gap: var(--gap, var(--space-2)); align-items: center; }
.center {
  box-sizing: content-box;
  max-width: var(--max, var(--measure));
  margin-inline: auto;
  padding-inline: max(var(--space-4), var(--safe-left)) max(var(--space-4), var(--safe-right));
}
.center.wide { --max: var(--page-max); }
.box {
  padding: var(--pad, var(--space-4));
  border: 1px solid transparent;
  border-radius: var(--radius-l);
  background: var(--color-surface);
  box-shadow: var(--shadow-1);
}
.start {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.start-step {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-l);
  background: var(--color-surface);
  box-shadow: var(--shadow-1);
  min-width: 0;
}
.start-head { display: flex; gap: var(--space-3); align-items: flex-start; min-width: 0; }
.start-head .copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--space-1); }
.start-title { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.start-step h3 { font-size: var(--text-md); font-weight: var(--weight-bold); line-height: var(--leading-tight); }
.start-mark {
  width: 32px; height: 32px; flex: none; margin-top: 1px;
  border-radius: 50%;
  display: grid; place-items: center;
  border: 1.5px solid var(--color-border-strong);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--color-text);
}
.start-step.is-done .start-mark {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-on-primary);
}
.start-mark svg { width: 18px; height: 18px; }
.start-step .btn { width: 100%; }
.reel {
  display: flex; gap: var(--space-2); overflow-x: auto; scroll-snap-type: x proximity;
  scrollbar-width: none; padding-bottom: var(--space-1);
}
.reel > * { flex: none; scroll-snap-align: start; }

.top {
  position: sticky;
  top: 0;
  z-index: 34;
  background: var(--color-surface);
  color: var(--color-text);
  padding: calc(var(--space-3) + var(--safe-top)) var(--space-4) var(--space-3);
}
.top-inner { max-width: var(--page-max); margin: 0 auto; }
.top-row { display: flex; align-items: center; gap: var(--space-2); }
.titles { min-width: 0; flex: 1; }
.app { font-weight: var(--weight-bold); font-size: var(--text-lg); line-height: var(--leading-tight); margin: 0; }
h1, h2 { font-weight: var(--weight-bold); line-height: var(--leading-tight); }
h2 { font-size: var(--text-lg); }
.sign-in .mark svg { width: 48px; height: 48px; }
.heading-row { flex-wrap: wrap; }
.hh { font-size: var(--text-sm); color: var(--color-text-muted); }
.icon-btn, .back {
  min-width: var(--tap); min-height: var(--tap);
  display: inline-grid; place-items: center;
  border-radius: var(--radius-m); border: 0; background: transparent;
  color: var(--color-text); text-decoration: none; padding: 0;
}
.icon-btn svg, .back svg, .tip-btn svg, .cal-nav svg { width: 22px; height: 22px; }

.page { padding-top: var(--space-5); padding-bottom: calc(88px + var(--safe-bottom)); }
.page.has-bar { padding-bottom: calc(136px + var(--safe-bottom)); }
.page.plain { padding-bottom: var(--space-7); }
.section { display: flex; flex-direction: column; gap: var(--space-3); }
.section + .section { margin-top: var(--space-6); }

.field { display: grid; gap: var(--space-2); }
.field > label { display: grid; gap: var(--space-2); }
.field-label { font-size: var(--text-sm); font-weight: var(--weight-medium); color: var(--color-text-muted); }
input, select, textarea {
  width: 100%; min-height: var(--tap-comfort);
  border: 1.5px solid var(--color-border-strong);
  border-radius: var(--radius-m);
  padding: 0 var(--space-3);
  background: var(--color-surface);
}
textarea { padding: var(--space-3); min-height: 96px; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--color-focus); outline-offset: 2px;
}
.field-error { color: var(--color-danger); font-size: var(--text-sm); }

.btn {
  min-height: var(--tap-comfort);
  border-radius: var(--radius-m);
  border: 0;
  padding: 0 var(--space-4);
  font-weight: var(--weight-bold);
  font-size: var(--text-md);
  text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  width: 100%;
}
.btn:disabled, .check-toggle:disabled { opacity: 0.55; cursor: default; }
.btn-primary { background: var(--color-primary); color: var(--color-on-primary); }
.btn-secondary { background: var(--color-surface-2); color: var(--color-text); }
.btn-quiet, .btn-ghost {
  background: transparent; color: var(--color-text-muted);
  width: auto; min-height: var(--tap); font-weight: var(--weight-medium);
  border: 0;
}
.person-row {
  display: flex; align-items: center; gap: var(--space-2);
  min-height: var(--tap); min-width: 0;
}
.person-row .person-name { flex: 1; }
.person-row .person-you,
.person-row .person-action { flex: none; white-space: nowrap; }
.btn-danger { background: transparent; color: var(--color-danger); width: auto; min-height: var(--tap); }
.is-busy::after {
  content: "";
  width: 16px; height: 16px; box-sizing: border-box; flex: none;
  margin-left: 8px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  opacity: 1;
  animation: spin 700ms linear infinite;
  transition: width 0s linear 300ms, margin-left 0s linear 300ms, opacity 0s linear 300ms, border-width 0s linear 300ms;
}
@starting-style {
  .is-busy::after { width: 0; margin-left: 0; opacity: 0; border-width: 0; }
}
.check-toggle.is-busy::after { position: absolute; margin-left: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeletons {
  display: grid; gap: var(--space-4);
  opacity: 1;
  transition: opacity 0s linear 300ms;
}
@starting-style {
  .skeletons { opacity: 0; }
}
.skeleton {
  height: 108px; border-radius: var(--radius-l);
  background: var(--color-surface-2);
  animation: skeleton-pulse 1.6s ease-in-out infinite;
}
@keyframes skeleton-pulse { 50% { opacity: 0.45; } }

.chip-btn, .choice {
  min-height: var(--tap);
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--color-surface-2);
  color: var(--color-text);
  padding: 0 var(--space-4);
  font-weight: var(--weight-medium);
  font-size: var(--text-sm);
}
.chip-btn.on, .choice.on { background: var(--color-primary); color: var(--color-on-primary); }
.interest-add {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
}
.interest-add input { flex: 1; min-width: 0; }
button.chip-btn.interest-plus {
  width: var(--tap);
  min-width: var(--tap);
  padding: 0;
  flex: none;
  display: inline-grid;
  place-items: center;
}
button.chip-btn.interest-plus svg { width: 18px; height: 18px; }
.save-status {
  margin: 0;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.save-status.is-saved { animation: save-fade 1.4s ease 200ms forwards; }
@keyframes save-fade {
  0%, 40% { opacity: 1; }
  100% { opacity: 0; }
}
.save-status.is-problem { color: var(--color-danger); }
.save-retry {
  background: none;
  border: 0;
  padding: 0;
  min-height: 0;
  width: auto;
  color: var(--color-primary);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
}
.tag {
  font-size: var(--text-xs);
  background: var(--color-surface-2);
  color: var(--color-text-muted);
  border-radius: var(--radius-s);
  padding: 2px 8px;
  text-decoration: none;
}
.since { color: var(--color-highlight-text); background: var(--color-highlight-soft); }

.banner { border-radius: var(--radius-m); padding: var(--space-3); font-size: var(--text-sm); }
.banner-error { background: var(--color-danger-soft); color: var(--color-danger); }
.banner-info { background: var(--color-accent-soft); color: var(--color-accent); }
.muted { color: var(--color-text-muted); font-size: var(--text-sm); }
.subtle { color: var(--color-text-subtle); font-size: var(--text-sm); }

.menu-row, .list-row {
  display: flex; align-items: center; gap: var(--space-3);
  min-height: var(--tap); width: 100%;
  padding: var(--space-2) 0;
  background: transparent; border: 0; text-align: left; text-decoration: none;
  color: inherit;
}
.menu-row .grow, .list-row .grow { flex: 1; min-width: 0; }
.list-row + .list-row { margin-top: var(--space-1); }

.group-head { display: flex; align-items: center; gap: var(--space-1); min-width: 0; }
.when-head { display: flex; flex-direction: column; align-items: stretch; gap: 2px; width: 100%; min-width: 0; }
.when-head h2, .when-meta { margin: 0; width: 100%; min-width: 0; }
.group-toggle, .later-row {
  display: flex; align-items: center; gap: var(--space-2);
  width: 100%; min-height: var(--tap); padding: 0;
  border: 0; background: transparent; color: inherit; text-align: left;
}
.group-toggle .disclosure, .later-row .disclosure { width: 22px; height: 22px; }
.group-toggle-name, .later-label { flex: 1 1 auto; min-width: 50%; text-align: left; }
.group-toggle-total {
  flex: 0 1 auto; max-width: calc(50% - 38px); margin-left: auto;
  color: var(--color-text-muted); font-size: var(--text-sm); text-align: right;
}
.idea-count {
  align-self: flex-start; width: auto; min-height: var(--tap); padding: 0;
  border: 0; background: transparent; color: var(--color-text-muted);
  font-size: var(--text-sm); font-weight: var(--weight-regular); text-align: left;
}
.group-title { display: flex; align-items: baseline; gap: var(--space-2); min-width: 0; flex: 1; }
.group-title h2 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.group-count { flex: none; white-space: nowrap; }
.disclosure {
  width: var(--tap); height: var(--tap); flex: none; padding: 0;
  border: 0; background: transparent; color: var(--color-text-muted);
  display: grid; place-items: center; border-radius: var(--radius-m);
}
.disclosure svg { width: 22px; height: 22px; }
.person-card { display: flex; flex-direction: column; gap: var(--space-4); }
.person-head { display: flex; align-items: center; gap: var(--space-1); min-width: 0; flex: 1; }
.person-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ideas-head { display: flex; align-items: center; gap: var(--space-1); flex: none; }
.person-add {
  width: var(--tap); height: var(--tap); flex: none;
  margin-inline: -4px;
  border: 0; background: transparent; color: var(--color-text-muted);
  display: grid; place-items: center; border-radius: var(--radius-m); padding: 0;
}
.person-add svg { width: 20px; height: 20px; }
.person-spent { margin-left: var(--space-3); flex: none; }
.person-card + .person-card, .group-block + .group-block { margin-top: var(--space-5); }
.idea {
  display: flex; align-items: center; gap: var(--space-3);
  min-height: var(--tap); padding: var(--space-1) 0;
}
.idea .main { flex: 1; min-width: 0; }
.idea-line { display: flex; align-items: baseline; gap: var(--space-2); min-width: 0; }
.idea-line .t { min-width: 0; }
.idea .t { font-weight: var(--weight-medium); }
.check-toggle {
  width: var(--tap); height: var(--tap); flex: none; position: relative;
  padding: 0; border: 0; border-radius: 0; background: transparent;
  color: var(--color-text-subtle);
  display: grid; place-items: center;
}
.check-toggle::before {
  content: ""; width: 32px; height: 32px; border-radius: 50%; box-sizing: border-box;
  border: 1px solid var(--color-border-strong);
}
.check-toggle svg { position: absolute; width: 16px; height: 16px; }
.check-toggle.on { color: var(--color-on-primary); }
.check-toggle.on::before { background: var(--color-accent); border-color: var(--color-accent); }
.meta { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-2); margin-top: 2px; align-items: center; }
.price { font-size: var(--text-sm); color: var(--color-text-muted); }

.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; color: #fff; font-weight: var(--weight-bold); flex: none;
}
.list { list-style: none; margin: 0; padding: 0; }

.budget { display: grid; gap: var(--space-1); }
.bar { height: 6px; border-radius: var(--radius-pill); background: var(--color-surface-2); overflow: hidden; }
.bar i, .bar .sp { display: block; height: 100%; background: var(--color-accent); }
.bar.over .sp { background: var(--color-danger); }
.blabel { font-size: var(--text-sm); color: var(--color-text-muted); }
.blabel .rem { color: var(--color-accent); font-weight: var(--weight-medium); }
.blabel .rem.neg { color: var(--color-danger); }

.totals { font-size: var(--text-sm); color: var(--color-text-muted); }
.totals b { color: var(--color-text); font-size: var(--text-lg); font-weight: var(--weight-bold); }

.bottom {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  padding: var(--space-3) var(--space-4) calc(var(--space-3) + var(--safe-bottom));
  background: linear-gradient(transparent, var(--color-bg) 30%);
}
.sheet-back, .date-back {
  position: fixed; left: 0; right: 0; border: 0; padding: 0;
  top: var(--vv-top, 0px);
  height: var(--vv-height, 100dvh);
  background: var(--color-scrim); z-index: 40;
}
.sheet, .date-pop {
  position: fixed; z-index: 41; left: 0; right: 0;
  bottom: var(--keyboard-inset, 0px);
  background: var(--color-surface); color: var(--color-text);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  box-shadow: var(--shadow-3);
  padding: var(--space-2) var(--space-4) calc(var(--space-4) + var(--safe-bottom));
  display: grid; gap: var(--space-3);
  max-height: min(90dvh, calc(var(--vv-height, 100dvh) - 12px));
  overflow: auto;
}
.sheet {
  --sheet-y: 0px;
  overscroll-behavior: contain;
}
/* Transform only while dragging. A resting transform would be the containing
   block for the fixed calendar and the sheet's overflow would clip its header. */
.sheet.is-moving {
  transform: translateY(var(--sheet-y));
}
.sheet .grab, .sheet > h2 { touch-action: none; }
.grab {
  width: 36px; height: 4px; border-radius: var(--radius-pill);
  background: var(--color-border-strong); margin: 6px auto 2px;
}
.sheet-close { min-height: var(--tap); display: grid; place-items: center; background: transparent; border: 0; }

.date-field { display: grid; gap: var(--space-2); position: relative; min-width: 0; }
.date-button {
  width: 100%; min-height: var(--tap-comfort); text-align: left;
  border: 1.5px solid var(--color-border-strong); border-radius: var(--radius-m);
  background: var(--color-surface); padding: 0 var(--space-3);
}
.cal-head { display: flex; align-items: center; gap: var(--space-2); }
.cal-title { font-weight: var(--weight-bold); flex: 1; }
.cal-year { width: auto; min-height: var(--tap); flex: none; }
.cal-nav {
  width: var(--tap); height: var(--tap); border: 0; background: transparent;
  border-radius: var(--radius-m); display: grid; place-items: center;
}
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.cal-dow { text-align: center; font-size: var(--text-xs); color: var(--color-text-subtle); font-weight: var(--weight-bold); padding: var(--space-1) 0; }
.cal-day, .cal-empty { min-height: var(--tap); }
.cal-day {
  border: 0; border-radius: var(--radius-m); background: transparent; font: inherit;
}
.cal-day.today { box-shadow: inset 0 0 0 1.5px var(--color-border-strong); }
.cal-day.on { background: var(--color-primary); color: var(--color-on-primary); font-weight: var(--weight-bold); }
.date-error { color: var(--color-danger); font-size: var(--text-sm); }

.tip { position: relative; display: inline-flex; vertical-align: middle; }
.tip[open] { z-index: 36; }
.tip summary { list-style: none; }
.tip summary::-webkit-details-marker { display: none; }
.tip-btn {
  width: var(--tap); height: var(--tap); border: 0; background: transparent;
  color: var(--color-text-muted); display: inline-grid; place-items: center; padding: 0;
  border-radius: var(--radius-m);
}
.header-actions { display: flex; align-items: center; flex: none; }
.more { display: inline-flex; }
.more-btn { color: var(--color-text-muted); }
.more-back {
  position: fixed; inset: 0; z-index: 33;
  border: 0; background: transparent; padding: 0; margin: 0;
}
.tip-pop,
.more-pop {
  position: fixed; z-index: 36; left: 12px; top: 12px;
  width: max-content; max-width: min(320px, calc(100vw - 24px));
  padding: var(--space-3);
  background: var(--color-surface); color: var(--color-text);
  border-radius: var(--radius-m); box-shadow: var(--shadow-2);
  font-size: var(--text-sm); text-align: left;
  overflow-wrap: anywhere;
  visibility: hidden;
}
.more-pop {
  z-index: 36;
  min-width: min(220px, calc(100vw - 24px));
  padding: var(--space-2);
}
.tip-pop.is-placed,
.more-pop.is-placed { visibility: visible; }
.tip-pop::after,
.more-pop::after {
  content: "";
  position: absolute;
  left: var(--arrow-x, 24px);
  transform: translateX(-50%);
  border: 7px solid transparent;
}
.tip-pop[data-side="below"]::after,
.more-pop[data-side="below"]::after { top: -13px; border-bottom-color: var(--color-surface); }
.tip-pop[data-side="above"]::after,
.more-pop[data-side="above"]::after { bottom: -13px; border-top-color: var(--color-surface); }
.more-pop .menu-row { padding-inline: var(--space-3); border-radius: var(--radius-s); }
.more-pop .menu-row.danger { color: var(--color-danger); font-weight: var(--weight-medium); }
.more-confirm { display: grid; gap: var(--space-2); padding: var(--space-2) var(--space-1); }
.more-confirm p { font-size: var(--text-sm); }
.dup-note {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--space-1);
  margin-top: var(--space-1); color: var(--color-text-muted); font-size: var(--text-sm);
}
.dup-note .dup-text { line-height: 1.4; }
.dup-note .btn-quiet { padding: 0 var(--space-2); font-size: var(--text-sm); }
.toast {
  position: fixed;
  z-index: 32;
  left: max(var(--space-4), var(--safe-left));
  right: max(var(--space-4), var(--safe-right));
  top: auto;
  bottom: calc(76px + var(--safe-bottom));
  background: var(--color-text); color: var(--color-bg);
  border-radius: var(--radius-m); padding: var(--space-3);
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
}
.holiday-row { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.holiday-chip {
  display: inline-flex; align-items: center; gap: var(--space-1);
  min-height: var(--tap); padding-left: var(--space-3);
  border-radius: var(--radius-pill); background: var(--color-surface-2);
}
.holiday-chip button {
  width: var(--tap); height: var(--tap); border: 0; background: transparent;
  display: grid; place-items: center; border-radius: var(--radius-pill);
}
.toast button { min-height: var(--tap); background: transparent; color: inherit; border: 0; font-weight: var(--weight-bold); }
.toast.toast-over {
  z-index: 50;
  top: calc(var(--vv-top, 0px) + var(--space-4) + var(--safe-top));
  bottom: auto;
}

.sign-in { min-height: 100vh; display: grid; align-content: center; padding-block: var(--space-7); }
.sign-in .mark { width: 48px; height: 48px; display: grid; place-items: center; color: var(--color-primary); }
.lede { color: var(--color-text-muted); }
.check-row { display: flex; align-items: center; gap: var(--space-2); min-height: var(--tap); }
.check-row input { width: 22px; min-height: 22px; flex: none; }
.dev-link { display: grid; gap: var(--space-3); }
.up {
  min-width: 140px; padding: var(--space-3); text-decoration: none;
  display: grid; gap: 2px;
}
.up span { color: var(--color-text-muted); font-size: var(--text-xs); }
.heading-row { display: flex; align-items: center; gap: var(--space-2); min-height: var(--tap); }
.heading-row h2 { flex: 1; }
.lock { color: var(--color-text-muted); display: inline-grid; }

.install-bar {
  display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-3);
  align-items: center; justify-content: space-between;
  background: var(--color-highlight-soft); padding: var(--space-3) var(--space-4);
}
.install-actions { display: flex; gap: var(--space-2); }

.claim-mark { display: inline-flex; align-items: center; gap: var(--space-1); }
.claim-dot {
  width: 8px; height: 8px; border-radius: 999px; display: inline-block;
  background: var(--color-border-strong);
}
.claim-dot.claimed { background: var(--color-accent); }

@media (min-width: 760px) {
  .btn-primary, .btn-secondary { width: auto; min-width: 180px; }
  .page, .page.has-bar { padding-bottom: var(--space-7); }
  .board-cols { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5); }
  .sheet, .date-pop {
    left: 50%; right: auto; bottom: auto; top: 12vh;
    transform: translateX(-50%);
    width: min(28rem, calc(100vw - 32px));
    border-radius: var(--radius-l);
    max-height: 80dvh;
  }
  .sheet { transform: translateX(-50%); }
  .sheet.is-moving { transform: translateX(-50%) translateY(var(--sheet-y)); }
  .date-pop { position: absolute; top: calc(100% + 6px); left: 0; transform: none; width: min(320px, 80vw); }
  .bottom { left: auto; right: var(--space-6); bottom: var(--space-5); background: none; width: auto; padding: 0; }
  .bottom .btn { box-shadow: var(--shadow-2); }
  .toast { left: auto; right: var(--space-6); width: min(420px, 40vw); }
}

@media (prefers-reduced-motion: reduce) {
  .is-busy::after { animation: none !important; border-right-color: currentColor; opacity: 0.55; }
  .skeleton { animation: none !important; opacity: 1; }
  .save-status.is-saved { animation: none !important; opacity: 1; }
}
