:root{--bg:#f5f3ec;--ink:#26382d;--muted:#778071;--line:#dedfd4;--green:#376447;--lime:#dfeb95;--paper:#fffef9}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC",sans-serif;font-size:14px}button,input,select{font:inherit}button{cursor:pointer}button:disabled{cursor:default;opacity:.45}button,input,select{border-radius:8px}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #9aaf54;outline-offset:3px}header{height:80px;border-bottom:1px solid var(--line);padding:0 5vw;display:flex;align-items:center;justify-content:space-between}.brand{display:flex;gap:11px;align-items:center;font-size:18px;font-weight:800;letter-spacing:1.5px;color:inherit;text-decoration:none}.brand-icon{background:var(--ink);color:var(--lime);font-size:29px;border-radius:10px;width:38px;text-align:center}.local{font-size:9px;letter-spacing:1px;border:1px solid #cbd0bf;border-radius:4px;padding:5px 7px;margin-left:6px;color:var(--muted)}main{max-width:1400px;margin:auto;padding:0 5vw}.intro{display:flex;justify-content:space-between;align-items:center;padding:43px 0 31px}.eyebrow{font-size:10px;font-weight:650;letter-spacing:2px;color:var(--green)}h1{font-size:clamp(27px,3.2vw,43px);letter-spacing:-1.5px;margin:12px 0 13px;font-weight:750}.intro p{color:var(--muted);margin:0;line-height:1.7}.intro-symbol{display:flex;gap:10px;transform:rotate(-7deg);font-size:47px;color:var(--green)}.intro-symbol span{display:grid;place-items:center;width:69px;height:69px;border:1px solid #bec7b1;border-radius:15px;background:#e8eddb}.intro-symbol span:nth-child(2){background:var(--lime);transform:translateY(-12px)}.game-select{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:0 0 20px}.game{border:1px solid var(--line);background:transparent;text-align:left;padding:20px;display:flex;gap:15px;align-items:center;color:var(--ink);border-radius:12px}.game.active{background:var(--paper);border:1.5px solid var(--green);box-shadow:0 3px 0 #e2e6d7}.game-icon{width:46px;height:46px;display:grid;place-items:center;font-size:31px;border-radius:10px;background:#e6eedb;color:#4c764b}.cube-icon{color:#b2724c;background:#f1e4d8}.game strong{font-size:17px;display:block}.game small{display:block;color:var(--muted);font-size:10px;letter-spacing:1px;margin-top:7px}.game-arrow{margin-left:auto;font-size:20px;color:var(--muted)}.control-panel{display:flex;justify-content:space-between;gap:20px;align-items:flex-end;padding:18px 22px;background:#eaece2;border:1px solid var(--line);border-radius:12px}.fields{display:flex;gap:18px;flex-wrap:wrap}label{display:flex;flex-direction:column;gap:8px;font-size:11px;color:#6c7768}input,select{padding:10px 12px;border:1px solid #ccd2c3;background:var(--paper);color:var(--ink);height:40px}input[type=number]{width:100px}.buttons{display:flex;gap:10px;align-items:center}.primary{border:0;background:var(--green);color:#fff;padding:12px 20px;font-weight:600;min-height:42px;white-space:nowrap}.primary span{margin-left:20px}.subtle{background:transparent;border:1px solid #cdd2c2;padding:9px 13px;color:var(--ink)}.notice{padding:12px 4px;font-size:11px;color:#7c816d;line-height:1.6}.arena-heading{display:flex;justify-content:space-between;align-items:center;margin:18px 0 16px}.arena-heading>div{display:flex;gap:10px;align-items:center}h2{margin:0;font-size:16px}.dot{width:7px;height:7px;border-radius:50%;background:#648657}.badge{font-size:10px;background:#e5e9d8;color:#697455;padding:5px 8px;border-radius:5px}#round-label{font-size:11px;color:var(--muted)}.players{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:17px}.player{background:var(--paper);border:1px solid var(--line);border-radius:13px;overflow:hidden}.player-header{padding:16px;display:flex;justify-content:space-between;gap:8px;align-items:center}.identity{display:flex;gap:10px;align-items:center;min-width:0}.avatar{width:32px;height:32px;border-radius:8px;display:grid;place-items:center;background:#e4eadc;color:#4c6852;font-weight:750}.player:nth-child(2) .avatar{background:#ece5d6;color:#90763e}.player:nth-child(3) .avatar{background:#e2e5ee;color:#6b7291}.identity strong{font-size:13px;display:block;word-break:break-word}.identity small{font-size:9px;color:var(--muted);display:block;margin-top:4px}.status{font-size:10px;color:#6d8066;white-space:nowrap}.scene{margin:0 13px;background:#edf0e4;padding:14px;border-radius:8px;position:relative;min-height:230px}.map{display:grid;grid-template-columns:repeat(9,1fr);gap:3px;aspect-ratio:1;width:100%;max-width:300px;margin:auto}.tile{position:relative;display:grid;place-items:center;border-radius:3px;font-size:clamp(9px,1.2vw,16px);background:#d6e3b4;color:#6a8a42;overflow:hidden}.tile.water{background:#a5c9d4;color:#689fad}.tile.forest{background:#94b384;color:#416846}.tile.berries{background:#c6d6a4;color:#b16d61}.tile.rock{background:#c4c6b7;color:#8b9180}.pawn{position:absolute;background:#344c38;color:white;width:75%;height:75%;display:grid;place-items:center;font-size:12px;border-radius:6px;box-shadow:0 2px 3px #0003}.player:nth-child(2) .pawn{background:#9e773c}.player:nth-child(3) .pawn{background:#717d9c}.scene-caption{display:flex;justify-content:space-between;font-size:10px;color:#708065;margin-top:12px}.stats{display:flex;gap:10px;padding:13px 16px}.stat{flex:1}.stat small{display:block;color:var(--muted);font-size:10px}.stat strong{display:block;font-size:18px;margin:5px 0}.meter{height:3px;border-radius:2px;background:#e8eade;overflow:hidden}.meter i{display:block;height:100%;background:#82a16a}.inventory{padding:0 16px 13px;font-size:10px;color:var(--muted);display:flex;justify-content:space-between}.event{font-size:11px;padding:12px 15px;border-top:1px solid #ebede3;background:#fafaf3;line-height:1.6;min-height:58px;color:#68715e;overflow-wrap:anywhere}.bottom-grid{display:grid;grid-template-columns:minmax(0,2fr) minmax(240px,1fr);gap:17px;margin-top:22px}.results,.rules{background:var(--paper);border:1px solid var(--line);border-radius:12px;padding:20px}.section-title{display:flex;justify-content:space-between;align-items:center;gap:10px}.section-title>span{font-size:10px;color:var(--muted)}table{width:100%;border-collapse:collapse;margin-top:14px;font-size:11px;white-space:nowrap}th{text-align:left;color:var(--muted);font-weight:400;padding:10px 5px;border-bottom:1px solid var(--line)}td{padding:14px 5px;border-bottom:1px solid #eeeee4}td:first-child{font-weight:600}.rank-num{display:inline-block;color:#889173;width:23px}.replay{display:flex;align-items:center;gap:12px;margin-top:17px;flex-wrap:wrap}.replay label{flex:1;min-width:130px;flex-direction:row;align-items:center}.replay input{width:100%;height:20px;padding:0;accent-color:var(--green)}.replay .subtle{font-size:10px;padding:8px}#replay-label{font-size:10px;color:var(--muted)}.rules p{font-size:11px;line-height:1.9;color:#6c7565}.legend{display:flex;gap:10px;flex-wrap:wrap;font-size:10px;color:var(--muted);margin-top:15px}.legend span{display:flex;align-items:center;gap:4px}.legend i{width:10px;height:10px;border-radius:2px;background:#94b384}.legend span:nth-child(2) i{background:#a5c9d4}.legend span:nth-child(3) i{background:#c6d6a4}.legend span:nth-child(4) i{background:#c4c6b7}footer{display:flex;justify-content:space-between;color:#929783;font-size:10px;letter-spacing:1px;padding:28px 0}.cube-net{display:grid;grid-template-columns:repeat(4,1fr);grid-template-rows:repeat(3,1fr);gap:6px;max-width:330px;margin:8px auto;aspect-ratio:4/3}.cube-face{display:grid;grid-template-columns:repeat(3,1fr);gap:2px;padding:3px;background:#344437;border-radius:3px;position:relative}.sticker{border-radius:2px;display:grid;place-items:center;font-size:8px;color:#26382d99}.cube-face[data-face=U]{grid-area:1/2}.cube-face[data-face=L]{grid-area:2/1}.cube-face[data-face=F]{grid-area:2/2}.cube-face[data-face=R]{grid-area:2/3}.cube-face[data-face=B]{grid-area:2/4}.cube-face[data-face=D]{grid-area:3/2}.move-history{letter-spacing:1px;min-height:22px;font-family:monospace;font-size:11px;color:#7b826c;margin:10px 0 0;overflow-wrap:anywhere}dialog{border:1px solid var(--line);border-radius:15px;max-width:680px;width:calc(100% - 32px);max-height:88vh;background:var(--paper);color:var(--ink);padding:25px}dialog::backdrop{background:#1b2d2680}dialog p{font-size:12px;line-height:1.8;color:var(--muted)}.config-note{padding:12px;background:#eef0e4;border-radius:8px}.profile{border-top:1px solid var(--line);padding:13px 0}.profile strong{font-size:12px}.profile-inputs{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:10px}.profile-inputs input{width:100%;min-width:0;font-size:12px}#config-error{color:#ae4d37;font-size:12px;line-height:1.8}#toast{position:fixed;bottom:20px;left:50%;transform:translateX(-50%);background:#304235;color:white;padding:14px 22px;border-radius:10px;z-index:10;max-width:90vw;font-size:13px}.table-wrap{overflow-x:auto}@media(min-width:1450px){main{padding:0 45px}.scene{min-height:280px}}@media(max-width:950px){main{padding:0 24px}.intro-symbol{display:none}.control-panel{flex-wrap:wrap}.players{gap:10px}.scene{padding:8px;min-height:180px}.bottom-grid{grid-template-columns:1fr}.identity strong{font-size:11px}.player-header{padding:12px 10px}.inventory{flex-wrap:wrap;gap:7px}.stat strong{font-size:16px}}@media(max-width:650px){header{padding:0 18px;height:65px}.brand{font-size:13px;gap:7px}.local{display:none}main{padding:0 16px}.intro{padding:28px 0 22px}.eyebrow{font-size:9px}.intro p{font-size:12px}.game-select{gap:8px}.game{padding:12px;gap:9px}.game-icon{width:31px;height:35px;font-size:23px}.game strong{font-size:13px}.game small{font-size:8px;letter-spacing:0}.game-arrow{display:none}.control-panel{padding:14px}.fields{gap:10px;width:100%}.fields label:first-child{width:100%}.fields select{width:100%}.buttons{width:100%;justify-content:flex-end}.arena-heading{align-items:flex-start;gap:10px;flex-direction:column}.players{grid-template-columns:1fr}.scene{min-height:260px}.player-header{padding:15px}.identity strong{font-size:14px}.tile{font-size:18px}.pawn{font-size:15px}.cube-net{max-width:300px}.stats{padding:15px}.stat strong{font-size:21px}.bottom-grid{margin-top:16px}.results,.rules{padding:15px}footer{gap:15px;line-height:1.6;font-size:9px}.profile-inputs{grid-template-columns:1fr}}
:root .viewer-label{font-size:12px;color:var(--muted)}.record-fact{display:flex;flex-direction:column;gap:12px;padding:0 5px;justify-content:center}.record-fact small{font-size:11px;color:var(--muted)}.record-fact strong{font-size:13px;font-weight:500}#race-picker{min-width:230px}.replay label{white-space:nowrap}.replay input{min-width:0}.empty{color:var(--muted);font-size:13px;grid-column:1/-1;padding:40px 0}.players{grid-template-columns:repeat(auto-fit,minmax(280px,1fr))}@media(max-width:650px){.viewer-label{font-size:10px!important}#race-picker{min-width:0}.record-fact{padding:0 0 0 3px}.players{grid-template-columns:1fr}.buttons label{margin-right:auto}}
.game-select{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.game{padding:15px}.game small{font-size:9px}.skill-caption{font-size:12px;color:var(--green);margin:0 0 14px}.game-map{max-width:310px;gap:2px}.tile.unknown{background:#d8ded2;color:#afb8a3}.tile.wall{background:#677360}.tile.floor{background:#e4e8d6}.tile.keyA,.tile.keyB{background:#edda87;color:#71652d;font-weight:bold}.tile.doorA,.tile.doorB{background:#aa8f65;color:#fff;font-size:11px}.tile.trap{background:#e7b9a2;color:#9c533f}.tile.exit{background:#78a886;color:white}.tile.stone{background:#bac0b3}.tile.goal{box-shadow:inset 0 0 0 2px #86aa69;background:#e2eac5}.tile.box{color:#8c5e32;background:#dbc596;font-size:20px}.tile.box.goal{background:#a8c68d;color:#3d6d3f}.tile.route{background:#d4cbb4}.tile.build-site{background:#c2d5b1;color:#426342;font-size:11px}.enemy{background:#b76d57;color:white;border-radius:5px;width:80%;height:80%;display:grid;place-items:center}.camp-mark{position:absolute;right:0;bottom:0;font-size:11px}.factory-machines{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}.machine{background:#e0e6d8;border:1px solid #c7d3bd;border-radius:7px;padding:12px 5px;text-align:center;min-width:0}.machine>span{display:block;font-size:24px;color:#809177}.machine strong{display:block;font-size:11px;margin:7px 0}.machine small{display:block;font-size:9px;color:#728169;min-height:25px}.machine.working{background:#d7e3bc;border-color:#a7bc7d}.machine.working>span{color:#577b3d}.machine .meter{margin-top:6px}.production-chain{font-size:11px;color:#6d7e62;text-align:center;line-height:1.9;padding:11px 0}.order{padding:9px;background:#f7f8f0;border:1px solid #d9dfce;border-radius:7px;margin-bottom:6px;display:flex;flex-direction:column;gap:5px}.order>span{font-size:9px;color:#819074}.order strong{font-size:10px;font-weight:500}.order small{font-size:9px;color:#8a8e6e}.order.delivered{background:#dce9c7}.order.missed{background:#f0e1d7}.stock-list{line-height:1.8;display:block;min-height:53px}.scene{min-height:280px}.scene .pawn{font-size:11px}.scene .tile{font-size:13px}@media(max-width:950px){.game-select{grid-template-columns:repeat(3,minmax(0,1fr))}.game-icon{width:34px;height:36px;font-size:23px}.game strong{font-size:14px}.game{gap:9px}}@media(max-width:650px){.game-select{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.game{padding:12px;gap:8px}.game strong{font-size:12px}.game small{font-size:8px}.game-icon{width:27px;height:32px;flex-shrink:0}.scene{min-height:280px}.scene .tile{font-size:16px}.scene .tile.doorA,.scene .tile.doorB{font-size:11px}}
.island-stage{position:relative;width:100%;max-width:480px;margin:auto;overflow:hidden;border:4px solid #253e3b;border-radius:9px;background:#142d32;box-shadow:0 4px 0 #152e2b}.island-canvas{display:block;width:100%;height:auto;image-rendering:pixelated}.island-hud{position:absolute;left:8px;right:8px;top:8px;font:700 11px monospace;letter-spacing:1px;color:#f8edcb;text-shadow:1px 2px #102b2a;pointer-events:none}.island-hud span{float:right}.player:has(.island-stage) .stats{grid-template-columns:repeat(4,1fr)}.player:has(.island-stage) .scene{padding:10px;min-height:0}.player:has(.island-stage) .stat{padding:8px}.player:has(.island-stage) .scene-caption{margin-top:12px}
/* Shared spectator art: readable silhouettes, quiet ground, consistent scale. */
.scene{background:#edf0ec;padding:12px;min-height:0}.board-frame{background:#273c40;padding:5px;border-radius:10px;max-width:360px;margin:auto;box-shadow:0 3px 0 #c9d2ca}.game-map{max-width:none;gap:0}.scene .tile{border-radius:0;background:#dce4dc;overflow:visible;font-size:11px}.tile.floor{background:#e7e9df;box-shadow:inset 0 0 0 1px #d5dbd0}.tile.wall{background:#526465;box-shadow:inset 0 3px #647778,inset 0 -3px #3f5357}.tile.unknown{background:#253c42;box-shadow:none}.tile.trap,.tile.keyA,.tile.keyB,.tile.keyC,.tile.doorA,.tile.doorB,.tile.doorC,.tile.exit{background:#e7e9df}.art-prop{display:block;width:100%;height:100%;background-image:url('/assets/arena-props.png');background-size:400% 400%;background-position:calc(var(--sx)*100%/3) calc(var(--sy)*100%/3);image-rendering:pixelated;pointer-events:none}.actor{position:absolute;inset:-6% -6% 0;z-index:3;background:url('/assets/island-atlas.png') 0 100%/400% 400%;image-rendering:pixelated;filter:drop-shadow(0 1px 1px #183d42)}.tile.goal{background:#c3dfca;box-shadow:inset 0 0 0 2px #669774}.tile.goal:empty::after{content:'';width:35%;height:35%;border:2px solid #609270;border-radius:50%}.tile.box{background:#e7e9df;box-shadow:inset 0 0 0 1px #d5dbd0}.tile.box.goal{background:#c3dfca;box-shadow:inset 0 0 0 2px #669774}.object-label{position:absolute;right:0;bottom:0;background:#244247;color:white;font:700 9px monospace;border-radius:3px;padding:1px 3px;z-index:2}.enemy-count:empty{display:none}.tile.grass{background:#b7ceae}.tile.route{background:#dfd4b7;box-shadow:inset 0 0 0 1px #c8c2a6}.tile.build-site{background:#a0bdab;box-shadow:inset 0 0 0 2px #719587}.site-label{color:#365854;font:10px monospace}.entry-marker{font-size:22px;color:#79663f}.slow-tower{filter:hue-rotate(40deg)}.scene-legend{display:flex;justify-content:center;flex-wrap:wrap;gap:10px;margin:10px auto 0;color:#52696a;font-size:10px}.scene-legend>span{display:flex;align-items:center;gap:3px}.scene-legend .art-prop{width:20px;height:20px}.machine{background:#e7ece9;padding:12px 5px;border-color:#cbd6d0;position:relative}.machine>.art-prop{width:64px;height:64px;max-width:100%;margin:auto}.machine.working{background:#deeddf;border-color:#8cad93}.machine small{line-height:1.5}.factory-machines{gap:6px}.production-chain{letter-spacing:2px;padding:14px 0}.order{background:#fafbf7}.order.delivered{border-left:3px solid #649370}.order.missed{border-left:3px solid #bd7d68}.cube-stage{padding:16px 2px;border:1px solid #d4ded9;background:#e5ebe8;border-radius:9px}.cube-net{gap:7px;max-width:340px;margin:0 auto}.cube-face{padding:3px;gap:2px;background:#2a3c41;border-radius:5px;box-shadow:0 3px 0 #263b3f33}.sticker{border-radius:2px;box-shadow:inset 0 1px 0 #ffffff60;font:700 11px monospace;color:#20373f}.scene-caption{color:#536a65;gap:8px;line-height:1.5}.island-stage{border-width:3px;border-radius:9px;box-shadow:0 3px 0 #c9d2ca}.island-hud{letter-spacing:.4px;font-size:10px}.stats{gap:9px}.inventory{gap:6px;flex-wrap:wrap;line-height:1.6}.event{min-height:52px}.game-icon{font-size:23px;width:36px;height:36px}.intro-symbol{display:none}.scene .tile .art-prop{position:absolute;inset:0}.player:has(.island-stage) .stat{padding:0}.scene:has(.factory-machines){padding:14px}.player-header .status{max-width:70px;white-space:normal;text-align:right}@media(max-width:650px){.scene{margin:0 12px}.machine>.art-prop{width:72px;height:72px}.scene .tile{font-size:12px}.cube-stage{padding:18px 4px}.scene-legend{gap:12px}.board-frame{max-width:380px}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto}}
/* Keep replay frames geometrically stable; tile contents must never size tracks. */
html{scrollbar-gutter:stable}
.players{align-items:start;overflow-anchor:none}
.board-frame{width:100%}
.map.game-map{aspect-ratio:1/1;grid-auto-rows:minmax(0,1fr);min-width:0;min-height:0}
.scene .tile{min-width:0;min-height:0;overflow:hidden}
.scene .tile .art-prop{width:100%;height:100%;inset:0}
.scene .actor{inset:0}
.player-header{height:74px;min-height:74px}
.identity{flex:1;overflow:hidden}
.identity>span:last-child{min-width:0}
.identity strong,.identity small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.player-header .status{flex:0 0 64px;width:64px;max-width:64px;line-height:16px}
.scene-caption{height:30px;min-height:30px;align-items:center;font-variant-numeric:tabular-nums;white-space:nowrap}
.scene-caption>span{min-width:0;overflow:hidden;text-overflow:ellipsis}
.scene-legend{height:24px;min-height:24px;margin-top:10px;flex-wrap:nowrap}
.stats{height:84px;min-height:84px;font-variant-numeric:tabular-nums}
.inventory{height:54px;min-height:54px;align-content:start;overflow:auto;margin:0}
.event{height:76px;min-height:76px;overflow:auto;overflow-anchor:none}
.machine{height:170px;min-height:170px}
.machine strong{white-space:nowrap}
.machine small{height:30px;min-height:30px;overflow:hidden}
.machine .wear-label{height:18px;min-height:18px;white-space:nowrap}
.machine .meter{margin-top:4px}
.order{height:76px;min-height:76px;overflow:auto}
.order.delivered,.order.missed{padding-left:7px}
.replay .primary{min-width:124px;width:124px;text-align:center;padding-left:10px;padding-right:10px}
#replay-label{min-width:65px;font-variant-numeric:tabular-nums}
#round-label{font-variant-numeric:tabular-nums}
@media(max-width:650px){.player-header{height:74px;min-height:74px}.machine{height:178px;min-height:178px}.scene-legend{gap:9px}.scene-caption{font-size:10px}.inventory{height:60px;min-height:60px}}
#play{width:124px;min-width:124px;text-align:center;padding-left:10px;padding-right:10px}
.avatar{flex-shrink:0}
.object-label{line-height:12px;max-width:100%}
.event,.inventory,.order{scrollbar-gutter:stable}
/* Fixed roster: three seats per desktop row, at most nine seats. */
.players{grid-template-columns:repeat(3,minmax(0,1fr))}
@media(max-width:1000px){.players{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){.players{grid-template-columns:1fr}}
/* Reserve side columns for future ads without showing placeholders or loading ad code. */
.page-shell{max-width:1800px;margin:auto}
.ad-rail{display:none}
@media(min-width:1480px){
  .page-shell{display:grid;grid-template-columns:minmax(0,160px) minmax(0,1400px) minmax(0,160px);gap:20px;padding:0 20px}
  .page-shell main{grid-column:2;min-width:0;width:100%;padding-left:clamp(16px,2vw,32px);padding-right:clamp(16px,2vw,32px)}
  .ad-rail{display:block;visibility:hidden}
}
