/* Layout: exchange shell. Top bar, two-column body (market grid + live tape),
   market detail = chart column + sticky order ticket. */
:root {
  --bg: #F4F6F8;
  --surface: #FFFFFF;
  --surface-2: #EEF1F4;
  --ink: #0F1720;
  --muted: #5B6675;
  --faint: #8B95A3;
  --line: #E1E6EC;
  --yes: #12B76A;
  --yes-ink: #067647;
  --yes-soft: #E6F7EF;
  --no: #7A5AF8;
  --no-ink: #5925DC;
  --no-soft: #F0ECFF;
  --red: #E5484D;
  --red-soft: #FDECEC;
  --blue: #3E7BFA;
  --blue-soft: #EAF1FF;
  --warn: #B54708;
  --font: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius: 12px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B0F14;
    --surface: #121820;
    --surface-2: #19212B;
    --ink: #E8EDF2;
    --muted: #9AA5B4;
    --faint: #6B7685;
    --line: #232D39;
    --yes: #2DD48A;
    --yes-ink: #5BE3A6;
    --yes-soft: #0F2A1E;
    --no: #9B85FF;
    --no-ink: #B8A8FF;
    --no-soft: #221B3D;
    --red: #F2555A;
    --red-soft: #33171A;
    --blue: #5B8FFF;
    --blue-soft: #14213D;
    --warn: #F79009;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
input { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* ---- top bar */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
}
.topbar-inner {
  max-width: 1240px; margin: 0 auto; padding: 0 16px;
  display: flex; align-items: center; gap: 24px; min-height: 60px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; letter-spacing: -0.02em; font-size: 17px; }
.brand-mark { width: 28px; height: 28px; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a {
  text-decoration: none; color: var(--muted); font-weight: 600; font-size: 14px;
  padding: 7px 12px; border-radius: 8px;
}
.nav a:hover { color: var(--ink); background: var(--surface-2); }
.nav a.on { color: var(--ink); background: var(--surface-2); }
.account { display: flex; align-items: center; gap: 14px; }
.bal { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; text-decoration: none; }
.bal small { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.bal b { font-family: var(--mono); font-weight: 600; font-size: 14px; }
.who { font-weight: 700; font-size: 14px; color: var(--muted); background: none; border: 0; cursor: pointer; padding: 6px 8px; border-radius: 8px; }
.who:hover { background: var(--surface-2); color: var(--ink); }

.demo-banner {
  background: var(--yes-soft); color: var(--yes-ink); font-size: 13px; font-weight: 600;
  text-align: center; padding: 8px 16px;
}

.page { max-width: 1240px; margin: 0 auto; padding: 24px 16px 48px; min-height: 70vh; }
.foot { max-width: 1240px; margin: 0 auto; padding: 24px 16px 40px; color: var(--faint); font-size: 12.5px; border-top: 1px solid var(--line); }

/* ---- buttons */
.btn {
  border: 1px solid var(--line); background: var(--surface); border-radius: 10px;
  padding: 9px 16px; font-weight: 700; font-size: 14px; cursor: pointer;
}
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.primary:hover { opacity: 0.9; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.sm { padding: 6px 12px; font-size: 13px; }

/* ---- headings & chips */
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
h1 { font-size: 28px; line-height: 1.15; letter-spacing: -0.03em; margin: 0; font-weight: 800; text-wrap: balance; }
h2 { font-size: 17px; letter-spacing: -0.01em; margin: 0 0 12px; font-weight: 800; }
.sub { color: var(--muted); margin: 6px 0 0; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line); background: var(--surface); color: var(--muted);
  border-radius: 999px; padding: 6px 14px; font-weight: 600; font-size: 13.5px; cursor: pointer;
  display: inline-flex; gap: 6px; align-items: center;
}
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip .count { font-family: var(--mono); font-size: 12px; opacity: 0.7; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 8px; font-weight: 600; font-size: 13px; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgb(0 0 0 / 0.08); }

/* ---- market board */
.board { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.filters { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px 12px; display: flex; flex-direction: column; gap: 10px; min-width: 0;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.card:hover { border-color: color-mix(in srgb, var(--ink) 25%, var(--line)); box-shadow: 0 4px 16px rgb(15 23 32 / 0.06); }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.card-title { font-weight: 800; font-size: 16px; letter-spacing: -0.01em; text-decoration: none; color: var(--ink); }
.card-title:hover { text-decoration: underline; text-underline-offset: 3px; }
.status { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--yes); }
.status.soon .dot { background: var(--warn); }
.status.wait .dot { background: var(--faint); }
.status.live .dot { animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: 0.3; } }

.row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center;
  padding-top: 8px; border-top: 1px solid var(--line);
}
.row:first-of-type { border-top: 0; padding-top: 0; }
.row-label { display: flex; align-items: center; gap: 8px; min-width: 0; }
.row-label .teams { font-family: var(--mono); font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pct { font-weight: 800; font-size: 17px; font-family: var(--mono); min-width: 3.2ch; text-align: right; }
.pct.lead { color: var(--ink); }
.pct.trail { color: var(--muted); }

.al { display: inline-block; width: 10px; height: 22px; border-radius: 3px; flex: none; }
.al.red { background: var(--red); }
.al.blue { background: var(--blue); }
.al.tot { background: var(--faint); }
.row-name { font-weight: 700; font-size: 14px; white-space: nowrap; }

.buy {
  border: 0; border-radius: 8px; padding: 7px 10px; font-weight: 700; font-size: 13px; cursor: pointer;
  font-family: var(--mono); min-width: 74px; text-align: center; text-decoration: none; display: inline-block;
}
.buy.yes { background: var(--yes-soft); color: var(--yes-ink); }
.buy.no { background: var(--no-soft); color: var(--no-ink); }
.buy.yes:hover { background: var(--yes); color: #fff; }
.buy.no:hover { background: var(--no); color: #fff; }
.buy span { font-family: var(--font); font-weight: 600; margin-right: 4px; }
.pair { display: flex; gap: 6px; }

.card-foot { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--faint); padding-top: 4px; }
.card-foot .num { color: var(--muted); }
.final { font-family: var(--mono); font-weight: 600; }
.final .w { color: var(--ink); }
.won { color: var(--yes-ink); font-weight: 700; }

.empty {
  background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius);
  padding: 40px 20px; text-align: center; color: var(--muted);
}
.empty b { display: block; color: var(--ink); font-size: 16px; margin-bottom: 6px; }

/* ---- tape */
.tape { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; position: sticky; top: calc(76px + env(safe-area-inset-top, 0px)); }
.tape h2 { display: flex; align-items: center; gap: 8px; font-size: 14px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.tape ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; max-height: 70vh; overflow: auto; }
.tape li { padding: 9px 0; border-top: 1px solid var(--line); font-size: 13px; }
.tape li:first-child { border-top: 0; }
.tape a { text-decoration: none; display: block; }
.tape .t-q { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tag { font-weight: 700; font-size: 12px; padding: 1px 6px; border-radius: 5px; }
.tag.yes { background: var(--yes-soft); color: var(--yes-ink); }
.tag.no { background: var(--no-soft); color: var(--no-ink); }
.ago { color: var(--faint); font-size: 12px; float: right; }

/* ---- market detail */
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; }
.alliances { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0 6px; }
.alliance { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 10px; font-family: var(--mono); font-size: 14px; font-weight: 600; }
.alliance.red { background: var(--red-soft); }
.alliance.blue { background: var(--blue-soft); }
.alliance .al { height: 20px; width: 8px; }
.alliance .pred { font-family: var(--font); font-size: 12px; color: var(--muted); font-weight: 600; margin-left: 4px; }
.alliance a { text-decoration: none; }
.alliance a:hover { text-decoration: underline; }

.headline { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.big { font-size: 40px; font-weight: 800; letter-spacing: -0.03em; font-family: var(--mono); }
.big-label { font-weight: 700; color: var(--muted); }
.delta.up { color: var(--yes-ink); font-weight: 700; }
.delta.down { color: var(--red); font-weight: 700; }
.sbnote { color: var(--muted); font-size: 13px; }

.chart-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 12px 6px; margin-top: 14px; }
.chart { width: 100%; height: 260px; display: block; }
.chart .grid-line { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--faint); font: 11px var(--mono); }
.chart .price { fill: none; stroke: var(--yes); stroke-width: 2.25; stroke-linejoin: round; }
.chart .area { fill: var(--yes); opacity: 0.08; }
.chart .anchor { fill: none; stroke: var(--muted); stroke-width: 1.25; stroke-dasharray: 4 4; }
.chart .end { fill: var(--yes); stroke: var(--surface); stroke-width: 2; }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); padding: 6px 4px 4px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 18px; height: 0; border-top: 2.25px solid var(--yes); vertical-align: middle; margin-right: 6px; }
.legend i.dash { border-top: 1.5px dashed var(--muted); }

.sibs { display: flex; gap: 8px; margin-top: 16px; }
.section { margin-top: 26px; }
.rules { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; color: var(--muted); font-size: 14px; }
.rules p { margin: 0 0 8px; max-width: 70ch; }
.rules p:last-child { margin: 0; }
.rules b { color: var(--ink); }

.result {
  border-radius: var(--radius); padding: 14px 18px; margin-top: 16px; font-weight: 700;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center;
}
.result.yes { background: var(--yes-soft); color: var(--yes-ink); }
.result.no { background: var(--no-soft); color: var(--no-ink); }
.result.push { background: var(--surface-2); color: var(--ink); }
.result .num { font-size: 18px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.r, th.r { text-align: right; }
.table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; }
.table-wrap td a { text-decoration: none; font-weight: 600; }
.table-wrap td a:hover { text-decoration: underline; }
.pos { color: var(--yes-ink); }
.neg { color: var(--red); }
tr.you td { background: color-mix(in srgb, var(--yes-soft) 60%, transparent); }
.rank { font-family: var(--mono); color: var(--muted); width: 3ch; }
.rank.top { color: var(--ink); font-weight: 700; }

/* ---- ticket */
.ticket {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px;
  position: sticky; top: calc(76px + env(safe-area-inset-top, 0px)); display: flex; flex-direction: column; gap: 14px;
  box-shadow: 0 8px 28px rgb(15 23 32 / 0.06);
}
.ticket-q { font-weight: 700; font-size: 14px; }
.tabs { display: flex; gap: 18px; border-bottom: 1px solid var(--line); }
.tabs button { background: none; border: 0; padding: 0 0 10px; font-weight: 700; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.on { color: var(--ink); border-color: var(--ink); }
.sides { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.side {
  border: 1.5px solid var(--line); background: var(--surface); border-radius: 10px; padding: 10px 8px;
  cursor: pointer; font-weight: 700; display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.side small { font-weight: 600; font-size: 12px; color: var(--muted); }
.side .num { font-size: 16px; }
.side.yes.on { border-color: var(--yes); background: var(--yes-soft); color: var(--yes-ink); }
.side.no.on { border-color: var(--no); background: var(--no-soft); color: var(--no-ink); }
.qty { display: flex; flex-direction: column; gap: 6px; }
.qty label { font-size: 13px; font-weight: 700; color: var(--muted); }
.qty-box { display: grid; grid-template-columns: 40px minmax(0, 1fr) 40px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.qty-box button { border: 0; background: var(--surface-2); font-size: 18px; cursor: pointer; }
.qty-box input { border: 0; background: var(--surface); text-align: center; font-family: var(--mono); font-size: 18px; font-weight: 600; padding: 10px 0; min-width: 0; }
.quick { display: flex; gap: 6px; flex-wrap: wrap; }
.quick button { border: 1px solid var(--line); background: var(--surface); border-radius: 7px; padding: 4px 10px; font-size: 12.5px; font-weight: 600; cursor: pointer; font-family: var(--mono); }
.summary { display: flex; flex-direction: column; gap: 7px; font-size: 14px; }
.summary div { display: flex; justify-content: space-between; gap: 10px; }
.summary span { color: var(--muted); }
.summary .win { font-weight: 800; color: var(--yes-ink); }
.place { width: 100%; padding: 13px; border-radius: 12px; font-size: 15px; font-weight: 800; border: 0; cursor: pointer; color: #fff; }
.place.yes { background: var(--yes); }
.place.no { background: var(--no); }
.place:disabled { opacity: 0.45; cursor: not-allowed; }
.ticket .note { font-size: 12.5px; color: var(--muted); margin: 0; }
.ticket .err { color: var(--red); font-size: 13px; font-weight: 600; margin: 0; }
.holding { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.holding div { display: flex; justify-content: space-between; }

/* ---- portfolio tiles */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 26px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.tile small { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 700; }
.tile b { display: block; font-family: var(--mono); font-size: 22px; margin-top: 4px; font-weight: 600; }

/* ---- admin */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 18px; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; }
.inline-form input { border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; background: var(--surface); min-width: 0; flex: 1 1 180px; font-family: var(--mono); }
.search-list { max-height: 380px; overflow: auto; margin-top: 12px; border-top: 1px solid var(--line); }
.search-list div { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.search-list code { font-family: var(--mono); color: var(--muted); font-size: 12.5px; }
.warn-text { color: var(--warn); font-size: 13px; }

/* ---- modal + toast */
.modal-back { position: fixed; inset: 0; background: rgb(8 12 18 / 0.5); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { background: var(--surface); border-radius: 16px; padding: 22px; width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 20px 60px rgb(0 0 0 / 0.25); }
.modal-tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface-2); border-radius: 10px; padding: 3px; }
.modal-tabs button { border: 0; background: none; padding: 8px; border-radius: 8px; font-weight: 700; color: var(--muted); cursor: pointer; }
.modal-tabs button.on { background: var(--surface); color: var(--ink); }
.modal label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
.modal input { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--surface); font-size: 15px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; }
.form-error { color: var(--red); font-size: 13px; font-weight: 600; margin: 0; min-height: 1em; }
.form-note { color: var(--muted); font-size: 13px; margin: 0; }
.verify { display: flex; flex-direction: column; gap: 14px; }
.link-btn { align-self: flex-start; border: 0; background: none; padding: 0; color: var(--blue); font-weight: 700; font-size: 13px; cursor: pointer; }
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  background: var(--ink); color: var(--bg); padding: 11px 18px; border-radius: 12px; font-weight: 600; font-size: 14px;
  z-index: 60; box-shadow: 0 10px 30px rgb(0 0 0 / 0.25); max-width: calc(100% - 32px);
}

@media (max-width: 980px) {
  .board, .detail { grid-template-columns: minmax(0, 1fr); }
  .tape, .ticket { position: static; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .topbar-inner { gap: 10px; padding-block: 8px; }
  .nav { order: 3; flex-basis: 100%; overflow-x: auto; }
  .account { margin-left: auto; }
  h1 { font-size: 23px; }
  .big { font-size: 32px; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .hide-sm { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---- admin: create market form, question cards, users */
.form { display: flex; flex-direction: column; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
.form .opt { font-weight: 500; color: var(--faint); }
.form input, .form textarea, .form select, .q-settle input {
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; background: var(--surface);
  font: inherit; font-size: 15px; color: var(--ink); min-width: 0; width: 100%;
}
.form textarea { resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.opt-head, .opt-row { display: grid; grid-template-columns: minmax(0, 1fr) 90px 40px; gap: 8px; align-items: center; }
.opt-head { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.opt-row { margin-top: 8px; }
.opt-row .num { text-align: right; font-family: var(--mono); }
.opt-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.q-card { display: flex; flex-direction: column; gap: 12px; }
.q-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: start; }
.q-actions, .q-settle, .row-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row-actions { justify-content: flex-end; }
.q-opt { display: grid; grid-template-columns: minmax(0, 1fr) 70px auto auto; gap: 10px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); font-size: 14px; }
.q-opt:first-child { border-top: 0; }
.q-opt .sub { margin: 0; font-size: 12.5px; }
.check { display: flex; gap: 8px; align-items: center; cursor: pointer; }
.check input { width: 18px; height: 18px; }
.inline-label { display: flex; gap: 8px; align-items: center; font-size: 13px; font-weight: 700; color: var(--muted); flex-wrap: wrap; }
.q-settle input { width: auto; }
.badge { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); color: var(--muted); }
.badge.admin { background: var(--blue-soft); color: var(--blue); }
.badge.owner { background: var(--yes-soft); color: var(--yes-ink); }
.panel code { font-family: var(--mono); font-size: 13px; background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }
@media (max-width: 640px) {
  .q-opt { grid-template-columns: minmax(0, 1fr) 60px auto; }
  .q-opt .sub { display: none; }
  #q-kind { display: flex; overflow-x: auto; }
}

/* ---- GP (play money) */
.gp { display: inline-flex; align-items: center; gap: 0.28em; white-space: nowrap; }
.gp-coin { width: 1.05em; height: 1.05em; flex: none; }
.gp-coin circle { fill: #E8B53A; }
.gp-coin .ring { fill: none; stroke: #9A6F0B; stroke-width: 1; }
.gp-coin text { font: 800 7px var(--font); fill: #5C4100; text-anchor: middle; letter-spacing: -0.2px; }
.buy .unit { font-size: 0.72em; margin-left: 0.15em; opacity: 0.75; font-weight: 600; }
