:root {
  color-scheme: dark;
  --bg:#111b18; --panel:#192622; --raised:#20302a; --line:#34483e;
  --text:#f4eee0; --muted:#b3c0b6; --gold:#edc982; --gold-text:#edcc8e;
  --light:#f0e4cb; --ink:#21342a; --serif:Georgia,"Times New Roman",serif;
  font-family: "Segoe UI", system-ui, sans-serif;
  background:var(--bg); color:var(--text); font-size:16px;
}
* { box-sizing:border-box; }
body { margin:0; min-width:320px; min-height:100vh; background:radial-gradient(ellipse at 32% 4%,#22342b 0,transparent 56%),var(--bg); }
button,input,select { font:inherit; }
button { cursor:pointer; color:inherit; }
button:disabled { opacity:.44; cursor:default; }
button:focus-visible,input:focus-visible,select:focus-visible { outline:2px solid #f8cc7b; outline-offset:3px; }
button,input,select { -webkit-tap-highlight-color:transparent; }
a { color:inherit; }
h1,h2,h3,p { margin:0; }
h1,h2 { font-family:var(--serif); font-weight:400; }
h2 { font-size:clamp(1.7rem,3vw,2.55rem); line-height:1.04; }
h3 { font-size:1.04rem; line-height:1.3; }
p { line-height:1.55; }
fieldset { padding:0; min-width:0; border:0; margin:0; }
legend { padding:0; }
.sr { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.muted { color:var(--muted); font-size:.94rem; }
.overline { color:var(--gold-text); font-size:.76rem; letter-spacing:.15em; font-weight:750; text-transform:uppercase; }
.topbar { margin:auto; max-width:1440px; height:79px; display:flex; align-items:center; justify-content:space-between; padding:0 clamp(20px,4vw,60px); gap:12px; }
.wordmark { display:inline-flex; align-items:center; gap:12px; font:1.34rem var(--serif); white-space:nowrap; }
.wordmark i { color:var(--gold-text); font-style:normal; }
.brand-seal { width:37px; height:37px; border-radius:50%; border:1px solid #e4bd72; box-shadow:inset 0 0 0 3px #25362c,inset 0 0 0 4px #8a714c; display:grid; place-items:center; color:#f0cc88; font:.99rem var(--serif); flex:none; }
.top-actions { display:flex; gap:7px; align-items:center; }
.button { display:inline-flex; align-items:center; justify-content:center; gap:.45rem; border:1px solid transparent; border-radius:9px; min-height:43px; padding:.62rem .95rem; font-size:.91rem; font-weight:700; text-align:center; transition:background .15s,border-color .15s,transform .15s; }
.button:active:not(:disabled) { transform:translateY(1px); }
.button.primary { color:#241b0d; border-color:#e7bb77; background:linear-gradient(165deg,#f3d69b 0,#deb16d 100%); box-shadow:inset 0 1px #f9e6bf90,0 5px 16px #0b100a35; }
.button.primary:hover:not(:disabled) { background:#f7dca6; }
.button.subtle,.button.square,.button.invite { color:var(--text); background:#26362e; border-color:#3d5043; }
.button.subtle:hover:not(:disabled),.button.square:hover:not(:disabled),.button.invite:hover:not(:disabled) { background:#35493e; }
.button.ghost { color:var(--muted); background:transparent; }
.button.ghost:hover:not(:disabled) { color:var(--text); background:#28382f; }
.button.square { padding:0; min-width:43px; font-size:1.35rem; }
.button.light { color:#f9edda; background:#18241ec9; border-color:#a48c5e; align-self:start; }
.button.light:hover { background:#304037; }
.button.wide { width:100%; }
.button.invite { font-size:.79rem; letter-spacing:.08em; color:var(--gold-text); }
.mini-icon { font-size:1.15rem; line-height:.6; }
.panel { border:1px solid var(--line); border-radius:15px; background:linear-gradient(155deg,#1d2c25,#192721 58%); box-shadow:0 16px 48px #0b120e24; }
.landing,.lobby-layout { max-width:1440px; margin:auto; padding:0 clamp(20px,4vw,60px) 42px; display:grid; grid-template-columns:minmax(0,1.25fr) minmax(345px,.83fr); gap:18px; }
.landing-art,.lobby-art { isolation:isolate; overflow:hidden; border:1px solid #6f6850; border-radius:17px; position:relative; min-height:660px; display:flex; align-items:flex-end; background:#1b2921 url('/exchange.webp') 51% 49%/cover; box-shadow:0 20px 60px #050a0859; }
.landing-art::before,.lobby-art::before { position:absolute; inset:0; z-index:-1; content:""; background:linear-gradient(0deg,#091611 1%,#0b1714df 16%,#0c171045 59%,#1923150d),linear-gradient(84deg,#0b150fd4,transparent 75%); }
.landing-art::after,.lobby-art::after { position:absolute; pointer-events:none; inset:12px; border:1px solid #dab67b45; border-radius:9px; content:""; }
.hero-copy { padding:clamp(24px,4.3vw,70px); }
.hero-copy h1 { color:#f6efdf; max-width:13ch; overflow-wrap:anywhere; font-size:clamp(3.6rem,7.3vw,7.3rem); line-height:.88; letter-spacing:-.071em; text-shadow:0 8px 24px #0c130eac; }
.hero-copy h1 em { font-weight:400; color:#e3bd76; font-style:italic; }
.hero-copy p:not(.overline) { margin-top:20px; color:#e7dfce; max-width:31ch; font-size:clamp(.98rem,1.25vw,1.2rem); }
.hero-copy .overline { margin-bottom:14px; }
.hero-copy .button { margin-top:22px; }
.landing-form,.lobby-panel { padding:clamp(22px,3.25vw,46px); }
.landing-form { align-content:center; }
.landing-form h2,.lobby-panel h2 { margin:24px 0; }
.lobby-panel h2 { margin-top:0; }
.landing-form form,.join-form,.lobby-controls { display:grid; gap:15px; }
.lobby-art { min-height:560px; }
.lobby-art h1 { font-size:clamp(3.05rem,7.1vw,6.4rem); }
.lobby-controls,.join-form,.seat-list { margin-top:22px; }
.seat-list { display:grid; gap:8px; }
.seat-list h3 { margin-bottom:4px; }
.segmented { display:flex; gap:3px; border:1px solid var(--line); border-radius:10px; background:#15221c; padding:4px; }
.segment { display:flex; flex:1; justify-content:center; align-items:center; white-space:nowrap; border:1px solid transparent; background:transparent; color:var(--muted); border-radius:7px; min-height:38px; padding:.42rem .74rem; font-size:.88rem; font-weight:700; }
.segment:hover:not(.active) { background:#273a2f; color:var(--text); }
.segment.active { background:#314637; color:#ffdb96; border-color:#45604c; }
form label,.piece-field legend,.sheet label { display:grid; gap:6px; font-size:.86rem; font-weight:650; color:#deded3; }
input:not([type=radio]):not([type=checkbox]),select { width:100%; min-width:0; min-height:45px; border:1px solid #496052; border-radius:8px; background:#111e18; color:#f1ede0; padding:.61em .74em; }
input::placeholder { color:#92a298; }
select { appearance:none; padding-right:2rem; background-image:linear-gradient(45deg,transparent 50%,#b9c5b7 50%),linear-gradient(135deg,#b9c5b7 50%,transparent 50%); background-position:right 15px center,right 10px center; background-size:5px 5px; background-repeat:no-repeat; }
select:disabled { opacity:.65; }
.form-row { display:grid; grid-template-columns:minmax(0,2fr) minmax(0,1fr); gap:10px; }
.piece-picker { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:6px; padding-top:6px; }
.piece-picker label { position:relative; min-width:0; }
.piece-picker input { position:absolute; opacity:0; }
.piece-picker label span { display:grid; min-height:55px; place-items:center; gap:1px; padding:4px 2px; border:1px solid var(--line); border-radius:8px; cursor:pointer; background:#17261e; color:var(--piece); }
.piece-picker input:checked + span { background:#2c3a2a; border-color:var(--piece); box-shadow:inset 0 0 0 1px #ffffff12; }
.piece-picker input:focus-visible + span { outline:2px solid var(--gold); outline-offset:2px; }
.piece-picker b { font:1.39rem/1 var(--serif); }
.piece-picker small { color:#dae1d8; font-size:.72rem; font-weight:600; }
.code-input { text-transform:uppercase; letter-spacing:.14em; }
.game-layout { max-width:1440px; margin:0 auto; padding:0 clamp(14px,3vw,48px) 25px; display:grid; gap:16px; grid-template-columns:minmax(0,1fr) minmax(285px,330px); align-items:start; }
.game-workspace,.game-sidebar { min-width:0; display:grid; gap:12px; }
.workspace-tabs { justify-self:start; width:min(100%,530px); }
.board-panel { display:grid; gap:10px; }
.board-head { display:flex; align-items:center; justify-content:space-between; gap:9px; }
.map-tabs { width:min(100%,450px); }
.map-tabs .segment { min-height:33px; }
.turn-index { flex:none; color:var(--muted); font-size:.85rem; font-weight:650; }
.desktop-board { display:grid; gap:4px; padding:5px; background:#0b1611; border:1px solid #4c604f; border-radius:13px; overflow:hidden; }
.desktop-board.ring { grid-template-columns:repeat(var(--size),minmax(0,1fr)); grid-template-rows:repeat(var(--size),minmax(65px,1fr)); min-height:clamp(522px,62vw,670px); }
.desktop-board.run { grid-template-columns:repeat(3,minmax(0,1fr)); min-height:440px; }
.desktop-board.run .board-art { grid-column:1 / -1; min-height:200px; }
.ring .board-art { grid-area:2 / 2 / -2 / -2; }
.board-art { position:relative; isolation:isolate; background:#21362c url('/exchange.webp') 52% 48%/cover; overflow:hidden; border:1px solid #ab93645c; border-radius:8px; display:grid; align-content:end; }
.board-art::before { content:""; z-index:-1; position:absolute; inset:0; background:linear-gradient(0deg,#0d1815 0%,#102019a0 47%,#14271e06); }
.board-art::after { content:""; position:absolute; inset:8px; border:1px solid #e4bd6f49; border-radius:4px; pointer-events:none; }
.board-art>div { margin:clamp(19px,3.4vw,45px); }
.board-art h2 { color:#fff2d8; font-size:clamp(2.7rem,5.4vw,5.2rem); line-height:.95; letter-spacing:-.06em; margin:.14em 0; }
.board-art p { color:#eadfc9; }
.art-finance { background-position:71% 43%; }
.art-bank { background-position:78% 43%; }
.art-jail { background-image:linear-gradient(135deg,#242f2b,#17221f 45%,#543e35); }
.art-jail::before { background:repeating-linear-gradient(90deg,transparent 0 22px,#c39f891f 23px 25px),linear-gradient(0deg,#0d1815,transparent); }
.board-tile { position:relative; isolation:isolate; min-width:0; min-height:64px; overflow:hidden; background:linear-gradient(160deg,#26382e,#1d2b24); border:1px solid #405446; padding:8px 5px 6px; text-align:center; border-radius:7px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; }
.board-tile:hover { border-color:#ddc18b; background:#34493c; }
.board-tile.tile-property { box-shadow:inset 0 3px var(--group); }
.board-tile.my-tile { border-color:#f0c77d; box-shadow:inset 0 0 0 1px #eccc8c66; }
.board-tile.tile-property.my-tile { box-shadow:inset 0 3px var(--group),inset 0 0 0 1px #eccc8c66; }
.board-tile strong { display:block; color:#f6eddb; font-size:clamp(.57rem,.92vw,.89rem); line-height:1.12; overflow-wrap:anywhere; max-width:100%; }
.board-tile small { display:block; color:#b6c5b9; font-size:.69rem; line-height:1.15; overflow-wrap:anywhere; }
.tile-icon { font-size:1rem; font-weight:750; line-height:1.02; color:var(--group,var(--deck,#e3bf81)); }
.tile-go,.tile-exit { background:linear-gradient(145deg,#5d5136,#403723); border-color:#96754c; }
.tile-jail { background:#43302b; border-color:#6e4c43; }
.tile-entrance { background:#27403b; border-color:#54766c; }
.deck-chance { --deck:#f0ae83; }
.deck-commons { --deck:#abd899; }
.deck-tip { --deck:#f0c36c; }
.deck-news { --deck:#98cbe1; }
.occupants { display:flex; flex-wrap:wrap; justify-content:center; align-items:center; gap:2px; }
.mobile-board { display:none; }
.avatar { display:grid; place-items:center; flex:none; color:var(--piece); border:1px solid var(--piece); background:#19241e; font:1.35rem/1 var(--serif); width:42px; height:42px; border-radius:50%; box-shadow:inset 0 0 0 2px #171c1680; }
.avatar.small { width:29px; height:29px; font-size:1rem; }
.avatar.chip { width:18px; height:18px; font-size:.68rem; }
.turn-panel,.opponents,.ledger-peek,.content-panel { padding:17px; }
.turn-panel { display:grid; gap:13px; }
.turn-title { display:flex; gap:10px; align-items:center; min-width:0; }
.turn-title>div:nth-child(2) { min-width:0; }
.turn-title h2 { font-size:clamp(1.42rem,2.5vw,2rem); overflow-wrap:anywhere; margin-top:3px; }
.turn-controls,.card-buttons { display:grid; gap:8px; }
.dice { display:flex; gap:3px; color:#edd198; margin-left:auto; align-self:center; white-space:nowrap; }
.dice span { display:block; font-size:clamp(1.65rem,3vw,2.1rem); line-height:1; }
.market-line { color:#f2d494; padding:.65rem .75rem; background:#57482a55; border:1px solid #807045; border-radius:8px; font-size:.88rem; }
.section-head { display:flex; justify-content:space-between; align-items:center; gap:6px; margin-bottom:8px; }
.section-head span { font-size:.8rem; color:var(--muted); }
.section-head .button { padding:.2rem .4rem; min-height:32px; }
.people { display:grid; gap:5px; }
.person { min-width:0; display:flex; gap:9px; align-items:center; padding:8px 7px; border:1px solid transparent; border-radius:8px; }
.person.taking-turn { background:#253a2e; border-color:#405c49; }
.person .avatar { width:31px; height:31px; font-size:1.07rem; }
.person strong,.person small { display:block; overflow-wrap:anywhere; }
.person small { color:var(--muted); margin-top:2px; font-size:.78rem; }
.balance { margin-left:auto; flex:none; color:#e6cea1; font-size:.88rem; }
.ledger { margin:0; padding:0; list-style:none; }
.ledger li { padding:8px 0 8px 13px; border-bottom:1px solid #34463c; position:relative; color:var(--muted); font-size:.87rem; line-height:1.42; }
.ledger li::before { content:""; width:4px; height:4px; position:absolute; left:1px; top:.94rem; background:#89a596; border-radius:50%; }
.ledger li.gain::before { background:#91d1a0; }
.ledger li.cost::before { background:#e1a790; }
.ledger li:last-child { border-bottom:0; }
.content-panel { padding:clamp(16px,3vw,29px); display:grid; gap:12px; }
.content-panel h3,.sheet h3 { margin-top:.35rem; }
.metrics { display:flex; flex-wrap:wrap; gap:7px; }
.metrics>div { min-width:0; flex:1 1 112px; display:grid; gap:4px; padding:10px; background:#111f18; border:1px solid #3b5145; border-radius:8px; }
.metrics small,.holding-line span:not(.avatar) { color:var(--muted); }
.metrics strong { font-size:1.06rem; }
.holding-line { display:flex; align-items:center; flex-wrap:wrap; padding:.53rem 0; gap:8px 12px; }
.holding-line span:last-child { margin-left:auto; }
.property-row { min-width:0; display:flex; flex-wrap:wrap; gap:5px; align-items:center; border-bottom:1px solid #3a4c42; padding:7px 0; }
.property-row:last-child { border-bottom:0; }
.property-link { background:transparent; border:0; color:var(--text); display:grid; align-items:center; grid-template-columns:5px 1fr; gap:2px 8px; text-align:left; flex:1 1 160px; padding:6px 0; }
.property-link span { display:block; height:100%; min-height:31px; grid-row:span 2; border-radius:3px; background:var(--group); }
.property-link small { color:var(--muted); }
.deal { justify-content:space-between; }
.deal-value { flex:none; color:var(--gold-text); font-size:.81rem; }
.property-row .deal { width:auto; }
.drawn-card { background:radial-gradient(circle at 96% 0%,#523f29 0,transparent 72%),#292c24; border:1px solid var(--deck); border-radius:10px; padding:14px; }
.card-kicker { color:var(--deck); display:flex; align-items:center; gap:6px; font-weight:750; font-size:.8rem; }
.card-kicker span { font-size:1.16rem; }
.drawn-card h3 { font:1.5rem/1.06 var(--serif); margin:7px 0; }
.drawn-card p { font-size:.9rem; }
.sheet { width:min(calc(100% - 26px),530px); max-height:min(88dvh,810px); padding:0; border:1px solid #796849; border-radius:14px; color:var(--text); background:#1c2c24; box-shadow:0 20px 100px #020a07ce; }
.sheet::backdrop { background:#091310ba; backdrop-filter:blur(5px); }
.wide-sheet { width:min(calc(100% - 26px),720px); }
.sheet-head { position:sticky; z-index:2; top:0; display:flex; align-items:center; justify-content:space-between; gap:8px; padding:13px 17px; background:#202f27; border-bottom:1px solid #526052; }
.sheet-head h2 { font-size:clamp(1.48rem,4.6vw,2.1rem); overflow-wrap:anywhere; }
.sheet-content { display:grid; gap:11px; padding:16px 17px 19px; }
.sheet-status { display:none; position:sticky; z-index:1; top:70px; color:#fff1ce; background:#4b3d29; padding:9px 16px; border-bottom:1px solid #85694a; }
.sheet-status.show { display:block; }
.sheet-content form:not(.inline-form),.rule-fields { display:grid; gap:11px; }
.sheet form .form-row { grid-template-columns:1fr 1.7fr; }
.sheet footer,.sheet-footer { display:flex; gap:7px; flex-wrap:wrap; margin-top:5px; }
.sheet-footer .button { flex:1 1 auto; }
.rules { display:grid; gap:6px; }
.rules p { color:#ced8cd; margin-bottom:7px; }
.deck-tabs { flex-wrap:wrap; }
.card-row { display:grid; grid-template-columns:34px minmax(0,1fr) auto; gap:8px; align-items:center; padding:10px 0; border-bottom:1px solid #3c5146; }
.card-row small { display:block; color:var(--muted); margin-top:3px; line-height:1.35; }
.card-icon { width:32px; height:32px; border:1px solid var(--deck); color:var(--deck); border-radius:6px; display:grid; place-items:center; }
.card-preview { border:1px solid #5e674e; background:#2b382c; padding:10px; border-radius:8px; color:#eadab8; }
.sheet label.check { display:flex; gap:7px; padding:6px 0; align-items:center; }
.check input { width:17px; height:17px; accent-color:#d6b277; }
.inline-form { display:flex; gap:6px; align-items:end; flex-wrap:wrap; }
.inline-form label { flex:1 0 110px; }
.bank-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; }
.tile-detail { border-top:3px solid var(--group); padding-top:10px; display:grid; gap:9px; }
.full-map { list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:5px; }
.full-map .board-tile { width:100%; height:100%; }
.full-map .board-tile strong { font-size:.76rem; }
.raffle { display:grid; justify-items:center; gap:9px; text-align:center; }
.raffle-title h3 { font:2rem/1 var(--serif); margin:4px 0; }
.raffle-title p { color:var(--muted); }
.roulette-sheet { background:radial-gradient(circle at 50% 36%,#3a4930,#17241d 74%); }
.wheel-shell { width:min(58vw,270px); aspect-ratio:1; position:relative; display:grid; place-items:center; padding:7px; border-radius:50%; background:#ad8952; box-shadow:0 0 0 2px #e9ca87,0 0 0 7px #24342b,0 0 0 8px #aa8b59,0 13px 26px #0008; margin:.8rem 0 .4rem; }
.wheel { position:relative; width:100%; height:100%; border-radius:50%; overflow:hidden; background:var(--segments); transition:transform 3.1s cubic-bezier(.13,.75,.12,1); box-shadow:inset 0 0 25px #0005; }
.wheel::after { position:absolute; inset:7%; border-radius:50%; border:1px solid #fbe0a992; content:""; }
.wheel.spinning { transform:rotate(var(--landing)); }
.wheel-pointer { position:absolute; border-width:19px 10px 0; border-style:solid; border-color:#fff0bd transparent transparent; z-index:3; top:-8px; filter:drop-shadow(0 2px 2px #1e190f); }
.wheel-label { position:absolute; inset:0; display:flex; align-items:center; padding-top:11%; flex-direction:column; gap:3px; transform:rotate(var(--angle)); color:white; text-shadow:0 1px 3px #000; }
.wheel-label b { font-size:.72rem; max-width:9ch; text-overflow:ellipsis; overflow:hidden; white-space:nowrap; }
.wheel-hub { display:grid; place-items:center; position:absolute; height:20%; aspect-ratio:1; background:radial-gradient(circle at 35% 25%,#fff1bd,#b48b4e); color:#3f2f1b; border-radius:50%; border:3px double #705739; font:1.38rem var(--serif); box-shadow:0 2px 10px #17130c; }
.roulette-winner { min-height:1.6rem; color:var(--gold-text); font-weight:750; }
.roulette-results { list-style:none; padding:0; margin:0; }
.roulette-results li { display:flex; align-items:center; gap:9px; padding:7px 0; border-bottom:1px solid var(--line); }
.roulette-results small { display:block; color:var(--muted); margin-top:2px; }
#toast { pointer-events:none; opacity:0; position:fixed; bottom:20px; left:50%; transform:translate(-50%,8px); z-index:8; max-width:calc(100% - 28px); width:max-content; padding:10px 14px; border:1px solid #9e8154; border-radius:8px; color:#fff0cc; background:#37432d; box-shadow:0 7px 20px #0007; transition:opacity .15s,transform .15s; }
#toast.show { opacity:1; transform:translate(-50%,0); }
.connection { text-align:center; background:#594437; color:#fff2d9; position:fixed; bottom:0; left:0; right:0; padding:8px; font-size:.87rem; }
.map-tools { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.follow-button { white-space:nowrap; background:#1b2b22; border-color:#3b5043; color:var(--muted); min-height:38px; font-size:.82rem; padding:.45rem .65rem; }
.follow-button span { font-size:1.1rem; line-height:.8; }
.follow-button.active { background:#304736; color:#ffda92; border-color:#637456; }
.board-tile.tile-race .tile-icon { color:#f3c47d; }
.sheet [hidden] { display:none; }
.race-layout { width:min(100%,1200px); margin:auto; display:grid; grid-template-columns:minmax(0,1.36fr) minmax(335px,1fr); gap:15px; padding:0 clamp(12px,3vw,38px) 28px; }
.race-main,.race-ticket { display:grid; gap:10px; align-content:start; min-width:0; }
.race-hero { isolation:isolate; position:relative; overflow:hidden; display:flex; align-items:end; min-height:clamp(170px,24vw,295px); border:1px solid #8b7954; border-radius:13px; background:#334536 url('/track.webp') 62% 49%/cover; }
.race-hero::before { position:absolute; inset:0; content:""; z-index:-1; background:linear-gradient(0deg,#101c15dc,transparent 78%),linear-gradient(80deg,#14231bdd,transparent 82%); }
.race-hero::after { position:absolute; inset:7px; content:""; border:1px solid #e1bc7b55; border-radius:7px; pointer-events:none; }
.race-hero>div { padding:clamp(16px,4vw,38px); overflow-wrap:anywhere; }
.race-hero h1 { font-size:clamp(3rem,7vw,6rem); letter-spacing:-.065em; line-height:.94; color:#f9e0ac; }
.race-hero p { margin-top:8px; color:#e5d8bf; }
.race-score { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:11px 15px; }
.race-score strong,.race-score small { display:block; }
.race-score small { margin-top:2px; color:var(--muted); }
.race-clock { font:700 1.65rem/1.1 var(--serif); font-variant-numeric:tabular-nums; color:var(--gold); }
.race-track { position:relative; overflow:hidden; border:1px solid #806e51; border-radius:10px; padding:5px 6px; background:#2e382e; }
.track-lane { min-height:clamp(33px,5vw,48px); position:relative; display:flex; align-items:center; border-bottom:1px dashed #bc9c6f71; background:repeating-linear-gradient(0deg,#7c6248 0 1px,#795f45 2px 5px,#7b6147 6px 8px); }
.track-lane:first-child { border-radius:4px 4px 0 0; }
.track-lane:last-child { border-bottom:0; border-radius:0 0 4px 4px; }
.track-lane::after { content:""; position:absolute; right:29px; inset-block:0; width:9px; background:repeating-conic-gradient(#efe3c6 0% 25%,#3e4037 0% 50%) 0/9px 9px; opacity:.8; }
.track-number { width:1.8rem; text-align:center; color:#f4ebd7; font-size:.8rem; font-weight:750; }
.track-runner { position:absolute; left:28px; z-index:1; width:29px; height:29px; display:grid; place-items:center; border:1px solid #403c2c; border-radius:50%; background:var(--horse); color:#2d2318; box-shadow:0 2px 5px #3223188f; font:1.1rem/1 var(--serif); }
.race-track.running .track-runner { animation:race-run var(--leg) cubic-bezier(.3,.05,.59,1) var(--elapsed) both; }
.race-track.finished .track-runner { left:calc(100% - 64px); }
.track-place { position:absolute; right:4px; min-width:21px; text-align:center; color:#f6e6cc; font-size:.82rem; }
.track-place.won { background:#392e1c; color:#fee7ad; border-radius:5px; }
@keyframes race-run { from { left:28px; } to { left:calc(100% - 57px); } }
.race-ticket { padding:clamp(15px,2.5vw,25px); }
.race-ticket form { display:grid; gap:10px; }
.race-form,.race-finish { list-style:none; padding:0; margin:0; }
.race-form li,.race-finish li { min-width:0; display:grid; grid-template-columns:27px minmax(0,1fr) auto auto; align-items:center; gap:7px; padding:8px 0; border-bottom:1px solid var(--line); }
.race-finish li { grid-template-columns:27px minmax(0,1fr) auto; }
.race-form li:last-child,.race-finish li:last-child { border-bottom:0; }
.race-silk { width:27px; height:27px; display:grid; place-items:center; border-radius:6px; font-weight:800; font-size:.82rem; color:#281f16; background:var(--horse); }
.race-form strong,.race-form small { display:block; overflow-wrap:anywhere; }
.race-form small { margin-top:2px; color:var(--muted); font-size:.75rem; }
.race-form .race-odds { color:var(--gold-text); font-size:.86rem; white-space:nowrap; }
.race-form input[type=number] { width:clamp(74px,12vw,105px); text-align:right; padding-inline:5px; }
.race-total { color:var(--gold-text); font-weight:700; }
@media (max-width:1050px) {
  .board-head { align-items:flex-start; flex-direction:column; }
  .map-tools { width:100%; }
}
@media (max-width:900px) {
  .landing,.lobby-layout { grid-template-columns:minmax(0,1fr) minmax(320px,.85fr); }
  .game-layout { grid-template-columns:minmax(0,1fr) 265px; gap:10px; }
  .desktop-board.ring { grid-template-rows:repeat(var(--size),minmax(62px,1fr)); }
}
@media (max-width:730px) {
  .topbar { height:61px; padding:0 12px; gap:6px; }
  .wordmark { gap:7px; font-size:1.04rem; }
  .brand-seal { width:29px; height:29px; font-size:.78rem; box-shadow:inset 0 0 0 2px #27352d,inset 0 0 0 3px #8a714c; }
  .top-actions { gap:3px; }
  .top-actions .button { min-height:37px; font-size:.78rem; padding:0 7px; }
  .top-actions .square { min-width:35px; font-size:1rem; }
  .top-actions .mini-icon { display:none; }
  .landing,.lobby-layout { grid-template-columns:1fr; padding:0 11px 20px; gap:10px; }
  .landing-art,.lobby-art { min-height:270px; border-radius:13px; background-position:48% 54%; }
  .landing-art::after,.lobby-art::after { inset:7px; }
  .hero-copy { padding:19px 24px; }
  .hero-copy h1 { font-size:clamp(3.05rem,13vw,5rem); }
  .hero-copy p:not(.overline) { margin-top:10px; }
  .lobby-art .hero-copy { padding:21px; }
  .landing-form,.lobby-panel { padding:15px; }
  .landing-form h2,.lobby-panel h2 { margin:13px 0; }
  .lobby-panel h2 { margin-top:0; }
  .game-layout { display:grid; grid-template-columns:minmax(0,1fr); padding:0 10px 17px; }
  .game-workspace,.game-sidebar { gap:8px; }
  .workspace-tabs { width:100%; justify-self:stretch; }
  .workspace-tabs .segment { padding:.35rem .25rem; min-height:38px; font-size:.77rem; }
  .board-head { align-items:stretch; gap:6px; }
  .map-tabs { width:100%; }
  .map-tabs .segment { font-size:.82rem; padding:.26rem .26rem; min-height:39px; }
  .follow-button { min-height:38px; }
  .turn-index { font-size:.68rem; }
  .desktop-board,.opponents,.ledger-peek { display:none !important; }
  .mobile-board { display:grid; gap:7px; border:1px solid #4f624e; border-radius:11px; overflow:hidden; background:#17241f; }
  .mobile-board-intro { min-height:85px; display:flex; align-items:end; justify-content:space-between; gap:7px; padding:11px 12px; background:linear-gradient(90deg,#152a22 4%,#182f24bd 50%,#17291d4f),url('/exchange.webp') 58% 52%/cover; }
  .mobile-board-intro h2 { margin-top:3px; font-size:clamp(1.66rem,6vw,2.2rem); overflow-wrap:anywhere; }
  .map-counter { font-size:.72rem; background:#111f18dc; border:1px solid #7f7e5c; padding:.25rem .42rem; border-radius:6px; white-space:nowrap; }
  .tile-strip { display:grid; grid-auto-columns:minmax(73px,1fr); grid-auto-flow:column; gap:4px; overflow-x:auto; padding:0 6px 4px; }
  .tile-strip .board-tile { min-height:75px; }
  .tile-strip .board-tile strong { font-size:.69rem; }
  .tile-strip .board-tile small { font-size:.62rem; }
  .tile-strip .focal { border-color:#d9bd82; }
  .map-all { min-height:32px; justify-self:center; padding:.22rem .6rem; }
  .turn-panel,.content-panel { padding:13px; }
  .turn-panel { gap:10px; }
  .turn-title .avatar { width:35px; height:35px; }
  .turn-title h2 { font-size:1.51rem; }
  .card-buttons { grid-template-columns:1fr 1fr; }
  .card-buttons .button { min-height:43px; }
  .button { min-height:43px; }
  .sheet { max-height:92dvh; }
  .sheet-content { padding:12px; }
  .sheet-head { padding:9px 12px; }
  .sheet-status { top:62px; }
  input:not([type=radio]):not([type=checkbox]),select { font-size:16px; }
  .metrics>div { flex-basis:95px; }
  .bank-actions .button { padding:.5rem .3rem; font-size:.79rem; }
  .race-layout { grid-template-columns:minmax(0,1fr); gap:9px; }
  .race-hero { min-height:125px; }
  .race-main { gap:7px; }
  .race-score { padding:8px 11px; }
  .track-lane { min-height:29px; }
  .track-runner { width:24px; height:24px; font-size:.93rem; }
}
@media (max-width:360px) {
  .topbar .wordmark { font-size:.88rem; }
  .topbar .button { font-size:.71rem; }
  .deck-tabs .segment { font-size:.78rem; padding-inline:.33rem; }
  .piece-picker small { font-size:.64rem; }
}
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { scroll-behavior:auto !important; transition:none !important; animation:none !important; }
}
