/* NIGHTMARKET 夜市: a wooden beam with shop signs, hanging signboards with gold borders and cords,
   cinnabar and gold on a plum-black street. Never blue, no neon, no scanlines. */
:root {
  --ground: #1d1418; --deep: #1a0f14; --panel: #2a1c21; --panel-2: #201014;
  --beam: #44211d; --beam-d: #2c1612;
  --red: #cf362a; --btn: #c32e23; --rib: #9e2a22;
  --gold: #e29f34; --hair: rgba(226, 159, 52, .55); --hair-2: rgba(226, 159, 52, .25);
  --cream: #ede6d6; --muted: #b9ab9a; --dim: #8a7b72;
  --green: #3f7a5a;
  --shadow: 0 8px 24px rgba(10, 4, 6, .6);
  --head: "Oswald", "Noto Sans SC", system-ui, sans-serif;
  --body: "Noto Sans SC", "Oswald", system-ui, sans-serif;
  --w: 1240px;
  --lab: #cf362a;
}
* { box-sizing: border-box; }
html { background: var(--ground); color-scheme: dark; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--ground); color: var(--cream); font: 400 15px/1.6 var(--body); -webkit-font-smoothing: antialiased; }
body.lang-zh { font-size: 15.5px; letter-spacing: .01em; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--cream); }
img { max-width: 100%; display: block; }
code { font: 500 .88em/1 ui-monospace, "Cascadia Mono", Consolas, monospace; color: var(--gold); }
h1, h2, h3 { font-family: var(--head); font-weight: 600; letter-spacing: .02em; margin: 0; line-height: 1.1; }
h1 i, h2 i, h3 i { font-style: normal; font-family: "Noto Sans SC", sans-serif; color: var(--gold); font-weight: 700; margin-left: .3em; font-size: .78em; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; }
input, textarea { font: inherit; color: var(--cream); }
::selection { background: var(--red); color: var(--cream); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.hide, [hidden] { display: none !important; }

/* ---------- signboard ---------- */
.board { position: relative; background: var(--panel); border: 2px solid var(--gold); border-radius: 3px; box-shadow: var(--shadow); }
.board::before { content: ""; position: absolute; inset: 4px; border: 1px solid var(--hair); border-radius: 2px; pointer-events: none; }
.cords { position: absolute; left: 0; right: 0; top: -22px; height: 22px; pointer-events: none; }
.cords::before, .cords::after { content: ""; position: absolute; top: 0; width: 2px; height: 22px; background: var(--gold); opacity: .8; }
.cords::before { left: 18%; } .cords::after { right: 18%; }
.panel-h { display: flex; align-items: center; gap: 8px; padding: 12px 16px 10px; border-bottom: 1px solid var(--hair-2); font: 600 13px/1.2 var(--head); letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.panel-h .grow { flex: 1; }
.panel-h code { font-size: 11px; color: var(--muted); letter-spacing: 0; text-transform: none; }
.dot.live { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 3px rgba(207, 54, 42, .25); animation: beat 1.6s ease-in-out infinite; }
@keyframes beat { 50% { opacity: .35; } }

/* lanterns: unlit plum, lit cinnabar with a gold cap and a soft warm glow */
.lns { display: inline-flex; gap: 5px; align-items: flex-start; vertical-align: middle; }
.lns i { position: relative; width: 10px; height: 13px; border-radius: 45%; background: #5a4c50; margin-top: 3px; transform-origin: 50% -3px; }
.lns i::before { content: ""; position: absolute; left: 4px; top: -4px; width: 2px; height: 4px; background: var(--hair); }
.lns i::after { content: ""; position: absolute; left: 2px; right: 2px; bottom: -2px; height: 2px; background: #6c5d60; }
.lns i.lit { background: var(--red); box-shadow: 0 0 8px rgba(226, 120, 40, .55); animation: sway 3.2s ease-in-out infinite; }
.lns i.lit::after { background: var(--gold); }
.lns i.lit:nth-child(2n) { animation-delay: -1.1s; } .lns i.lit:nth-child(3n) { animation-delay: -2s; }
@keyframes sway { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }

/* tier chips */
.tier { display: inline-block; padding: 1px 8px; border-radius: 2px; font: 600 11px/1.6 var(--head); letter-spacing: .08em; text-transform: uppercase; border: 1px solid var(--hair); color: var(--muted); }
.tier.t1 { color: var(--cream); border-color: var(--rib); }
.tier.t2 { color: var(--cream); background: var(--rib); border-color: var(--rib); }
.tier.t3 { color: var(--cream); background: var(--red); border-color: var(--gold); }
.tier.t4 { color: var(--deep); background: var(--gold); border-color: var(--gold); }

/* stall kind icons */
.k { display: inline-block; flex: none; width: 22px; height: 22px; border-radius: 3px; position: relative; background: var(--beam); border: 1px solid var(--hair); }
.k::after { content: ""; position: absolute; inset: 5px; border-radius: 2px; background: var(--gold); }
.k-noodle { background: var(--red); } .k-noodle::after { inset: 9px 4px 4px; border-radius: 0 0 8px 8px; background: var(--cream); }
.k-dumpling { background: var(--beam); } .k-dumpling::after { inset: 7px 4px 5px; border-radius: 9px 9px 3px 3px; background: var(--cream); }
.k-tea { background: var(--green); } .k-tea::after { inset: 6px 6px 5px; border-radius: 2px 2px 6px 6px; background: var(--cream); }
.k-lantern { background: var(--beam-d); } .k-lantern::after { inset: 4px 6px; border-radius: 45%; background: var(--red); box-shadow: 0 0 6px rgba(226, 120, 40, .6); }
.k-fortune { background: #7a2e3a; } .k-fortune::after { inset: 5px; border-radius: 50%; background: var(--gold); }
.k-firecracker { background: var(--red); } .k-firecracker::after { inset: 3px 8px; border-radius: 1px; background: var(--gold); }
.k-landmark, .k-gate { background: var(--rib); }

/* ---------- buttons, fields ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 20px; border: 1px solid var(--gold); border-radius: 3px; background: var(--btn); color: var(--cream); font: 600 14px/1 var(--head); letter-spacing: .08em; text-transform: uppercase; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .22); transition: background .15s, transform .15s; white-space: nowrap; }
.btn:hover { background: var(--red); color: var(--cream); transform: translateY(-1px); }
.btn:disabled { background: #4a3036; border-color: var(--hair-2); color: var(--muted); transform: none; box-shadow: none; }
.btn.ghost { background: transparent; color: var(--gold); box-shadow: none; }
.btn.ghost:hover { background: rgba(226, 159, 52, .1); color: var(--cream); }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: 12px; }
.btn.sm img { width: 16px; height: 16px; }
.btn.block { width: 100%; }
.btn.wallet.on { border-color: var(--green); color: var(--cream); }
.field { display: grid; gap: 6px; }
.field > span { font: 500 12px/1.3 var(--head); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.field > span em { font: 400 12px/1.3 var(--body); text-transform: none; letter-spacing: 0; color: var(--dim); font-style: normal; margin-left: 6px; }
.field input, .field textarea, .tick-in, .devbuy input { width: 100%; padding: 10px 12px; background: var(--deep); border: 1px solid var(--hair-2); border-radius: 3px; outline: none; transition: border-color .15s; }
.field input:focus, .field textarea:focus, .tick-in:focus-within, .devbuy input:focus { border-color: var(--gold); }
.field textarea { resize: vertical; min-height: 64px; }
.tick-in { display: flex; align-items: center; gap: 6px; padding: 0 12px; }
.tick-in i { font-style: normal; color: var(--gold); font-weight: 700; }
.tick-in input { border: 0; padding: 10px 0; background: transparent; text-transform: uppercase; }
.status { padding: 10px 12px; border-radius: 3px; border: 1px solid var(--hair-2); background: var(--deep); font-size: 13.5px; color: var(--muted); }
.status.ok { border-color: var(--green); color: var(--cream); }
.status.err { border-color: var(--red); color: #f2c6bf; }
.status span { display: block; }
.empty { padding: 26px 22px; display: grid; gap: 6px; text-align: center; color: var(--muted); }
.empty b { font: 600 17px/1.3 var(--head); color: var(--cream); letter-spacing: .03em; }
.empty .btn { justify-self: center; margin-top: 8px; }

/* ---------- header: wooden beam with a row of shop signs ---------- */
.beam { position: sticky; top: 0; z-index: 40; background: linear-gradient(var(--beam) 0 82%, var(--beam-d) 82%); border-bottom: 2px solid var(--gold); box-shadow: 0 6px 18px rgba(10, 4, 6, .55); }
.beam-in { max-width: var(--w); margin: 0 auto; height: 74px; padding: 0 22px; display: flex; align-items: center; gap: 22px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--cream); flex: none; }
.brand img { width: 54px; height: 54px; object-fit: contain; }
.brand span { display: flex; align-items: baseline; gap: 8px; }
.brand b { font: 700 22px/1 var(--head); letter-spacing: .05em; }
.brand span i { font: 700 18px/1 "Noto Sans SC", sans-serif; font-style: normal; color: var(--gold); }
.brand.sm img { width: 34px; height: 34px; }
.brand.sm b { font-size: 16px; } .brand.sm span i { font-size: 14px; }
.signs { flex: 1; display: flex; justify-content: center; gap: 12px; align-self: stretch; }
.sign { position: relative; align-self: flex-start; margin-top: 12px; min-width: 60px; padding: 6px 10px 5px; display: grid; place-items: center; gap: 1px; background: var(--panel); border: 2px solid var(--gold); border-radius: 3px; color: var(--cream); box-shadow: 0 5px 12px rgba(10, 4, 6, .5); transform-origin: 50% -12px; transition: transform .2s, background .2s; }
.sign::before, .sign::after { content: ""; position: absolute; top: -14px; width: 2px; height: 12px; background: var(--gold); }
.sign::before { left: 12px; } .sign::after { right: 12px; }
.sign b { font: 700 16px/1.1 "Noto Sans SC", sans-serif; letter-spacing: .08em; }
.sign small { font: 500 9.5px/1.2 var(--head); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.sign:hover { transform: rotate(-2deg); color: var(--cream); }
.sign.on { border-color: var(--cream); }
.sign.on small { color: var(--gold); }
.sign.lit { background: var(--btn); }
.sign.lit small { color: var(--cream); }
.beam-end { display: flex; align-items: center; gap: 10px; flex: none; }
.lang { display: inline-flex; border: 1px solid var(--hair); border-radius: 999px; overflow: hidden; }
.lang button { border: 0; background: transparent; padding: 5px 11px; font: 600 12px/1.2 var(--head); color: var(--muted); letter-spacing: .06em; }
.lang button.on { background: var(--gold); color: var(--deep); }
.socials { display: inline-flex; align-items: center; gap: 8px; }
.ib { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; min-width: 34px; padding: 0 8px; border: 1px solid var(--hair); border-radius: 3px; color: var(--cream); background: var(--panel-2); }
.ib svg { width: 15px; height: 15px; fill: currentColor; }
.ib img { width: 18px; height: 18px; }
.ib:hover { border-color: var(--gold); color: var(--gold); }
.ib.pump { background: #1f3a2b; border-color: #3f7a5a; font: 600 12px/1 var(--head); letter-spacing: .05em; padding: 0 10px; }
.ib.pump:hover { color: var(--cream); border-color: #6fb98c; }

/* ---------- page frame ---------- */
#view { min-height: 70vh; }
.page-in { animation: rise .35s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
[data-fade] { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
[data-fade].is-in { opacity: 1; transform: none; }
.doc { max-width: var(--w); margin: 0 auto; padding: 34px 22px 60px; }
.doc-h { margin-bottom: 30px; }
.doc h1 { font-size: clamp(34px, 5vw, 54px); text-transform: uppercase; }
.crumb { margin: 0 0 10px; display: flex; gap: 8px; align-items: center; font: 500 12px/1.2 var(--head); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.crumb span::before { content: "›"; margin-right: 8px; color: var(--gold); }
.lede { max-width: 760px; color: var(--muted); font-size: 16px; margin: 12px 0 0; }
.sec-h { display: flex; align-items: center; gap: 18px; margin-bottom: 24px; flex-wrap: wrap; }
.sec-h h2 { font-size: clamp(26px, 3vw, 34px); text-transform: uppercase; }
.sec-h .line { flex: 1; min-width: 40px; height: 2px; background: linear-gradient(90deg, var(--gold), transparent); opacity: .6; }

/* ---------- home hero ---------- */
.hero { position: relative; border-bottom: 2px solid var(--gold); }
.hero .stage { position: relative; height: clamp(420px, 60vh, 520px); background: radial-gradient(120% 90% at 50% 60%, #3a2226 0, var(--deep) 75%); overflow: hidden; }
.stage { position: relative; overflow: hidden; touch-action: none; }
canvas.c3 { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; }
canvas.c3:active { cursor: grabbing; }
.c3-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 2; }
.c3-labels > * { position: absolute; left: 0; top: 0; will-change: transform; }
.ptag { display: grid; justify-items: center; }
.ptag em { font: 600 11px/1.2 var(--head); font-style: normal; letter-spacing: .06em; padding: 3px 8px; background: var(--panel); border: 1px solid var(--gold); border-radius: 2px; color: var(--cream); white-space: nowrap; box-shadow: 0 4px 10px rgba(10, 4, 6, .5); }
.ptag i { width: 1px; height: 10px; background: var(--gold); }
.ptag.red em { background: var(--btn); }
.tools { position: absolute; z-index: 4; right: 14px; bottom: 14px; display: flex; gap: 6px; }
.tools button { width: 36px; height: 36px; border: 1px solid var(--gold); border-radius: 3px; background: rgba(42, 28, 33, .92); color: var(--gold); font: 600 17px/1 var(--head); }
.tools button:hover { background: var(--btn); color: var(--cream); }
.stage-hint { position: absolute; z-index: 3; left: 50%; bottom: 16px; transform: translateX(-50%); padding: 5px 12px; border-radius: 999px; background: rgba(26, 15, 20, .82); border: 1px solid var(--hair-2); font: 500 11.5px/1.3 var(--head); letter-spacing: .08em; color: var(--muted); white-space: nowrap; pointer-events: none; }
.hero .tools { bottom: 54px; }
.hero-card { position: absolute; z-index: 5; left: max(22px, calc((100vw - var(--w)) / 2 + 22px)); top: 54px; width: min(410px, 40vw); padding: 26px 26px 24px; }
.hero-card h1 { font-size: clamp(38px, 4.6vw, 58px); font-weight: 700; letter-spacing: .03em; display: flex; flex-direction: column; }
.hero-card h1 i { margin: 6px 0 0; font-size: .62em; letter-spacing: .3em; }
.hook { margin: 16px 0 0; font: 500 16px/1.5 var(--body); color: var(--cream); }
.hook.zh { margin-top: 0; color: var(--muted); font-size: 15px; }
.hero-card hr { border: 0; height: 1px; background: var(--hair-2); margin: 14px 0; }
.hero-card .row { display: flex; gap: 8px; flex-wrap: nowrap; margin-top: 20px; }
.hero-card .row .btn { width: auto; min-width: 0; padding-left: 10px; padding-right: 10px; font-size: 13px; white-space: nowrap; flex: 1 1 0; justify-content: center; }
.buzz-board { position: absolute; z-index: 5; right: max(22px, calc((100vw - var(--w)) / 2 + 22px)); top: 54px; width: 290px; padding: 20px 18px 18px; display: grid; gap: 8px; justify-items: center; text-align: center; }
.buzz-board small { font: 600 12px/1.2 var(--head); letter-spacing: .16em; color: var(--gold); }
.buzz-board b { font: 700 54px/1 var(--head); color: var(--cream); letter-spacing: .02em; }
.buzz-board .lns i { width: 14px; height: 18px; }
.buzz-board .lns i::after { left: 3px; right: 3px; }
.buzz-board .lns i::before { left: 6px; }
em.game { font: 500 11px/1.35 var(--body); font-style: normal; color: var(--muted); padding: 3px 8px; border: 1px dashed var(--hair-2); border-radius: 2px; word-break: keep-all; text-wrap: balance; }
.buzz-board a { font: 500 13px/1.4 var(--head); letter-spacing: .04em; text-wrap: balance; }

/* ---------- register ---------- */
.register, .live, .how { max-width: var(--w); margin: 0 auto; padding: 56px 22px 0; }
.find { display: flex; align-items: center; gap: 8px; padding: 0 12px; height: 40px; min-width: 260px; background: var(--deep); border: 1px solid var(--hair); border-radius: 3px; color: var(--gold); }
.find:focus-within { border-color: var(--gold); }
.find input { flex: 1; min-width: 0; width: 100%; border: 0; background: transparent; outline: none; height: 100%; }
.seg { display: inline-flex; border: 1px solid var(--gold); border-radius: 3px; overflow: hidden; }
.seg button { border: 0; padding: 0 14px; height: 38px; background: transparent; color: var(--gold); font: 600 12.5px/1 var(--head); letter-spacing: .08em; text-transform: uppercase; }
.seg button + button { border-left: 1px solid var(--hair); }
.seg button.on { background: var(--btn); color: var(--cream); }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cards > .empty { grid-column: 1 / -1; }
.stall-card { display: grid; grid-template-columns: 40% 1fr; min-height: 168px; background: var(--panel); border: 2px solid var(--gold); border-radius: 3px; box-shadow: var(--shadow); overflow: hidden; cursor: pointer; transition: transform .18s, border-color .18s; }
.stall-card:hover, .stall-card:focus-visible { transform: translateY(-3px); border-color: var(--cream); }
.awning { position: relative; display: grid; place-items: center; padding: 34px 14px 14px; background: repeating-linear-gradient(90deg, var(--red) 0 18px, var(--cream) 18px 36px); border-right: 2px solid var(--gold); }
.scallop { position: absolute; left: 0; right: 0; top: 22px; height: 12px; background: radial-gradient(circle at 9px 0, transparent 0 0, var(--rib) 0 9px, transparent 9.5px) 0 0 / 18px 12px repeat-x; }
.awning::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 22px; background: var(--rib); border-bottom: 1px solid var(--gold); }
.awning img, .awning .ini { position: relative; width: 74px; height: 74px; border-radius: 3px; border: 2px solid var(--gold); object-fit: cover; background: var(--panel); box-shadow: 0 6px 14px rgba(10, 4, 6, .55); }
.awning .ini { display: grid; place-items: center; font: 700 26px/1 var(--head); color: var(--gold); }
.sc-body { padding: 14px 16px 12px; display: grid; gap: 6px; align-content: start; min-width: 0; }
.sc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tk { font: 700 19px/1.1 var(--head); letter-spacing: .04em; color: var(--cream); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-top .lns { gap: 3px; } .sc-top .lns i { width: 8px; height: 11px; } .sc-top .lns i::before { left: 3px; } .sc-top .lns i::after { left: 1px; right: 1px; }
.sc-name { margin: 0; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-split { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--hair-2); border-radius: 2px; margin-top: 4px; }
.sc-split div { padding: 6px 10px; display: grid; }
.sc-split div + div { border-left: 1px solid var(--hair-2); }
.sc-split small { font: 500 10.5px/1.2 var(--head); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.sc-split b { font: 700 20px/1.2 var(--head); color: var(--gold); }
.sc-foot { margin: 0; font-size: 12px; color: var(--dim); }
.reg-more { margin: 16px 0 0; font-size: 12.5px; color: var(--dim); text-align: right; }

/* ---------- live strip ---------- */
.live-bar { display: flex; align-items: center; gap: 14px; min-height: 50px; padding: 8px 16px; background: var(--panel); border: 2px solid var(--gold); border-radius: 3px; box-shadow: var(--shadow); overflow: hidden; }
.live-bar > b { flex: none; font: 700 14px/1 var(--head); letter-spacing: .12em; color: var(--gold); }
.fc { flex: none; width: 10px; height: 26px; background: var(--red); border-radius: 2px; position: relative; box-shadow: 14px 0 0 -1px var(--red); margin-right: 14px; }
.fc::before { content: ""; position: absolute; left: 2px; top: -6px; width: 2px; height: 6px; background: var(--gold); box-shadow: 14px 0 0 var(--gold); }
.live-bar ul { flex: 1; min-width: 0; margin: 0; padding: 0; list-style: none; display: flex; gap: 0; overflow: hidden; white-space: nowrap; color: var(--muted); font-size: 13.5px; mask-image: linear-gradient(90deg, #000 85%, transparent); }
.live-bar li { display: flex; align-items: center; gap: 8px; flex: none; }
.live-bar li + li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--red); margin: 0 14px; }
.live-bar li .k { width: 18px; height: 18px; }
.live-bar li a { color: var(--cream); }
.live-bar li a b { color: var(--gold); font-weight: 500; }
.live-bar time { color: var(--dim); }

/* ---------- lantern ladder ---------- */
.how .lede { margin: -6px 0 34px; }
.ladder { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-top: 30px; }
.rung { padding: 14px 14px 16px; display: grid; gap: 10px; align-content: start; }
.rung-h { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.rung-h b { font: 600 15px/1.2 var(--head); letter-spacing: .05em; text-transform: uppercase; }
.rung-h i { font-style: normal; font-weight: 700; color: var(--gold); }
.thumb { border: 1px solid var(--hair-2); border-radius: 2px; overflow: hidden; }
.thumb svg { display: block; width: 100%; height: auto; }
.rule { margin: 0; font: 600 13px/1.35 var(--head); letter-spacing: .03em; color: var(--cream); }
.opens { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.ladder .rung:nth-child(2) { transition-delay: .06s; } .ladder .rung:nth-child(3) { transition-delay: .12s; } .ladder .rung:nth-child(4) { transition-delay: .18s; } .ladder .rung:nth-child(5) { transition-delay: .24s; }
.fine-print { margin: 26px 0 0; font-size: 13px; color: var(--dim); max-width: 900px; }

/* ---------- world (a coin's street) ---------- */
.world { max-width: 1400px; margin: 0 auto; padding: 34px 22px 50px; }
.w-top { display: flex; align-items: center; gap: 18px; padding: 18px 22px; margin-bottom: 22px; flex-wrap: wrap; }
.w-top .grow { flex: 1; min-width: 240px; }
.w-top .crumb { margin-bottom: 6px; }
.w-top h1 { font-size: clamp(28px, 3.4vw, 42px); text-transform: uppercase; }
.w-top .sub { margin-top: 8px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--muted); font-size: 13.5px; }
.acts { display: flex; gap: 8px; flex-wrap: wrap; }
.ca { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px; border: 1px solid var(--hair); border-radius: 3px; background: var(--deep); font-size: 12.5px; color: var(--muted); }
.ca b { font: 600 11px/1 var(--head); letter-spacing: .1em; color: var(--gold); }
.ca em { font-style: normal; font: 500 11px/1 var(--head); color: var(--dim); letter-spacing: .06em; text-transform: uppercase; }
button.ca:hover { border-color: var(--gold); }
.ca.off { opacity: .8; }
.w-main { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.w-main > .stage { height: clamp(460px, 70vh, 700px); background: radial-gradient(120% 90% at 50% 60%, #2c1a1f 0, var(--deep) 70%); border: 2px solid var(--gold); border-radius: 3px; box-shadow: var(--shadow); }
.tools { flex-direction: row; }
.w-main > .stage .tools { top: 14px; bottom: auto; flex-direction: column; }
.hovtip { position: absolute; z-index: 6; pointer-events: none; padding: 6px 10px; background: var(--panel); border: 1px solid var(--gold); border-radius: 3px; font-size: 12.5px; color: var(--cream); white-space: nowrap; box-shadow: var(--shadow); transform: translate(-50%, calc(-100% - 14px)); }
.hovtip b { color: var(--gold); }
.w-side { display: grid; gap: 30px; padding-top: 4px; }
.w-side > .board { margin-top: 0; }
.w-side > section.board + section.board { margin-top: 4px; }
.state-note { margin: 0; padding: 12px 16px; font-size: 13.5px; color: var(--muted); border-color: var(--rib); }
.state-note b { color: var(--cream); display: block; font: 600 14px/1.3 var(--head); letter-spacing: .04em; margin-bottom: 2px; }
.buzz-cell { padding: 16px 16px 12px; display: grid; gap: 6px; justify-items: center; text-align: center; border-bottom: 1px solid var(--hair-2); }
.buzz-cell small { font: 600 11px/1.2 var(--head); letter-spacing: .14em; color: var(--gold); text-transform: uppercase; }
.buzz-cell b { font: 700 40px/1 var(--head); }
.buzz-cell p { margin: 0; font-size: 12px; color: var(--dim); }
.stats { display: grid; grid-template-columns: 1fr 1fr; }
.stats > div { padding: 10px 16px; border-bottom: 1px solid var(--hair-2); }
.stats > div:nth-child(odd) { border-right: 1px solid var(--hair-2); }
.stats small { display: block; font: 500 10.5px/1.3 var(--head); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.stats b { font: 700 19px/1.3 var(--head); color: var(--cream); }
.stats p { margin: 0; font-size: 11.5px; color: var(--dim); }
.market-note { margin: 0; padding: 10px 16px 14px; font-size: 12px; color: var(--dim); }
.mini-ladder { list-style: none; margin: 0; padding: 6px 0; }
.mini-ladder li { display: flex; gap: 12px; align-items: center; padding: 8px 16px; }
.mini-ladder li .lns { flex: none; width: 74px; gap: 3px; }
.mini-ladder li .lns i { width: 9px; height: 12px; } .mini-ladder li .lns i::before { left: 3.5px; } .mini-ladder li .lns i::after { left: 1.5px; right: 1.5px; }
.mini-ladder li > span:last-child { display: grid; min-width: 0; }
.mini-ladder b { font: 600 13.5px/1.3 var(--head); letter-spacing: .04em; }
.mini-ladder em { font-style: normal; font-size: 12px; color: var(--dim); line-height: 1.4; }
.mini-ladder li.done b { color: var(--muted); }
.mini-ladder li.here { background: rgba(207, 54, 42, .16); box-shadow: inset 3px 0 0 var(--red); }
.mini-ladder li.here b { color: var(--gold); }
.mini-ladder li.locked { opacity: .62; }
.feed { list-style: none; margin: 0; padding: 4px 0; max-height: 340px; overflow: auto; }
.feed li { display: flex; gap: 10px; align-items: center; padding: 8px 16px; border-bottom: 1px solid rgba(226, 159, 52, .1); cursor: default; }
.feed li[data-tile] { cursor: pointer; }
.feed li:hover { background: rgba(226, 159, 52, .05); }
.feed li > div { flex: 1; min-width: 0; display: grid; }
.feed li b { font: 600 13px/1.3 var(--head); letter-spacing: .03em; }
.feed li small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed li time { flex: none; font-size: 11.5px; color: var(--dim); }
.feed li.new { animation: newrow 1.6s ease; }
@keyframes newrow { 0% { background: rgba(207, 54, 42, .35); } 100% { background: transparent; } }
.feed li.none { display: block; border: 0; }
.feed li.none .empty { padding: 18px 6px; }

/* build drawer */
.build { position: absolute; z-index: 8; left: 16px; bottom: 16px; width: min(380px, calc(100% - 32px)); max-height: calc(100% - 32px); overflow: auto; animation: drop .25s ease both; }
@keyframes drop { from { opacity: 0; transform: translateY(12px); } }
.build .panel-h button { border: 0; background: transparent; color: var(--gold); font-size: 20px; line-height: 1; padding: 0 2px; }
.build-b { padding: 14px 16px 16px; display: grid; gap: 12px; }
.kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.kinds button { display: grid; grid-template-columns: 22px 1fr; column-gap: 8px; align-items: center; text-align: left; padding: 8px 10px; background: var(--deep); border: 1px solid var(--hair-2); border-radius: 3px; font-size: 12.5px; color: var(--cream); }
.kinds button .k { grid-row: span 3; }
.kinds button b { font: 700 13px/1.2 "Noto Sans SC", sans-serif; color: var(--gold); }
.kinds button small { grid-column: 2; font-size: 11px; color: var(--dim); }
.kinds button:hover:not(:disabled) { border-color: var(--gold); }
.kinds button.on { border-color: var(--gold); background: rgba(207, 54, 42, .22); box-shadow: inset 0 0 0 1px var(--gold); }
.kinds button:disabled { opacity: .4; }
.signrow { display: flex; align-items: center; gap: 8px; }
.signrow input { flex: 1; }
.signrow em { font-style: normal; font-size: 11.5px; color: var(--dim); min-width: 22px; text-align: right; }
p.status { margin: 0; padding: 0; border: 0; background: none; font-size: 12.5px; min-height: 1em; }
p.status.err { color: #f2a99f; }
.note { margin: 0; font-size: 11.5px; color: var(--dim); }

/* ---------- launch (开张) ---------- */
.pub-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 30px; align-items: start; margin-top: 26px; }
.pub-form { display: grid; gap: 34px; }
.step { display: grid; grid-template-columns: 64px 1fr; gap: 0; padding: 0; }
.step-n { display: grid; place-items: start center; padding-top: 20px; font: 700 26px/1 var(--head); color: var(--gold); background: var(--beam); border-right: 1px solid var(--hair); }
.step-b { padding: 20px 22px 22px; display: grid; gap: 14px; min-width: 0; }
.step-b h2 { font-size: 21px; text-transform: uppercase; }
.step-b .sub { margin: -6px 0 0; color: var(--muted); font-size: 13.5px; }
.drop { display: flex; align-items: center; gap: 16px; padding: 14px; border: 1px dashed var(--hair); border-radius: 3px; background: var(--deep); cursor: pointer; }
.drop:hover, .drop.over { border-color: var(--gold); border-style: solid; }
.drop .th { flex: none; width: 74px; height: 74px; display: grid; place-items: center; border: 2px solid var(--gold); border-radius: 3px; background: var(--panel) center / cover no-repeat; font: 600 28px/1 var(--head); color: var(--gold); overflow: hidden; }
.drop .th img { width: 100%; height: 100%; object-fit: cover; }
.drop b { display: block; font: 600 15px/1.3 var(--head); letter-spacing: .04em; color: var(--cream); }
.drop small { color: var(--dim); font-size: 12.5px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field em[data-nchars] { float: right; }
.cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cats button { display: grid; gap: 3px; text-align: left; padding: 10px 12px; background: var(--deep); border: 1px solid var(--hair-2); border-radius: 3px; }
.cats button b { font: 600 14px/1.2 var(--head); letter-spacing: .03em; color: var(--cream); }
.cats button span { font-size: 12px; color: var(--dim); line-height: 1.35; }
.cats button:hover { border-color: var(--gold); }
.cats button.on { border-color: var(--gold); background: rgba(207, 54, 42, .2); box-shadow: inset 0 0 0 1px var(--gold); }
.cats button.on b { color: var(--gold); }
.lbl { font: 500 12px/1.3 var(--head); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatches button { width: 34px; height: 34px; border-radius: 3px; border: 2px solid var(--hair-2); }
.swatches button.on { border-color: var(--cream); box-shadow: 0 0 0 2px var(--gold); }
.devbuy { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.devbuy input { width: 110px; }
.chip { padding: 7px 12px; border: 1px solid var(--hair); border-radius: 3px; background: transparent; color: var(--gold); font: 600 12.5px/1 var(--head); letter-spacing: .05em; }
.chip.on { background: var(--btn); border-color: var(--gold); color: var(--cream); }
.check { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.check > * { display: inline-flex; align-items: center; gap: 6px; }
.check .ok { color: #8fd0a8; }
.check i { width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--hair); display: inline-block; }
.check .ok i { background: var(--green); border-color: var(--green); }
.fine { margin: 0; font-size: 12px; color: var(--dim); }
.pub-side .sticky { position: sticky; top: 100px; display: grid; gap: 34px; }
.charter-art { position: relative; background: var(--deep); border-bottom: 1px solid var(--hair-2); }
.charter-art svg { display: block; width: 100%; height: auto; }
.seal { position: absolute; right: 14px; bottom: 14px; width: 56px; height: 56px; border-radius: 3px; border: 2px solid var(--gold); background: var(--panel) center / cover no-repeat; box-shadow: var(--shadow); }
.seal img { width: 100%; height: 100%; object-fit: cover; }
.charter-b { padding: 16px 18px 18px; }
.charter-b h3 { font-size: 22px; text-transform: uppercase; }
.charter-b .tg { margin: 4px 0 12px; color: var(--muted); font-size: 13.5px; }
.charter-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; font-size: 13px; }
.charter-meta div { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.charter-meta small { flex-basis: 100%; font: 500 10.5px/1.2 var(--head); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.charter-meta i { width: 14px; height: 14px; border-radius: 2px; border: 1px solid var(--hair); }

/* ---------- admin ---------- */
.admin .admin-box { max-width: 560px; margin-top: 28px; padding: 24px; }

/* ---------- footer: a beam ---------- */
.foot { margin-top: 80px; background: linear-gradient(var(--beam-d) 0 6px, var(--beam) 6px); border-top: 2px solid var(--gold); }
.foot-in { max-width: var(--w); margin: 0 auto; padding: 22px 22px 10px; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.foot-in nav { display: flex; gap: 18px; flex: 1; flex-wrap: wrap; }
.foot-in nav a { font: 500 13px/1 var(--head); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.foot-in nav a:hover { color: var(--gold); }
.foot-note { max-width: var(--w); margin: 0 auto; padding: 4px 22px 22px; font-size: 12px; color: var(--dim); }

/* ---------- toasts ---------- */
.toasts { position: fixed; z-index: 90; right: 18px; bottom: 18px; display: grid; gap: 10px; max-width: min(380px, calc(100vw - 36px)); }
.toast { padding: 12px 16px; background: var(--panel); border: 2px solid var(--gold); border-radius: 3px; box-shadow: var(--shadow); font-size: 13.5px; color: var(--cream); animation: drop .25s ease both; transition: opacity .3s, transform .3s; }
.toast.ok { border-color: var(--green); }
.toast.err { border-color: var(--red); }
.toast.out { opacity: 0; transform: translateY(8px); }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .signs { gap: 8px; }
  .sign { min-width: 52px; padding: 5px 8px 4px; }
  .brand b { font-size: 19px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .ladder { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 980px) {
  .beam-in { height: auto; flex-wrap: wrap; gap: 6px 14px; padding: 8px 16px 10px; }
  .brand img { width: 42px; height: 42px; }
  .beam-end { margin-left: auto; }
  .signs { order: 3; flex-basis: 100%; justify-content: flex-start; overflow-x: auto; padding: 14px 2px 4px; scrollbar-width: none; }
  .sign { margin-top: 0; flex: none; }
  .hero .stage { height: auto; min-height: 0; display: flex; flex-direction: column; padding: 30px 16px 16px; gap: 30px; }
  .hero .stage canvas.c3 { position: relative; order: 2; height: 360px; inset: auto; border: 2px solid var(--gold); border-radius: 3px; }
  .hero .stage .c3-labels { display: none; }
  .hero-card, .buzz-board { position: relative; left: auto; right: auto; top: auto; width: auto; }
  .hero-card { order: 1; }
  .buzz-board { order: 3; }
  .hero .tools, .hero .stage-hint { display: none; }
  .w-main, .pub-grid { grid-template-columns: 1fr; }
  .pub-side .sticky { position: static; }
  .ladder { grid-template-columns: repeat(2, 1fr); }
  .live-bar ul { overflow-x: auto; mask-image: none; }
}
@media (max-width: 640px) {
  body { font-size: 14.5px; }
  .brand span i { display: none; }
  .brand b { font-size: 17px; }
  .ib.pump span { display: none; }
  .btn.wallet span { font-size: 11px; }
  .cards { grid-template-columns: 1fr; }
  .ladder { grid-template-columns: 1fr; }
  .fields, .cats { grid-template-columns: 1fr; }
  .cats { grid-template-columns: 1fr 1fr; }
  .step { grid-template-columns: 1fr; }
  .step-n { place-items: center start; padding: 10px 18px; border-right: 0; border-bottom: 1px solid var(--hair); font-size: 20px; }
  .register, .live, .how { padding-top: 44px; }
  .find { min-width: 0; flex: 1; }
  .sec-h .line { display: none; }
  .w-top { padding: 16px; }
  .w-main > .stage { height: 420px; }
  .stage-hint { font-size: 10.5px; white-space: normal; text-align: center; width: max-content; max-width: calc(100% - 100px); left: 16px; transform: none; }
  .live-bar { flex-wrap: wrap; }
  .hero .stage canvas.c3 { height: 300px; }
  .hero .row { flex-direction: column; align-items: stretch; }
  .hero .row .btn { justify-content: center; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  [data-fade] { opacity: 1; transform: none; }
}

/* stall-scene thumbnail on the register cards */
.awning { padding: 0; display: block; overflow: hidden; }
.awning::before, .awning .scallop { display: none; }
.awning .thumb-s { display: block; width: 100%; height: 100%; min-height: 150px; object-fit: cover; }
.awning img { position: absolute; right: 6px; bottom: 6px; width: 30px; height: 30px; border-width: 1px; box-shadow: none; }
