:root{--paper:#faf9f3;--ink:#344039;--green:#536d55;--line:#e2e5d9;--muted:#88917f;--serif:Georgia,'Songti SC','STSong',serif}*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font-family:-apple-system,BlinkMacSystemFont,'PingFang SC',sans-serif;font-size:13px}button,input,select{font:inherit}button{cursor:pointer;border:1px solid var(--line);background:#f9f9f2;color:var(--ink);border-radius:5px;padding:9px 12px;transition:background .15s}button:hover:not(:disabled){background:#e9eddf}button:disabled{opacity:.4;cursor:not-allowed}button:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid #629064;outline-offset:2px}header{height:91px;display:flex;align-items:center;justify-content:space-between;padding:0 36px;border-bottom:1px solid var(--line)}.brand{color:var(--ink);text-decoration:none;font-family:var(--serif);font-size:29px;display:flex;gap:17px;align-items:center;letter-spacing:4px}.brand-mark{font-size:36px;color:var(--green)}.brand small{display:block;font-family:Arial,sans-serif;font-size:9px;letter-spacing:2px;margin-top:6px;color:var(--muted)}.room{display:flex;gap:14px;align-items:center;font-size:12px;color:#83917a}.room i{width:6px;height:6px;border-radius:100%;background:#78906b}.room span{opacity:.4}.room b{font-weight:400}nav{display:flex;align-items:center;gap:10px}nav span{font-size:10px;color:var(--muted)}nav button{border:0;background:none;font-size:11px}main{display:grid;grid-template-columns:235px minmax(400px,1fr) 285px;min-height:calc(100dvh - 91px)}aside{padding:30px 24px}.players-panel{border-right:1px solid var(--line);display:flex;flex-direction:column}.action-panel{border-left:1px solid var(--line)}.eyebrow{font-size:9px;font-family:Arial,sans-serif;color:#919b89;letter-spacing:3px;margin-bottom:17px}h1,h2,h3{font-family:var(--serif);font-weight:400}h1{font-size:23px;margin:0}h2{font-size:23px;margin:0 0 12px}h3{font-size:15px}.muted{font-size:11px;color:var(--muted);line-height:1.8}.player{display:flex;gap:10px;align-items:center;padding:14px 10px;margin-top:10px;border:1px solid transparent;border-radius:7px}.player.active{border-color:#cdd8c0;background:#edf0e4}.player .piece{font-size:29px;color:var(--player)}.player .identity{flex:1;min-width:0}.player strong{font-size:12px;font-weight:500;overflow-wrap:anywhere}.player small{display:block;color:var(--muted);font-size:10px;margin-top:5px;line-height:1.6}.player .score{font-family:var(--serif);font-size:25px}.player .score small{display:inline;font-size:10px}.badge{font-size:9px;color:#a99569;margin-left:6px}.sidebar-foot{margin-top:auto;padding-top:35px;color:#a39b7a;font-size:10px}#lobbyControls{margin-top:24px}#lobbyControls button{width:100%;margin:5px 0}.play-area{padding:30px 25px}.board-heading{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:24px}.pill{font-size:10px;white-space:nowrap;border-radius:5px;padding:8px 10px;background:#eef0e7;color:#77856b}.board-toolbar{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px;color:#809076;font-size:11px}.board-toolbar>div{display:flex;align-items:center;gap:7px}.board-toolbar button{padding:4px 8px}.board-toolbar span{max-width:75%}#zoomLabel{font-size:9px}#boardViewport{position:relative;height:min(68vh,760px);min-height:480px;border:1px solid #dce3d2;border-radius:9px;overflow:hidden;background:radial-gradient(ellipse at 50% 40%,#dfe9df 0%,#e5e9dd 60%,#edf0e4 100%);touch-action:none}#board{width:100%;height:100%;display:block;user-select:none}.compass{position:absolute;top:27px;right:24px;color:#96a38a;text-align:center;font-size:11px;pointer-events:none}.compass:first-line{font-size:9px}.board-caption{position:absolute;top:24px;left:20px;color:#96a38a;font-size:8px;letter-spacing:2px;pointer-events:none}.board-help{font-size:10px;color:#97a18e;margin:12px 0;text-align:right}.terrain{filter:none}.number{fill:#faf3dc;stroke:#b1a586;stroke-width:1}.number-text{font-family:Georgia,serif;fill:#4c4938;text-anchor:middle;font-size:18px;font-weight:bold;pointer-events:none}.number-text.hot{fill:#bb553c}.dots{fill:#85765a;text-anchor:middle;font-size:9px;letter-spacing:1px;pointer-events:none}.tile-label{fill:#444c3c;paint-order:stroke;stroke:#ffffff95;stroke-width:2px;text-anchor:middle;font-size:10px;pointer-events:none}.edge-hit{stroke:transparent;stroke-width:19;cursor:pointer}.edge-hit.legal{stroke:#fff8ce;stroke-width:7;stroke-linecap:round;filter:drop-shadow(0 0 3px #426940);animation:glow 1.6s infinite}.vertex-hit{fill:transparent;cursor:pointer}.vertex-hit.legal{fill:#fff6c9;stroke:#567550;stroke-width:2;animation:glow 1.6s infinite}.robber-hit{fill:#f4e9a348;stroke:#fff1b5;stroke-width:3;cursor:pointer}.building{stroke:#fff5df;stroke-width:1.5;filter:saturate(1.6) drop-shadow(1px 2px 2px #24372d66);pointer-events:none}.road{stroke-linecap:round;stroke-width:7;filter:saturate(1.6) drop-shadow(0 1px 1px #24372d70);pointer-events:none}.port{fill:#f7f5e8;stroke:#a4b39f;stroke-width:1}.port-label{font-size:10px;fill:#5b6853;text-anchor:middle;pointer-events:none}@keyframes glow{50%{opacity:.55}}.primary{display:block;width:100%;background:var(--green);color:white;border-color:var(--green);padding:12px;margin-top:12px}.primary:hover:not(:disabled){background:#405c44}.secondary{display:block;width:100%;margin-top:9px}.action-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin:15px 0}.action-grid button{padding:12px 6px;font-size:12px}.action-grid button.selected{border-color:var(--green);background:#e7ecdc}.action-grid small{display:block;font-size:9px;color:#8c947e;margin-top:4px}.dice-panel{display:flex;gap:10px;align-items:center;justify-content:center;background:#eef0e4;border-radius:8px;margin:18px 0;padding:17px}.die{display:grid;place-items:center;width:44px;height:44px;font-size:25px;font-family:Georgia;border:1px solid #cbd3bd;border-radius:7px;background:#faf8ef;box-shadow:0 2px 2px #33402a15}.activity{margin-top:25px;border-top:1px solid var(--line);padding-top:14px}.activity-heading{display:flex;align-items:center;justify-content:space-between}.activity-heading h3{margin:0}.activity-heading span{font-size:8px;color:#98a18e;letter-spacing:2px}#log{max-height:210px;overflow:auto;margin-top:15px}#log>div{font-size:10px;line-height:1.8;color:#89917f;padding-left:10px;border-left:2px solid #dce2d2;margin:10px 0}.rule-note{background:#f3f1e7;border:1px solid #e5e1d1;padding:12px;margin-top:23px;color:#959076;font-size:10px;line-height:1.9;border-radius:5px}#handPanel{margin-top:20px}.hand-heading{display:flex;justify-content:space-between;font-size:11px;color:#78846e;margin-bottom:10px}.resources{display:grid;grid-template-columns:repeat(5,1fr);gap:8px}.resource{background:#f1f2e7;border:1px solid #dbe0ce;border-radius:7px;text-align:center;overflow:hidden;padding-bottom:8px}.resource-image{height:45px;background-image:url('./assets/terrain.png');background-size:300% 200%;filter:none;opacity:1}.resource strong{display:block;font-family:var(--serif);font-size:22px;margin-top:5px}.resource small{font-size:10px;color:#7a866e}.cards{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.cards button{font-size:11px;min-height:40px}.cards small{display:block;font-size:9px;color:#8d967f}.offer{padding:12px;background:#f4efe0;border:1px solid #e3d8b7;border-radius:6px;font-size:11px;line-height:1.8}.offer button{margin-top:6px;width:100%}.bank-status{font-size:9px;margin-top:14px;color:#8b9682;line-height:1.8}dialog{border:1px solid var(--line);border-radius:12px;padding:32px;width:min(570px,calc(100vw - 28px));max-height:85dvh;overflow:auto;background:var(--paper);color:var(--ink);box-shadow:0 25px 80px #26362b30}dialog::backdrop{background:#29372d55;backdrop-filter:blur(3px)}dialog p{line-height:1.8;color:#8a9380;font-size:12px}dialog small{line-height:1.8;color:#93977f;font-size:10px}dialog input,dialog select{padding:11px;border:1px solid #d9dfce;border-radius:5px;background:#f6f7ee;color:var(--ink);width:100%}dialog li{font-size:12px;line-height:1.9;margin:8px 0}dialog ol{padding-left:18px}.close{position:absolute;right:14px;top:10px;border:0;background:none;font-size:24px}.error{color:#ba553f!important}.choice-row{display:flex;align-items:center;gap:14px;margin:12px 0}.choice-row label{flex:1}.choice-row input{width:100px}.choice-columns{display:grid;grid-template-columns:1fr 1fr;gap:18px}.choice-columns h3{font-size:13px}.toast{position:fixed;left:50%;bottom:26px;transform:translateX(-50%);background:#344936;color:white;padding:12px 22px;border-radius:7px;z-index:99;opacity:0;pointer-events:none;max-width:90%;font-size:12px}.toast.show{opacity:1}.victory{padding:20px;text-align:center;background:#efead8;border:1px solid #ded5b9;border-radius:8px}.victory h2{margin:7px 0}.kick{font-size:9px;padding:3px 5px;float:right}.empty-island{fill:#e6ecdb;stroke:#b8c8ab;stroke-width:1}
@media(min-width:1600px){main{grid-template-columns:265px minmax(500px,1fr) 320px}.play-area{padding:36px}#boardViewport{height:72vh}}@media(max-width:1100px){main{grid-template-columns:190px minmax(320px,1fr) 240px}aside{padding:25px 15px}.play-area{padding:25px 16px}h1{font-size:19px}.board-heading{flex-wrap:wrap}}@media(max-width:850px){header{height:72px;padding:0 18px}.brand{font-size:23px}.brand-mark{font-size:29px}.brand small{font-size:7px}.room{font-size:10px;gap:7px}main{grid-template-columns:1fr 245px}.players-panel{grid-column:1/-1;display:block;border:0;padding:15px 18px}.players-panel>.eyebrow,.players-panel>h2,.players-panel>.muted,.sidebar-foot{display:none}#players{display:flex;overflow:auto;gap:8px}.player{min-width:135px;padding:8px;margin:0}.player .piece{font-size:24px}.player .score{font-size:20px}#lobbyControls{display:flex;gap:10px;margin-top:12px}#lobbyControls button{width:auto;flex:1;margin:0}.play-area{padding-top:12px}.action-panel{padding-top:12px}.eyebrow{font-size:8px}#boardViewport{height:60vh;min-height:430px}.board-caption{font-size:6px;letter-spacing:1px}}@media(max-width:590px){header{height:68px;padding:0 13px}.room{display:none}nav span{font-size:9px}main{display:flex;flex-direction:column}.play-area{padding:12px}.play-area>.eyebrow{display:none}.board-heading{margin-bottom:13px;gap:8px}h1{font-size:17px}.pill{padding:6px;font-size:9px}.board-toolbar{font-size:10px}#boardViewport{min-height:390px;height:55dvh}.action-panel{border:0;padding:8px 15px 24px}.action-panel>.eyebrow{display:none}.action-panel h2{font-size:20px}.action-grid{grid-template-columns:repeat(4,1fr);margin:10px 0}.action-grid button{padding:10px 3px;font-size:11px}.dice-panel{padding:8px;margin:10px 0}.die{width:34px;height:34px;font-size:20px}.resources{gap:5px}.resource-image{height:32px}.resource strong{font-size:19px}.activity{margin-top:18px}#log{max-height:130px}.rule-note{margin-top:15px}.board-help{font-size:9px}.choice-row{gap:6px}.choice-row input{width:65px}dialog{padding:25px}.choice-columns{gap:10px}}

#mobileNav{display:none}.player-name{display:flex;align-items:center;min-width:0}.player-name strong{min-width:0}.player .piece,.player .score{flex-shrink:0}.detail-log{padding-left:12px;border-left:2px solid #dce2d2}#detailsContent .player{margin-top:8px}#detailsContent .cards button{min-height:48px}#detailsContent p{line-height:1.9}#detailsDialog .close,#choiceDialog .close{min-width:44px;min-height:44px;padding:5px}
@media(max-width:850px),(max-width:1000px) and (max-height:500px){
 body.in-game{position:fixed;inset:0;overflow:hidden;height:100dvh;--game-header:calc(50px + env(safe-area-inset-top));--game-footer:calc(208px + env(safe-area-inset-bottom));--player-strip:64px}
 body.in-game header{height:var(--game-header);padding:env(safe-area-inset-top) 12px 0;gap:10px}
 body.in-game .brand{font-size:21px;gap:9px;letter-spacing:2px}body.in-game .brand-mark{font-size:25px}body.in-game .brand small{display:none}body.in-game .room{display:none}body.in-game header nav{gap:4px}body.in-game header nav button{min-height:44px;padding:8px;font-size:11px}body.in-game header nav span{font-size:10px}
 body.in-game main{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:var(--player-strip) minmax(0,1fr) var(--game-footer);height:calc(100dvh - var(--game-header));min-height:0;overflow:hidden}
 body.in-game .players-panel{grid-column:1;grid-row:1;min-width:0;height:var(--player-strip);padding:5px 8px;overflow:hidden;border-bottom:1px solid var(--line)}body.in-game .players-panel>.eyebrow,body.in-game .players-panel>h2,body.in-game .players-panel>.muted,body.in-game .sidebar-foot{display:none}
 body.in-game #players{display:flex;align-items:stretch;height:100%;gap:6px;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;overscroll-behavior-x:contain}body.in-game #players::-webkit-scrollbar{display:none}
 body.in-game #players .player{padding:5px 7px;gap:6px;min-width:150px;max-width:190px;margin:0;flex-shrink:0}body.in-game #players .piece{font-size:22px}body.in-game #players .identity{min-width:0;flex:1}body.in-game #players .player-name{white-space:nowrap}body.in-game #players strong{font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}body.in-game #players small{font-size:9px;margin-top:3px;white-space:nowrap}body.in-game #players .badge{font-size:8px;margin-left:4px;flex-shrink:0}body.in-game #players .score{font-size:22px;white-space:nowrap}body.in-game #players .score small{font-size:8px}body.in-game #players .player-metrics{display:none}body.in-game #lobbyControls{display:none}
 body.in-game .play-area{grid-column:1;grid-row:2;min-width:0;min-height:0;padding:0 7px;display:grid;grid-template-rows:38px minmax(0,1fr) 58px;overflow:hidden}body.in-game .play-area>.eyebrow,body.in-game .board-heading,body.in-game .board-help{display:none}
 body.in-game .board-toolbar{margin:0;min-width:0;font-size:10px;gap:5px;overflow:hidden}body.in-game #turnLabel{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:none}body.in-game .board-toolbar>div{gap:1px;flex-shrink:0}body.in-game .board-toolbar button{min-width:36px;min-height:36px;padding:5px 7px}body.in-game #zoomLabel{width:30px;text-align:center;font-size:9px}
 body.in-game #boardViewport{height:auto;min-height:0;width:100%;border-radius:7px;background:radial-gradient(ellipse at 50% 40%,#dfe9df,#edf0e4);overflow:hidden}body.in-game .board-caption,body.in-game .compass{display:none}
 body.in-game #handPanel{margin:0;min-width:0;min-height:0;align-self:center;padding:4px 0}body.in-game #handPanel .hand-heading,body.in-game #handPanel .cards,body.in-game #handPanel .bank-status{display:none}body.in-game #handPanel .resources{gap:5px;height:49px}body.in-game #handPanel .resource{position:relative;padding:4px 0 3px;isolation:isolate}body.in-game #handPanel .resource-image{position:absolute;inset:0;height:100%;z-index:-1;opacity:.17;filter:none}body.in-game #handPanel .resource strong{font-size:19px;line-height:22px;margin:0}body.in-game #handPanel .resource small{font-size:9px;white-space:nowrap;color:#5f6c56}
 body.in-game .action-panel{grid-column:1;grid-row:3;display:grid;grid-template-rows:22px 19px minmax(0,1fr) 44px;gap:2px;padding:7px 9px calc(5px + env(safe-area-inset-bottom));min-height:0;min-width:0;border:0;border-top:1px solid #d5ddcb;border-radius:10px 10px 0 0;background:#faf9f3;box-shadow:0 -3px 14px #33472d0b;overflow:hidden}body.in-game .action-panel>.eyebrow,body.in-game .action-panel>.activity,body.in-game .action-panel>.rule-note{display:none}
 body.in-game #actionTitle{margin:0;font-size:17px;line-height:22px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}body.in-game #actionHint{margin:0;font-size:10px;line-height:18px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 body.in-game #actions{display:grid;grid-template-columns:1fr 1fr;align-content:start;gap:5px;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding-right:2px}body.in-game #actions>.action-grid,body.in-game #actions>.primary,body.in-game #actions>.offer,body.in-game #actions>.rule-note,body.in-game #actions>.muted,body.in-game #actions>.victory{grid-column:1/-1}body.in-game #actions:has(.action-grid){grid-template-columns:1fr 1fr 1fr}body.in-game #actions:has(.action-grid)>.action-grid{grid-column:1/-1}body.in-game #actions:has(.action-grid)>.primary{grid-column:auto;font-size:11px}
 body.in-game #actions button{min-height:44px;margin:0;padding:8px 5px;font-size:11px;touch-action:manipulation}body.in-game #actions .action-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;margin:0}body.in-game #actions .action-grid small{font-size:8px;margin-top:3px}body.in-game #actions .primary{font-size:12px}body.in-game #actions .dice-panel{display:none}body.in-game #actions>.rule-note{margin:0;padding:7px 10px;font-size:11px}body.in-game #actions>.muted{margin:3px 0}body.in-game #actions .offer{padding:8px;font-size:11px}body.in-game #actions .victory{padding:8px}body.in-game #actions .victory h2{font-size:18px;margin:3px 0}body.in-game #actions .victory p{margin:3px}
 body.in-game #mobileNav{display:flex;gap:6px;align-items:stretch;margin:0;border-top:1px solid #e5e8dc;padding-top:3px;min-width:0}body.in-game #mobileNav button{flex:1;min-width:0;min-height:40px;border:0;background:#eef0e6;font-size:11px;padding:5px;touch-action:manipulation}body.in-game #mobileNav span{display:inline-block;margin-left:3px;padding:1px 4px;border-radius:4px;background:#dfe6d6;font-size:10px}body.in-game #toast{bottom:calc(var(--game-footer) + 65px);box-shadow:0 2px 10px #24372d33}
 body dialog{max-height:calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));padding:25px 20px;overscroll-behavior:contain}body dialog input,body dialog select{font-size:16px;min-height:44px}body dialog button{min-height:44px}body .choice-row input{width:76px}body .choice-columns{gap:12px}body .choice-columns label{font-size:12px}body #detailsDialog{align-self:end;margin:0 auto env(safe-area-inset-bottom);width:100%;max-width:600px;max-height:75dvh;border-radius:16px 16px 0 0;padding:24px 18px}body #detailsContent .player-name{white-space:normal}body #detailsContent .player{min-width:0}body #detailsContent .identity{min-width:0}body #detailsContent strong{overflow-wrap:anywhere}
}
@media(max-width:850px) and (max-height:720px) and (orientation:portrait){body.in-game{--game-footer:calc(188px + env(safe-area-inset-bottom));--player-strip:56px}body.in-game .play-area{grid-template-rows:34px minmax(0,1fr) 54px}body.in-game .action-panel{grid-template-rows:20px 17px minmax(0,1fr) 42px;padding-top:5px;gap:1px}body.in-game #actionTitle{font-size:15px}body.in-game #actionHint{font-size:9px}}
@media(max-width:1000px) and (max-height:500px) and (orientation:landscape){body.in-game{--game-header:calc(44px + env(safe-area-inset-top));--player-strip:47px}body.in-game main{grid-template-columns:minmax(0,1fr) 240px;grid-template-rows:var(--player-strip) minmax(0,1fr);padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right);height:calc(100dvh - var(--game-header) - env(safe-area-inset-bottom))}body.in-game .players-panel{grid-column:1/-1}body.in-game .play-area{grid-row:2;grid-column:1;grid-template-rows:32px minmax(0,1fr) 51px;padding:0 6px 3px}body.in-game .action-panel{grid-row:2;grid-column:2;grid-template-rows:22px 19px minmax(0,1fr) 44px;border-left:1px solid var(--line);border-radius:0;padding:6px 9px}body.in-game #players .player{min-width:150px}body.in-game #players .piece{font-size:19px}body.in-game #players .score{font-size:19px}body.in-game #handPanel .resources{height:46px}body.in-game #toast{bottom:55px}}
@media(max-width:850px),(max-width:1000px) and (max-height:500px){body.in-game #actions .action-grid button{height:44px;min-width:0;padding:5px 2px;white-space:nowrap}body.in-game #actions .action-grid small{font-size:7.5px;white-space:nowrap}body.in-game #actions:has(.action-grid)>.secondary,body.in-game #actions:has(.action-grid)>.primary{white-space:nowrap;font-size:10px;padding:7px 3px}}
@media(max-width:850px){body:not(.in-game) header{height:60px;padding:0 14px}body:not(.in-game) .brand{font-size:23px;gap:10px}body:not(.in-game) main{display:flex;flex-direction:column;min-height:calc(100dvh - 60px)}body:not(.in-game) .players-panel{padding:12px 14px}body:not(.in-game) #players{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;overflow:visible}body:not(.in-game) #players .player{min-width:0;max-width:none;padding:8px 6px;gap:6px}body:not(.in-game) #players .player-name{white-space:nowrap}body:not(.in-game) #players strong{font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}body:not(.in-game) #players .piece{font-size:24px}body:not(.in-game) #players .badge{font-size:8px;flex-shrink:0}body:not(.in-game) #players .kick{float:none;margin-top:4px}body:not(.in-game) #lobbyControls{display:flex;gap:6px;margin-top:10px}body:not(.in-game) #lobbyControls button{min-height:44px;font-size:11px;padding:8px 4px}body:not(.in-game) .play-area{padding:7px 14px}body:not(.in-game) .play-area>.eyebrow,body:not(.in-game) .board-toolbar,body:not(.in-game) .board-caption,body:not(.in-game) .compass,body:not(.in-game) .board-help{display:none}body:not(.in-game) .board-heading{margin-bottom:8px;gap:6px}body:not(.in-game) .board-heading h1{font-size:16px}body:not(.in-game) #boardViewport{min-height:0;height:155px}body:not(.in-game) .action-panel{padding:14px;border:0}body:not(.in-game) .action-panel>.eyebrow,body:not(.in-game) .action-panel>.rule-note{display:none}body:not(.in-game) .action-panel h2{font-size:19px;margin:0}body:not(.in-game) .action-panel .activity{margin-top:14px;padding-top:10px}body:not(.in-game) #log{max-height:100px}body:not(.in-game) #handPanel{margin:0}}
.mobile-label{display:none}@media(max-width:850px),(max-width:1000px) and (max-height:500px){body.in-game .desktop-label{display:none}body.in-game .mobile-label{display:inline}body.in-game #actions:has(.action-grid){grid-template-columns:repeat(3,minmax(0,1fr))}body.in-game #actions button{min-width:0}body.in-game #actions .action-grid small{font-size:8px}body.in-game #actions .action-grid button{font-size:11px}}
@media(max-width:850px),(max-width:1000px) and (max-height:500px){body #choiceTitle{padding-right:28px;font-size:20px;line-height:1.5;margin-top:4px}}
.player .piece{filter:saturate(1.6)}
#audioButton{font-size:20px;min-width:36px;min-height:44px;padding:4px 7px}#audioButton.audio-muted{opacity:.5}
.audio-section{border:1px solid var(--line);border-radius:9px;padding:14px;margin:12px 0;background:#eef0e633}
.audio-toggle,.audio-volume-label{display:flex;justify-content:space-between;align-items:center;gap:12px}.audio-toggle{font-size:14px}.audio-volume-label{font-size:12px;margin-top:14px}
body .audio-toggle input[type=checkbox]{width:24px;height:24px;min-height:24px;accent-color:#536d55;padding:0}
body .audio-section input[type=range]{width:100%;height:38px;min-height:38px;padding:0;accent-color:#536d55;border:0;background:none}
.audio-actions{display:flex;gap:8px}.audio-actions button{flex:1;min-height:44px}#audioStatus{min-height:36px}
#awardBanner[hidden]{display:none}#awardBanner{position:fixed;top:110px;left:50%;transform:translateX(-50%);z-index:30;width:min(420px,calc(100vw - 24px));display:flex;align-items:center;gap:13px;padding:14px 18px;border:2px solid var(--award-color,#a68b4b);border-radius:12px;background:#fff9e9f5;color:#344039;box-shadow:0 8px 30px #24372d30;pointer-events:none;animation:award-arrive .45s ease-out}
#awardIcon{font-size:35px;color:var(--award-color)}#awardTitle{font-family:var(--serif);font-size:20px}#awardDetail{margin:5px 0 0;font-size:12px;line-height:1.5;overflow-wrap:anywhere}
.celebrating-road .champion-road{animation:award-road 1s ease-in-out 4;stroke-width:10;filter:saturate(1.6) drop-shadow(0 0 4px #ffef85)}
.award-player{box-shadow:inset 0 0 0 2px var(--player),0 0 12px #d4b86960}.celebrating-army{box-shadow:inset 0 0 20px #d6b86475}
@keyframes award-arrive{from{opacity:0;translate:0 -14px}to{opacity:1;translate:0 0}}
@keyframes award-road{50%{stroke-width:12;filter:saturate(1.6) drop-shadow(0 0 8px #ffdf5d)}}
@media(max-width:850px),(max-width:1000px) and (max-height:500px){#awardBanner{top:calc(var(--game-header,44px) + var(--player-strip,54px) + 42px);padding:9px 12px}#awardTitle{font-size:17px}#awardDetail{font-size:11px}#awardIcon{font-size:28px}body.in-game header nav #audioButton{font-size:19px;padding:4px;min-width:32px}}
@media(prefers-reduced-motion:reduce){#awardBanner,.celebrating-road .champion-road{animation:none}}
@media(max-width:850px) and (orientation:portrait){
 body.in-game{--game-header:44px;--player-strip:54px}
 body.in-game header{padding:0 10px}
 body.in-game main{grid-template-rows:var(--player-strip) minmax(0,1fr) auto}
 body.in-game .players-panel{padding:3px 7px}
 body.in-game .play-area{grid-template-rows:36px minmax(0,1fr) 54px;padding:0 5px}
 body.in-game .action-panel{grid-template-rows:22px 18px auto 44px;gap:2px;padding:5px 8px calc(4px + env(safe-area-inset-bottom))}
 body.in-game #actions{max-height:min(180px,27dvh)}
 body.in-game #actions:empty{display:none}
 body.in-game .action-panel:has(#actions:empty){grid-template-rows:22px 18px 44px}
 body.in-game #toast{bottom:calc(112px + env(safe-area-inset-bottom))}
}
@media(max-width:850px) and (orientation:portrait) and (display-mode:standalone){
 body.in-game{--game-header:calc(44px + env(safe-area-inset-top))}
 body.in-game header{padding-top:env(safe-area-inset-top)}
}
