@font-face { font-family: Pixel; src: url(silkscreen-400.woff2?v=24a3b16fcfe5) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: Pixel; src: url(silkscreen-700.woff2?v=1350cc64783a) format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --bg: #0b0d12;
  --panel: #141821;
  --line: #252c3a;
  --slot: #191e28;
  --slot-hi: #222937;
  --text: #e8ecf3;
  --muted: #8b94a7;
  --dim: #586076;
  --gold: #ffc53d;
  --veg: #34c463;
  --nonveg: #e2553f;
  --egg: #f2b51b;
  --accent: #e8ecf3;
  --s: 72px;
  --gap: 6px;
  --cols: 9;
  --rows: 5;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  color: var(--text);
  font: 14px/1.45 var(--sans);
  background:
    radial-gradient(1100px 520px at 50% -12%, #1b2131 0%, transparent 62%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 18px 18px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
}
button { font: inherit; color: inherit; }
kbd {
  font: 700 10px Pixel, monospace;
  padding: 1px 5px 2px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--panel);
  color: var(--muted);
}
svg { display: block; }

/* A set width, not fit-content: the board fills it and app.js picks the
   column count to match, so the header can't leave the grid short. */
.app {
  width: min(100%, 1640px);
  margin: 0 auto;
  padding: 28px 20px 36px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ---------- header ---------- */

.top {
  display: grid;
  grid-template-columns: auto minmax(200px, 1fr) auto;
  gap: 28px;
  align-items: center;
}
.brand { display: flex; gap: 12px; align-items: center; }
/* On wide screens the links sit in the brand row; phones get their own strip. */
.navs { display: contents; }
.logo { width: 38px; height: 38px; filter: drop-shadow(0 4px 10px rgba(255, 197, 61, .3)); }
.brand h1 { margin: 0; font: 700 17px Pixel, var(--sans); letter-spacing: .4px; }
.brand .sub { margin: 1px 0 0; color: var(--muted); font-size: 12px; }
.nav-link {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 9px 1px; margin-left: 6px;
  border-radius: 8px; background: var(--slot); border: 1px solid var(--line);
  font: 700 9px Pixel; letter-spacing: .4px; color: var(--muted); text-decoration: none; white-space: nowrap;
  transition: background .12s, border-color .12s, color .12s;
}
.nav-link:hover { background: var(--slot-hi); color: var(--gold); border-color: color-mix(in srgb, var(--gold) 55%, transparent); }
.nav-link span { width: 14px; height: 14px; }
button.nav-link { cursor: pointer; }
.nav-link b { font-weight: inherit; }
.nav-link span svg { width: 14px; height: 14px; display: block; }

.day { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.day-label { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.day-label b { color: var(--text); font-weight: 600; }
.day-label .gold { color: var(--gold); }
.track {
  position: relative;
  height: 8px;
  border-radius: 99px;
  background: #121620;
  border: 1px solid var(--line);
}
.seg { position: absolute; top: 1px; bottom: 1px; border-radius: 99px; background: #2b3346; }
.seg.past { background: #1d2230; }
.seg.now { background: linear-gradient(90deg, #ffd25e, #ff9f3d); box-shadow: 0 0 12px rgba(255, 180, 61, .55); }
.seg-glyph { position: absolute; top: 12px; width: 11px; height: 11px; transform: translateX(-50%); opacity: .45; }
.seg-glyph.now { opacity: 1; }
.seg-glyph.coin { width: auto; display: flex; align-items: center; gap: 3px; opacity: 1; font: 400 8px Pixel; color: var(--gold); white-space: nowrap; }
.seg-glyph.coin svg { width: 11px; height: 11px; flex: none; }
.seg-glyph.coin.armed b, .seg-glyph.coin.handoff b { color: var(--muted); }
.seg-glyph.coin.handoff svg { opacity: .5; }
.seg-glyph.coin.armed svg { border-radius: 50%; animation: ring 1.8s infinite; }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(255, 197, 61, .6); } 70% { box-shadow: 0 0 0 6px rgba(255, 197, 61, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 197, 61, 0); } }
.now-mark { position: absolute; top: -5px; bottom: -5px; width: 2px; margin-left: -1px; border-radius: 2px; background: #fff; box-shadow: 0 0 8px #fff8; }
.day { padding-bottom: 14px; }

.search {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 250px;
  height: 38px;
  padding: 0 12px;
  border-radius: 11px;
  background: var(--panel);
  border: 1px solid var(--line);
  transition: border-color .15s, box-shadow .15s;
}
.search:focus-within { border-color: #3d4860; box-shadow: 0 0 0 3px rgba(122, 162, 255, .14); }
.search-key { font: 700 11px Pixel; color: var(--dim); border: 1px solid var(--line); border-radius: 5px; padding: 0 5px 1px; }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); font: inherit; }
.search input::placeholder { color: var(--dim); }
.search input::-webkit-search-cancel-button { filter: invert(.6); }

/* ---------- chest ---------- */

.chest {
  padding: 14px 16px 16px;
  border-radius: 20px;
  background: linear-gradient(180deg, #171c27 0%, #121620 100%);
  border: 1px solid var(--line);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .045);
}
.chest-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 28px;
  margin: 0 2px 12px;
  font-size: 12.5px;
  color: var(--muted);
}
.head-icon { width: 20px; height: 20px; }
.head-name { font: 700 14px Pixel, var(--sans); color: var(--accent); letter-spacing: .3px; transition: color .2s; }
.head-meta { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pager { display: flex; align-items: center; gap: 6px; font: 700 11px Pixel; color: var(--muted); }
.pg {
  width: 24px; height: 24px; border-radius: 7px; cursor: pointer;
  background: var(--slot); border: 1px solid var(--line);
  font: 600 16px/1 var(--sans); padding-bottom: 2px;
}
.pg:disabled { opacity: .3; cursor: default; }
.live { display: flex; align-items: center; gap: 6px; font-size: 11.5px; padding-left: 10px; border-left: 1px solid var(--line); white-space: nowrap; }
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--veg); box-shadow: 0 0 0 0 rgba(52, 196, 99, .6); animation: pulse 2.4s infinite; }
.live.off i { background: var(--nonveg); animation: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(52, 196, 99, .55); } 70% { box-shadow: 0 0 0 7px rgba(52, 196, 99, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 196, 99, 0); } }

.body { display: flex; justify-content: center; gap: calc(var(--gap) * 2); }
.tabs { display: grid; grid-template-rows: repeat(var(--rows), var(--s)); gap: var(--gap); }
.grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--cols), var(--s));
  grid-auto-rows: var(--s);
  gap: var(--gap);
}

.controls {
  justify-content: center;
  display: flex;
  gap: calc(var(--gap) * 2);
  margin-top: calc(var(--gap) * 2);
  padding-top: calc(var(--gap) * 2);
  border-top: 1px dashed var(--line);
}
.ctl-row {
  width: calc(var(--cols) * var(--s) + (var(--cols) - 1) * var(--gap));
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap);
  justify-content: center;
}
.ctl-row .spacer { flex: 1; }

/* ---------- slots ---------- */

.slot {
  --c: clamp(4px, calc(var(--s) * .1), 7px);
  --ci: clamp(9px, calc(var(--s) * .17), 12px);
  position: relative;
  width: var(--s);
  height: var(--s);
  border-radius: 11px;
  background: var(--slot);
  border: 1px solid #1e2431;
  box-shadow: inset 0 2px 0 rgba(0, 0, 0, .32), inset 0 -1px 0 rgba(255, 255, 255, .035);
}
button.slot { padding: 0; margin: 0; cursor: pointer; outline: none; -webkit-tap-highlight-color: transparent; }
.item, .tab, .ctl { transition: transform .12s ease, background .12s, border-color .12s, box-shadow .15s; }
.item { --accent: var(--m, #e8ecf3); }
.item:hover, .item:focus-visible, .item.active {
  background: var(--slot-hi);
  border-color: color-mix(in srgb, var(--accent) 65%, transparent);
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, .4), 0 0 20px color-mix(in srgb, var(--accent) 22%, transparent);
  z-index: 2;
}
.item:active { transform: translateY(0) scale(.97); }

.price {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 2px;
  /* Regular weight: the bold 4 fills in. Sizes are whole multiples of the
     font's 8px grid so every pixel stays square. */
  font: 400 24px Pixel, var(--sans);
  color: var(--gold);
  text-shadow: 2px 2px 0 rgba(0, 0, 0, .5);
}
.price.wide { font-size: 16px; }
@media (max-width: 640px) { .price { font-size: 16px; } }
.price .r { font: 700 calc(var(--s) * .21) var(--sans); margin-right: 2px; opacity: .8; transform: translateY(-1px); }
.price.unknown { color: #5d6680; font: 600 calc(var(--s) * .3) var(--sans); text-shadow: none; }
.price.free { color: var(--veg); font-weight: 700; font-size: calc(var(--s) * .19); letter-spacing: 0; }
.price.swap { flex-direction: column; gap: 3px; font-weight: 700; font-size: calc(var(--s) * .13); color: var(--muted); letter-spacing: .3px; text-shadow: none; }
.price.swap svg { width: calc(var(--s) * .36); height: calc(var(--s) * .36); }
.price.swap.compact { flex-direction: row; gap: 4px; padding-bottom: 6px; }
.price.swap.compact .arrow { font: 700 calc(var(--s) * .2) var(--sans); color: var(--muted); }
.price.swap .more { position: absolute; right: 7px; top: calc(var(--s) * .3); font-size: 10px; color: var(--muted); }

.diet { position: absolute; top: var(--c); left: var(--c); width: var(--ci); height: var(--ci); }
.mealg { position: absolute; top: var(--c); right: var(--c); width: calc(var(--ci) + 1px); height: calc(var(--ci) + 1px); opacity: .9; }
.messg { position: absolute; left: calc(var(--c) - 1px); bottom: calc(var(--c) + 3px); width: calc(var(--ci) + 1px); height: calc(var(--ci) + 1px); }
.qty { position: absolute; right: var(--c); bottom: calc(var(--c) + 2px); font: 700 calc(var(--ci) + 1px) Pixel; color: #fff; text-shadow: 2px 2px 0 rgba(0, 0, 0, .7); }
.ticked { position: absolute; left: 50%; top: 6px; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: var(--egg); box-shadow: 0 0 6px var(--egg); }

.item.sold > :not(.stamp), .item.closed > :not(.stamp) { opacity: .28; filter: grayscale(1); }
.stamp {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(-14deg);
  padding: 2px 5px 3px;
  border: 1.5px solid currentColor;
  border-radius: 5px;
  font: 700 10px Pixel;
  letter-spacing: .5px;
  background: rgba(11, 13, 18, .75);
}
.stamp.long { font-size: clamp(6px, calc(var(--s) * .11), 8px); letter-spacing: 0; padding: 2px 3px 3px; }
.sold .stamp { color: var(--veg); }
.sold .stamp.bought { color: #ff6b5b; }
.closed .stamp { color: var(--muted); }

.glint {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
}
.glint::before {
  content: "";
  position: absolute;
  top: -20%;
  bottom: -20%;
  left: 0;
  width: 70%;
  background: linear-gradient(105deg,
    rgba(190, 150, 255, 0) 0%,
    rgba(190, 150, 255, .06) 25%,
    rgba(200, 170, 255, .22) 45%,
    rgba(160, 205, 255, .26) 55%,
    rgba(160, 205, 255, .06) 75%,
    rgba(160, 205, 255, 0) 100%);
  transform: translateX(-110%);
  will-change: transform;
  animation: glint 3s infinite;
}
/* Sweep in the first 2.2s of the cycle (keep in step with GLINT_* in app.js),
   then rest off to the right. */
@keyframes glint {
  0% { transform: translateX(-110%); animation-timing-function: cubic-bezier(.4, 0, .6, 1); }
  73.33%, 100% { transform: translateX(160%); }
}
.pop { animation: pop .45s cubic-bezier(.2, 1.5, .4, 1); }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }

.empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  text-align: center;
}
.empty div { padding: 10px 14px; border-radius: 10px; background: rgba(11, 13, 18, .7); color: var(--muted); font-size: 13px; }
.empty b { display: block; font: 700 11px Pixel; color: var(--dim); letter-spacing: .5px; margin-bottom: 2px; }

/* ---------- tabs ---------- */

.tab { display: grid; place-items: center; --accent: var(--m); }
.tab svg { width: 56%; height: 56%; transition: transform .15s; }
.tab:hover { background: var(--slot-hi); }
.tab:hover svg { transform: scale(1.08) rotate(-4deg); }
.tab.on {
  background: var(--slot-hi);
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 50%, transparent), 0 0 24px color-mix(in srgb, var(--accent) 28%, transparent);
}
.tab.on::after {
  content: "";
  position: absolute;
  right: calc(var(--gap) * -1 - 3px);
  top: 22%;
  bottom: 22%;
  width: 3px;
  border-radius: 3px;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}
.badge {
  position: absolute;
  right: 4px;
  bottom: 4px;
  min-width: 18px;
  padding: 1px 4px 2px;
  border-radius: 6px;
  text-align: center;
  font: 700 10px Pixel;
  color: var(--text);
  background: rgba(11, 13, 18, .85);
  border: 1px solid var(--line);
}
.tab.on .badge { border-color: color-mix(in srgb, var(--accent) 60%, transparent); color: var(--accent); }
.badge.zero { color: var(--dim); }

/* ---------- control buttons ---------- */

.ctl { display: grid; place-items: center; }
.ctl svg { width: 42%; height: 42%; margin-bottom: 12px; }
.ctl .lbl {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 7px;
  text-align: center;
  font: 700 8.5px Pixel;
  letter-spacing: .3px;
  color: var(--muted);
  white-space: nowrap;
}
.ctl:hover { background: var(--slot-hi); }
.ctl.on { border-color: color-mix(in srgb, var(--gold) 70%, transparent); background: var(--slot-hi); box-shadow: 0 0 18px rgba(255, 197, 61, .15); }
.ctl .lbl.tight { font-size: 7.5px; letter-spacing: 0; }
.ctl.on .lbl { color: var(--gold); }
.ctl.set .lbl { color: var(--text); }
.ctl:disabled { opacity: .3; cursor: not-allowed; }
.ctl.help .q { font: 700 24px/1 var(--sans); color: var(--muted); margin-bottom: 12px; }

/* ---------- tooltip ---------- */

.tip {
  position: fixed;
  z-index: 50;
  left: 0;
  top: 0;
  max-width: 330px;
  padding: 9px 12px 10px;
  pointer-events: none;
  border: 2px solid transparent;
  border-radius: 7px;
  background:
    linear-gradient(rgba(16, 0, 16, .95), rgba(16, 0, 16, .95)) padding-box,
    linear-gradient(180deg, #5a1cff, #2a0a80) border-box;
  box-shadow: 0 0 0 1px #0d000d, 0 18px 40px rgba(0, 0, 0, .55);
  font-size: 13px;
  line-height: 1.5;
}
.tip .ln { white-space: pre-wrap; overflow-wrap: anywhere; }
.tip .gap { height: 7px; }
.tip .nm { font-weight: 700; font-size: 14px; }
.tip .lore { color: #c08ad8; font-style: italic; }
.tip .rar { margin-top: 7px; font: 700 11.5px Pixel; letter-spacing: .6px; }
.c7 { color: #a9adb8; }
.c8 { color: #6c7080; }
.cf { color: #f4f5f8; }
.c6 { color: #ffaa1f; }
.ce { color: #ffe66b; }
.ca { color: #5be37a; }
.cc { color: #ff6b5b; }
.cb { color: #6fe3f0; }
.cd { color: #ff86e8; }

/* ---------- modal ---------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(5, 6, 10, .62);
  backdrop-filter: blur(6px);
  animation: fade .15s ease;
}
@keyframes fade { from { opacity: 0; } }
.sheet {
  width: min(560px, 100%);
  max-height: 88vh;
  overflow: auto;
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, #181d29, #121620);
  border: 1px solid var(--line);
  box-shadow: 0 40px 120px rgba(0, 0, 0, .6);
  animation: rise .2s cubic-bezier(.2, 1.2, .4, 1);
}
@keyframes rise { from { transform: translateY(14px) scale(.98); opacity: 0; } }
.sheet-head { display: flex; gap: 16px; align-items: center; }
.sheet-head .slot { --s: 92px; flex: none; cursor: default; transform: none; }
.sheet-head h2 { margin: 0; font: 700 16px Pixel, var(--sans); letter-spacing: .3px; }
.sheet-head .sub { margin-top: 3px; color: var(--muted); font-size: 13px; }
.pill { display: inline-block; margin-top: 8px; padding: 2px 8px 3px; border-radius: 99px; font: 700 10px Pixel; letter-spacing: .5px; border: 1px solid currentColor; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 18px 0 4px; font-size: 13.5px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.copies { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.copies h3 { margin: 0 0 2px; font: 700 11px Pixel; color: var(--muted); letter-spacing: .5px; }
.copy { padding: 10px 12px; border-radius: 12px; background: var(--slot); border: 1px solid #1e2431; }
.copy-meta { display: flex; gap: 8px; align-items: baseline; font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.copy-meta b { color: var(--text); font-weight: 600; }
.copy-text { white-space: pre-wrap; overflow-wrap: anywhere; color: #d6c3e6; }
a.copy.linked { display: block; text-decoration: none; color: inherit; cursor: pointer; transition: border-color .12s, background .12s; }
a.copy.linked:hover { border-color: color-mix(in srgb, var(--gold) 55%, transparent); background: var(--slot-hi); }
.copy-go { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 11px; }
.copy-go svg { width: 12px; height: 12px; }
a.copy.linked:hover .copy-go { color: var(--gold); }
.copy.deleted .copy-text { text-decoration: line-through; opacity: .55; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 11px; cursor: pointer;
  background: var(--slot-hi); border: 1px solid var(--line);
  font-weight: 600; text-decoration: none; color: var(--text);
}
.btn:hover { border-color: #3d4860; }
.btn.primary { background: linear-gradient(180deg, #ffd25e, #f2a91f); color: #241703; border-color: #ffd25e; box-shadow: 0 6px 20px rgba(255, 180, 40, .25); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.primary[aria-disabled="true"] { filter: grayscale(1); opacity: .5; pointer-events: none; }
.btn svg { width: 16px; height: 16px; }
.note { margin-top: 10px; color: var(--dim); font-size: 12px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 70; transform: translateX(-50%);
  padding: 8px 14px; border-radius: 10px; background: #1d2330; border: 1px solid var(--line);
  font-size: 13px; box-shadow: 0 12px 30px rgba(0, 0, 0, .5);
}

.hint { display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: center; color: var(--dim); font-size: 12px; }

/* ---------- market pulse ---------- */

/* width 0 + min-width 100%: match the board's width without widening it */
.pulse { width: 0; min-width: 100%; }
.legend { display: flex; gap: 12px; font-size: 11.5px; white-space: nowrap; }
.legend i { display: inline-block; width: 7px; height: 10px; margin-right: 5px; border-radius: 2px 2px 0 0; background: var(--text); vertical-align: -1px; }
.legend i.m { background: color-mix(in srgb, var(--text) 30%, transparent); }
.wins { display: flex; gap: 4px; padding-left: 10px; border-left: 1px solid var(--line); }
.win {
  height: 24px; padding: 0 8px 1px; border-radius: 7px; cursor: pointer;
  background: var(--slot); border: 1px solid var(--line);
  font: 700 9px Pixel; letter-spacing: .3px; color: var(--muted);
  transition: background .12s, border-color .12s, color .12s;
}
.win:hover { background: var(--slot-hi); color: var(--text); }
.win.on { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 70%, transparent); background: var(--slot-hi); }

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: calc(var(--gap) * 2); }
.card {
  --accent: var(--m);
  position: relative;
  padding: 12px 14px 12px;
  border-radius: 14px;
  background: var(--slot);
  border: 1px solid #1e2431;
  box-shadow: inset 0 2px 0 rgba(0, 0, 0, .32), inset 0 -1px 0 rgba(255, 255, 255, .035);
  cursor: pointer;
  container-type: inline-size;
  transition: background .12s, border-color .12s, box-shadow .15s;
}
.card:hover { background: var(--slot-hi); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.card.on {
  background: var(--slot-hi);
  border-color: color-mix(in srgb, var(--accent) 70%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent), 0 0 24px color-mix(in srgb, var(--accent) 14%, transparent);
}
.card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.card-head svg { width: 18px; height: 18px; flex: none; }
.card-name { flex: 1; font: 700 12px Pixel, var(--sans); letter-spacing: .3px; }
.card-diet { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; font: 700 8px Pixel; letter-spacing: .3px; vertical-align: 1px; }
.card-diet svg { width: 10px; height: 10px; }
.card-diet.veg { color: #34c463; }
.card-diet.nonveg { color: #c9513a; }
.verdict { padding: 2px 6px 3px; border-radius: 99px; border: 1px solid var(--line); font: 700 8px Pixel; letter-spacing: .4px; color: var(--dim); }
.verdict.hot { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 55%, transparent); }
.verdict.slow, .verdict.steady { color: var(--muted); }

.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.kpi b, .x b { display: block; white-space: nowrap; }
/* 16px or 24px: whole multiples of the font's 8px grid keep pixels square */
.kpi b { font: 400 16px/24px Pixel, var(--sans); color: var(--text); text-shadow: 2px 2px 0 rgba(0, 0, 0, .5); }
@container (min-width: 290px) { .kpi b { font-size: 24px; } }
.kpi span, .x em { display: block; font: 700 8px Pixel; font-style: normal; letter-spacing: .3px; white-space: nowrap; }
.kpi span { margin-top: 5px; color: var(--muted); }
.kpi b.none, .x b.none { color: var(--dim); }

.spark {
  position: relative;
  display: grid;
  grid-template-columns: repeat(24, minmax(0, 1fr));
  gap: 2px;
  height: 40px;
  margin-top: 16px;
  border-bottom: 1px solid var(--line);
}
.band { position: absolute; top: -4px; bottom: 0; right: 0; border-left: 1px solid var(--line); border-radius: 0 4px 0 0; background: rgba(255, 255, 255, .03); pointer-events: none; }
.bk { position: relative; height: 100%; }
.bk i { position: absolute; bottom: 0; border-radius: 2px 2px 0 0; }
.bk .m { left: 0; right: 0; background: color-mix(in srgb, var(--m) 30%, transparent); }
.bk .s { left: 22%; right: 22%; background: var(--m); }
.bk:hover .m { background: color-mix(in srgb, var(--m) 48%, transparent); }
.axis { display: flex; justify-content: space-between; margin-top: 4px; font-size: 10.5px; color: var(--dim); }

.extras { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.x em { color: var(--muted); margin-bottom: 3px; }
.x b { font-size: 13px; font-weight: 600; color: var(--text); }

@media (max-width: 1100px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .cards { grid-template-columns: minmax(0, 1fr); }
  .legend { display: none; }
  .pulse .head-name { flex: 1; white-space: nowrap; }
  /* The window buttons wrap under the title on the narrowest phones. */
  .pulse .chest-head { flex-wrap: wrap; row-gap: 8px; }
  .wins { margin-left: auto; }
  .win { padding: 0 6px 1px; }
}

/* ---------- small screens ---------- */

/* Title, links, day bar and search need ~1360px in one row. Below that the
   links drop under the title, and below 1100px the day bar gets its own row. */
@media (max-width: 1380px) {
  .brand { flex-wrap: wrap; row-gap: 10px; min-width: 0; }
  .navs { display: flex; flex: 1 1 100%; flex-wrap: wrap; gap: 6px; }
  .nav-link { margin-left: 0; }
}
@media (max-width: 1100px) {
  .top { grid-template-columns: minmax(0, 1fr) auto; gap: 14px 20px; }
  .day { grid-column: 1 / -1; grid-row: 2; }
  .search { width: 200px; }
}
@media (max-width: 640px) {
  :root { --s: 56px; --gap: 5px; --cols: 5; --rows: 7; }
  .app { padding: 16px 10px 28px; gap: 14px; }
  .top { grid-template-columns: 1fr; }
  .search { width: 100%; grid-row: 3; }
  .brand .sub { display: none; }
  .brand { flex: 1 1 100%; min-width: 0; flex-wrap: wrap; row-gap: 12px; }
  .brand h1 { font-size: 15px; }
  .logo { width: 32px; height: 32px; }
  /* One swipeable row of links, edge to edge, under the title. */
  .navs {
    display: flex; flex: 0 0 calc(100% + 20px); flex-wrap: nowrap; gap: 6px; margin: 0 -10px; padding: 0 10px 2px;
    overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain;
  }
  .navs::-webkit-scrollbar { display: none; }
  .navs .nav-link { flex: none; margin-left: 0; height: 34px; padding: 0 12px 1px; font-size: 9px; }
  .chest { padding: 10px 10px 12px; border-radius: 16px; }
  .live { display: none; }
  .head-meta { display: none; }
  .head-name { flex: 1; }
  .ctl .lbl { font-size: 7px; bottom: 5px; }
  .ctl .lbl.tight { font-size: 6px; }
  .ctl svg { margin-bottom: 10px; }
  .ctl-row .page, .ctl-row .spacer, .ctl-left { display: none; }
  .ctl-row { width: auto; flex: 1; justify-content: space-between; }
  .hint { display: none; }
  .modal { place-items: end center; padding: 0; }
  .sheet { border-radius: 20px 20px 0 0; max-height: 92vh; max-height: 92dvh; padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(16px + env(safe-area-inset-bottom)); max-width: calc(100% - 32px); }
  /* 16px stops phones zooming in on a focused field. */
  input:not([type=range]):not([type=checkbox]):not([type=radio]), select, textarea { font-size: 16px; }
}
/* Touch: a tapped slot shouldn't stay lifted as if hovered. */
@media (hover: none) {
  .item:hover:not(.active):not(:focus-visible) { transform: none; }
  .on-hover { display: none; }
}
@media (hover: hover) { .on-touch { display: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Shared by the sales page and the sale cards. */
/* Two range inputs stacked on one track. Only the thumbs take the pointer. */
.dual { position: relative; height: 28px; }
.dual .track { position: absolute; left: 9px; right: 9px; top: 11px; height: 6px; border-radius: 3px; background: #0c0f14; box-shadow: 0 0 0 1px var(--line); }
.dual .fill { position: absolute; top: 0; bottom: 0; background: linear-gradient(90deg, #ff9f3d, var(--gold)); border-radius: 3px; }
.dual .med { position: absolute; top: -5px; bottom: -5px; width: 2px; margin-left: -1px; background: var(--text); opacity: .7; border-radius: 1px; }
.dual input {
  position: absolute; inset: 0; width: 100%; margin: 0; background: none; pointer-events: none;
  -webkit-appearance: none; appearance: none; z-index: 2;
}
.dual input::-webkit-slider-runnable-track { background: none; height: 28px; }
.dual input::-moz-range-track { background: none; }
.dual input::-webkit-slider-thumb {
  -webkit-appearance: none; pointer-events: auto; cursor: grab; width: 18px; height: 18px; margin-top: 5px;
  border-radius: 4px; background: var(--gold); border: 2px solid #141923; box-shadow: 0 0 0 1px var(--gold), 0 4px 10px rgba(0, 0, 0, .5);
}
.dual input::-moz-range-thumb {
  pointer-events: auto; cursor: grab; width: 14px; height: 14px;
  border-radius: 4px; background: var(--gold); border: 2px solid #141923; box-shadow: 0 0 0 1px var(--gold), 0 4px 10px rgba(0, 0, 0, .5);
}
.dual input:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px rgba(255, 197, 61, .5); }
.dual input:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 3px rgba(255, 197, 61, .5); }

/* The board's warning when selling would post in no group. */
.setup-warn {
  display: block; padding: 10px 14px; border-radius: 12px; text-decoration: none;
  background: color-mix(in srgb, #ff6b5b 10%, var(--panel)); border: 1px solid color-mix(in srgb, #ff6b5b 45%, transparent);
  color: var(--muted); font-size: 13px; line-height: 1.45;
}
.setup-warn[hidden] { display: none; }
.setup-warn b { color: var(--text); font-weight: 600; }
.setup-warn .go { color: var(--gold); white-space: nowrap; }

/* The board's nudge to sell your next meal. */
.sell-nudge {
  --mess: var(--gold);
  contain: inline-size;
  display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 12px;
  padding: 10px 10px 10px 14px; border-radius: 12px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--gold) 14%, var(--panel)), var(--panel) 70%);
  border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent);
}
.sell-nudge[hidden] { display: none; }
.nudge-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--slot); border: 1px solid var(--line); }
.nudge-icon svg { width: 20px; height: 20px; }
.nudge-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.nudge-line { font: 700 13px Pixel, var(--sans); color: var(--gold); letter-spacing: .3px; }
.nudge-what { color: var(--muted); font-size: 12.5px; }
.nudge-meal { color: var(--mess); font-weight: 600; }
.nudge-go {
  font: 700 12px Pixel, var(--sans); letter-spacing: .4px; text-decoration: none; white-space: nowrap;
  color: #1a1404; background: var(--gold); padding: 8px 12px; border-radius: 9px;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .25);
}
.nudge-go:hover { filter: brightness(1.08); }
.nudge-go:focus-visible, .nudge-x:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.nudge-go::after { content: " \203A"; }
.nudge-x {
  width: 28px; height: 28px; border-radius: 8px; cursor: pointer; font-size: 16px; line-height: 1;
  color: var(--dim); background: transparent; border: 1px solid transparent;
}
.nudge-x:hover { color: var(--text); border-color: var(--line); }
@media (max-width: 640px) {
  .sell-nudge { grid-template-columns: auto 1fr auto; row-gap: 10px; padding: 10px 8px 10px 12px; }
  .nudge-x { grid-column: 3; grid-row: 1; align-self: start; }
  .nudge-go { grid-column: 1 / -1; grid-row: 2; text-align: center; padding: 10px 12px; }
}

/* ---------- sell sheet (sell.js) ---------- */

.sell-sheet { width: min(460px, 100%); }
.sell-head h2 { margin: 0; font: 700 15px Pixel, var(--sans); letter-spacing: .3px; }
.sell-head .sub { margin-top: 4px; color: var(--muted); font-size: 13px; }
/* priceRange (common.js): a −/+ box you can type into for each end. */
.pr-vals { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 18px 0 12px; }
.pr-box { display: grid; gap: 6px; min-width: 0; }
.pr-k { font: 700 8px Pixel; letter-spacing: .5px; color: var(--muted); }
.pr-in {
  display: flex; align-items: center; height: 42px; border-radius: 10px; overflow: hidden;
  background: #0c0f14; border: 1px solid var(--line);
}
.pr-in:focus-within { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(255, 197, 61, .25); }
.pr-in button {
  flex: none; width: 40px; height: 100%; border: 0; background: var(--slot); color: var(--text);
  font-size: 18px; line-height: 1; cursor: pointer;
}
.pr-in button:hover { background: var(--slot-hi); color: var(--gold); }
.pr-in button:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.pr-in .cur { flex: none; padding-left: 10px; font: 400 18px/1 Pixel; color: var(--gold); opacity: .7; }
/* 18px keeps phones from zooming in when the box takes focus. */
.pr-in input {
  flex: 1; min-width: 0; width: 100%; height: 100%; padding: 0 6px 0 2px; border: 0; outline: none;
  background: none; color: var(--gold); font: 400 18px/1 Pixel; text-shadow: 2px 2px 0 rgba(0, 0, 0, .5);
}

.sell-axis { display: flex; justify-content: space-between; margin: 4px 2px 0; font-size: 11px; color: var(--dim); }
.sell-axis .med-l { color: var(--muted); }
.sell-note { margin: 16px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.sell-when {
  margin: 12px 0 0; padding: 9px 12px; border-radius: 10px; font-size: 12.5px; line-height: 1.5; color: var(--muted);
  border: 1px dashed color-mix(in srgb, var(--gold) 55%, transparent); background: color-mix(in srgb, var(--gold) 6%, transparent);
}
.sell-when b { color: var(--gold); }
.sell-err { margin: 8px 0 0; color: #ff6b5b; font-size: 12.5px; min-height: 1em; }
.sell-err:empty { display: none; }
.sell-acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.sell-btn {
  padding: 10px 14px; border-radius: 10px; background: var(--slot); border: 1px solid var(--line);
  color: var(--text); font: 700 9px Pixel; letter-spacing: .4px; cursor: pointer;
}
.sell-btn:hover { background: var(--slot-hi); }
.sell-btn.gold { color: #141923; background: var(--gold); border-color: var(--gold); }
.sell-btn.gold:hover { filter: brightness(1.08); }
.sell-btn.red { color: #ff6b5b; border-color: color-mix(in srgb, #ff6b5b 55%, transparent); }
.sell-btn:disabled { opacity: .45; cursor: default; filter: none; }

.sell-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.sell-sum .st { display: grid; gap: 4px; padding: 9px 10px; border-radius: 10px; background: var(--slot); border: 1px solid var(--line); }
.sell-sum span { font: 700 7px Pixel; letter-spacing: .5px; color: var(--muted); }
.sell-sum b { font: 600 14px var(--sans); }
.sell-sum b.gold { color: var(--gold); }
.sell-buyers { list-style: none; margin: 12px 0 0; padding: 0; max-height: 150px; overflow: auto; font-size: 12.5px; }
.sell-buyers li { display: grid; grid-template-columns: minmax(0, 1fr) auto 52px; gap: 10px; padding: 5px 2px; border-bottom: 1px dashed var(--line); }
.sell-buyers li.none { display: block; color: var(--dim); border: 0; }
.sell-buyers .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sell-buyers .what { color: var(--muted); }
.sell-buyers .amt { color: var(--gold); text-align: right; }
.sell-tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.sell-btn.sell-tool { display: grid; gap: 5px; justify-items: center; padding: 14px 6px 12px; text-align: center; }
.sell-tool b { font: 700 16px/1 Pixel; }
.sell-tool small { font: 400 11px var(--sans); color: var(--dim); letter-spacing: 0; }
.sell-tool.grn { border-color: color-mix(in srgb, var(--veg) 60%, transparent); } .sell-tool.grn b { color: var(--veg); }
.sell-tool.gold-o { border-color: color-mix(in srgb, var(--gold) 60%, transparent); } .sell-tool.gold-o b { color: var(--gold); }
.sell-tool.red b, .sell-tool.red span { color: #ff6b5b; }
.sell-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.sell-form { display: grid; gap: 12px; margin-top: 16px; }
.sell-form label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; }
/* Text fields only: the price slider, mess chips and QR picker are inputs
   too, and this box would cover the slider's track and its other handle. */
.sell-form input:not([type=range], [type=radio], [type=file]), .sell-form select { width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--slot); color: var(--text); font: inherit; }
.sell-form input:not([type=range], [type=radio], [type=file]):focus-visible, .sell-form select:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.sell-form .sell-note, .sell-form .sell-err, .sell-form .sell-acts { margin-top: 0; }
/* The −/+ price box inside a form keeps its own look, not a form field's. */
.sell-form .pr-in input.pr-num, .sell-form .pr-in input.pr-num:focus-visible {
  padding: 0 6px 0 2px; border: 0; border-radius: 0; outline: none; background: none; font: 400 18px/1 Pixel; color: var(--gold);
}
@media (max-width: 420px) { .sell-tools { grid-template-columns: 1fr; } }
/* A schedule's tools: START NOW beside AUTOPILOT, then prices and unschedule. */
.sell-tools.pairs { grid-template-columns: 1fr 1fr; }
.sell-tools.one { grid-template-columns: 1fr; }
.sell-tool.auto b { color: var(--dim); }
.sell-tool.auto.on { border-color: color-mix(in srgb, var(--blue, #5aa9ff) 70%, transparent); background: color-mix(in srgb, #5aa9ff 10%, var(--slot)); }
.sell-tool.auto.on b, .sell-tool.auto.on span { color: #5aa9ff; }
.auto-note b { color: #5aa9ff; font-weight: 600; }
.auto-note[hidden] { display: none; }

.site-credit {
  padding: 12px 20px 28px;
  color: var(--muted);
  font: 10px/1.8 Pixel, monospace;
  text-align: center;
}
.site-credit-heart { display: inline-block; vertical-align: -3px; margin: 0 3px; }
.site-credit-heart svg { width: 14px; height: 12px; }
.site-credit-names { color: var(--gold); }
