/* Gift Tracker — styles (mobile first) */
:root {
  --bg: #FBF5F3; --paper: #fff; --soft: #F6EBEC; --soft2: #EFDDE0; --line: #E6DCDA; --ink: #2A2326; --txt2: #625A5E; --txt3: #746A6E;
  --acc: #A94A63; --acc-ink: #A94A63; --on-acc: #fff; --shadow: rgb(60 35 45 / .07); --hero: #F3E2E4;
  --danger: #B3261E; --warn-bg: #FBE7DC; --warn-fg: #8F3A12; --ok: #2E6B3E;
  --st-idea: #ECE8E6; --st-idea-t: #5A5250; --st-tobuy: #FBEBCF; --st-tobuy-t: #7A5310; --st-bought: #DCEAF5; --st-bought-t: #24577E;
  --st-wrapped: #EFE0F0; --st-wrapped-t: #74386F; --st-given: #DDEEDF; --st-given-t: #2E6B3E;
  --r: 16px; --serif: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
.dark {
  --danger: #F2B8B5; --warn-bg: #45281C; --warn-fg: #F6C3A6; --ok: #A8D8B2;
  --st-idea: #3A3536; --st-idea-t: #D8D0D1; --st-tobuy: #4A3B1F; --st-tobuy-t: #F2D49A; --st-bought: #1F3647; --st-bought-t: #A9CDEA;
  --st-wrapped: #3E2840; --st-wrapped-t: #E3B8E0; --st-given: #213A27; --st-given-t: #A8D8B2;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
body.modal-open { overflow: hidden; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
p { margin: 0 0 10px; }
a { color: var(--acc-ink); text-decoration-thickness: 1px; text-underline-offset: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
small { font-size: 12.5px; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; border-radius: 8px; }
.vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--txt2); } .small { font-size: 13px; } .center { text-align: center; } .neg { color: var(--danger) !important; }
.sp { flex: 1; }
[hidden] { display: none !important; }

/* ---------- shell */
.side { display: none; }
.wrap { min-height: 100vh; padding-bottom: calc(78px + var(--safe-b)); }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid transparent; }
@supports not (background: color-mix(in srgb, red 50%, blue)) { .top { background: var(--bg); } }
.top h1 { font: 600 21px/1.2 var(--serif); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-r { display: flex; align-items: center; gap: 4px; }
.top-r .top-add { display: none; }
.brand-m { display: inline-flex; }
.logo { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: var(--acc); color: var(--on-acc); flex: none; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 50; } .skip:focus { top: 8px; }
#main { padding: 8px 16px 24px; max-width: 1120px; margin: 0 auto; outline: none; }
.foot { text-align: center; font-size: 12.5px; color: var(--txt3); padding: 8px 16px 24px; }
.foot a { color: var(--txt2); }
.bnav { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; display: flex; background: var(--paper); border-top: 1px solid var(--line); padding-bottom: var(--safe-b); }
.bnav a, .bnav button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px 9px; font-size: 11px; font-weight: 600; color: var(--txt2); text-decoration: none; background: none; border: 0; cursor: pointer; min-height: 56px; }
.bnav .on { color: var(--acc-ink); }
.bnav .on svg { stroke-width: 2.1; }
.fab { position: fixed; z-index: 31; right: 16px; bottom: calc(70px + var(--safe-b)); width: 56px; height: 56px; border-radius: 18px; border: 0; background: var(--acc); color: var(--on-acc); display: grid; place-items: center; box-shadow: 0 8px 22px var(--shadow), 0 2px 6px rgb(0 0 0 / .18); cursor: pointer; }
body[data-view="shop"] .fab, body[data-view="settings"] .fab, body[data-view="help"] .fab, body[data-view="exchange"] .fab, body[data-view="received"] .fab { display: none; }
@media (min-width: 900px) {
  #app { display: grid; grid-template-columns: 236px 1fr; background: linear-gradient(90deg, var(--paper) 0 235px, var(--line) 235px 236px, transparent 236px); min-height: 100vh; }
  .side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 18px 14px; }
  .brand { display: flex; align-items: center; gap: 10px; font: 600 19px var(--serif); color: var(--ink); text-decoration: none; padding: 4px 6px; }
  .side nav { display: flex; flex-direction: column; gap: 2px; }
  .side nav a { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 11px; color: var(--txt2); text-decoration: none; font-weight: 600; font-size: 14px; }
  .side nav a:hover { background: var(--soft); color: var(--ink); }
  .side nav a.on { background: var(--soft2); color: var(--acc-ink); }
  .brandlink { margin-top: auto; font-size: 12.5px; color: var(--txt3); padding: 6px 10px; }
  .wrap { padding-bottom: 0; }
  .bnav, .fab, .brand-m { display: none; }
  .top { padding: 16px 28px; } .top h1 { font-size: 26px; }
  .top-r .top-add { display: inline-flex; margin-left: 6px; }
  #main { padding: 8px 28px 32px; }
}

/* ---------- basics */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; padding: 9px 15px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font-weight: 600; font-size: 14px; line-height: 1.2; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, transform .05s; }
.btn:hover { border-color: var(--txt3); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--acc); border-color: var(--acc); color: var(--on-acc); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--soft); }
.btn.danger { background: #B3261E; border-color: #B3261E; color: #fff; }
.btn.danger-t { color: var(--danger); }
.btn.sm { min-height: 34px; padding: 6px 11px; font-size: 13px; border-radius: 10px; }
.btn.big { min-height: 52px; padding: 12px 26px; font-size: 16px; border-radius: 14px; }
.btn.wide { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn svg { flex: none; }
.link { background: none; border: 0; padding: 0; color: var(--acc-ink); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; border: 0; background: transparent; color: var(--txt2); cursor: pointer; position: relative; flex: none; text-decoration: none; }
.icon-btn:hover { background: var(--soft); color: var(--ink); }
.icon-btn.sm { width: 32px; height: 32px; border-radius: 9px; }
.badge { position: absolute; top: 4px; right: 3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--acc); color: var(--on-acc); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; box-shadow: 0 1px 2px var(--shadow), 0 6px 18px var(--shadow); margin-bottom: 16px; min-width: 0; }
.card.tight { padding: 6px 12px; }
.c-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.c-head h2 { font: 600 17px var(--serif); display: flex; align-items: center; gap: 8px; }
.more-link { font-size: 13px; font-weight: 600; }
.grid { display: grid; gap: 0 16px; align-items: start; }
@media (min-width: 760px) { .grid { grid-template-columns: 1fr 1fr; } .grid > .ideas { grid-column: 1 / -1; } }
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar > p { margin: 0; flex: 1 1 260px; }
.search-in { flex: 1 1 200px; display: flex; align-items: center; gap: 8px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; min-height: 42px; color: var(--txt3); }
.search-in input { border: 0; outline: 0; background: transparent; flex: 1; min-width: 0; padding: 9px 0; font-size: 16px; color: var(--ink); }
.search-in:focus-within { border-color: var(--acc); box-shadow: 0 0 0 3px var(--soft2); }
.sel-sm { position: relative; display: inline-flex; align-items: center; }
.sel-sm svg { position: absolute; right: 10px; pointer-events: none; color: var(--txt3); }
.sel-sm select { appearance: none; -webkit-appearance: none; min-height: 42px; padding: 8px 32px 8px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); font-weight: 600; font-size: 14px; cursor: pointer; }
.count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; border-radius: 10px; background: var(--acc); color: var(--on-acc); font-size: 11px; }
.tabs { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 10px; margin: 0 -2px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.toolbar .tabs { padding-bottom: 2px; }
.tab { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 13px; border-radius: 99px; border: 1px solid var(--line); background: var(--paper); color: var(--txt2); font-weight: 600; font-size: 13.5px; cursor: pointer; }
.tab span { font-size: 12px; color: var(--txt3); font-weight: 700; }
.tab.on { background: var(--acc); border-color: var(--acc); color: var(--on-acc); }
.tab.on span { color: var(--on-acc); opacity: .85; }
.fchips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.fchip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px 4px 11px; border-radius: 99px; border: 0; background: var(--soft2); color: var(--ink); font-size: 13px; font-weight: 600; cursor: pointer; }
.back { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600; text-decoration: none; margin: 2px 0 12px; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 99px; background: var(--soft2); font-size: 12px; font-weight: 600; color: var(--ink); }
.banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 11px 14px; border-radius: 14px; background: var(--soft); border: 1px solid var(--soft2); margin: 0 16px 12px; font-size: 14px; }
#main .banner { margin: 0 0 14px; }
.banner span { flex: 1 1 200px; }
.banner.warn { background: var(--warn-bg); color: var(--warn-fg); border-color: transparent; }
@media (min-width: 900px) { .banner { margin: 0 28px 12px; } }
.empty { text-align: center; padding: 22px 10px; color: var(--txt2); }
.empty .e-ic { display: inline-grid; place-items: center; width: 60px; height: 60px; border-radius: 20px; background: var(--soft); color: var(--acc-ink); margin-bottom: 10px; }
.empty h3 { font: 600 18px var(--serif); color: var(--ink); margin-bottom: 4px; }
.empty p { max-width: 380px; margin: 0 auto 14px; }
.callout { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; padding: 10px 12px; border-radius: 12px; background: var(--soft); font-size: 13.5px; margin: 6px 0; }
.callout > span { flex: 1 1 200px; }
.callout.warn { background: var(--warn-bg); color: var(--warn-fg); }
.callout.soft { background: transparent; border: 1px dashed var(--line); }
.callout svg { margin-top: 2px; flex: none; }
.warn-t { color: var(--warn-fg); background: var(--warn-bg); padding: 8px 10px; border-radius: 10px; font-size: 13.5px; display: flex; gap: 6px; align-items: center; margin: 10px 0 0; }
.ok-t { color: var(--ok); display: flex; gap: 8px; align-items: center; margin: 0; }
.danger-zone { display: flex; justify-content: center; margin: 8px 0 20px; }
.danger-zone.left { justify-content: flex-start; margin: 10px 0 0; }
.list-foot { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin: 14px 0 6px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }

/* ---------- hero + dashboard */
.hero { background: linear-gradient(135deg, var(--hero), var(--soft)); border-radius: 22px; padding: 20px; margin-bottom: 16px; position: relative; overflow: hidden; border: 1px solid var(--soft2); }
.hero::after { content: ""; position: absolute; right: -40px; top: -40px; width: 170px; height: 170px; border-radius: 50%; border: 22px solid var(--acc); opacity: .07; pointer-events: none; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--txt2); margin-bottom: 4px; }
.hero h2 { font: 600 27px/1.15 var(--serif); margin-bottom: 6px; }
.lead { font-size: 16px; color: var(--ink); }
.lead b { color: var(--acc-ink); }
.qa { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.qa .btn { justify-content: flex-start; }
@media (min-width: 620px) { .qa { display: flex; flex-wrap: wrap; } .hero { padding: 26px 28px; } .hero h2 { font-size: 32px; } }
.start .steps li button { font-size: 15px; }
.steps { margin: 0 0 12px; padding-left: 22px; display: grid; gap: 10px; }
.steps li small { display: block; color: var(--txt2); }
.stats5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.stile { display: flex; flex-direction: column; align-items: center; gap: 0; padding: 10px 2px; border-radius: 13px; border: 0; cursor: pointer; text-decoration: none; min-width: 0; }
.stile b { font: 600 24px/1.1 var(--serif); }
.stile span { font-size: 11.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.bud-row { display: flex; align-items: center; gap: 18px; margin-bottom: 12px; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; margin: 0 0 10px; flex: 1; }
.kv dt { font-size: 12px; color: var(--txt2); font-weight: 600; }
.kv dd { margin: 0; font: 600 18px/1.3 var(--serif); }
.ring { position: relative; width: 84px; height: 84px; flex: none; }
.ring b { position: absolute; inset: 0; display: grid; place-items: center; font: 700 17px var(--serif); }
.ring .r-bg { fill: none; stroke: var(--soft2); stroke-width: 9; }
.ring .r-fg { fill: none; stroke: var(--acc); stroke-width: 9; stroke-linecap: round; transition: stroke-dashoffset .5s; }
.ring.over .r-fg { stroke: var(--danger); }
.bar { position: relative; height: 8px; border-radius: 99px; background: var(--soft2); overflow: hidden; margin: 6px 0; }
.bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; }
.bar .pl { background: var(--acc); opacity: .32; }
.bar .sp { background: var(--acc); }
.bar.over .pl, .bar.over .sp { background: var(--danger); }
.legend { font-size: 12.5px; color: var(--txt2); display: inline-flex; align-items: center; gap: 6px; }
.lg { display: inline-block; width: 12px; height: 8px; border-radius: 4px; background: var(--acc); margin-left: 6px; }
.lg.pl { opacity: .32; }
.yearnav { display: flex; align-items: center; gap: 4px; }
.yearnav h2 { font: 600 22px var(--serif); min-width: 64px; text-align: center; }

/* ---------- status chips */
.chip { display: inline-flex; align-items: center; gap: 3px; padding: 4px 8px 4px 10px; border-radius: 99px; border: 0; font-size: 12px; font-weight: 700; white-space: nowrap; cursor: pointer; line-height: 1.2; }
span.chip { cursor: default; padding-right: 10px; }
.st-idea { background: var(--st-idea); color: var(--st-idea-t); } .st-tobuy { background: var(--st-tobuy); color: var(--st-tobuy-t); }
.st-bought { background: var(--st-bought); color: var(--st-bought-t); } .st-wrapped { background: var(--st-wrapped); color: var(--st-wrapped-t); }
.st-given { background: var(--st-given); color: var(--st-given-t); }

/* ---------- gift rows */
.glist { display: flex; flex-direction: column; }
.gift { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.gift:last-child { border-bottom: 0; }
#gbody .glist, #main > .glist { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 2px 12px; margin-bottom: 14px; box-shadow: 0 1px 2px var(--shadow); }
.g-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 11px; background: none; border: 0; padding: 4px 0; text-align: left; cursor: pointer; }
.g-ph { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; flex: none; }
.g-ic { display: grid; place-items: center; background: var(--soft); color: var(--acc-ink); }
.g-t { min-width: 0; display: flex; flex-direction: column; }
.g-t b { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-t small { color: var(--txt2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hi { color: #C08A1E; display: inline-flex; vertical-align: -1px; }
.g-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.g-pr { font-weight: 700; font-size: 14px; }
.g-pr.est { color: var(--txt2); font-weight: 600; }
.ghead { font: 600 14px var(--sans); color: var(--txt2); margin: 16px 2px 8px; display: flex; gap: 6px; align-items: baseline; }
.ghead small { color: var(--txt3); font-weight: 600; }
.card .ghead:first-child { margin-top: 0; }
.list-sum { text-align: center; }
.ideas-mini { padding: 0; }
.ideas-mini > summary { padding: 12px 16px; cursor: pointer; font-weight: 600; display: flex; gap: 8px; align-items: center; list-style: none; }
.ideas-mini > summary::-webkit-details-marker { display: none; }
.ideas-mini .ideas { box-shadow: none; border: 0; border-top: 1px solid var(--line); border-radius: 0 0 var(--r) var(--r); margin: 0; }
.idea-add { display: flex; gap: 8px; margin-bottom: 10px; }
.idea-add input { flex: 1; min-width: 0; }
.idea-list { list-style: none; margin: 0; padding: 0; }
.idea-list li { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); }
.idea-list li span { flex: 1; min-width: 0; }

/* ---------- occasions */
.occ-list { list-style: none; margin: 0; padding: 0; }
.occ-list li + li { border-top: 1px solid var(--line); }
.occ { display: flex; align-items: center; gap: 12px; padding: 10px 2px; color: var(--ink); text-decoration: none; }
.occ > svg { color: var(--txt3); flex: none; }
.cd { width: 54px; height: 54px; border-radius: 15px; background: var(--soft); color: var(--acc-ink); display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none; line-height: 1; }
.cd b { font: 700 21px var(--serif); } .cd small { font-size: 11px; font-weight: 600; margin-top: 2px; }
.cd.soon { background: var(--acc); color: var(--on-acc); }
.cd.need { background: var(--warn-bg); color: var(--warn-fg); }
.cd.sm { width: 44px; height: 44px; border-radius: 12px; } .cd.sm b { font-size: 17px; }
.cd.dead { background: var(--st-tobuy); color: var(--st-tobuy-t); }
.o-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.o-t b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.o-t small { color: var(--txt2); }
.o-t .bar { margin: 6px 0 2px; height: 6px; }
.o-head, .p-head { display: grid; grid-template-columns: auto 1fr auto; gap: 12px 14px; align-items: center; }
.o-head > .o-ic, .o-ic { width: 52px; height: 52px; border-radius: 16px; background: var(--soft); color: var(--acc-ink); display: grid; place-items: center; flex: none; }
.o-head h2, .p-head h2 { font: 600 24px/1.2 var(--serif); }
.o-head p, .p-head p { margin: 2px 0 0; }
.o-cd { text-align: center; line-height: 1.05; color: var(--acc-ink); }
.o-cd b { display: block; font: 700 34px var(--serif); } .o-cd span { font-size: 12px; font-weight: 600; color: var(--txt2); }
.o-cd.soon b { color: var(--acc-ink); }
.o-head > .callout, .o-meta, .o-notes, .p-act { grid-column: 1 / -1; }
.o-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13.5px; color: var(--txt2); }
.o-meta span { display: inline-flex; align-items: center; gap: 6px; }
.o-meta b { color: var(--ink); }
.o-notes { background: var(--soft); border-radius: 12px; padding: 9px 12px; margin: 0; font-size: 14px; white-space: pre-wrap; }
.p-act { display: flex; gap: 8px; flex-wrap: wrap; }
.p-head .p-t { grid-column: 2 / -1; }
.rgroup { padding: 4px 0 10px; }
.rgroup + .rgroup { border-top: 1px solid var(--line); padding-top: 10px; }
.rg-h { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.rg-h a { color: var(--ink); text-decoration: none; }
.none { margin: 4px 0 0; }
@media (min-width: 600px) { .rgroup .glist, .none { padding-left: 40px; } }
.cal-head { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.cal-head h2 { font: 600 19px var(--serif); flex: 1; text-align: center; }
.cgrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; margin-bottom: 12px; }
.dow { text-align: center; font-size: 11px; font-weight: 700; color: var(--txt3); padding-bottom: 4px; }
.cday { min-height: 48px; border-radius: 10px; background: var(--bg); padding: 3px; overflow: hidden; display: flex; flex-direction: column; gap: 2px; }
.cday.blank { background: transparent; }
.cday .dn { font-size: 12px; font-weight: 600; color: var(--txt2); padding-left: 3px; }
.cday.today { box-shadow: inset 0 0 0 2px var(--acc); }
.cday.today .dn { color: var(--acc-ink); font-weight: 800; }
.cday.has { background: var(--soft); }
.cev { display: block; height: 6px; border-radius: 3px; background: var(--acc); font-size: 0; text-decoration: none; }
.cev.dead { background: var(--st-tobuy-t); opacity: .55; }
.cev span { display: none; }
@media (min-width: 700px) {
  .cday { min-height: 78px; }
  .cev { height: auto; font-size: 11px; line-height: 1.3; padding: 1px 5px; border-radius: 6px; color: var(--on-acc); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .cev span { display: inline; }
  .cev.dead { background: var(--st-tobuy); color: var(--st-tobuy-t); opacity: 1; }
}
.cal-list { border-top: 1px solid var(--line); }

/* ---------- people */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.people .card { margin: 0; }
.pcard { display: flex; gap: 12px; align-items: flex-start; color: var(--ink); text-decoration: none; transition: border-color .15s; }
.pcard:hover { border-color: var(--txt3); }
.pc-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pc-t b { font-size: 16px; font-weight: 600; }
.pc-t small { color: var(--txt2); }
.pc-g { margin-top: 2px; }
.av { border-radius: 50%; object-fit: cover; display: inline-grid; place-items: center; color: #fff; font-weight: 700; flex: none; letter-spacing: .02em; }
.about { margin: 0; display: grid; gap: 10px; }
.about dt { font-size: 12px; font-weight: 700; color: var(--txt2); text-transform: uppercase; letter-spacing: .04em; }
.about dd { margin: 0; white-space: pre-wrap; }

/* ---------- budgets */
.blist { list-style: none; margin: 0; padding: 0; }
.brow { display: grid; grid-template-columns: 1fr auto; gap: 0 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.brow:first-child { border-top: 0; padding-top: 2px; }
.brow .bar { grid-column: 1 / -1; }
.b-l { min-width: 0; display: flex; flex-direction: column; }
.b-l a { color: var(--ink); text-decoration: none; }
.b-l small { color: var(--txt2); }
.b-r { font-weight: 700; font-size: 14px; text-align: right; white-space: nowrap; }

/* ---------- notifications */
.notes { list-style: none; margin: 0; padding: 0; }
.note { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.note:first-child { border-top: 0; }
.n-ic { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--soft); color: var(--acc-ink); flex: none; }
.note.warn .n-ic { background: var(--warn-bg); color: var(--warn-fg); }
.n-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.n-t a, .n-t b { font-weight: 600; color: var(--ink); text-decoration: none; }
.n-t small { color: var(--txt2); }
.m-foot { text-align: center; margin: 14px 0 0; font-size: 14px; }
.more-list { display: flex; flex-direction: column; }
.more-list a { display: flex; align-items: center; gap: 12px; padding: 13px 4px; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600; }
.more-list a:first-child { border-top: 0; }
.more-list a span { flex: 1; }
.more-list a svg:last-child { color: var(--txt3); }

/* ---------- shopping */
.shop-head .tabs { margin-top: 8px; }
.shop-g h2 { font: 600 16px var(--serif); display: flex; align-items: center; gap: 8px; margin: 18px 2px 8px; }
.shop-g h2 small { font: 600 13px var(--sans); color: var(--txt3); }
.shop-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.shop-list li { display: flex; align-items: center; gap: 6px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding-right: 6px; }
.shop-item { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 14px 12px; background: none; border: 0; text-align: left; cursor: pointer; min-height: 62px; }
.box { width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--txt3); flex: none; }
.shop-item:hover .box { border-color: var(--acc); background: var(--soft); }
.s-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.s-t b { font-size: 16px; font-weight: 600; }
.s-t small { color: var(--txt2); }
.s-p { font-weight: 700; }

/* ---------- received + exchange */
.rlist { list-style: none; margin: 0; padding: 0; }
.rlist li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.rlist li:first-child { border-top: 0; }
.rlist li.done .r-main b { color: var(--txt2); }
.r-main { flex: 1; min-width: 0; display: flex; flex-direction: column; text-align: left; background: none; border: 0; padding: 2px 0; cursor: pointer; }
.r-main b { font-weight: 600; } .r-main small { color: var(--txt2); }
.ty input { width: 22px; height: 22px; accent-color: var(--acc); cursor: pointer; margin: 0; }
.plist { list-style: none; margin: 0 0 10px; padding: 0; }
.plist li { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); }
.plist li:first-child { border-top: 0; }
.plist li > span:nth-child(2), .plist li > span:first-child { flex: 1; }
.av-s { width: 30px; height: 30px; border-radius: 50%; background: var(--soft2); color: var(--acc-ink); display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none !important; }
.inline-add { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline-add input, .inline-add select { flex: 1 1 140px; min-width: 0; }
.reveal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin-bottom: 10px; }
.rv { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 52px; padding: 10px; border-radius: 14px; border: 1px solid var(--line); background: var(--soft); font-weight: 600; cursor: pointer; }
.rv.done { background: var(--paper); color: var(--txt2); }
.cta { text-align: center; margin: 4px 0 18px; }
.reveal { text-align: center; padding: 8px 4px; }
.reveal > svg { color: var(--acc-ink); margin-bottom: 6px; }
.reveal h2 { font: 600 22px var(--serif); margin-bottom: 6px; }
.big-name { font-size: 38px !important; color: var(--acc-ink); margin: 4px 0 8px !important; }

/* ---------- search */
.search-big { display: flex; align-items: center; gap: 10px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 0 16px; margin-bottom: 16px; color: var(--txt3); box-shadow: 0 1px 2px var(--shadow); }
.search-big:focus-within { border-color: var(--acc); box-shadow: 0 0 0 3px var(--soft2); }
.search-big input { flex: 1; border: 0; outline: 0; background: transparent; padding: 14px 0; font-size: 17px; color: var(--ink); min-width: 0; }

/* ---------- forms */
.fld { display: block; margin: 0 0 12px; min-width: 0; }
.lbl { display: block; font-size: 13px; font-weight: 600; color: var(--txt2); margin-bottom: 5px; }
.hint { display: block; color: var(--txt3); font-size: 12px; margin-top: 4px; }
.ferr { display: block; color: var(--danger); font-size: 12.5px; font-weight: 600; margin-top: 4px; }
.fld.bad input, .fld.bad select { border-color: var(--danger); }
input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font-size: 16px; outline: none; transition: border-color .15s, box-shadow .15s; }
.search-in input, .search-big input { min-height: 0 !important; border: 0 !important; box-shadow: none !important; padding-left: 0 !important; padding-right: 0 !important; }
input:focus, select:focus, textarea:focus { border-color: var(--acc); box-shadow: 0 0 0 3px var(--soft2); }
input[readonly] { background: var(--soft); }
textarea { resize: vertical; min-height: 64px; }
select { cursor: pointer; }
.dark input[type=date] { color-scheme: dark; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 360px) { .row2 { grid-template-columns: 1fr; } }
.money { position: relative; display: block; }
.money .cur { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--txt3); font-weight: 600; pointer-events: none; }
.money input { padding-left: 30px !important; }
.checks { display: flex; flex-wrap: wrap; gap: 6px; }
.checks.col { flex-direction: column; gap: 8px; margin-bottom: 12px; }
.ck { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.checks .ck { padding: 6px 11px 6px 9px; border: 1px solid var(--line); border-radius: 99px; background: var(--paper); }
.checks.col .ck { border: 0; padding: 2px 0; background: none; }
.checks .ck:has(input:checked) { background: var(--soft2); border-color: var(--acc); }
.ck input { width: 18px; height: 18px; accent-color: var(--acc); margin: 0; flex: none; }
.ck.inline { margin-top: 6px; }
details.more { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; }
details.more > summary { cursor: pointer; font-weight: 600; color: var(--acc-ink); margin-bottom: 10px; }
.ph-pick { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ph-prev { width: 64px; height: 64px; border-radius: 14px; background: var(--soft); color: var(--txt3); display: grid; place-items: center; overflow: hidden; flex: none; }
.ph-prev.round { border-radius: 50%; }
.ph-prev img { width: 100%; height: 100%; object-fit: cover; }
.g-hero { width: 100%; max-height: 220px; object-fit: cover; border-radius: 14px; margin-bottom: 12px; }
.pchips { display: flex; flex-wrap: wrap; gap: 6px; }
.pchip { display: inline-flex; align-items: center; gap: 5px; padding: 6px 11px; border-radius: 99px; border: 1px solid var(--line); background: var(--paper); font-size: 13px; font-weight: 600; cursor: pointer; color: var(--txt2); }
.pchip.on { background: var(--acc); border-color: var(--acc); color: var(--on-acc); }
.rhint:empty { display: none; }
.rhint { margin-top: -6px; margin-bottom: 12px; }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.sw { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px; border-radius: 14px; border: 1px solid var(--line); background: var(--paper); font-size: 12.5px; font-weight: 600; cursor: pointer; }
.sw span { width: 34px; height: 34px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 4px var(--b), 0 0 0 5px var(--line); }
.sw.on { border-color: var(--acc); box-shadow: 0 0 0 2px var(--acc); }
.seg { display: inline-flex; background: var(--soft); border-radius: 12px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; padding: 8px 14px; border-radius: 10px; font-weight: 600; font-size: 14px; cursor: pointer; color: var(--txt2); }
.seg button.on { background: var(--paper); color: var(--ink); box-shadow: 0 1px 3px var(--shadow), 0 1px 2px rgb(0 0 0 / .08); }
.faq { border-top: 1px solid var(--line); }
.faq:first-of-type { border-top: 0; }
.faq summary { cursor: pointer; font-weight: 600; padding: 12px 0; }
.faq div { color: var(--txt2); padding-bottom: 12px; }

/* ---------- modal + toast */
#modal { position: fixed; inset: 0; z-index: 60; background: rgb(20 12 16 / .42); display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--paper); width: 100%; max-width: 580px; max-height: 92vh; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain; border-radius: 22px 22px 0 0; padding: 18px 18px calc(18px + var(--safe-b)); box-shadow: 0 -10px 40px rgb(0 0 0 / .18); animation: up .22s ease-out; outline: none; }
.sheet.small { max-width: 440px; }
.sheet h2 { font: 600 20px var(--serif); }
.sheet > form > h2, .sheet > h2 { margin-bottom: 8px; }
@keyframes up { from { transform: translateY(30px); opacity: .4; } to { transform: none; opacity: 1; } }
@media (min-width: 640px) { #modal { align-items: center; padding: 20px; } .sheet { border-radius: 22px; padding: 22px 24px; } }
@media (min-width: 900px) { #modal:has(.side-sheet) { justify-content: flex-end; align-items: stretch; padding: 0; } .side-sheet { max-width: 420px; max-height: none; height: 100%; border-radius: 0; animation: none; } }
@media (prefers-reduced-motion: reduce) { .sheet { animation: none; } * { transition: none !important; } }
.mhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: -4px -6px 12px 0; }
.actions { display: flex; align-items: center; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.actions.center { justify-content: center; }
.gift-sheet .actions { position: sticky; bottom: calc(-18px - var(--safe-b)); background: var(--paper); padding: 12px 0 4px; margin-bottom: -4px; border-top: 1px solid var(--line); }
.onb { text-align: left; }
.onb h2 { font-size: 24px; margin-bottom: 6px; }
.onb-hero { display: flex; justify-content: center; margin: 6px 0 14px; color: var(--acc-ink); }
.onb-hero .logo { width: 64px; height: 64px; border-radius: 20px; } .onb-hero .logo svg { width: 34px; height: 34px; }
.dots { display: flex; gap: 6px; justify-content: center; margin-bottom: 14px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--soft2); }
.dots i.on { background: var(--acc); width: 22px; border-radius: 4px; }
.choice { display: grid; gap: 10px; margin: 14px 0; }
.choice-b { text-align: left; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--paper); cursor: pointer; display: flex; flex-direction: column; gap: 3px; }
.choice-b:hover { border-color: var(--acc); background: var(--soft); }
.choice-b b { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.choice-b small { color: var(--txt2); }
#toast { position: fixed; z-index: 70; left: 50%; bottom: calc(84px + var(--safe-b)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; max-width: calc(100% - 32px); width: max-content; display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-radius: 14px; background: #2A2326; color: #fff; font-size: 14px; font-weight: 500; box-shadow: 0 10px 30px rgb(0 0 0 / .25); transition: opacity .2s, transform .2s; }
.dark #toast { background: #F3EEF0; color: #19141A; }
#toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.t-act { background: none; border: 0; color: inherit; font-weight: 800; text-decoration: underline; cursor: pointer; padding: 4px; }
@media (min-width: 900px) { #toast { bottom: 24px; } }

/* ---------- print */
#print { display: none; }
@media print {
  body.printing #app, body.printing #modal, body.printing #toast { display: none !important; }
  body.printing #print { display: block; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .pdoc header { border-bottom: 2px solid #000; margin-bottom: 12pt; padding-bottom: 6pt; }
  .pdoc h1 { font: 600 22pt var(--serif); } .pdoc header p { margin: 2pt 0 0; color: #444; }
  .pdoc h2 { font: 600 14pt var(--serif); margin: 14pt 0 6pt; } .pdoc h2 small { font: 10pt var(--sans); color: #555; }
  .pdoc table { width: 100%; border-collapse: collapse; } .pdoc th, .pdoc td { text-align: left; padding: 5pt 6pt; border-bottom: 1px solid #ccc; vertical-align: top; }
  .pdoc th { font-size: 9pt; text-transform: uppercase; color: #555; } .pdoc .n { text-align: right; } .pdoc .ck { width: 18pt; font-size: 13pt; }
  .pdoc small { color: #555; } .pdoc .tot { text-align: right; margin-top: 6pt; } .pdoc footer { margin-top: 20pt; font-size: 9pt; color: #777; text-align: center; }
  tr { break-inside: avoid; }
}
