/* Packard Stock — iOS-grade shell (same system as the Bay2 campout app, in Packard's colors).
   Full-bleed photo heroes, inset grouped lists, a floating pill tab bar, sheets that slide up. */
:root {
  --bg: #0F1013;
  --card: #1A1C21;
  --card-2: #24272D;
  --sep: rgba(255, 255, 255, .08);
  --text: #F4F4F1;
  --text-2: #A4A7AE;
  --text-3: #74777E;
  --red: #FF020A;
  --tint: #FF4A4F;            /* Packard red, lifted for small text on dark */
  --go: #34D27F;
  --warn: #FFB224;
  --r-lg: 22px; --r-md: 16px; --r-sm: 12px;
  --tab-h: 64px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --shadow-float: 0 12px 40px rgba(0, 0, 0, .55), 0 2px 8px rgba(0, 0, 0, .4);
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.4, .44, 1);
  --display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --body: 'Inter', -apple-system, 'SF Pro Text', system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
html, body { height: 100%; overflow: hidden; overscroll-behavior: none; }
body { font-family: var(--body); color: var(--text); background: var(--bg); font-size: 17px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
/* The app shell is the ONLY thing that scrolls; the document never moves. iOS 26 standalone WebKit lets
   position:fixed drift with a scrolling document (black-translucent + viewport-fit=cover regression, WebKit 301108),
   so the tab bar, sheets and toast sit on a stationary document and #app scrolls underneath them — native-app style. */
#app { position: fixed; inset: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior-y: none;
  padding-bottom: calc(var(--tab-h) + 34px + var(--safe-b)); }
body.no-tabs #app { padding-bottom: calc(24px + var(--safe-b)); }
body.locked #app { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; background: none; border: 0; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--text); outline-offset: 2px; border-radius: 8px; }
@media (prefers-reduced-motion: reduce) { * { animation-duration: .001s !important; transition-duration: .001s !important; } }

.wrap { width: min(100% - 32px, 560px); margin-inline: auto; }
h1, h2 { font-family: var(--display); font-weight: 700; line-height: .95; letter-spacing: .005em; }
.muted { color: var(--text-2); }
.small { font-size: 14px; }

/* ---------- full-bleed photo hero, title over the art ---------- */
.hero { position: relative; overflow: hidden; min-height: clamp(250px, 40vh, 360px); display: flex; align-items: flex-end; isolation: isolate; background: #000; }
.hero img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero::after { content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(15,16,19,.55) 0%, rgba(15,16,19,0) 30%, rgba(15,16,19,.2) 55%, var(--bg) 100%); }
.hero .in { width: min(100% - 32px, 560px); margin-inline: auto; padding: calc(84px + var(--safe-t)) 0 18px; }
.hero h1 { font-size: clamp(54px, 15vw, 80px); text-transform: uppercase; text-shadow: 0 2px 24px rgba(0,0,0,.5); }
.hero .lead { color: #E3E3DE; text-shadow: 0 1px 12px rgba(0,0,0,.6); margin-top: 6px; font-size: 16px; }
.hero .in > * { animation: rise .7s var(--ease-out) both; }
.hero .in > *:nth-child(2) { animation-delay: .1s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.mark { position: absolute; z-index: 5; left: 16px; top: calc(14px + var(--safe-t)); width: 58px; height: auto; filter: drop-shadow(0 4px 12px rgba(0,0,0,.5)); }
.glass-btn { position: absolute; z-index: 5; right: 14px; top: calc(12px + var(--safe-t)); height: 40px; min-width: 40px; padding: 0 14px; border-radius: 999px;
  background: rgba(26,28,33,.55); border: 1px solid rgba(255,255,255,.16); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; }
.glass-btn svg { width: 20px; height: 20px; }

/* ---------- pushed pages: compact nav bar + large title ---------- */
.navbar { position: sticky; top: 0; z-index: 30; padding: calc(6px + var(--safe-t)) 8px 6px; display: flex; align-items: center; min-height: calc(52px + var(--safe-t));
  background: rgba(15,16,19,.82); backdrop-filter: blur(20px) saturate(1.5); -webkit-backdrop-filter: blur(20px) saturate(1.5); border-bottom: 1px solid transparent; transition: border-color .2s; }
.navbar.scrolled { border-bottom-color: var(--sep); }
.navbar .back { display: flex; align-items: center; gap: 2px; color: var(--tint); font-weight: 600; font-size: 17px; padding: 8px 8px 8px 2px; }
.navbar .back svg { width: 24px; height: 24px; }
.navbar .t { position: absolute; left: 50%; transform: translateX(-50%); font-weight: 700; font-size: 17px; opacity: 0; transition: opacity .2s; white-space: nowrap; max-width: 56%; overflow: hidden; text-overflow: ellipsis; }
.navbar.scrolled .t { opacity: 1; }
.large-title { font-family: var(--display); font-weight: 700; font-size: 44px; text-transform: uppercase; line-height: .95; margin: 4px 0 4px; }

/* ---------- sections, inset grouped lists ---------- */
.sec { margin-top: 26px; }
.sec:first-child { margin-top: 8px; }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 4px 8px; }
.sec-h h2 { font-size: 26px; text-transform: uppercase; }
.sec-h .aside { color: var(--text-2); font-size: 14px; }
.sec-foot { color: var(--text-2); font-size: 13px; margin: 8px 4px 0; }
.list { background: var(--card); border-radius: var(--r-md); overflow: hidden; }
.li { display: flex; align-items: center; gap: 12px; padding: 10px 14px; min-height: 64px; position: relative; width: 100%; text-align: left; }
.li + .li::before { content: ''; position: absolute; top: 0; right: 0; left: 76px; border-top: 1px solid var(--sep); }
.list.plain .li + .li::before { left: 16px; }
.list.icons .li + .li::before { left: 66px; }
button.li:active, a.li:active { background: var(--card-2); }
.li .main { flex: 1; min-width: 0; }
.li .title { font-weight: 600; font-size: 16px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.li .sub { color: var(--text-2); font-size: 14px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li .val { text-align: right; flex-shrink: 0; min-width: 44px; }
.li .val b { display: block; font-family: var(--display); font-weight: 700; font-size: 28px; line-height: 1; font-variant-numeric: tabular-nums; }
.li .val span { display: block; font-size: 12px; color: var(--text-2); margin-top: 2px; white-space: nowrap; }
.li .val.none b { color: var(--text-3); }
.chev { width: 14px; height: 14px; color: var(--text-3); flex-shrink: 0; }
.thumb { width: 50px; height: 50px; border-radius: 11px; background: #fff; object-fit: contain; flex-shrink: 0; }
.glyph { width: 50px; height: 50px; border-radius: 11px; background: var(--card-2); display: grid; place-items: center; color: var(--text-2); flex-shrink: 0; }
.glyph svg { width: 26px; height: 26px; }
.gicon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; background: rgba(255,2,10,.14); color: var(--tint); }
.gicon svg { width: 22px; height: 22px; }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--card-2); color: var(--text); white-space: nowrap; }
.tag.red { background: rgba(255,2,10,.16); color: var(--tint); }
.tag.go { background: rgba(52,210,127,.15); color: var(--go); }
.tag.warn { background: rgba(255,178,36,.15); color: var(--warn); }

/* ---------- cards ---------- */
.card { background: var(--card); border-radius: var(--r-lg); padding: 18px; }
.card + .card { margin-top: 12px; }
.card h3 { font-family: var(--display); font-size: 26px; text-transform: uppercase; line-height: 1; margin-bottom: 6px; }
.card p { color: var(--text-2); font-size: 15px; }
.card .btn { margin-top: 14px; }
.big { font-family: var(--display); font-weight: 700; font-size: 84px; line-height: .9; font-variant-numeric: tabular-nums; }
.big small { font-size: 24px; color: var(--text-2); margin-left: 6px; font-weight: 600; }
.progress { height: 10px; border-radius: 999px; background: var(--card-2); overflow: hidden; margin: 14px 0 4px; }
.progress i { display: block; height: 100%; border-radius: 999px; background: repeating-linear-gradient(61deg, var(--red) 0 8px, #C40007 8px 13px); transition: width .5s var(--ease-out); }
.how .li { align-items: flex-start; padding-top: 14px; padding-bottom: 14px; }
.how .li + .li::before { left: 58px; }
.how .num { width: 30px; height: 30px; border-radius: 50%; background: var(--card-2); display: grid; place-items: center; font-weight: 700; font-size: 15px; flex-shrink: 0; }
.how .li .title { -webkit-line-clamp: unset; }
.how .li .sub { white-space: normal; }

/* ---------- buttons ---------- */
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 54px; padding: 12px 18px; border-radius: 14px;
  background: var(--card-2); color: var(--text); font-weight: 700; font-size: 17px; transition: transform .12s; }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--red); color: #fff; }
.btn.primary:active { background: #C40007; }
.btn.go { background: var(--go); color: #062614; }
.btn.tinted { background: rgba(255,2,10,.14); color: var(--tint); }
.btn[disabled] { opacity: .45; }
.btn + .btn { margin-top: 10px; }
.row-btns { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-top: 12px; }
.row-btns .btn { margin-top: 0; min-height: 50px; font-size: 16px; }
.link { color: var(--tint); font-weight: 600; padding: 14px 4px; display: inline-block; }

/* ---------- search ---------- */
.search { display: flex; align-items: center; gap: 8px; background: var(--card); border-radius: 12px; padding: 0 6px 0 12px; height: 44px; }
.search svg { width: 18px; height: 18px; color: var(--text-2); flex-shrink: 0; }
.search input { flex: 1; height: 100%; font-size: 17px; outline: none; min-width: 0; }
.search input::placeholder { color: var(--text-3); }
.search .scan { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; color: var(--text-2); }
.search .scan svg { width: 22px; height: 22px; }

/* ---------- forms + iOS switches ---------- */
.field { display: block; padding: 10px 16px; position: relative; }
.field span { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 2px; }
.field input, .field select { width: 100%; font-size: 17px; outline: none; padding: 4px 0; }
.field select { appearance: none; -webkit-appearance: none; }
.sw-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; min-height: 52px; position: relative; cursor: pointer; }
.sw-row + .sw-row::before, .field + .field::before, .field + .sw-row::before, .sw-row + .field::before { content: ''; position: absolute; top: 0; right: 0; left: 16px; border-top: 1px solid var(--sep); }
.sw-row .lbl { flex: 1; }
.sw-row .lbl small { display: block; color: var(--text-2); font-size: 13px; }
input.switch { appearance: none; -webkit-appearance: none; width: 51px; height: 31px; border-radius: 999px; background: #3A3D44; position: relative; flex-shrink: 0; transition: background .2s; cursor: pointer; }
input.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35); transition: transform .3s var(--spring); }
input.switch:checked { background: var(--go); }
input.switch:checked::after { transform: translateX(20px); }
.seg { display: flex; background: var(--card-2); border-radius: 10px; padding: 3px; gap: 3px; }
.seg button { flex: 1; min-height: 36px; border-radius: 8px; font-weight: 600; font-size: 15px; color: var(--text-2); }
.seg button.on { background: #3A3D44; color: var(--text); box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 8px 14px; border-radius: 999px; background: var(--card-2); font-weight: 600; font-size: 14px; }
.chip:active { background: #3A3D44; }

/* ---------- item page ---------- */
.item-img { background: #fff; border-radius: var(--r-lg); height: 240px; display: grid; place-items: center; overflow: hidden; padding: 12px; }
.item-img img { max-height: 216px; object-fit: contain; }
.item-img.none { background: var(--card); color: var(--text-3); }
.item-img.none svg { width: 64px; height: 64px; }
.item-name { font-family: var(--display); font-weight: 700; font-size: 34px; line-height: 1; margin-top: 16px; }
.item-meta { color: var(--text-2); margin-top: 6px; }

/* ---------- the counting sheet ---------- */
.sheet-veil { position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.6); opacity: 0; transition: opacity .3s; }
.sheet-veil.show { opacity: 1; }
.sheet { position: fixed; z-index: 81; left: 0; right: 0; bottom: 0; top: calc(10px + var(--safe-t)); background: var(--bg); border-radius: 22px 22px 0 0;
  transform: translateY(105%); transition: transform .5s var(--spring); display: flex; flex-direction: column; box-shadow: 0 -10px 40px rgba(0,0,0,.5); }
.sheet.show { transform: none; }
.sheet .grab { width: 38px; height: 5px; border-radius: 3px; background: #3A3D44; margin: 8px auto 0; flex-shrink: 0; }
.sheet .bar { display: flex; align-items: center; justify-content: space-between; padding: 2px 8px; min-height: 44px; flex-shrink: 0; }
.sheet .bar .cancel { color: var(--tint); font-weight: 600; padding: 8px 10px; min-width: 76px; text-align: left; }
.sheet .bar .ttl { font-weight: 700; }
.sheet .bar .side { min-width: 76px; text-align: right; color: var(--text-2); font-size: 14px; padding-right: 10px; }
.sheet .body { flex: 1; overflow-y: auto; padding: 0 16px 12px; width: min(100%, 560px); margin-inline: auto; }
.sheet .foot { padding: 10px 16px calc(10px + var(--safe-b)); border-top: 1px solid var(--sep); flex-shrink: 0; }
.sheet .foot .btn { max-width: 528px; margin-inline: auto; }
.c-item { display: flex; gap: 12px; align-items: center; background: var(--card); border-radius: var(--r-md); padding: 10px 12px; }
.c-item .thumb, .c-item .glyph { width: 58px; height: 58px; }
.c-item .title { font-weight: 700; line-height: 1.2; }
.c-item .sub { color: var(--text-2); font-size: 14px; margin-top: 2px; }
.c-note { margin: 10px 2px 0; font-size: 14px; color: var(--text-2); }
.readout { position: relative; margin-top: 12px; background: var(--card); border-radius: 20px; min-height: 116px; display: flex; align-items: baseline; justify-content: flex-end; padding: 4px 18px 8px 34px; overflow: hidden; }
.readout::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 16px; background: repeating-linear-gradient(-29deg, var(--red) 0 6px, transparent 6px 11px); }
.readout .n { font-family: var(--display); font-weight: 700; font-size: 108px; line-height: 1; font-variant-numeric: tabular-nums; }
.readout .n.empty { color: #33363D; }
.readout .u { font-family: var(--display); font-size: 22px; color: var(--text-2); margin-left: 8px; }
.nudge { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 10px 0 8px; }
.nudge button { min-height: 50px; border-radius: 14px; background: var(--card); font-family: var(--display); font-weight: 700; font-size: 24px; }
.keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.keys button { min-height: 58px; border-radius: 16px; background: var(--card-2); font-family: var(--display); font-weight: 600; font-size: 34px; }
.keys button:active, .nudge button:active { background: #3A3D44; }
.keys button.fn { background: transparent; font-family: var(--body); font-size: 16px; font-weight: 600; color: var(--text-2); }
.photo-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.photo-row .btn { margin-top: 0; min-height: 46px; font-size: 15px; }
.photo-row img { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; }

/* ---------- PIN screen ---------- */
.dots { display: flex; justify-content: center; gap: 14px; margin: 18px 0 22px; }
.dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--text-2); }
.dots i.on { background: var(--red); border-color: var(--red); }
.shake { animation: shake .35s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.pin-big { font-family: var(--display); font-weight: 700; font-size: 64px; letter-spacing: .08em; text-align: center; }

/* ---------- review ---------- */
.counts { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 6px; }
.counts .c { background: var(--card-2); border-radius: 12px; padding: 6px 12px; display: flex; align-items: center; gap: 10px; }
.counts .c img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; }
.counts .c b { font-family: var(--display); font-size: 28px; }
.choice { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 2px; }
.choice button { min-width: 64px; min-height: 48px; border-radius: 12px; background: var(--card-2); font-family: var(--display); font-weight: 700; font-size: 26px; padding: 0 10px; }
.choice button.on { background: rgba(52,210,127,.18); color: var(--go); box-shadow: inset 0 0 0 2px var(--go); }
.rv-head { display: flex; gap: 12px; align-items: center; }
.rv-head .title { font-weight: 700; line-height: 1.2; }
.rv-head .sub { color: var(--text-2); font-size: 14px; margin-top: 2px; }

/* ---------- floating pill tab bar (Bay2 campout pattern) ---------- */
.tabbar { position: fixed; z-index: 60; left: 50%; transform: translateX(-50%); bottom: calc(14px + var(--safe-b)); width: min(100% - 24px, 440px); height: var(--tab-h);
  border-radius: 999px; background: rgba(26,28,33,.80); backdrop-filter: blur(22px) saturate(1.6); -webkit-backdrop-filter: blur(22px) saturate(1.6);
  border: 1px solid rgba(255,255,255,.10); box-shadow: var(--shadow-float); display: flex; align-items: center; padding: 6px; }
.tabbar[hidden] { display: none; }
.tabbar .hl { position: absolute; top: 6px; bottom: 6px; left: 6px; width: 60px; border-radius: 999px; background: rgba(255,255,255,.10); transition: transform .42s var(--spring), width .3s var(--ease-out); pointer-events: none; }
.tabbar a { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: 100%; border-radius: 999px;
  color: #9A9DA4; font: 700 11px var(--body); letter-spacing: .01em; transition: color .25s, transform .15s; }
.tabbar a:active { transform: scale(.92); }
.tabbar a svg { width: 24px; height: 24px; transition: transform .35s var(--spring); }
.tabbar a[aria-current] { color: var(--text); }
.tabbar a[aria-current] svg { color: var(--red); transform: translateY(-1px); }
.tabbar .badge { position: absolute; top: 5px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }

/* ---------- HUD toast + scanner ---------- */
#toast { position: fixed; z-index: 95; left: 50%; top: calc(14px + var(--safe-t)); transform: translate(-50%, -30px); opacity: 0; pointer-events: none;
  background: rgba(244,244,241,.96); color: #0F1013; font-weight: 600; font-size: 15px; padding: 11px 18px; border-radius: 999px; max-width: 92vw; text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,.4); transition: transform .45s var(--spring), opacity .25s; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.err { background: var(--red); color: #fff; }
.scanner { position: fixed; inset: 0; background: #000; z-index: 99; display: flex; flex-direction: column; }
.scanner video { flex: 1; width: 100%; object-fit: cover; }
.scanner .frame { position: absolute; left: 10%; right: 10%; top: 32%; height: 22%; border: 3px solid var(--red); border-radius: 16px; pointer-events: none; }
.scanner .bar { padding: 16px 16px calc(16px + var(--safe-b)); background: var(--bg); }
.empty { text-align: center; padding: 30px 12px; color: var(--text-2); }
.spin { width: 28px; height: 28px; border: 3px solid var(--card-2); border-top-color: var(--red); border-radius: 50%; animation: sp .8s linear infinite; margin: 60px auto; }
@keyframes sp { to { transform: rotate(360deg); } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mark { width: 74px; }

/* ---------- the shop map ---------- */
.map { position: relative; width: 100%; border-radius: var(--r-md); overflow: hidden; background: var(--card); touch-action: manipulation; }
.map img { width: 100%; height: 100%; object-fit: contain; display: block; }
.map .grid { position: absolute; inset: 0; background-image: linear-gradient(var(--sep) 1px, transparent 1px), linear-gradient(90deg, var(--sep) 1px, transparent 1px); background-size: 10% 10%; }
.map.editing { cursor: crosshair; box-shadow: inset 0 0 0 2px var(--red); }
.pin { position: absolute; transform: translate(-50%, -50%); width: 34px; height: 34px; border-radius: 50%; background: var(--card-2); border: 2px solid rgba(255,255,255,.35);
  color: var(--text); font: 700 12px/1 var(--display); display: grid; place-items: center; box-shadow: 0 3px 10px rgba(0,0,0,.5); transition: transform .3s var(--spring); }
.pin:active { transform: translate(-50%, -50%) scale(.9); }
.pin.sel { border-color: var(--text); background: #3A3D44; }
.pin.lit { background: var(--red); border-color: #FF7A7E; color: #fff; z-index: 3; animation: pinpop .6s var(--spring) both; }
.pin.lit::before, .pin.lit::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--red); animation: ring 1.6s ease-out infinite; }
.pin.lit::after { animation-delay: .8s; }
.pin.dim { opacity: .45; }
@keyframes ring { from { transform: scale(1); opacity: .9; } to { transform: scale(2.4); opacity: 0; } }
@keyframes pinpop { from { transform: translate(-50%, -50%) scale(.4); } to { transform: translate(-50%, -50%) scale(1); } }
.map-empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: var(--text-2); padding: 20px; font-size: 15px; }
.minimap { height: 150px; }
.minimap .pin { width: 26px; height: 26px; font-size: 10px; }
.home-line { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.home-line .code { font-family: var(--display); font-weight: 700; font-size: 30px; color: var(--tint); }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chip.on { background: var(--red); color: #fff; }

/* ---------- labels (screen preview + print) ---------- */
.labels { display: flex; flex-wrap: wrap; gap: 8px; }
.label { background: #fff; color: #111; border-radius: 4px; display: flex; align-items: center; gap: 2mm; padding: 1.5mm 2mm; box-sizing: border-box; overflow: hidden; break-inside: avoid; page-break-inside: avoid; }
.label .qr { flex-shrink: 0; display: block; }
@media screen { .label[data-tape="green"] { background: #C9F04D; } .label[data-tape="blue"] { background: #7FB8FF; } }   /* on-screen hint of the cartridge; prints stay plain */
.label .tx { min-width: 0; display: flex; flex-direction: column; justify-content: center; line-height: 1.1; font-family: var(--body); }
.label .l1 { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.label .l2 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #333; }
.label .l3 { font-family: 'IBM Plex Mono', ui-monospace, monospace; letter-spacing: .02em; color: #000; white-space: nowrap; }
.label .l4 { font-weight: 700; color: #000; white-space: nowrap; }
.label.t24 { width: 62mm; height: 24mm; } .label.t24 .qr { width: 19mm; height: 19mm; } .label.t24 .l1 { font-size: 10pt; } .label.t24 .l2 { font-size: 7.5pt; } .label.t24 .l3 { font-size: 8pt; } .label.t24 .l4 { font-size: 7.5pt; }
.label.t18 { width: 56mm; height: 18mm; } .label.t18 .qr { width: 14mm; height: 14mm; } .label.t18 .l1 { font-size: 8.5pt; } .label.t18 .l2 { font-size: 6.5pt; } .label.t18 .l3 { font-size: 7pt; } .label.t18 .l4 { font-size: 6.5pt; }
.label.t12 { width: 50mm; height: 12mm; padding: 1mm; } .label.t12 .qr { width: 9.5mm; height: 9.5mm; } .label.t12 .l1 { font-size: 6.5pt; } .label.t12 .l2 { display: none; } .label.t12 .l3 { font-size: 6pt; } .label.t12 .l4 { display: none; }
.label.sheet { width: 66.7mm; height: 25.4mm; border-radius: 0; } .label.sheet .qr { width: 19mm; height: 19mm; } .label.sheet .l1 { font-size: 10pt; } .label.sheet .l2 { font-size: 7.5pt; } .label.sheet .l3 { font-size: 8pt; } .label.sheet .l4 { font-size: 7.5pt; }
.label.bin .l1 { font-size: 14pt; } .label.bin.t24 .l1 { font-size: 16pt; }
@media print {
  /* Labels only: white page, no shell, no "← Office" pill, no tint — the printer's tape supplies the colour (Nov 4 2026) */
  :root { color-scheme: light; }
  html, body { height: auto; overflow: visible; background: #fff !important; }
  #app { position: static; overflow: visible; padding: 0 !important; background: #fff !important; }
  body { background: #fff !important; padding: 0; }
  .tabbar, .navbar, .print-ui, #toast, #to-office, .sheet, .sheet-veil, .scanner { display: none !important; }
  #app > *:not(main), main.wrap > *:not(.labels) { display: none !important; }
  .wrap { width: auto; margin: 0; padding: 0; }
  .labels { display: block; margin: 0 !important; padding: 0; }
  .label, .label[data-tape] { border-radius: 0; margin: 0; background: #fff !important; }
  .labels.tape .label { page-break-after: always; break-after: page; }
  .labels.sheet { display: grid; grid-template-columns: repeat(3, 66.7mm); column-gap: 3.2mm; row-gap: 0; margin: 12.7mm 0 0 4.8mm; }
  @page { margin: 0; }
}
.map { display: block; }
.btn svg { width: 22px; height: 22px; flex-shrink: 0; }
.label .l3 { font-family: var(--body); font-weight: 600; letter-spacing: .03em; }
.navbar .t { max-width: 46%; pointer-events: none; }

/* ---------- box labels (QL-810WC, 62 mm wide: DK-1202 die-cut 62×100 or continuous DK-2205/2251) ---------- */
.box { width: 62mm; height: 100mm; background: #fff; color: #111; border-radius: 4px; padding: 3mm 3.5mm 3mm; box-sizing: border-box; display: flex; flex-direction: column; overflow: hidden; break-inside: avoid; page-break-inside: avoid; font-family: var(--body); }
.box .band { height: 5mm; background: repeating-linear-gradient(61deg, #FF020A 0 2.2mm, transparent 2.2mm 3.6mm); margin: 0 0 1.5mm; }
.box .brand { font-family: var(--display); font-weight: 700; font-size: 11pt; letter-spacing: .06em; color: #FF020A; line-height: 1; }
.box .kind { font-family: var(--display); font-weight: 600; font-size: 9pt; color: #555; letter-spacing: .04em; text-transform: uppercase; }
.box .big { font-family: var(--display); font-weight: 700; font-size: 26pt; line-height: .95; margin-top: 1.5mm; color: #000; }
.box .mid { font-family: var(--display); font-weight: 600; font-size: 15pt; line-height: 1.05; margin-top: 1mm; color: #000; }
.box .parts { margin-top: 2mm; font-size: 8pt; line-height: 1.3; color: #111; }
.box .parts div { display: flex; gap: 2mm; }
.box .parts b { width: 11mm; flex-shrink: 0; color: #555; font-weight: 600; text-transform: uppercase; font-size: 6.5pt; padding-top: .4mm; }
.box .foot { margin-top: auto; display: flex; align-items: flex-end; gap: 2mm; }
.box .foot .qr { width: 17mm; height: 17mm; flex-shrink: 0; }
.box .foot .meta { flex: 1; min-width: 0; font-size: 7.5pt; line-height: 1.25; }
.box .foot .meta .sku { font-weight: 700; font-size: 8.5pt; letter-spacing: .03em; }
.box .foot .meta .of { font-family: var(--display); font-weight: 700; font-size: 16pt; line-height: 1; color: #000; margin-top: .5mm; }
.boxes { display: flex; flex-wrap: wrap; gap: 8px; }
@media print { .boxes { display: block; } .boxes .box { page-break-after: always; break-after: page; border-radius: 0; } }
.qtyrow { display: flex; align-items: center; gap: 8px; }
.qtyrow button { width: 44px; height: 44px; border-radius: 12px; background: var(--card-2); font-family: var(--display); font-size: 26px; font-weight: 700; }
.qtyrow b { font-family: var(--display); font-size: 28px; min-width: 30px; text-align: center; }

/* ---------- builds (tablet-friendly) ---------- */
@media (min-width: 820px) { .wrap.wide { width: min(100% - 48px, 1040px); } .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; } }
.bcard { background: var(--card); border-radius: var(--r-lg); padding: 16px; margin-bottom: 12px; display: flex; gap: 14px; align-items: center; width: 100%; text-align: left; }
.bcard:active { background: var(--card-2); }
.bcard .thumb { width: 64px; height: 64px; }
.bcard .main { flex: 1; min-width: 0; }
.bcard .ord { font-family: var(--display); font-weight: 700; font-size: 22px; line-height: 1; }
.bcard .ttl { font-weight: 600; margin-top: 4px; line-height: 1.25; }
.bcard .sub { color: var(--text-2); font-size: 13px; margin-top: 3px; }
.stage { display: flex; gap: 6px; margin: 14px 0 6px; }
.stage span { flex: 1; height: 6px; border-radius: 3px; background: var(--card-2); }
.stage span.done { background: var(--go); }
.stage span.now { background: var(--red); }
.part { display: flex; align-items: center; gap: 12px; padding: 10px 14px; min-height: 76px; position: relative; }
.part + .part::before { content: ''; position: absolute; top: 0; right: 0; left: 76px; border-top: 1px solid var(--sep); }
.part .main { flex: 1; min-width: 0; }
.part .title { font-weight: 600; line-height: 1.25; }
.part .sub { color: var(--text-2); font-size: 13px; margin-top: 3px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.part .need { text-align: right; min-width: 64px; }
.part .need b { display: block; font-family: var(--display); font-size: 26px; line-height: 1; }
.part .need span { font-size: 11px; color: var(--text-2); }
.part .need.short b { color: var(--warn); }
.part .need.ok b { color: var(--go); }
.pull { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--text-3); display: grid; place-items: center; color: transparent; flex-shrink: 0; }
.pull.on { background: var(--go); border-color: var(--go); color: #062614; }
.pull svg { width: 24px; height: 24px; }
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; }
.photos label { aspect-ratio: 1; border-radius: 12px; border: 2px dashed var(--text-3); display: grid; place-items: center; color: var(--text-2); cursor: pointer; }
.photos label svg { width: 30px; height: 30px; }
.verdict { padding: 14px; border-radius: 14px; margin-top: 12px; font-weight: 600; }
.verdict.ok { background: rgba(52,210,127,.14); color: var(--go); }
.verdict.no { background: rgba(255,178,36,.14); color: var(--warn); }
.verdict.wait { background: var(--card-2); color: var(--text-2); }
.chip svg { width: 18px; height: 18px; vertical-align: -4px; }
.part .title { font-size: 15px; }

/* ---------- parts board ---------- */
.cover { text-align: right; min-width: 70px; }
.cover b { display: block; font-family: var(--display); font-weight: 700; font-size: 26px; line-height: 1; }
.cover span { display: block; font-size: 11px; color: var(--text-2); white-space: nowrap; }
.cover.red b { color: var(--tint); } .cover.amber b { color: var(--warn); } .cover.green b { color: var(--go); }
.pdot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; background: var(--text-3); }
.pdot.red { background: var(--red); box-shadow: 0 0 0 4px rgba(255,2,10,.18); } .pdot.amber { background: var(--warn); } .pdot.green { background: var(--go); }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.kpi { background: var(--card); border-radius: 14px; padding: 12px; }
.kpi b { display: block; font-family: var(--display); font-size: 30px; line-height: 1; }
.kpi span { font-size: 12px; color: var(--text-2); }
.kpi.red b { color: var(--tint); } .kpi.amber b { color: var(--warn); }
.asheet { position: fixed; z-index: 90; left: 50%; transform: translate(-50%, 110%); bottom: calc(10px + var(--safe-b)); width: min(100% - 20px, 460px); transition: transform .45s var(--spring); }
.asheet.show { transform: translate(-50%, 0); }
.asheet .grp { background: rgba(26,28,33,.96); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-radius: 16px; overflow: hidden; margin-bottom: 8px; border: 1px solid rgba(255,255,255,.08); }
.asheet .grp .ttl { padding: 12px 16px 8px; font-size: 13px; color: var(--text-2); text-align: center; border-bottom: 1px solid var(--sep); }
.asheet button { width: 100%; min-height: 56px; font-size: 18px; font-weight: 600; color: var(--tint); background: none; }
.asheet button + button { border-top: 1px solid var(--sep); }
.asheet button.plain { color: var(--text); }
.asheet button.cancel { background: rgba(26,28,33,.96); border-radius: 16px; font-weight: 700; color: var(--text); border: 1px solid rgba(255,255,255,.08); }
.basket { position: fixed; z-index: 70; left: 50%; transform: translateX(-50%); bottom: calc(var(--tab-h) + 26px + var(--safe-b)); width: min(100% - 24px, 440px);
  background: var(--red); color: #fff; border-radius: 999px; padding: 12px 18px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; box-shadow: var(--shadow-float); }
.basket:active { transform: translateX(-50%) scale(.98); }

/* ---------- HQ ---------- */
.hq { width: min(100% - 32px, 1240px); margin-inline: auto; }
.hq-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 14px 0 6px; }
.hq-top .stamp { color: var(--text-2); font-size: 13px; }
.hq-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 820px) { .hq-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1180px) { .hq-grid { grid-template-columns: 1fr 1fr 1fr; } }
.panel { background: var(--card); border-radius: var(--r-lg); padding: 16px 16px 10px; min-width: 0; }
.panel h2 { font-size: 24px; text-transform: uppercase; display: flex; align-items: baseline; justify-content: space-between; }
.panel h2 .aside { font-family: var(--body); font-size: 13px; font-weight: 500; color: var(--text-2); text-transform: none; }
.nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; }
.num { background: var(--card-2); border-radius: 12px; padding: 10px 12px; }
.num b { display: block; font-family: var(--display); font-size: 28px; line-height: 1; }
.num span { font-size: 12px; color: var(--text-2); }
.num.red b { color: var(--tint); } .num.amber b { color: var(--warn); } .num.green b { color: var(--go); }
.plist { margin-top: 6px; }
.pli { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-top: 1px solid var(--sep); font-size: 14px; }
.pli .l { min-width: 0; } .pli .l b { font-weight: 600; } .pli .l span { color: var(--text-2); display: block; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pli .r { flex-shrink: 0; text-align: right; font-family: var(--display); font-weight: 700; font-size: 20px; line-height: 1; }
.pli .r small { display: block; font: 500 11px var(--body); color: var(--text-2); }
.pli .r.red { color: var(--tint); } .pli .r.amber { color: var(--warn); } .pli .r.green { color: var(--go); }
.panel .more { color: var(--tint); font-weight: 600; font-size: 14px; padding: 10px 0 2px; display: inline-block; }
body.tv .tabbar, body.tv .navbar { display: none; }
body.tv #app { padding-bottom: 20px; }
body.tv .hq-grid { grid-template-columns: 1fr 1fr 1fr; }
.empty-sm { color: var(--text-2); font-size: 14px; padding: 8px 0; }
/* Time off (Oct 28 2026): native date pickers in the dark sheet */
.field input[type=date] { color-scheme: dark; min-height: 28px; text-align: left; }
.field input[type=date]::-webkit-date-and-time-value { text-align: left; }
