.ant-game{ color-scheme:light; font-family:system-ui,-apple-system,"Segoe UI",sans-serif; color:#28261e; background:#b7a97d; --paper:#f2ebcf; --line:rgba(65,55,30,.25); }
.ant-game *{ box-sizing:border-box; }
.ant-game{ margin:0; min-width:300px; }
.ant-game button,.ant-game input{ font:inherit; }
.ant-game .territory-app{ max-width:1160px; margin:auto; padding:24px 28px 18px; }
.ant-game .page-head{ display:flex; justify-content:space-between; align-items:center; gap:16px; margin-bottom:20px; }
.ant-game .eyebrow{ font-size:12px; font-weight:750; letter-spacing:.16em; margin:0 0 4px; }
.ant-game .eyebrow span{ margin-left:8px; font-size:10px; padding:2px 5px; border:1px solid var(--line); border-radius:3px; }
.ant-game .game-title{ font-size:28px; line-height:1.3; margin:0; letter-spacing:.06em; }
.ant-game .map-summary{ text-align:right; font-size:12px; min-width:0; }
.ant-game .page-head>div:first-child{ flex-shrink:0; }
.ant-game .predator-status{ max-width:560px; white-space:pre-line; overflow-wrap:anywhere; }
.ant-game .map-summary p{ margin:7px 0 0; }
.ant-game .preview-badge{ display:inline-block; border:1px solid var(--line); padding:4px 9px; border-radius:4px; background:#d9cda5; }
.ant-game .workspace{ display:grid; grid-template-columns:minmax(0,1fr) 250px; gap:16px; align-items:start; }
.ant-game .map-panel,.ant-game .detail-panel,.ant-game .faction-panel{ background:var(--paper); border:1px solid var(--line); border-radius:7px; box-shadow:0 4px 16px rgba(65,55,30,.09); }
.ant-game .map-toolbar{ display:flex; justify-content:space-between; align-items:center; padding:12px 16px; font-size:12px; gap:8px; }
.ant-game .map-toolbar>span{ font-weight:750; }
.ant-game .map-toolbar label{ display:flex; align-items:center; gap:6px; min-height:28px; cursor:pointer; }
.ant-game input{ accent-color:#584f2c; width:16px; height:16px; }
.ant-game .map-frame{ display:grid; grid-template-columns:22px minmax(0,1fr); grid-template-rows:18px auto; padding:0 16px 0 8px; }
.ant-game .column-labels{ grid-column:2; display:grid; grid-template-columns:repeat(3,1fr); text-align:center; }
.ant-game .row-labels{ grid-row:2; display:grid; grid-template-rows:repeat(3,1fr); align-items:center; text-align:center; }
.ant-game .column-labels,.ant-game .row-labels{ font-size:10px; font-weight:700; color:#665d43; }
.ant-game .map-surface{ grid-column:2; grid-row:2; aspect-ratio:4/3; position:relative; background:#b7a97d; border:1px solid #6f674c; isolation:isolate; }
.ant-game canvas{ width:100%; height:100%; display:block; image-rendering:pixelated; }
.ant-game #territoryAnts{ position:absolute; inset:0; pointer-events:none; }
.ant-game .territory-grid{ position:absolute; inset:0; display:grid; grid-template:repeat(3,minmax(0,1fr))/repeat(3,minmax(0,1fr)); }
.ant-game .territory-cell{ position:relative; border:0; border-right:1px dashed rgba(57,50,31,.44); border-bottom:1px dashed rgba(57,50,31,.44); padding:0; color:var(--faction,#57513c); background:transparent; cursor:pointer; min-width:0; }
.ant-game .territory-cell:nth-child(3n){ border-right:0; }
.ant-game .territory-cell:nth-child(n+7){ border-bottom:0; }
.ant-game .territory-cell::before{ content:""; position:absolute; inset:0; background:var(--territory-fill,var(--faction,transparent)); opacity:.13; pointer-events:none; }
.ant-game .hide-territories .territory-cell::before{ opacity:0; }
.ant-game .territory-cell:hover{ background:rgba(255,248,211,.2); }
.ant-game .territory-cell[aria-pressed="true"]{ z-index:1; outline:3px solid #fff4bf; outline-offset:-4px; box-shadow:inset 0 0 0 5px #615936; }
.ant-game .territory-cell:focus-visible{ z-index:2; outline:3px solid #fff; outline-offset:-7px; }
.ant-game .cell-id{ position:absolute; left:8px; top:6px; font-size:10px; font-weight:750; color:#3b3728; text-shadow:0 1px #e3d8b2; }
.ant-game .cell-nest-mark{ margin-left:6px; color:var(--faction); font-size:12px; }
.ant-game .nest-name{ background:#f2ebcfe8; border:1px solid var(--line); padding:2px 6px; border-radius:3px; font-weight:750; font-size:11px; white-space:nowrap; }
.ant-game .neutral-label{ position:absolute; inset:auto 0 10px; font-size:10px; color:#4b4934; }
.ant-game .map-foot{ padding:12px 16px; display:flex; flex-wrap:wrap; gap:6px 12px; justify-content:space-between; font-size:11px; color:#61583e; }
.ant-game .north{ font-weight:800; }
.ant-game .detail-panel{ padding:22px 20px; }
.ant-game .selected-label{ font-size:11px; letter-spacing:.08em; color:#6b6247; }
.ant-game h2{ font-size:46px; line-height:1; margin:12px 0; font-weight:600; }
.ant-game .selected-owner{ font-weight:750; margin:0 0 22px; font-size:14px; }
.ant-game .cell-facts{ font-size:12px; margin:0; }
.ant-game .cell-facts div{ display:flex; justify-content:space-between; gap:10px; padding:12px 0; border-top:1px solid var(--line); }
.ant-game dt{ color:#6b6247; }
.ant-game dd{ margin:0; }
.ant-game .neighbors{ border-top:1px solid var(--line); padding-top:16px; margin-top:6px; }
.ant-game h3{ font-size:12px; margin:0 0 10px; }
.ant-game #neighborLinks{ display:flex; flex-wrap:wrap; gap:6px; }
.ant-game .neighbor-button{ min-height:36px; border:1px solid #a69b70; border-radius:4px; color:#373321; background:#e5dbb6; padding:6px 10px; cursor:pointer; }
.ant-game .neighbor-button:hover{ background:#d4c995; }
.ant-game .cell-description{ margin:20px 0 0; font-size:12px; line-height:1.8; color:#61583e; }
.ant-game .faction-panel{ margin-top:16px; padding:14px 18px; display:flex; gap:20px; justify-content:space-between; align-items:center; font-size:12px; }
.ant-game .faction-list{ display:flex; gap:26px; flex-wrap:wrap; }
.ant-game .faction-entry{ display:flex; gap:7px; align-items:center; }
.ant-game .faction-entry .name{ font-weight:750; }
.ant-game .faction-entry .count{ color:#6b6247; margin-left:5px; }
.ant-game .neutral-count{ white-space:nowrap; color:#6b6247; }
.ant-game footer{ display:flex; justify-content:space-between; flex-wrap:wrap; gap:8px; padding-top:14px; font-size:10px; color:#4e4833; }
.ant-game .sr-only{ position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.ant-game [hidden]{ display:none !important; }
.ant-game .nest-commands{ margin-top:14px; padding:12px 16px; background:var(--paper); border:1px solid var(--line); border-radius:7px; }
.ant-game .command-heading{ display:flex; justify-content:space-between; align-items:center; gap:12px; }
.ant-game .command-heading h2{ font-size:16px; margin:0; line-height:1.4; }
.ant-game .command-status,.ant-game .command-note{ font-size:12px; line-height:1.6; margin:8px 0 0; }
.ant-game .command-inputs{ display:grid; grid-template-columns:1fr 1fr; gap:24px; margin-top:10px; }
.ant-game .birth-command label{ display:flex; justify-content:space-between; flex-wrap:wrap; gap:6px; font-size:12px; font-weight:650; }
.ant-game #soldierBirthPercent{ width:100%; height:24px; margin:4px 0 0; cursor:pointer; }
.ant-game .command-inputs p{ margin:3px 0 0; font-size:11px; line-height:1.5; color:#61583e; }
.ant-game .sortie-buttons{ display:flex; gap:8px; }
.ant-game .sortie-buttons button{ flex:1; min-height:36px; border:1px solid #8f8153; border-radius:4px; color:inherit; background:#e5dbb6; cursor:pointer; }
.ant-game .sortie-buttons button[aria-pressed="true"]{ background:#655d3e; color:#fff7d8; border-color:#655d3e; }
.ant-game .sortie-buttons button[data-sortie="emergency"][aria-pressed="true"]{ background:#953f31; border-color:#953f31; }
@media(max-width:760px){.ant-game .command-inputs{ grid-template-columns:1fr; gap:12px; }
.ant-game .nest-commands{ padding:12px; }
.ant-game .command-heading{ flex-wrap:wrap; }}
.ant-game .primary-button{ width:100%; margin-top:18px; padding:12px; min-height:44px; border:1px solid #655d3e; border-radius:5px; background:#655d3e; color:#fff7d8; cursor:pointer; font-weight:650; }
.ant-game .primary-button:hover{ background:#4b452e; }
.ant-game .local-workspace{ border:1px solid var(--line); border-radius:7px; background:var(--paper); overflow:hidden; }
.ant-game .local-toolbar{ display:flex; align-items:center; gap:16px; padding:12px 16px; }
.ant-game .winged-command{ grid-column:1/-1; border-top:1px solid var(--line); padding-top:10px; font-size:12px; line-height:1.7; }
.ant-game .winged-command p{ margin:5px 0 0; font-size:11px; }
.ant-game .winged-command button:disabled{ opacity:.5; cursor:default; }
.ant-game #nestCommandFeedback:empty{ display:none; }
.ant-game .local-toolbar h2{ font-size:18px; margin:0; flex:1; }
.ant-game .local-toolbar>span{ font-size:12px; font-weight:700; }
.ant-game .local-stage-wrap{ background:#b7a97d; border-block:1px solid var(--line); }
.ant-game .local-stage{ position:relative; aspect-ratio:47/36; width:min(100%,max(360px,calc(130.555svh - 380px))); margin:auto; }
.ant-game .local-life-status{ margin:0; padding:0 16px 10px; font-size:11px; line-height:1.6; }
.ant-game #pauseSimulation{ margin-left:8px; border:1px solid #8f8153; border-radius:4px; padding:5px 9px; background:var(--paper); color:inherit; cursor:pointer; }
.ant-game #simulationSpeed{ margin-left:6px; border:1px solid #8f8153; border-radius:4px; padding:5px 6px; background:var(--paper); color:inherit; font:inherit; cursor:pointer; }
.ant-game .map-summary p{ white-space:nowrap; }
.ant-game #localTerrain{ width:100%; height:100%; }
.ant-game .local-nest{ position:absolute; transform:translateX(-50%); pointer-events:none; }
.ant-game .local-exit{ position:absolute; min-height:40px; min-width:60px; border:1px solid #8f8153; background:#f2ebcff0; border-radius:4px; padding:7px 10px; color:#3b3520; cursor:pointer; font-weight:650; font-size:12px; }
.ant-game .local-exit:hover{ background:#fff5c9; }
.ant-game .local-exit.north{ top:8px; left:50%; transform:translateX(-50%); }
.ant-game .local-exit.south{ bottom:8px; left:50%; transform:translateX(-50%); }
.ant-game .local-exit.west{ left:8px; top:50%; transform:translateY(-50%); }
.ant-game .local-exit.east{ right:8px; top:50%; transform:translateY(-50%); }
.ant-game .local-compass{ position:absolute; top:12px; right:14px; font-size:12px; font-weight:800; }
.ant-game .local-footer{ display:flex; gap:12px; justify-content:space-between; padding:12px 16px; color:#61583e; font-size:11px; }
@media(max-width:760px){.ant-game .primary-button{ grid-column:1/-1; }
.ant-game .local-stage{ width:100%; min-width:0; }
.ant-game .local-toolbar{ flex-wrap:wrap; gap:10px; padding:10px; }
.ant-game .local-toolbar h2{ font-size:16px; }
.ant-game .local-toolbar>span{ width:100%; }
.ant-game .local-footer{ flex-wrap:wrap; }}
@media (min-width:761px){.ant-game .map-frame{ width:min(100%,max(360px,calc(133.333svh - 390px))); margin-inline:auto; }}
@media (max-width:760px){.ant-game .territory-app{ padding:16px 12px; }
.ant-game .workspace{ grid-template-columns:minmax(0,1fr); gap:12px; }
.ant-game .detail-panel{ padding:16px; display:grid; grid-template-columns:100px 1fr; column-gap:16px; }
.ant-game .selected-label,.ant-game h2,.ant-game .selected-owner{ grid-column:1; }
.ant-game h2{ font-size:36px; margin:8px 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; }
.ant-game .cell-description{ grid-column:1/-1; margin-top:12px; }
.ant-game .faction-panel{ flex-wrap:wrap; gap:12px; }
.ant-game .faction-list{ display:grid; grid-template-columns:1fr 1fr; width:100%; gap:12px; }
.ant-game .keyboard-help{ display:none; }
.ant-game .game-title{ font-size:23px; }
.ant-game .map-summary{ font-size:10px; }
.ant-game .map-toolbar{ padding:8px 10px; }
.ant-game .map-frame{ padding-right:10px; }
.ant-game .nest-name{ font-size:10px; padding:2px 4px; }
.ant-game .cell-id{ top:4px; left:5px; }}
.ant-game .match-finished{ display:flex; flex-wrap:wrap; align-items:center; gap:12px; padding:12px; background:var(--paper); border:1px solid var(--line); border-radius:7px; font-size:12px; }
.ant-game .match-result{ width:min(420px,calc(100vw - 32px)); max-height:calc(100svh - 32px); overflow:auto; box-sizing:border-box; padding:24px; color:inherit; background:var(--paper); border:1px solid var(--line); border-radius:7px; }
.ant-game .match-result::backdrop{ background:#24251699; }
.ant-game .match-result h2{ font-size:32px; margin:12px 0; }
.ant-game .match-result p{ line-height:1.7; }
.ant-game .match-result .neighbor-button{ margin-top:12px; width:100%; min-height:44px; }
.ant-game .founding-notice{ display:flex; gap:4px; margin:0 0 12px; padding:4px; background:var(--paper); border:1px solid var(--line); border-left:4px solid #655d3e; border-radius:5px; }
.ant-game .notice-visit,.ant-game .notice-close{ min-height:44px; border:0; border-radius:3px; background:transparent; color:inherit; cursor:pointer; font:inherit; }
.ant-game .notice-visit{ flex:1; min-width:0; padding:6px 10px; display:flex; flex-wrap:wrap; align-items:center; gap:4px 16px; text-align:left; font-size:13px; font-weight:650; }
.ant-game .notice-hint{ font-size:11px; font-weight:400; color:#61583e; }
.ant-game .notice-close{ flex:0 0 44px; font-size:20px; }
.ant-game .attack-notice{ border-left-color:#9e4439; }
.ant-game .attack-notice .notice-visit{ color:#81392f; }
.ant-game .notice-visit:hover,.ant-game .notice-close:hover{ background:#e5dbb6; }
.ant-game .notice-visit:focus-visible,.ant-game .notice-close:focus-visible{ outline:2px solid #655d3e; outline-offset:1px; }