/* Thirsty Candies hotel program. River Walk mercantile: paper, kraft, terracotta, ink.
   Fixed frame (100svh, no page scroll). Only list regions scroll inside their pane. */
:root {
  --paper: #f4ecdd;
  --paper-2: #ebe0cb;
  --kraft: #cfb07e;
  --kraft-d: #b8955f;
  --terra: #a8472a;
  --terra-d: #8a3820;
  --ink: #231a14;
  --body: #3b2e24;
  --muted: #7a6a5c;
  --green: #2f5446;
  --gold: #b08a3a;
  --rule: #cdbd9f;
  --ok: #2e6b34;
  --err: #a3241a;
  --f-display: 'Zilla Slab', Georgia, serif;
  --f-body: 'Public Sans', system-ui, sans-serif;
  --f-mono: 'IBM Plex Mono', ui-monospace, monospace;
  --pad: clamp(12px, 2.2vw, 28px);
  --bar-h: 56px;
}
body.portal { --terra: #a8472a; --green: #2f5446; --gold: #b08a3a; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100svh; overflow: hidden; }
body {
  background: var(--paper); color: var(--body);
  font: 400 clamp(14px, 1.05vw, 16px)/1.45 var(--f-body);
  -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%;
}
button, input, select, textarea { font: inherit; color: inherit; -webkit-appearance: none; appearance: none; }
a { color: var(--terra); }
:focus-visible { outline: 2px solid var(--terra); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- frame ---------- */
.app {
  height: 100svh; display: grid;
  grid-template-rows: var(--bar-h) minmax(0, 1fr) auto;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left);
}
.bar {
  display: flex; align-items: center; gap: clamp(10px, 2vw, 28px);
  padding: 0 var(--pad); border-bottom: 1.5px solid var(--ink); background: var(--paper);
}
.mark { display: flex; align-items: baseline; gap: 10px; text-decoration: none; color: var(--ink); white-space: nowrap; }
.mark b { font: 700 clamp(17px, 1.6vw, 21px)/1 var(--f-display); letter-spacing: .06em; text-transform: uppercase; }
.mark span { font: 500 11px/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--terra); }
.nav { display: flex; gap: clamp(8px, 1.6vw, 22px); margin-left: auto; }
.nav a, .tabs a {
  color: var(--body); text-decoration: none; font-weight: 600; font-size: 14px;
  padding: 6px 0; border-bottom: 2px solid transparent;
}
.nav a[aria-current="page"], .tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--terra); }
.nav a:hover { color: var(--terra); }
.cartbtn {
  display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid var(--ink);
  background: var(--ink); color: var(--paper); padding: 7px 12px; font-weight: 700; font-size: 14px;
  text-decoration: none; white-space: nowrap; cursor: pointer;
}
.cartbtn .n { font-family: var(--f-mono); background: var(--terra); color: #fff; padding: 1px 6px; font-size: 12px; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--terra); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

.main { min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) clamp(280px, 26vw, 360px); }
.pane { min-height: 0; display: none; flex-direction: column; padding: var(--pad); gap: clamp(10px, 1.6vh, 18px); }
.pane.on { display: flex; }
.rail { min-height: 0; border-left: 1.5px solid var(--ink); background: var(--paper-2); display: flex; flex-direction: column; padding: var(--pad); gap: 10px; }
.tabbar { display: none; }
.main > div { min-height: 0; overflow: hidden; }
.pane[hidden], [hidden] { display: none !important; }

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--f-display); color: var(--ink); margin: 0; font-weight: 700; }
h1 { font-size: clamp(30px, min(4.4vw, 7vh), 62px); line-height: .98; letter-spacing: -.01em; }
h2 { font-size: clamp(20px, min(2.2vw, 3.6vh), 30px); line-height: 1.05; }
h3 { font-size: 18px; line-height: 1.15; }
.eyebrow { font: 500 11.5px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--terra); margin: 0; }
.lede { font-size: clamp(15px, min(1.3vw, 2.3vh), 19px); max-width: 38ch; margin: 0; color: var(--body); }
.muted { color: var(--muted); }
.mono { font-family: var(--f-mono); }
.rule { border: 0; border-top: 1px solid var(--rule); margin: 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1.5px solid var(--ink); background: var(--terra); color: #fff; border-color: var(--terra-d);
  padding: 11px 18px; font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none; min-height: 44px;
}
.btn:hover { background: var(--terra-d); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); }
.btn[aria-busy="true"] { opacity: .7; cursor: progress; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- program (home) ---------- */
.home { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(16px, 3vw, 48px); min-height: 0; flex: 1; }
.home-copy { display: flex; flex-direction: column; justify-content: center; gap: clamp(12px, 2.2vh, 22px); min-height: 0; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1.5px solid var(--ink); border-bottom: 1px solid var(--rule); }
.facts div { padding: clamp(8px, 1.4vh, 14px) 12px clamp(8px, 1.4vh, 14px) 0; }
.facts div + div { padding-left: 12px; border-left: 1px solid var(--rule); }
.facts b { display: block; font: 700 clamp(19px, min(2vw, 3.4vh), 28px)/1 var(--f-display); color: var(--terra); }
.facts span { font-size: 13px; color: var(--muted); }
.runs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.runs a { display: flex; justify-content: space-between; gap: 8px; padding: clamp(5px, 1vh, 9px) 0; border-bottom: 1px solid var(--rule); color: var(--ink); text-decoration: none; font-weight: 600; }
.runs a:hover { color: var(--terra); }
.runs a span { color: var(--muted); font-weight: 400; font-size: 13px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.home-art { position: relative; min-height: 0; display: flex; align-items: flex-end; justify-content: center;
  background: var(--kraft); border: 1.5px solid var(--ink); overflow: hidden; }
.home-art svg { height: 100%; width: auto; max-width: 92%; }
.home-art { align-items: center; }
.home-art figcaption { position: absolute; left: 12px; top: 10px; font: 500 11px/1.3 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink); }

/* ---------- shop ---------- */
.tabs { display: flex; gap: clamp(10px, 2vw, 24px); border-bottom: 1px solid var(--rule); overflow-x: auto; scrollbar-width: none; flex-shrink: 0; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { white-space: nowrap; }
.cat-blurb { margin: 0; color: var(--muted); font-size: 14px; }
.list { min-height: 0; flex: 1; overflow-y: auto; overscroll-behavior: contain; border-top: 1.5px solid var(--ink); }
.row {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 14px; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--rule);
}
.row .pic { width: 64px; height: 72px; }
.row h3 { font-size: 17px; }
.row p { margin: 2px 0 0; font-size: 13.5px; color: var(--muted); }
.row .meta { font: 500 12.5px/1.3 var(--f-mono); color: var(--body); margin-top: 3px; }
.buy { display: flex; align-items: center; gap: 10px; }
.price { font: 600 15px/1 var(--f-mono); color: var(--ink); white-space: nowrap; text-align: right; }
.price small { display: block; font-size: 11px; color: var(--muted); font-weight: 400; margin-top: 3px; }
.stepper { display: inline-flex; align-items: stretch; border: 1.5px solid var(--ink); height: 40px; }
.stepper button { width: 36px; background: var(--paper); border: 0; cursor: pointer; font-size: 18px; font-weight: 700; color: var(--ink); }
.stepper button:hover { background: var(--paper-2); }
.stepper input { width: 58px; border: 0; border-left: 1px solid var(--ink); border-right: 1px solid var(--ink); text-align: center; font-family: var(--f-mono); background: #fffaf0; }
.add { min-height: 40px; padding: 8px 12px; font-size: 14px; }
.row.in .add { background: var(--green); border-color: var(--green); }

/* skeletons */
.sk { background: linear-gradient(90deg, var(--paper-2) 0, #f6f0e4 50%, var(--paper-2) 100%); background-size: 200% 100%; animation: sk 1.2s linear infinite; }
@keyframes sk { to { background-position: -200% 0; } }
.row.skel .pic { background: var(--paper-2); }
.row.skel .l1 { height: 14px; width: 48%; } .row.skel .l2 { height: 11px; width: 70%; margin-top: 8px; }
.row.skel .l3 { height: 40px; width: 150px; }
@media (prefers-reduced-motion: reduce) { .sk { animation: none; } }

.state { padding: clamp(14px, 3vh, 32px) 0; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; max-width: 52ch; }
.state h3 { font-size: 20px; }
.state p { margin: 0; }

/* ---------- labels ---------- */
.labels { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(16px, 3vw, 40px); flex: 1; min-height: 0; }
.label-stage { background: var(--paper-2); border: 1.5px solid var(--ink); display: flex; min-height: 0; padding: 10px; }
.label-stage svg { height: 100%; max-height: 100%; width: auto; max-width: 100%; }
.label-form { display: flex; flex-direction: column; gap: clamp(10px, 1.8vh, 16px); min-height: 0; justify-content: center; }
.swatches { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.swatches button {
  border: 1.5px solid var(--rule); background: var(--paper); padding: 6px 4px; font-size: 12px; font-weight: 600;
  cursor: pointer; min-height: 44px; line-height: 1.15;
}
.swatches button[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.swatches svg { display: block; width: 100%; height: auto; aspect-ratio: 1; margin-bottom: 4px; border: 1px solid rgba(35,26,20,.35); }
.swatches span { display: block; font-size: 11.5px; line-height: 1.15; }

/* ---------- looks ---------- */
.looks { min-height: 0; flex: 1; overflow-y: auto; overscroll-behavior: contain; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 16px; align-content: start; border-top: 1.5px solid var(--ink); padding-top: 14px; }
.look { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.look img { width: 100%; aspect-ratio: 16 / 11; object-fit: cover; display: block; border: 1px solid var(--ink); background: var(--paper-2); }
.look figcaption { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.look b { font-family: var(--f-display); font-size: 17px; color: var(--ink); }
.look p { margin: 0; font-size: 13.5px; color: var(--muted); }

/* ---------- how ---------- */
.how { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(16px, 3vw, 44px); flex: 1; min-height: 0; }
.steps { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--ink); counter-reset: s; }
.steps li { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 8px; padding: clamp(7px, 1.3vh, 12px) 0; border-bottom: 1px solid var(--rule); counter-increment: s; }
.steps li::before { content: counter(s, decimal-leading-zero); font: 600 14px/1.4 var(--f-mono); color: var(--terra); }
.steps b { color: var(--ink); }
.ledger { width: 100%; border-collapse: collapse; font-size: 14px; }
.ledger th { text-align: left; font: 500 11px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 6px 0; border-bottom: 1.5px solid var(--ink); }
.ledger td { padding: clamp(5px, 1vh, 8px) 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.ledger td:last-child { text-align: right; font-family: var(--f-mono); color: var(--ink); white-space: nowrap; padding-left: 10px; }

/* ---------- rail (order summary) ---------- */
.rail h2 { font-size: 20px; }
.rail-lines { list-style: none; margin: 0; padding: 0; min-height: 0; flex: 1; overflow-y: auto; border-top: 1.5px solid var(--ink); }
.rail-lines li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; padding: 7px 0; border-bottom: 1px solid var(--rule); font-size: 14px; }
.rail-lines li span { color: var(--muted); font-family: var(--f-mono); font-size: 12.5px; }
.total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1.5px solid var(--ink); padding-top: 8px; }
.total b { font: 700 22px/1 var(--f-display); color: var(--ink); }
.rail .small { font-size: 12.5px; color: var(--muted); margin: 0; }

/* ---------- order flow ---------- */
.order { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(16px, 3vw, 40px); flex: 1; min-height: 0; }
.order-lines { min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.olist { min-height: 0; flex: 1; overflow-y: auto; border-top: 1.5px solid var(--ink); }
.oline { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.oline .nm { font-weight: 600; color: var(--ink); }
.oline .nm small { display: block; font-weight: 400; color: var(--muted); font-size: 12.5px; }
.oline .lt { font-family: var(--f-mono); min-width: 76px; text-align: right; }
.x { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 13px; text-decoration: underline; padding: 4px; }
.form { display: flex; flex-direction: column; gap: clamp(8px, 1.5vh, 14px); min-height: 0; }
.stepnav { display: flex; gap: 14px; font: 500 12px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.stepnav .on { color: var(--terra); }
.f { display: flex; flex-direction: column; align-items: stretch; gap: 4px; }
.f label { font-weight: 600; font-size: 13.5px; color: var(--ink); }
.f input, .f textarea {
  width: 100%; border: 1.5px solid var(--ink); background: #fffaf0; padding: 10px 11px; font-size: 16px; min-height: 44px;
}
.f textarea { resize: none; height: clamp(56px, 10vh, 96px); }
.f .err { color: var(--err); font-size: 13px; min-height: 0; }
.f.bad input, .f.bad textarea { border-color: var(--err); }
.f2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.check { display: flex; gap: 10px; align-items: center; font-weight: 600; color: var(--ink); cursor: pointer; }
.check input { width: 22px; height: 22px; border: 1.5px solid var(--ink); background: #fffaf0; flex-shrink: 0; margin: 0; }
.check input:checked { background: var(--terra); box-shadow: inset 0 0 0 4px #fffaf0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.formerr { color: var(--err); font-weight: 600; margin: 0; }
.done { display: flex; flex-direction: column; justify-content: center; gap: 14px; flex: 1; max-width: 60ch; }
.done .num { font: 600 clamp(28px, 5vh, 44px)/1 var(--f-mono); color: var(--terra); }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: calc(76px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 10px 16px; font-weight: 600; font-size: 14px; max-width: min(92vw, 520px); z-index: 20; display: none; }
.toast.on { display: block; }

/* ---------- portal ---------- */
.gate { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); height: 100svh; }
.gate-brand { background: var(--ink); color: var(--paper); display: flex; flex-direction: column; justify-content: space-between; padding: clamp(20px, 5vw, 64px); position: relative; }
.gate-brand::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 12px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='9'%3E%3Cpath d='M0 9V7h3V5h3V3h3V1h6v2h3v2h3v2h3v2z' fill='%23a8472a'/%3E%3C/svg%3E") repeat-x bottom; }
.gate-brand .wm { font: 700 clamp(34px, 5vw, 64px)/1 var(--f-display); letter-spacing: .16em; color: #e9c77e; }
.gate-brand p { margin: 0; color: #d8ccb8; max-width: 34ch; }
.gate-form { display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: clamp(20px, 5vw, 64px); max-width: 520px; }
.aztec-band { height: 8px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='9'%3E%3Cpath d='M0 9V7h3V5h3V3h3V1h6v2h3v2h3v2h3v2z' fill='%23a8472a'/%3E%3C/svg%3E") repeat-x; }
.portal .mark b { color: var(--terra); letter-spacing: .14em; }
.status { font: 600 11.5px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; padding: 4px 6px; border: 1px solid currentColor; white-space: nowrap; }
.status.requested { color: var(--gold); } .status.confirmed, .status.in_production { color: var(--green); }
.status.delivered, .status.invoiced { color: var(--ink); } .status.paid { color: var(--ok); } .status.cancelled { color: var(--muted); }
.hist { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.hist .when { font-size: 13px; color: var(--muted); }
.restock { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; background: var(--paper-2); border: 1px solid var(--rule); }
.restock input { width: 80px; border: 1.5px solid var(--ink); background: #fffaf0; padding: 8px; text-align: center; font-family: var(--f-mono); min-height: 40px; }

/* ---------- mobile ---------- */
@media (max-width: 860px) {
  :root { --bar-h: 52px; }
  .nav, .bar .cartbtn { display: none; }
  .mark span { display: none; }
  .bar .bar-right { margin-left: auto; }
  .main { grid-template-columns: minmax(0, 1fr); }
  .rail { display: none; }
  .tabbar {
    display: grid; grid-template-columns: repeat(var(--tabs, 4), minmax(0, 1fr)); border-top: 1.5px solid var(--ink);
    background: var(--paper); padding-bottom: env(safe-area-inset-bottom);
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 54px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 12.5px; }
  .tabbar a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 2px 0 var(--terra); }
  .tabbar .n { font-family: var(--f-mono); font-size: 11px; color: var(--terra); }
  .home { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
  .home-art { display: none; }
  .home-copy { justify-content: flex-start; gap: clamp(8px, 1.6vh, 14px); }
  .pane { gap: clamp(8px, 1.4vh, 14px); }
  .runs a { padding: clamp(4px, .8vh, 8px) 0; }
  .lede { font-size: clamp(14px, 2vh, 16px); }
  .ledger td { padding: 5px 0; font-size: 13.5px; }
  h1 { font-size: clamp(26px, min(7.6vw, 5.2vh), 36px); }
  .label-form > p.muted { display: none; }
  .runs { grid-template-columns: minmax(0, 1fr); }
  .facts span { font-size: 12px; }
  .row { grid-template-columns: 48px minmax(0, 1fr); gap: 10px; }
  .row .pic { width: 48px; height: 56px; }
  .row .buy { grid-column: 1 / -1; justify-content: space-between; }
  .labels { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto; overflow-y: auto; }
  .swatches { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .swatches button { font-size: 11px; padding: 4px 2px; }
  .how { grid-template-columns: minmax(0, 1fr); overflow-y: auto; }
  .order { grid-template-columns: minmax(0, 1fr); }
  .order[data-step="review"] .form, .order[data-step="contact"] .order-lines, .order[data-step="delivery"] .order-lines { display: none; }
  .gate { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .gate-brand { padding-top: 28px; gap: 10px; }
  .hist { grid-template-columns: minmax(0, 1fr) auto; }
  .hist .amt { display: none; }
}
@media (min-width: 861px) {
  .only-mobile { display: none !important; }
}
@media (max-height: 700px) and (max-width: 860px) {
  .facts { display: none; }
  #p-account > p.muted { display: none; }
  #p-account h2 { font-size: 20px; }
}

/* ---------- market report ---------- */
.mkt { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(14px, 2.4vw, 32px); flex: 1; min-height: 0; }
.mkt-left { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.mkt-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1.5px solid var(--ink); border-bottom: 1px solid var(--rule); flex-shrink: 0; }
.mkt-stats div { padding: 7px 10px 7px 0; } .mkt-stats div + div { padding-left: 10px; border-left: 1px solid var(--rule); }
.mkt-stats b { display: block; font: 700 clamp(18px, min(1.8vw, 3vh), 26px)/1 var(--f-display); color: var(--terra); }
.mkt-stats span { font-size: 12px; color: var(--muted); line-height: 1.2; display: block; margin-top: 3px; }
.mkt-search { width: 100%; border: 1.5px solid var(--ink); background: #fffaf0; padding: 8px 10px; min-height: 40px; font-size: 16px; }
.mkt-list { min-height: 0; flex: 1; overflow-y: auto; overscroll-behavior: contain; border-top: 1.5px solid var(--ink); }
.mkt-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--rule); padding: 8px 4px; cursor: pointer; }
.mkt-row:hover, .mkt-row[aria-current="true"] { background: var(--paper-2); }
.mkt-row b { color: var(--ink); font-weight: 700; display: block; }
.mkt-row small { color: var(--muted); font-size: 12.5px; }
.mkt-flags { display: flex; gap: 4px; align-items: center; }
.flag { font: 600 10.5px/1 var(--f-mono); letter-spacing: .04em; padding: 3px 4px; border: 1px solid var(--rule); color: var(--muted); white-space: nowrap; }
.flag.y { border-color: var(--green); color: var(--green); }
.mkt-detail { min-height: 0; overflow-y: auto; overscroll-behavior: contain; border-left: 1.5px solid var(--ink); padding-left: clamp(12px, 2vw, 24px); display: flex; flex-direction: column; gap: 8px; }
.mkt-detail dl { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 0; margin: 0; border-top: 1.5px solid var(--ink); }
.mkt-detail dt, .mkt-detail dd { padding: 6px 0; border-bottom: 1px solid var(--rule); margin: 0; font-size: 14px; }
.mkt-detail dt { font: 500 11px/1.5 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-right: 10px; }
.mkt-detail dd.nf { color: var(--muted); font-style: italic; }
.mkt-src { margin: 0; padding-left: 18px; font-size: 12.5px; }
.mkt-src li { margin: 3px 0; overflow-wrap: anywhere; }
.mkt-back { display: none; }
@media (max-width: 860px) {
  .mkt { grid-template-columns: minmax(0, 1fr); }
  .mkt-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mkt-stats div:nth-child(3) { padding-left: 0; border-left: 0; }
  .mkt-stats div:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .mkt-detail { display: none; border-left: 0; padding-left: 0; }
  .mkt.show-detail .mkt-left { display: none; }
  .mkt.show-detail .mkt-detail { display: flex; }
  .mkt-back { display: inline; }
}
@media (max-height: 700px) and (max-width: 860px) { .mkt-stats { display: none; } }

/* ---------- photos + popups ---------- */
.row .ph { width: 64px; height: 64px; object-fit: cover; display: block; border: 1px solid var(--ink); background: var(--paper-2); cursor: zoom-in; padding: 0; }
.row .phbtn { padding: 0; border: 0; background: none; cursor: zoom-in; display: block; }
.namebtn { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px; }
.namebtn:hover { text-decoration-color: var(--terra); color: var(--terra); }
.peek { background: none; border: 0; padding: 0; font: inherit; color: var(--terra); cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
.peek:hover { text-decoration-style: solid; }
dialog.pop { border: 1.5px solid var(--ink); padding: 0; background: var(--paper); color: var(--body); width: min(94vw, 1120px); max-height: 94svh; overflow: hidden; }
dialog.pop::backdrop { background: rgba(35, 26, 20, .62); }
.pop-in { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, .8fr); }
.pop-in img { width: 100%; height: 100%; max-height: 82svh; aspect-ratio: 1; object-fit: cover; display: block; border-right: 1.5px solid var(--ink); background: var(--paper-2); }
.pop-body { padding: clamp(14px, 2.4vw, 24px); display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.pop-body h3 { font-size: clamp(20px, 2.4vw, 26px); }
.pop-body p { margin: 0; }
.pop-close { position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; border: 1.5px solid var(--ink); background: var(--paper); font-size: 22px; line-height: 1; cursor: pointer; z-index: 2; }
.pop-note { font-size: 12px; color: var(--muted); }
.home-art .photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; }
.home-art .overlay { position: absolute; right: 5%; bottom: 5%; height: 46%; filter: drop-shadow(0 2px 0 rgba(35,26,20,.35)); }
.home-art .overlay svg { height: 100%; width: auto; }
@media (max-width: 860px) {
  .row .ph { width: 48px; height: 48px; }
  .pop-in { grid-template-columns: minmax(0, 1fr); }
  .pop-in img { max-height: 44svh; aspect-ratio: 4 / 3; border-right: 0; border-bottom: 1.5px solid var(--ink); }
}

.info { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; margin-left: 8px; vertical-align: middle;
  border: 1.5px solid var(--terra); color: var(--terra); background: transparent; border-radius: 50%; font: 700 14px/1 var(--f-display); cursor: pointer; padding: 0; }
.info:hover, .info[aria-expanded="true"] { background: var(--terra); color: #fff; }
.infotip { position: fixed; z-index: 30; max-width: min(92vw, 420px); background: var(--ink); color: var(--paper); padding: 12px 14px; font-size: 14px; line-height: 1.45; box-shadow: none; }

.mhero { display: none; }
@media (max-width: 860px) {
  .mhero { display: block; width: 100%; height: clamp(90px, 18svh, 170px); object-fit: cover; object-position: 70% 55%; border: 1.5px solid var(--ink); }
  .runs a { font-size: 14px; }
}
@media (max-width: 860px) { .runs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; } .runs a { flex-direction: column; gap: 0; font-size: 13.5px; } .runs a span { font-size: 12px; } }
@media (max-height: 620px) and (max-width: 860px) { .mhero { display: none; } #p-program h1 { font-size: 23px; } #p-program .lede { font-size: 13.5px; line-height: 1.35; } #p-program .eyebrow { display: none; } #p-program .cta-row { gap: 6px 12px; } #p-program .cta-row .btn { min-height: 40px; padding: 8px 14px; } }
@media (min-height: 621px) and (max-height: 700px) and (max-width: 860px) { .mhero { height: 60px; } }
@media (max-height: 700px) { #p-order .st-desc { display: none; } }
.restock .check input { width: 22px; min-height: 0; height: 22px; padding: 0; }

/* ---------- shop cards ---------- */
.list.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 14px; align-content: start; padding: 14px 2px 4px; }
.cards > .state { grid-column: 1 / -1; }
.card { border: 1.5px solid var(--ink); background: #fffaf0; display: flex; flex-direction: column; min-width: 0; }
.card.in { border-color: var(--green); box-shadow: inset 0 0 0 1.5px var(--green); }
.cimg { position: relative; display: block; padding: 0; border: 0; border-bottom: 1.5px solid var(--ink); background: var(--paper-2); cursor: zoom-in; }
.cimg img, .cimg svg { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; display: block; }
.cimg span { position: absolute; left: 0; bottom: 0; background: var(--ink); color: var(--paper); font: 500 11px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; padding: 6px 8px; }
.cimg:hover span, .cimg:focus-visible span { background: var(--terra); }
.cbody { padding: 10px 10px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.cbody h3 { font-size: 16px; line-height: 1.2; }
.cbody .meta { font: 500 12px/1.3 var(--f-mono); color: var(--body); }
.cbuy { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cbuy .price { text-align: left; margin-right: auto; }
.cbuy .stepper { height: 38px; }
.cbuy .stepper button { width: 32px; }
.cbuy .stepper input { width: 46px; }
.cbuy .add { min-height: 38px; }
.card.in .add { background: var(--green); border-color: var(--green); }
.card.skel .cimg { aspect-ratio: 1; border-bottom: 1.5px solid var(--paper-2); cursor: default; }
.card.skel .l1 { height: 14px; width: 70%; } .card.skel .l2 { height: 11px; width: 45%; margin-top: 6px; }
ul.inside { margin: 0; padding-left: 18px; font-size: 14px; } ul.inside li { margin: 2px 0; }

/* ---------- label studio ---------- */
.labels .label-stage { flex-direction: column; gap: 10px; align-self: stretch; padding: 12px; overflow: hidden; }
.mock-wrap { flex: 1; min-height: 0; display: grid; place-items: center; container-type: size; }
.mock { position: relative; width: min(100cqw, 100cqh); aspect-ratio: 1; border: 1.5px solid var(--ink); overflow: hidden; background: #2a2018; }
.mock img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mock svg { display: block; width: 100%; height: 100%; }
.on-pouch { position: absolute; left: 34.3%; top: 24.3%; width: 34%; height: 33.6%; border-radius: 1.2%; overflow: hidden; box-shadow: 0 0 0 .5px rgba(0,0,0,.25); transition: opacity .15s; }
.on-seal { position: absolute; left: 75.4%; top: 42.8%; width: 27.4%; aspect-ratio: 1; transform: translate(-50%, -50%) rotate(-16deg) scaleX(.76); border-radius: 50%; overflow: hidden; }
.mock .shade { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(120% 90% at 35% 20%, rgba(255,236,200,.18), rgba(0,0,0,0) 45%, rgba(40,20,5,.22) 100%); mix-blend-mode: multiply; }
.mock.proof { background: repeating-linear-gradient(45deg, #c9a46c 0 2px, #c29d64 2px 5px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
.mock.proof .sheet { position: relative; width: 66%; aspect-ratio: 1; background: #fff; padding: 4%; box-shadow: 0 1px 0 rgba(0,0,0,.25); }
.mock.proof .crop { position: absolute; width: 14px; height: 14px; border-color: var(--ink); border-style: solid; }
.crop.tl { top: 6px; left: 6px; border-width: 1px 0 0 1px; } .crop.tr { top: 6px; right: 6px; border-width: 1px 1px 0 0; }
.crop.bl { bottom: 6px; left: 6px; border-width: 0 0 1px 1px; } .crop.br { bottom: 6px; right: 6px; border-width: 0 1px 1px 0; }
.mock.proof p { margin: 0; font: 500 11px/1.2 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink); background: var(--paper); padding: 4px 8px; border: 1px solid var(--ink); }
.views { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1.5px solid var(--ink); }
.views button { border: 0; border-right: 1.5px solid var(--ink); background: var(--paper); padding: 8px 6px; font: 600 13px/1 var(--f-body, inherit); color: var(--ink); cursor: pointer; }
.views button:last-child { border-right: 0; }
.views button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.stage-cap { margin: 0; font-size: 13px; color: var(--ink); }
@media (max-width: 860px) {
  .list.cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .cbody { padding: 8px; }
  .cbody h3 { font-size: 14.5px; }
  .cbuy .price { width: 100%; }
  .cbuy .stepper { flex: 1; } .cbuy .stepper input { flex: 1; width: 0; min-width: 30px; }
  .cbuy .add { width: 100%; }
  .everything { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .labels .mock-wrap { container-type: normal; flex: none; display: block; }
  .labels .mock { width: 100%; }
  .labels .label-stage { padding: 8px; max-height: none; overflow: visible; height: auto; min-height: max-content; }
  .labels { grid-template-rows: max-content max-content; }
}
