/* ============ tokens ============ */
:root {
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.8125rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.2vw, 0.9375rem);
  --text-base: clamp(1rem, 0.95rem + 0.2vw, 1.0625rem);
  --text-lg: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  --text-2xl: clamp(2rem, 1.4rem + 2vw, 3rem);

  --space-1: .25rem; --space-2: .5rem; --space-3: .75rem; --space-4: 1rem;
  --space-5: 1.25rem; --space-6: 1.5rem; --space-8: 2rem; --space-10: 2.5rem;
  --space-12: 3rem; --space-16: 4rem; --space-20: 5rem;

  --radius: 10px; --radius-lg: 16px; --radius-pill: 999px;
  --font-display: 'Satoshi', 'Inter', system-ui, sans-serif;
  --font-body: 'General Sans', 'Inter', system-ui, sans-serif;
  --ease: cubic-bezier(.2, .7, .3, 1);
}

:root, [data-theme='light'] {
  --bg: #f6f6f4;
  --surface: #ffffff;
  --surface-2: #fbfbfa;
  --surface-offset: #f0f0ed;
  --surface-sunken: #ececea;
  --border: #dedddA;
  --border-strong: #c9c8c4;
  --text: #1b1c1a;
  --text-muted: #6d6f6b;
  --text-faint: #a3a5a0;
  --text-inverse: #fbfbf9;
  --primary: #0d6e63;
  --primary-hover: #0a544c;
  --primary-soft: #e2efec;
  --warn: #9a5b13;
  --warn-soft: #f6ecdd;
  --danger: #a32f45;
  --danger-soft: #f7e5e8;
  --live: #1a7a4a;
  --live-soft: #e3f1e8;
  --shadow-sm: 0 1px 2px rgba(20, 22, 20, .06), 0 1px 1px rgba(20, 22, 20, .04);
  --shadow: 0 4px 16px rgba(20, 22, 20, .07), 0 1px 3px rgba(20, 22, 20, .05);
  --shadow-lg: 0 18px 50px rgba(20, 22, 20, .16);
}

[data-theme='dark'] {
  --bg: #121413;
  --surface: #1a1d1c;
  --surface-2: #1f2322;
  --surface-offset: #242827;
  --surface-sunken: #101211;
  --border: #2e3331;
  --border-strong: #414745;
  --text: #eceeec;
  --text-muted: #9ba09d;
  --text-faint: #6b706d;
  --text-inverse: #14171,6;
  --text-inverse: #141716;
  --primary: #3fbfae;
  --primary-hover: #63d2c3;
  --primary-soft: #17302d;
  --warn: #d9a05b;
  --warn-soft: #2e2519;
  --danger: #e2798d;
  --danger-soft: #2f1a1f;
  --live: #55c98a;
  --live-soft: #162c20;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
  --shadow: 0 4px 18px rgba(0, 0, 0, .45);
  --shadow-lg: 0 20px 56px rgba(0, 0, 0, .6);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: var(--text-base);
  line-height: 1.5; -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; line-height: 1.15; letter-spacing: -.015em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ============ primitives ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  height: 38px; padding: 0 var(--space-4); border-radius: var(--radius);
  font-size: var(--text-sm); font-weight: 600; white-space: nowrap;
  transition: background .16s var(--ease), border-color .16s var(--ease), transform .12s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: var(--text-inverse); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-ghost { border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.btn-ghost:hover { border-color: var(--border-strong); background: var(--surface-offset); }
.btn-quiet { color: var(--text-muted); padding: 0 var(--space-3); }
.btn-quiet:hover { color: var(--text); background: var(--surface-offset); }
.btn-danger { border: 1px solid var(--border); color: var(--danger); background: var(--surface); }
.btn-danger:hover { background: var(--danger-soft); border-color: var(--danger); }
.btn-sm { height: 30px; font-size: var(--text-xs); padding: 0 var(--space-3); }
.btn-lg { height: 46px; padding: 0 var(--space-6); font-size: var(--text-base); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }

.chip {
  display: inline-flex; align-items: center; gap: var(--space-2);
  height: 24px; padding: 0 var(--space-3); border-radius: var(--radius-pill);
  font-size: var(--text-xs); font-weight: 600; letter-spacing: .02em;
  background: var(--surface-offset); color: var(--text-muted); white-space: nowrap;
}
.chip-live { background: var(--live-soft); color: var(--live); }
.chip-soon { background: var(--warn-soft); color: var(--warn); }
.chip-sched { background: var(--primary-soft); color: var(--primary); }
.chip-closed { background: var(--surface-sunken); color: var(--text-faint); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.dot-pulse { animation: pulse 1.8s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1 } 50% { opacity: .25 } }

.field { display: flex; flex-direction: column; gap: var(--space-2); }
.field > label { font-size: var(--text-xs); font-weight: 600; color: var(--text-muted); letter-spacing: .03em; text-transform: uppercase; }
.input, .select, textarea.input {
  height: 38px; padding: 0 var(--space-3); border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  font-size: var(--text-sm); width: 100%; transition: border-color .16s var(--ease);
}
textarea.input { height: auto; padding: var(--space-3); resize: vertical; line-height: 1.45; }
.input:focus, .select:focus { border-color: var(--primary); outline: none; }
.input-hint { font-size: var(--text-xs); color: var(--text-faint); }
.money-in { position: relative; }
.money-in > span { position: absolute; left: var(--space-3); top: 50%; transform: translateY(-50%); color: var(--text-faint); font-size: var(--text-sm); }
.money-in > input { padding-left: 26px; }

.switch { display: flex; align-items: flex-start; gap: var(--space-3); cursor: pointer; }
.field > label.switch { text-transform: none; letter-spacing: normal; font-size: var(--text-sm); font-weight: 500; color: var(--text); }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track {
  flex: none; width: 40px; height: 23px; border-radius: var(--radius-pill);
  background: var(--surface-sunken); border: 1px solid var(--border); position: relative;
  transition: background .18s var(--ease), border-color .18s var(--ease); margin-top: 2px;
}
.switch .track::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 17px; height: 17px;
  border-radius: 50%; background: var(--surface); box-shadow: var(--shadow-sm);
  transition: transform .18s var(--ease);
}
.switch input:checked + .track { background: var(--primary); border-color: var(--primary); }
.switch input:checked + .track::after { transform: translateX(17px); background: #fff; }
.switch .lab { display: flex; flex-direction: column; gap: 2px; }
.switch .lab b { font-size: var(--text-sm); font-weight: 600; }
.switch .lab small { font-size: var(--text-xs); color: var(--text-muted); line-height: 1.4; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: var(--space-5) var(--space-6); border-bottom: 1px solid var(--border); }
.card-h h3 { font-size: var(--text-lg); }
.card-h p { font-size: var(--text-xs); color: var(--text-muted); margin-top: 2px; }
.card-b { padding: var(--space-6); }
.divide > * + * { border-top: 1px solid var(--border); }

/* ============ admin shell ============ */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.side {
  background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; gap: var(--space-6);
  padding: var(--space-5) var(--space-4); position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: var(--space-3); padding: 0 var(--space-2); }
.brand svg { color: var(--primary); }
.brand b { font-family: var(--font-display); font-size: var(--text-base); font-weight: 700; letter-spacing: -.02em; }
.brand small { display: block; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-faint); font-weight: 600; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2) var(--space-3);
  border-radius: var(--radius); font-size: var(--text-sm); font-weight: 500; color: var(--text-muted);
}
.nav a:hover { background: var(--surface-offset); color: var(--text); }
.nav a.on { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.nav a .n { margin-left: auto; font-size: var(--text-xs); color: var(--text-faint); }
.nav-t { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-faint); font-weight: 700; padding: 0 var(--space-3) var(--space-2); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: var(--space-3); }
.who { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2) var(--space-3); border-radius: var(--radius); background: var(--surface-offset); }
.avatar { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: var(--text-inverse); display: grid; place-items: center; font-size: var(--text-xs); font-weight: 700; }
.who div { min-width: 0; }
.who b { display: block; font-size: var(--text-xs); font-weight: 600; }
.who small { font-size: 11px; color: var(--text-muted); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: var(--space-4); padding: var(--space-5) var(--space-8);
  border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 20;
}
.topbar h1 { font-size: var(--text-xl); }
.topbar .crumb { font-size: var(--text-xs); color: var(--text-muted); margin-bottom: 3px; }
.topbar .sp { margin-left: auto; }
.tb-actions { display: flex; align-items: center; gap: var(--space-2); }
.page { padding: var(--space-8); display: flex; flex-direction: column; gap: var(--space-6); max-width: 1320px; }

/* kpis */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-4); }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-5); box-shadow: var(--shadow-sm); }
.kpi .k { font-size: var(--text-xs); font-weight: 600; color: var(--text-muted); letter-spacing: .03em; text-transform: uppercase; }
.kpi .v { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 700; margin-top: var(--space-2); font-variant-numeric: tabular-nums; }
.kpi .d { font-size: var(--text-xs); color: var(--text-faint); margin-top: var(--space-1); }

/* store table */
.tablewrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; min-width: 840px; }
.tbl th {
  text-align: left; font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .04em;
  color: var(--text-muted); font-weight: 600; padding: var(--space-3) var(--space-5);
  background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap;
}
.tbl td { padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--border); font-size: var(--text-sm); vertical-align: middle; }
.tbl tbody tr { cursor: pointer; transition: background .12s var(--ease); }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl tbody tr:last-child td { border-bottom: none; }
.num { font-variant-numeric: tabular-nums; }
.right { text-align: right; }
.store-cell { display: flex; align-items: center; gap: var(--space-3); }
.swatch { flex: none; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: #fff; font-family: var(--font-display); font-weight: 700; font-size: var(--text-xs); }
.store-cell b { display: block; font-weight: 600; font-size: var(--text-sm); }
.store-cell small { color: var(--text-muted); font-size: var(--text-xs); }
.cd { display: inline-flex; align-items: baseline; gap: 3px; font-variant-numeric: tabular-nums; font-weight: 600; font-size: var(--text-sm); }
.cd small { font-size: 10px; color: var(--text-faint); font-weight: 600; margin-right: 3px; }
.cd.urgent { color: var(--warn); }
.bar { height: 6px; border-radius: var(--radius-pill); background: var(--surface-sunken); overflow: hidden; min-width: 84px; }
.bar > i { display: block; height: 100%; border-radius: var(--radius-pill); background: var(--primary); }
.mini-goal { display: flex; flex-direction: column; gap: 5px; }
.mini-goal span { font-size: var(--text-xs); color: var(--text-muted); }

.empty { padding: var(--space-16) var(--space-6); text-align: center; display: flex; flex-direction: column; align-items: center; gap: var(--space-3); }
.empty svg { color: var(--text-faint); }
.empty b { font-family: var(--font-display); font-size: var(--text-lg); }
.empty p { font-size: var(--text-sm); color: var(--text-muted); max-width: 38ch; }

/* segmented */
.seg { display: inline-flex; padding: 3px; background: var(--surface-offset); border-radius: var(--radius); gap: 2px; }
.seg button { height: 28px; padding: 0 var(--space-3); border-radius: 7px; font-size: var(--text-xs); font-weight: 600; color: var(--text-muted); }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

/* ============ store settings ============ */
.cols { display: grid; grid-template-columns: 1fr 340px; gap: var(--space-6); align-items: start; }
.stack { display: flex; flex-direction: column; gap: var(--space-6); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.switch-list { display: flex; flex-direction: column; gap: var(--space-5); }
.side-card { position: sticky; top: 104px; }
.linkrow { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-3); border: 1px dashed var(--border-strong); border-radius: var(--radius); background: var(--surface-2); font-size: var(--text-xs); color: var(--text-muted); overflow: hidden; }
.linkrow code { font-family: ui-monospace, monospace; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-row { display: flex; align-items: baseline; justify-content: space-between; padding: var(--space-3) 0; font-size: var(--text-sm); }
.stat-row + .stat-row { border-top: 1px solid var(--border); }
.stat-row span { color: var(--text-muted); }
.stat-row b { font-variant-numeric: tabular-nums; }

/* product editor */
.prow { display: grid; grid-template-columns: 46px minmax(146px, 1fr) 72px 72px 80px 58px 62px 28px; gap: var(--space-3); align-items: center; padding: var(--space-4) var(--space-5); }
.prow-h { padding: var(--space-3) var(--space-5); background: var(--surface-2); border-bottom: 1px solid var(--border); }
.prow-h span { font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); font-weight: 600; }
.thumb { width: 52px; height: 52px; border-radius: 9px; background: var(--surface-offset); display: grid; place-items: center; overflow: hidden; }
.thumb svg { width: 100%; height: 100%; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-btn { position: relative; border: 1px solid transparent; padding: 0; cursor: pointer; transition: border-color .16s var(--ease); }
.thumb-btn:hover { border-color: var(--primary); }
.thumb-badge { position: absolute; bottom: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 3px; border-radius: 999px; background: var(--primary); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--surface); }
.thumb-badge svg { width: 10px; height: 10px; }
.imggrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: var(--space-3); }
.imgtile { position: relative; aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); border: 1px solid var(--border); }
.imgtile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.imgtile-tools { position: absolute; top: 6px; right: 6px; display: flex; gap: 4px; }
.imgtile-tools .icon-btn { background: rgba(20, 22, 20, .55); color: #fff; }
.imgtile-tools .icon-btn:hover { background: rgba(20, 22, 20, .8); }
.pname { min-width: 0; }
.pname b { display: block; font-size: var(--text-sm); font-weight: 600; }
.pname small { font-size: var(--text-xs); color: var(--text-muted); }
.sizes { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.sizes i { font-style: normal; font-size: 10px; font-weight: 600; letter-spacing: .04em; color: var(--text-muted); background: var(--surface-offset); border-radius: 4px; padding: 2px 5px; }
.sizes-toggle button { font-size: 10px; font-weight: 600; letter-spacing: .04em; border-radius: 4px; padding: 2px 5px; border: 1px solid transparent; cursor: pointer; color: var(--text-faint); background: var(--surface-offset); opacity: .55; }
.sizes-toggle button.on { color: var(--primary); background: color-mix(in srgb, var(--primary) 14%, var(--surface-offset)); opacity: 1; }
.sizes-toggle button:hover { border-color: var(--primary); opacity: 1; }
.coupon-row { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-5); }
.coupon-row .pname { flex: 1; }
.coupon-row .tot { font-size: var(--text-xs); color: var(--text-muted); white-space: nowrap; }
.pout { font-variant-numeric: tabular-nums; font-weight: 700; font-size: var(--text-sm); }
.pout small { display: block; font-weight: 500; font-size: 11px; color: var(--text-faint); }
.icon-btn { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; color: var(--text-faint); }
.icon-btn:hover { background: var(--surface-offset); color: var(--danger); }
.row { display: flex; align-items: center; gap: var(--space-3); }
.rowfoot { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: var(--space-4) var(--space-5); background: var(--surface-2); flex-wrap: wrap; }
.rowfoot .tot { font-size: var(--text-sm); color: var(--text-muted); }
.rowfoot .tot b { color: var(--text); font-variant-numeric: tabular-nums; }

/* ============ modal ============ */
.scrim { position: fixed; inset: 0; background: rgba(12, 14, 13, .55); backdrop-filter: blur(3px); z-index: 60; display: grid; place-items: center; padding: var(--space-6); animation: fade .18s var(--ease); }
.zoomscrim { background: rgba(8, 9, 8, .92); backdrop-filter: blur(6px); z-index: 80; }
.zoomimg { max-width: min(92vw, 1000px); max-height: 88vh; object-fit: contain; cursor: zoom-out; }
.zoom-close { position: fixed; top: var(--space-5); right: var(--space-5); background: rgba(255, 255, 255, .12); color: #fff; }
.zoom-close:hover { background: rgba(255, 255, 255, .22); }
.zoom-nav { position: fixed; top: 50%; transform: translateY(-50%); background: rgba(255, 255, 255, .12); color: #fff; }
.zoom-nav:hover { background: rgba(255, 255, 255, .22); }
.zoom-prev { left: var(--space-5); }
.zoom-prev svg { transform: rotate(-90deg); }
.zoom-next { right: var(--space-5); }
.zoom-next svg { transform: rotate(90deg); }
@keyframes fade { from { opacity: 0 } }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: min(560px, 100%); max-height: 88vh; overflow: auto; animation: rise .22s var(--ease); }
.modal.modal-noanim, .scrim.modal-noanim, .drawer.modal-noanim { animation: none; }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.985) } }
.modal-h { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-4); padding: var(--space-6) var(--space-6) var(--space-4); }
.modal-h h3 { font-size: var(--text-lg); }
.modal-h p { font-size: var(--text-sm); color: var(--text-muted); margin-top: var(--space-1); }
.modal-b { padding: 0 var(--space-6) var(--space-6); display: flex; flex-direction: column; gap: var(--space-5); }
.modal-f { display: flex; gap: var(--space-3); justify-content: flex-end; padding: var(--space-5) var(--space-6); border-top: 1px solid var(--border); background: var(--surface-2); position: sticky; bottom: 0; }
.pull { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-4); border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); }
.pull-h { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); font-weight: 600; }
.pull-item { display: flex; align-items: center; gap: var(--space-3); font-size: var(--text-sm); }
.pull-item .swatch { width: 26px; height: 26px; border-radius: 7px; font-size: 10px; }
.pull-item span { margin-left: auto; color: var(--text-muted); font-size: var(--text-xs); font-variant-numeric: tabular-nums; }
.spin { width: 15px; height: 15px; border-radius: 50%; border: 2px solid var(--border-strong); border-top-color: var(--primary); animation: sp .7s linear infinite; }
@keyframes sp { to { transform: rotate(360deg) } }
.notice { display: block; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-radius: var(--radius); font-size: var(--text-xs); line-height: 1.5; background: var(--primary-soft); color: var(--primary); }
.notice.warn { background: var(--warn-soft); color: var(--warn); }
.notice b { font-weight: 700; }

/* ============ storefront ============ */
.sf {
  --accent: #0d6e63; --accent-ink: #ffffff;
  background: var(--sf-bg, #fff); color: var(--sf-ink, #17181a); min-height: 100vh;
  font-family: var(--font-body);
}
.sf-back { position: fixed; left: var(--space-4); bottom: var(--space-4); z-index: 50; box-shadow: var(--shadow-lg); }
.sf-timer {
  background: var(--accent); color: var(--accent-ink); text-align: center;
  padding: var(--space-3) var(--space-4); display: flex; align-items: center; justify-content: center;
  gap: var(--space-4); flex-wrap: wrap; font-size: var(--text-sm);
}
.sf-timer .lab { font-weight: 500; opacity: .9; }
.clock { display: flex; gap: var(--space-3); }
.clock div { display: flex; flex-direction: column; align-items: center; min-width: 42px; }
.clock b { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.clock small { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; opacity: .78; }
.sf-nav { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-5) var(--space-6); border-bottom: 1px solid #e6e6e3; max-width: 1180px; margin: 0 auto; }
.sf-logo { display: flex; align-items: center; gap: var(--space-3); }
.sf-logo .swatch { width: 34px; height: 34px; }
.sf-logo b { font-family: var(--font-display); font-size: var(--text-base); font-weight: 700; }
.sf-logo small { display: block; font-size: 11px; color: #7a7a76; }
.sf-nav .sp { margin-left: auto; }
.cart-btn { display: inline-flex; align-items: center; gap: var(--space-2); height: 38px; padding: 0 var(--space-4); border-radius: var(--radius-pill); border: 1px solid #dcdcd8; font-size: var(--text-sm); font-weight: 600; background: #fff; }
.cart-btn .badge { min-width: 19px; height: 19px; border-radius: var(--radius-pill); background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; display: grid; place-items: center; padding: 0 5px; }
.sf-wrap { max-width: 1180px; margin: 0 auto; padding: 0 var(--space-6) var(--space-20); }
.sf-hero { padding: var(--space-12) 0 var(--space-10); display: grid; gap: var(--space-6); grid-template-columns: 1.1fr .9fr; align-items: center; }
.sf-hero.sf-hero-solo { grid-template-columns: 1fr; }
.sf-closed { background: #23252a; color: #fff; text-align: center; padding: var(--space-3) var(--space-4); font-size: var(--text-sm); }
.sf-hero .eyebrow { font-size: var(--text-xs); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.sf-hero h1 { font-size: var(--text-2xl); margin: var(--space-3) 0 var(--space-4); max-width: 22ch; }
.sf-hero p { color: #64655f; max-width: 46ch; font-size: var(--text-base); }
.sf-meta { display: flex; gap: var(--space-6); margin-top: var(--space-6); flex-wrap: wrap; }
.sf-meta div small { display: block; font-size: var(--text-xs); color: #86877f; letter-spacing: .03em; text-transform: uppercase; font-weight: 600; }
.sf-meta div b { font-size: var(--text-sm); }
.raise { background: #f6f6f3; border: 1px solid #e6e6e3; border-radius: var(--radius-lg); padding: var(--space-6); }
.raise .amt { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 700; font-variant-numeric: tabular-nums; }
.raise .of { font-size: var(--text-sm); color: #75766f; }
.raise .bar { height: 9px; background: #e4e4e0; margin: var(--space-4) 0 var(--space-3); }
.raise .bar > i { background: var(--accent); transition: width .5s var(--ease); }
.raise .foot { display: flex; justify-content: space-between; font-size: var(--text-xs); color: #75766f; }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-4); padding: var(--space-8) 0 var(--space-5); border-top: 1px solid #e6e6e3; }
.sec-h h2 { font-size: var(--text-lg); }
.sec-h span { font-size: var(--text-xs); color: #86877f; }
/* grid-template-columns/max-width come from an inline style computed from
   the product count (see pgridStyle in the store render) so 1-2 items get
   centered, larger cards instead of a couple small ones stranded at the
   left of a wide row. */
.pgrid { display: grid; gap: var(--space-5); width: 100%; }
.pcard { border: 1px solid #e6e6e3; border-radius: var(--radius-lg); overflow: hidden; background: #fff; cursor: pointer; transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s var(--ease); display: flex; flex-direction: column; }
.pcard:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(20, 22, 20, .1); border-color: #d5d5d0; }
.pcard .art { aspect-ratio: 1; background: #fff; display: grid; place-items: center; }
.pcard .art svg { width: 78%; height: 78%; }
.pcard .art img { width: 100%; height: 100%; object-fit: contain; }
.pcard .info { padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); flex: 1; }
.pcard .info b { font-size: var(--text-sm); font-weight: 600; }
.pcard .info small { font-size: var(--text-xs); color: #7d7e77; }
.pcard .price { margin-top: auto; display: flex; align-items: baseline; gap: var(--space-2); font-family: var(--font-display); font-weight: 700; font-variant-numeric: tabular-nums; }
.pcard .price i { font-style: normal; font-size: var(--text-xs); font-weight: 600; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, #fff); border-radius: 5px; padding: 2px 6px; }
.sf-foot { border-top: 1px solid #e6e6e3; padding: var(--space-8) var(--space-6); text-align: center; color: #86877f; font-size: var(--text-xs); max-width: 1180px; margin: 0 auto; line-height: 1.7; }

/* shops.ink home directory */
.storelist { display: flex; flex-direction: column; gap: var(--space-3); }
.storecard { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-4) var(--space-5); border: 1px solid #e6e6e3; border-radius: var(--radius-lg); background: #fff; text-decoration: none; color: inherit; transition: transform .16s var(--ease), box-shadow .16s var(--ease), border-color .16s var(--ease); }
.storecard:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(20, 22, 20, .1); border-color: #d5d5d0; }
.storecard .t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.storecard .t b { font-size: var(--text-sm); font-weight: 600; }
.storecard .t small { font-size: var(--text-xs); color: #7d7e77; }
.storecard .closes { font-size: var(--text-xs); color: #7d7e77; white-space: nowrap; }
.ctaband { margin-top: var(--space-10); padding: var(--space-8) var(--space-7); border-radius: var(--radius-lg); background: #f4f4f1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-6); }
.ctaband h2 { font-size: var(--text-lg); margin-bottom: var(--space-2); }
.ctaband p { font-size: var(--text-sm); color: #5f6059; line-height: 1.6; max-width: 46ch; }
.ctacontact { display: flex; flex-direction: column; gap: 3px; text-align: right; }
.ctacontact b { font-size: var(--text-sm); }
.ctacontact a { color: var(--accent); font-weight: 600; text-decoration: none; }
.ctacontact a:hover { text-decoration: underline; }
.ctacontact span { font-size: var(--text-xs); color: #7d7e77; }
@media (max-width: 620px) {
  .ctaband { flex-direction: column; align-items: flex-start; }
  .ctacontact { text-align: left; }
}

/* product detail */
.pd { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.pd .art { background: #fff; display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-8); min-height: 0; }
.pd-mainart { flex: 1; min-height: 260px; display: grid; place-items: center; }
.pd-mainart svg { width: 100%; max-width: 260px; }
.pd-mainart img { width: 100%; height: 100%; object-fit: contain; cursor: zoom-in; }
.pd-thumbs { display: flex; gap: var(--space-2); flex-wrap: wrap; justify-content: center; }
.pd-thumbs button { width: 48px; height: 48px; padding: 0; border-radius: 6px; border: 2px solid transparent; overflow: hidden; cursor: pointer; background: #fff; opacity: .6; }
.pd-thumbs button.on { border-color: var(--accent); opacity: 1; }
.pd-thumbs button:hover { opacity: 1; }
.pd-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.pd .body { padding: var(--space-6); display: flex; flex-direction: column; gap: var(--space-4); }
.pd h3 { font-size: var(--text-lg); }
.pd .desc { font-size: var(--text-sm); color: #6d6e67; }
.pd .pr { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 700; font-variant-numeric: tabular-nums; }
.sizepick { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.sizepick button { min-width: 44px; height: 36px; border-radius: 8px; border: 1px solid #dcdcd8; font-size: var(--text-sm); font-weight: 600; background: #fff; color: #17181a; }
.sizepick button.on { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.qty { display: inline-flex; align-items: center; border: 1px solid #dcdcd8; border-radius: 8px; overflow: hidden; }
.qty button { width: 34px; height: 36px; font-size: var(--text-base); background: #fff; }
.qty span { min-width: 34px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.fundnote { font-size: var(--text-xs); color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, #fff); padding: var(--space-3); border-radius: var(--radius); line-height: 1.5; }

/* cart drawer */
.drawer { position: fixed; inset: 0 0 0 auto; width: min(420px, 100%); background: #fff; z-index: 70; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: slide .24s var(--ease); color: #17181a; }
@keyframes slide { from { transform: translateX(100%) } }
.drawer-h { display: flex; align-items: center; justify-content: space-between; padding: var(--space-5) var(--space-6); border-bottom: 1px solid #e6e6e3; }
.drawer-h h3 { font-size: var(--text-lg); }
.drawer-b { flex: 1; overflow: auto; padding: var(--space-4) var(--space-6); display: flex; flex-direction: column; }
.citem { display: flex; gap: var(--space-4); padding: var(--space-4) 0; border-bottom: 1px solid #eeeeeb; }
.citem .thumb { background: #f4f4f1; }
.citem .m { flex: 1; min-width: 0; }
.citem b { display: block; font-size: var(--text-sm); font-weight: 600; }
.citem small { font-size: var(--text-xs); color: #7d7e77; }
.citem .pr { font-variant-numeric: tabular-nums; font-weight: 600; font-size: var(--text-sm); }
.drawer-f { border-top: 1px solid #e6e6e3; padding: var(--space-5) var(--space-6); display: flex; flex-direction: column; gap: var(--space-3); }
.sumrow { display: flex; justify-content: space-between; font-size: var(--text-sm); color: #6d6e67; }
.sumrow.tot { font-size: var(--text-base); color: #17181a; font-weight: 700; font-variant-numeric: tabular-nums; }
.sq { display: flex; align-items: center; justify-content: center; gap: var(--space-2); font-size: var(--text-xs); color: #86877f; }

/* checkout mock */
.sqpanel { text-align: center; display: flex; flex-direction: column; gap: var(--space-4); align-items: center; padding: var(--space-8) var(--space-6); }
.sqpanel .ok { width: 46px; height: 46px; border-radius: 50%; background: var(--live-soft); color: var(--live); display: grid; place-items: center; }


/* ============ store-backend sub tabs ============ */
.subtabs { display: flex; gap: 4px; padding: 4px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-pill); overflow-x: auto; }
.subtabs button { flex: none; padding: 8px 15px; border-radius: var(--radius-pill); font-size: var(--text-sm); font-weight: 600; color: var(--text-muted); white-space: nowrap; }
.subtabs button:hover { color: var(--text); }
.subtabs button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

.switch-mini { align-items: center; gap: var(--space-2); }
.switch-mini .lab { min-width: 0; }

/* personalization editor */
.pers-row { display: grid; grid-template-columns: minmax(190px, 1.3fr) minmax(150px, 1fr) 108px; gap: var(--space-4); align-items: end; padding: var(--space-4); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.pers-row.off { opacity: .58; }
.pers-row > .switch { align-self: center; }

/* fulfillment cards */
.ffcard { padding: var(--space-4) var(--space-5); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); transition: border-color .16s var(--ease), background .16s var(--ease); }
.ffcard.on { border-color: color-mix(in oklab, var(--primary) 45%, var(--border)); background: var(--surface); }

/* merge tags */
.tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tags > span { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); font-weight: 600; margin-right: 2px; }
.tags code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; white-space: nowrap; padding: 3px 8px; border-radius: 5px; background: var(--surface-offset); color: var(--text-muted); }
textarea.mono { font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace); font-size: 12.5px; line-height: 1.7; }

/* email preview */
.mailprev { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface-2); }
.mailprev .mh { display: flex; gap: var(--space-3); padding: 9px var(--space-5); border-bottom: 1px solid var(--border); font-size: var(--text-xs); }
.mailprev .mh span { color: var(--text-faint); width: 54px; flex: none; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.mailprev .mh b { font-weight: 600; color: var(--text); }
.mailprev .mb { padding: var(--space-5); font-family: var(--font-body); font-size: var(--text-sm); line-height: 1.75; white-space: pre-wrap; background: var(--surface); color: var(--text); margin: 0; }

/* close-out job sheet */
.joborder { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.joborder .jh { display: flex; flex-wrap: wrap; gap: var(--space-6); padding: var(--space-4) var(--space-5); background: var(--surface-2); border-bottom: 1px solid var(--border); }
.joborder .jh span { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-faint); font-weight: 700; }
.joborder .jh b { font-size: var(--text-sm); font-weight: 600; }
.jgroup { border-bottom: 1px solid var(--border); }
.jg-h { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-5); }
.jg-h b { font-size: var(--text-sm); font-weight: 600; }
.jg-h small { font-size: var(--text-xs); color: var(--text-muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jg-u { margin-left: auto; flex: none; font-size: var(--text-xs); font-weight: 600; color: var(--text-muted); background: var(--surface-offset); border-radius: var(--radius-pill); padding: 3px 9px; }
.jtable { width: 100%; border-collapse: collapse; }
.jtable th { text-align: right; font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-faint); font-weight: 700; padding: 5px var(--space-5); background: var(--surface-2); }
.jtable th:first-child, .jtable td:first-child { text-align: left; }
.jtable td { text-align: right; padding: 6px var(--space-5); font-size: var(--text-sm); font-variant-numeric: tabular-nums; border-top: 1px solid var(--border-soft, var(--border)); }
.jnote { padding: 0 var(--space-5) var(--space-4); font-size: var(--text-xs); color: var(--text-muted); }
.jrow.payout { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-4) var(--space-5); background: var(--surface-2); }
.jrow.payout b:first-child { flex: 1; min-width: 0; font-size: var(--text-sm); font-weight: 600; }
.jrow.payout span { flex: none; font-size: var(--text-xs); color: var(--text-muted); text-align: right; max-width: 150px; }
.jrow.payout b:last-child { flex: none; white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--danger); font-size: var(--text-sm); }

/* storefront: personalization + fulfillment picker */
.perschip { margin-top: 7px; display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .01em; color: #6b6c64; background: #f0efe9; border-radius: var(--radius-pill); padding: 3px 9px; text-transform: capitalize; }
.persopts { display: flex; flex-direction: column; gap: var(--space-2); }
.popt { display: flex; align-items: center; gap: var(--space-3); padding: 11px var(--space-4); border: 1px solid #e2e0d8; border-radius: 10px; cursor: pointer; background: #fbfaf7; }
.popt.on { border-color: var(--accent); background: color-mix(in oklab, var(--accent) 7%, #fff); }
.popt input { accent-color: var(--accent); width: 16px; height: 16px; flex: none; }
.popt .t { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.popt .t b { font-size: var(--text-sm); font-weight: 600; color: #23241f; }
.popt .t small { font-size: 11.5px; color: #7d7e77; }
.popt .pp { font-size: var(--text-sm); font-weight: 700; color: #23241f; font-variant-numeric: tabular-nums; }
.persin { height: 38px; margin: 2px 0 4px; }
.perstag { display: block; margin-top: 3px; font-size: 11px; color: var(--text-muted); }
.ffpick { margin-top: var(--space-5); padding-top: var(--space-5); border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: var(--space-2); }
.ffpick > b { font-size: var(--text-sm); font-weight: 600; margin-bottom: 2px; }
.picks { display: flex; flex-direction: column; gap: var(--space-2); }
.ffopt .t small { line-height: 1.5; margin-top: 1px; }
.ffopt { display: flex; align-items: flex-start; gap: var(--space-3); padding: 11px var(--space-4); border: 1px solid var(--border); border-radius: 10px; cursor: pointer; background: var(--surface-2); }
.ffopt.on { border-color: var(--primary); background: var(--surface); }
.ffopt input { accent-color: var(--primary); width: 16px; height: 16px; flex: none; }
.ffopt .t { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ffopt .t b { font-size: var(--text-sm); font-weight: 600; }
.ffopt .t small { font-size: 11.5px; color: var(--text-muted); }
.ffopt .pp { font-size: var(--text-sm); font-weight: 600; font-variant-numeric: tabular-nums; }
/* .drawer is hardcoded light (checkout stays light regardless of the
   shopper's browser theme), but .ffopt's background came from the
   theme-variable surface colors — dark on a dark-mode browser, paired
   with .drawer's always-dark text. Pin it to the drawer's own light
   palette instead of the theme variables. */
.drawer .ffopt { background: #f4f4f1; }
.drawer .ffopt.on { background: #fff; }
.drawer .ffopt .t small { color: #7d7e77; }


/* ============ branding tab ============ */
.logorow { display: flex; gap: var(--space-5); align-items: center; }
[data-dropzone] { border-radius: var(--radius); transition: background .12s var(--ease), outline-color .12s var(--ease); outline: 2px dashed transparent; outline-offset: 4px; }
[data-dropzone].dropzone-over { outline-color: var(--primary); background: color-mix(in srgb, var(--primary) 8%, transparent); }
.logobox { width: 84px; height: 84px; flex: none; border: 1px dashed var(--border); border-radius: var(--radius); background: var(--surface-2); display: grid; place-items: center; overflow: hidden; }
.logobox img { max-width: 74px; max-height: 74px; object-fit: contain; }
.acc { width: 26px; height: 26px; border-radius: 7px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); position: relative; }
.acc:hover { transform: translateY(-1px); }
.acc.on::after { content: ''; position: absolute; inset: -4px; border-radius: 10px; border: 2px solid var(--text); }
.hexchip { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; color: var(--text-muted); background: var(--surface-offset); border-radius: 5px; padding: 4px 8px; }
.herogrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: var(--space-3); }
.herotile { display: flex; flex-direction: column; gap: 5px; padding: var(--space-3); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); text-align: left; }
.herotile:hover { border-color: var(--text-faint); }
.herotile.on { border-color: var(--primary); background: var(--surface); box-shadow: inset 0 0 0 1px var(--primary); }
.herotile b { font-size: var(--text-xs); font-weight: 600; }
.herotile small { font-size: 10.5px; color: var(--text-muted); line-height: 1.35; }
.swatchbox { display: block; height: 40px; border-radius: 7px; border: 1px solid var(--border); background-color: var(--surface); overflow: hidden; }

/* hero treatments, shared by preview tiles, the preview card, and the real store */
[data-hero-art="wash"] { background-image: linear-gradient(135deg, color-mix(in oklab, var(--accent) 26%, transparent), transparent 72%); }
[data-hero-art="stripes"] { background-image: repeating-linear-gradient(45deg, color-mix(in oklab, var(--accent) 16%, transparent) 0 10px, transparent 10px 24px); }
[data-hero-art="halftone"] { background-image: radial-gradient(color-mix(in oklab, var(--accent) 40%, transparent) 1.6px, transparent 1.7px); background-size: 11px 11px; }
[data-hero-art="grid"] { background-image: repeating-linear-gradient(0deg, color-mix(in oklab, var(--accent) 15%, transparent) 0 1px, transparent 1px 16px), repeating-linear-gradient(90deg, color-mix(in oklab, var(--accent) 15%, transparent) 0 1px, transparent 1px 16px); }
[data-hero-art="photo"] { background-size: cover; background-position: center; }

/* hero art sits behind the copy, fading in from the left so text stays clean */
.sf-hero { position: relative; }
.sf-hero > * { position: relative; z-index: 1; }
.sf-hero[data-hero-art]::before { content: ""; position: absolute; inset: calc(var(--space-6) * -1) calc(var(--space-6) * -1); z-index: 0; pointer-events: none; border-radius: 18px; -webkit-mask-image: linear-gradient(96deg, transparent 20%, rgba(0,0,0,.45) 46%, #000 74%); mask-image: linear-gradient(96deg, transparent 20%, rgba(0,0,0,.45) 46%, #000 74%); }
.sf-hero[data-hero-art="plain"]::before, .sf-hero[data-hero-art="photo"]::before { display: none; }
header.sf-hero[data-hero-art="wash"] { background-image: none; }
.sf-hero[data-hero-art="wash"]::before { background-image: linear-gradient(135deg, color-mix(in oklab, var(--accent) 26%, transparent), transparent 72%); }
header.sf-hero[data-hero-art="stripes"] { background-image: none; }
.sf-hero[data-hero-art="stripes"]::before { background-image: repeating-linear-gradient(45deg, color-mix(in oklab, var(--accent) 16%, transparent) 0 10px, transparent 10px 24px); }
header.sf-hero[data-hero-art="halftone"] { background-image: none; }
.sf-hero[data-hero-art="halftone"]::before { background-image: radial-gradient(color-mix(in oklab, var(--accent) 40%, transparent) 1.6px, transparent 1.7px); background-size: 11px 11px; }
header.sf-hero[data-hero-art="grid"] { background-image: none; }
.sf-hero[data-hero-art="grid"]::before { background-image: repeating-linear-gradient(0deg, color-mix(in oklab, var(--accent) 15%, transparent) 0 1px, transparent 1px 16px), repeating-linear-gradient(90deg, color-mix(in oklab, var(--accent) 15%, transparent) 0 1px, transparent 1px 16px); }

/* mini storefront preview */
.brandprev { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #fbfaf7; }
.bp-banner { background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 600; text-align: center; padding: 6px var(--space-4); }
.bp-nav { display: flex; align-items: center; gap: var(--space-2); padding: 9px var(--space-4); border-bottom: 1px solid #e6e6e3; }
.bp-nav b { font-family: var(--font-display); font-size: var(--text-xs); font-weight: 700; color: #23241f; }
.bp-logo { height: 22px; max-width: 74px; object-fit: contain; }
.bp-cart { margin-left: auto; font-size: 10px; font-weight: 600; color: #6b6c64; border: 1px solid #dedcd4; border-radius: var(--radius-pill); padding: 3px 10px; }
.bp-hero { padding: var(--space-6) var(--space-5) var(--space-8); background-color: #fbfaf7; }
.bp-hero-in { max-width: 30ch; }
.bp-eye { display: block; font-size: 9.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.bp-hero b { display: block; font-family: var(--font-display); font-size: var(--text-lg); line-height: 1.15; color: #1b1c17; margin: 6px 0 5px; }
.bp-hero small { display: block; font-size: 11.5px; line-height: 1.55; color: #63645d; }

/* storefront branding */
.sf-banner { background: var(--accent); color: var(--accent-ink); text-align: center; font-size: var(--text-sm); font-weight: 600; padding: 9px var(--space-6); }
.sf-mark { height: 34px; max-width: 118px; object-fit: contain; }


/* ============ attachments + shipstation on close-out ============ */
.attach { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.att { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--border); }
.att:last-of-type { border-bottom: 0; }
.att-i { width: 30px; height: 30px; flex: none; border-radius: 8px; background: var(--surface-offset); color: var(--text-muted); display: grid; place-items: center; }
.att > div { min-width: 0; flex: 1; }
.att b { display: block; font-size: var(--text-sm); font-weight: 600; }
.att small { display: block; font-size: var(--text-xs); color: var(--text-muted); line-height: 1.5; margin-top: 2px; }
.att-note { padding: var(--space-3) var(--space-4); background: var(--surface-2); border-top: 1px solid var(--border); font-size: var(--text-xs); color: var(--text-muted); line-height: 1.55; }

.ssbatch { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.ss-h { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); }
.ss-h > div { min-width: 0; flex: 1; }
.ss-h b { font-size: var(--text-sm); font-weight: 600; }
.ss-h small { display: block; font-size: var(--text-xs); color: var(--text-muted); line-height: 1.55; margin-top: 2px; }
.ss-h code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10.5px; background: var(--surface-offset); padding: 1px 5px; border-radius: 4px; }
.ss-b { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 var(--space-6); padding: 0 var(--space-4) var(--space-2); border-top: 1px solid var(--border); }

/* ============ packing slip ============ */
.slip { background: #fff; color: #1b1c17; border: 1px solid #dcdad2; border-radius: 6px; padding: var(--space-5); box-shadow: 0 1px 0 rgba(0,0,0,.04); }
.slip-h { display: flex; align-items: flex-start; gap: var(--space-4); padding-bottom: var(--space-3); border-bottom: 2px solid var(--acc); }
.slip-brand { display: flex; align-items: center; gap: var(--space-3); flex: 1; min-width: 0; }
.slip-brand img { height: 34px; max-width: 110px; object-fit: contain; }
.slip-brand b { display: block; font-family: var(--font-display); font-size: var(--text-sm); font-weight: 700; }
.slip-brand small { display: block; font-size: 10.5px; color: #6d6e66; margin-top: 1px; }
.slip-meta { text-align: right; flex: none; }
.slip-meta b { display: block; font-size: var(--text-sm); font-weight: 700; }
.slip-meta small { display: block; font-size: 10.5px; color: #6d6e66; }
.slip-band { margin: var(--space-3) 0; padding: 6px var(--space-3); border-radius: 5px; background: var(--acc); color: #fff; font-size: 10.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.slip-band[data-ff="shop"] { background: #4b4d45; }
.slip-band[data-ff="event"] { background: #7a5a1e; }
.slip-who { display: grid; grid-template-columns: 1.6fr 1fr; gap: var(--space-4); padding: var(--space-3) 0; }
.slip-who span { display: block; font-size: 9.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #8a8b82; }
.slip-who b { display: block; font-size: var(--text-sm); font-weight: 600; margin-top: 3px; }
.slip-who small { display: block; font-size: 11px; color: #55564f; line-height: 1.5; margin-top: 2px; }
.slip-t { width: 100%; border-collapse: collapse; margin-top: var(--space-2); }
.slip-t th { text-align: left; font-size: 9.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: #8a8b82; padding: 6px 0; border-bottom: 1px solid #e4e2da; }
.slip-t th:first-child, .slip-t td:first-child { width: 44px; }
.slip-t th:last-child, .slip-t td:last-child { width: 56px; }
.slip-t td { padding: 8px 0; border-bottom: 1px solid #efeee8; font-size: var(--text-sm); vertical-align: top; }
.slip-t td b { font-weight: 600; }
.slip-pers { display: block; font-style: normal; font-size: 11px; font-weight: 600; color: var(--acc); background: color-mix(in oklab, var(--acc) 10%, #fff); border: 1px solid color-mix(in oklab, var(--acc) 30%, #fff); border-radius: 4px; padding: 3px 7px; margin-top: 5px; width: fit-content; }
.slip-f { margin-top: var(--space-4); padding-top: var(--space-3); border-top: 1px dashed #d9d7cf; font-size: 10.5px; color: #6d6e66; }


/* ============ prototype bar on customer-facing views ============ */
.protobar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: 7px var(--space-5); background: #1b1c17; color: #cfd0c6; font-size: 11px; font-weight: 600; letter-spacing: .02em; }
.protobar .btn { color: #fff; }

/* ============ organizer dashboard ============ */
.org { min-height: 100vh; background: var(--surface-2); }
.org-top { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-4) var(--space-6); background: var(--surface); border-bottom: 1px solid var(--border); }
.org-brand { display: flex; align-items: center; gap: var(--space-3); flex: 1; min-width: 0; }
.org-brand img { height: 38px; max-width: 130px; object-fit: contain; }
.org-brand b { display: block; font-family: var(--font-display); font-size: var(--text-base); font-weight: 700; }
.org-brand small { display: block; font-size: var(--text-xs); color: var(--text-muted); margin-top: 1px; }
.org-actions { display: flex; align-items: center; gap: var(--space-3); flex: none; }
.org-wrap { max-width: 1000px; margin: 0 auto; padding: var(--space-6) var(--space-6) var(--space-10); display: flex; flex-direction: column; gap: var(--space-5); }
.org-hi { font-size: var(--text-sm); }
.org-cols { display: grid; grid-template-columns: 1.5fr 1fr; gap: var(--space-5); align-items: start; }
.org-foot { font-size: var(--text-xs); color: var(--text-muted); text-align: center; line-height: 1.7; padding-top: var(--space-2); }

.chart { display: flex; align-items: flex-end; gap: 5px; height: 132px; }
.chart .cbar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; height: 100%; }
.chart .cbar i { display: block; width: 100%; min-height: 3px; border-radius: 4px 4px 2px 2px; opacity: .85; transition: opacity var(--t-fast); }
.chart .cbar:hover i { opacity: 1; }
.chart .cbar span { font-size: 10px; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.chart-f { display: flex; justify-content: space-between; gap: var(--space-3); margin-top: var(--space-3); padding-top: var(--space-3); border-top: 1px solid var(--border); font-size: var(--text-xs); color: var(--text-muted); }

.orow { display: grid; grid-template-columns: 34px minmax(140px, 1fr) 76px 76px 60px 84px; gap: var(--space-3); align-items: center; padding: var(--space-3) var(--space-5); font-size: var(--text-sm); font-variant-numeric: tabular-nums; }
.orow-h { padding-top: var(--space-2); padding-bottom: var(--space-2); font-size: var(--text-xs); font-weight: 600; color: var(--text-muted); border-bottom: 1px solid var(--border); font-variant-numeric: normal; }
.orow .on { min-width: 0; }
.orow .on b { display: block; font-weight: 600; }
.orow .on small { display: block; font-size: var(--text-xs); color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sizeline b { display: block; font-size: var(--text-sm); font-weight: 600; margin-bottom: 6px; }
.sizechips { display: flex; flex-wrap: wrap; gap: 5px; }
.sizechips i { font-style: normal; font-size: var(--text-xs); color: var(--text-muted); background: var(--surface-offset); border-radius: 5px; padding: 3px 8px; }
.sizechips i b { display: inline; margin: 0; color: var(--text); }

.oline { display: grid; grid-template-columns: minmax(96px, 1.1fr) 74px minmax(110px, 1.4fr) 62px 66px; gap: var(--space-3); align-items: center; padding: var(--space-3) var(--space-5); font-size: var(--text-sm); }
.oline span { color: var(--text-muted); font-size: var(--text-xs); }
.oline .ol-ff { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oline .ol-t { text-align: right; font-variant-numeric: tabular-nums; }

/* ============ setup form ============ */
.intake { min-height: 100vh; background: var(--surface-2); }
.in-top { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-4) var(--space-6); background: var(--surface); border-bottom: 1px solid var(--border); }
.in-top b { display: block; font-family: var(--font-display); font-size: var(--text-sm); font-weight: 700; }
.in-top small { display: block; font-size: var(--text-xs); color: var(--text-muted); }
.in-wrap { max-width: 760px; margin: 0 auto; padding: var(--space-8) var(--space-6) var(--space-10); display: flex; flex-direction: column; gap: var(--space-5); }
.in-head h1 { font-size: var(--text-xl); margin: var(--space-2) 0 var(--space-3); }
.in-head p { font-size: var(--text-sm); color: var(--text-muted); line-height: 1.65; max-width: 62ch; }
.in-prow { grid-template-columns: 46px minmax(150px, 1fr) 74px 96px 84px; }
.in-cost { font-size: var(--text-sm); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.in-submit { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-5); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.in-submit > div { flex: 1; min-width: 0; }
.in-submit b { display: block; font-size: var(--text-sm); font-weight: 600; }
.in-submit small { display: block; font-size: var(--text-xs); color: var(--text-muted); margin-top: 2px; }
.in-done { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-8); text-align: center; }
.in-check { width: 48px; height: 48px; margin: 0 auto var(--space-4); border-radius: 50%; background: color-mix(in oklab, var(--primary) 14%, transparent); color: var(--primary); display: grid; place-items: center; }
.in-done h2 { font-size: var(--text-lg); }
.in-done p { font-size: var(--text-sm); color: var(--text-muted); line-height: 1.65; max-width: 52ch; margin: var(--space-3) auto var(--space-5); }
.in-recap { text-align: left; border: 1px solid var(--border); border-radius: var(--radius); padding: var(--space-2) var(--space-4); margin-bottom: var(--space-5); }

/* ============ setup form list ============ */
.reqrow { display: grid; grid-template-columns: minmax(160px, 1.3fr) max-content minmax(110px,1fr) minmax(110px,1fr) minmax(90px,.9fr) auto; gap: var(--space-4); align-items: center; padding: var(--space-4) var(--space-5); }
.rq-n { min-width: 0; }
.reqrow > .pill { white-space: nowrap; justify-self: start; }
.rq-m { min-width: 0; }
.rq-n b { display: block; font-size: var(--text-sm); font-weight: 600; }
.rq-n small { display: block; font-size: var(--text-xs); color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rq-m span { display: block; font-size: 10px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--text-faint); }
.rq-m b { display: block; font-size: var(--text-sm); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rq-a { display: flex; gap: var(--space-2); justify-content: flex-end; }


/* ---------- web address + QR ---------- */
.addr { display: grid; grid-template-columns: 1fr 232px; gap: var(--space-6); align-items: start; }
.slugbox { display: flex; align-items: center; gap: 0; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); overflow: hidden; }
.slugbox:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); }
.slugbox.bad { border-color: var(--danger); }
.slugbox .pre { padding: 0 2px 0 var(--space-4); font-family: var(--font-mono); font-size: var(--text-sm); color: var(--text-faint); white-space: nowrap; }
.slugbox .pre.post { padding: 0 var(--space-4) 0 2px; }
.slugin { flex: 1; min-width: 0; border: 0; background: none; padding: 10px 12px 10px 0; font-family: var(--font-mono); font-size: var(--text-sm); color: var(--text); font-weight: 600; }
.slugin:focus { outline: none; }
.input-hint.bad { color: var(--danger); }
.qrpane { display: flex; flex-direction: column; align-items: center; gap: var(--space-3); padding: var(--space-4); border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); }
.qrframe { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px; background: #fff; border-radius: 12px; border: 1px solid var(--border); box-shadow: 0 1px 2px rgba(16, 24, 40, .06); }
.qrframe svg { display: block; }
.qrframe.sm { padding: 12px; }
.qrframe small { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: #6b7280; }
.qrmeta { text-align: center; }
.qrmeta b { display: block; font-size: var(--text-sm); }
.qrmeta small { display: block; font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); word-break: break-all; }
.qrbtns { display: flex; gap: var(--space-2); flex-wrap: wrap; justify-content: center; }
.mini { font-size: var(--text-xs); color: var(--text-muted); display: flex; align-items: center; gap: 6px; cursor: pointer; }
.mini input { accent-color: var(--primary); }
.qrfail { font-size: var(--text-xs); color: var(--text-faint); padding: var(--space-6); }
.sharegrid { display: grid; grid-template-columns: 1fr auto; gap: var(--space-5); align-items: start; }
.tbl.dns td code { font-size: 11.5px; }
.tbl.dns .mut { color: var(--text-muted); font-size: var(--text-xs); }

/* printable QR sheet */
.qrsheet { border: 1px solid var(--border); border-radius: 14px; background: #fff; color: #111827; padding: var(--space-7) var(--space-6); text-align: center; }
.qs-top { display: flex; align-items: center; gap: var(--space-3); text-align: left; padding-bottom: var(--space-5); border-bottom: 1px solid #e5e7eb; }
.qs-top b { display: block; font-size: var(--text-sm); font-weight: 700; }
.qs-top small { display: block; font-size: var(--text-xs); color: #6b7280; }
.qs-logo { width: 40px; height: 40px; object-fit: contain; }
.qs-mark { width: 40px; height: 40px; border-radius: 10px; color: #fff; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 13px; }
.qs-head { margin-top: var(--space-6); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--qk); }
.qs-h { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 700; margin: 6px 0 0; letter-spacing: -.01em; }
.qs-sub { font-size: var(--text-sm); color: #4b5563; margin: 6px 0 0; }
.qs-qr { display: flex; justify-content: center; padding: var(--space-6) 0 var(--space-4); }
.qs-url { font-family: var(--font-mono); font-size: var(--text-sm); font-weight: 600; color: var(--qk); word-break: break-all; }
.qs-close { margin-top: var(--space-4); font-size: var(--text-sm); color: #374151; }
.qs-foot { margin-top: var(--space-6); padding-top: var(--space-4); border-top: 1px solid #e5e7eb; font-size: 11px; color: #9ca3af; }

/* ---------- orders tab ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 10px;
  border-radius: var(--radius-pill); font-size: var(--text-xs); font-weight: 600;
  background: var(--surface-offset); color: var(--text-muted); white-space: nowrap;
}
.pill.p-paid { background: var(--primary-soft); color: var(--primary); }
.pill.p-done { background: var(--live-soft); color: var(--live); }
.pill.p-part { background: var(--warn-soft); color: var(--warn); }
.pill.p-ref { background: var(--danger-soft); color: var(--danger); }

.otools { display: flex; gap: var(--space-3); align-items: center; }
.otools .osearch { flex: 1 1 auto; min-width: 0; }
.otools .osort { flex: 0 0 168px; }
.frow { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.fchip {
  height: 30px; padding: 0 12px; border-radius: var(--radius-pill); border: 1px solid var(--border);
  background: var(--surface); color: var(--text-muted); font-size: var(--text-xs); font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px; transition: background .12s var(--ease), color .12s var(--ease), border-color .12s var(--ease);
}
.fchip:hover { border-color: var(--border-strong, var(--text-faint)); color: var(--text); }
.fchip i { font-style: normal; font-variant-numeric: tabular-nums; opacity: .65; }
.fchip.on { background: var(--text); border-color: var(--text); color: var(--bg); }
.fchip.on i { opacity: .7; }

.olist { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.orw {
  display: grid; width: 100%; text-align: left; align-items: center;
  grid-template-columns: 70px minmax(140px, 1.5fr) 104px 52px minmax(120px, 1fr) 92px 118px 22px;
  gap: var(--space-4); padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border); background: var(--surface); font-size: var(--text-sm);
  transition: background .12s var(--ease);
}
.orw:last-child { border-bottom: none; }
.orw-h {
  background: var(--surface-2); font-size: var(--text-xs); font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--text-faint);
}
button.orw:hover { background: var(--surface-2); cursor: pointer; }
.orw .shp { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.orw .shp b { font-weight: 600; }
.orw .shp small, .orw .dim { color: var(--text-muted); font-size: var(--text-xs); }
.orw .shp small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.orw .dim { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.orw .r { text-align: right; font-variant-numeric: tabular-nums; }
.orw .r small { display: block; font-size: var(--text-xs); }
.orw .neg { color: var(--danger); }
.orw .chev { color: var(--text-faint); text-align: right; }
.orw .mono { font-variant-numeric: tabular-nums; font-weight: 600; }
.empty.sm { padding: var(--space-10) var(--space-6); }
.empty.sm span { font-size: var(--text-sm); color: var(--text-muted); max-width: 40ch; }

/* ---------- order detail ---------- */
.ogrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); }
.obox {
  display: flex; flex-direction: column; gap: 2px; padding: var(--space-4);
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius);
}
.obox > span { font-size: var(--text-xs); font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 3px; }
.obox b { font-size: var(--text-sm); }
.obox small { font-size: var(--text-xs); color: var(--text-muted); overflow-wrap: anywhere; }

.oitems { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.oi {
  display: grid; grid-template-columns: minmax(140px, 1fr) 82px 52px 72px 82px;
  gap: var(--space-3); align-items: center; padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border); font-size: var(--text-sm);
}
.oi.rf { grid-template-columns: minmax(130px, 1fr) 62px 62px 68px 108px; }
.oi:last-child { border-bottom: none; }
.oi-h { background: var(--surface-2); font-size: var(--text-xs); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-faint); }
.oi .r { text-align: right; font-variant-numeric: tabular-nums; }
.oi .dim { color: var(--text-muted); }
.oi > span > b { font-weight: 600; }
.oi small.pers { display: block; font-size: var(--text-xs); color: var(--primary); margin-top: 2px; }
.oi .up { font-style: normal; font-size: var(--text-xs); color: var(--text-faint); }
.oi-t { background: var(--surface-2); font-size: var(--text-xs); color: var(--text-muted); padding: 8px var(--space-4); }
.oi-t > span:first-child { font-weight: 600; }
.oi-t.big { font-size: var(--text-sm); color: var(--text); font-weight: 600; }
.oi-t.neg, .oi-t.neg .r { color: var(--danger); }
.modal-f.spread { justify-content: space-between; }
.btn.danger { color: var(--danger); }
.btn-primary.danger { background: var(--danger); border-color: var(--danger); color: #fff; }

.rlist { display: flex; flex-direction: column; gap: var(--space-2); }
.ritem {
  display: grid; grid-template-columns: 76px 1fr; gap: 2px var(--space-3); align-items: baseline;
  padding: var(--space-3) var(--space-4); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2);
}
.ritem b { color: var(--danger); font-variant-numeric: tabular-nums; }
.ritem span { font-size: var(--text-sm); }
.ritem small { grid-column: 2; font-size: var(--text-xs); color: var(--text-muted); }

.qty.sm button { width: 28px; height: 30px; }
.qty.sm span { min-width: 26px; font-size: var(--text-sm); }
.picks.two { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.moneyin { display: flex; align-items: center; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.moneyin > span { padding: 0 var(--space-3); color: var(--text-muted); font-weight: 600; }
.moneyin .input { border: none; background: none; padding-left: 0; }
.rsum { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); padding: var(--space-4); border-radius: var(--radius); background: var(--surface-sunken); }
.rsum > div { display: flex; flex-direction: column; gap: 2px; }
.rsum span { font-size: var(--text-xs); font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-faint); }
.rsum b { font-family: var(--font-display); font-size: var(--text-lg); font-variant-numeric: tabular-nums; }

/* ---------- edit order ---------- */
.elist { display: flex; flex-direction: column; gap: var(--space-3); }
.erow { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-3); }
.efields { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) 104px 92px 34px; gap: var(--space-3); align-items: end; }
.efields .field { gap: 4px; min-width: 0; }
.efields .icon-btn { margin-bottom: 3px; color: var(--text-faint); }
.efields .icon-btn:hover { color: var(--danger); background: var(--danger-soft); }
.eline-t { text-align: right; }
.eline-t b { font-size: var(--text-sm); font-variant-numeric: tabular-nums; }
.eline-t small { font-size: var(--text-xs); color: var(--text-muted); }
.epers { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); padding-top: var(--space-3); border-top: 1px dashed var(--border); }
.epers .field label i { font-style: normal; color: var(--text-faint); font-weight: 500; }

.ediff { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); padding: var(--space-4); border-radius: var(--radius); background: var(--surface-sunken); }
.ediff > div { display: flex; flex-direction: column; gap: 2px; }
.ediff span { font-size: var(--text-xs); font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-faint); }
.ediff b { font-family: var(--font-display); font-size: var(--text-lg); font-variant-numeric: tabular-nums; }
.ediff small { font-size: var(--text-xs); color: var(--text-muted); }
.ediff > div.good b { color: var(--live); }
.ediff > div.bad b { color: var(--danger); }
.ritem b.up { color: var(--live); }
.ritem b.flat { color: var(--text-muted); }
.pill.p-due { background: var(--warn-soft); color: var(--warn); }

/* ---------- hand-out sheet ---------- */
.hsheet { display: grid; grid-template-columns: minmax(0, 1fr) 268px; gap: var(--space-6); align-items: start; }
.hsheet-a { display: flex; flex-direction: column; gap: var(--space-3); }
.hsheet-a small { font-family: var(--font-mono, ui-monospace, Menlo, monospace); font-size: 11.5px; color: var(--text-faint); text-align: center; overflow-wrap: anywhere; }

.psheet { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.psheet-h { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3); padding: var(--space-3) var(--space-4); background: var(--surface-2); border-bottom: 1px solid var(--border); }
.psheet-h b { font-family: var(--font-display); font-size: var(--text-base); }
.psheet-h span { font-size: var(--text-xs); color: var(--text-muted); white-space: nowrap; }
.psheet-sub { padding: 8px var(--space-4); font-size: var(--text-xs); color: var(--text-muted); background: var(--surface-2); border-bottom: 1px solid var(--border); }
/* Pickup/hand-out sheet checklist rows — was wrongly reusing .prow/.prow-h,
   which collided with the (structurally unrelated) Products tab row class
   of the same name and silently won the cascade since it's declared later
   in the file. Renamed to disambiguate. */
.psrow { display: grid; grid-template-columns: 28px minmax(120px, 1fr) minmax(0, 2fr) 58px; gap: var(--space-3); align-items: start; padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--border); font-size: var(--text-sm); }
.psrow:last-child { border-bottom: none; }
.psrow-h { background: var(--surface); font-size: var(--text-xs); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-faint); padding-top: 8px; padding-bottom: 8px; }
.psrow .pbox { width: 20px; height: 20px; border: 1.5px solid var(--text-faint); border-radius: 5px; display: grid; place-items: center; margin-top: 1px; }
.psrow .pbox svg { width: 14px; height: 14px; }
.psrow-h .pbox { display: none; }
.psrow.got { background: var(--surface-2); }
.psrow.got .pbox { border-color: var(--live); color: var(--live); }
.psrow.got .pname b { color: var(--text-muted); text-decoration: line-through; }
.psrow .pname { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.psrow .pname b { font-weight: 600; overflow-wrap: anywhere; }
.psrow .pname .owes { font-style: normal; font-size: var(--text-xs); color: var(--warn); font-weight: 600; }
.psrow .ppieces { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.psrow .ppieces i { font-style: normal; font-size: var(--text-xs); color: var(--text-muted); overflow-wrap: anywhere; }
.psrow .r { text-align: right; font-variant-numeric: tabular-nums; }

@media (max-width: 1080px) {
  .addr, .sharegrid { grid-template-columns: 1fr; }
  .qrpane { align-items: flex-start; }

  .cols { grid-template-columns: 1fr; }
  .side-card { position: static; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .hsheet { grid-template-columns: 1fr; }
  .modal-f { flex-wrap: wrap; }
  .modal-f.spread { justify-content: flex-end; }
  .modal-f.spread > .row { flex: 1 1 100%; justify-content: flex-end; }
  .psrow { grid-template-columns: 24px 1fr 52px; }
  .psrow .ppieces { grid-column: 2 / -1; }
  .psrow-h { display: none; }
  .efields { grid-template-columns: 1fr 1fr; }
  .efields > :nth-child(1) { grid-column: 1 / -1; }
  .efields .icon-btn { margin-bottom: 0; justify-self: end; }
  .epers, .ediff { grid-template-columns: 1fr; }
  .orw { grid-template-columns: 62px 1fr 88px; row-gap: 2px; }
  .orw > :nth-child(4), .orw > :nth-child(5), .orw > :nth-child(8) { display: none; }
  .orw-h { display: none; }
  .orw > :nth-child(7) { grid-column: 2 / -1; }
  .ogrid, .rsum, .picks.two { grid-template-columns: 1fr; }
  .oi, .oi.rf { grid-template-columns: 1fr 56px 78px; row-gap: 2px; }
  .oi > :nth-child(3) { display: none; }
  .oi-h { display: none; }
  .otools { flex-wrap: wrap; }
  .otools .osort { flex: 1 1 100%; }
  .shell { grid-template-columns: 1fr; min-width: 0; }
  .main, .page, .stack, .cols { min-width: 0; }
  .subtabs { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .subtabs button { white-space: nowrap; }
  .linkrow code, .notice code, .qrmeta small { overflow-wrap: anywhere; word-break: break-word; }
  .linkrow { flex-wrap: wrap; row-gap: var(--space-2); }
  .slugbox { flex-wrap: wrap; }
  .slugbox .pre { padding: 8px var(--space-4) 0; }
  .slugin { padding: 4px var(--space-4) 10px; width: 100%; }
  .side { position: static; height: auto; flex-direction: row; align-items: center; overflow-x: auto; border-right: none; border-bottom: 1px solid var(--border); gap: var(--space-4); }
  .side .nav { flex-direction: row; }
  .side .nav-t, .side-foot { display: none; }
  .topbar { padding: var(--space-4); flex-wrap: wrap; }
  .card-h { flex-wrap: wrap; padding: var(--space-4); }
  .card-b { padding: var(--space-4); }
  .tb-actions { flex-wrap: wrap; }
  .page { padding: var(--space-4); }
  .sf-hero { grid-template-columns: 1fr; }
  .pd { grid-template-columns: 1fr; }
  .ss-b, .slip-who { grid-template-columns: 1fr; }
  .org-cols { grid-template-columns: 1fr; }
  .org-top { flex-wrap: wrap; }
  .orow { grid-template-columns: 34px 1fr 64px 64px; row-gap: 4px; }
  .orow-h, .orow > :nth-child(5), .orow > :nth-child(6) { display: none; }
  .oline { grid-template-columns: 1fr auto; row-gap: 2px; }
  .oline .ol-ff, .oline > :nth-child(4) { display: none; }
  .in-prow { grid-template-columns: 46px 1fr 92px; }
  .in-prow > :nth-child(3), .in-prow > :nth-child(5) { display: none; }
  .in-submit { flex-direction: column; align-items: stretch; }
  .reqrow { grid-template-columns: 1fr; row-gap: var(--space-2); }
  .rq-a { justify-content: flex-start; }
  .logorow { flex-direction: column; align-items: flex-start; }
  .prow { grid-template-columns: 44px 1fr; grid-auto-rows: auto; row-gap: var(--space-3); }
  .pers-row { grid-template-columns: 1fr; }
  .joborder .jh { gap: var(--space-4); }
  .prow-h { display: none; }
  .prow > *:nth-child(n+3) { grid-column: 2; }
  .grid2 { grid-template-columns: 1fr; }
}
