/* GATI Showroom — Vianne. Mobile-first, photo-first. */
:root {
  /* surfaces */
  --bg: #F4F1EA;            /* grouped page background; also <meta theme-color> */
  --surface: #FFFFFF;       /* cards, inset lists, image pedestals */
  --surface-2: #FAF8F3;     /* margin tiles, row hover */
  --fill: #ECE8DE;          /* search field, chips, default buttons, inputs, no-photo placeholder */
  /* text */
  --ink: #1C1A17;
  --ink-2: #3B3731;
  --muted: #6B6459;         /* 5.85:1 on white, 5.18:1 on bg, 4.78:1 on fill */
  /* hairlines */
  --line: rgba(28,26,23,.12);
  --line-2: rgba(28,26,23,.07);
  --line-strong: #D9D2C4;
  /* brand */
  --gold: #A8834A;          /* decorative only: lotus, dots, focus ring, active icon stroke, buyer frame; never text */
  --gold-ink: #7F6133;      /* the one text accent: links, back, active tab label, gold buttons (5.74:1 on white) */
  --gold-soft: #F3EBDD;
  /* semantic: green = resolved/on hand, amber = estimate/stale/size check, red = unresolved/error */
  --green: #1F6B40;  --green-soft: #E4F1E8;
  --amber: #9A5A0A;  --amber-soft: #FBEFDA;
  --red: #B23A2E;    --red-soft: #F9E7E4;
  --blue: #2C5D8F;   --blue-soft: #E5EDF6;
  --violet: #6A4C93; --violet-soft: #EEE8F6;
  --gray: #5F594F;   --gray-soft: #EFECE6;
  /* shape */
  --radius-lg: 18px;
  --radius: 12px;
  --radius-sm: 10px;
  --shadow: none;
  --shadow-lg: 0 8px 24px rgba(28,26,23,.14), 0 1px 2px rgba(28,26,23,.06);
  /* type */
  --serif: ui-serif, "New York", "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, ui-sans-serif, "SF Pro Text", "Helvetica Neue", Helvetica, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  /* chrome */
  --header-h: 52px;
  --nav-h: 50px;
  --gutter: 16px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.45 var(--sans);
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--nav-h) + var(--safe-b));
}
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--gold-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
.num { font-variant-numeric: tabular-nums; }
.serif { font-family: var(--serif); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------------------------------------------------------------- header */
.topbar {
  position: sticky; top: 0; z-index: 30;
  height: var(--header-h);
  display: flex; align-items: center; gap: 10px;
  padding: 0 14px;
  background: rgba(247, 244, 238, .92);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 9px; min-width: 0; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand img { width: 26px; height: 28px; object-fit: contain; }
.brand .wordmark { font-family: var(--serif); letter-spacing: .28em; font-size: 17px; }
.brand .sub { font-size: 10.5px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; margin-left: 2px; }
.topbar .spacer { flex: 1; }
.fresh {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); background: var(--surface);
  border-radius: 999px; padding: 4px 10px; font-size: 12px; color: var(--ink-2);
  cursor: pointer; white-space: nowrap;
}
.fresh .short { display: none; }
.fresh .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.fresh.warn .dot { background: var(--amber); }
.fresh.stale .dot { background: var(--red); }
.desknav { display: none; gap: 4px; }
.desknav a {
  padding: 7px 12px; border-radius: 999px; color: var(--ink-2); font-size: 14px;
}
.desknav a.active { background: var(--ink); color: #fff; }
.desknav a:hover { text-decoration: none; background: var(--line-2); }
.desknav a.active:hover { background: var(--ink); }
.badge-count {
  display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px;
  border-radius: 999px; background: var(--gold); color: #fff; font-size: 11px; line-height: 18px; text-align: center;
}

/* ------------------------------------------------------------ bottom nav */
.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  height: calc(var(--nav-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
}
.bottomnav a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--muted); font-size: 11px; position: relative;
}
.bottomnav a:hover { text-decoration: none; }
.bottomnav a.active { color: var(--ink); }
.bottomnav a.active svg { stroke: var(--gold); }
.bottomnav svg { width: 23px; height: 23px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.bottomnav .badge-count { position: absolute; top: 6px; left: 54%; }

/* ------------------------------------------------------------------ main */
main#view { max-width: 1400px; margin: 0 auto; padding: 12px 14px 28px; }
.page-title { font-family: var(--serif); font-weight: 400; font-size: 26px; margin: 6px 0 12px; letter-spacing: .01em; }
.section-title { font-family: var(--serif); font-weight: 400; font-size: 19px; margin: 22px 0 10px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.pad { padding: 14px; }

/* --------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 42px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font-weight: 550; font-size: 14px; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { background: var(--surface-2); border-color: #d8cfbf; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.primary:hover { background: #33302b; }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn.gold:hover { background: var(--gold-ink); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.danger { color: var(--red); }
.btn.small { min-height: 34px; padding: 0 12px; font-size: 13px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn.block { width: 100%; }
.section-gap { height: 12px; }
.btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.iconbtn {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none;
}
.iconbtn svg { width: 20px; height: 20px; stroke: var(--ink-2); fill: none; stroke-width: 1.7; }
.iconbtn.active { border-color: var(--ink); background: var(--ink); }
.iconbtn.active svg { stroke: #fff; }

/* ---------------------------------------------------------------- inputs */
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.field label { font-size: 12.5px; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
.input, select.input, textarea.input {
  width: 100%; min-height: 44px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface);
  outline: none; transition: border-color .15s, box-shadow .15s; font-size: 16px;
}
textarea.input { min-height: 70px; resize: vertical; }
.input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.input.money { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- search */
.searchbar {
  position: sticky; top: var(--header-h); z-index: 20;
  margin: -12px -14px 0; padding: 10px 14px 8px;
  background: linear-gradient(var(--bg) 82%, rgba(247, 244, 238, 0));
}
.searchrow { display: flex; gap: 8px; align-items: center; }
.search {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: 0 8px 0 14px; min-height: 46px; box-shadow: var(--shadow);
}
.search svg { width: 19px; height: 19px; stroke: var(--muted); fill: none; stroke-width: 1.8; flex: none; }
.search input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 16px; min-width: 0; padding: 10px 0; }
.search .clear { border: 0; background: var(--line-2); width: 26px; height: 26px; border-radius: 50%; cursor: pointer; color: var(--muted); font-size: 15px; line-height: 1; }
.chips { display: flex; gap: 7px; overflow-x: auto; padding: 10px 0 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  border-radius: 999px; padding: 6px 12px; font-size: 13px; cursor: pointer; white-space: nowrap;
}
.chip .n { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip.on .n { color: #d9d3c8; }
.chip.filter { border-style: dashed; }
.chip .x { font-size: 15px; line-height: 1; margin-left: 2px; opacity: .7; }
.resultbar { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 6px 0 10px; font-size: 13px; color: var(--muted); }

/* ------------------------------------------------------------------ grid */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tile {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; color: var(--ink); position: relative;
  transition: box-shadow .2s, transform .2s;
}
.tile:hover { text-decoration: none; box-shadow: var(--shadow); }
.tile .ph { position: relative; aspect-ratio: 1 / 1; background: #fff; overflow: hidden; }
.tile .ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.tile .ph .noimg { position: absolute; inset: 0; }
.tile .ph .count { position: absolute; right: 7px; bottom: 7px; background: rgba(29,27,24,.66); color: #fff; font-size: 11px; padding: 2px 7px; border-radius: 999px; }
.noimg {
  width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  color: var(--muted); font-size: 12px; text-align: center; padding: 12px; background: repeating-linear-gradient(135deg, #fbf9f5, #fbf9f5 10px, #f6f2ea 10px, #f6f2ea 20px);
}
.noimg svg { width: 28px; height: 28px; stroke: #c4baa8; fill: none; stroke-width: 1.4; }
.tile .body { padding: 9px 10px 11px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tile .t1 { display: flex; justify-content: space-between; gap: 6px; align-items: baseline; }
.tile .style { font-family: var(--serif); font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .price { font-weight: 650; font-size: 13.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tile .meta { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .code { font-size: 11.5px; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.tile .pills { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 4px; }
.loadmore { display: flex; justify-content: center; padding: 18px 0 6px; }

/* ----------------------------------------------------------------- pills */
.pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; line-height: 18px; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis;
  background: var(--gray-soft); color: var(--gray);
}
.pill.on_hand { background: var(--green-soft); color: var(--green); }
.pill.on_memo { background: var(--blue-soft); color: var(--blue); }
.pill.show { background: var(--violet-soft); color: var(--violet); }
.pill.sold { background: var(--gray-soft); color: var(--gray); }
.pill.split { background: var(--amber-soft); color: var(--amber); }
.pill.unverified { background: var(--red-soft); color: var(--red); }
.pill.warn { background: var(--amber-soft); color: var(--amber); }
.pill.gold { background: var(--gold-soft); color: var(--gold-ink); }
.pill.line { background: transparent; border: 1px solid var(--line); color: var(--ink-2); }

/* ----------------------------------------------------------------- piece */
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-2); font-size: 14px; margin: 4px 0 10px; cursor: pointer; background: none; border: 0; padding: 4px 0; }
.back svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }
.piece { display: grid; gap: 16px; }
.piece > *, .info, .costgrid > *, .traydesk > * { min-width: 0; }
.gallery .main {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; cursor: zoom-in;
}
.gallery .main img { width: 100%; height: 100%; object-fit: contain; }
.gallery .thumbs { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; }
.gallery .thumbs button { flex: none; width: 64px; height: 64px; border-radius: 10px; border: 1px solid var(--line); background: #fff; padding: 0; overflow: hidden; cursor: pointer; }
.gallery .thumbs button.on { border: 2px solid var(--gold); }
.gallery .thumbs img { width: 100%; height: 100%; object-fit: contain; }
.gallery .caption { font-size: 12px; color: var(--muted); margin-top: 6px; display: flex; gap: 6px; align-items: center; }
.ptitle { font-family: var(--serif); font-size: 30px; font-weight: 400; margin: 0; line-height: 1.15; letter-spacing: .01em; }
.psub { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0 4px; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 14px 0; }
.fact { background: var(--surface); padding: 10px 12px; min-width: 0; }
.fact .k { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.fact .v { font-size: 15px; margin-top: 2px; overflow-wrap: anywhere; }
.fact .v .raw { display: block; font-size: 11.5px; color: var(--muted); font-family: ui-monospace, Menlo, monospace; }
.fact.wide { grid-column: 1 / -1; }
.callout { border-radius: var(--radius-sm); padding: 10px 12px; font-size: 13.5px; margin: 8px 0; display: flex; gap: 9px; align-items: flex-start; }
.callout svg { width: 18px; height: 18px; flex: none; margin-top: 1px; fill: none; stroke: currentColor; stroke-width: 1.9; }
.callout.warn { background: var(--amber-soft); color: #6e4510; }
.callout.danger { background: var(--red-soft); color: #7c271e; }
.callout.info { background: var(--blue-soft); color: #1f4369; }
.callout.ok { background: var(--green-soft); color: #1e5134; }
.callout.gold { background: var(--gold-soft); color: #5e4722; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.stickyact {
  position: sticky; bottom: calc(var(--nav-h) + var(--safe-b) + 8px); z-index: 15;
  display: flex; gap: 8px; padding: 8px; margin-top: 16px;
  background: rgba(255,255,255,.95); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow-lg);
}
.stickyact .btn { flex: 1; }

/* ----------------------------------------------------------------- table */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th, table.data td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--line-2); vertical-align: top; }
table.data th { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 650; background: var(--surface-2); white-space: nowrap; }
table.data td.r, table.data th.r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data tr:last-child td { border-bottom: 0; }
table.data tfoot td { font-weight: 650; background: var(--surface-2); }
.kind-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: var(--gray); vertical-align: 1px; }
.kind-dot.diamond { background: #7aa7d9; }
.kind-dot.metal { background: var(--gold); }

/* --------------------------------------------------------------- timeline */
.timeline { list-style: none; margin: 0; padding: 0 0 0 4px; }
.timeline li { position: relative; padding: 0 0 14px 22px; border-left: 2px solid var(--line); }
.timeline li:last-child { border-left-color: transparent; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--gold); }
.timeline li.current::before { background: var(--gold); }
.timeline li.muted::before { border-color: #cfc6b6; }
.timeline .when { font-size: 12px; color: var(--muted); }
.timeline .what { font-weight: 600; font-size: 14px; }
.timeline .detail { font-size: 13px; color: var(--ink-2); }

/* ----------------------------------------------------------- collapsible */
details.fold { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin: 10px 0; }
details.fold > summary { list-style: none; cursor: pointer; padding: 13px 14px; display: flex; justify-content: space-between; align-items: center; font-weight: 600; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: "+"; font-size: 20px; color: var(--muted); font-weight: 300; }
details.fold[open] > summary::after { content: "–"; }
details.fold > .inner { padding: 0 14px 14px; }
dl.kv { display: grid; grid-template-columns: minmax(120px, min(38%, 240px)) 1fr; gap: 6px 12px; margin: 0; font-size: 13px; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; overflow-wrap: anywhere; }
pre.raw { background: #1d1b18; color: #ece6da; border-radius: var(--radius-sm); padding: 12px; overflow: auto; font-size: 12px; max-height: 60vh; }
pre.report { white-space: pre-wrap; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; font-size: 12.5px; max-height: 70vh; overflow: auto; }

/* --------------------------------------------------------------- costing */
.costgrid { display: grid; gap: 12px; }
.costcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.costcard h3 { font-family: var(--serif); font-weight: 400; font-size: 18px; margin: 0 0 2px; }
.costcard .kicker { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.bignum { font-size: 28px; font-weight: 650; font-variant-numeric: tabular-nums; margin: 6px 0 2px; }
.bignum.incomplete { color: var(--red); font-size: 20px; }
.costrows { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 8px; }
.costrows td { padding: 5px 0; border-bottom: 1px dashed var(--line); vertical-align: top; }
.costrows td.r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; padding-left: 10px; width: 1%; }
.costrows td:first-child { width: 100%; overflow-wrap: break-word; }  /* label takes the room and wraps at words */
.costrows tr.total td { font-weight: 700; border-bottom: 0; border-top: 1px solid var(--ink); }
.marginrow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.marginrow .m { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px; text-align: center; }
.marginrow .m .k { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.marginrow .m .v { font-size: 17px; font-weight: 650; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ tray */
.traylist { display: grid; gap: 10px; }
.trayrow { display: flex; align-items: center; gap: 12px; padding: 12px 14px; color: var(--ink); }
.trayrow:hover { text-decoration: none; background: var(--surface-2); }
.trayrow .grow { flex: 1; min-width: 0; }
.trayrow .t { font-family: var(--serif); font-size: 17px; }
.tline { display: grid; grid-template-columns: 76px 1fr; gap: 12px; padding: 12px; border-bottom: 1px solid var(--line-2); }
.tline:last-child { border-bottom: 0; }
.tline .lph { width: 76px; height: 76px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.tline .lph img { width: 100%; height: 100%; object-fit: contain; }
.tline .lt { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.tline .lname { font-family: var(--serif); font-size: 16px; }
.tline .ltotal { font-weight: 650; font-variant-numeric: tabular-nums; text-align: right; }
.tline .lerr { color: var(--red); font-size: 12.5px; margin-top: 6px; }
.tline .lwarn { color: var(--amber); font-size: 12.5px; margin-top: 4px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--surface); }
.qty button { width: 38px; height: 40px; border: 0; background: transparent; font-size: 18px; cursor: pointer; }
.qty input { width: 52px; text-align: center; border: 0; outline: 0; font-size: 16px; background: transparent; }
.totalbar { display: flex; justify-content: space-between; align-items: baseline; padding: 14px; font-size: 15px; }
.totalbar .amt { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.exportbox { display: grid; gap: 8px; }
.toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; user-select: none; }
.toggle input { width: 18px; height: 18px; accent-color: var(--gold); }

/* ----------------------------------------------------------------- sheet */
.scrim { position: fixed; inset: 0; background: rgba(29, 27, 24, .42); z-index: 60; opacity: 0; transition: opacity .2s; }
.scrim.show { opacity: 1; }
.sheet {
  position: fixed; z-index: 61; left: 0; right: 0; bottom: 0; max-height: 88vh; overflow: auto;
  background: var(--surface); border-radius: 20px 20px 0 0; box-shadow: var(--shadow-lg);
  padding: 8px 16px calc(18px + var(--safe-b)); transform: translateY(100%); transition: transform .24s ease;
}
.sheet.show { transform: translateY(0); }
.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 4px auto 10px; }
.sheet h2 { font-family: var(--serif); font-weight: 400; font-size: 22px; margin: 2px 0 12px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }  /* page forms too, not only sheets */
.lightbox { position: fixed; inset: 0; z-index: 80; background: rgba(15, 14, 12, .94); display: flex; align-items: center; justify-content: center; }
.lightbox img { max-width: 96vw; max-height: 92vh; object-fit: contain; background: #fff; border-radius: 6px; }
.lightbox .close { position: absolute; top: 14px; right: 14px; background: rgba(255,255,255,.15); color: #fff; border: 0; width: 44px; height: 44px; border-radius: 50%; font-size: 22px; cursor: pointer; }

/* ----------------------------------------------------------------- toast */
.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + var(--safe-b) + 14px); z-index: 90; display: grid; gap: 8px; width: min(92vw, 440px); }
.toast { background: var(--ink); color: #fff; border-radius: 12px; padding: 11px 14px; font-size: 14px; box-shadow: var(--shadow-lg); animation: rise .2s ease; }
.toast.error { background: var(--red); }
.toast.ok { background: #24563a; }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ----------------------------------------------------------------- login */
.loginwrap { min-height: calc(100vh - 40px); display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.loginbox { width: min(420px, 100%); text-align: center; }
.loginbox img.logo { width: 74px; margin: 0 auto 10px; }
.loginbox .wordmark { font-family: var(--serif); letter-spacing: .34em; font-size: 26px; margin-left: .34em; }
.loginbox .tag { color: var(--muted); font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; margin: 4px 0 26px; }
.loginbox form { text-align: left; }
.loginbox .err { color: var(--red); font-size: 13.5px; min-height: 20px; margin: 4px 0 8px; }
.loginbox .fine { color: var(--muted); font-size: 12px; margin-top: 18px; }
body.login-mode { padding-bottom: 0; }
body.login-mode .topbar, body.login-mode .bottomnav { display: none; }

/* ------------------------------------------------------------ exceptions */
.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 8px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.exrow { display: grid; grid-template-columns: 56px 1fr; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--line-2); color: var(--ink); }
.exrow:hover { text-decoration: none; background: var(--surface-2); }
.exrow .xph { width: 56px; height: 56px; border-radius: 9px; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.exrow .xph img { width: 100%; height: 100%; object-fit: contain; }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty svg { width: 42px; height: 42px; stroke: #cbbfa9; fill: none; stroke-width: 1.3; margin: 0 auto 8px; display: block; }
.skeleton { background: linear-gradient(90deg, #f1ece3 25%, #f8f5ef 50%, #f1ece3 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: var(--radius); }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.spinner { width: 22px; height: 22px; border: 2.5px solid var(--line); border-top-color: var(--gold); border-radius: 50%; animation: spin .8s linear infinite; margin: 30px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------ responsive */
@media (max-width: 559px) {
  .brand .sub { display: none; }
  .brand .wordmark { font-size: 15px; letter-spacing: .22em; }
  .fresh .long { display: none; }
  .fresh .short { display: inline; }
  .searchrow { gap: 6px; }
  .searchrow .iconbtn { width: 40px; height: 40px; }
}
.costwide { margin-top: 18px; }
@media (min-width: 560px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .bottomnav { display: none; }
  .desknav { display: flex; }
  .topbar { padding: 0 24px; height: 62px; --header-h: 62px; }
  main#view { padding: 18px 24px 40px; }
  .searchbar { top: 62px; margin: -18px -24px 0; padding: 14px 24px 8px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
  .piece { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 32px; align-items: start; }
  .piece .gallery { position: sticky; top: 80px; }
  .components-table td:nth-child(2) { white-space: nowrap; }
  .components-table td:first-child { min-width: 170px; }
  .costgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
  .sheet { left: 50%; right: auto; bottom: auto; top: 50%; width: min(560px, 92vw); border-radius: 20px; transform: translate(-50%, -46%) scale(.98); opacity: 0; transition: transform .2s, opacity .2s; }
  .sheet.show { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  .sheet .grab { display: none; }
  .stickyact { position: static; box-shadow: none; border-radius: var(--radius); }
  .toasts { bottom: 24px; }
  .traydesk { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 20px; align-items: start; }
  .traydesk .side { position: sticky; top: 84px; }
}
@media (min-width: 1200px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Keep detail content within its grid/flex cell; do not hide overflow. */
.info, .costcard, .callout > div, .gallery .caption, .timeline .detail,
.timeline .what, dl.kv > *, .tline > *, .exrow > * {
  min-width: 0;
  overflow-wrap: anywhere;
}
.input { min-width: 0; max-width: 100%; }
.marginrow { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.marginrow .m { min-width: 0; overflow-wrap: anywhere; }
.tline { grid-template-columns: 76px minmax(0, 1fr); }
.exrow { grid-template-columns: 56px minmax(0, 1fr); }
.row2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

@media (max-width: 559px) {
  /* Component costs used to sit offscreen inside a horizontally scrolling table. */
  table.components-table, .components-table tbody, .components-table tfoot { display: block; }
  .components-table thead { display: none; }
  .components-table tr { display: block; padding: 8px 10px; border-bottom: 1px solid var(--line); }
  table.components-table td, table.components-table td.r {
    display: grid; grid-template-columns: minmax(76px, .75fr) minmax(0, 1.25fr);
    gap: 8px; padding: 5px 0; border: 0; text-align: left;
    white-space: normal; overflow-wrap: anywhere;
  }
  .components-table td::before { content: attr(data-label); color: var(--muted); font-size: 12px; font-weight: 500; }
  table.components-table td:first-child { display: block; font-weight: 600; padding-bottom: 8px; }
  .components-table td:first-child::before { display: none; }
  .components-table td:empty { display: none; }
  .components-table tfoot tr { background: var(--surface-2); }
  .stickyact { border-radius: var(--radius); }
  .stickyact .btn { min-width: 0; white-space: normal; padding: 8px; }
  .gallery .caption { flex-wrap: wrap; }
  .costrows td:first-child { overflow-wrap: break-word; }  /* 'anywhere' let the column collapse to one character per line */
}
@media (max-width: 379px) {
  .row2 { grid-template-columns: minmax(0, 1fr); }
  .marginrow { grid-template-columns: minmax(0, 1fr); }
  dl.kv { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); }
}
/* Booth release: controls stay readable on small phones. */
.user-row, .followup-row { padding: 12px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.user-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.user-row > div { min-width: 0; }
.scanner-video { display: block; width: 100%; height: 42vh; object-fit: contain; background: #111; } /* contain: every pixel ZXing decodes is visible */
.viewfinder { position: relative; overflow: hidden; border-radius: 10px; background: #111; margin-bottom: 8px; }
.reticle { position: absolute; top: 25%; height: 50%; aspect-ratio: 1 / 1; left: 50%; transform: translateX(-50%); border: 2px solid #fff; border-radius: 10px; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .38); pointer-events: none; }
.err { color: var(--red); overflow-wrap: anywhere; }
.err:not(:empty), [role=status]:not(:empty) { margin-bottom: 12px; } /* a shown message gets room above the submit button */
@media (max-width:559px) { .bottomnav a { font-size:10px; min-width:0; } }
@media(max-width:359px){
  .topbar{gap:6px;padding-left:10px;padding-right:10px}
  .topbar .brand{gap:5px}
  .topbar .brand .wordmark{font-size:13px;letter-spacing:.15em}
  #buyer-toggle{font-size:11px;padding-left:8px;padding-right:8px;white-space:nowrap}
}

/* ===== 1.2.0 restyle — appended; every rule wins over the rules above by source order ===== */
[hidden] { display: none !important; }
body { font: 15px/1.4 var(--sans); }
.small { font-size: 13px; } .tiny { font-size: 12px; } .mono { font-family: var(--mono); font-size: 12px; }
a { color: var(--gold-ink); } .chip:hover { text-decoration: none; }
/* header + tab bar */
.topbar { padding: 0 var(--gutter); gap: 8px; background: rgba(244,241,234,.78); backdrop-filter: saturate(1.8) blur(20px); -webkit-backdrop-filter: saturate(1.8) blur(20px); border-bottom: 1px solid var(--line); }
.brand img { width: 24px; height: 26px; }
.brand .wordmark { font-size: 16px; letter-spacing: .24em; }
.brand .sub { font-size: 12px; }
#buyer-toggle { min-height: 44px; padding: 0 14px; border: 0; background: var(--gold-soft); color: var(--gold-ink); font-size: 15px; font-weight: 600; }
.fresh { min-height: 44px; border: 0; background: transparent; padding: 0 6px; font-size: 13px; font-weight: 500; color: var(--muted); }
.fresh.buyer { background: var(--gold-soft); color: var(--gold-ink); padding: 0 12px; font-weight: 600; }
.fresh.buyer .dot { background: var(--gold); }
body.buyer .topbar { border-bottom: 2px solid var(--gold); }
body.buyer #result-sync, body.buyer .fact .raw { display: none; }
.desknav a { color: var(--muted); font-weight: 500; }
.desknav a:hover { background: var(--fill); }
.desknav a.active, .desknav a.active:hover { background: transparent; color: var(--ink); font-weight: 600; }
.badge-count { background: var(--gold-ink); font-size: 12px; }
.bottomnav { background: rgba(255,255,255,.94); backdrop-filter: saturate(1.8) blur(20px); -webkit-backdrop-filter: saturate(1.8) blur(20px); }
.bottomnav a { font-size: 12px; font-weight: 500; gap: 2px; min-width: 0; }
.bottomnav a.active { color: var(--gold-ink); }
.bottomnav a.active svg { stroke: var(--gold-ink); }
.bottomnav svg { width: 24px; height: 24px; stroke-width: 1.5; }
.bottomnav .badge-count { top: 2px; left: 55%; }
@supports not (backdrop-filter: blur(1px)) { .topbar, .bottomnav, .stickyact { background: rgba(255,255,255,.96); } }
/* page, cards, type */
main#view { padding: 12px var(--gutter) 32px; }
.page-title { font-size: 30px; line-height: 1.2; letter-spacing: -.01em; margin: 8px 0 16px; }
.section-title { font-size: 22px; margin: 28px 0 10px; }
.card > .section-title { margin-top: 0; }
.card { border: 0; box-shadow: none; border-radius: var(--radius-lg); }
main#view > .card + .card, .calcform > .card + .card { margin-top: 12px; }
.pad { padding: 16px; }
/* buttons, inputs, chips */
.btn { min-height: 44px; padding: 0 18px; border: 0; background: var(--fill); color: var(--ink); font-size: 15px; font-weight: 600; }
.btn:hover { background: #E4DFD4; }
.btn.primary { background: var(--ink); color: #fff; } .btn.primary:hover { background: #2E2B26; }
.btn.gold { background: var(--gold-ink); color: #fff; } .btn.gold:hover { background: #6B5129; }
.btn.ghost { background: transparent; } .btn.ghost:hover { background: var(--fill); }
.btn.danger { color: var(--red); }
.btn.small { min-height: 44px; padding: 0 14px; font-size: 14px; }
.iconbtn, .searchrow .iconbtn { width: 44px; height: 44px; border: 0; background: var(--fill); }
.iconbtn.active { background: var(--ink); }
.infobtn { width: 44px; height: 44px; margin: -11px -4px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; cursor: pointer; }
.infobtn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.field { gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; font-weight: 500; letter-spacing: 0; }
.input, select.input, textarea.input { min-height: 48px; padding: 12px 14px; border: 0; border-radius: var(--radius-sm); background: var(--fill); }
textarea.input { min-height: 80px; }
.input:focus { background: var(--surface); box-shadow: 0 0 0 2px var(--gold); }
.toggle { align-items: flex-start; padding: 11px 0; font-size: 15px; }
.toggle input { width: 22px; height: 22px; flex: none; accent-color: var(--gold-ink); }
.chips { gap: 8px; padding: 8px 0 4px; }
.chip { min-height: 44px; padding: 0 14px; border: 0; background: var(--fill); color: var(--ink); font-size: 15px; font-weight: 500; }
.chip .n { font-size: 13px; }
.chip.on { background: var(--ink); color: #fff; } .chip.on .n { color: #CFC8BB; }
.chip.filter { border: 0; background: var(--gold-soft); color: var(--gold-ink); }
.chip[disabled] { opacity: .45; cursor: not-allowed; }
/* search + result bar */
.searchbar { margin: -12px calc(-1 * var(--gutter)) 0; padding: 8px var(--gutter) 4px; background: var(--bg); }
.search { border: 0; box-shadow: none; background: var(--fill); border-radius: 12px; min-height: 44px; padding: 0 0 0 12px; }
.search svg { width: 18px; height: 18px; stroke-width: 2; }
.search input { padding: 8px 0; }
.search input::-webkit-search-cancel-button, .search input::-webkit-search-decoration { -webkit-appearance: none; }
.search .clear { width: 44px; height: 44px; background: radial-gradient(circle, rgba(28,26,23,.14) 0 13px, transparent 14px); color: var(--ink-2); font-size: 17px; }
.search input:placeholder-shown + .clear { display: none; }
.resultbar { margin: 6px 0 12px; font-size: 13px; }
/* grid + tiles */
.grid { gap: 20px 12px; }
.tile { background: transparent; border: 0; border-radius: 0; overflow: visible; }
.tile:hover { box-shadow: none; }
.tile .ph { border-radius: 16px; }
.tile .ph::after, .gallery .main::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(28,26,23,.06); pointer-events: none; }
.tile .ph img { transition: transform .25s ease; }
@media (hover: hover) { .tile:hover .ph img { transform: scale(1.03); } }
.tile .ph .count { right: 10px; bottom: 10px; background: rgba(28,26,23,.8); font-size: 12px; font-weight: 600; padding: 3px 8px; }
.tile.skeleton { background: none; animation: none; }
.tile.skeleton .ph { background: linear-gradient(90deg, #ECE8DE 25%, #F6F3ED 50%, #ECE8DE 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
.noimg { background: var(--fill); font-size: 12px; }
.noimg svg { stroke: #C9C1B2; }
.tile .body { padding: 10px 2px 0; gap: 2px; }
.tile .style { font-family: var(--sans); font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.tile .price { font-size: 16px; font-weight: 600; }
.tile .meta { font-size: 13px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tile .code { font-size: 12px; font-family: var(--mono); }
.tile .pills { margin-top: 6px; }
.loadmore { padding: 24px 0 8px; }
.empty { padding: 44px 16px; font-size: 15px; grid-column: 1 / -1; }
.empty svg { width: 40px; height: 40px; stroke: #C9C1B2; }
.empty .tip { margin-top: 8px; }
/* pills */
.pill { font-size: 12px; padding: 2px 8px; }
.pill.line { background: var(--fill); border: 0; }
/* piece */
.back { color: var(--gold-ink); font-size: 17px; min-height: 44px; margin: 0 0 4px; }
.back svg { width: 20px; height: 20px; stroke-width: 2.2; }
.gallery .main { position: relative; border: 0; border-radius: var(--radius-lg); }
.gallery .thumbs { gap: 10px; margin-top: 12px; padding: 2px; }
.gallery .thumbs button { border: 0; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); }
.gallery .thumbs button.on { border: 0; box-shadow: inset 0 0 0 2px var(--gold); }
.gallery .caption { font-size: 13px; margin-top: 8px; }
.ptitle { letter-spacing: -.01em; margin-top: 12px; }
.psub { margin: 10px 0 0; }
.facts { display: block; background: var(--surface); border: 0; border-radius: var(--radius-lg); padding: 0 16px; margin: 16px 0; }
.fact { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; min-height: 48px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.fact:last-child { border-bottom: 0; }
.fact .k { font-size: 15px; text-transform: none; letter-spacing: 0; flex: none; }
.fact .v { font-size: 17px; margin: 0; text-align: right; }
.fact .v .raw { font-size: 12px; font-family: var(--mono); }
.fact.price .v { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.callout { border-radius: var(--radius); padding: 12px 14px; font-size: 15px; line-height: 1.4; margin: 10px 0; border-left: 2px solid currentColor; }
.stickyact { bottom: calc(var(--nav-h) + var(--safe-b)); margin: 16px calc(-1 * var(--gutter)) 0; padding: 10px var(--gutter); gap: 10px; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: rgba(255,255,255,.94); backdrop-filter: saturate(1.8) blur(20px); -webkit-backdrop-filter: saturate(1.8) blur(20px); box-shadow: none; }
.stickyact .btn { min-height: 48px; padding: 0 12px; }
details.fold { border: 0; border-radius: var(--radius-lg); margin: 10px 0; }
details.fold > summary { padding: 14px 16px; min-height: 52px; font-size: 17px; font-weight: 500; justify-content: flex-start; gap: 8px; }
details.fold > summary::after { content: ""; flex: none; margin: 0 4px 0 auto; width: 9px; height: 9px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(-45deg); transition: transform .2s; }
details.fold[open] > summary::after { content: ""; transform: rotate(45deg); }
details.fold[open] > summary { border-bottom: 1px solid var(--line); }
details.fold > .inner { padding: 12px 16px 16px; }
.info > div > details.fold { margin: 0; border-radius: 0; }
.info > div > details.fold:first-child { border-top-left-radius: var(--radius-lg); border-top-right-radius: var(--radius-lg); }
.info > div > details.fold:last-child { border-bottom-left-radius: var(--radius-lg); border-bottom-right-radius: var(--radius-lg); }
.info > div > details.fold + details.fold { border-top: 1px solid var(--line); }
dl.kv { font-size: 15px; gap: 0 12px; }
dl.kv dt, dl.kv dd { padding: 10px 0; border-bottom: 1px solid var(--line); }
dl.kv dt:last-of-type, dl.kv dd:last-of-type { border-bottom: 0; }
.tablewrap { border: 0; box-shadow: inset 0 0 0 1px var(--line); }
table.data { font-size: 15px; } table.data th { font-size: 12px; }
.timeline li { border-left: 1px solid var(--line-strong); padding-bottom: 16px; }
.timeline .when { font-size: 13px; } .timeline .what, .timeline .detail { font-size: 15px; }
/* costing (admin) */
.costcard { border: 0; border-radius: var(--radius-lg); padding: 16px; }
.costcard h3 { font-size: 22px; margin: 2px 0 4px; }
.costcard .kicker { font-size: 12px; letter-spacing: .06em; }
.bignum { font-size: 28px; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; margin: 10px 0 4px; }
.bignum .k { display: block; font-size: 13px; font-weight: 500; letter-spacing: 0; color: var(--muted); margin-bottom: 2px; }
.bignum.incomplete { font-size: 22px; }
.costrows { font-size: 15px; margin-top: 10px; }
.costrows td { padding: 9px 0; border-bottom: 1px solid var(--line); }
.costrows tr.total td { font-weight: 600; }
.grouphead { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 16px 0 6px; }
.marginrow .m { background: var(--surface-2); border: 0; border-radius: var(--radius); padding: 12px 8px; }
.marginrow .m .k { font-size: 12px; }
.marginrow .m .v { font-size: 20px; font-weight: 600; margin-top: 2px; }
/* lists: trays, tray lines, exceptions, users, follow-ups */
.traylist { gap: 0; }
.trayrow { padding: 14px 16px; min-height: 60px; border-bottom: 1px solid var(--line); }
.trayrow:last-child { border-bottom: 0; }
.trayrow .t { font-family: var(--sans); font-size: 17px; font-weight: 600; }
.tline { grid-template-columns: 72px minmax(0, 1fr); gap: 14px; padding: 14px 16px; border-bottom-color: var(--line); }
.tline .lph { width: 72px; height: 72px; border: 0; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line-2); }
.tline .lerr, .tline .lwarn { font-size: 13px; }
.qty { border: 0; background: var(--fill); }
.qty button { width: 44px; height: 44px; font-size: 20px; }
.totalbar { padding: 16px; font-size: 17px; }
.totalbar .amt { font-size: 24px; font-weight: 600; }
.tabs { gap: 8px; margin: 0 calc(-1 * var(--gutter)) 8px; padding: 0 var(--gutter) 4px; }
.exrow { gap: 14px; padding: 14px 16px; border-bottom-color: var(--line); }
.exrow:last-child { border-bottom: 0; }
.exrow .xph { border: 0; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line-2); }
.exrow b { font-size: 17px; font-weight: 600; }
.user-row, .followup-row { padding: 14px 0; }
.user-row:last-child, .followup-row:last-child { border-bottom: 0; }
.followup-row > a { display: inline-flex; align-items: center; min-height: 44px; font-size: 17px; font-weight: 600; }
/* sheet, lightbox, toast, login */
.sheet .grab { width: 36px; background: var(--line-strong); margin: 6px auto 12px; }
.sheet h2 { margin: 4px 0 14px; }
.lightbox { background: rgba(28,26,23,.92); } .lightbox img { border-radius: 12px; }
.toast { border-radius: 14px; font-size: 15px; font-weight: 500; padding: 12px 16px; }
.toast.ok { background: var(--green); }
.loginbox.card { width: min(380px, 100%); background: transparent; border: 0; box-shadow: none; padding: 0; }
.loginbox img.logo { width: 64px; margin-bottom: 12px; }
.loginbox .wordmark { font-size: 28px; letter-spacing: .3em; margin-left: .3em; }
.loginbox .tag { font-size: 13px; margin: 6px 0 32px; }
.loginbox .input { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-strong); min-height: 50px; }
.loginbox .input:focus { box-shadow: 0 0 0 2px var(--gold); }
.loginbox .btn { min-height: 50px; }
.loginbox .err { font-size: 15px; } .loginbox .fine { font-size: 13px; margin-top: 20px; }
/* responsive */
#result-sync { display: none; } /* header pill already shows GATI sync time */
@media (max-width: 559px) { .stickyact { border-radius: 0; } .stickyact .btn { min-height: 48px; padding: 0 8px; } }
@media (max-width: 359px) { #buyer-toggle { font-size: 13px; } }
@media (min-width: 900px) {
  .topbar { height: 56px; --header-h: 56px; padding: 0 24px; }
  main#view { --gutter: 24px; padding: 18px 24px 40px; }
  .searchbar { top: 56px; margin: -18px -24px 0; padding: 14px 24px 8px; }
  .desknav a { font-size: 15px; padding: 8px 12px; }
  .grid { gap: 28px 20px; }
  .stickyact { position: static; margin: 16px 0; padding: 0; border: 0; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
}
/* phone: the piece action bar is a fixed toolbar above the tab bar; page padding keeps the end reachable */
@media (max-width: 899px) {
  .stickyact { position: fixed; left: 0; right: 0; margin: 0; }
  body.has-toolbar main#view { padding-bottom: 104px; }
}
/* real logo: lotus mark in the header; full lockup in documents */
.brand img.mark { width: 26px; height: 28px; }
.tile .price.muted { font-weight: 500; font-size: 13px; color: var(--muted); }
.fact .v .note { display: block; font-size: 12px; color: var(--muted); font-family: var(--sans); }
.tile .party { margin-top: 3px; color: var(--gold-ink); }
.scanlist:empty { display: none; } .scanlist { max-height: 22vh; overflow: auto; margin: 4px 0; }
.scanrow { font-size: 14px; padding: 6px 0; border-bottom: 1px solid var(--line); } .scanrow.bad { color: var(--red); }
.scanner-video { touch-action: none; }
.zoomrow { display: flex; align-items: center; gap: 10px; margin: 6px 0; } .zoomrow input { flex: 1; min-height: 44px; }
.tline .lt > div:first-child { min-width: 0; flex: 1 1 auto; } .tline .lname { overflow-wrap: anywhere; } /* long names pushed Remove off-screen */
/* Button groups inside rows and export boxes: own line, no doubled margins (tray Documents, Memo parties) */
.trayrow { flex-wrap: wrap; } .trayrow > .actions { flex: 1 1 100%; margin: 0; } .exportbox > .actions { margin: 0; }
/* Pick mode: multi-select tiles into a tray */
.tile .pickmark { position: absolute; top: 8px; left: 8px; width: 28px; height: 28px; border-radius: 50%; background: rgba(255,255,255,.94); border: 1.5px solid rgba(28,26,23,.4); box-shadow: 0 1px 3px rgba(28,26,23,.25); display: grid; place-items: center; color: transparent; z-index: 1; }
.tile .pickmark svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2.4; }
.tile.selected .pickmark { background: var(--gold-ink); border-color: var(--gold-ink); color: #fff; }
.tile.pick { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; } /* long-press must not open the link preview */
.tile.pick .ph { outline: 2px solid transparent; outline-offset: 2px; transition: outline-color .12s; }
.tile.selected .ph { outline-color: var(--gold-ink); }
.tile.unpickable { opacity: .45; }
.pickbar .n { font-weight: 600; white-space: nowrap; align-self: center; }
.pickbar .btn { flex: 1; }
/* desktop: the pick bar is the last node under infinite scroll, so it must stay pinned (piece page stays static) */
@media (min-width: 900px) { .stickyact.pickbar { position: sticky; bottom: 16px; padding: 10px; background: rgba(255,255,255,.95); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); } .pickbar { justify-content: flex-end; } .pickbar .btn { flex: 0 1 240px; } }
/* Pick bar: target tray on its own line, changeable when selecting from the showroom */
.pickbar { flex-wrap: wrap; }
.pickbar .pickhead { flex: 1 1 100%; display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 14px; min-width: 0; }
.pickbar .pickhead .target { color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pickbar .pickhead b { color: var(--ink); }
.linkbtn { background: none; border: 0; padding: 0 0 0 8px; min-height: 0; font: inherit; font-weight: 600; color: var(--gold-ink); text-decoration: underline; cursor: pointer; }
button.trayrow { width: 100%; text-align: left; background: none; border: 0; font: inherit; color: inherit; cursor: pointer; }
body.picking main#view { padding-bottom: 176px; }
.pickbar .pickhead + .pickhead { margin-top: -4px; }
.linkbtn[disabled] { opacity: .5; text-decoration: none; }
.pill.danger { background: var(--red-soft); color: var(--red); font-weight: 700; letter-spacing: .03em; }
.fact .v .note.excl { color: var(--red); font-weight: 700; letter-spacing: .02em; }
.focusring { position: absolute; width: 64px; height: 64px; border: 2px solid #fff; border-radius: 10px; transform: translate(-50%, -50%); pointer-events: none; animation: focusring .8s ease-out forwards; box-shadow: 0 0 0 1px rgba(0,0,0,.35); }
@keyframes focusring { 0% { transform: translate(-50%, -50%) scale(1.4); opacity: 0; } 20% { opacity: 1; } 100% { transform: translate(-50%, -50%) scale(1); opacity: 0; } }
.sharpness { display: flex; align-items: center; gap: 8px; margin: 2px 0 6px; color: var(--muted); }
.sharpness .lab { font-weight: 600; white-space: nowrap; } .sharpness .tip { white-space: nowrap; font-size: 12px; }
.sharpness .bar { flex: 1; height: 8px; border-radius: 4px; background: var(--fill); overflow: hidden; }
.sharpness .fill { height: 100%; width: 0; background: var(--amber); transition: width .25s, background .25s; }
.sharpness.good .fill { background: #24563a; } .sharpness.good .tip { color: #24563a; }
.scandbg { font-variant-numeric: tabular-nums; margin: -4px 0 6px; }
/* Buyer-document kind chips: 4 fixed options, wrap instead of hidden horizontal scroll (clipped "Li…" on phones) */
.exportbox .chips { flex-wrap: wrap; overflow: visible; }
.side > .card + .card { margin-top: 10px; }
/* pills are text-only; inline-block lets text-overflow ellipsize instead of hard-clipping (inline-flex never ellipsizes its anonymous text item) */
.pill { display: inline-block; vertical-align: middle; }
/* Exceptions header: wrapping kind chips, a labelled segmented scope control, and a list header with the info icon on the right */
.tabs.wrap { flex-wrap: wrap; overflow: visible; margin: 0 0 10px; padding: 0; }
.scope { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; }
.seg { display: inline-flex; background: var(--fill); border-radius: 999px; padding: 3px; }
.segbtn { min-height: 36px; padding: 0 14px; border-radius: 999px; display: inline-flex; align-items: center; font-size: 14px; font-weight: 600; color: var(--ink); text-decoration: none; }
.segbtn.on { background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.segbtn:hover { text-decoration: none; }
.listhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.listhead .infobtn { margin: 0; }
/* Price calculator */
.shapepick { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 8px; scrollbar-width: none; }
.shapepick::-webkit-scrollbar { display: none; }
.shapebtn { flex: 0 0 auto; width: 72px; min-height: 72px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border: 1.5px solid var(--line); border-radius: 14px; background: #fff; color: var(--ink); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.shapebtn svg { width: 28px; height: 28px; stroke: currentColor; fill: none; stroke-width: 1.4; }
.shapebtn.on { border-color: var(--gold-ink); background: #FBF6EC; color: var(--gold-ink); }
.stonerow { padding: 4px 0 14px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.stonerow:last-of-type { border-bottom: 0; }
.stonehead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.stonematch { min-height: 16px; } .stonematch.bad { color: var(--red); font-weight: 600; }
.input.small { min-height: 40px; width: auto; display: inline-block; padding: 0 12px; font-size: 14px; }
.inline { display: flex; gap: 8px; } .inline .input { flex: 1; min-width: 0; }
.calcbar { align-items: center; } .calcbar .grow { flex: 1; min-width: 0; } .calcbar .amt { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.calcbar .btn { flex: 0 0 auto; }
body.calcing main#view { padding-bottom: 130px; }
@media (min-width: 900px) { .stickyact.calcbar { position: sticky; bottom: 16px; padding: 10px 14px; background: rgba(255,255,255,.95); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); } }
.chips.wrap { flex-wrap: wrap; overflow: visible; }
button.segbtn { border: 0; background: transparent; font: inherit; cursor: pointer; }
button.segbtn.on { background: #fff; }
/* tray filters + select lines (Oct 20 2026) */
.trayfilters { display: flex; gap: 8px; margin: 12px 0; align-items: center; }
.trayfilters .input { flex: 1; min-width: 0; }
.trayfilters .btn { flex: none; }
.trayfilters .btn.on { background: var(--ink); color: #fff; }
.trayfilters .btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }
.listhead .headbtns { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.tselect { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.tselect:last-child { border-bottom: 0; }
.tselect input[type=checkbox] { width: 22px; height: 22px; flex: none; accent-color: var(--gold-ink); }
.tselect .lph { width: 48px; height: 48px; flex: none; border-radius: 10px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line-2); background: #fff; }
.tselect .lph img { width: 100%; height: 100%; object-fit: contain; }
.tselect .grow { flex: 1; min-width: 0; }
.tselect.selected { background: var(--gold-soft); }
/* tray: document scope (all / filtered / selected) */
.exportbox .scope { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.totalbar ~ .pad-x { padding: 0 16px 10px; margin-top: -6px; }
#tray-docs { scroll-margin-top: 72px; }
/* Trays page: date groups + filters (Oct 21 2026) */
.traylistfilters { display: grid; gap: 4px; margin: 0 0 12px; }
.traylistfilters .chips { padding-top: 6px; align-items: center; }
.traylistfilters input[type=date] { min-height: 36px; }
.traylist.card { overflow: hidden; }  /* date headers follow the card's rounded corners */
/* theme: warm ivory band and the serif used for headings, not a grey bar */
.trayday { padding: 12px 16px 8px; font-family: var(--serif); font-size: 15px; font-weight: 400; color: var(--ink-2); background: var(--surface-2); }
.trayday:not(:first-child) { border-top: 1px solid var(--line); }
.daypick { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
/* the date box looks like the chips next to it (same pill, fill, size); dark when a day is chosen */
.daypick input[type=date] { min-width: 9.5em; min-height: 44px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--fill); color: var(--ink); font: inherit; font-size: 15px; font-weight: 500; }
.daypick input[type=date]::-webkit-calendar-picker-indicator { opacity: .55; cursor: pointer; }
.daypick.on input[type=date] { background: var(--ink); color: #fff; }
.daypick.on input[type=date]::-webkit-calendar-picker-indicator { filter: invert(1); opacity: .8; }
/* AI connectors (Oct 22 2026) */
.aisteps { margin: 4px 0 12px; padding-left: 18px; }
.aisteps li { margin: 3px 0; }
.section-title.small { font-size: 16px; margin: 14px 0 6px; }
main.oauth { max-width: 520px; margin: 40px auto; }
.oauth-logo { width: 190px; display: block; margin: 0 auto 12px; }

/* internal cost sheet row in the tray document box (admin only) */
.exportbox .costsheet { margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--line-strong); }
.exportbox .pricerow { margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px dashed var(--line-strong); }
.pricenote { margin-top: 4px; line-height: 1.5; }
.pricenote .excl { color: var(--red); font-weight: 600; }
.pricenote .nowrap { white-space: nowrap; }

/* Tray: quiet catalogue lines (owner, Oct 23 2026: "very crowded" on the phone). One DOM; phones fold Details. */
.tcap { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.tline { grid-template-columns: 88px minmax(0, 1fr); gap: 16px; padding: 20px 16px; border-bottom-color: var(--line-2); }
.tline .lph { width: 88px; height: 88px; border-radius: 14px; }
.tline .lname { font-family: var(--serif); font-size: 20px; line-height: 1.2; font-weight: 400; letter-spacing: .01em; color: var(--ink); }
.tline .lremove { flex: none; display: grid; place-items: center; width: 44px; height: 44px; margin: -10px -12px -10px 0; padding: 0; border: 0; border-radius: 999px; background: none; color: var(--muted); cursor: pointer; }
.tline .lremove svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.tline .lremove:hover, .tline .lremove:focus-visible { color: var(--red); background: var(--red-soft); }
.tline .lmeta { margin-top: 4px; font-size: 13px; line-height: 1.35; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lcode { margin-top: 3px; font-size: 12px; line-height: 1.4; letter-spacing: .04em; color: var(--muted); font-variant-numeric: tabular-nums; }
.lcode .pill { display: inline; padding: 0; border-radius: 0; background: none; font-size: 11px; line-height: inherit; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; vertical-align: baseline; }
.lcode .pill::before { content: "·"; margin: 0 6px; color: var(--muted); letter-spacing: 0; }
.lcode .pill.on_hand, .lcode .pill.show { color: var(--ink-2); }
.tline .lnoteprev { margin-top: 6px; font-family: var(--serif); font-style: italic; font-size: 14px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tline .lprow { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; }
.tline .lmorebtn { display: inline-flex; align-items: center; min-height: 44px; padding: 0; border: 0; background: none; font: inherit; font-size: 14px; font-weight: 500; color: var(--muted); cursor: pointer; }
.tline .lmorebtn::after { content: ""; width: 6px; height: 6px; margin: -3px 0 0 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); transition: transform .2s; }
.tline.open .lmorebtn::after { margin-top: 3px; transform: rotate(-135deg); }
.tline .lprice { display: inline-flex; align-items: center; gap: 2px; width: 6.2em; min-height: 44px; margin-left: auto; padding: 0 4px 0 10px; border-radius: var(--radius-sm); box-shadow: inset 0 -1px 0 var(--line-strong); font-size: 17px; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--ink); cursor: text; }
.tline .lprice > span { font-size: 15px; color: var(--muted); }
.tline .lprice input { flex: 1; width: 100%; min-width: 0; padding: 0; border: 0; border-radius: 0; outline: 0; background: transparent; -webkit-appearance: none; appearance: none; font: inherit; color: inherit; text-align: right; }
.tline .lprice input::placeholder { font-size: 15px; color: var(--gold-ink); opacity: 1; }
.tline .lprice:focus-within { background: var(--surface); box-shadow: 0 0 0 2px var(--gold); }
.tline .pricenote { margin-top: 2px; font-size: 13px; line-height: 1.35; color: var(--muted); font-variant-numeric: tabular-nums; }
.pricenote .nrow { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; }
.pricenote .nrow > span { min-width: 0; }
.pricenote .linkbtn { flex: none; display: inline-flex; align-items: center; min-height: 44px; margin: -2px -4px -2px 0; padding: 0 4px 0 12px; font-size: 14px; text-decoration: none; }
.pricenote .excl { margin: 0 0 6px; font-size: 12.5px; font-weight: 600; color: var(--red); }
.pricenote .excl::first-letter { text-transform: uppercase; }
.tline .lqtyrow { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; margin-top: 8px; }
.tline .lqtyrow .qty input { width: 40px; }
.tline .ltotal { margin-left: auto; text-align: right; font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; }
.tline .ltotal .tcap { display: block; }
.tline .lmore { display: grid; gap: 14px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.tline .lmore .field { margin: 0; }
.tline .lmore .field label { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.tline .ldesc { font-size: 13px; line-height: 1.5; color: var(--muted); }
.tline .linternal { padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.tline .lerr { margin-top: 10px; }
@media (max-width: 899px) { .tline:not(.open) .lmore { display: none; } .tline.open .lnoteprev { display: none; } }
@media (min-width: 900px) { .tline .lmorebtn, .tline .lnoteprev { display: none; } .tline .lmore { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; } .tline .ldesc { grid-column: 1 / -1; } }
@media (max-width: 379px) { .tline { grid-template-columns: 72px minmax(0, 1fr); gap: 14px; } .tline .lph { width: 72px; height: 72px; } }
/* tray page top */
.traydek { margin: -8px 0 16px; font-size: 14px; letter-spacing: .02em; color: var(--muted); font-variant-numeric: tabular-nums; }
.addrow .btn:not(.primary), .trayfilters .btn:not(.on) { background: transparent; box-shadow: inset 0 0 0 1px var(--line-strong); }
.trayfilters .input { padding-left: 18px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.trayfilters .input:focus { box-shadow: 0 0 0 2px var(--gold); }
@media (max-width: 559px) { .addrow { flex-wrap: nowrap; margin: 0 0 14px; } .addrow .btn { flex: 1 1 0; min-width: 0; padding: 0 10px; } .addrow .long { display: none; } }
/* tray document panel */
#tray-docs .totalbar { align-items: baseline; padding: 22px 16px 6px; }
@media (max-width: 899px) { .traydesk > .side { margin-top: 24px; } }  /* phones: the lines card and the subtotal card had no gap, so their corners pinched */
#tray-docs .totalbar .amt { font-family: var(--serif); font-size: 32px; font-weight: 400; letter-spacing: -.01em; }
#tray-docs .todaytotal { margin-top: -2px; font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; }
#tray-docs .todaytotal .excl { color: var(--red); font-weight: 600; }
#tray-docs .exportbox { gap: 12px; padding: 12px 16px 20px; }
.exportbox .pricerow { margin: 0; padding: 12px 14px; border: 0; border-radius: var(--radius); background: var(--gold-soft); }
.exportbox .pricerow.quiet { padding: 0; background: none; }
.exportbox .pricerow .actions { margin: 8px 0 0; }
.exportbox .pricerow .btn { background: var(--surface); }
.exportbox .costsheet { margin: 4px 0 0; padding-top: 14px; border-top: 1px solid var(--line-2); }
.exportbox .costsheet .actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 10px 0 0; }
.exportbox .costsheet .btn, #tray-docs .exportbox > .actions .btn:not(.gold) { background: transparent; box-shadow: inset 0 0 0 1px var(--line-strong); }
.exportbox .kindselect { display: none; }
@media (max-width: 899px) {
  .exportbox .chips { display: none; } .exportbox .kindselect { display: block; }
  #tray-docs .exportbox > .actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 8px; }
  #tray-docs .exportbox > .actions .btn { min-height: 52px; } #tray-docs .exportbox > .actions .btn.gold { font-size: 16px; }
}
/* tray select mode */
.tselect { gap: 14px; padding: 12px 16px; }
.tselect .lph { width: 56px; height: 56px; border-radius: 12px; }
.tselect .lname { font-family: var(--serif); font-size: 18px; font-weight: 400; }
.tselect > b { font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; }
.tselect.selected { background: var(--surface-2); }
.tselect input[type=checkbox] { -webkit-appearance: none; appearance: none; display: grid; place-content: center; width: 24px; height: 24px; margin: 0; border: 1.5px solid var(--muted); border-radius: 50%; background: var(--surface); cursor: pointer; }
.tselect input[type=checkbox]:checked { border-color: var(--gold-ink); background: var(--gold-ink); }
.tselect input[type=checkbox]:checked::before { content: ""; width: 10px; height: 5px; margin-top: -2px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg); }
.tselect input[type=checkbox]:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.traydesk .pickbar .pickhead .n { font-family: var(--serif); font-size: 18px; font-weight: 400; }
.traydesk .pickbar .linkbtn { min-height: 44px; padding: 0 8px; text-decoration: none; }
@media (max-width: 899px) { .traydesk .pickbar > .btn { flex: 1 1 0; min-width: 0; padding: 0 6px; font-size: 14px; white-space: nowrap; } }
@media (max-width: 359px) { .traydesk .pickbar > .btn { white-space: normal; line-height: 1.15; } }
/* QuickBooks invoice (Oct 23 2026): quiet block under the buyer document, gold only for the one Create */
.exportbox .qbobox { display: grid; gap: 10px; margin-top: 4px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.exportbox .qbobox .btn { background: transparent; box-shadow: inset 0 0 0 1px var(--line-strong); }
.tline .lt > .pill { flex: none; margin-top: 3px; }
.tline.locked .lprice:not(:focus-within) { box-shadow: none; cursor: default; }
.tline .input[readonly] { background: var(--surface-2); }
.invbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0 18px; margin: -10px 0 14px; font-family: var(--serif); font-size: 15px; color: var(--gold-ink); }
.invbar .linkbtn { min-height: 40px; padding: 0 0 0 6px; font-family: var(--sans); font-size: 14px; }
.picklist { margin: 0 0 8px; overflow: hidden; }
.pickrow.on { background: var(--gold-soft); }
.pickrow.on .t::after { content: "✓"; margin-left: 8px; color: var(--gold-ink); }
.ivlines { margin: 12px 0 8px; overflow: hidden; }
.ivline { padding: 12px 14px; border-bottom: 1px solid var(--line-2); }
.ivline:last-child { border-bottom: 0; }
.ivline .ivrow { display: flex; justify-content: space-between; gap: 12px; font-variant-numeric: tabular-nums; }
.ivline .ivrow b { font-weight: 500; }
.ivline .ivcode { font-family: var(--serif); font-size: 16px; overflow-wrap: anywhere; }
.ivline .tiny { margin-top: 2px; overflow-wrap: anywhere; }
.ivline .lwarn { margin-top: 4px; font-size: 12.5px; color: var(--amber); }
.ivsum { margin: 10px 0 2px; font-family: var(--serif); font-size: 18px; font-variant-numeric: tabular-nums; }
.picklist .pickrow + .pickrow { border-top: 1px solid var(--line-2); }
.testbanner { position: relative; z-index: 60; padding: 6px 12px; padding-top: max(6px, env(safe-area-inset-top)); background: var(--amber); color: #fff; font-size: 12.5px; font-weight: 600; letter-spacing: .04em; text-align: center; }
.ivbill { font-family: var(--serif); font-size: 17px; color: var(--ink); }
