/* DayZ Guide — calm, photo-led, big friendly tap targets. */

/* ───────── fonts (self-hosted, SIL OFL) ───────── */
@font-face { font-family: "Figtree"; font-weight: 400; font-display: swap; src: url(../fonts/figtree-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 500; font-display: swap; src: url(../fonts/figtree-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 600; font-display: swap; src: url(../fonts/figtree-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 700; font-display: swap; src: url(../fonts/figtree-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Fraunces"; font-weight: 600; font-display: swap; src: url(../fonts/fraunces-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Fraunces"; font-weight: 700; font-display: swap; src: url(../fonts/fraunces-latin-700-normal.woff2) format("woff2"); }

/* ───────── tokens ───────── */
:root {
  --accent: #e0a43a;
  --on-accent: #231a05;
  --bg: #111511;
  --bg2: #0c0f0c;
  --surface: #1a201b;
  --raised: #232b24;
  --line: #2f382f;
  --line-soft: #262e27;
  --text: #eceee4;
  --muted: #9aa190;
  --ok: #7fcf8f;
  --on-ok: #08210f;
  --warn: #e6b04a;
  --bad: #ef7a64;
  --info: #7ab8dc;
  --accent-ink: var(--accent);
  --shadow: 0 1px 0 rgb(255 255 255 / .03) inset, 0 12px 32px -14px rgb(0 0 0 / .7);
  --r: 20px;
  --r-sm: 12px;
  --font: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f4efe4; --bg2: #ebe5d6; --surface: #fffdf8; --raised: #f8f4ea; --line: #e0d8c4; --line-soft: #ebe5d4;
  --text: #1f261d; --muted: #666b5a; --ok: #3a8a4d; --on-ok: #fff; --warn: #a96d0a; --bad: #c0412c; --info: #2a729f;
  --accent-ink: color-mix(in oklab, var(--accent) 62%, #000);
  --shadow: 0 1px 2px rgb(70 55 20 / .06), 0 14px 30px -16px rgb(70 55 20 / .28);
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f4efe4; --bg2: #ebe5d6; --surface: #fffdf8; --raised: #f8f4ea; --line: #e0d8c4; --line-soft: #ebe5d4;
    --text: #1f261d; --muted: #666b5a; --ok: #3a8a4d; --on-ok: #fff; --warn: #a96d0a; --bad: #c0412c; --info: #2a729f;
    --accent-ink: color-mix(in oklab, var(--accent) 62%, #000);
    --shadow: 0 1px 2px rgb(70 55 20 / .06), 0 14px 30px -16px rgb(70 55 20 / .28);
    color-scheme: light;
  }
}

/* ───────── base ───────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 90px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.55 var(--font); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; min-height: 100dvh; }
h1, h2, h3, h4, p, ul, ol { margin: 0; }
h1 { font: 700 clamp(30px, 4.4vw, 44px)/1.1 var(--display); letter-spacing: -.01em; }
h2 { font-size: 20px; line-height: 1.25; font-weight: 700; }
h3 { font-size: 17px; font-weight: 650; line-height: 1.3; }
a { color: var(--accent-ink); text-underline-offset: 3px; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid color-mix(in oklab, var(--accent) 70%, transparent); outline-offset: 2px; border-radius: 8px; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 12px; top: 12px; z-index: 99; background: var(--accent); color: var(--on-accent); padding: 8px 12px; border-radius: 8px; }
.boot { padding: 40px; color: var(--muted); }
.muted { color: var(--muted); } .small { font-size: 14px; } .center { text-align: center; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.ico { display: inline-flex; flex: none; width: var(--s); height: var(--s); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--dot, var(--accent)); flex: none; display: inline-block; }
.dot.big { width: 11px; height: 11px; background: var(--a, var(--accent)); }
kbd { font: 11px var(--mono); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; color: var(--muted); }
.link { background: none; border: 0; padding: 2px 0; color: var(--accent-ink); font-weight: 600; font-size: 14.5px; text-decoration: none; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ───────── header ───────── */
.top { position: sticky; top: 0; z-index: 30; background: var(--bg); border-bottom: 1px solid var(--line-soft); }
.top-in { max-width: 1120px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--text); font: 700 20px var(--display); }
.mark { display: grid; place-items: center; color: var(--accent); }
.switcher { position: relative; }
.wiki-btn { display: flex; align-items: center; gap: 8px; padding: 6px 13px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 14.5px; font-weight: 600; }
.wiki-btn:disabled { cursor: default; }
.wiki-btn:not(:disabled):hover { border-color: var(--muted); }
.pop { position: absolute; top: calc(100% + 8px); left: 0; min-width: 310px; list-style: none; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; z-index: 40; box-shadow: var(--shadow); }
.pop[hidden] { display: none; }
.pop a { display: flex; gap: 12px; align-items: flex-start; padding: 11px 13px; border-radius: 12px; text-decoration: none; color: var(--text); }
.pop a:hover, .pop [aria-selected="true"] a { background: var(--raised); }
.pop small { display: block; color: var(--muted); font-size: 13.5px; line-height: 1.35; margin-top: 2px; }
.nav { display: flex; gap: 2px; margin-left: 4px; }
.nav a { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 15px; position: relative; }
.nav a:hover { color: var(--text); background: var(--surface); }
.nav a.on { color: var(--text); background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.count { font-style: normal; font-size: 12px; font-weight: 700; background: var(--accent); color: var(--on-accent); border-radius: 999px; padding: 0 7px; line-height: 19px; }
.top-r { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.search-btn { display: flex; align-items: center; gap: 9px; padding: 8px 12px 8px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; color: var(--muted); min-width: 200px; font-size: 15px; }
.search-btn:hover { border-color: var(--muted); color: var(--text); }
.search-btn kbd { margin-left: auto; }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: transparent; border: 1px solid transparent; color: var(--muted); }
.icon-btn:hover { background: var(--surface); color: var(--text); border-color: var(--line); }

/* ───────── layout ───────── */
.shell { min-height: 100dvh; display: flex; flex-direction: column; }
main { flex: 1; outline: none; }
.page { max-width: 1120px; margin: 0 auto; padding: 28px 20px 96px; display: grid; gap: 28px; align-content: start; }
.page > *, .choose > *, .gather > * { min-width: 0; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.lede { color: var(--muted); font-size: 17px; max-width: 60ch; margin-top: 8px; }
.step-head { display: grid; gap: 4px; }
.foot { border-top: 1px solid var(--line-soft); padding: 24px 20px 40px; color: var(--muted); font-size: 14px; }
.foot > div { max-width: 1120px; margin: 0 auto; display: grid; gap: 4px; }
.section-title { display: flex; align-items: baseline; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.section-title h2 { font: 700 26px var(--display); }
.section-title p { color: var(--muted); }

/* ───────── buttons ───────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 999px; font-weight: 650; font-size: 15px; background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none; transition: background .12s, border-color .12s, transform .08s, box-shadow .12s; white-space: nowrap; }
.btn:hover { border-color: var(--muted); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--accent); color: var(--on-accent); border-color: transparent; box-shadow: 0 10px 24px -10px var(--accent); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; }
.btn.light { background: rgb(255 255 255 / .16); border-color: rgb(255 255 255 / .45); color: #fff; backdrop-filter: blur(6px); }
.btn.light:hover { background: rgb(255 255 255 / .26); }
.btn.danger:hover { color: var(--bad); border-color: var(--bad); }
.btn.sm { padding: 6px 13px; font-size: 14px; }
.btn.lg { padding: 13px 24px; font-size: 16px; }
.btn.xl { padding: 16px 30px; font-size: 18px; }

/* ───────── home ───────── */
.hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 28px; flex-wrap: wrap; padding: 8px 0 4px; }
.hero.has-img { min-height: 480px; padding: 48px; border-radius: 28px; color: #fff; box-shadow: var(--shadow); background: linear-gradient(0deg, rgb(8 10 6 / .82) 0%, rgb(8 10 6 / .3) 55%, rgb(8 10 6 / .05) 100%), linear-gradient(90deg, rgb(8 10 6 / .6) 0%, rgb(8 10 6 / 0) 70%), var(--hero) center / cover no-repeat; }
.hero h1 { font-size: clamp(38px, 6vw, 68px); line-height: 1.04; }
.hero .lede { font-size: 19px; margin: 16px 0 28px; color: inherit; opacity: .92; }
.hero:not(.has-img) .lede { color: var(--muted); opacity: 1; }
.eyebrow { display: inline-block; font-size: 13.5px; font-weight: 700; margin-bottom: 14px; padding: 4px 12px; border-radius: 999px; background: color-mix(in oklab, var(--accent) 20%, transparent); color: var(--accent-ink); }
.has-img .eyebrow { background: rgb(255 255 255 / .16); color: #fff; backdrop-filter: blur(6px); }
.source { font-size: 14px; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.resume { display: grid; gap: 8px; min-width: 260px; padding: 18px 20px; border-radius: var(--r); background: var(--surface); color: var(--text); text-decoration: none; box-shadow: var(--shadow); }
.resume small { color: var(--muted); font-size: 13.5px; font-weight: 600; }
.resume b { font-size: 17px; }
.resume span { color: var(--muted); font-size: 14px; }
.resume .bar { max-width: none; margin: 0; }
.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.how-step { padding: 22px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line-soft); display: grid; gap: 6px; align-content: start; }
.how-n { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-weight: 700; margin-bottom: 6px; }
.how-step h3 { font: 700 22px var(--display); }
.how-step p { color: var(--muted); }
.facts { display: flex; flex-wrap: wrap; gap: 14px 40px; padding: 22px 26px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line-soft); }
.fact { display: grid; gap: 0; }
.fact b { font: 700 32px/1.1 var(--display); color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.fact span { font-size: 14px; color: var(--muted); max-width: 22ch; line-height: 1.35; margin-top: 2px; }
.fact small { display: none; }

/* ───────── cards ───────── */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.cards.one { grid-template-columns: 1fr; }
.cards.recipes { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.rail { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.grid-head { grid-column: 1 / -1; font: 700 24px var(--display); margin-top: 12px; }
.grid-head:first-child { margin-top: 0; }
.card { display: grid; align-content: start; gap: 6px; text-align: left; padding: 0 0 18px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r); color: var(--text); text-decoration: none; overflow: hidden; box-shadow: var(--shadow); transition: transform .15s, border-color .15s; position: relative; }
.card > :not(.card-img) { margin-inline: 18px; }
.card > h3 { margin-top: 12px; }
a.card:hover, button.card:hover { transform: translateY(-3px); border-color: var(--line); }
.card p { color: var(--muted); font-size: 14.5px; line-height: 1.45; }
.card .card-meta { font-size: 13.5px; margin-top: 4px; color: var(--accent-ink); font-weight: 600; }
.card-img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--bg2); }
.card-foot { margin-top: auto; padding-top: 2px; display: inline-flex; align-items: center; gap: 4px; font-size: 15px; font-weight: 650; color: var(--accent-ink); }
.card.project h3 { font-size: 18px; }
.card.recipe { padding: 0; gap: 0; }
.card.recipe > * { margin-inline: 0; }
.card-main { all: unset; box-sizing: border-box; cursor: pointer; display: grid; gap: 8px; padding: 0 0 12px; }
.card-main > :not(.card-img) { margin-inline: 18px; }
.card-main > h3 { margin-top: 12px; }
.card-main:focus-visible { outline: 3px solid color-mix(in oklab, var(--accent) 70%, transparent); outline-offset: -3px; }
.card-tools { display: flex; gap: 6px; align-items: center; color: var(--muted); font-size: 14px; }
.card-actions { display: flex; gap: 8px; padding: 0 18px; }
.g-ico, .tile { display: none; }
.thumb { flex: none; width: 60px; height: 44px; object-fit: cover; border-radius: 10px; background: var(--bg2); }
.sheet-img, .lead-img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-sm); background: var(--bg2); }
.lead-img { max-height: 400px; border-radius: var(--r); }

/* ───────── chips / badges ───────── */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px 3px 9px; border-radius: 999px; background: var(--raised); font-size: 14px; color: var(--text); white-space: nowrap; }
.chip b { font-variant-numeric: tabular-nums; }
.chip.tool { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.chip.kit { color: var(--accent-ink); background: color-mix(in oklab, var(--accent) 16%, transparent); }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 650; padding: 3px 11px; border-radius: 999px; }
.badge.community { color: var(--warn); background: color-mix(in oklab, var(--warn) 15%, transparent); }

/* ───────── toolbar / filters / inputs ───────── */
.toolbar { display: grid; gap: 14px; }
.search-input { width: 100%; padding: 13px 18px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); outline: none; font-size: 16px; }
.search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 22%, transparent); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filter { padding: 8px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-soft); color: var(--muted); font-size: 15px; font-weight: 600; }
.filter:hover { color: var(--text); border-color: var(--line); }
.filter.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.cat-blurb { color: var(--muted); }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); overflow: hidden; }
.stepper button { width: 36px; height: 38px; display: grid; place-items: center; background: transparent; border: 0; color: var(--muted); }
.stepper button:hover:not(:disabled) { background: var(--raised); color: var(--text); }
.stepper button:disabled { opacity: .3; cursor: default; }
.stepper input { width: 52px; height: 38px; text-align: center; background: transparent; border: 0; outline: none; font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 22%, transparent); }

/* ───────── planner: step bar ───────── */
.flow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.flow-step { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 18px; background: var(--surface); border: 1.5px solid var(--line-soft); text-decoration: none; color: var(--text); transition: border-color .15s, background .15s; }
.flow-step:hover { border-color: var(--line); }
.flow-step.on { border-color: var(--accent); background: color-mix(in oklab, var(--accent) 10%, var(--surface)); }
.flow-n { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--raised); color: var(--muted); font-weight: 700; }
.flow-step.on .flow-n { background: var(--accent); color: var(--on-accent); }
.flow-step.done .flow-n { background: var(--ok); color: var(--on-ok); }
.flow-t { display: grid; min-width: 0; } .flow-t b { font-size: 16px; } .flow-t small { color: var(--muted); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ───────── cheat sheets ───────── */
.refs { display: grid; gap: 10px; }
.refs h2 { font-size: 15px; color: var(--muted); font-weight: 650; }
.refs-row { display: flex; gap: 12px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: thin; }
.ref { flex: 0 0 auto; display: flex; align-items: center; gap: 12px; padding: 8px 18px 8px 8px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line-soft); text-align: left; box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.ref:hover { border-color: var(--accent); transform: translateY(-2px); }
.ref img { width: 108px; height: 72px; object-fit: cover; border-radius: 12px; background: var(--bg2); }
.ref span { display: grid; } .ref b { font-size: 15px; } .ref small { color: var(--muted); font-size: 13px; }
.ref-sheet { gap: 8px; }
.ref-frame { overflow: auto; max-height: 72dvh; border-radius: 14px; background: var(--bg2); cursor: zoom-in; }
.ref-frame.zoom { cursor: zoom-out; }
.ref-big { display: block; width: 100%; height: auto; }
.ref-frame.zoom .ref-big { width: 230%; max-width: none; }

/* ───────── planner: choose ───────── */
.choose { display: grid; gap: 28px; }
.quick h2 { font: 700 24px var(--display); margin-bottom: 14px; }
.pieces { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.piece { display: grid; align-content: start; background: var(--surface); border: 1.5px solid var(--line-soft); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.piece.on { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 25%, transparent), var(--shadow); }
.piece-media { position: relative; aspect-ratio: 4 / 3; background: var(--bg2); }
.piece-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.piece-img.blank { background: linear-gradient(135deg, var(--raised), var(--bg2)); }
.piece-add { position: absolute; right: 12px; bottom: 12px; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); border: 0; box-shadow: 0 8px 20px -6px rgb(0 0 0 / .6); transition: transform .12s; }
.piece-add:hover { transform: scale(1.08); } .piece-add:active { transform: scale(.94); }
.piece-badge { position: absolute; left: 12px; top: 12px; display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px 4px 8px; border-radius: 999px; background: var(--ok); color: var(--on-ok); font-weight: 700; font-size: 13.5px; box-shadow: 0 6px 16px -6px rgb(0 0 0 / .6); }
.piece-qty { position: absolute; right: 10px; bottom: 10px; box-shadow: 0 8px 20px -6px rgb(0 0 0 / .6); border-radius: 999px; background: var(--surface); }
.piece-body { display: grid; gap: 4px; padding: 14px 16px 16px; align-content: start; justify-items: start; }
.piece-body h3 { font-size: 17px; }
.piece-cost { color: var(--muted); font-size: 14px; line-height: 1.4; }
.piece-body .param { margin-top: 6px; }
.piece-body .link { margin-top: 4px; }
.param { display: flex; align-items: center; gap: 10px; font-size: 14.5px; color: var(--muted); font-weight: 500; }
.tray-wrap { position: fixed; z-index: 34; left: 50%; bottom: 20px; transform: translateX(-50%); width: min(760px, calc(100vw - 32px)); display: grid; gap: 10px; }
.tray { display: flex; align-items: center; gap: 16px; padding: 10px 12px 10px 16px; border-radius: 26px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 20px 50px -12px rgb(0 0 0 / .55); }
.tray-open { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 16px; flex: 1; min-width: 0; border-radius: 16px; }
.tray-open:focus-visible { outline: 3px solid color-mix(in oklab, var(--accent) 70%, transparent); outline-offset: 4px; }
.tray-chev { color: var(--muted); transform: rotate(-90deg); transition: transform .2s; display: inline-flex; }
.tray-wrap.open .tray-chev { transform: rotate(90deg); }
.tray-thumbs { display: flex; } .tray-thumb, .tray-more { width: 46px; height: 46px; border-radius: 14px; overflow: hidden; border: 2.5px solid var(--surface); background: var(--raised); display: grid; place-items: center; font-weight: 700; font-size: 14px; } .tray-thumb + .tray-thumb, .tray-thumb + .tray-more { margin-left: -12px; }
.tray-img { width: 100%; height: 100%; object-fit: cover; }
.tray-t { display: grid; flex: 1; min-width: 0; } .tray-t b { font-size: 16px; } .tray-t small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tray-list { display: none; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 8px 10px 10px; max-height: 52dvh; overflow-y: auto; box-shadow: 0 20px 50px -12px rgb(0 0 0 / .55); }
.tray-wrap.open .tray-list { display: block; }
.tray-list-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 10px 6px; } .tray-list-head h2 { font-size: 17px; }
.tray-list ul { list-style: none; padding: 0; display: grid; }
.tray-list li { display: flex; align-items: center; gap: 12px; padding: 8px 8px; border-top: 1px solid var(--line-soft); }
.tray-name { flex: 1; min-width: 0; font-weight: 650; }
.piece-x { position: absolute; right: 10px; top: 10px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; border: 0; background: rgb(0 0 0 / .6); color: #fff; backdrop-filter: blur(4px); }
.piece-x:hover { background: var(--bad); }

/* ───────── planner: gather ───────── */
.plan-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.plan-main { display: grid; gap: 18px; min-width: 0; }
.gather, .build-step { display: grid; gap: 20px; }
.card-list { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r); padding: 8px 8px 10px; box-shadow: var(--shadow); }
.list-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px 8px; }
.list-head h2 { font-size: 18px; }
.mats { display: grid; }
.mat { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 14px; }
.mat + .mat { border-top: 1px solid var(--line-soft); }
.mat-info { min-width: 0; }
.mat-title { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.mat-title b { font-size: 17px; font-weight: 650; }
.sub { display: flex; flex-wrap: wrap; gap: 2px 14px; color: var(--muted); font-size: 14px; margin-top: 2px; }
.craft-line { display: flex; gap: 7px; align-items: flex-start; font-size: 14px; color: var(--info); margin-top: 4px; line-height: 1.4; }
.craft-line .ico { margin-top: 3px; } .craft-line.ok { color: var(--ok); }
.hint { color: var(--muted); display: inline-flex; cursor: help; }
.tog { display: inline-flex; gap: 5px; align-items: center; font-size: 13px; font-weight: 600; padding: 2px 10px; border-radius: 999px; border: 1px dashed var(--line); background: transparent; color: var(--muted); white-space: nowrap; }
.tog:hover { color: var(--text); border-color: var(--muted); }
.tog.on { color: var(--info); border: 1px solid color-mix(in oklab, var(--info) 50%, transparent); background: color-mix(in oklab, var(--info) 10%, transparent); }
.mat-qty { display: flex; align-items: center; gap: 14px; }
.of { color: var(--muted); font-size: 15px; min-width: 62px; } .of b { color: var(--text); font-size: 20px; font-variant-numeric: tabular-nums; }
.bar { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; width: 100%; max-width: 220px; margin-top: 8px; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: inherit; transition: width .3s; }
.bigcheck { flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: transparent; border: 2px solid var(--muted); color: transparent; transition: background .15s, border-color .15s, transform .1s; }
.bigcheck:hover { border-color: var(--ok); color: color-mix(in oklab, var(--ok) 60%, transparent); }
.bigcheck:active { transform: scale(.9); }
.bigcheck.on { background: var(--ok); border-color: var(--ok); color: var(--on-ok); }
.mat.done .mat-title b { text-decoration: line-through; text-decoration-color: var(--muted); color: var(--muted); }
.mat.done .of b { color: var(--muted); } .mat.done .dot { opacity: .4; }
.mat.flash { animation: flash 1.4s ease-out; }
@keyframes flash { 0%, 40% { background: color-mix(in oklab, var(--accent) 24%, transparent); } }
.next-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 4px; }

.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; padding: 6px 10px 8px; }
label.tool { display: flex; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 16px; background: var(--raised); border: 1.5px solid transparent; cursor: pointer; position: relative; }
label.tool:hover { border-color: var(--line); }
label.tool input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
label.tool:has(input:focus-visible) { outline: 3px solid color-mix(in oklab, var(--accent) 70%, transparent); }
.tick { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--muted); display: grid; place-items: center; color: transparent; }
label.tool.on { border-color: color-mix(in oklab, var(--ok) 50%, transparent); }
label.tool.on .tick { background: var(--ok); border-color: var(--ok); color: var(--on-ok); }
.tool-body { display: grid; } .tool-body b { font-weight: 650; } .tool-body small { color: var(--muted); font-size: 13.5px; }

/* ───────── planner: build ───────── */
.build-part { border-radius: var(--r); background: var(--surface); border: 1px solid var(--line-soft); box-shadow: var(--shadow); overflow: hidden; }
.build-part > header { display: flex; gap: 14px; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line-soft); }
.build-part > header > div { flex: 1; min-width: 0; } .build-part header p { color: var(--muted); font-size: 14.5px; }
.build-part header h2 { font: 700 22px var(--display); }
.build-part .thumb { width: 84px; height: 56px; border-radius: 12px; }
.count-pill { padding: 3px 12px; border-radius: 999px; background: var(--raised); font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; }
.count-pill.done { background: var(--ok); color: var(--on-ok); }
.times { color: var(--muted); font: 500 15px var(--font); }
.steps { list-style: none; padding: 0; display: grid; }
.step { display: flex; gap: 14px; align-items: center; padding: 16px 18px; }
.step + .step { border-top: 1px solid var(--line-soft); }
.step-n { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--raised); display: grid; place-items: center; font-size: 14px; font-weight: 700; color: var(--muted); }
.step-body { flex: 1; display: grid; gap: 8px; min-width: 0; justify-items: start; }
.step-body > b { font-size: 17px; font-weight: 650; }
.step .note { color: var(--muted); font-size: 14.5px; }
.step.done .step-body > b { text-decoration: line-through; text-decoration-color: var(--muted); color: var(--muted); }
.step.done .step-n { background: var(--ok); color: var(--on-ok); }
.notes { padding: 14px 18px 16px 38px; color: var(--muted); font-size: 14.5px; display: grid; gap: 4px; border-top: 1px solid var(--line-soft); }

/* ───────── side column ───────── */
.side { position: sticky; top: 84px; display: grid; gap: 14px; max-height: calc(100dvh - 100px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding: 2px; }
.panel { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); }
.side h3 { font-size: 16px; margin-bottom: 8px; }
.next { display: grid; gap: 2px; background: color-mix(in oklab, var(--accent) 13%, var(--surface)); border-color: color-mix(in oklab, var(--accent) 40%, var(--line-soft)); }
.next small { font-size: 13.5px; font-weight: 700; color: var(--accent-ink); }
.next b { font-size: 17px; line-height: 1.35; }
.next.ok { background: color-mix(in oklab, var(--ok) 13%, var(--surface)); border-color: color-mix(in oklab, var(--ok) 40%, var(--line-soft)); } .next.ok small { color: var(--ok); }
.mine-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; } .mine-head h3 { margin: 0; }
.mine ul { list-style: none; padding: 0; display: grid; gap: 8px; }
.mine li { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; } .mine li span { flex: 1; min-width: 0; } .mine li b { color: var(--muted); font-variant-numeric: tabular-nums; }
.mine .thumb { width: 48px; height: 36px; border-radius: 9px; }
.check-row { display: flex; gap: 10px; padding: 10px 0; font-size: 15px; } .check-row + .check-row { border-top: 1px solid var(--line-soft); }
.check-row p { margin-bottom: 8px; line-height: 1.4; }
.check-row.warn .ico { color: var(--warn); } .check-row.bad .ico { color: var(--bad); } .check-row.info .ico { color: var(--info); }
.check-row .ico { margin-top: 2px; }
.switch-row { display: flex; gap: 14px; align-items: center; justify-content: space-between; padding: 9px 0; cursor: pointer; position: relative; }
.switch-row small { display: block; color: var(--muted); font-size: 13.5px; line-height: 1.35; margin-top: 2px; } .switch-row b { font-size: 15px; font-weight: 650; }
.switch-row input { position: absolute; opacity: 0; }
.switch { flex: none; width: 46px; height: 26px; border-radius: 99px; background: var(--line); position: relative; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .3); transition: transform .2s; }
input:checked + .switch { background: var(--accent); } input:checked + .switch::after { transform: translateX(20px); }
.switch-row:has(input:focus-visible) .switch { outline: 3px solid color-mix(in oklab, var(--accent) 70%, transparent); outline-offset: 2px; }
.actions { display: grid; gap: 8px; } .actions .btn { justify-content: flex-start; }

/* at a glance */
.inv { padding: 0; overflow: hidden; }
.inv-head { all: unset; box-sizing: border-box; display: grid; grid-template-columns: 1fr 70px auto auto; gap: 12px; align-items: center; width: 100%; padding: 16px 18px 12px; cursor: default; }
.inv-title { display: grid; } .inv-title b { font-size: 17px; } .inv-title small { color: var(--muted); font-size: 13.5px; }
.inv-pct { font-size: 18px; font-variant-numeric: tabular-nums; }
.inv-chev { display: none; color: var(--muted); transition: transform .2s; }
.inv-meter { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; display: block; }
.inv-meter i { display: block; height: 100%; background: var(--ok); border-radius: inherit; transition: width .3s; }
.inv-body { padding: 0 10px 14px; max-height: 44dvh; overflow-y: auto; scrollbar-width: thin; }
.inv-body h4 { margin: 10px 10px 4px; font-size: 13px; font-weight: 700; color: var(--muted); }
.inv-list { list-style: none; padding: 0; display: grid; }
.inv-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 6px; align-items: center; padding: 6px 8px; border-radius: 12px; }
.inv-row:hover { background: var(--raised); }
.inv-main { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 10px; min-width: 0; padding: 4px 0; border-radius: 8px; }
.inv-main:focus-visible, .inv-step:focus-visible { outline: 3px solid color-mix(in oklab, var(--accent) 70%, transparent); outline-offset: 1px; }
.inv-circle { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--muted); display: grid; place-items: center; color: transparent; transition: background .12s, border-color .12s; }
.inv-main:hover .inv-circle { border-color: var(--ok); }
.inv-row.done .inv-circle { background: var(--ok); border-color: var(--ok); color: var(--on-ok); }
.inv-name { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inv-qty { display: inline-flex; align-items: center; gap: 2px; }
.inv-step { all: unset; box-sizing: border-box; cursor: pointer; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); border: 1px solid var(--line); }
.inv-step:hover:not(:disabled) { color: var(--text); border-color: var(--muted); background: var(--surface); }
.inv-step:disabled { opacity: .3; cursor: default; }
.inv-n { min-width: 62px; text-align: center; font-variant-numeric: tabular-nums; font-size: 15px; } .inv-n em { font-style: normal; color: var(--muted); }
.inv-bar { grid-column: 1 / -1; height: 4px; border-radius: 99px; background: var(--line); overflow: hidden; }
.inv-bar i { display: block; height: 100%; background: var(--accent); border-radius: inherit; transition: width .3s; }
.inv-row.done .inv-name { color: var(--muted); } .inv-row.done .inv-n { color: var(--ok); } .inv-row.done .inv-n em { display: none; }
.inv-row.done .inv-bar i { background: var(--ok); }
.inv-tools { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 10px; }
.inv-tool { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 99px; font-size: 14px; font-weight: 600; background: transparent; border: 1px dashed var(--line); color: var(--muted); }
.inv-tool:hover { color: var(--text); border-color: var(--muted); }
.inv-tool.on { color: var(--ok); border: 1px solid color-mix(in oklab, var(--ok) 55%, transparent); background: color-mix(in oklab, var(--ok) 10%, transparent); }
.inv-built { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; margin: 14px 10px 0; font-size: 14px; color: var(--muted); } .inv-built b { color: var(--text); font-variant-numeric: tabular-nums; }
.inv-built .inv-meter i { background: var(--accent); }

/* ───────── guides ───────── */
.g-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 40px; align-items: start; }
.g-nav { position: sticky; top: 90px; display: grid; gap: 2px; }
.g-nav a { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: 12px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 15px; }
.g-nav a:hover { background: var(--surface); color: var(--text); } .g-nav a.on { background: var(--surface); color: var(--text); box-shadow: 0 0 0 1px var(--line-soft); }
.article { display: grid; gap: 16px; max-width: 74ch; }
.article p, .g-list { line-height: 1.7; } .g-list { padding-left: 22px; display: grid; gap: 6px; }
.g-h { margin-top: 20px; font: 700 26px var(--display); }
.toc { display: flex; flex-wrap: wrap; gap: 8px; } .toc a { font-size: 14.5px; padding: 5px 14px; background: var(--surface); border-radius: 99px; color: var(--muted); text-decoration: none; font-weight: 600; } .toc a:hover { color: var(--text); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line-soft); border-radius: 16px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; padding: 12px 16px; vertical-align: top; border-bottom: 1px solid var(--line-soft); }
thead th { font-size: 13.5px; color: var(--muted); font-weight: 650; background: var(--raised); }
tbody th { font-weight: 650; white-space: nowrap; } tr:last-child > * { border-bottom: 0; }
.callout { display: flex; gap: 14px; padding: 16px 18px; border-radius: 16px; background: var(--surface); }
.callout .ico { margin-top: 2px; } .callout b { display: block; margin-bottom: 2px; } .callout p { line-height: 1.55; }
.callout.info { background: color-mix(in oklab, var(--info) 11%, var(--surface)); } .callout.info .ico { color: var(--info); }
.callout.warn { background: color-mix(in oklab, var(--warn) 12%, var(--surface)); } .callout.warn .ico { color: var(--warn); }
.callout.bad { background: color-mix(in oklab, var(--bad) 12%, var(--surface)); } .callout.bad .ico { color: var(--bad); }
.callout.good { background: color-mix(in oklab, var(--ok) 12%, var(--surface)); } .callout.good .ico { color: var(--ok); }
.src { color: var(--muted); font-size: 14px; margin-top: 10px; }

/* ───────── modal / sheet / palette ───────── */
dialog.modal { padding: 0; border: 0; border-radius: 26px; background: var(--surface); color: var(--text); width: min(580px, calc(100vw - 24px)); max-height: min(88dvh, 860px); box-shadow: 0 30px 80px rgb(0 0 0 / .55); overflow: hidden; }
dialog.modal.wide { width: min(740px, calc(100vw - 24px)); }
dialog.modal[open] { display: flex; flex-direction: column; animation: pop .18s ease-out; }
dialog.modal::backdrop { background: rgb(8 10 6 / .6); backdrop-filter: blur(4px); }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.985); } }
.modal-x { position: absolute; top: 14px; right: 14px; z-index: 2; background: rgb(0 0 0 / .5); color: #fff; border-radius: 50%; }
.modal-body { padding: 26px; overflow-y: auto; display: grid; gap: 16px; align-content: start; }
.modal-body > h2 { padding-right: 36px; font: 700 26px var(--display); }
.sheet-head small { color: var(--muted); font-size: 14.5px; font-weight: 600; } .sheet-head h2 { font: 700 30px/1.1 var(--display); }
.recipe-sheet h3 { font-size: 16px; margin-top: 6px; }
.recipe-sheet .steps { border-radius: 16px; background: var(--raised); }
.recipe-sheet .step { align-items: flex-start; }
.sheet-foot { position: sticky; bottom: -26px; margin: 4px -26px -26px; padding: 16px 26px; background: var(--surface); border-top: 1px solid var(--line-soft); display: flex; gap: 12px; align-items: center; justify-content: flex-end; }
.chain { list-style: none; padding: 0; display: grid; gap: 6px; font-size: 15px; }
.chain li { padding-left: calc(var(--d) * 18px); } .chain li::before { content: "↳ "; color: var(--muted); } .chain li[style*="--d: 0"]::before { content: ""; }
.chain small { color: var(--muted); } .warn-text { color: var(--warn) !important; }
.palette-modal { align-self: start; margin-top: 10dvh; }
.palette-modal .modal-x { display: none; }
.palette { padding: 0; gap: 0; }
.palette-box { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line-soft); color: var(--muted); }
.search-input.big { background: transparent; border: 0; padding: 0; font-size: 18px; box-shadow: none !important; border-radius: 0; }
.results { list-style: none; margin: 0; padding: 8px; max-height: 52dvh; overflow-y: auto; }
.results li { display: flex; gap: 12px; align-items: center; padding: 11px 14px; border-radius: 14px; cursor: pointer; } .results li > div { flex: 1; min-width: 0; }
.results li.on { background: var(--raised); } .results small { display: block; color: var(--muted); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.results li.hint-row { color: var(--muted); cursor: default; }
.kind { flex: none; width: 62px; text-align: center; font-size: 12.5px; font-weight: 700; padding: 3px 0; border-radius: 99px; background: var(--raised); color: var(--muted); }
.kind.recipe { color: var(--accent-ink); } .kind.item { color: var(--info); }
.empty { padding: 44px 20px; text-align: center; display: grid; gap: 10px; justify-items: center; color: var(--muted); border: 2px dashed var(--line); border-radius: var(--r); }
.empty h3 { color: var(--text); }
#toasts { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 100; display: grid; gap: 8px; }
.toast { display: flex; gap: 18px; align-items: center; padding: 13px 20px; border-radius: 999px; background: var(--text); color: var(--bg); font-weight: 600; font-size: 15px; box-shadow: 0 18px 40px -10px rgb(0 0 0 / .5); animation: pop .2s ease-out; }
.toast-btn { background: none; border: 0; color: var(--accent); font-weight: 800; filter: brightness(.7) saturate(1.3); padding: 0; }

/* ───────── team plan ───────── */
.team-banner { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 18px; border-radius: 18px; background: color-mix(in oklab, var(--accent) 9%, var(--surface)); border: 1px solid color-mix(in oklab, var(--accent) 35%, var(--line-soft)); }
.team-l { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.live { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 700; padding: 3px 12px 3px 9px; border-radius: 99px; background: var(--surface); }
.live i { width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.live.ok { color: var(--ok); } .live.ok i { animation: pulse 2s infinite; } .live.warn { color: var(--warn); } .live.bad { color: var(--bad); }
@keyframes pulse { 50% { opacity: .35; } }
.avatars { display: inline-flex; } .avatars .avatar + .avatar { margin-left: -8px; }
.avatar { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; color: #14110a; background: var(--c); border: 2.5px solid var(--surface); }
.avatar.you { box-shadow: 0 0 0 2px var(--accent); }
.live-dot { position: absolute; top: 5px; right: 5px; width: 9px; height: 9px; border-radius: 50%; background: var(--ok); }
.activity { list-style: none; padding: 0; display: grid; gap: 12px; }
.activity li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.4; }
.activity .avatar { width: 26px; height: 26px; font-size: 12px; margin-top: 1px; } .activity small { display: block; color: var(--muted); font-size: 13px; }
.invite p { margin-bottom: 14px; } .row.end { justify-content: flex-end; }

/* ───────── responsive ───────── */
@media (max-width: 960px) {
  .plan-grid { display: grid; grid-template-columns: 1fr; gap: 18px; } .plan-main, .side { display: contents; }
  .side .next { order: -4; } .side .checks { order: 6; } .side .opts { order: 8; } .side .actions { order: 9; }
  .g-layout { grid-template-columns: 1fr; gap: 18px; }
  .g-nav { position: static; display: flex; overflow-x: auto; gap: 6px; padding-bottom: 4px; } .g-nav a { white-space: nowrap; background: var(--surface); }
  .how { grid-template-columns: 1fr; }
  .inv { position: fixed; z-index: 34; left: 10px; right: 10px; bottom: 10px; border-radius: 22px; box-shadow: 0 16px 40px -10px rgb(0 0 0 / .6); border: 1px solid var(--line); }
  .inv-head { cursor: pointer; padding: 12px 16px; } .inv-chev { display: inline-flex; transform: rotate(-90deg); }
  .inv.open .inv-chev { transform: rotate(90deg); }
  .inv-body { display: none; max-height: 52dvh; padding-bottom: 14px; border-top: 1px solid var(--line-soft); }
  .inv.open .inv-body { display: block; }
  .inv-row { padding: 8px 10px; } .inv-step { width: 34px; height: 34px; } .inv-main { padding: 8px 0; }
  .page { padding-bottom: 130px; }
}
@media (max-width: 760px) {
  .top-in { padding: 10px 14px; gap: 10px; flex-wrap: wrap; }
  .search-btn { min-width: 0; padding: 9px; border-radius: 50%; } .search-btn span:not(.ico), .search-btn kbd { display: none; }
  .brand-t { display: none; }
  .nav { position: fixed; z-index: 35; left: 0; right: 0; bottom: 0; margin: 0; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--line-soft); justify-content: space-around; gap: 0; }
  .nav a { flex-direction: column; gap: 2px; font-size: 12.5px; padding: 6px 12px; flex: 1; align-items: center; border-radius: 12px; } .nav a.on { background: transparent; box-shadow: none; color: var(--accent-ink); }
  .count { position: absolute; top: 0; right: 22%; }
  .page { padding: 20px 14px 190px; gap: 22px; } .foot { padding-bottom: 150px; }
  .hero.has-img { min-height: 420px; padding: 26px 22px; border-radius: 24px; }
  .hero .lede { font-size: 17px; } .btn.xl { padding: 14px 24px; font-size: 17px; }
  .flow { gap: 6px; } .flow-step { flex-direction: column; gap: 4px; padding: 10px 6px; text-align: center; border-radius: 16px; } .flow-t small { font-size: 12px; } .flow-t b { font-size: 15px; } .flow-n { width: 30px; height: 30px; }
  .facts { padding: 18px; gap: 14px 28px; }
  .rail { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 14px; margin: 0 -14px; padding: 4px 14px 14px; scrollbar-width: none; }
  .rail > .card { flex: 0 0 72%; scroll-snap-align: start; } .rail .card-img { aspect-ratio: 16 / 9; }
  .pieces { grid-template-columns: 1fr 1fr; gap: 12px; } .piece-body { padding: 10px 12px 12px; } .piece-body h3 { font-size: 15.5px; } .piece-cost { font-size: 12.5px; }
  .piece-badge { left: 8px; top: 8px; padding: 3px 9px 3px 6px; font-size: 12.5px; } .piece-add { width: 42px; height: 42px; right: 8px; bottom: 8px; } .piece-qty { right: 6px; bottom: 6px; }
  .piece-qty .stepper button { width: 32px; height: 34px; } .piece-qty .stepper input { width: 36px; height: 34px; }
  .tray-wrap { bottom: calc(70px + env(safe-area-inset-bottom)); }
  .tray { padding: 8px 8px 8px 14px; gap: 10px; border-radius: 22px; }
  .tray-thumbs { display: none; } .tray .btn { padding: 12px 16px; font-size: 15px; } .tray-t small { display: none; } .tray-t b { white-space: nowrap; font-size: 15px; } .tray-open { gap: 10px; }
  .tray-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; } .tray-list li .stepper { grid-column: 2; justify-self: start; } .tray-list li .icon-btn { grid-row: 1 / span 2; grid-column: 3; }
  .mat { grid-template-columns: auto minmax(0, 1fr); gap: 8px 14px; padding: 14px 10px; }
  .mat-qty { grid-column: 2; justify-content: flex-start; }
  .mat-qty .stepper button { width: 42px; height: 42px; } .mat-qty .stepper input { height: 42px; width: 58px; font-size: 17px; }
  .bigcheck { width: 46px; height: 46px; }
  .build-part .thumb { width: 64px; height: 46px; } .build-part > header { padding: 14px; }
  .step { padding: 14px; gap: 10px; }
  .team-banner { flex-direction: column; align-items: stretch; }
  .next-bar .btn { flex: 1; }
  dialog.modal { width: 100vw; max-width: 100vw; max-height: 92dvh; margin: auto 0 0; border-radius: 26px 26px 0 0; }
  .palette-modal { margin-top: 0; align-self: start; border-radius: 0 0 26px 26px; max-height: 80dvh; }
  .modal-body { padding: 22px 18px; } .sheet-foot { margin: 4px -18px -22px; padding: 14px 18px calc(14px + env(safe-area-inset-bottom)); bottom: -22px; }
  .cards, .cards.recipes { grid-template-columns: 1fr; }
  .inv { bottom: calc(66px + env(safe-area-inset-bottom)); }
  #toasts { bottom: 150px; width: calc(100vw - 24px); } .toast { justify-content: space-between; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* ───────── print: just the checklist ───────── */
@media print {
  :root, :root[data-theme] { --bg: #fff; --surface: #fff; --raised: #fff; --bg2: #fff; --line: #999; --line-soft: #ddd; --text: #000; --muted: #444; --accent-ink: #000; --shadow: none; }
  body { background: #fff; font-size: 12px; } .top, .foot, .side, .flow, .tray, .next-bar, .link, .tog, .btn, .icon-btn, #toasts, .bar, .stepper button, .inv, .team-banner, .invite, .team-card, .thumb { display: none !important; }
  .plan-grid { grid-template-columns: 1fr; } .card-list, .panel, .build-part { border: 0; box-shadow: none; break-inside: avoid; } .page { padding: 0; max-width: none; }
}
