
.ant-game{--paper:#fbfffd;--line:#dce9e4;background:#f3f9f5;color:#253331;min-width:0;border:1px solid var(--line);border-radius:8px;font-family:inherit}
.ant-game .territory-app{max-width:none;padding:18px}.ant-game .page-head{gap:12px;flex-wrap:wrap}.ant-game .eyebrow{color:#2f8f70}.ant-game .map-panel,.ant-game .detail-panel,.ant-game .nest-commands,.ant-game .faction-panel{background:#fbfffd;border-color:var(--line)}
.ant-game .primary-button{background:#2f8f70;color:white;border-color:#26795e}.ant-game .neighbor-button,.ant-game .sortie-buttons button{background:#effbf6;color:#253331;border-color:#a9cfbe}.ant-game input[type=range]{accent-color:#2f8f70}.ant-game .sortie-buttons button[aria-pressed=true]{background:#c8ecdd;border-color:#2f8f70}
.ant-game .match-result{background:#fbfffd;color:#253331;border:1px solid #a9cfbe;border-radius:10px}.ant-game .match-result h2{font-size:1.6rem}
@media(max-width:620px){.ant-game .territory-app{padding:10px}.ant-game .map-summary{max-width:100%}.ant-game .map-summary p{display:flex;align-items:center;flex-wrap:wrap;gap:6px}.ant-game .detail-panel{padding:12px}}

/* Map and commands share a row on desktop; retain a single DOM for all sizes. */
.ant-game .play-workspace{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:16px;align-items:start}
.ant-game .map-column{min-width:0;position:sticky;top:12px}
.ant-game .workspace{grid-template-columns:minmax(0,1fr);gap:12px}
.ant-game .map-frame{width:100%;max-width:640px}
.ant-game .detail-panel{padding:12px 16px;display:grid;grid-template-columns:120px minmax(0,1fr);column-gap:16px}
.ant-game .detail-panel .selected-label,.ant-game .detail-panel h2,.ant-game .selected-owner{grid-column:1}
.ant-game .detail-panel h2{font-size:28px;margin:4px 0}.ant-game .selected-owner{margin:0;font-size:12px}
.ant-game .cell-facts{grid-column:2;grid-row:1/4}.ant-game .neighbors{grid-column:1/-1;margin-top:12px}
.ant-game .neighbors h3{display:inline-block;margin:0 12px 0 0;font-size:12px}.ant-game #neighborLinks{display:inline-flex;gap:8px}
.ant-game .cell-description{grid-column:1/-1;margin:10px 0 0;font-size:12px}
.ant-game .nest-commands{margin:0;padding:14px;min-width:0;box-shadow:none}
.ant-game .command-heading{display:flex;flex-wrap:wrap;gap:8px}.ant-game .command-heading h2{font-size:17px;line-height:1.5;margin:0}
.ant-game .command-status{font-size:12px;line-height:1.7;padding-bottom:12px;border-bottom:1px solid #dce9e4}
.ant-game .command-inputs{grid-template-columns:minmax(0,1fr);gap:14px}
.ant-game .command-inputs>div{min-width:0}.ant-game .birth-command label{display:flex;flex-direction:column;gap:6px;align-items:flex-start}
.ant-game .command-inputs p{font-size:12px;line-height:1.6;margin:6px 0 0}
.ant-game .sortie-buttons{display:flex;gap:8px}.ant-game .sortie-buttons button{flex:1;min-height:44px}
.ant-game .sortie-buttons button[data-sortie=normal][aria-pressed=true]{background:#c8ecdd;color:#253331}
.ant-game #launchWinged,.ant-game #showPlayerHome{min-height:44px}
.ant-game .local-workspace{margin:0}.ant-game .local-stage{width:100%;min-width:0}.ant-game .local-stage-wrap{padding:10px}
.ant-game .local-toolbar{flex-wrap:wrap}.ant-game .local-toolbar h2{font-size:17px}
@media(max-width:900px){
 .ant-game .play-workspace{grid-template-columns:minmax(0,1fr)}
 .ant-game .map-column{position:static}
 .ant-game .command-inputs{grid-template-columns:repeat(2,minmax(0,1fr))}
 .ant-game .winged-command{grid-column:1/-1}
}
@media(max-width:620px){
 .ant-game .page-head{margin-bottom:12px}.ant-game .game-title{font-size:21px}
 .ant-game .detail-panel{grid-template-columns:92px minmax(0,1fr);gap:0 10px;padding:10px}
 .ant-game .command-inputs{grid-template-columns:minmax(0,1fr)}
 .ant-game .nest-commands{padding:12px}.ant-game .map-foot{flex-wrap:wrap}
}

/* Native button over the canvas: separate from the map hit targets. */
.ant-game .local-map-return{position:absolute;top:8px;left:8px;z-index:6;min-height:44px;padding:8px 12px;border:1px solid #638c78;border-radius:5px;background:#fbfffd;color:#253331;font:inherit;font-size:13px;font-weight:700;box-shadow:0 2px 5px #0002;cursor:pointer;touch-action:manipulation}
.ant-game .local-map-return:hover{background:#e5f3ea}
.ant-game .local-map-return:focus-visible{outline:3px solid #2f8f70;outline-offset:2px}

/* Only the selected district opens on its next activation. */
.ant-game .territory-cell[aria-pressed="true"]::after{content:"もう一度押すと局地へ";position:absolute;left:3px;right:3px;bottom:3px;padding:3px 2px;border-radius:3px;background:#fbfffdf2;color:#253331;font-size:11px;font-weight:700;line-height:1.3;pointer-events:none}
@media(max-width:620px){.ant-game .territory-cell[aria-pressed="true"]::after{font-size:9px}}
