/* ==========================================================================
   Campfire & Kraft — Taste of Moshiach design system
   Rustic warmth: kraft paper, forest green, campfire amber & terracotta.
   Mobile-first. Light + dark via prefers-color-scheme and [data-theme].
   ========================================================================== */

/* ---------- Tokens: light (default) ---------- */
:root {
  /* Paper & surfaces */
  --paper:        #f4ead5;   /* kraft page */
  --paper-2:      #efe2c9;   /* deeper kraft (bands, wells) */
  --surface:      #fffdf6;   /* card / cream */
  --surface-soft: #fbf4e4;   /* subtle raised */
  --surface-sunk: #f0e6d1;   /* inset wells, tracks */

  /* Ink */
  --ink:        #3a2c1c;     /* primary text — warm espresso */
  --ink-soft:   #6b573f;     /* secondary */
  --ink-faint:  #96826a;     /* muted / hints */

  /* Forest green (primary) */
  --forest:        #2f6a45;
  --forest-deep:   #245337;
  --forest-tint:   #e2efe2;
  --forest-ink:    #1e4a30;

  /* Campfire (accent) */
  --amber:       #e2952e;
  --amber-deep:  #c06a1f;
  --terra:       #cc5a34;
  --terra-deep:  #a8451f;
  --amber-tint:  #fbecd4;
  --terra-tint:  #f9e2d5;

  /* Status helpers */
  --gold:      #d9a327;
  --claim:     #7a8b3f;      /* olive — claimed/covered */
  --claim-tint:#eef0dc;

  /* Structural */
  --line:        #d9c7a6;    /* hairline on kraft */
  --line-soft:   #e7dbc0;
  --line-strong: #c3ac83;

  --ring: color-mix(in srgb, var(--forest) 45%, transparent);

  /* Shape & rhythm */
  --r-sm: 8px;
  --r:    12px;
  --r-lg: 18px;
  --r-pill: 999px;

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

  --shadow-sm: 0 1px 2px rgba(58,44,28,.08);
  --shadow:    0 4px 14px rgba(58,44,28,.10);
  --shadow-lg: 0 12px 30px rgba(58,44,28,.16);

  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino,
                  Georgia, "Times New Roman", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;

  --header-h: 58px;
  --nav-h: 62px;
  --content-max: 760px;
}

/* ---------- Tokens: dark ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:        #201a12;
    --paper-2:      #191410;
    --surface:      #2b2318;
    --surface-soft: #322a1d;
    --surface-sunk: #221b12;

    --ink:        #f2e6cf;
    --ink-soft:   #cdb894;
    --ink-faint:  #9a8767;

    --forest:        #62b07f;
    --forest-deep:   #4f9a6b;
    --forest-tint:   #22392a;
    --forest-ink:    #bfe6cc;

    --amber:       #f0a94a;
    --amber-deep:  #e5983a;
    --terra:       #e37a4f;
    --terra-deep:  #d1663c;
    --amber-tint:  #402f16;
    --terra-tint:  #3d271a;

    --gold:      #e6b845;
    --claim:     #a9bb5f;
    --claim-tint:#31371c;

    --line:        #453820;
    --line-soft:   #38301f;
    --line-strong: #5a4a2c;

    --ring: color-mix(in srgb, var(--forest) 55%, transparent);

    --shadow-sm: 0 1px 2px rgba(0,0,0,.35);
    --shadow:    0 4px 16px rgba(0,0,0,.45);
    --shadow-lg: 0 14px 34px rgba(0,0,0,.55);
  }
}

/* [data-theme] overrides win in both directions */
:root[data-theme="dark"] {
  --paper:#201a12; --paper-2:#191410; --surface:#2b2318;
  --surface-soft:#322a1d; --surface-sunk:#221b12;
  --ink:#f2e6cf; --ink-soft:#cdb894; --ink-faint:#9a8767;
  --forest:#62b07f; --forest-deep:#4f9a6b; --forest-tint:#22392a; --forest-ink:#bfe6cc;
  --amber:#f0a94a; --amber-deep:#e5983a; --terra:#e37a4f; --terra-deep:#d1663c;
  --amber-tint:#402f16; --terra-tint:#3d271a;
  --gold:#e6b845; --claim:#a9bb5f; --claim-tint:#31371c;
  --line:#453820; --line-soft:#38301f; --line-strong:#5a4a2c;
  --ring: color-mix(in srgb, var(--forest) 55%, transparent);
  --shadow-sm:0 1px 2px rgba(0,0,0,.35);
  --shadow:0 4px 16px rgba(0,0,0,.45);
  --shadow-lg:0 14px 34px rgba(0,0,0,.55);
}
:root[data-theme="light"] {
  --paper:#f4ead5; --paper-2:#efe2c9; --surface:#fffdf6;
  --surface-soft:#fbf4e4; --surface-sunk:#f0e6d1;
  --ink:#3a2c1c; --ink-soft:#6b573f; --ink-faint:#96826a;
  --forest:#2f6a45; --forest-deep:#245337; --forest-tint:#e2efe2; --forest-ink:#1e4a30;
  --amber:#e2952e; --amber-deep:#c06a1f; --terra:#cc5a34; --terra-deep:#a8451f;
  --amber-tint:#fbecd4; --terra-tint:#f9e2d5;
  --gold:#d9a327; --claim:#7a8b3f; --claim-tint:#eef0dc;
  --line:#d9c7a6; --line-soft:#e7dbc0; --line-strong:#c3ac83;
  --ring: color-mix(in srgb, var(--forest) 45%, transparent);
  --shadow-sm:0 1px 2px rgba(58,44,28,.08);
  --shadow:0 4px 14px rgba(58,44,28,.10);
  --shadow-lg:0 12px 30px rgba(58,44,28,.16);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background-color: var(--paper);
  /* Subtle paper grain / speckle motif */
  background-image:
    radial-gradient(circle at 18% 12%, rgba(140,110,60,.05) 0 1px, transparent 1.5px),
    radial-gradient(circle at 72% 34%, rgba(140,110,60,.045) 0 1px, transparent 1.5px),
    radial-gradient(circle at 42% 78%, rgba(140,110,60,.05) 0 1px, transparent 1.5px),
    radial-gradient(circle at 88% 88%, rgba(140,110,60,.04) 0 1px, transparent 1.5px);
  background-size: 220px 220px, 260px 260px, 300px 300px, 180px 180px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 var(--sp-2);
  color: var(--ink);
  letter-spacing: -.01em;
}
h1 { font-size: 1.7rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.08rem; }
p { margin: 0 0 var(--sp-3); }
a { color: var(--forest); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--ring);
  border-radius: var(--r-sm);
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Layout containers ---------- */
.app-shell { min-height: 100vh; padding-bottom: calc(var(--nav-h) + 12px); }
.container {
  width: 100%; max-width: var(--content-max);
  margin: 0 auto; padding: 0 var(--sp-4);
}
.page { padding-top: var(--sp-5); padding-bottom: var(--sp-6); }
.stack > * + * { margin-top: var(--sp-4); }
.stack-lg > * + * { margin-top: var(--sp-5); }

.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--sp-3); margin: var(--sp-5) 0 var(--sp-3);
}
.section-head h2 { margin: 0; }
.section-head .eyebrow { margin: 0; }
.eyebrow {
  font-family: var(--font-body);
  font-size: .72rem; font-weight: 700; letter-spacing: .13em;
  text-transform: uppercase; color: var(--terra-deep);
}
.muted { color: var(--ink-soft); }
.faint { color: var(--ink-faint); }

/* Decorative stitched divider */
.rule {
  border: 0; height: 0;
  border-top: 2px dashed var(--line-strong);
  margin: var(--sp-5) 0; opacity: .8;
}

/* ==========================================================================
   Header + navigation
   ========================================================================== */
.app-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--forest-deep);
  color: #fdf6e6;
  box-shadow: var(--shadow-sm);
  border-bottom: 3px solid var(--amber);
}
.app-header .container {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
}
.brand { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; }
.brand-mark {
  width: 34px; height: 34px; flex: none;
  display: grid; place-items: center;
  background: var(--amber); color: var(--forest-deep);
  border-radius: 50%;
  font-family: var(--font-display); font-weight: 600; font-size: 1.05rem;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.35);
}
.brand-name {
  font-family: var(--font-display); font-weight: 600; font-size: 1.12rem;
  color: #fdf6e6; line-height: 1; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.brand-sub {
  display: block; font-family: var(--font-body);
  font-size: .64rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--amber); margin-top: 2px;
}
.header-actions { display: flex; align-items: center; gap: var(--sp-2); }
.icon-btn {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: rgba(255,255,255,.12); color: #fdf6e6;
  border: 1px solid rgba(255,255,255,.2);
  font-size: 1.05rem; line-height: 1;
}
.icon-btn:hover { background: rgba(255,255,255,.22); }

/* Desktop top-tabs (hidden on mobile) */
.nav-tabs { display: none; }

/* Mobile bottom nav */
.nav-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  background: var(--surface);
  border-top: 1px solid var(--line);
  box-shadow: 0 -4px 18px rgba(58,44,28,.10);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.nav-bar-inner {
  max-width: var(--content-max); margin: 0 auto;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  align-items: stretch;
}
.nav-link {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 2px; border-radius: var(--r-sm);
  color: var(--ink-faint); font-size: .66rem; font-weight: 600;
  letter-spacing: .01em; text-decoration: none;
}
.nav-link .ni { font-size: 1.2rem; line-height: 1; }
.nav-link:hover { text-decoration: none; color: var(--ink-soft); }
.nav-link.is-active { color: var(--forest); }
.nav-link.is-active .ni {
  transform: translateY(-1px);
  filter: drop-shadow(0 2px 3px rgba(47,106,69,.35));
}

/* ==========================================================================
   Cards
   ========================================================================== */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--sp-4);
}
.card--pad-lg { padding: var(--sp-5); }
.card-head {
  display: flex; align-items: center; gap: var(--sp-3);
  margin-bottom: var(--sp-3);
}
.card-head h2, .card-head h3 { margin: 0; }
.card-head .card-lead { flex: 1; min-width: 0; }
.card-foot {
  margin-top: var(--sp-4); padding-top: var(--sp-3);
  border-top: 1px dashed var(--line-strong);
}

/* Hero */
.hero {
  position: relative; overflow: hidden;
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  color: #fdf6e6;
  background:
    linear-gradient(150deg, var(--forest-deep), var(--forest) 62%, #35784d);
  box-shadow: var(--shadow);
  border: 1px solid rgba(0,0,0,.15);
}
.hero::after {
  content: ""; position: absolute; right: -30px; top: -30px;
  width: 160px; height: 160px; border-radius: 50%;
  background: radial-gradient(circle, rgba(226,149,46,.55), transparent 68%);
  pointer-events: none;
}
.hero h1 { color: #fff; margin-bottom: var(--sp-2); font-size: 1.85rem; }
.hero .hero-sub { color: rgba(253,246,230,.9); margin: 0; max-width: 46ch; }
.hero .hero-meta {
  display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4);
  margin-top: var(--sp-4); position: relative;
}
.hero .hero-meta span {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .82rem; color: #fdf6e6;
}
.hero .hero-meta .mk { color: var(--amber); }

/* Stat cards */
.stat-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-3);
}
.stat-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: var(--sp-4);
  box-shadow: var(--shadow-sm);
}
.stat-card .stat-label {
  font-size: .74rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ink-faint);
  margin: 0 0 6px;
}
.stat-card .stat-value {
  font-family: var(--font-display); font-weight: 600;
  font-size: 1.7rem; line-height: 1; color: var(--ink);
}
.stat-card .stat-value small {
  font-size: .95rem; color: var(--ink-faint); font-family: var(--font-body);
}
.stat-card .stat-note { font-size: .78rem; color: var(--ink-soft); margin: 6px 0 0; }
.stat-card--accent { border-color: var(--amber); background: var(--amber-tint); }
.stat-card--accent .stat-value { color: var(--terra-deep); }

/* ==========================================================================
   Progress meter
   ========================================================================== */
.meter {
  --pct: 50%;
  position: relative; height: 12px; border-radius: var(--r-pill);
  background: var(--surface-sunk);
  border: 1px solid var(--line);
  overflow: hidden;
}
.meter-fill {
  position: absolute; inset: 0; width: var(--pct);
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--amber), var(--terra));
  transition: width .5s cubic-bezier(.4,0,.2,1);
}
.meter.is-full .meter-fill {
  background: linear-gradient(90deg, var(--forest), var(--claim));
}
.meter-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-3); margin-bottom: 6px;
}
.meter-row .meter-caption { font-size: .8rem; color: var(--ink-soft); font-weight: 600; }
.meter-row .meter-count {
  font-family: var(--font-display); font-weight: 600; font-size: .95rem;
  color: var(--ink);
}
.meter--tall { height: 16px; }

/* ==========================================================================
   List rows with claim buttons
   ========================================================================== */
.list {
  list-style: none; margin: 0; padding: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.list-row {
  display: flex; gap: var(--sp-3);
  padding: var(--sp-4);
  border-top: 1px solid var(--line-soft);
}
.list-row:first-child { border-top: 0; }
.list-row .row-icon {
  flex: none; width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center; font-size: 1.2rem;
  background: var(--forest-tint); color: var(--forest-ink);
}
.row-main { flex: 1; min-width: 0; }
.row-title-line {
  display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-2);
  margin-bottom: 2px;
}
.row-title {
  font-family: var(--font-display); font-weight: 600; font-size: 1.02rem;
  color: var(--ink); line-height: 1.2;
}
.row-meta { font-size: .82rem; color: var(--ink-soft); margin: 2px 0 0; }
.row-meta .qty { font-weight: 700; color: var(--ink); }
.row-progress { margin-top: var(--sp-3); }
.row-bringers {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 6px; margin-top: var(--sp-3);
}
.row-actions {
  flex: none; display: flex; flex-direction: column;
  align-items: flex-end; justify-content: center; gap: 6px;
}
.list-row.is-full { background: color-mix(in srgb, var(--claim-tint) 60%, var(--surface)); }
.list-row.is-full .row-icon { background: var(--claim-tint); color: var(--claim); }

/* ==========================================================================
   Badges
   ========================================================================== */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: var(--r-pill);
  font-size: .7rem; font-weight: 700; letter-spacing: .03em;
  text-transform: uppercase; line-height: 1.4;
  border: 1px solid transparent; white-space: nowrap;
}
.badge::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
}
.badge--essential { background: var(--terra-tint); color: var(--terra-deep); border-color: color-mix(in srgb,var(--terra) 35%, transparent); }
.badge--optional  { background: var(--surface-sunk); color: var(--ink-soft); border-color: var(--line); }
.badge--claimed   { background: var(--claim-tint); color: color-mix(in srgb,var(--claim) 70%, var(--ink)); border-color: color-mix(in srgb,var(--claim) 40%, transparent); }
.badge--full      { background: var(--forest-tint); color: var(--forest-ink); border-color: color-mix(in srgb,var(--forest) 35%, transparent); }
.badge--soft::before { display: none; }
.badge--count {
  background: var(--amber); color: var(--forest-deep);
  padding: 2px 9px; text-transform: none; letter-spacing: 0;
}
.badge--count::before { display: none; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font-family: var(--font-body); font-weight: 700; font-size: .9rem;
  line-height: 1; cursor: pointer; white-space: nowrap;
  padding: 11px 18px; border-radius: var(--r-pill);
  border: 1px solid transparent; text-decoration: none;
  transition: transform .08s ease, background-color .15s ease, box-shadow .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn .bi { font-size: 1.05em; margin-top: -1px; }

.btn--primary {
  background: var(--terra); color: #fff;
  box-shadow: 0 2px 0 var(--terra-deep), var(--shadow-sm);
}
.btn--primary:hover { background: var(--terra-deep); }

.btn--secondary {
  background: var(--forest-tint); color: var(--forest-ink);
  border-color: color-mix(in srgb, var(--forest) 30%, transparent);
}
.btn--secondary:hover { background: color-mix(in srgb, var(--forest) 18%, var(--forest-tint)); }

.btn--ghost {
  background: transparent; color: var(--forest);
  border-color: var(--line-strong);
}
.btn--ghost:hover { background: var(--surface-soft); }

.btn--sm { padding: 8px 14px; font-size: .8rem; }
.btn--block { width: 100%; }
.btn:disabled, .btn.is-disabled { opacity: .5; cursor: default; box-shadow: none; transform: none; }

/* "+ Add something" dashed control */
.add-item {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 13px;
  background: transparent; cursor: pointer;
  border: 2px dashed var(--line-strong); border-radius: var(--r);
  color: var(--forest); font-family: var(--font-body);
  font-weight: 700; font-size: .9rem;
}
.add-item:hover { background: var(--surface-soft); border-color: var(--forest); }
.add-item .plus {
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.1rem; line-height: 1;
  background: var(--amber); color: var(--forest-deep);
}

/* ==========================================================================
   Chips / avatars (people)
   ========================================================================== */
.avatar {
  --sz: 30px;
  width: var(--sz); height: var(--sz); border-radius: 50%;
  display: inline-grid; place-items: center; flex: none;
  font-size: .74rem; font-weight: 700; color: #fff;
  background: var(--forest); border: 2px solid var(--surface);
  font-family: var(--font-body);
}
.avatar--amber { background: var(--amber-deep); }
.avatar--terra { background: var(--terra); }
.avatar--gold  { background: var(--gold); color: var(--forest-deep); }
.avatar-stack { display: inline-flex; }
.avatar-stack .avatar + .avatar { margin-left: -9px; }
.avatar-more {
  display: inline-grid; place-items: center;
  width: 30px; height: 30px; border-radius: 50%;
  margin-left: -9px; font-size: .72rem; font-weight: 700;
  background: var(--surface-sunk); color: var(--ink-soft);
  border: 2px solid var(--surface);
}
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 11px 4px 4px; border-radius: var(--r-pill);
  background: var(--surface-soft); border: 1px solid var(--line);
  font-size: .8rem; font-weight: 600; color: var(--ink-soft);
}
.chip .avatar { --sz: 24px; border-width: 0; }

/* ==========================================================================
   Forms
   ========================================================================== */
.form { display: block; }
.field { margin-bottom: var(--sp-4); }
.field-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3);
}
.label {
  display: block; margin-bottom: 6px;
  font-size: .82rem; font-weight: 700; color: var(--ink-soft);
  letter-spacing: .01em;
}
.label .req { color: var(--terra); }
.input, .select, .textarea {
  width: 100%; font-family: var(--font-body); font-size: 1rem;
  color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--r);
  padding: 11px 13px; line-height: 1.3;
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none; appearance: none;
}
.input::placeholder, .textarea::placeholder { color: var(--ink-faint); }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--forest);
  box-shadow: 0 0 0 3px var(--ring);
}
.textarea { min-height: 84px; resize: vertical; }
.select {
  padding-right: 40px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--ink-soft) 50%),
    linear-gradient(135deg, var(--ink-soft) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%;
  background-size: 6px 6px, 6px 6px; background-repeat: no-repeat;
}
.hint { margin: 6px 0 0; font-size: .78rem; color: var(--ink-faint); }

/* Stepper input (quantities) */
.stepper {
  display: inline-flex; align-items: center;
  border: 1px solid var(--line-strong); border-radius: var(--r-pill);
  background: var(--surface); overflow: hidden;
}
.stepper button {
  width: 40px; height: 40px; border: 0; cursor: pointer;
  background: transparent; color: var(--forest);
  font-size: 1.3rem; line-height: 1;
}
.stepper button:hover { background: var(--surface-soft); }
.stepper .stepper-val {
  min-width: 34px; text-align: center;
  font-family: var(--font-display); font-weight: 600; font-size: 1.05rem;
}

/* Login doorway */
.gate {
  min-height: 100vh; display: grid; place-items: center; padding: var(--sp-5);
}
.gate-card {
  width: 100%; max-width: 380px; text-align: center;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  padding: var(--sp-6) var(--sp-5);
}
.gate-card .brand-mark { width: 56px; height: 56px; font-size: 1.6rem; margin: 0 auto var(--sp-4); }

/* ==========================================================================
   Empty state
   ========================================================================== */
.empty {
  text-align: center; padding: var(--sp-6) var(--sp-4);
  border: 2px dashed var(--line-strong); border-radius: var(--r-lg);
  background: var(--surface-soft); color: var(--ink-soft);
}
.empty .empty-emoji { font-size: 2.2rem; display: block; margin-bottom: var(--sp-2); }
.empty h3 { color: var(--ink); margin-bottom: 4px; }
.empty p { margin: 0 auto var(--sp-4); max-width: 34ch; font-size: .9rem; }

/* ==========================================================================
   Timeline (schedule)
   ========================================================================== */
.timeline { list-style: none; margin: 0; padding: 0 0 0 var(--sp-2); position: relative; }
.tl-item {
  position: relative; padding: 0 0 var(--sp-5) var(--sp-6);
  border-left: 2px solid var(--line-strong);
}
.tl-item:last-child { border-left-color: transparent; padding-bottom: 0; }
.tl-marker {
  position: absolute; left: -11px; top: 0;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--amber); border: 3px solid var(--paper);
  box-shadow: 0 0 0 1px var(--line-strong);
}
.tl-item.is-now .tl-marker { background: var(--terra); box-shadow: 0 0 0 4px var(--terra-tint); }
.tl-time {
  font-family: var(--font-display); font-weight: 600; font-size: .8rem;
  color: var(--terra-deep); letter-spacing: .02em; margin-bottom: 2px;
}
.tl-title { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; color: var(--ink); margin: 0; }
.tl-desc { font-size: .85rem; color: var(--ink-soft); margin: 4px 0 0; }
.tl-day {
  display: inline-block; margin: var(--sp-2) 0 var(--sp-3) calc(-1 * var(--sp-2));
  font-family: var(--font-display); font-weight: 600; font-size: 1.15rem;
  color: var(--forest); padding-bottom: 2px;
  border-bottom: 2px dashed var(--line-strong);
}

/* Ledger rows (money) */
.ledger { list-style: none; margin: 0; padding: 0; }
.ledger li {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  padding: var(--sp-3) 0; border-bottom: 1px dashed var(--line-soft);
}
.ledger .amt { font-family: var(--font-display); font-weight: 600; color: var(--forest); }

/* Utility */
.flex { display: flex; }
.between { justify-content: space-between; }
.items-center { align-items: center; }
.gap-2 { gap: var(--sp-2); } .gap-3 { gap: var(--sp-3); }
.wrap { flex-wrap: wrap; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.text-center { text-align: center; }

/* ==========================================================================
   Desktop
   ========================================================================== */
@media (min-width: 720px) {
  h1 { font-size: 2rem; }
  .hero h1 { font-size: 2.3rem; }
  .app-shell { padding-bottom: var(--sp-6); }

  .nav-bar { display: none; }
  .nav-tabs {
    display: flex; align-items: center; gap: 2px;
  }
  .nav-tabs .nav-link {
    flex-direction: row; gap: 7px; padding: 8px 14px;
    border-radius: var(--r-pill); font-size: .85rem; color: #d9ecdd;
  }
  .nav-tabs .nav-link .ni { font-size: 1rem; }
  .nav-tabs .nav-link:hover { background: rgba(255,255,255,.12); color: #fff; }
  .nav-tabs .nav-link.is-active {
    background: var(--amber); color: var(--forest-deep);
  }
  .nav-tabs .nav-link.is-active .ni { filter: none; transform: none; }

  .stat-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .dash-cols {
    display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--sp-5);
    align-items: start;
  }
  .list-row { padding: var(--sp-4) var(--sp-5); }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}