/* Shipping Inventory. Layout: one-column, phone-first app with four tabs; system typeface throughout. */
:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --ink: #1d1f23;
  --muted: #646a73;
  --line: #dfe2e7;
  --accent: #2f6fd0;
  --accent-ink: #ffffff;
  --accent-soft: #e8f0fc;
  --first: #b4480f;
  --first-soft: #fdeee3;
  --long: #4b5563;
  --long-soft: #eceff3;
  --danger: #c0262d;
  --danger-soft: #fdecec;
  --ok: #18794e;
  --shadow: 0 1px 2px rgba(20, 24, 31, .06), 0 4px 14px rgba(20, 24, 31, .05);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, "Segoe UI", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121417; --surface: #1b1e23; --ink: #eceef1; --muted: #9aa1ab; --line: #2c3138;
    --accent: #6ea1ff; --accent-ink: #0b1220; --accent-soft: #1c2a42;
    --first: #ff9a5c; --first-soft: #3a2416; --long: #b4bcc8; --long-soft: #262a31;
    --danger: #ff7a80; --danger-soft: #3a1a1c; --ok: #4cc38a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.45;
  padding-inline: max(16px, env(safe-area-inset-left, 0px)); padding-block: env(safe-area-inset-top, 0px) calc(56px + env(safe-area-inset-bottom, 0px)); }
.wrap { max-width: 780px; margin: 0 auto; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -.01em; text-wrap: balance; }
h2 { font-size: 1.2rem; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }

/* header */
header.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--bg); padding-block: 14px 10px; display: grid; gap: 10px; }
.brand { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 12px; flex-wrap: wrap; }
.brand h1 { font-size: 1.5rem; }
.brand .stats { color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }
nav.tabs { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 4px; gap: 4px; box-shadow: var(--shadow); }
nav.tabs button { border: 0; background: transparent; padding: 9px 4px; border-radius: 8px; font-weight: 600; cursor: pointer; color: var(--muted); font-size: .95rem; }
nav.tabs button[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); }

/* search & chips */
.search input { width: 100%; padding: 13px 16px; font-size: 1.05rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.search input:focus { border-color: var(--accent); outline: none; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding-block: 10px 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1px solid var(--line); background: var(--surface); padding: 5px 12px; border-radius: 999px; font-size: .85rem; cursor: pointer; font-weight: 500; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip.sep { margin-left: 6px; }

.section-label { font-size: .75rem; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-block: 20px 8px; display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.list { display: grid; gap: 8px; }

/* item row */
.item { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 9px 10px; cursor: pointer; text-align: left; width: 100%; }
.item:hover { border-color: var(--accent); }
.item.removed { opacity: .6; border-style: dashed; }
.item.selectable { grid-template-columns: 24px 52px minmax(0, 1fr) auto; }
.item input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--accent); }
.thumb { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; background: var(--long-soft); display: grid; place-items: center; color: var(--muted); overflow: hidden; }
.thumb svg { width: 22px; height: 22px; opacity: .55; }
.item .meta { min-width: 0; display: grid; gap: 2px; }
.item .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .sub { color: var(--muted); font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.where { display: grid; justify-items: end; gap: 3px; max-width: 40vw; min-width: 0; }
.where .place { font-size: .75rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* labels & badges */
.boxlabel { display: inline-block; background: var(--accent-soft); color: var(--accent); font-weight: 700; padding: 3px 9px; border-radius: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; font-size: .95rem; }
.boxlabel.big { font-size: 1.9rem; padding: 4px 14px; border-radius: 10px; white-space: normal; overflow-wrap: anywhere; justify-self: start; }
.boxlabel.gone { background: transparent; color: var(--muted); border: 1px dashed var(--muted); font-size: .8rem; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: .72rem; font-weight: 700; letter-spacing: .02em; padding: 2px 7px; border-radius: 999px; white-space: nowrap; border: 1px solid transparent; }
.badge.first { background: var(--first-soft); color: var(--first); }
.badge.long { background: var(--long-soft); color: var(--long); }
.badge.mixed { background: var(--danger-soft); color: var(--danger); }
.badge.status { background: transparent; color: var(--muted); border-color: var(--line); }
.badge.fragile { background: var(--danger-soft); color: var(--danger); }
.badge.shipped { background: var(--accent); color: var(--accent-ink); }
.badge.delivered { background: var(--ok); color: #fff; }
.badges { display: flex; gap: 4px; flex-wrap: wrap; }

/* boxes */
.loc-group h3 { font-size: 1rem; margin-block: 20px 8px; display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.loc-group h3 span { color: var(--muted); font-weight: 400; font-size: .85rem; font-variant-numeric: tabular-nums; }
.loc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 8px; }
.loc { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; cursor: pointer; text-align: left; display: grid; gap: 7px; align-content: start; }
.loc:hover { border-color: var(--accent); }
.loc .boxlabel { justify-self: start; }
.loc .nums { font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.loc .room { font-size: .8rem; color: var(--ink); }

/* panels */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; box-shadow: var(--shadow); display: grid; gap: 12px; min-width: 0; }
.panel + .panel, .panel + .section-label + .panel { margin-top: 12px; }
.stack-gap { display: grid; gap: 12px; }
.panel p { margin: 0; color: var(--muted); font-size: .92rem; }
.totals { display: flex; flex-wrap: wrap; gap: 6px 18px; font-variant-numeric: tabular-nums; color: var(--muted); font-size: .9rem; }
.totals b { color: var(--ink); font-weight: 600; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row.between { justify-content: space-between; }
.back { border: 0; background: none; color: var(--accent); cursor: pointer; padding: 6px 0; font-weight: 600; justify-self: start; margin-bottom: 6px; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 560px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi { background: var(--bg); border-radius: 10px; padding: 10px 12px; display: grid; gap: 2px; min-width: 0; }
.kpi .k { font-size: .75rem; color: var(--muted); }
.kpi .v { font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 520px) { .split { grid-template-columns: 1fr; } }
.meter { height: 8px; background: var(--long-soft); border-radius: 99px; overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.meter.warn span { background: var(--danger); }

/* buttons */
.btn { border: 1px solid var(--line); background: var(--surface); padding: 9px 14px; border-radius: 9px; cursor: pointer; font-weight: 600; font-size: .95rem; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.danger { color: var(--danger); border-color: var(--danger); background: transparent; }
.btn.danger.solid { background: var(--danger); color: #fff; }
.btn.small { padding: 5px 10px; font-size: .85rem; }
.btn:disabled { opacity: .5; cursor: default; }
.linkish { border: 0; background: none; color: var(--muted); text-decoration: underline; cursor: pointer; padding: 4px 0; font-size: .85rem; justify-self: start; }

/* segmented switch (first batch / long-term) */
.seg { display: inline-grid; grid-auto-flow: column; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 3px; }
.seg button { border: 0; background: transparent; padding: 7px 12px; border-radius: 7px; cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--muted); white-space: nowrap; }
.seg button[aria-pressed="true"][data-batch="first"] { background: var(--first); color: #fff; }
.seg button[aria-pressed="true"][data-batch="long"] { background: var(--long); color: var(--surface); }

/* forms */
form.entry { display: grid; gap: 14px; }
.field { display: grid; gap: 5px; min-width: 0; align-content: start; }
.field > label, .lbl { font-weight: 600; font-size: .88rem; }
.hint { font-size: .8rem; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); outline: none; background: var(--surface); }
.field textarea { min-height: 64px; resize: vertical; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.three { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .two.stack { grid-template-columns: 1fr; } }
.unit { position: relative; }
.unit input { padding-right: 46px; }
.unit span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .88rem; pointer-events: none; }
.subbox { border: 1px dashed var(--line); border-radius: 10px; padding: 12px; display: grid; gap: 10px; background: var(--bg); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; cursor: pointer; }
.check input { width: 19px; height: 19px; margin-top: 2px; flex: none; accent-color: var(--accent); }
details.more summary { cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--accent); }
details.more[open] summary { margin-bottom: 12px; }

.photos { display: flex; gap: 8px; flex-wrap: wrap; }
.photo-slot { position: relative; width: 84px; height: 84px; border-radius: 10px; overflow: hidden; background: var(--bg); border: 1px solid var(--line); }
.photo-slot img { width: 100%; height: 100%; object-fit: cover; }
.photo-slot button { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; font-size: 14px; line-height: 1; }
.photo-add { width: 84px; height: 84px; border-radius: 10px; border: 1.5px dashed var(--line); display: grid; place-items: center; text-align: center; color: var(--accent); font-size: .78rem; font-weight: 600; cursor: pointer; position: relative; background: var(--bg); padding: 6px; }
.photo-add input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.gallery { display: grid; grid-auto-flow: column; grid-auto-columns: 100%; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: 10px; background: var(--bg); }
.gallery img { width: 100%; height: 300px; object-fit: contain; scroll-snap-align: start; }
dl.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 14px; margin: 0; }
dl.facts dt { color: var(--muted); font-size: .85rem; }
dl.facts dd { margin: 0; overflow-wrap: anywhere; }
.confirm { background: var(--danger-soft); border: 1px solid var(--danger); border-radius: 10px; padding: 12px; display: grid; gap: 8px; }
.banner { border: 1px dashed var(--muted); border-radius: 10px; padding: 10px 12px; font-size: .92rem; }
.warn-box { background: var(--danger-soft); color: var(--ink); border-radius: 10px; padding: 10px 12px; font-size: .9rem; }

/* history */
.log { display: grid; }
.log .entry { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 10px; padding-block: 9px; border-top: 1px solid var(--line); font-size: .9rem; }
.log .entry:first-child { border-top: 0; padding-top: 0; }
.log time { font-size: .75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.log .who { font-weight: 600; }
.log .act { display: inline-block; font-size: .68rem; letter-spacing: .05em; text-transform: uppercase; font-weight: 700; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; margin-right: 5px; }
.log .act.removed, .log .act.deleted { color: var(--danger); border-color: var(--danger); }
.log .act.moved, .log .act.shipped, .log .act.batch { color: var(--accent); border-color: var(--accent); }

.pick { display: grid; gap: 2px; max-height: 360px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; }
.pick .check { padding-block: 5px; }
.pick .grp { font-size: .72rem; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-top: 8px; }
.ship { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; text-align: left; width: 100%; }
.ship .nm { font-weight: 600; }

.bulkbar { position: sticky; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); background: var(--ink); color: var(--bg); border-radius: 12px; padding: 10px 12px; display: grid; gap: 8px; margin-top: 12px; box-shadow: var(--shadow); z-index: 4; }
.bulkbar .btn { background: transparent; color: var(--bg); border-color: color-mix(in srgb, var(--bg) 40%, transparent); }
.bulkbar .btn.primary { background: var(--bg); color: var(--ink); }
.bulkbar select, .bulkbar input { width: 100%; padding: 8px 10px; border-radius: 8px; border: 0; background: var(--surface); color: var(--ink); }

/* sign in */
.signin { max-width: 380px; margin: 12vh auto 0; display: grid; gap: 16px; }
.signin .logo { width: 56px; height: 56px; border-radius: 14px; }
.signin h1 { font-size: 1.6rem; }

.empty { text-align: center; padding: 32px 18px; color: var(--muted); display: grid; gap: 12px; justify-items: center; }
.notice { font-size: .88rem; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.err { color: var(--danger); border-color: var(--danger); }

.toast { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-weight: 600; z-index: 20; max-width: calc(100vw - 32px); box-shadow: var(--shadow); }
@media (prefers-reduced-motion: no-preference) { .toast { animation: rise .18s ease-out; } @keyframes rise { from { transform: translate(-50%, 8px); opacity: 0; } } }
.version { font-size: .72rem; color: var(--muted); opacity: .8; margin-left: 8px; letter-spacing: .02em; }

/* Items: directory path, folders and cards */
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; padding-block: 4px 12px; margin-bottom: 12px; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
.crumb { display: inline-flex; align-items: center; gap: 7px; border: 0; background: none; padding: 4px 2px; cursor: pointer; color: var(--muted); font-weight: 500; }
.crumb svg { width: 20px; height: 20px; }
.crumb:hover { color: var(--accent); }
.crumb.current { color: var(--ink); font-weight: 700; cursor: default; }
.crumbs .sep { color: var(--muted); opacity: .6; }
.searchbar { display: flex; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding-left: 12px; }
.searchbar:focus-within { border-color: var(--accent); }
.searchbar .glass { width: 20px; height: 20px; color: var(--muted); flex: none; }
.searchbar input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 13px 10px; font-size: 1.05rem; outline: none; }
.scanbtn { flex: none; border: 0; border-left: 1px solid var(--line); background: none; padding: 10px 14px; cursor: pointer; color: var(--ink); display: grid; place-items: center; }
.scanbtn svg { width: 24px; height: 24px; }
select.chip { appearance: none; -webkit-appearance: none; padding-right: 26px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 13px) 50%, calc(100% - 8px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.summary { display: flex; flex-wrap: wrap; gap: 6px 22px; color: var(--muted); font-size: .95rem; margin-block: 14px 12px; font-variant-numeric: tabular-nums; }
.summary b { color: var(--ink); font-weight: 600; }
.folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; margin-bottom: 14px; }
.folder { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 2px 10px; align-items: center; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; cursor: pointer; }
.folder:hover { border-color: var(--accent); }
.folder svg { width: 22px; height: 22px; color: var(--accent); grid-row: span 2; }
.folder .fname { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folder .fmeta { font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.folder .fbadge { grid-column: 2; }
.cards { display: grid; gap: 12px; }
.card { display: grid; grid-template-columns: 116px minmax(0, 1fr); align-items: stretch; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; cursor: pointer; padding: 0; box-shadow: var(--shadow); width: 100%; }
.card:hover { border-color: var(--accent); }
.card.removed { opacity: .6; }
.cimg { background: var(--long-soft); display: grid; place-items: center; color: var(--muted); min-height: 116px; }
.cimg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cimg svg { width: 32px; height: 32px; opacity: .5; }
.cmain { padding: 12px 14px; display: grid; gap: 5px; align-content: center; min-width: 0; }
.cpath { font-size: .78rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cpath b { color: var(--accent); }
.cname { font-weight: 700; font-size: 1.05rem; overflow-wrap: anywhere; }
.cnums { font-size: .88rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.cnums .dot { color: var(--line); margin-inline: 8px; font-weight: 400; }
.cside { display: none; }
@media (min-width: 640px) {
  .card { grid-template-columns: 150px minmax(0, 1fr) 220px; }
  .cimg { min-height: 150px; }
  .cside { display: grid; gap: 7px; align-content: center; padding: 12px 16px; border-left: 1px dashed var(--line); font-size: .82rem; min-width: 0; }
  .cside span { color: var(--muted); }
  .cside .cdesc { color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
}
.scanner { position: fixed; inset: 0; z-index: 30; background: rgba(10, 12, 16, .92); color: #fff; display: grid; align-content: center; justify-items: center; gap: 16px; padding: 24px; text-align: center; }
.scanframe { position: relative; width: min(84vw, 420px); aspect-ratio: 1; border-radius: 18px; overflow: hidden; background: #000; }
.scanframe video { width: 100%; height: 100%; object-fit: cover; }
.scanaim { position: absolute; inset: 18%; border: 3px solid rgba(255, 255, 255, .85); border-radius: 14px; }
.scanner .btn { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .3); }

/* Jobs */
nav.tabs { grid-template-columns: repeat(5, 1fr); }
nav.tabs button { font-size: .9rem; padding-inline: 2px; }
.jobadd { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 6px; box-shadow: var(--shadow); }
.jobadd input, .jobadd select { border: 0; background: transparent; padding: 9px 10px; min-width: 0; outline: none; }
.jobadd select { max-width: 150px; color: var(--muted); }
@media (max-width: 520px) { .jobadd { grid-template-columns: minmax(0, 1fr) auto; } .jobadd select { grid-column: 1; grid-row: 2; max-width: none; } }
.jobs-list { gap: 0; padding-block: 4px; }
.job { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; align-items: start; padding-block: 10px; border-top: 1px solid var(--line); }
.jobs-list > .job:first-child { border-top: 0; }
.job input[type=checkbox] { width: 22px; height: 22px; margin-top: 1px; accent-color: var(--ok); cursor: pointer; }
.jmain { border: 0; background: none; padding: 0; text-align: left; cursor: pointer; display: grid; gap: 4px; min-width: 0; }
.jt { font-weight: 600; overflow-wrap: anywhere; }
.jn { font-size: .85rem; color: var(--muted); }
.job.done .jt { text-decoration: line-through; color: var(--muted); font-weight: 500; }
.jobedit { margin-block: 4px 10px; }

/* Help */
.info { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--accent); color: var(--accent); background: transparent; font: italic 700 12px/1 Georgia, "Times New Roman", serif; cursor: pointer; padding: 0; flex: none; vertical-align: middle; margin-left: 4px; }
.info:hover { background: var(--accent); color: var(--accent-ink); }
.info.static { cursor: default; margin: 0 2px; }
.chips .info { align-self: center; }
.crumbhelp { margin-left: auto; }
.helpbtn { border: 1px solid var(--line); background: var(--surface); color: var(--accent); font-weight: 600; font-size: .85rem; border-radius: 999px; padding: 4px 12px; cursor: pointer; }
.helpsheet { position: fixed; inset: 0; z-index: 40; background: rgba(10, 12, 16, .45); display: grid; place-items: center; padding: 16px; }
.helpcard { background: var(--surface); color: var(--ink); border-radius: 16px; padding: 18px; width: min(520px, 100%); max-height: 85vh; overflow-y: auto; display: grid; gap: 12px; box-shadow: 0 10px 40px rgba(0, 0, 0, .25); }
@media (max-width: 560px) { .helpsheet { place-items: end stretch; padding: 0; } .helpcard { border-radius: 16px 16px 0 0; width: 100%; padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px)); } }
.helpx { border: 0; background: var(--bg); width: 30px; height: 30px; border-radius: 50%; font-size: 18px; cursor: pointer; color: var(--muted); flex: none; }
.helpbody { font-size: .95rem; }
.helpbody p, .helpbody li { margin: 0 0 6px; color: var(--ink); }
.helpbody ul, .helpbody ol { padding-left: 20px; margin: 0 0 6px; }
.helptable { border-collapse: collapse; font-size: .85rem; margin-bottom: 8px; }
.helptable th, .helptable td { border: 1px solid var(--line); padding: 4px 8px; text-align: center; }
.helptable td:first-child { text-align: left; font-weight: 600; }
.helpall details { border-top: 1px solid var(--line); padding-block: 10px; }
.helpall details:first-child { border-top: 0; padding-top: 0; }
.helpall summary { font-weight: 600; cursor: pointer; }
.helpall details[open] summary { margin-bottom: 8px; }
.welcome { border-color: var(--accent); background: var(--accent-soft); margin-bottom: 12px; }
.welcome .helpbody li { margin-bottom: 4px; }

/* Quantity stepper and value each/total */
.namerow { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 12px; }
@media (max-width: 420px) { .namerow { grid-template-columns: minmax(0, 1fr) 128px; } }
.stepper { display: grid; grid-template-columns: 38px minmax(0, 1fr) 38px; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: var(--bg); }
.stepper button { border: 0; background: var(--surface); font-size: 1.2rem; font-weight: 600; cursor: pointer; color: var(--accent); }
.stepper input { border: 0 !important; border-radius: 0 !important; text-align: center; padding-inline: 2px !important; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.seg.mini { padding: 2px; border-radius: 8px; }
.seg.mini button { padding: 2px 9px; font-size: .78rem; border-radius: 6px; }
.seg.mini button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
