/* merch-table — neutral, razor-sharp, venue-dark product UI. No brand skin. */

:root {
  --bg: #0a0b0d;
  --surface: #141619;
  --surface-2: #1b1e23;
  --line: #26292f;
  --line-2: #34383f;
  --text: #f4f6f8;
  --muted: #8f97a1;
  --faint: #5c6570;
  --paid: #3ddc84;
  --paid-dim: rgba(61, 220, 132, .12);
  --danger: #ff5d5d;
  --warn: #ffb020;
  --r-lg: 18px;
  --r-md: 13px;
  --r-sm: 9px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100%;
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select { font: inherit; }

/* ---- test banner ---- */
.testbanner {
  background: repeating-linear-gradient(-45deg, #46390b, #46390b 14px, #38300f 14px, #38300f 28px);
  color: var(--warn);
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 5px 8px;
  border-bottom: 1px solid #5a4a10;
}

/* ---- top bar ---- */
.topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: rgba(10,11,13,.92);
  backdrop-filter: blur(12px); z-index: 40;
}
.wordmark { display: flex; align-items: center; gap: 9px; font-size: 15px; letter-spacing: -.01em; }
.wordmark .mk {
  width: 26px; height: 26px; border-radius: 7px; background: var(--text); color: var(--bg);
  display: grid; place-items: center; font-weight: 800; font-size: 12px; letter-spacing: 0;
}
.wordmark b { font-weight: 700; }
.wordmark span { color: var(--muted); font-weight: 400; }
.topbar .grow { flex: 1; }
.showchip {
  font-size: 13px; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40vw;
}
.showchip b { color: var(--text); font-weight: 600; }
.tabs { display: flex; gap: 4px; }
.tab {
  padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--muted);
}
.tab.active { background: var(--surface-2); color: var(--text); }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: var(--r-md); font-weight: 700; font-size: 16px;
  padding: 14px 20px; min-height: 52px;
  border: 1px solid var(--line-2); color: var(--text); background: var(--surface-2);
  transition: transform .06s ease, opacity .15s;
  user-select: none;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn-paid { background: var(--paid); color: #06220f; border-color: var(--paid); }
.btn-danger { background: transparent; color: var(--danger); border-color: #4a2626; }
.btn-ghost { background: transparent; }
.btn-block { width: 100%; }
.btn-xl { min-height: 62px; font-size: 18px; border-radius: 16px; }
.btn[disabled] { opacity: .4; pointer-events: none; }

/* ---- sell console ---- */
.console { display: flex; height: calc(100dvh - 51px); }
body.has-testbanner .console { height: calc(100dvh - 78px); }
.gridwrap { flex: 1; overflow-y: auto; padding: 16px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; }
.tile {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 13px 13px 11px; display: flex; flex-direction: column; gap: 8px;
}
.tile .cat { width: 8px; height: 8px; border-radius: 3px; }
.cat-soft { background: #7aa7ff; } .cat-music { background: #ff9d66; } .cat-other { background: #b48bff; }
.tile .thumb {
  width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-sm);
  background: #101215; display: block;
}
.thumb-fallback { display: grid; place-items: center; }
.thumb-fallback span { font-size: 34px; font-weight: 800; letter-spacing: .06em; color: rgba(244,246,248,.85); }
.cat-soft-bg { background: linear-gradient(135deg, #1c2740, #131a2b); }
.cat-music-bg { background: linear-gradient(135deg, #402a1c, #2b1d13); }
.cat-other-bg { background: linear-gradient(135deg, #2f2040, #1f152b); }
.tile h3 { font-size: 14.5px; font-weight: 650; line-height: 1.25; min-height: 2.4em; }
.tile .price { font-size: 15px; font-weight: 700; color: var(--muted); }
.sizes { display: flex; flex-wrap: wrap; gap: 6px; }
.sizechip {
  min-width: 42px; height: 42px; padding: 0 8px; border-radius: var(--r-sm);
  background: var(--surface-2); border: 1px solid var(--line-2);
  font-size: 14px; font-weight: 700; display: grid; place-items: center;
}
.sizechip:active { background: var(--text); color: var(--bg); }
.sizechip.oos { opacity: .28; text-decoration: line-through; pointer-events: none; }
.sizechip.low { border-color: var(--warn); }

/* cart rail */
.cartrail {
  width: 330px; border-left: 1px solid var(--line); display: flex; flex-direction: column;
  background: var(--surface);
}
.cartrail header { padding: 14px 16px 8px; font-size: 13px; font-weight: 700; letter-spacing: .1em; color: var(--faint); text-transform: uppercase; }
.cartlines { flex: 1; overflow-y: auto; padding: 0 10px; }
.cartline {
  display: flex; align-items: center; gap: 10px; padding: 10px 6px;
  border-bottom: 1px solid var(--line);
}
.cartline .nm { flex: 1; font-size: 14.5px; font-weight: 600; }
.cartline .nm small { display: block; color: var(--muted); font-weight: 500; }
.qtybtn {
  width: 34px; height: 34px; border-radius: 8px; background: var(--surface-2);
  border: 1px solid var(--line-2); font-size: 17px; font-weight: 700; display: grid; place-items: center;
}
.cartline .amt { font-weight: 700; font-size: 14.5px; min-width: 52px; text-align: right; }
.carttotal {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 14px 16px 6px; font-size: 15px; color: var(--muted);
}
.carttotal b { font-size: 30px; font-weight: 800; color: var(--text); letter-spacing: -.02em; }
.cartactions { padding: 10px 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.cart-empty { color: var(--faint); text-align: center; padding: 40px 20px; font-size: 14px; }

/* phone: cart becomes bottom sheet */
@media (max-width: 760px) {
  .console { flex-direction: column; }
  .cartrail { width: 100%; border-left: 0; border-top: 1px solid var(--line); max-height: 46dvh; }
}

/* ---- handoff screen ---- */
.handoff {
  min-height: calc(100dvh - 51px); display: flex; align-items: center; justify-content: center;
  gap: 48px; padding: 24px; flex-wrap: wrap;
}
.qrcard {
  background: #fff; border-radius: 24px; padding: 26px;
  width: min(78vw, 400px); aspect-ratio: 1; display: grid; place-items: center;
}
.qrcard img { width: 100%; height: 100%; }
.handoff .side { max-width: 360px; display: flex; flex-direction: column; gap: 18px; }
.bigcode {
  font-family: var(--mono); font-size: 44px; font-weight: 700; letter-spacing: .28em;
  padding: 10px 0 6px;
}
.waiting { display: flex; align-items: center; gap: 10px; color: var(--muted); font-weight: 600; }
.dot { width: 10px; height: 10px; border-radius: 999px; background: var(--warn); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; transform: scale(.8);} }
.handoff-total { font-size: 40px; font-weight: 800; letter-spacing: -.02em; }
.handoff-items { color: var(--muted); font-size: 15px; line-height: 1.7; }

/* full-screen paid flash */
.paidflash {
  position: fixed; inset: 0; background: var(--paid); color: #06220f; z-index: 100;
  display: none; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  text-align: center; padding: 28px;
}
.paidflash.show { display: flex; animation: pop .25s ease; }
@keyframes pop { from { transform: scale(.96); opacity: .4; } }
.paidflash .check { font-size: 78px; line-height: 1; }
.paidflash h1 { font-size: 54px; font-weight: 900; letter-spacing: -.02em; }
.paidflash .ordcode { font-family: var(--mono); font-size: 26px; letter-spacing: .3em; font-weight: 700; }
.paidflash .items { font-size: 17px; font-weight: 600; opacity: .85; }
.paidflash .btn { background: #06220f; color: var(--paid); border-color: #06220f; min-width: 260px; }

/* ---- customer sheet (cart / checkout / order) ---- */
.sheet {
  max-width: 440px; margin: 0 auto; padding: 26px 20px 40px;
  display: flex; flex-direction: column; gap: 18px; min-height: 100dvh;
}
.sheet .brand { text-align: center; color: var(--muted); font-size: 14px; }
.sheet .brand b { display: block; color: var(--text); font-size: 17px; font-weight: 700; }
.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 18px;
}
.lines .line { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.lines .line:last-child { border-bottom: 0; }
.lines .line .q { color: var(--muted); }
.totalrow { display: flex; justify-content: space-between; align-items: baseline; padding-top: 12px; }
.totalrow span { color: var(--muted); font-size: 14px; }
.totalrow b { font-size: 34px; font-weight: 800; letter-spacing: -.02em; }
.trust { text-align: center; color: var(--faint); font-size: 12.5px; line-height: 1.6; }
.paybadges { display: flex; justify-content: center; gap: 8px; margin-top: 6px; }
.paybadge { border: 1px solid var(--line); border-radius: 6px; padding: 3px 9px; font-size: 11.5px; font-weight: 700; color: var(--muted); }

/* order / PAID page */
.paidhero { text-align: center; padding: 22px 0 4px; }
.paidhero .check {
  width: 84px; height: 84px; margin: 0 auto 14px; border-radius: 999px;
  background: var(--paid-dim); color: var(--paid); display: grid; place-items: center;
  font-size: 44px; border: 2px solid var(--paid);
}
.paidhero h1 { font-size: 34px; font-weight: 850; letter-spacing: -.02em; }
.paidhero .ordcode { font-family: var(--mono); font-size: 22px; letter-spacing: .3em; color: var(--muted); margin-top: 6px; }
.pickupqr { background: #fff; border-radius: 20px; padding: 18px; width: 240px; margin: 0 auto; }
.pickupqr img { width: 100%; display: block; }
.hint { text-align: center; color: var(--muted); font-size: 15px; line-height: 1.6; }

/* ---- board ---- */
.boardwrap { padding: 16px; }
.lanes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; align-items: start; }
@media (max-width: 900px) { .lanes { grid-template-columns: 1fr; } }
.lane h2 {
  font-size: 12.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: var(--faint); padding: 4px 2px 10px; display: flex; gap: 8px; align-items: center;
}
.lane h2 .n { background: var(--surface-2); border-radius: 999px; padding: 1px 9px; font-size: 12px; color: var(--muted); }
.ordercard {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 13px 14px; margin-bottom: 10px; display: flex; flex-direction: column; gap: 8px;
}
.ordercard.attention { border-color: var(--danger); }
.ordercard .row1 { display: flex; align-items: center; gap: 9px; }
.ordercard .code { font-family: var(--mono); font-weight: 700; font-size: 17px; letter-spacing: .18em; }
.chip {
  font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  border-radius: 5px; padding: 2px 7px; background: var(--surface-2); color: var(--muted);
}
.chip-presale { color: #c9b0ff; background: rgba(180,139,255,.12); }
.chip-self { color: #8fc1ff; background: rgba(122,167,255,.12); }
.chip-cash { color: var(--warn); background: rgba(255,176,32,.1); }
.chip-alert { color: var(--danger); background: rgba(255,93,93,.12); }
.ordercard .agegap { margin-left: auto; color: var(--faint); font-size: 12.5px; }
.ordercard .its { color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.ordercard .amt { font-weight: 800; }
.ordercard .act { margin-top: 2px; }
.ordercard .who { color: var(--text); font-weight: 600; font-size: 14px; }
.lane .empty { color: var(--faint); font-size: 13.5px; padding: 14px 4px; }

/* ---- scan ---- */
.scanwrap { max-width: 520px; margin: 0 auto; padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.viewfinder {
  position: relative; border-radius: var(--r-lg); overflow: hidden; background: var(--surface);
  aspect-ratio: 1; border: 1px solid var(--line);
}
.viewfinder video { width: 100%; height: 100%; object-fit: cover; }
.scanresult { border-radius: var(--r-lg); padding: 18px; display: none; }
.scanresult.ok { display: block; background: var(--paid-dim); border: 1px solid var(--paid); }
.scanresult.bad { display: block; background: rgba(255,93,93,.08); border: 1px solid var(--danger); }
.scanresult h3 { font-size: 22px; font-weight: 800; }
.scanresult.ok h3 { color: var(--paid); } .scanresult.bad h3 { color: var(--danger); }
.manual { display: flex; gap: 8px; }
.manual input {
  flex: 1; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-md);
  color: var(--text); padding: 13px 14px; font-family: var(--mono); letter-spacing: .2em;
  text-transform: uppercase; font-size: 17px; min-width: 0;
}

/* ---- shop ---- */
.shophead { max-width: 980px; margin: 0 auto; padding: 30px 20px 6px; }
.shophead .kicker { color: var(--muted); font-size: 14px; }
.shophead h1 { font-size: 30px; font-weight: 830; letter-spacing: -.02em; }
.notice {
  max-width: 980px; margin: 12px auto 0; border-radius: var(--r-md);
  border: 1px solid var(--line-2); background: var(--surface); color: var(--muted);
  padding: 12px 16px; font-size: 14px;
}
.notice b { color: var(--text); }
.shopgrid { max-width: 980px; margin: 0 auto; padding: 18px 20px 140px; }
.cartbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: rgba(10,11,13,.9); backdrop-filter: blur(14px); border-top: 1px solid var(--line);
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
}
.cartbar .inner { max-width: 980px; margin: 0 auto; display: flex; align-items: center; gap: 14px; }
.cartbar .sum { flex: 1; font-size: 14px; color: var(--muted); }
.cartbar .sum b { display: block; font-size: 22px; color: var(--text); font-weight: 800; }
.cartbar input {
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-md);
  color: var(--text); padding: 12px; font-size: 15px; width: 170px;
}

/* ---- misc pages ---- */
.center { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; padding: 24px; text-align: center; }
.pinbox {
  width: 240px; text-align: center; font-size: 28px; letter-spacing: .4em; font-family: var(--mono);
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-md);
  color: var(--text); padding: 14px;
}
.err { color: var(--danger); font-weight: 600; }
.steps { display: grid; gap: 14px; max-width: 560px; margin: 0 auto; }
.step { display: flex; gap: 14px; align-items: flex-start; text-align: left; }
.step .num {
  width: 34px; height: 34px; border-radius: 999px; background: var(--surface-2);
  border: 1px solid var(--line-2); display: grid; place-items: center; font-weight: 800; flex-shrink: 0;
}
.step p { color: var(--muted); font-size: 15px; }
.step b { color: var(--text); display: block; margin-bottom: 2px; font-size: 16px; }

/* ---- admin ---- */
.adminwrap { max-width: 1080px; margin: 0 auto; padding: 24px 20px 80px; display: flex; flex-direction: column; gap: 22px; }
.adminwrap h1 { font-size: 24px; font-weight: 800; }
.adminwrap h2 { font-size: 15px; font-weight: 750; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th { text-align: left; color: var(--faint); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; padding: 8px 10px; border-bottom: 1px solid var(--line-2); }
table.data td { padding: 9px 10px; border-bottom: 1px solid var(--line); }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data input { width: 64px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 7px; color: var(--text); padding: 6px 8px; text-align: right; }
.statrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; }
.stat .k { color: var(--faint); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.stat .v { font-size: 24px; font-weight: 800; margin-top: 2px; }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: 13px; border-radius: 9px; }
.pinput {
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-sm);
  color: var(--text); padding: 10px 12px; font-size: 14.5px; min-height: 40px;
}
select.pinput { appearance: auto; }
textarea.pinput { resize: vertical; }

/* admin subnav */
.subnav {
  display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 18px 0;
  max-width: 1080px; margin: 0 auto;
}
.subchip {
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px;
  font-size: 13px; font-weight: 650; color: var(--muted);
}
.subchip.on { background: var(--surface-2); color: var(--text); border-color: var(--line-2); }

/* discount chips in the seller cart */
.discchips { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 12px 4px; }
.discchip {
  border: 1px dashed var(--line-2); border-radius: 999px; padding: 5px 12px;
  font-size: 12.5px; font-weight: 700; color: var(--muted);
}
.discchip.on { border-style: solid; border-color: var(--warn); color: var(--warn); }
