/* Peppy Prints — monochrome UI, ported from the owner's calculator. */
/* Self-hosted fonts (public/fonts) — no external requests, faster first paint. */
@font-face {
  font-family: 'DM Sans'; font-style: normal; font-weight: 300 600; font-display: swap;
  src: url('/fonts/dm-sans.woff2') format('woff2');
}
@font-face {
  font-family: 'DM Mono'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('/fonts/dm-mono-400.woff2') format('woff2');
}
@font-face {
  font-family: 'DM Mono'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('/fonts/dm-mono-500.woff2') format('woff2');
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Feralphobia's Peppy Prints — dark ember theme. The old light-theme variable names are
   kept (lots of rules reference them) but remapped: --black is now the TEXT color (warm
   cream) and --white is the card SURFACE color (charred brown). Fire accents are new. */
:root {
  --black: #f6e9da;          /* text on dark */
  --white: #1b110a;          /* card surface */
  --gray-50: #0e0805;        /* page background */
  --gray-100: #291a10;       /* hairline borders */
  --gray-200: #392517;       /* stronger borders */
  --gray-400: #9c7a5e;       /* muted label text */
  --gray-600: #cfa886;       /* secondary text */
  --gray-800: #f0dfcc;
  --coal: #070402;           /* header / deepest black */
  --fire: #ff6a00;           /* molten orange */
  --fire-2: #ffb300;         /* flame amber */
  --grad: linear-gradient(135deg, #ff6a00 0%, #ffb300 100%);
  --green: #4ade80;
  --green-light: #0f2a1a;
  --red: #ff6b5e;
  --red-light: #38130d;
  --purple-light: #262040;
  --purple-dark: #b3a8ff;
  --teal-light: #0d2c26;
  --teal-dark: #4fd8b8;
  --amber-light: #33210d;
  --amber-dark: #ffb35c;
  --pink-light: #33101d;
  --pink-dark: #ff7ea8;
  --radius: 8px;
  --radius-lg: 12px;
  --font: 'DM Sans', sans-serif;
  --mono: 'DM Mono', monospace;
}

body { font-family: var(--font); background: var(--gray-50); color: var(--black); min-height: 100vh; }
/* form controls don't inherit color — force readable text + dark dropdowns on the ember theme */
input, select, textarea { color: var(--black); color-scheme: dark; }
select option { background: var(--white); color: var(--black); }

/* ---------- header ---------- */
header {
  background: var(--coal); color: var(--black);
  border-bottom: 1px solid #2b1a0e;
  padding: 16px 40px; display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
header .brand { display: flex; align-items: center; gap: 14px; }
header .brand a { text-decoration: none; display: flex; align-items: center; gap: 14px; }
.brand-emblem { width: 52px; height: 52px; border-radius: 12px; border: 1px solid rgba(255, 138, 60, .4); box-shadow: 0 0 18px rgba(255, 106, 0, .25); }
.brand-mark { height: 34px; width: auto; display: block; }
.brand-word { line-height: 1.05; }
.brand-eyebrow { display: block; font-size: 10px; font-weight: 700; letter-spacing: .28em; color: #ff8a3c; }
.brand-name {
  font-size: 22px; font-weight: 700; letter-spacing: .03em; margin: 2px 0 0;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand-tag { display: block; font-size: 11px; font-style: italic; color: #9c7a5e; margin-top: 2px; }
header h1 { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; line-height: 1; }
header .brand small { font-size: 13px; color: #888; font-weight: 300; }
header nav { display: flex; gap: 8px; align-items: center; }
header nav a, header .hbtn {
  font-size: 13px; color: #ccc; text-decoration: none; padding: 8px 14px;
  border: 1px solid #333; border-radius: var(--radius); background: #1e1e1e; cursor: pointer; font-family: var(--font);
}
header nav a:hover, header .hbtn:hover { color: #fff; border-color: #555; }
header nav a.active { color: #fff; background: #333; }

.reseller-toggle { display: flex; align-items: center; gap: 10px; background: #1e1e1e; border: 1px solid #333; border-radius: var(--radius); padding: 8px 14px; cursor: pointer; }
.reseller-toggle input { width: 16px; height: 16px; accent-color: #fff; cursor: pointer; }
.reseller-toggle label { font-size: 13px; color: #ccc; cursor: pointer; white-space: nowrap; }

/* ---------- layout ---------- */
.main { display: flex; gap: 0; min-height: calc(100vh - 86px); align-items: flex-start; }
.sidebar {
  width: 320px; flex-shrink: 0; background: var(--white); border-right: 1px solid var(--gray-200);
  padding: 24px 20px; position: sticky; top: 0; max-height: 100vh; overflow-y: auto;
}
.content { flex: 1; padding: 28px 32px; max-width: 100%; min-width: 0; }

/* ---------- summary sidebar ---------- */
.summary-label { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gray-400); margin-bottom: 14px; }
.summary-block { background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 16px; margin-bottom: 12px; }
.summary-lines { font-size: 12px; color: var(--gray-600); margin-bottom: 10px; }
.summary-lines .sl { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; }
.summary-lines .sl span:last-child { font-family: var(--mono); color: var(--black); white-space: nowrap; }
.summary-lines .empty { color: var(--gray-400); font-style: italic; }
.summary-row { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 0; font-size: 13px; color: var(--gray-600); }
.summary-row span:last-child { font-family: var(--mono); color: var(--black); }
.summary-row.discount span:last-child { color: var(--green); }
.summary-row.grand-total { font-size: 24px; font-weight: 500; color: var(--black); font-family: var(--mono); border-top: 1px solid var(--gray-200); margin-top: 8px; padding-top: 12px; }
.summary-row.grand-total span:first-child { font-size: 13px; font-weight: 400; font-family: var(--font); color: var(--gray-600); }
.meta-row { display: flex; justify-content: space-between; padding: 5px 0; font-size: 12px; color: var(--gray-600); border-bottom: 1px solid var(--gray-100); }
.meta-row:last-child { border-bottom: none; }
.meta-row span:last-child { font-family: var(--mono); color: var(--black); }
.profit-val { color: var(--green) !important; }
.internal-only { display: none; }
body.is-admin .internal-only { display: block; }
body.is-admin .reseller-toggle { display: flex; }

/* ---------- sections + item cards ---------- */
.section { margin-bottom: 30px; }
.section-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--gray-200); }
.section-title { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gray-400); }
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 8px; }
.item-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; transition: border-color .15s; }
.item-card:hover { border-color: var(--gray-400); }
.item-card.active { border-color: var(--fire); box-shadow: 0 0 12px rgba(255, 106, 0, .18); }
.item-name { font-size: 12px; font-weight: 500; color: var(--black); line-height: 1.3; }
.item-name small { display: block; font-weight: 300; color: var(--gray-600); font-size: 11px; }
.item-controls { display: flex; align-items: center; gap: 6px; }
.item-controls select, .item-controls input[type=number] {
  flex: 1; min-width: 0; font-family: var(--font); font-size: 12px; height: 28px; border: 1px solid var(--gray-200);
  border-radius: 5px; background: var(--gray-50); color: var(--black); padding: 0 6px; outline: none;
}
.item-controls select:focus, .item-controls input:focus { border-color: var(--black); background: var(--white); }
.item-price { font-size: 12px; font-family: var(--mono); color: var(--gray-600); white-space: nowrap; }

/* Shop the shelf (on-hand / reject listings) */
.item-grid.shop-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.item-photo-wrap { position: relative; margin: -10px -12px 0; }
.item-photo { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius) var(--radius) 0 0; background: var(--gray-100); display: block; }
.item-photo-dots { position: absolute; bottom: 6px; left: 0; right: 0; display: flex; justify-content: center; gap: 4px; }
.item-photo-dots span { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.6); cursor: pointer; }
.item-photo-dots span.active { background: var(--white); box-shadow: 0 0 0 1px rgba(0,0,0,.3); }
.item-card.reject { position: relative; overflow: hidden; border-width: 2px; }
.item-card.reject.no-photo { padding-top: 64px; }
.item-card.reject .item-controls { flex-wrap: wrap; }
.item-card.reject .item-controls .stepper { flex-shrink: 0; min-width: 88px; }
.ribbon { position: absolute; top: 16px; left: -40px; width: 160px; transform: rotate(-45deg); text-align: center; font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #fff; padding: 4px 0; z-index: 2; box-shadow: 0 2px 6px rgba(0,0,0,.4); pointer-events: none; }
.item-photo-chips { display: flex; gap: 4px; flex-wrap: wrap; }
.item-photo-chips button { font-family: var(--font); font-size: 10px; border: 1px solid var(--gray-200); background: var(--gray-50); color: var(--gray-600); border-radius: 20px; padding: 2px 8px; cursor: pointer; }
.item-photo-chips button.active { background: var(--fire); border-color: var(--fire); color: #111; font-weight: 600; }
.flaw-note { font-size: 11px; color: var(--gray-600); border-left: 3px solid; padding: 2px 8px; line-height: 1.4; }
.item-price .was { color: var(--gray-400); font-weight: 400; }
.item-price .now { font-size: 14px; }
.off-pill { font-size: 10px; font-weight: 700; color: #fff; border-radius: 20px; padding: 1px 7px; margin-left: 2px; }
.legend-pill { font-size: 11px; font-weight: 600; color: #fff; border-radius: 20px; padding: 3px 10px; }
.item-desc { font-size: 11px; color: var(--gray-600); line-height: 1.4; }
.stock-badge { font-size: 10px; font-family: var(--mono); color: var(--gray-600); background: var(--gray-100); border-radius: 20px; padding: 1px 8px; }
.stock-badge.reject { color: var(--red); background: var(--red-light); }
.stock-badge.low { color: var(--amber-dark); background: var(--amber-light); }

/* ---------- box builder cards ---------- */
.bsb-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 16px 18px; }
.bsb-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.bsb-row-label { font-size: 12px; color: var(--gray-600); min-width: 64px; }
.bsb-row select, .bsb-row input[type=number] { font-family: var(--font); font-size: 12px; height: 28px; border: 1px solid var(--gray-200); border-radius: 5px; background: var(--gray-50); color: var(--black); padding: 0 6px; outline: none; flex: 1; }
.bsb-row input[type=number] { flex: none; width: 64px; text-align: center; }
.bsb-tiers-config { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; padding: 12px; background: var(--gray-50); border-radius: var(--radius); border: 1px solid var(--gray-100); }
.bsb-tier-row { display: flex; align-items: center; gap: 8px; }
.bsb-tier-label { font-size: 11px; font-family: var(--mono); color: var(--gray-400); min-width: 60px; }
.bsb-tier-row select { font-family: var(--font); font-size: 12px; height: 26px; border: 1px solid var(--gray-200); border-radius: 5px; background: var(--white); color: var(--black); padding: 0 6px; flex: 1; outline: none; }
.bsb-vis { display: flex; flex-direction: column-reverse; gap: 3px; margin: 10px 0; }
.bsb-vis-block { border-radius: 5px; padding: 6px 10px; font-size: 11px; font-weight: 500; display: flex; justify-content: space-between; font-family: var(--mono); }
.bsb-vis-block.t3ml { background: var(--purple-light); color: var(--purple-dark); }
.bsb-vis-block.t10ml { background: var(--teal-light); color: var(--teal-dark); }
.bsb-vis-block.t20ml { background: var(--amber-light); color: var(--amber-dark); }
.bsb-vis-block.t30ml { background: var(--pink-light); color: var(--pink-dark); }
.bsb-vis-block.tkit { background: var(--green-light); color: var(--green); }
.bsb-capacity { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--gray-100); }
.bsb-cap-item { font-size: 11px; color: var(--gray-600); }
.bsb-cap-item strong { font-family: var(--mono); color: var(--black); font-weight: 500; }

/* ---------- buttons ---------- */
.btn { font-family: var(--font); font-size: 14px; font-weight: 700; border-radius: var(--radius); padding: 11px 18px; cursor: pointer; border: none; background: var(--grad); color: #1c0c02; transition: all .15s; box-shadow: 0 2px 12px rgba(255, 106, 0, .25); }
.btn:hover { filter: brightness(1.12); box-shadow: 0 2px 18px rgba(255, 140, 0, .4); }
.btn:disabled { opacity: .45; cursor: default; filter: none; box-shadow: none; }
.btn.full { width: 100%; }
.btn.ghost { background: none; color: var(--black); border: 1px solid var(--gray-200); font-weight: 500; box-shadow: none; }
.btn.ghost:hover { border-color: var(--fire); background: rgba(255, 106, 0, .08); filter: none; }
.btn.sm { font-size: 12px; padding: 6px 12px; }
.btn.danger { border: 1px solid var(--red); color: var(--red); background: none; font-weight: 500; box-shadow: none; }
.btn.danger:hover { background: var(--red-light); filter: none; }

/* ---------- forms ---------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; font-weight: 500; color: var(--gray-600); margin-bottom: 5px; }
.field input, .field textarea, .field select {
  width: 100%; font-family: var(--font); font-size: 14px; padding: 10px 12px; border: 1px solid var(--gray-200);
  border-radius: var(--radius); background: var(--white); color: var(--black); outline: none;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--black); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hidden { display: none !important; }
.note { font-size: 12px; color: var(--gray-600); }
.error-msg { background: var(--red-light); color: var(--red); border-radius: var(--radius); padding: 10px 14px; font-size: 13px; margin: 10px 0; }
.ok-msg { background: var(--green-light); color: var(--green); border-radius: var(--radius); padding: 10px 14px; font-size: 13px; margin: 10px 0; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--gray-200); margin-bottom: 24px; }
.tab { font-size: 13px; font-weight: 500; color: var(--gray-600); padding: 10px 16px; cursor: pointer; border: none; background: none; border-bottom: 2px solid transparent; font-family: var(--font); }
.tab.active { color: var(--black); border-bottom-color: var(--fire); }
.tabpane { display: none; }
.tabpane.active { display: block; }

/* ---------- order desk ---------- */
.stat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-bottom: 18px; }
.stat { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 14px 16px; }
.stat .label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--gray-400); }
.stat .val { font-family: var(--mono); font-size: 22px; color: var(--black); margin-top: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chip { font-size: 12px; font-weight: 500; padding: 7px 14px; border-radius: 20px; border: 1px solid var(--gray-200); background: var(--white); color: var(--gray-600); cursor: pointer; }
.chip.active { background: var(--grad); color: #1c0c02; border-color: transparent; font-weight: 700; }
.order { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 16px 18px; margin-bottom: 12px; }
.order .top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; align-items: flex-start; }
.order .oid { font-family: var(--mono); font-weight: 500; }
.order .total { font-family: var(--mono); font-size: 18px; }
.order .who { font-size: 13px; color: var(--gray-600); margin-top: 3px; }
.order .when { font-size: 11px; color: var(--gray-400); margin-top: 2px; }
.order .body { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 12px; font-size: 13px; }
.order .body h4 { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--gray-400); margin-bottom: 4px; }
.order .li { display: flex; justify-content: space-between; gap: 10px; padding: 1px 0; }
.order .li span:last-child { font-family: var(--mono); color: var(--gray-600); }
.order .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--gray-100); }
.badge { font-size: 11px; font-weight: 500; font-family: var(--mono); padding: 2px 8px; border-radius: 4px; }
.badge.Ordered { background: var(--amber-light); color: var(--amber-dark); }
.badge.Shipped { background: var(--teal-light); color: var(--teal-dark); }
.badge.Notified { background: var(--green-light); color: var(--green); }
.badge.Complete { background: var(--purple-light); color: var(--purple-dark); }
.badge.paid { background: var(--green-light); color: var(--green); }
.badge.unpaid { background: var(--red-light); color: var(--red); }
.badge.review { background: var(--red-light); color: var(--red); }

/* ---------- catalog/settings editor ---------- */
.cfg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.cfg-cell { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.cfg-cell label { color: var(--gray-600); min-width: 54px; }
.cfg-cell input { width: 70px; font-family: var(--mono); font-size: 12px; padding: 5px 6px; border: 1px solid var(--gray-200); border-radius: 5px; }
.cfg-group { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 16px; margin-bottom: 14px; }
.cfg-group h3 { font-size: 13px; margin-bottom: 12px; }

/* ---------- customize step (colors / pattern / notes per item) ---------- */
.cust-intro { margin-bottom: 18px; }
.cust-intro h2 { font-size: 18px; font-weight: 600; }
.cust-intro p { font-size: 13px; color: var(--gray-600); margin-top: 4px; }
.cust-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 16px 18px; margin-bottom: 12px; }
.cust-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; padding-bottom: 10px; border-bottom: 1px solid var(--gray-100); margin-bottom: 12px; }
.cust-head strong { font-size: 14px; font-weight: 600; }
.cust-amt { font-family: var(--mono); white-space: nowrap; }
.cust-colors { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 12px; }
.cust-color label, .cust-pattern > label { display: block; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--gray-400); margin-bottom: 5px; }
.cust-color-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cust-color-row select { flex: 1; min-width: 0; font-family: var(--font); font-size: 13px; height: 32px; border: 1px solid var(--gray-200); border-radius: var(--radius); background: var(--gray-50); color: var(--black); padding: 0 8px; outline: none; }
.cust-color-row select:focus { border-color: var(--black); background: var(--white); }
.swatch { width: 22px; height: 22px; border-radius: 50%; border: 1px dashed var(--gray-400); flex-shrink: 0; }
.cust-drawers { margin-bottom: 12px; padding: 12px; background: var(--gray-50); border: 1px solid var(--gray-100); border-radius: var(--radius); }
.cust-drawers > label { display: block; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--gray-400); margin-bottom: 8px; }
.cust-drawer-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 6px; }
.cust-drawer-row .cust-color-row { flex: 1 1 150px; }
.cust-drawer-row:last-child { margin-bottom: 0; }
.cust-drawer-label { font-size: 11px; font-family: var(--mono); color: var(--gray-600); min-width: 110px; }
.cust-drawer-row select { background: var(--white); }
@media (max-width: 560px) { .cust-drawer-row { flex-wrap: wrap; } .cust-drawer-label { min-width: 100%; } }
.cust-pattern-row { display: flex; gap: 14px; align-items: flex-start; }
.pattern-preview { width: 96px; height: 96px; flex-shrink: 0; }
.pattern-preview svg { width: 100%; height: 100%; display: block; }
.pattern-pick { flex: 1; }
.pattern-pick select { width: 100%; font-family: var(--font); font-size: 13px; height: 32px; border: 1px solid var(--gray-200); border-radius: var(--radius); background: var(--gray-50); padding: 0 8px; outline: none; }
.pattern-pick select:focus { border-color: var(--black); background: var(--white); }
.pattern-desc { font-size: 12px; color: var(--gray-600); margin-top: 8px; line-height: 1.5; }
.li-custom { font-size: 11px; color: var(--gray-600); padding: 1px 0 3px 12px; }
.li-custom em { color: var(--gray-400); font-style: normal; }

/* ---------- modal ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: none; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto; z-index: 50; }
.modal-bg.open { display: flex; }
.modal { background: var(--white); border-radius: var(--radius-lg); padding: 24px; width: 100%; max-width: 560px; }
.modal h2 { font-size: 18px; margin-bottom: 16px; }

/* ---------- +/− quantity steppers ---------- */
.stepper { display: flex; align-items: stretch; border: 1px solid var(--gray-200); border-radius: 7px; overflow: hidden; background: var(--gray-50); flex: 1; min-width: 0; }
.stepper .st-btn { width: 28px; border: none; background: none; font-size: 15px; color: var(--gray-600); cursor: pointer; font-family: var(--font); line-height: 1; }
.stepper .st-btn:hover { background: var(--gray-100); color: var(--black); }
.stepper input { width: 100%; min-width: 0; border: none; background: none; text-align: center; font-family: var(--mono); font-size: 13px; outline: none; padding: 5px 0; }
.item-card.active .stepper { border-color: var(--fire); background: var(--white); }
.bsb-row .stepper { flex: none; width: 110px; }

/* ---------- hero (portal) ---------- */
.hero {
  background: radial-gradient(80% 130% at 70% 20%, #341a06 0%, #170b04 45%, var(--coal) 100%);
  border-bottom: 1px solid #2b1a0e;
  display: flex; align-items: flex-end; justify-content: center; gap: 34px;
  padding: 34px 24px 0; overflow: hidden;
}
.hero-copy { max-width: 460px; padding-bottom: 34px; }
.hero-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .3em; color: #ff8a3c; }
.hero-copy h2 {
  font-size: clamp(34px, 6vw, 54px); font-weight: 700; letter-spacing: .01em; line-height: 1; margin: 6px 0 10px;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 14px rgba(255, 106, 0, .35));
}
.hero-tagline { font-size: 17px; font-style: italic; color: var(--gray-800); margin-bottom: 8px; }
.hero-sub { font-size: 13px; color: var(--gray-600); line-height: 1.55; }
.hero-peppy { width: 210px; height: auto; display: block; filter: drop-shadow(0 0 34px rgba(255, 106, 0, .45)); }
@media (max-width: 640px) {
  .hero { flex-direction: column; align-items: center; text-align: center; gap: 10px; padding-top: 24px; }
  .hero-copy { padding-bottom: 0; }
  .hero-peppy { width: 160px; }
}

/* mascot icons (success / tracking) */
.mascot { height: 110px; width: auto; display: inline-block; filter: drop-shadow(0 0 18px rgba(255, 106, 0, .35)); }

/* ---------- how it works strip ---------- */
.howit { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 26px; padding: 16px 20px; background: var(--white); border-bottom: 1px solid var(--gray-100); }
.howit-step { display: flex; align-items: center; gap: 10px; }
.howit-step i { font-style: normal; width: 26px; height: 26px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; font-family: var(--mono); font-size: 12px; font-weight: 700; background: var(--grad); color: #1c0c02; }
.howit-step img { width: 34px; height: auto; border-radius: 7px; flex-shrink: 0; }
.howit-step b { display: block; font-size: 13px; }
.howit-step span { display: block; font-size: 11px; color: var(--gray-600); }

/* owner-set turnaround estimate strip */
.turnaround {
  text-align: center; padding: 9px 20px; font-size: 13px; color: var(--gray-800);
  background: linear-gradient(90deg, rgba(255, 106, 0, .12), rgba(255, 179, 0, .07) 50%, rgba(255, 106, 0, .12));
  border-bottom: 1px solid var(--gray-100);
}
.turnaround b { color: var(--fire-2); }

/* discount code entry (cart sidebar) */
.promo { margin-top: 10px; }
.promo-entry { display: flex; gap: 7px; }
.promo-entry input {
  flex: 1; min-width: 0; padding: 8px 11px; font-size: 12.5px; font-family: var(--mono);
  text-transform: uppercase; background: var(--gray-50); border: 1px solid var(--gray-200);
  border-radius: var(--radius);
}
.promo-entry input::placeholder { text-transform: none; font-family: var(--font); }
.promo-applied {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 7px 11px; font-size: 12.5px; border-radius: var(--radius);
  background: var(--green-light); color: var(--green); border: 1px solid rgba(74, 222, 128, .25);
}
.promo-applied span { font-family: var(--mono); }
.promo-applied button {
  background: none; border: none; color: var(--green); cursor: pointer; font-size: 13px;
  padding: 2px 5px; border-radius: 5px;
}
.promo-applied button:hover { background: rgba(74, 222, 128, .15); }
.promo-msg { font-size: 11.5px; color: var(--red); margin-top: 5px; min-height: 0; }

/* ---------- Peppy mood (cart reactions) ---------- */
.peppy-mood { text-align: center; margin-top: 18px; }
.peppy-mood img { height: 96px; width: auto; filter: drop-shadow(0 0 16px rgba(255, 106, 0, .3)); }
.peppy-mood p { font-size: 12px; font-style: italic; color: var(--gray-600); margin-top: 6px; }
@keyframes moodPop { 0% { transform: scale(.7); } 55% { transform: scale(1.12); } 100% { transform: scale(1); } }
.mood-pop { animation: moodPop .4s ease; }

/* ---------- card pulse on add ---------- */
@keyframes cardPulse { 0% { box-shadow: 0 0 0 0 rgba(255, 106, 0, .55); } 100% { box-shadow: 0 0 0 14px rgba(255, 106, 0, 0); } }
.item-card.pulse, .bsb-card.pulse { animation: cardPulse .45s ease-out; }
.item-card { transition: border-color .15s, transform .15s, box-shadow .2s; }
.item-card:hover { transform: translateY(-2px); }

/* ---------- sticky section jump-chips ---------- */
.section-chips { position: sticky; top: 0; z-index: 30; display: flex; gap: 6px; overflow-x: auto; padding: 10px 16px; background: rgba(14, 8, 5, .92); backdrop-filter: blur(6px); border-bottom: 1px solid var(--gray-100); scrollbar-width: none; }
.section-chips::-webkit-scrollbar { display: none; }
.sec-chip { flex-shrink: 0; font-family: var(--font); font-size: 12px; font-weight: 500; padding: 6px 13px; border-radius: 16px; border: 1px solid var(--gray-200); background: none; color: var(--gray-600); cursor: pointer; white-space: nowrap; }
.sec-chip:hover { color: var(--black); border-color: var(--gray-400); }
.sec-chip.active { background: var(--grad); color: #1c0c02; border-color: transparent; font-weight: 700; }
#builder .section { scroll-margin-top: 64px; }

/* mobile: tap a section header to collapse it */
@media (max-width: 640px) {
  #builder .section-header { cursor: pointer; }
  #builder .section-header::after { content: '−'; margin-left: auto; color: var(--gray-400); font-family: var(--mono); }
  #builder .section.collapsed .section-header::after { content: '+'; }
  #builder .section.collapsed .item-grid, #builder .section.collapsed .bsb-card { display: none; }
}

/* ---------- checkout recap ---------- */
.recap { background: var(--gray-50); border: 1px solid var(--gray-100); border-radius: var(--radius-lg); padding: 12px 14px; margin-bottom: 16px; max-height: 200px; overflow-y: auto; }
.recap-line { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; padding: 2px 0; }
.recap-line span:last-child { font-family: var(--mono); white-space: nowrap; }
.recap-custom { font-size: 11px; color: var(--gray-600); padding-left: 12px; }
.recap-total { border-top: 1px solid var(--gray-200); margin-top: 6px; padding-top: 8px; font-weight: 700; }

/* ---------- FAQ + Discord + footer ---------- */
.faq-wrap { max-width: 720px; margin: 0 auto; padding: 40px 20px 20px; }
.faq-wrap h2 { font-size: 22px; margin-bottom: 16px; }
.faq-wrap details { background: var(--white); border: 1px solid var(--gray-100); border-radius: var(--radius-lg); margin-bottom: 8px; overflow: hidden; }
.faq-wrap summary { padding: 14px 18px; font-size: 14px; font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq-wrap summary::after { content: '+'; font-family: var(--mono); color: var(--fire); font-size: 16px; }
.faq-wrap details[open] summary::after { content: '−'; }
.faq-wrap details p { padding: 0 18px 14px; font-size: 13px; color: var(--gray-600); line-height: 1.6; }
.faq-wrap details a { color: var(--fire); }
.discord-cta { display: flex; align-items: center; gap: 16px; background: var(--white); border: 1px solid rgba(255, 138, 60, .3); border-radius: var(--radius-lg); padding: 16px 20px; margin-top: 20px; }
.discord-cta img { height: 64px; width: auto; }
.discord-cta b { font-size: 15px; }
.discord-cta p { font-size: 12px; color: var(--gray-600); }
.discord-cta .btn { margin-left: auto; white-space: nowrap; }
@media (max-width: 560px) { .discord-cta { flex-wrap: wrap; } .discord-cta .btn { margin: 0; width: 100%; } }
.site-footer { text-align: center; padding: 30px 20px 40px; border-top: 1px solid var(--gray-100); margin-top: 30px; }

/* ---------- flow steps (portal progress) ---------- */
.flow-steps { display: flex; gap: 6px; justify-content: center; padding: 14px 16px 0; background: var(--gray-50); }
.fs { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 500; color: var(--gray-400); padding: 6px 14px; border-radius: 20px; }
.fs i { font-style: normal; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-family: var(--mono); border: 1.5px solid var(--gray-200); }
.fs.active { color: var(--black); background: var(--white); border: 1px solid var(--gray-200); }
.fs.active i { background: var(--grad); color: #1c0c02; border-color: transparent; font-weight: 700; }
.fs.done { color: var(--green); }
.fs.done i { background: var(--green-light); color: var(--green); border-color: var(--green-light); }

/* ---------- customize: live product preview ---------- */
.cust-body { display: flex; gap: 18px; align-items: flex-start; }
/* light "spec sheet" panel so the product illustrations read on the dark theme */
.cust-product { width: 190px; flex-shrink: 0; position: sticky; top: 76px; background: #f2e6d5; border: 1px solid #d9c5a8; border-radius: var(--radius-lg); padding: 10px; }
.cust-product svg { width: 100%; height: auto; display: block; }
/* 3D configurator canvas (real STL viewer) — drag to spin */
.cust-product.is-3d { background: radial-gradient(80% 80% at 50% 32%, #3a2412 0%, #170d06 100%); border-color: rgba(255, 138, 60, .3); }
.cust-product.is-3d canvas { width: 100% !important; height: auto !important; display: block; border-radius: 8px; }
.cust-product.is-3d::after { content: 'drag to spin · live colors'; display: block; text-align: center; font-size: 10px; color: #c9a687; padding-top: 6px; letter-spacing: .05em; }
.cust-fields { flex: 1; min-width: 0; }
@media (max-width: 640px) {
  .cust-body { flex-direction: column; }
  .cust-product { width: 100%; position: static; max-width: 230px; margin: 0 auto; }
}

/* ---------- box builder art ---------- */
.bsb-body { display: flex; gap: 18px; align-items: flex-start; }
.bsb-art { width: 150px; flex-shrink: 0; background: #f2e6d5; border: 1px solid #d9c5a8; border-radius: var(--radius-lg); padding: 8px; }
.bsb-art svg { width: 100%; height: auto; display: block; }
.bsb-fields { flex: 1; min-width: 0; }
@media (max-width: 640px) { .bsb-art { display: none; } }

/* ---------- toasts ---------- */
.toast-holder { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--black); color: var(--white); font-size: 13px; font-weight: 500; padding: 11px 20px; border-radius: 24px; box-shadow: 0 6px 24px rgba(0,0,0,.25); opacity: 0; transform: translateY(8px); transition: all .25s; max-width: 90vw; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.ok { background: var(--green); }
.toast.err { background: var(--red); }

/* ---------- sticky mobile total bar ---------- */
.sticky-bar { display: none; }
@media (max-width: 820px) {
  .sticky-bar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--white); border-top: 1px solid var(--gray-200); box-shadow: 0 -4px 16px rgba(0,0,0,.06); }
  .sticky-bar .sb-total { font-family: var(--mono); font-size: 20px; font-weight: 500; }
  body { padding-bottom: 76px; }
}

/* ---------- tracking timeline ---------- */
/* Order status timeline: horizontal Peppy stepper (vertical on small screens).
   .done = completed stage, .now = where the order currently sits (ember glow). */
.timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 18px; }
.tl-step { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 7px; padding: 8px 4px; position: relative; }
.tl-step:not(:first-child)::before { content: ''; position: absolute; top: 30px; left: calc(-50% + 34px); right: calc(50% + 34px); height: 3px; border-radius: 2px; background: var(--gray-200); }
.tl-step.done:not(:first-child)::before, .tl-step.now:not(:first-child)::before { background: var(--grad); }
.tl-iconwrap { position: relative; width: 58px; height: 58px; border-radius: 15px; background: var(--gray-100); border: 1px solid var(--gray-200); display: grid; place-items: center; }
.tl-step.done .tl-iconwrap { border-color: var(--fire); background: var(--amber-light); }
.tl-step.now .tl-iconwrap { border-color: var(--fire); animation: tl-glow 1.8s ease-in-out infinite; }
.tl-icon { width: 44px; height: auto; border-radius: 10px; }
.tl-step:not(.done):not(.now) .tl-icon { filter: grayscale(1); opacity: .4; }
.tl-check { position: absolute; right: -6px; top: -6px; width: 19px; height: 19px; border-radius: 50%; background: var(--green); color: #06130b; font-size: 11px; font-style: normal; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--white); }
.tl-step:not(.done) .tl-check { display: none; }
.tl-label { font-size: 12.5px; font-weight: 600; }
.tl-step:not(.done):not(.now) .tl-label { color: var(--gray-400); font-weight: 500; }
.tl-note { font-size: 11px; color: var(--gray-600); line-height: 1.35; }
@keyframes tl-glow {
  0%, 100% { box-shadow: 0 0 0 3px rgba(255, 106, 0, .25); }
  50% { box-shadow: 0 0 0 7px rgba(255, 106, 0, .08); }
}
@media (max-width: 560px) {
  .timeline { grid-template-columns: 1fr; gap: 0; }
  .tl-step { flex-direction: row; align-items: center; text-align: left; gap: 12px; padding: 9px 0; }
  .tl-step:not(:first-child)::before { top: -14px; left: 27px; right: auto; width: 3px; height: 28px; }
  .tl-body { flex: 1; }
}

/* ---------- availability toggles ---------- */
.off-badge { font-size: 9px; font-weight: 700; letter-spacing: .08em; font-family: var(--mono); background: var(--red-light); color: var(--red); border: 1px solid rgba(255,107,94,.35); border-radius: 4px; padding: 1px 6px; vertical-align: 2px; }
.item-card.is-off { opacity: .5; }
.item-card.is-off:hover { opacity: .8; }
.avail-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 0; border-bottom: 1px solid var(--gray-100); }
.avail-row:last-child { border-bottom: none; }
.avail-name { font-size: 13px; font-weight: 600; min-width: 190px; }
.avail-chip { font-size: 11px; font-family: var(--mono); font-weight: 500; padding: 4px 11px; border-radius: 14px; cursor: pointer; border: 1px solid var(--gray-200); background: none; color: var(--gray-400); text-decoration: line-through; }
.avail-chip.on { background: var(--green-light); color: var(--green); border-color: rgba(74,222,128,.35); text-decoration: none; }
.avail-chip.master { font-family: var(--font); font-weight: 700; }

/* ---------- admin: sparkline + editing banner ---------- */
.sparkline { width: 100%; height: 34px; margin-top: 4px; }
.sparkline polyline { fill: none; stroke: var(--green); stroke-width: 2; }
.sparkline .fillarea { fill: var(--green-light); stroke: none; }
.edit-banner { background: var(--amber-light); color: var(--amber-dark); border: 1px solid #f0dcc0; border-radius: var(--radius-lg); padding: 12px 16px; margin-bottom: 14px; display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 13px; font-weight: 500; }

/* ---------- login ---------- */
.login-wrap { max-width: 360px; margin: 80px auto; padding: 0 16px; }
.login-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 28px; }
.login-card h1 { font-size: 20px; margin-bottom: 4px; }
.login-card p { font-size: 13px; color: var(--gray-600); margin-bottom: 18px; }

@media (max-width: 820px) {
  header { padding: 18px 20px; flex-wrap: wrap; }
  .main { flex-direction: column; }
  .sidebar { width: 100%; position: static; max-height: none; border-right: none; border-bottom: 1px solid var(--gray-200); }
  .content { padding: 20px; }
  .order .body { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
}
