/* 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, 38%) 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; }
.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 .lcontrols { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; align-items: end; }
.tline .lcontrols .field { margin: 0; }
.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; }
.sheet .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.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; }
  .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); }
.sheet .row2, .tline .lcontrols { 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 tfoot 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: anywhere; }
}
@media (max-width: 379px) {
  .tline .lcontrols, .sheet .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 { width: 100%; max-height: 35vh; object-fit: contain; background: #111; border-radius: 10px; }
.err { color: var(--red); overflow-wrap: anywhere; }
@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,.82); 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); }
.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; }
.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,.82); 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 .lname { font-family: var(--sans); font-size: 17px; font-weight: 600; }
.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; padding-bottom: 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 */
@media (max-width: 559px) { #result-sync { display: none; } .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 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); }
