/* Go geometry and touch controls; keep board-skin and token skin hooks intact. */
.go-stage{min-width:0;margin-bottom:20px}
.go-stage #board-shell{padding:13px;border-radius:10px;margin:0 0 12px;background:linear-gradient(120deg,#e9c792,#bc8d4d);border-color:#ccab70;box-shadow:inset 0 1px 2px #fff8,0 4px 0 #74552f,0 9px 20px #0005}
.go-stage #board-shell::before{inset:3px;border-radius:7px;pointer-events:none}
.go-stage .game-board:is(.go,.gomoku){border:0;background:repeating-linear-gradient(92deg,#c799530c 0 1px,transparent 1px 7px),linear-gradient(105deg,#efd3a0,#dcb575);overflow:visible}
.game-board:is(.go,.gomoku) .board-cell::before,.game-board:is(.go,.gomoku) .board-cell.hoshi::after{display:none}
.go-grid{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:-1;overflow:visible}
.go-grid line{stroke:#65492d;stroke-width:.8;vector-effect:non-scaling-stroke}
.go-grid .go-edge{stroke-width:1.4}
.go-grid circle{fill:#503720}
.go-coordinates{position:absolute;inset:13px;pointer-events:none;color:#4f3925;font:9px/1 Arial,sans-serif}
.go-coordinate{position:absolute;display:block;text-align:center;transform:translate(-50%,-50%)}
.go-coordinate.top{top:-7px}.go-coordinate.bottom{top:calc(100% + 7px)}
.go-coordinate.left{left:-7px}.go-coordinate.right{left:calc(100% + 7px)}
.go-stage #board-shell[data-board-skin="lotus-board"] .go-coordinate{color:#fff4c4;background:#133a30c9;border-radius:2px;padding:1px;font-weight:700;text-shadow:0 1px 1px #112d25}
.game-board:is(.go,.gomoku) .token{width:92%;height:92%;transform:none;position:relative;z-index:2;box-shadow:inset 0 1px 2px #fff5,0 1px 2px #0008}
.game-board:is(.go,.gomoku) .board-cell.last{background:transparent}
.game-board:is(.go,.gomoku) .board-cell.last .token::after{content:'';position:absolute;width:25%;height:25%;border:1px solid #f1cb68;border-radius:50%;box-shadow:0 0 1px #172922}
.go-marker{position:absolute;pointer-events:none;z-index:3}
.go-marker.count{width:28%;height:28%;border:1px solid #382f24;border-radius:1px;background:#292d30}
.go-marker.count.go-marker-white{background:#fffbee;border-color:#72634a}
.go-marker.influence{inset:0;z-index:0;background:#1c293449}
.go-marker.influence.go-marker-white{background:#fffceb83}
.go-tools{border:1px solid #bda36555;border-radius:12px;background:#123c34ed;padding:10px;color:#e7e2c3}
.go-tools-row{display:flex;align-items:center;gap:8px}
.go-tools-row>span{font-size:12px;margin-left:auto;color:#c9d8c5}
.go-tools button{min-height:44px;padding:8px 18px;font:inherit;font-size:14px}
.go-tools button[aria-pressed=true]{background:linear-gradient(110deg,#eddda7,#b59450);color:#143a31;border-color:#f2dda1}
.go-tools button:disabled{opacity:.45}
.go-analysis-summary{font:13px/1.7 system-ui;margin:9px 0 0}
.go-analysis-note{font:11px/1.6 system-ui;color:#c1cfbf;margin:4px 0 0}




@media(max-width:740px),(max-width:1100px) and (max-height:520px){
 body.wide-arena.phone-play .phone-shell{display:flex;flex-direction:column;gap:7px;overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;padding:max(5px,env(safe-area-inset-top)) max(2px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(2px,env(safe-area-inset-left));scrollbar-width:none}
 .wide-arena .phone-shell>div,.wide-arena .phone-shell>nav{flex:none;width:100%;max-width:680px;align-self:center}
 .wide-arena .phone-shell>.phone-top,.wide-arena .phone-shell>.phone-seats,.wide-arena .phone-shell>.phone-status,.wide-arena .phone-shell>.phone-actions,.wide-arena .phone-shell>.phone-powers,.wide-arena .phone-shell>.phone-guards{width:calc(100% - 16px)}
 .wide-arena .phone-shell>.phone-top{min-height:38px}
 .wide-arena .phone-shell>.phone-seats{min-height:58px}
 .wide-arena .phone-shell>.phone-stage{display:block;min-height:0;padding:0;overflow:visible}
 .wide-arena .phone-stage>.board-stage{width:100%;margin:0}
 .go-stage #board-shell{width:100%;max-width:none;padding:9px;border-radius:7px;margin-bottom:10px}
 .go-coordinates{inset:9px;font-size:7px}
 .go-coordinate.top{top:-5px}.go-coordinate.bottom{top:calc(100% + 5px)}
 .go-coordinate.left{left:-5px}.go-coordinate.right{left:calc(100% + 5px)}
 .go-tools{margin:0 6px;padding:7px 9px}
 .go-tools-row>span{font-size:11px}
 .go-tools button{padding:6px 14px}
 
 .wide-arena .phone-powers{min-height:48px}
 .wide-arena .phone-empty-powers{position:static;padding:10px;margin:0}
 .wide-arena .phone-actions{min-height:44px;margin-top:4px}
 .wide-arena .phone-guards{min-height:48px;overflow:visible}
 .wide-arena .phone-notice:has(.notice:empty){display:none}
}

/* Keep every chess board full width; extra controls scroll vertically on phones. */
.board-stage{min-width:0;margin-bottom:20px}.board-stage>#board-shell{margin-bottom:12px}
.move-placement{display:flex;align-items:center;gap:8px;margin:9px 0 0;padding:10px;border:1px solid #bda36577;border-radius:10px;background:#123c34f5;color:#e7e2c3}
.move-placement>span{flex:1;min-width:0;font:13px/1.5 system-ui;overflow-wrap:anywhere}.move-placement button{flex:none;min-height:44px;padding:8px 12px;font-size:14px}.move-placement .primary{min-width:100px}.move-placement button:disabled{opacity:.45}
.game-board .board-cell.move-pending{background-color:#ffe69b55!important;outline:2px solid #b77916;outline-offset:-2px;z-index:4}
.game-board .board-cell.move-source>.token{opacity:.38}.game-board .board-cell.move-pending>.token:not(.move-ghost){opacity:.2}
.game-board .board-cell .move-ghost{position:absolute;opacity:.7;outline:1px dashed #fceab8;outline-offset:-3px;z-index:5;pointer-events:none}
@media(max-width:740px),(max-width:1100px) and (max-height:520px){
 .wide-arena .board-stage #board-shell{width:100%;max-width:none;padding:4px;margin:0 0 10px;border-radius:7px}
 .wide-arena .go-stage #board-shell{padding:9px}
 .wide-arena .board-stage #board-shell:has(.checkers){border-radius:14px}
 .wide-arena .board-stage #board-shell::before{inset:2px;border-radius:5px}
 .wide-arena .phone-stage .board-stage{box-sizing:border-box;width:100%;margin:0}
 .wide-arena .move-placement{margin:7px 6px 0;padding:8px;gap:6px}
 .wide-arena .move-placement>span{font-size:12px}.wide-arena .move-placement button{padding:7px 10px}
 .wide-arena .phone-stage .chess .token{font-size:clamp(25px,8.2vw,58px)}
 .wide-arena .phone-stage .xiangqi .token{font-size:clamp(16px,4.7vw,32px)}
}

.replay-retention-note{margin:12px 6px;padding:12px;border:1px solid #bda36566;border-radius:10px;background:#123c34ed;color:#e7e2c3;font:13px/1.7 system-ui}
