/* =====================================================================
   Laiyan Coffee — "Beyond the line" DNA (from IG feed, Sep 2026)
   Red duotone, motion blur, heavy white caps, orange cup, near-black.
   Mobile-first: base styles = phone. min-width queries add desktop.
   Override anything live via Settings > Laiyan Pre-order > Custom CSS.
   ===================================================================== */
:root {
  --night: #0C1013;     /* IG feed black */
  --night-2: #151A1E;   /* surfaces */
  --night-3: #1F262B;   /* inputs, chips */
  --line: #2C353A;
  --flare: #E4553F;     /* coral-red of the duotones */
  --blood: #7A140C;     /* deep shadow red */
  --blush: #F2A193;     /* highlight pink */
  --cup: #D8612F;       /* Laiyan cup orange */
  --text: #F4EFEA;
  --muted: #A1AAAE;
  --ok: #7FD6A0;
  --bad: #FF6B5E;
  --font: 'Archivo', 'Helvetica Neue', Arial, system-ui, sans-serif;
  --tap: 48px;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: env(safe-area-inset-top, 0px); }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.5; color: var(--text); background: var(--night);
  padding-top: env(safe-area-inset-top, 0px); -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; color: inherit; font-size: 16px; } /* 16px = no iOS zoom */
button { cursor: pointer; touch-action: manipulation; }
button:disabled { cursor: not-allowed; }
:focus-visible { outline: 3px solid var(--blush); outline-offset: 2px; }
img { max-width: 100%; display: block; }
a { color: inherit; }
.muted { color: var(--muted); }
.caps { text-transform: uppercase; }

/* Stacked wordmark, as printed on the cup */
.brand { display: inline-block; font-weight: 800; font-size: .95rem; line-height: .95; letter-spacing: .02em; text-decoration: none; text-transform: uppercase; }
.boot { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; }
.boot .brand { font-size: 1.6rem; color: var(--cup); }

/* ---------------- Customer ---------------- */
body.shop { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
.wrap { width: 100%; max-width: 640px; margin: 0 auto; padding: 0 14px; }
.wrap.narrow { max-width: 480px; }

/* Hero: the BEYOND / THE / LINE triptych, exactly like the feed grid */
.hero { position: relative; }
.strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; background: var(--night); }
.strip img { width: 100%; height: auto; aspect-ratio: 526 / 630; object-fit: cover; animation: sweep .7s cubic-bezier(.2, .8, .2, 1) both; }
.strip.still img { animation: none; }
.strip img:nth-child(2) { animation-delay: .09s; }
.strip img:nth-child(3) { animation-delay: .18s; }
@keyframes sweep { from { opacity: 0; filter: blur(14px) saturate(1.6); transform: translateX(-18px) scale(1.04); } to { opacity: 1; filter: none; transform: none; } }
.hero-in { padding: 20px 16px 8px; }
.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hero-top .brand { color: var(--cup); font-size: 1.05rem; }
.dates { font-size: .8rem; font-weight: 700; color: var(--blush); text-align: right; line-height: 1.25; }
.hero h1 { margin: 18px 0 10px; font-weight: 900; font-size: clamp(2.6rem, 14vw, 5rem); line-height: .88; letter-spacing: -0.03em; text-transform: uppercase; color: #fff; }
.hero p { margin: 0; max-width: 34ch; color: var(--text); opacity: .85; }
.hero-links { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.top-link { color: var(--blush); font-weight: 800; font-size: .9rem; min-height: var(--tap); display: inline-flex; align-items: center; }
.hero-link { display: inline-flex; align-items: center; min-height: var(--tap); margin-top: 8px; color: var(--flare); font-weight: 800; }

.top { max-width: 640px; margin: 0 auto; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; min-height: 64px; }
.top .brand { color: var(--cup); }
.back { background: none; border: 0; min-height: var(--tap); padding: 0; font-weight: 700; color: var(--blush); text-decoration: underline; text-underline-offset: 4px; }

.block { background: var(--night-2); border-radius: 18px; padding: 18px 14px 20px; margin: 14px 0; }
.block h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-weight: 900; font-size: 1.35rem; line-height: 1; letter-spacing: -0.01em; text-transform: uppercase; }
.block h2 .n { flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--flare); color: #fff; font-size: .9rem; }
.sub { font-size: .95rem; font-weight: 700; margin: 18px 0 8px; }
.hint { color: var(--muted); font-size: .85rem; margin: 10px 0 0; }
.notice { background: var(--blood); color: #fff; padding: 14px 16px; border-radius: 14px; margin: 14px 0; font-weight: 700; }
.notice.ok { background: var(--ok); color: var(--night); }

.menu { list-style: none; margin: 0; padding: 0; }
.item { display: grid; grid-template-columns: 56px 1fr; grid-template-areas: "img txt" "img step"; gap: 4px 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.item:last-child { border-bottom: 0; }
.item img, .item .ph { grid-area: img; align-self: start; width: 56px; height: 56px; border-radius: 12px; object-fit: cover; }
.item .ph { background: var(--cup); color: #fff; display: grid; place-items: center; font-weight: 900; font-size: 1.4rem; }
.item .it-t { grid-area: txt; min-width: 0; }
.item h3 { margin: 0; font-size: 1.02rem; font-weight: 800; }
.item p { margin: 2px 0; color: var(--muted); font-size: .86rem; line-height: 1.35; }
.item b { font-size: .95rem; color: var(--blush); }
.item.on { box-shadow: inset 3px 0 0 var(--flare); padding-left: 8px; margin-left: -8px; }
.item.walkin img, .item.walkin .ph, .item.walkin .it-t { opacity: .55; }
.item.walkin .ph { background: var(--night-3); color: var(--muted); }
.walkin-tag { display: inline-block; border: 1.5px solid var(--blush); color: var(--blush); border-radius: 999px; padding: 6px 12px; font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .02em; line-height: 1.2; text-align: center; }
.step { grid-area: step; display: flex; align-items: center; gap: 8px; justify-self: end; }
.step button { min-width: var(--tap); height: var(--tap); border-radius: 24px; border: 2px solid var(--flare); background: transparent; color: #fff; font-weight: 900; font-size: 1.25rem; line-height: 1; }
.step button.add { padding: 0 20px; font-size: .95rem; background: var(--flare); text-transform: uppercase; letter-spacing: .02em; }
.step output { min-width: 24px; text-align: center; font-weight: 900; font-size: 1.1rem; font-variant-numeric: tabular-nums; }

.points { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.chip, .slot { border: 2px solid var(--line); background: var(--night-3); border-radius: 14px; padding: 10px 12px; text-align: left; min-height: 56px; }
.chip b { display: block; font-size: .92rem; line-height: 1.2; }
.chip span { font-size: .8rem; color: var(--muted); }
.chip.on, .slot.on { border-color: var(--flare); background: var(--flare); color: #fff; }
.chip.on span { color: #fff; }
.chip:disabled, .slot:disabled { opacity: .35; }
.booths { display: grid; grid-template-columns: 1fr; gap: 8px; }
.chip.booth { min-height: 64px; display: flex; flex-direction: column; justify-content: center; }
.chip.booth b { font-size: 1.05rem; font-weight: 900; text-transform: uppercase; letter-spacing: -0.01em; }
.notice.warn { background: #FBE9CC; color: #5a3a00; }
.st-card { background: var(--night-2); border-radius: 18px; padding: 16px 14px; margin: 12px 0; border-left: 6px solid var(--flare); }
.st-card.st-ready { border-left-color: var(--ok); }
.st-card.st-collected, .st-card.st-refunded, .st-card.st-refund_due { border-left-color: var(--muted); }
.st-card p { margin: 4px 0; }
.st-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.st-no { font-weight: 900; font-stretch: 62%; font-size: 2.6rem; line-height: 1; font-variant-numeric: tabular-nums; }
.st-badge { background: var(--flare); color: #fff; font-weight: 800; font-size: .8rem; padding: 6px 10px; border-radius: 999px; text-transform: uppercase; text-align: center; }
.st-ready .st-badge { background: var(--ok); color: var(--night); }
.st-collected .st-badge, .st-refunded .st-badge, .st-refund_due .st-badge, .st-cancelled .st-badge { background: var(--night-3); color: var(--muted); }
.st-where { font-weight: 800; text-transform: uppercase; }
#sq { text-transform: uppercase; font-weight: 800; }
.slots { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.slot { font-weight: 800; font-variant-numeric: tabular-nums; text-align: center; min-height: var(--tap); }
.slot small { display: block; font-weight: 500; font-size: .72rem; }

.cup-row { display: grid; grid-template-columns: 84px 1fr; gap: 12px; align-items: end; }
.cup-row img { width: 84px; height: 100px; max-width: none; object-fit: cover; object-position: 55% 38%; border-radius: 12px; }
.field { display: block; position: relative; margin: 0 0 12px; }
.cup-row .field { margin: 0; }
.field span { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 4px; color: var(--muted); }
.field input { width: 100%; height: 52px; border: 2px solid var(--line); border-radius: 12px; padding: 0 14px; background: var(--night-3); }
.field input:focus { border-color: var(--flare); outline: none; }
.field em { position: absolute; right: 12px; bottom: 16px; font-style: normal; font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
#cup { padding-right: 52px; text-transform: uppercase; font-weight: 800; letter-spacing: .02em; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.err { color: var(--bad); font-weight: 700; min-height: 1.2em; margin: 4px 0; }
.fine { font-size: .8rem; color: var(--muted); margin: 8px 0 0; }

.lines { list-style: none; margin: 0; padding: 0; }
.lines li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.facts { margin: 12px 0 0; }
.facts div { display: flex; justify-content: space-between; gap: 16px; padding: 4px 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; text-align: right; font-weight: 700; }
.facts .tot { font-size: 1.2rem; padding-top: 8px; }
.facts .tot dd, .facts .tot dt { font-weight: 900; color: #fff; }

.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: rgba(12, 16, 19, .96); border-top: 1px solid var(--line);
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px)); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.bar-in { max-width: 612px; margin: 0 auto; display: flex; align-items: center; gap: 12px; }
.bar-sum { flex: 1; display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.bar-sum b { color: #fff; font-size: 1.05rem; }
.bar-sum span { color: var(--muted); font-size: .9rem; }
.bar-hint { max-width: 612px; margin: 6px auto 0; font-size: .8rem; color: var(--blush); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 54px; padding: 0 24px; border-radius: 999px; border: 0; background: var(--flare); color: #fff;
  font-weight: 900; font-size: 1rem; text-transform: uppercase; letter-spacing: .02em; text-decoration: none; }
.btn:disabled { background: var(--night-3); color: #5f686d; }
.btn.wide { width: 100%; }
.btn.ghost { background: transparent; border: 2px solid var(--flare); color: #fff; width: 100%; margin: 8px 0 24px; }
.btns { display: grid; gap: 8px; margin-top: 16px; }

.state { text-align: center; padding: 48px 4px; }
.state h1 { font-weight: 900; font-size: 2rem; line-height: .95; text-transform: uppercase; letter-spacing: -0.02em; margin: 16px 0 10px; }
.spin { width: 44px; height: 44px; margin: 0 auto; border-radius: 50%; border: 4px solid var(--line); border-top-color: var(--flare); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* The race bib: the one loud object on the page */
.bib { position: relative; background: #fff; color: #0C1013; border-radius: 10px; margin: 16px 2px 10px; overflow: hidden; transform: rotate(-1.4deg);
  box-shadow: 0 24px 40px -20px rgba(228, 85, 63, .55); animation: pin-on .6s cubic-bezier(.2, .9, .3, 1.2) both; }
.bib-band { background: var(--blood); color: #fff; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 40px; font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; }
.bib-band .brand { color: #fff; font-size: .95rem; }
.bib-no { font-weight: 900; font-stretch: 62%; font-size: clamp(4.5rem, 26vw, 9rem); line-height: .86; white-space: nowrap; letter-spacing: -0.02em; text-align: center; padding: 22px 10px 6px; font-variant-numeric: tabular-nums; }
.bib-where { text-align: center; padding: 0 16px; }
.bib-where b { display: block; font-size: 1.2rem; text-transform: uppercase; font-weight: 900; }
.bib-cup { margin: 14px 18px 22px; text-align: center; border-top: 2px dashed #d9d3cc; padding-top: 12px; font-weight: 900; text-transform: uppercase; color: var(--cup); }
.bib:not(:has(.bib-cup)) .bib-where { padding-bottom: 26px; }
.pin { position: absolute; width: 14px; height: 14px; border-radius: 50%; background: var(--night); box-shadow: inset 0 0 0 3px #bdb7b0; z-index: 2; }
.pin.a { top: 14px; left: 14px; } .pin.b { top: 14px; right: 14px; } .pin.c { bottom: 14px; left: 14px; } .pin.d { bottom: 14px; right: 14px; }
.bib.collected, .bib.refunded, .bib.cancelled, .bib.refund_due { filter: grayscale(1); opacity: .6; }
.shot { text-align: center; font-weight: 900; font-size: 1.1rem; line-height: 1.15; text-transform: uppercase; margin: 18px 6px; }
@keyframes pin-on { from { transform: translateY(-28px) rotate(-6deg); opacity: 0; filter: blur(8px); } to { transform: rotate(-1.4deg); opacity: 1; filter: none; } }

@media (min-width: 560px) {
  .points { grid-template-columns: repeat(3, 1fr); }
  .slots { grid-template-columns: repeat(3, 1fr); }
  .item { grid-template-columns: 64px 1fr auto; grid-template-areas: "img txt step"; }
  .item img, .item .ph { width: 64px; height: 64px; align-self: center; }
}
@media (min-width: 900px) {
  .hero { display: grid; grid-template-columns: 1.3fr 1fr; align-items: end; max-width: 1200px; margin: 0 auto; gap: 24px; padding: 24px; }
  .hero-in { padding: 0 0 12px; }
}
@media (prefers-reduced-motion: reduce) { .strip img, .bib, .spin { animation: none; } }

/* ---------------- Staff (light UI: readable under booth sunlight) ---------------- */
body.staff { background: #F1EEEA; color: #0C1013; color-scheme: light; }
.s-top { position: sticky; top: 0; z-index: 20; background: var(--night); color: #fff; display: flex; align-items: center; gap: 10px;
  padding: calc(8px + env(safe-area-inset-top, 0px)) 14px 8px; }
.s-top .brand { color: var(--cup); font-size: .85rem; }
.s-top b { flex: 1; font-weight: 900; text-transform: uppercase; font-size: .95rem; }
.s-me { font-size: .8rem; display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.s-me a { color: var(--blush); min-height: 28px; display: inline-flex; align-items: center; }
.s-tabs { display: flex; gap: 4px; padding: 6px 10px 0; background: var(--night); position: sticky; top: calc(56px + env(safe-area-inset-top, 0px)); z-index: 19; }
.s-tabs button { flex: 1; border: 0; background: transparent; color: #fff; min-height: var(--tap); border-radius: 10px 10px 0 0; font-weight: 800; }
.s-tabs button.on { background: #F1EEEA; color: #0C1013; }
#main { max-width: 1100px; margin: 0 auto; padding: 12px 12px 80px; }
.s-points { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.s-pt { flex: 0 0 auto; scroll-snap-align: start; border: 2px solid #d8d2cb; background: #fff; border-radius: 12px; padding: 8px 12px; text-align: left; min-width: 148px; min-height: 56px; }
.s-pt b { display: block; font-size: .92rem; }
.s-pt span { font-size: .78rem; color: #5f676b; }
.s-pt.on { background: var(--flare); color: #fff; border-color: var(--flare); }
.s-pt.on span { color: #fff; }
.s-tools { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin: 10px 0; }
.s-tools input { grid-column: 1 / -1; height: 52px; border: 2px solid #d8d2cb; border-radius: 12px; padding: 0 14px; background: #fff; }
.s-tools select { height: var(--tap); border: 2px solid #d8d2cb; border-radius: 12px; padding: 0 10px; background: #fff; min-width: 0; }
.s-btn { display: inline-flex; align-items: center; justify-content: center; min-height: var(--tap); padding: 0 14px; border-radius: 10px; border: 2px solid var(--night);
  background: #fff; color: var(--night); font-weight: 800; text-decoration: none; white-space: nowrap; }
.s-btn.go { background: var(--flare); border-color: var(--flare); color: #fff; }
.s-btn.dark { background: var(--night); color: #fff; }
.s-btn.ghost { background: #fff; }
.s-btn.bad { color: #B3261E; border-color: #B3261E; }
.s-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; font-size: .78rem; margin-bottom: 8px; }
.s-sum span { background: #fff; border-radius: 10px; padding: 6px 8px; line-height: 1.2; }
.s-sum b { display: block; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.s-sum.q { display: block; }
.s-alert { grid-column: 1 / -1; background: #B3261E; color: #fff; border-radius: 10px; padding: 10px 12px; font-size: .88rem; line-height: 1.35; }
.s-slot-g { margin: 14px 0; }
.s-slot-h { position: sticky; top: calc(116px + env(safe-area-inset-top, 0px)); z-index: 5; background: #F1EEEA; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; padding: 8px 0; border-bottom: 3px solid var(--night); }
.s-slot-h h3 { margin: 0; font-size: 1.15rem; font-weight: 900; text-transform: uppercase; }
.s-slot-h .prep { flex-basis: 100%; font-size: .85rem; color: var(--blood); font-weight: 700; }
.s-ord { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "q acts" "who who"; gap: 6px 10px; align-items: center; background: #fff; border-radius: 12px; padding: 10px 12px; margin: 8px 0; border-left: 6px solid var(--flare); }
.s-q { grid-area: q; border: 0; background: none; text-align: left; font-weight: 900; font-stretch: 75%; font-size: 1.9rem; line-height: 1; font-variant-numeric: tabular-nums; padding: 0; min-height: var(--tap); color: inherit; }
.s-who { grid-area: who; cursor: pointer; display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.s-who .cup { font-weight: 900; color: var(--cup); text-transform: uppercase; }
.s-who .it { color: #4d5559; font-size: .9rem; }
.s-who .note { color: #B3261E; font-size: .85rem; font-weight: 700; }
.s-acts { grid-area: acts; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.s-ord.st-ready { border-left-color: #1E7A45; background: #F0FAF3; }
.s-ord.st-collected { opacity: .55; border-left-color: #999; }
.s-ord.st-pending, .s-ord.st-failed { border-left-color: #C98A00; }
.s-ord.st-cancelled, .s-ord.st-refunded { border-left-color: #B3261E; opacity: .6; }
.tag { font-size: .78rem; font-weight: 800; padding: 4px 8px; border-radius: 6px; background: #ece8e3; }
.tag.ready { background: #1E7A45; color: #fff; }
.tag.bad { background: #FCE4E1; color: #B3261E; }
.d-warn { background: #FCE4E1; color: #B3261E; border-radius: 8px; padding: 8px 10px; font-weight: 700; font-size: .9rem; }
.d-act { margin-top: 14px; border-top: 3px solid #B3261E; padding-top: 10px; }
.d-act h3 { margin: 0 0 6px; font-weight: 900; text-transform: uppercase; }
.s-radio { display: flex; gap: 10px; align-items: center; min-height: 48px; font-weight: 700; }
.s-radio input { width: 22px; height: 22px; accent-color: var(--flare); }
.s-ord.st-refund_due { border-left-color: #B3261E; }
.tag.warn { background: #FBE9CC; color: #8A5A00; }
.s-empty { padding: 40px 0; text-align: center; color: #5f676b; }
.s-card { background: #fff; border-radius: 14px; padding: 14px; margin: 0 0 12px; }
.s-card h2 { margin: 0 0 10px; font-size: 1.15rem; font-weight: 900; text-transform: uppercase; }
.s-card h3 { margin: 14px 0 6px; font-size: .95rem; }
.s-help { color: #5f676b; font-size: .85rem; margin: 8px 0 0; }
.s-mi { display: grid; grid-template-columns: 1fr 96px;  gap: 6px; padding: 10px 0; border-bottom: 1px solid #eee; }
.s-mi input:not([type=checkbox]) { height: var(--tap); border: 2px solid #d8d2cb; border-radius: 10px; padding: 0 10px; min-width: 0; background: #fff; }
.s-mi [data-k=desc], .s-mi [data-k=img] { grid-column: 1 / -1; }
.s-mi label { display: flex; align-items: center; gap: 8px; font-weight: 700; min-height: var(--tap); }
.s-mi input[type=checkbox], .s-slot input, .s-switch input { width: 22px; height: 22px; accent-color: var(--flare); }
.s-row { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.s-row .s-btn { flex: 1 1 auto; }
.s-slots { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.s-slot { border: 2px solid #d8d2cb; border-radius: 10px; padding: 0 10px; min-height: var(--tap); display: flex; gap: 8px; align-items: center; font-weight: 700; font-size: .9rem; }
.s-slot.past { opacity: .4; }
.s-switch { display: flex; align-items: center; gap: 10px; font-weight: 800; min-height: var(--tap); }
dialog#dlg { border: 0; padding: 0; margin: auto 0 0; width: 100%; max-width: 100%; max-height: 92dvh; border-radius: 18px 18px 0 0; color: #0C1013; }
dialog#dlg::backdrop { background: rgba(12, 16, 19, .6); }
.d-in { padding: 18px 16px calc(18px + env(safe-area-inset-bottom, 0px)); }
.d-in h2 { margin: 0; font-weight: 900; font-stretch: 75%; font-size: 2.8rem; line-height: 1; }
.d-in .field { margin-top: 10px; }
.d-in .field span { color: #5f676b; }
.d-in .field input, .d-in select { width: 100%; height: 52px; border: 2px solid #d8d2cb; border-radius: 10px; padding: 0 12px; background: #fff; color: #0C1013; }
.d-in pre { white-space: pre-wrap; font-size: .75rem; background: #f3f0ec; padding: 8px; border-radius: 8px; max-height: 140px; overflow: auto; }
.d-grid { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: .9rem; margin: 12px 0; }
.d-grid dt { color: #5f676b; }
.d-grid dd { margin: 0; overflow-wrap: anywhere; }
#toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--night); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 800; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 50; width: max-content; max-width: 90vw; }
#toast.on { opacity: 1; }
@media (min-width: 720px) {
  .s-tools { grid-template-columns: 1fr auto auto; }
  .s-tools input { grid-column: auto; }
  .s-sum { grid-template-columns: repeat(6, 1fr); }
  .s-ord { grid-template-columns: 120px 1fr auto; grid-template-areas: "q who acts"; }
  .s-mi { grid-template-columns: 1.2fr 2fr 96px 1.4fr auto auto auto; align-items: center; }
  .s-mi [data-k=desc], .s-mi [data-k=img] { grid-column: auto; }
  .s-slots { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  dialog#dlg { margin: auto; width: min(560px, 94vw); border-radius: 18px; }
}

/* ---------- Staff v2: booth lock ---------- */
.s-booth { --bc: var(--flare); background: var(--bc); color: #0C1013; display: flex; align-items: center; gap: 8px; padding: 8px 12px; }
.s-booth:empty { display: none; }
.s-booth div { flex: 1; min-width: 0; line-height: 1.1; }
.s-booth small { display: block; font-size: .72rem; font-weight: 700; opacity: .8; }
.s-booth b { display: block; font-size: 1.15rem; font-weight: 900; text-transform: uppercase; letter-spacing: -0.01em; }
.s-booth .s-btn { min-height: 40px; padding: 0 10px; font-size: .8rem; border-color: #0C1013; }
.s-pick { position: fixed; inset: 0; z-index: 60; background: var(--night); color: #fff; overflow: auto; padding: calc(24px + env(safe-area-inset-top, 0px)) 16px 24px; }
.s-pick-in { max-width: 520px; margin: 0 auto; }
.s-pick h1 { font-weight: 900; text-transform: uppercase; font-size: 2rem; line-height: .95; margin: 0 0 8px; }
.s-pick p { color: var(--muted); margin: 0 0 18px; }
.s-pick-b { --bc: var(--flare); display: block; width: 100%; text-align: left; border: 0; border-left: 10px solid var(--bc); background: #fff; color: #0C1013; border-radius: 14px; padding: 18px 16px; margin: 0 0 12px; min-height: 84px; }
.s-pick-b b { display: block; font-size: 1.3rem; font-weight: 900; text-transform: uppercase; }
.s-pick-b span { font-size: .85rem; color: #5f676b; }
.s-tabs { top: calc(56px + env(safe-area-inset-top, 0px)); }
.age { display: block; font-stretch: 100%; font-size: .78rem; font-weight: 800; margin-top: 4px; color: #1E7A45; }
.age.slow { color: #8A5A00; }
.age.late { color: #fff; background: #B3261E; border-radius: 6px; padding: 2px 6px; display: inline-block; }
.s-other { --bc: #888; display: inline-block; align-self: flex-start; background: var(--bc); color: #0C1013; font-weight: 900; font-size: .78rem; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; margin-bottom: 4px; }
.s-pre { display: inline-block; align-self: flex-start; background: #0C1013; color: #fff; font-weight: 800; font-size: .75rem; padding: 3px 8px; border-radius: 6px; margin-bottom: 4px; }
.s-later { margin: 18px 0; }
.s-later summary { font-weight: 900; text-transform: uppercase; min-height: 48px; display: flex; align-items: center; cursor: pointer; }

/* ---------- Variations ---------- */
.opts-hint { color: var(--blush) !important; font-weight: 700; font-size: .8rem !important; }
.vlines { grid-column: 1 / -1; list-style: none; margin: 8px 0 0; padding: 0 0 0 68px; }
.vlines li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px dashed var(--line); }
.vlines span { font-weight: 800; text-transform: uppercase; font-size: .9rem; }
.vlines small { display: block; color: var(--muted); font-weight: 500; text-transform: none; }
body.locked { overflow: hidden; }
.sheet { position: fixed; inset: 0; z-index: 40; }
.sheet[hidden] { display: none; }
.sheet-bg { position: absolute; inset: 0; background: rgba(0, 0, 0, .6); }
.sheet-in { position: absolute; left: 0; right: 0; bottom: 0; max-height: 88dvh; overflow: auto; background: var(--night-2); border-radius: 20px 20px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px)); max-width: 640px; margin: 0 auto; animation: up .22s ease-out both; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sheet-h h2 { margin: 0; font-weight: 900; font-size: 1.5rem; text-transform: uppercase; line-height: 1; }
.sheet-x { width: 48px; height: 48px; border-radius: 24px; border: 0; background: var(--night-3); color: #fff; font-size: 1.6rem; line-height: 1; }
.opt { border: 0; margin: 16px 0 0; padding: 0; }
.opt legend { font-weight: 800; margin-bottom: 8px; padding: 0; }
.opt legend small { color: var(--muted); font-weight: 500; margin-left: 6px; }
.opt-c { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.opt-c .chip { text-align: center; }
.opt-c .chip b { font-size: 1rem; text-transform: uppercase; font-weight: 900; }
.sheet-f { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.sheet-f .btn { flex: 1; }
@media (prefers-reduced-motion: reduce) { .sheet-in { animation: none; } }
.s-mi [data-k=opts] { grid-column: 1 / -1; border: 2px solid #d8d2cb; border-radius: 10px; padding: 8px 10px; font-size: 16px; min-height: 48px; background: #fff; resize: vertical; }
.s-help code { background: #f3f0ec; padding: 1px 4px; border-radius: 4px; }

/* ---------- Combos ---------- */
.opt-c.many { grid-template-columns: repeat(3, 1fr); }
.opt-c.many .chip { min-height: 56px; padding: 8px 6px; }
.opt-c.many .chip b { font-size: .8rem; line-height: 1.15; }
.opt-c .chip:disabled span { color: var(--bad); font-weight: 700; }
.opt legend em { font-style: normal; color: var(--ok); font-weight: 900; text-transform: uppercase; margin-left: 6px; }
.opt.done { opacity: .9; }
.same { display: block; width: 100%; min-height: 44px; margin: 0 0 8px; border: 1.5px dashed var(--blush); border-radius: 12px; background: transparent; color: var(--blush); font-weight: 800; font-size: .88rem; }
.sheet-prog { margin: 6px 0 0; color: var(--blush); font-weight: 800; font-size: .85rem; }
.sheet-f { position: sticky; bottom: calc(-16px - env(safe-area-inset-bottom, 0px)); background: var(--night-2); padding: 12px 0 calc(4px + env(safe-area-inset-bottom, 0px)); margin-bottom: calc(-16px - env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); }
.vlines span.is-combo { text-transform: none; font-size: .85rem; line-height: 1.35; }
.s-cups { display: flex; align-items: center; gap: 6px; font-size: .85rem !important; }
.s-cups input { width: 56px; }
.s-mi input[type=checkbox] { flex: none; }
