/* Christmas Wish List — design system
   Mobile-first. Light + dark. Motion respects prefers-reduced-motion. */

@font-face {
    font-family: "Fredoka";
    src: url("/assets/fonts/fredoka-latin.woff2") format("woff2");
    font-weight: 400 700;
    font-display: swap;
}

:root {
    --pine-900: #0b2a20;
    --pine-800: #0f3d2e;
    --pine-700: #145240;
    --pine-500: #1f7a5a;
    --berry: #e0313f;
    --berry-dark: #b81f2d;
    --gold: #f4b63a;
    --gold-soft: #fff1cf;
    --sky: #4f7cff;

    --bg: #fff8f0;
    --bg-tint: #fdebd9;
    --surface: #ffffff;
    --surface-2: #fbf4ea;
    --text: #1f2a24;
    --muted: #66726b;
    --faint: #98a39c;
    --line: #eadfce;
    --ok: #1f8a5b;
    --ok-bg: #e2f5ea;
    --err: #b3261e;
    --err-bg: #fde7e5;
    --focus: #4f7cff;

    --cat-want: #e0313f;
    --cat-need: #1f7a5a;
    --cat-wear: #7b4dff;
    --cat-read: #f08a24;
    --cat-love: #e6a400;

    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 24px;
    --shadow-sm: 0 1px 2px rgba(31, 42, 36, .06);
    --shadow: 0 2px 4px rgba(31, 42, 36, .04), 0 8px 24px rgba(31, 42, 36, .08);
    --shadow-lg: 0 12px 40px rgba(11, 42, 32, .18);
    --display: "Fredoka", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
    --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --ease: cubic-bezier(.2, .8, .2, 1);
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0b1612;
        --bg-tint: #10211a;
        --surface: #13241d;
        --surface-2: #182d24;
        --text: #eef3ef;
        --muted: #a7b6ad;
        --faint: #74857b;
        --line: #24392f;
        --ok: #5fd39a;
        --ok-bg: #143324;
        --err: #ff8a80;
        --err-bg: #3a1714;
        --gold-soft: #3a2f12;
        --berry: #ff5a67;
        --cat-want: #ff5a67;
        --cat-need: #43c08e;
        --cat-wear: #a38bff;
        --cat-read: #ffa14d;
        --cat-love: #ffc94a;
        --shadow: 0 2px 4px rgba(0, 0, 0, .25), 0 8px 24px rgba(0, 0, 0, .3);
        color-scheme: dark;
    }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.5 var(--sans);
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--berry); text-underline-offset: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- header */
.appbar {
    position: relative;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(1200px 300px at 80% -80px, rgba(244, 182, 58, .22), transparent 60%),
        linear-gradient(160deg, var(--pine-700), var(--pine-900));
}
.appbar-inner {
    position: relative;
    z-index: 1;
    max-width: 1120px;
    margin: 0 auto;
    padding: 12px 16px 0;
}
.appbar-top { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.brand {
    display: inline-flex; align-items: center; gap: 10px;
    color: #fff; text-decoration: none;
    font: 600 1.25rem/1 var(--display); letter-spacing: .2px;
}
.brand-mark {
    display: grid; place-items: center;
    width: 36px; height: 36px; border-radius: 12px;
    background: rgba(255, 255, 255, .14);
    font-size: 1.25rem;
}
.countdown {
    margin-left: auto;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    font: 500 .85rem var(--display);
    white-space: nowrap;
}
.me {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 4px 4px 4px 4px; border-radius: 999px;
    color: #fff; text-decoration: none;
}
.me:hover { background: rgba(255, 255, 255, .12); }
.me-name { font-weight: 600; font-size: .9rem; padding-right: 6px; }
@media (max-width: 560px) { .me-name { display: none; } .countdown { font-size: .78rem; } }

.tabs {
    display: flex; gap: 4px;
    margin-top: 12px;
    overflow-x: auto;
    scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
    flex: none;
    padding: 10px 16px 12px;
    border-radius: 14px 14px 0 0;
    color: rgba(255, 255, 255, .78);
    text-decoration: none;
    font: 600 .98rem var(--display);
}
.tab:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.tab[aria-current="page"] { background: var(--bg); color: var(--text); }

/* Snow: two layers of dots drifting down. Static when motion is reduced. */
.snow, .snow::after {
    position: absolute; inset: -200px 0 0; pointer-events: none;
    background-image:
        radial-gradient(2px 2px at 20px 30px, rgba(255,255,255,.8), transparent),
        radial-gradient(2px 2px at 140px 90px, rgba(255,255,255,.6), transparent),
        radial-gradient(3px 3px at 260px 40px, rgba(255,255,255,.7), transparent),
        radial-gradient(2px 2px at 330px 150px, rgba(255,255,255,.5), transparent),
        radial-gradient(2px 2px at 90px 170px, rgba(255,255,255,.6), transparent);
    background-size: 380px 200px;
    animation: snow 14s linear infinite;
    opacity: .7;
}
.snow::after { content: ""; inset: 0; background-size: 260px 160px; animation-duration: 22s; opacity: .5; }
@keyframes snow { to { transform: translateY(200px); } }
@media (prefers-reduced-motion: reduce) { .snow, .snow::after { animation: none; } }

/* ---------------------------------------------------------------- layout */
main { flex: 1; width: 100%; max-width: 1120px; margin: 0 auto; padding: 20px 16px 96px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; margin: 4px 0 18px; }
.page-head h1 { margin: 0; font: 600 clamp(1.6rem, 4.5vw, 2.3rem)/1.15 var(--display); }
.page-head .sub { margin: 4px 0 0; color: var(--muted); }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.footer { padding: 24px 16px; color: var(--faint); font-size: .85rem; text-align: center; }

/* ---------------------------------------------------------------- buttons */
.btn {
    --btn-bg: var(--surface); --btn-fg: var(--text); --btn-line: var(--line);
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px; padding: 10px 18px;
    border: 1.5px solid var(--btn-line); border-radius: 999px;
    background: var(--btn-bg); color: var(--btn-fg);
    font: 600 .98rem/1 var(--display); letter-spacing: .2px;
    text-decoration: none; cursor: pointer;
    transition: transform .15s var(--ease), background .15s, box-shadow .15s;
    -webkit-tap-highlight-color: transparent;
}
.btn:hover { box-shadow: var(--shadow-sm); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { --btn-bg: var(--berry); --btn-fg: #fff; --btn-line: transparent; box-shadow: 0 4px 14px rgba(224, 49, 63, .3); }
.btn-primary:hover { --btn-bg: var(--berry-dark); }
.btn-green { --btn-bg: var(--pine-500); --btn-fg: #fff; --btn-line: transparent; }
.btn-gold { --btn-bg: var(--gold); --btn-fg: #3a2a00; --btn-line: transparent; }
.btn-ghost { --btn-bg: transparent; }
.btn-quiet { --btn-bg: transparent; --btn-line: transparent; color: var(--muted); }
.btn-danger { --btn-bg: transparent; --btn-fg: var(--err); --btn-line: transparent; }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: .88rem; }
.btn-block { width: 100%; }
.icon-btn {
    display: inline-grid; place-items: center;
    width: 40px; height: 40px; border: 0; border-radius: 12px;
    background: transparent; color: var(--muted); cursor: pointer; font-size: 1.15rem;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

/* ---------------------------------------------------------------- forms */
.field { display: grid; gap: 6px; }
.field > span { font-weight: 600; font-size: .92rem; }
.field small { color: var(--muted); font-size: .82rem; }
.input, input[type="text"], input[type="email"], input[type="password"], input[type="url"], input[type="number"], input[type="search"], textarea, select {
    width: 100%; min-height: 46px; padding: 11px 14px;
    border: 1.5px solid var(--line); border-radius: 14px;
    background: var(--surface); color: var(--text);
    transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 84px; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 4px rgba(79, 124, 255, .18); }
.check { display: flex; align-items: center; gap: 10px; font-weight: 500; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--berry); }
.stack { display: grid; gap: 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ---------------------------------------------------------------- notices & toasts */
.notice { margin: 0 0 16px; padding: 12px 16px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.notice-ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; font-weight: 500; }
.notice-error { background: var(--err-bg); color: var(--err); border-color: transparent; font-weight: 500; }
.toasts { position: fixed; z-index: 50; left: 50%; bottom: 20px; transform: translateX(-50%); display: grid; gap: 8px; width: min(92vw, 420px); }
.toast {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px 12px 18px; border-radius: 16px;
    background: #1d2a23; color: #fff; box-shadow: var(--shadow-lg);
    animation: toast-in .25s var(--ease);
}
.toast button { margin-left: auto; padding: 6px 12px; border: 0; border-radius: 999px; background: rgba(255,255,255,.14); color: #fff; font-weight: 600; cursor: pointer; }
.toast-error { background: var(--err); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

/* ---------------------------------------------------------------- cards & panels */
.panel { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); }
.panel h2 { margin: 0 0 6px; font: 600 1.25rem var(--display); }
.muted { color: var(--muted); }
.small { font-size: .88rem; }

.hello {
    display: grid; grid-template-columns: 1fr; gap: 14px;
    padding: 18px; margin-bottom: 18px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--gold-soft), var(--surface));
    border: 1px solid var(--line);
}
.hello h1 { margin: 0; font: 600 clamp(1.5rem, 5vw, 2.1rem)/1.15 var(--display); }
.hello p { margin: 2px 0 0; color: var(--muted); }
.hello .stats { display: flex; gap: 8px; flex-wrap: wrap; }
.stat { padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font: 500 .88rem var(--display); }
.stat-ready { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
@media (min-width: 760px) { .hello { grid-template-columns: 1fr auto; align-items: center; padding: 22px 26px; } }
@media (max-width: 559px) {
    .hello { gap: 8px; padding: 14px 16px; margin-bottom: 14px; }
    .hello p { display: none; }
    .hello .stat { padding: 4px 10px; font-size: .82rem; }
    .adder-hint { display: none; }
}

/* ---------------------------------------------------------------- add bar */
.adder {
    margin-bottom: 22px; padding: 10px;
    border-radius: var(--radius-lg); background: var(--surface);
    border: 1.5px solid var(--line); box-shadow: var(--shadow);
}
.adder form { display: flex; gap: 8px; }
@media (min-width: 900px) and (min-height: 700px) { .adder { position: sticky; top: 8px; z-index: 5; } }
.adder input[type="text"] { border: 0; min-height: 50px; font-size: 1.05rem; background: transparent; box-shadow: none; }
.adder input[type="text"]:focus { box-shadow: none; }
.adder .btn { min-height: 50px; padding-inline: 20px; }
.adder-cats { display: flex; gap: 6px; padding: 8px 4px 2px; overflow-x: auto; scrollbar-width: none; }
.chip {
    flex: none; display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 12px; border-radius: 999px;
    border: 1.5px solid var(--line); background: var(--surface);
    font: 500 .9rem var(--display); cursor: pointer;
}
.chip[aria-pressed="true"] { border-color: var(--chip, var(--berry)); background: color-mix(in srgb, var(--chip, var(--berry)) 14%, var(--surface)); }
.adder-preview { display: flex; gap: 12px; align-items: center; margin: 8px 4px 2px; padding: 10px; border-radius: 14px; background: var(--surface-2); }
.adder-preview img, .adder-preview .ph { width: 56px; height: 56px; border-radius: 12px; object-fit: contain; background: #fff; flex: none; }
.adder-preview .t { font-weight: 600; line-height: 1.3; }
.adder-preview .pill { background: var(--surface); }
.adder-preview .guess { display: block; margin-top: 4px; font-size: .8rem; color: var(--muted); }
.adder-hint { margin: 6px 6px 0; color: var(--muted); font-size: .84rem; }
.spinner { width: 18px; height: 18px; border: 2.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- categories & items */
.cat { margin: 0 0 28px; }
.cat-head { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; }
.cat-icon {
    display: grid; place-items: center; width: 40px; height: 40px; flex: none;
    border-radius: 13px; font-size: 1.3rem;
    background: color-mix(in srgb, var(--c) 16%, var(--surface));
}
.cat-head h2 { margin: 0; font: 600 1.25rem/1.2 var(--display); }
.cat-head p { margin: 0; color: var(--muted); font-size: .86rem; }
.count { margin-left: auto; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font: 600 .82rem var(--display); }
.items { display: grid; gap: 12px; grid-template-columns: 1fr; list-style: none; margin: 0; padding: 0; }
@media (min-width: 680px) { .items { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1020px) { .items { grid-template-columns: 1fr 1fr 1fr; } }

.item {
    position: relative;
    display: grid; grid-template-columns: 72px 1fr; gap: 12px; align-items: start;
    padding: 12px; border-radius: var(--radius);
    background: var(--surface); border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    transition: transform .2s var(--ease), box-shadow .2s;
    animation: pop .3s var(--ease);
}
.item:hover { box-shadow: var(--shadow); }
@keyframes pop { from { opacity: 0; transform: scale(.97); } }
.item-thumb {
    width: 72px; height: 72px; border-radius: 12px; overflow: hidden;
    display: grid; place-items: center; font-size: 1.9rem;
    background: color-mix(in srgb, var(--c) 12%, var(--surface));
}
.item-thumb img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.item-body { min-width: 0; padding-right: 32px; }
.item-title { margin: 2px 0 4px; font: 600 1.02rem/1.3 var(--display); overflow-wrap: anywhere;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .82rem; color: var(--muted); }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); font-weight: 600; color: var(--text); text-decoration: none; }
a.pill:hover { background: var(--bg-tint); }
.price { color: var(--ok); font-weight: 700; }
.item-notes { margin: 6px 0 0; font-size: .86rem; color: var(--muted); overflow-wrap: anywhere; white-space: pre-line;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.star {
    position: absolute; top: 6px; right: 6px;
    width: 38px; height: 38px; border: 0; border-radius: 12px;
    background: transparent; cursor: pointer; font-size: 1.25rem; line-height: 1;
    filter: grayscale(1); opacity: .45; transition: transform .2s var(--ease), opacity .2s, filter .2s;
}
.star:hover { opacity: .8; }
.star[aria-pressed="true"] { filter: none; opacity: 1; }
.star[aria-pressed="true"]:active, .star.bump { transform: scale(1.3) rotate(12deg); }
.item.starred { border-color: color-mix(in srgb, var(--gold) 70%, var(--line)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 22%, transparent); }
.item-open { position: absolute; inset: 0; border: 0; background: transparent; cursor: pointer; border-radius: var(--radius); }
.item-open:focus-visible { outline-offset: -3px; }
.item .star, .item a { position: relative; z-index: 1; }
.item .star { position: absolute; }

.empty-slot {
    display: flex; align-items: center; gap: 12px; width: 100%;
    padding: 16px; border-radius: var(--radius);
    border: 2px dashed var(--line); background: transparent;
    color: var(--muted); font: 500 .98rem var(--display); cursor: pointer; text-align: left;
}
.empty-slot:hover { border-color: var(--c); color: var(--text); }
.empty-slot b { font-size: 1.4rem; }

/* ---------------------------------------------------------------- dialog / sheet */
dialog {
    width: min(560px, 100vw); max-height: min(92dvh, 900px);
    padding: 0; border: 0; border-radius: var(--radius-lg);
    background: var(--surface); color: var(--text);
    box-shadow: var(--shadow-lg);
}
dialog::backdrop { background: rgba(8, 20, 15, .55); backdrop-filter: blur(3px); }
dialog[open] { animation: sheet-in .28s var(--ease); }
@keyframes sheet-in { from { opacity: 0; transform: translateY(24px); } }
@media (max-width: 600px) {
    dialog { margin: auto 0 0; width: 100vw; max-width: 100vw; border-radius: 24px 24px 0 0; }
}
.sheet-head { display: flex; align-items: center; gap: 10px; padding: 16px 16px 8px 20px; }
.sheet-head h2 { margin: 0; font: 600 1.3rem var(--display); }
.sheet-head .icon-btn { margin-left: auto; }
.sheet-body { padding: 8px 20px 20px; display: grid; gap: 14px; overflow-y: auto; }
.sheet-foot { display: flex; gap: 8px; align-items: center; padding: 12px 20px 20px; border-top: 1px solid var(--line); }
.sheet-foot .grow { margin-left: auto; }
.cat-picker { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------------------------------------------------------------- shopping */
.person { margin: 0 0 18px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); overflow: hidden; }
.person > summary { display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; list-style: none; }
.person > summary::-webkit-details-marker { display: none; }
.person > summary h2 { margin: 0; font: 600 1.3rem var(--display); }
.person .progress { margin-left: auto; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.person-body { padding: 0 16px 16px; }
.person-body .cat { margin-bottom: 18px; }
.person-body .cat-head h3 { margin: 0; font: 600 1.05rem var(--display); }
.person-body .cat-icon { width: 32px; height: 32px; font-size: 1.05rem; border-radius: 10px; }
.avatar {
    display: grid; place-items: center; flex: none;
    width: 44px; height: 44px; border-radius: 50%;
    color: #fff; font: 600 1.15rem var(--display);
    background: hsl(var(--h, 150) 55% 42%);
}
.avatar-sm { width: 32px; height: 32px; font-size: .95rem; }
.badge { padding: 3px 10px; border-radius: 999px; font: 600 .78rem var(--display); background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.badge-ready { background: var(--ok-bg); color: var(--ok); }
.claim-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 8px; position: relative; z-index: 1; }
.claim-state { font-size: .82rem; font-weight: 600; }
.claim-mine { color: var(--sky); }
.claim-bought { color: var(--ok); }
.item.taken { opacity: .6; }
.item.taken .item-title { text-decoration: line-through; text-decoration-color: var(--faint); }
.item.mine { border-color: color-mix(in srgb, var(--sky) 55%, var(--line)); }
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.summary-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; padding: 12px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }

/* ---------------------------------------------------------------- auth pages */
.auth-wrap { display: grid; place-items: center; padding: 24px 0; }
.auth-card { width: min(440px, 100%); padding: 28px 24px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.auth-card h1 { margin: 0 0 4px; font: 600 1.8rem/1.2 var(--display); text-align: center; }
.auth-card .lede { margin: 0 0 18px; color: var(--muted); text-align: center; }
.auth-emoji { display: block; margin: 0 auto 10px; font-size: 2.6rem; text-align: center; }
.divider { display: flex; align-items: center; gap: 10px; margin: 18px 0; color: var(--faint); font-size: .85rem; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.code-input { font: 600 1.9rem/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .4em; text-align: center; }
.linklike { padding: 0; border: 0; background: none; color: var(--berry); font: inherit; text-decoration: underline; cursor: pointer; }
.account-grid { display: grid; gap: 16px; }
@media (min-width: 860px) { .account-grid { grid-template-columns: 1fr 1fr; } }

/* ---------------------------------------------------------------- import page */
.bookmarklet {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 20px; border-radius: 999px;
    background: var(--berry); color: #fff; text-decoration: none;
    font: 600 1.05rem var(--display); cursor: grab;
    box-shadow: 0 4px 14px rgba(224, 49, 63, .3);
}
.steps { margin: 0; padding-left: 1.3em; display: grid; gap: 8px; }
.how-grid { display: grid; gap: 16px; }
@media (min-width: 860px) { .how-grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------------------------------------------------------------- share page */
.share-hero { text-align: center; margin: 8px 0 22px; }
.share-hero h1 { margin: 6px 0 4px; font: 600 clamp(1.7rem, 5.5vw, 2.6rem)/1.15 var(--display); }

/* ---------------------------------------------------------------- print */
@media print {
    :root { --bg: #fff; --surface: #fff; --text: #000; --muted: #444; --line: #bbb; }
    body { font-size: 11pt; }
    .appbar, .tabs, .adder, .filters, .footer, .no-print, .claim-row .btn, .star, .toasts { display: none !important; }
    main { padding: 0; max-width: none; }
    .person, .item, .panel { box-shadow: none !important; break-inside: avoid; }
    .person[open] > summary, .person > summary { padding: 6px 0; }
    details.person > .person-body { display: block !important; }
    .items { grid-template-columns: 1fr 1fr !important; gap: 6px; }
    .item { grid-template-columns: 44px 1fr; padding: 6px; animation: none; }
    .item-thumb { width: 44px; height: 44px; }
    .item-title { -webkit-line-clamp: unset; }
    .item.taken { opacity: 1; }
    a.pill::after { content: " " attr(data-short); font-weight: 400; }
    .print-check::before { content: "☐ "; font-size: 1.2em; }
}

/* radio/checkbox chips (no-JS forms) */
.chip:has(input:checked) { border-color: var(--chip, var(--berry)); background: color-mix(in srgb, var(--chip, var(--berry)) 14%, var(--surface)); }
.chip input { margin: 0; }
kbd { padding: 1px 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; font: 600 .8em ui-monospace, monospace; background: var(--surface-2); }

/* admin */
.admin-actions { display: grid; gap: 16px; }
@media (min-width: 760px) { .admin-actions { grid-template-columns: 1.4fr 1fr; } }
.people .person > summary h2 { font-size: 1.15rem; }
.people .item-meta { margin-top: 2px; }
.panel.stack { align-content: start; }

/* list switcher */
.list-switcher { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0 0 14px; }
.list-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 14px; border-radius: 999px;
    border: 1.5px solid var(--line); background: var(--surface); color: var(--text);
    font: 600 .92rem var(--display); text-decoration: none; cursor: pointer; list-style: none;
}
.list-chip:hover { border-color: var(--faint); }
.list-chip[aria-current="page"] { background: var(--pine-700); border-color: var(--pine-700); color: #fff; }
.list-chip .n { padding: 0 7px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: .78rem; }
.list-new { border-style: dashed; color: var(--muted); }
.past-lists { display: contents; }
.past-lists > summary::-webkit-details-marker { display: none; }
.past-lists[open] > div { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
.layout-pick { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; }
.layout-opt { position: relative; display: grid; gap: 2px; padding: 12px; border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer; }
.layout-opt:has(input:checked) { border-color: var(--berry); background: color-mix(in srgb, var(--berry) 8%, var(--surface)); }
.layout-opt input { position: absolute; opacity: 0; }
.layout-opt small { color: var(--muted); }
.list-head { display: flex; align-items: center; gap: 10px; margin: 6px 0 12px; }
.list-head h3 { margin: 0; font: 600 1.15rem var(--display); }
.shop-list + .shop-list { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line); }
.person-body .cat-head h4 { margin: 0; font: 600 1rem var(--display); }
