/* ============================================================================
   PACK YAK — packing lists with a personality problem
   Paper, ink, safety orange, and one extremely helpful yak.
   ========================================================================= */

/* ---------------------------------------------------------------- tokens */
:root {
  color-scheme: light dark;
  --bg: #f5eddc;
  --bg-deep: #ebe0c8;
  --surface: #fffaf0;
  --surface-2: #f1e7d3;
  --ink: #15231b;
  --ink-soft: #2b3b31;
  --muted: #5f6a5e;
  --line: #d9cdb7;
  --line-strong: #b9aa8d;
  --card-border: #18271e;
  --card-shadow: #18271e;
  --accent: #ff5b35;
  --accent-strong: #e8421c;
  --accent-text: #c63a16;
  --accent-soft: #ffe1d6;
  --accent-ink: #1e1008;
  --blue: #2456e6;
  --blue-soft: #dfe5ff;
  --green: #177a50;
  --green-soft: #d7efe1;
  --red: #bb3722;
  --red-soft: #fbe3dc;
  --yellow: #ffd447;
  --yellow-soft: #fff1b8;
  --pink: #ffb7c9;
  --pink-soft: #ffe4eb;
  --hero-bg: #0f241c;
  --hero-bg-2: #143126;
  --hero-ink: #fbf3e2;
  --hero-muted: #b8c8ba;
  --hero-line: #395046;
  --tape: #f4dc8d;
  --overlay: rgba(7, 17, 12, .62);
  --hard-shadow: 2px 2px 0 var(--ink);
  --font-display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, "Times New Roman", serif;
  --font-body: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --radius: 18px;
  --page: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c1510;
    --bg-deep: #101d16;
    --surface: #152019;
    --surface-2: #1d2b22;
    --ink: #f2e9d7;
    --ink-soft: #d7ccb8;
    --muted: #9aa99c;
    --line: #33443a;
    --line-strong: #516357;
    --card-border: #415247;
    --card-shadow: #030604;
    --accent: #ff7551;
    --accent-strong: #ff8d6e;
    --accent-text: #ff9277;
    --accent-soft: #3a2118;
    --accent-ink: #1a0e08;
    --blue: #7f9dff;
    --blue-soft: #1d2849;
    --green: #63d2a0;
    --green-soft: #143226;
    --red: #ff8b78;
    --red-soft: #3a1d18;
    --yellow: #ffda67;
    --yellow-soft: #3a2f14;
    --pink: #ffc3d4;
    --pink-soft: #3a1f27;
    --hero-bg: #08120d;
    --hero-bg-2: #0d1f17;
    --hero-ink: #f7eedb;
    --hero-muted: #9cb0a0;
    --hero-line: #2b4035;
    --tape: #e7ce7c;
    --overlay: rgba(0, 0, 0, .72);
    --hard-shadow: 2px 2px 0 #050806;
  }
}

/* ---------------------------------------------------------------- base */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  background-color: var(--bg);
  background-image: radial-gradient(color-mix(in srgb, var(--ink) 7%, transparent) .7px, transparent .8px);
  background-size: 16px 16px;
  color: var(--ink);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  transition: background-color .25s ease, color .25s ease;
}
[hidden] { display: none !important; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
svg { width: 1.25em; height: 1.25em; display: block; }
::selection { background: var(--yellow); color: var(--accent-ink); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
@media (prefers-color-scheme: dark) {
  :focus-visible { outline-color: var(--yellow); }
}

.wordmark {
  display: block;
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1;
  letter-spacing: -.03em;
  font-weight: 700;
}
.eyebrow,
.card-label,
.kicker,
.filter-label,
.stamp-note,
.sticker,
.save-state,
.expected-label,
.pass-type,
.pass-airline,
.pass-route span,
.pass-bottom span,
.pass-serial,
.footer-small {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: .13em;
  font-weight: 700;
}
.eyebrow { display: block; font-size: 9.5px; line-height: 1.4; color: var(--muted); }
.card-label { display: block; font-size: 9.5px; color: var(--muted); }
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 9.5px;
  color: var(--hero-muted);
}
.kicker svg { width: 12px; height: 12px; color: var(--accent); }
.kicker-light { color: rgba(251, 243, 226, .66); }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1.8px solid var(--ink);
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.15;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--hard-shadow);
  transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease, color .16s ease;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink); }
.btn:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--ink); }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-strong); }
.btn-secondary { background: var(--surface); }
.btn-secondary:hover { background: var(--surface-2); }
.btn-ghost { border-color: transparent; box-shadow: none; background: transparent; color: var(--muted); }
.btn-ghost:hover { border-color: var(--line-strong); background: var(--surface-2); box-shadow: none; transform: none; color: var(--ink); }
.btn-danger-ghost { border-color: transparent; box-shadow: none; background: transparent; color: var(--red); }
.btn-danger-ghost:hover { border-color: var(--red); background: var(--red-soft); box-shadow: none; transform: none; }
.btn-big { padding: 14px 22px; font-size: 14px; }
.btn-block { width: 100%; }
.btn-with-icon svg { width: 16px; height: 16px; }
.btn-cost { padding: 8px 13px; font-size: 12px; border-radius: 9px; box-shadow: 1px 1px 0 var(--ink); }

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1.5px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  flex: none;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
}
.icon-button:hover { background: var(--surface-2); color: var(--ink); }
.icon-button svg { width: 19px; height: 19px; }
.icon-button-border { border-color: var(--line-strong); }
.icon-button-border:hover { border-color: var(--ink); }
.icon-button-danger { color: var(--red); }
.icon-button-danger:hover { background: var(--red-soft); color: var(--red); }
.icon-button-light { color: var(--hero-ink); }
.icon-button-light:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.icon-button-light.icon-button-border { border-color: rgba(251, 243, 226, .32); }

.link-button {
  border: 0;
  background: none;
  padding: 2px 0;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent-text);
}
.link-button:hover { text-decoration: underline; text-underline-offset: 3px; }

.sticker {
  display: inline-block;
  padding: 5px 9px;
  border: 1.5px solid var(--ink);
  border-radius: 4px;
  background: var(--yellow);
  color: var(--accent-ink);
  font-size: 9px;
  line-height: 1.25;
  box-shadow: 2px 2px 0 var(--ink);
  transform: rotate(-2.5deg);
  white-space: nowrap;
}
.sticker-inline { background: transparent; color: var(--hero-ink); border-color: rgba(251, 243, 226, .4); box-shadow: none; transform: rotate(1.5deg); }

/* ---------------------------------------------------------------- hero shell */
.hero {
  position: relative;
  padding: 0 0 28px;
  padding-top: env(safe-area-inset-top);
  color: var(--hero-ink);
  background-color: var(--hero-bg);
  background-image:
    radial-gradient(800px 460px at 84% -10%, rgba(255, 91, 53, .19), transparent 62%),
    radial-gradient(600px 400px at 4% 110%, rgba(63, 133, 100, .22), transparent 66%),
    radial-gradient(rgba(251, 243, 226, .11) .8px, transparent .9px);
  background-size: auto, auto, 18px 18px;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: auto -80px -180px auto;
  width: 430px;
  height: 430px;
  border: 2px dashed rgba(251, 243, 226, .13);
  border-radius: 50%;
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto auto -110px -120px;
  width: 300px;
  height: 300px;
  border: 2px solid rgba(251, 243, 226, .07);
  border-radius: 50%;
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; max-width: var(--page); margin: 0 auto; padding: 0 24px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-top: 18px; }
.brand { display: flex; align-items: center; gap: 13px; min-width: 0; }
.brand-mark {
  width: 48px;
  height: 48px;
  flex: none;
  display: grid;
  place-items: center;
  border: 2px solid var(--hero-ink);
  border-radius: 14px;
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, .38);
  transform: rotate(-3deg);
}
.brand-mark svg { width: 30px; height: 30px; }
.brand-text { min-width: 0; }
.brand-text .wordmark { color: var(--hero-ink); }
.brand-text .eyebrow { color: var(--hero-muted); margin-top: 3px; font-size: 8.5px; letter-spacing: .11em; }
.brand-mini .wordmark { font-size: 21px; }
.brand-mini .eyebrow { margin-top: 2px; }
.hero-actions { display: flex; align-items: center; gap: 7px; flex: none; }
.hero-converter { display: none; }
.fx-mini { font-family: var(--font-mono); font-size: 10px; font-weight: 800; letter-spacing: .02em; }
.hero-sub { max-width: 560px; color: var(--hero-muted); font-size: 14px; line-height: 1.6; }

/* ---------------------------------------------------------------- home hero */
.hero-home { padding-bottom: 0; }
.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, .92fr);
  align-items: center;
  gap: 48px;
  padding: 54px 0 58px;
}
.home-hero-copy h1 {
  margin-top: 14px;
  font-family: var(--font-display);
  font-size: clamp(46px, 6.8vw, 84px);
  font-weight: 600;
  line-height: .91;
  letter-spacing: -.045em;
  color: var(--hero-ink);
}
.home-hero-copy h1 em { color: var(--accent); font-weight: 500; }
.home-hero-copy .hero-sub { margin-top: 20px; font-size: 15px; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-top: 26px; }
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--hero-ink);
  font-size: 13px;
  font-weight: 650;
  text-decoration: underline;
  text-decoration-color: rgba(251, 243, 226, .35);
  text-underline-offset: 4px;
}
.text-link:hover { text-decoration-color: var(--accent); }
.text-link svg { width: 15px; height: 15px; color: var(--accent); }
.hero-fineprint {
  margin-top: 18px;
  max-width: 500px;
  color: rgba(251, 243, 226, .56);
  font-size: 11px;
  line-height: 1.55;
}

/* ---------------------------------------------------------------- boarding pass */
.pass-wrap { position: relative; width: min(100%, 430px); margin: 0 auto; padding: 10px 6px 18px 0; }
.boarding-pass {
  position: relative;
  border: 2px solid var(--accent-ink);
  border-radius: 16px;
  background: #fbf3e2;
  color: #1a241c;
  box-shadow: 10px 10px 0 rgba(0, 0, 0, .4);
  transform: rotate(-2.2deg);
  overflow: hidden;
}
.boarding-pass::before {
  content: "";
  position: absolute;
  top: -14px;
  left: 26px;
  width: 108px;
  height: 28px;
  background: var(--tape);
  border: 1px solid rgba(26, 36, 28, .18);
  transform: rotate(-4deg);
  opacity: .92;
  z-index: 2;
}
.pass-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 16px 10px;
  border-bottom: 1.5px dashed rgba(26, 36, 28, .34);
}
.pass-airline { display: inline-flex; align-items: center; gap: 6px; font-size: 8.5px; letter-spacing: .1em; }
.pass-airline svg { width: 13px; height: 13px; color: #d8401b; }
.pass-type { font-size: 8px; color: #6c756c; letter-spacing: .16em; }
.pass-route {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px 12px;
}
.pass-route div { display: grid; gap: 1px; }
.pass-route span { font-size: 7.5px; color: #7c8479; letter-spacing: .12em; }
.pass-route strong {
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1;
  letter-spacing: -.03em;
  font-weight: 600;
}
.pass-route div:last-child { text-align: right; }
.pass-route-arrow {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #d8401b;
  color: #fff4e3;
  transform: rotate(-8deg);
}
.pass-route-arrow svg { width: 17px; height: 17px; }
.pass-art {
  position: relative;
  height: 196px;
  border-top: 2px solid #1a241c;
  border-bottom: 2px solid #1a241c;
  background: var(--yellow);
  overflow: hidden;
}
.pass-hills { position: absolute; inset: auto 0 -6px; width: 100%; height: 108px; color: rgba(26, 36, 28, .3); }
.pass-yak {
  position: absolute;
  left: 50%;
  top: 30px;
  width: 158px;
  height: 158px;
  transform: translateX(-50%);
  color: #1a241c;
}
.pass-yak svg { width: 100%; height: 100%; }
.pass-stamp {
  position: absolute;
  right: 18px;
  top: 16px;
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  border: 2px solid #d8401b;
  border-radius: 50%;
  color: #c53a17;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.25;
  transform: rotate(11deg);
  opacity: .9;
}
.pass-stamp::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px dashed #d8401b;
  border-radius: 50%;
}
.pass-note {
  position: absolute;
  left: 16px;
  bottom: 10px;
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: rgba(26, 36, 28, .62);
}
.pass-perf { position: relative; height: 0; border-top: 2px dashed rgba(26, 36, 28, .42); }
.pass-perf::before,
.pass-perf::after {
  content: "";
  position: absolute;
  top: -9px;
  width: 16px;
  height: 16px;
  border: 2px solid #1a241c;
  border-radius: 50%;
  background: var(--hero-bg);
}
.pass-perf::before { left: -10px; }
.pass-perf::after { right: -10px; }
.pass-bottom {
  display: grid;
  grid-template-columns: 1.4fr 1fr .6fr;
  gap: 8px;
  padding: 12px 16px 8px;
}
.pass-bottom div { display: grid; gap: 1px; }
.pass-bottom span { font-size: 7px; color: #7c8479; letter-spacing: .12em; }
.pass-bottom strong {
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.3;
  letter-spacing: -.01em;
  text-transform: uppercase;
}
.pass-barcode {
  height: 30px;
  margin: 0 16px;
  background-image: repeating-linear-gradient(90deg,
    #1a241c 0 2px, transparent 2px 4px,
    #1a241c 4px 5px, transparent 5px 8px,
    #1a241c 8px 11px, transparent 11px 13px,
    #1a241c 13px 14px, transparent 14px 17px);
  opacity: .82;
}
.pass-serial {
  padding: 5px 16px 12px;
  font-size: 6.8px;
  letter-spacing: .18em;
  color: #8b9084;
  text-align: center;
}
.sticker-orbit { position: absolute; z-index: 3; font-size: 8.5px; }
.sticker-orbit-a { top: -21px; right: 7px; transform: rotate(6deg); }
.sticker-orbit-b { top: 43%; left: -20px; background: var(--pink); transform: rotate(-7deg); }
.sticker-orbit-c { left: auto; right: -14px; bottom: 30%; background: var(--blue); color: #fff; transform: rotate(4deg); }

/* ---------------------------------------------------------------- marquee */
.marquee {
  position: relative;
  z-index: 2;
  margin-top: 4px;
  border-top: 2px solid var(--accent-ink);
  border-bottom: 2px solid var(--accent-ink);
  background: var(--accent);
  color: var(--accent-ink);
  overflow: hidden;
}
.marquee-track {
  display: flex;
  align-items: center;
  gap: 20px;
  width: max-content;
  padding: 8px 0;
  animation: marquee 30s linear infinite;
}
.marquee-track span {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  white-space: nowrap;
}
.marquee-track svg { width: 11px; height: 11px; flex: none; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------------------------------------------------------------- content */
.content { max-width: var(--page); margin: 0 auto; padding: 48px 24px calc(112px + env(safe-area-inset-bottom)); }
.home-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.home-head h2 {
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: clamp(28px, 3.6vw, 40px);
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: 1;
}
.stamp-note {
  display: inline-block;
  padding: 4px 8px;
  border: 1.5px solid var(--line-strong);
  border-radius: 3px;
  font-size: 8px;
  color: var(--muted);
  transform: rotate(-2deg);
  white-space: nowrap;
}
.project-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 390px), 1fr)); gap: 16px; }
.project-card {
  --tone: var(--accent);
  --tone-ink: var(--accent-ink);
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: stretch;
  background: var(--surface);
  border: 2px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: 4px 4px 0 var(--card-shadow);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}
.project-card:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--card-shadow); }
.project-card.tone-1 { --tone: var(--blue); --tone-ink: #fff; }
.project-card.tone-2 { --tone: var(--green); --tone-ink: #fff; }
.project-card.tone-3 { --tone: var(--pink); --tone-ink: var(--accent-ink); }
.project-index {
  display: grid;
  place-items: center;
  border-right: 2px solid var(--card-border);
  background: var(--tone);
  color: var(--tone-ink);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .05em;
}
.project-card-main { min-width: 0; padding: 16px 18px; }
.project-card-main h2 {
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -.025em;
  overflow-wrap: break-word;
}
.project-meta {
  margin-top: 5px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .01em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.project-spent {
  display: inline-block;
  margin-top: 7px;
  padding: 2px 6px;
  border: 1px solid color-mix(in srgb, var(--green) 40%, transparent);
  border-radius: 4px;
  background: var(--green-soft);
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.project-meter { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.project-meter progress { flex: 1; height: 7px; }
.project-meter span {
  flex: none;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 800;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.project-card-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 12px;
  border-left: 1.5px dashed var(--line);
}
.project-open { gap: 5px; padding: 8px 12px; font-size: 11.5px; white-space: nowrap; }
.project-open svg { width: 14px; height: 14px; }
.project-card-actions .icon-button { width: 30px; height: 30px; }
.project-card-actions .icon-button svg { width: 15px; height: 15px; }
.project-card-actions-row { display: flex; gap: 2px; }

/* generic progress */
progress {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  width: 100%;
  height: 9px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}
progress::-webkit-progress-bar { background: var(--surface-2); border-radius: 999px; }
progress::-webkit-progress-value { background: var(--accent); border-radius: 999px; transition: width .45s cubic-bezier(.2, .8, .3, 1); }
progress::-moz-progress-bar { background: var(--accent); border-radius: 999px; }

/* ---------------------------------------------------------------- empty states */
.empty-state { padding: 54px 24px; text-align: center; color: var(--muted); }
.empty-home {
  border: 2px dashed var(--line-strong);
  border-radius: 24px;
  background: color-mix(in srgb, var(--surface) 55%, transparent);
}
.empty-yak {
  width: 78px;
  height: 78px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 20px;
  background: var(--yellow);
  color: var(--accent-ink);
  box-shadow: 4px 4px 0 var(--ink);
  transform: rotate(-4deg);
}
.empty-yak svg { width: 52px; height: 52px; }
.empty-state h2 {
  font-family: var(--font-display);
  font-size: clamp(23px, 3vw, 32px);
  font-weight: 600;
  letter-spacing: -.03em;
  line-height: 1.05;
  color: var(--ink);
}
.empty-state p { margin: 8px auto 0; max-width: 360px; font-size: 13px; line-height: 1.55; }
.empty-state .btn { margin-top: 20px; }

/* ---------------------------------------------------------------- list hero */
.list-hero { padding-bottom: 34px; }
.list-title-block { padding: 38px 0 26px; }
.list-title-block h1 {
  margin-top: 8px;
  max-width: 900px;
  font-family: var(--font-display);
  font-size: clamp(38px, 6vw, 66px);
  font-weight: 600;
  line-height: .94;
  letter-spacing: -.045em;
  color: var(--hero-ink);
  overflow-wrap: break-word;
}
.list-title-block .hero-sub { margin-top: 12px; max-width: 640px; font-size: 12.5px; }
.summary-card {
  display: grid;
  background: var(--surface);
  color: var(--ink);
  border: 2px solid var(--card-border);
  border-radius: 20px;
  box-shadow: 7px 7px 0 rgba(0, 0, 0, .4);
  overflow: hidden;
}
.summary-main { padding: 18px 20px 16px; }
.summary-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.summary-cost {
  flex: none;
  padding: 3px 7px;
  border: 1.5px solid var(--ink);
  border-radius: 3px;
  background: var(--yellow);
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
  transform: rotate(-1.5deg);
}
.summary-numbers { display: flex; align-items: center; gap: 14px; margin-top: 4px; }
.summary-numbers strong {
  flex: none;
  font-family: var(--font-display);
  font-size: clamp(52px, 8vw, 72px);
  font-weight: 600;
  line-height: .85;
  letter-spacing: -.055em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.summary-copy { display: grid; gap: 3px; min-width: 0; padding-top: 5px; }
.summary-copy #resolved-label { font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; color: var(--muted); }
.summary-vibe {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 15px;
  line-height: 1.3;
  color: var(--accent-text);
  text-wrap: balance;
}
.meter { position: relative; display: flex; align-items: center; height: 28px; margin: 20px 14px 0; --pct: 0; }
.meter progress { height: 13px; border-width: 2px; background: var(--surface-2); }
.meter progress::-webkit-progress-value { background: linear-gradient(90deg, var(--green), var(--accent)); }
.meter progress::-moz-progress-bar { background: linear-gradient(90deg, var(--green), var(--accent)); }
.meter-yak {
  position: absolute;
  top: 50%;
  left: calc(var(--pct) * 1%);
  z-index: 2;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  background: var(--yellow);
  color: var(--accent-ink);
  box-shadow: 1.5px 1.5px 0 var(--ink);
  transform: translate(-50%, -50%);
  transition: left .45s cubic-bezier(.2, .8, .3, 1);
}
.meter-yak svg { width: 21px; height: 21px; }
.summary-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 12px;
  margin-top: 9px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .015em;
  color: var(--muted);
}
.summary-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1.5px dashed var(--line-strong);
  background: color-mix(in srgb, var(--surface-2) 40%, var(--surface));
}
.stat { position: relative; min-width: 0; display: flex; flex-direction: column; justify-content: center; padding: 13px 8px 12px; text-align: center; }
.stat + .stat { border-left: 1px dashed var(--line); }
.stat::before {
  content: "";
  display: block;
  width: 7px;
  height: 7px;
  margin: 0 auto 5px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--stat-color, var(--muted));
}
.stat-todo { --stat-color: var(--accent); }
.stat-bought { --stat-color: var(--green); }
.stat-owned { --stat-color: var(--blue); }
.stat-skipped { --stat-color: var(--line-strong); }
.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.stat span {
  display: block;
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------------------------------------------------------------- offline */
.offline-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 8px 12px;
  border: 1.5px solid var(--ink);
  border-radius: 8px;
  background: var(--yellow-soft);
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1.4;
  box-shadow: 2px 2px 0 var(--ink);
}
@media (prefers-color-scheme: dark) {
  .offline-banner { color: var(--yellow); background: var(--yellow-soft); }
}
.offline-dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: currentColor; animation: blink 1.8s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .25; } }

/* ---------------------------------------------------------------- toolbar */
.toolbar { margin-bottom: 4px; }
.toolbar-row { display: flex; flex-wrap: wrap; gap: 9px; align-items: stretch; }
.toolbar-row .search-field { flex: 1 1 280px; min-width: 0; }
.search-field { position: relative; }
.search-field svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: var(--muted);
  pointer-events: none;
}
.search-field input {
  width: 100%;
  min-height: 46px;
  padding: 11px 15px 11px 42px;
  border: 1.8px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  font-size: 16px;
  -webkit-appearance: none;
  appearance: none;
  box-shadow: 2px 2px 0 color-mix(in srgb, var(--ink) 14%, transparent);
}
.search-field input::placeholder { color: var(--muted); }
.search-field input:focus,
.store-filter:focus,
.field input:focus,
.field select:focus,
.field textarea:focus,
.inline-form input:focus,
.share-field input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--ink);
}
.store-filter {
  flex: 1 1 180px;
  min-width: 155px;
  max-width: 250px;
  min-height: 46px;
  padding: 0 38px 0 13px;
  border: 1.8px solid var(--line-strong);
  border-radius: 12px;
  background-color: var(--surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23717b6e' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  color: var(--muted);
  font-size: 15px;
  -webkit-appearance: none;
  appearance: none;
  box-shadow: 2px 2px 0 color-mix(in srgb, var(--ink) 14%, transparent);
}
.filter-label-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 15px 2px 7px; }
.filter-label { font-size: 8.5px; color: var(--muted); }
.filter-hint { font-family: var(--font-display); font-style: italic; font-size: 10.5px; color: var(--muted); opacity: .8; }
.chips { display: flex; gap: 7px; overflow-x: auto; padding: 2px 1px 5px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  box-shadow: 2px 2px 0 var(--ink);
  transition: transform .14s ease, box-shadow .14s ease, background-color .14s ease, color .14s ease;
}
.chip:nth-child(odd) { transform: rotate(-.5deg); }
.chip:nth-child(even) { transform: rotate(.5deg); }
.chip:hover { transform: translate(-1px, -1px) rotate(0); box-shadow: 3px 3px 0 var(--ink); }
.chip.is-active { background: var(--ink); color: var(--bg); transform: rotate(0); box-shadow: 2px 2px 0 color-mix(in srgb, var(--accent) 70%, var(--ink)); }
.chip-count {
  min-width: 17px;
  padding: 1px 4px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 10%, transparent);
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 800;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.chip.is-active .chip-count { background: var(--accent); color: var(--accent-ink); }
.results-note {
  min-height: 18px;
  margin: 14px 2px 12px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .02em;
  color: var(--muted);
}
.results-note strong { color: var(--ink); font-weight: 800; }

/* ---------------------------------------------------------------- categories */
.categories { display: grid; gap: 16px; }
.category {
  --cat-color: var(--accent);
  --cat-ink: var(--accent-ink);
  background: var(--surface);
  border: 2px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: 4px 4px 0 var(--card-shadow);
  overflow: hidden;
}
.category:nth-child(4n+2) { --cat-color: var(--blue); --cat-ink: #fff; }
.category:nth-child(4n+3) { --cat-color: var(--green); --cat-ink: #fff; }
.category:nth-child(4n+4) { --cat-color: var(--pink); --cat-ink: var(--accent-ink); }
.cat-head { display: flex; align-items: center; gap: 6px; padding: 0 11px 0 13px; }
.cat-toggle {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px 4px 13px 0;
  border: 0;
  background: none;
  text-align: left;
}
.cat-toggle:hover .cat-name { color: var(--accent-text); }
.cat-index {
  flex: none;
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border: 1.5px solid var(--ink);
  border-radius: 8px;
  background: var(--cat-color);
  color: var(--cat-ink);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 800;
  transform: rotate(-3deg);
  box-shadow: 1.5px 1.5px 0 var(--ink);
}
.cat-name {
  flex: 1;
  min-width: 0;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.02em;
  transition: color .14s ease;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cat-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.cat-total { font-weight: 800; color: var(--green); }
.cat-chevron { flex: none; color: var(--muted); transition: transform .2s ease; }
.cat-chevron svg { width: 16px; height: 16px; }
.category.is-open .cat-chevron { transform: rotate(180deg); }
.cat-add {
  flex: none;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  transition: border-color .15s ease, color .15s ease, background-color .15s ease, transform .15s ease;
}
.cat-add:hover { border-color: var(--ink); background: var(--surface-2); color: var(--ink); transform: rotate(90deg); }
.cat-add svg { width: 16px; height: 16px; }
.cat-items { display: none; border-top: 1.5px solid var(--line); }
.category.is-open .cat-items { display: block; }
.is-filtering .cat-chevron { visibility: hidden; }
.cat-progress { height: 5px; border: 0; border-radius: 0; background: color-mix(in srgb, var(--cat-color) 16%, var(--surface-2)); }
.cat-progress::-webkit-progress-bar { background: color-mix(in srgb, var(--cat-color) 16%, var(--surface-2)); border-radius: 0; }
.cat-progress::-webkit-progress-value { background: var(--cat-color); border-radius: 0; }
.cat-progress::-moz-progress-bar { background: var(--cat-color); border-radius: 0; }

/* ---------------------------------------------------------------- item rows */
.item-row {
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 9px;
  padding: 10px 13px;
  border-bottom: 1px solid var(--line);
  transition: background-color .13s ease;
}
.item-row:last-child { border-bottom: 0; }
.item-row:hover { background: color-mix(in srgb, var(--surface-2) 46%, transparent); }
.item-row[data-status="bought"] { box-shadow: inset 3px 0 0 var(--green); }
.item-row[data-status="owned"] { box-shadow: inset 3px 0 0 var(--blue); }
.item-row[data-status="skipped"] { box-shadow: inset 3px 0 0 var(--line-strong); }

.item-priority {
  flex: none;
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1.5px dashed var(--line-strong);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}
.item-priority svg { width: 14px; height: 14px; }
.item-priority:hover { border-color: var(--accent); color: var(--accent-text); transform: rotate(-6deg); }
.item-priority.is-active {
  border-style: solid;
  border-color: var(--ink);
  background: var(--yellow);
  color: var(--accent-ink);
  box-shadow: 1.5px 1.5px 0 var(--ink);
  transform: rotate(-4deg);
}
.item-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 1px 0;
  border: 0;
  background: none;
  text-align: left;
  color: inherit;
}
.item-name {
  display: block;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -.012em;
  overflow-wrap: break-word;
}
.item-sub {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: .015em;
  color: var(--muted);
}
.item-sub .where { color: var(--ink-soft); }
.note-flag {
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent-text);
  background: var(--accent-soft);
  border-radius: 2px;
  padding: 1px 4px;
  line-height: 1.4;
}
.item-status {
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: 1px 4px;
  border-radius: 2px;
  line-height: 1.4;
}
.item-status.is-bought { color: var(--green); background: var(--green-soft); }
.item-status.is-owned { color: var(--blue); background: var(--blue-soft); }
.item-status.is-skipped { color: var(--muted); background: var(--surface-2); }
.item-price {
  padding: 1px 5px;
  border: 1px solid color-mix(in srgb, var(--green) 35%, transparent);
  border-radius: 3px;
  background: var(--green-soft);
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.item-expected {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  line-height: 1.05;
  white-space: nowrap;
}
.expected-label { font-size: 7px; letter-spacing: .06em; color: var(--muted); }
.expected-value {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.item-expected.is-empty .expected-value { color: var(--muted); opacity: .7; }
.item-side { display: flex; align-items: center; gap: 10px; flex: none; }
.quick-actions { display: flex; gap: 4px; flex: none; }
.quick {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}
.quick svg { width: 14px; height: 14px; }
.quick:hover { border-color: var(--ink); color: var(--ink); transform: translateY(-1px); }
.quick[data-status="bought"].is-active { background: var(--green); border-color: var(--green); color: var(--bg); }
.quick[data-status="owned"].is-active { background: var(--blue); border-color: var(--blue); color: #fff; }
.quick[data-status="skipped"].is-active { background: var(--line-strong); border-color: var(--line-strong); color: var(--ink); }
.item-row[data-status="bought"] .item-name { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1.5px; text-decoration-color: color-mix(in srgb, var(--muted) 65%, transparent); }
.item-row[data-status="owned"] .item-name { color: var(--muted); }
.item-row[data-status="skipped"] { opacity: .58; }
.item-row[data-status="skipped"] .item-name { text-decoration: line-through; text-decoration-thickness: 1.5px; }
.cat-empty { padding: 16px 17px; font-size: 12px; line-height: 1.5; color: var(--muted); font-style: italic; }

/* ---------------------------------------------------------------- cost editor */
.cost-editor {
  grid-column: 1 / -1;
  margin: 2px 0 3px;
  padding: 9px 10px;
  border: 1.5px dashed var(--accent-strong);
  border-radius: 10px;
  background: var(--accent-soft);
}
.cost-editor-main { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 6px; }
.cost-label { font-family: var(--font-mono); font-size: 8px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.cost-money { min-width: 0; max-width: none; }
.cost-money input {
  width: 100%;
  min-height: 34px;
  padding: 5px 9px 5px 38px;
  border: 1.5px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
}
.cost-money > span { font-size: 9px; font-family: var(--font-mono); left: 9px; }
.cost-input:focus, .cost-input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--ink); box-shadow: none; }
.cost-editor .icon-button { width: 29px; height: 29px; }
.cost-editor-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 8px; margin-top: 5px; font-family: var(--font-mono); font-size: 8.5px; color: var(--muted); }
.cost-editor-foot .link-button { font-size: 9px; }

/* ---------------------------------------------------------------- list actions */
.is-empty-list .toolbar,
.is-empty-list .results-note { display: none; }
.is-empty-list .empty-state {
  margin: 8px 0;
  padding: 46px 22px;
  border: 2px dashed var(--line-strong);
  border-radius: 24px;
  background: color-mix(in srgb, var(--surface) 55%, transparent);
}
.list-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.inline-add {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 15px;
  border: 1.8px dashed var(--line-strong);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 60%, transparent);
  color: var(--ink);
  text-align: left;
  transition: border-color .16s ease, background-color .16s ease, transform .16s ease;
}
.inline-add:hover { border-color: var(--accent-strong); background: var(--surface); transform: translateY(-1px); }
.inline-add-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 1.5px 1.5px 0 var(--ink);
}
.inline-add-icon svg { width: 16px; height: 16px; }
.inline-add strong { display: block; font-size: 13px; font-weight: 750; line-height: 1.2; }
.inline-add small { display: block; margin-top: 2px; font-family: var(--font-display); font-style: italic; font-size: 10.5px; color: var(--muted); }

/* ---------------------------------------------------------------- footer */
.app-footer {
  max-width: 640px;
  margin: 44px auto 0;
  padding-top: 22px;
  border-top: 1.5px dashed var(--line-strong);
  text-align: center;
  color: var(--muted);
}
.footer-yak {
  width: 36px;
  height: 36px;
  margin: 0 auto 10px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--ink);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--muted);
  transform: rotate(3deg);
}
.footer-yak svg { width: 24px; height: 24px; }
.app-footer p { font-size: 11px; line-height: 1.65; }
.app-footer strong { color: var(--ink-soft); font-weight: 700; }
.footer-small { margin-top: 7px; font-size: 8px; letter-spacing: .06em; line-height: 1.7; opacity: .8; }

/* ---------------------------------------------------------------- sheets */
dialog.sheet {
  border: 0;
  padding: 0;
  background: transparent;
  width: min(580px, calc(100% - 24px));
  max-width: none;
  max-height: none;
  margin: auto;
  color: var(--ink);
}
dialog.sheet::backdrop {
  background: var(--overlay);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
dialog.sheet[open] { animation: sheet-in .24s cubic-bezier(.2, .9, .3, 1); }
.sheet-compact { width: min(440px, calc(100% - 24px)); }
@keyframes sheet-in {
  from { opacity: 0; transform: translateY(16px) rotate(-.4deg); }
  to { opacity: 1; transform: none; }
}
.sheet > form,
.sheet-shell {
  display: flex;
  flex-direction: column;
  max-height: min(92dvh, 780px);
  background: var(--surface);
  border: 2px solid var(--ink);
  border-top: 7px solid var(--accent);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 12px 12px 0 rgba(0, 0, 0, .34);
}
.sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 18px 13px;
  border-bottom: 1.5px dashed var(--line-strong);
  flex: none;
}
.sheet-heading { min-width: 0; }
.sheet-heading .card-label { margin-bottom: 4px; }
.sheet-head h2 {
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 600;
  letter-spacing: -.03em;
  line-height: 1.1;
  overflow-wrap: break-word;
}
.sheet-head-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.sheet-body { padding: 18px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.sheet-body::-webkit-scrollbar { width: 6px; }
.sheet-body::-webkit-scrollbar-thumb { border-radius: 99px; background: var(--line-strong); }
.sheet-body::-webkit-scrollbar-track { background: transparent; }
.sheet-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 18px calc(13px + env(safe-area-inset-bottom));
  border-top: 1.5px dashed var(--line-strong);
  background: color-mix(in srgb, var(--surface-2) 45%, var(--surface));
  flex: none;
}
.save-state { font-size: 8px; color: var(--muted); min-width: 50px; text-align: right; letter-spacing: .06em; }
.save-state.is-error { color: var(--red); }

.segmented {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  padding: 5px;
  border: 1.5px solid var(--line-strong);
  border-radius: 13px;
  background: var(--surface-2);
  margin-bottom: 18px;
}
.segmented button {
  border: 1.5px solid transparent;
  border-radius: 9px;
  padding: 9px 3px;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.segmented button:hover { color: var(--ink); border-color: var(--line-strong); }
.segmented button.is-active { border-color: var(--ink); background: var(--ink); color: var(--surface); }
.segmented button[data-status="bought"].is-active { background: var(--green); border-color: var(--green); color: var(--bg); }
.segmented button[data-status="owned"].is-active { background: var(--blue); border-color: var(--blue); color: #fff; }
.segmented button[data-status="skipped"].is-active { background: var(--line-strong); border-color: var(--line-strong); color: var(--ink); }

.field { display: block; margin-bottom: 14px; }
.field > label, .field-label {
  display: block;
  margin-bottom: 5px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
}
.field-note { margin-left: 4px; font-family: var(--font-display); font-size: 10px; font-style: italic; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--line-strong);
  border-radius: 9px;
  background: var(--surface);
  font-size: 16px;
  min-height: 43px;
  -webkit-appearance: none;
  appearance: none;
}
.field textarea { resize: vertical; line-height: 1.5; min-height: 68px; }
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23717b6e' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  background-size: 15px;
  padding-right: 34px;
}
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-grid .field { margin-bottom: 14px; }
.field > .field-help { margin: 6px 0 0; }
.field-help { margin: -5px 0 13px; font-size: 11px; line-height: 1.55; color: var(--muted); }
.form-error { min-height: 16px; margin: 2px 0 0; font-family: var(--font-mono); font-size: 10px; font-weight: 700; color: var(--red); }
.inline-success { min-height: 16px; margin: 2px 0 8px; font-family: var(--font-mono); font-size: 9px; font-weight: 700; letter-spacing: .03em; color: var(--green); }

.stepper { display: flex; align-items: stretch; }
.stepper button {
  width: 42px;
  flex: none;
  border: 1.5px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--ink);
  font-size: 18px;
  line-height: 1;
  padding: 0;
}
.stepper button:first-child { border-radius: 9px 0 0 9px; border-right: 0; }
.stepper button:last-child { border-radius: 0 9px 9px 0; border-left: 0; }
.stepper button:hover { background: var(--line); }
.stepper input { flex: 1; min-width: 0; text-align: center; border-radius: 0; border-left: 0; border-right: 0; -moz-appearance: textfield; appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.money-field { position: relative; }
.money-field > span {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .02em;
  color: var(--muted);
  pointer-events: none;
}
.money-field input { padding-left: 36px; }
.money-field input::-webkit-outer-spin-button, .money-field input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.share-intro { margin-bottom: 13px; font-size: 12.5px; line-height: 1.55; color: var(--muted); }
.share-field { display: flex; gap: 8px; align-items: stretch; }
.share-field input {
  flex: 1;
  min-width: 0;
  padding: 10px 11px;
  border: 1.5px dashed var(--line-strong);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
}
.share-field .btn { flex: none; padding: 8px 14px; font-size: 11.5px; }

.muted-note { font-size: 12px; line-height: 1.5; color: var(--muted); }
.inline-form { display: flex; gap: 8px; align-items: stretch; }
.inline-form input {
  flex: 1;
  min-width: 0;
  padding: 9px 11px;
  border: 1.5px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  font-size: 16px;
  min-height: 42px;
}
.inline-form .btn { width: auto; flex: none; padding-left: 15px; padding-right: 15px; font-size: 11.5px; }

.category-manager { display: grid; margin: 10px 0 2px; }
.category-manage-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--line);
}
.category-manage-row:last-child { border-bottom: 0; }
.category-manage-name { flex: 1; min-width: 0; font-family: var(--font-display); font-size: 14px; font-weight: 600; overflow-wrap: break-word; }
.category-manage-count { flex: none; min-width: 20px; text-align: right; font-family: var(--font-mono); font-size: 9px; color: var(--muted); font-variant-numeric: tabular-nums; }
.category-manage-row .icon-button { width: 30px; height: 30px; border-radius: 8px; }
.category-manage-row .icon-button svg { width: 14px; height: 14px; }

#settings-dialog .sheet-body { counter-reset: section; }
.settings-section { counter-increment: section; padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px dashed var(--line); }
.settings-section:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 2px; }
.settings-section h3 {
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--muted);
}
.settings-section h3::before { content: counter(section, decimal-leading-zero) " / "; color: var(--accent-text); }
.settings-section form { margin: 0; }
.settings-section .btn { width: 100%; }
.settings-section .inline-form .btn { width: auto; }
.settings-danger { padding-top: 2px; }
.share-row { display: flex; flex-wrap: wrap; gap: 8px; }
.share-row .btn { width: auto !important; flex: 1 1 130px; }

/* ---------------------------------------------------------------- converter */
.converter-fab {
  position: fixed;
  right: 20px;
  bottom: calc(20px + env(safe-area-inset-bottom));
  z-index: 35;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 8px;
  border: 1.8px solid var(--ink);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 800;
  box-shadow: 3px 3px 0 var(--ink);
  transform: rotate(-1.5deg);
  transition: transform .15s ease, box-shadow .15s ease;
}
.converter-fab:hover { transform: translate(-1px, -1px) rotate(-1.5deg); box-shadow: 4px 4px 0 var(--ink); }
#home-view:not([hidden]) ~ #converter-button,
#app-view.is-empty-list ~ #converter-button { display: none; }
.fx-badge {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .02em;
}
.converter-pair { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 7px; align-items: end; }
.converter-pair .field { margin-bottom: 14px; }
.converter-pair .field select { font-weight: 600; font-size: 15px; }
.converter-swap {
  width: 38px;
  height: 38px;
  margin-bottom: 21px;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--muted);
}
.converter-swap:hover { color: var(--accent-text); border-color: var(--ink); transform: rotate(180deg); }
.converter-swap svg { width: 17px; height: 17px; }
.converter-result-card {
  margin: 2px 0 14px;
  padding: 13px 14px 12px;
  border: 1.8px solid var(--ink);
  border-radius: 12px;
  background: var(--accent-soft);
  box-shadow: 3px 3px 0 var(--ink);
}
.converter-result-card strong {
  display: block;
  margin-top: 2px;
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: 1.1;
  overflow-wrap: break-word;
  font-variant-numeric: tabular-nums;
}
.converter-result-card .converter-note { display: block; margin-top: 4px; }
.converter-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: -2px 0 14px; }
.converter-chips:empty { display: none; }
.converter-chips button {
  border: 1.5px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink);
  padding: 6px 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
}
.converter-chips button:hover { border-color: var(--ink); background: var(--surface); }
.converter-sync {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: -2px 0 12px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  color: var(--muted);
}
.converter-sync .link-button { flex: none; font-size: 9px; }
.converter-sync .link-button:disabled { opacity: .55; cursor: default; }
.converter-sheet .money-field input { padding-left: 12px; padding-right: 44px; }
.converter-sheet .sheet-foot,
#share-dialog .sheet-foot { justify-content: flex-end; }
.converter-reset {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
}
.converter-reset:hover { background: var(--surface-2); color: var(--ink); }
.converter-reset svg { width: 15px; height: 15px; }
.converter-note { font-size: 10.5px; line-height: 1.55; color: var(--muted); }

/* ---------------------------------------------------------------- toast + confetti */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(92px + env(safe-area-inset-bottom));
  transform: translate(-50%, 10px) rotate(-.5deg);
  z-index: 60;
  max-width: min(90vw, 440px);
  padding: 10px 15px 10px 34px;
  border: 1.5px solid var(--ink);
  border-radius: 8px;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.45;
  box-shadow: 3px 3px 0 color-mix(in srgb, var(--accent) 70%, var(--ink));
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.toast::before {
  content: "✶";
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
  font-size: 14px;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0) rotate(-.5deg); }
.toast.is-error { background: var(--red); color: #fff; border-color: #2a0b04; }
.toast.is-error::before { color: #fff; }

.confetti { position: fixed; inset: 0; z-index: 90; pointer-events: none; overflow: hidden; }
.confetti-piece {
  position: absolute;
  top: -24px;
  left: var(--x);
  width: 9px;
  height: 14px;
  border: 1px solid rgba(0, 0, 0, .3);
  background: var(--c);
  transform: rotate(var(--r));
  animation: confetti-fall var(--d) cubic-bezier(.15, .55, .45, 1) var(--delay) forwards;
  opacity: 0;
}
@keyframes confetti-fall {
  0% { opacity: 1; transform: translate3d(0, 0, 0) rotate(var(--r)); }
  85% { opacity: 1; }
  100% { opacity: 0; transform: translate3d(var(--drift), 108vh, 0) rotate(calc(var(--r) + 620deg)); }
}

/* ---------------------------------------------------------------- boot */
.boot {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 16px;
  background-color: var(--hero-bg);
  background-image: radial-gradient(rgba(251, 243, 226, .1) .8px, transparent .9px);
  background-size: 18px 18px;
  color: var(--hero-muted);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.boot-mark {
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  border: 2px solid var(--hero-ink);
  border-radius: 18px;
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, .4);
  transform: rotate(-4deg);
  animation: boot-bob 1.5s ease-in-out infinite;
}
.boot-mark svg { width: 44px; height: 44px; }
@keyframes boot-bob {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-6px) rotate(2deg); }
}

/* ---------------------------------------------------------------- responsive */
@media (min-width: 700px) {
  .summary-card { grid-template-columns: 1.25fr .85fr; }
  .summary-stats { border-top: 0; border-left: 1.5px dashed var(--line-strong); }
  .summary-main { padding: 21px 24px 18px; }
  .stat { padding: 16px 8px; }
  .item-row { padding: 11px 15px; gap: 11px; }
  .field-grid { gap: 14px; }
}

@media (min-width: 960px) {
  .hero-inner { padding: 0 32px; }
  .content { padding-left: 32px; padding-right: 32px; }
  .pass-wrap { margin-right: 12px; }
}

@media (max-width: 899px) {
  .home-hero { grid-template-columns: 1fr; gap: 30px; padding: 40px 0 48px; }
  .home-hero-copy h1 { max-width: 620px; }
  .pass-wrap { width: min(100%, 460px); margin: 0 auto; }
  .sticker-orbit-b { left: -8px; }
  .sticker-orbit-c { left: auto; right: -10px; }
}

@media (max-width: 699px) {
  .home-hero-copy h1 { font-size: clamp(44px, 12vw, 64px); }
  .project-card { grid-template-columns: 44px minmax(0, 1fr); }
  .project-card-actions {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: space-between;
    border-left: 0;
    border-top: 1.5px dashed var(--line);
    padding: 10px 12px;
  }
  .project-card-actions-row { display: flex; gap: 4px; }
  .project-open { flex: 1; justify-content: center; }
  .summary-numbers { gap: 10px; }
  .summary-vibe { font-size: 13px; }
  .summary-meta { font-size: 8px; }
  .stat strong { font-size: 22px; }
  .list-actions { grid-template-columns: 1fr; }
  dialog.sheet { width: 100%; margin: auto 0 0; }
  .sheet > form, .sheet-shell { border-radius: 20px 20px 0 0; border-bottom: 0; max-height: 92dvh; box-shadow: 0 -6px 40px rgba(0, 0, 0, .3); }
  .pass-wrap { width: calc(100% - 10px); }
  .sticker-orbit { font-size: 7.5px; }
  .sticker-orbit-a { right: 2px; }
  .sticker-orbit-b { left: -2px; top: 46%; }
  .sticker-orbit-c { left: auto; right: -8px; }
  .filter-hint { display: none; }
}

@media (max-width: 639px) {
  .hero-inner { padding: 0 16px; }
  .content { padding: 32px 16px calc(100px + env(safe-area-inset-bottom)); }
  .topbar { padding-top: 14px; }
  .brand-mark { width: 42px; height: 42px; border-radius: 12px; }
  .brand-mark svg { width: 26px; height: 26px; }
  .wordmark { font-size: 21px; }
  .brand-text .eyebrow { font-size: 7.5px; }
  .sticker-inline { display: none; }
  .home-hero { padding-top: 32px; }
  .home-hero-copy h1 { font-size: clamp(42px, 12.5vw, 58px); }
  .home-hero-copy .hero-sub { font-size: 14px; margin-top: 16px; }
  .hero-cta { margin-top: 22px; gap: 14px; }
  .hero-fineprint { margin-top: 14px; }
  .pass-art { height: 176px; }
  .pass-yak { width: 142px; height: 142px; top: 24px; }
  .pass-stamp { width: 62px; height: 62px; font-size: 7px; right: 12px; top: 12px; }
  .pass-route strong { font-size: 23px; }
  .marquee-track { gap: 14px; padding: 7px 0; }
  .marquee-track span { font-size: 9px; }
  .home-head { align-items: flex-start; }
  .home-head h2 { font-size: 30px; }
  .stamp-note { display: none; }
  .project-card-main { padding: 14px 14px; }
  .project-card-main h2 { font-size: 21px; }
  .list-title-block { padding: 28px 0 20px; }
  .list-title-block h1 { font-size: clamp(36px, 10vw, 48px); }
  .list-title-block .hero-sub { font-size: 11.5px; }
  .summary-main { padding: 15px 15px 13px; }
  .summary-numbers strong { font-size: clamp(46px, 14vw, 60px); }
  .summary-cost { font-size: 8.5px; }
  .meter { margin: 16px 11px 0; }
  .summary-stats { border-top: 1.5px dashed var(--line-strong); }
  .stat { padding: 10px 5px; }
  .stat + .stat { border-left: 1px dashed var(--line); }
  .stat strong { font-size: 21px; }
  .stat span { font-size: 7px; letter-spacing: .04em; }
  .toolbar-row .search-field { flex-basis: 100%; }
  .store-filter { flex-basis: 100%; max-width: none; }
  .chip { padding: 7px 10px; font-size: 11.5px; }
  .cat-name { font-size: 18px; white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.12; }
  .cat-meta { font-size: 8.5px; gap: 5px; }
  .cat-index { width: 28px; height: 28px; font-size: 8.5px; }
  .cat-head { padding: 0 9px 0 10px; }
  .cat-add { width: 36px; height: 36px; }
  .cat-toggle { gap: 9px; padding: 12px 3px 11px 0; }
  .item-row { grid-template-columns: 32px minmax(0, 1fr); gap: 8px; padding: 11px; }
  .item-priority { width: 32px; height: 32px; }
  .item-side { grid-column: 1 / -1; justify-content: space-between; gap: 8px; padding-left: 37px; }
  .item-name { font-size: 16px; }
  .item-expected { align-items: flex-start; }
  .expected-label { font-size: 6px; }
  .expected-value { font-size: 10px; }
  .quick { width: 34px; height: 34px; }
  .quick svg { width: 15px; height: 15px; }
  .hero-converter { display: inline-grid; }
  .converter-fab { display: none !important; }
  .empty-home { padding: 40px 18px; }
  .app-footer { margin-top: 34px; }
}

@media (max-width: 420px) {
  .home-hero-copy h1 { font-size: 40px; }
  .hero-cta .btn-big { width: 100%; }
  .hero-cta .text-link { margin-left: 2px; }
  .summary-vibe { font-size: 12px; }
  .summary-copy #resolved-label { font-size: 9.5px; }
  .pass-bottom strong { font-size: 9px; }
  .pass-route strong { font-size: 21px; }
  .pass-art { height: 162px; }
  .pass-yak { width: 128px; height: 128px; top: 22px; }
  .project-card { grid-template-columns: 40px minmax(0, 1fr); }
  .item-side { padding-left: 0; }
  .cat-meta .cat-total { display: none; }
  .field-grid { gap: 9px; }
  .filter-label-row { margin-top: 12px; }
}

@media (max-width: 360px) {
  .brand-text .eyebrow { display: none; }
  .item-expected { display: none; }
  .home-hero-copy h1 { font-size: 37px; }
  .summary-numbers strong { font-size: 44px; }
}

@media (prefers-color-scheme: dark) {
  .sticker-orbit-c { border-color: var(--line-strong); background: var(--blue-soft); color: var(--blue); }
  .store-filter,
  .field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa99c' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .marquee-track { animation: none; }
  .confetti { display: none; }
}
