/* Join the sprite before outlining it: prevents a pale clipped seam at the knees. */
.army-chess-wrap .ac-square>.ac-piece,.army-chess-wrap .ac-move-ghost>.ac-piece,.army-chess-wrap .ac-capture-victim>.ac-piece{width:84%;height:84%;filter:drop-shadow(0 1px 1px #101a10cc) drop-shadow(0 0 .55px #f1e5b8)}
.army-chess-wrap .ac-piece>.ac-sprite{filter:none;clip-path:inset(0 0 27% 0)}
.army-chess-wrap .ac-piece>.ac-sprite.ac-sprite-legs{clip-path:inset(67% 0 0 0)}
.army-chess-wrap .type-r>.ac-sprite,.army-chess-wrap .ac-portrait>.ac-sprite{clip-path:none}
.army-chess-wrap .ac-move-ghost .ac-piece>.ac-sprite:not(.ac-sprite-legs){animation:ac-march-body .19s steps(2) infinite!important}
.army-chess-wrap .ac-aim-ghost .ac-piece>.ac-sprite:not(.ac-sprite-legs){animation:ac-ready-weapon .28s steps(3) both!important}
.ac-officer{position:relative;display:block;width:100%;aspect-ratio:1;overflow:hidden;background:#1a251c;border:1px solid #6a7354;isolation:isolate}
.ac-officer-frames{display:block;width:100%;height:100%;background-size:300% 100%;background-position:0 0;image-rendering:pixelated;animation:ac-officer-idle 17s steps(1) var(--officer-delay,0s) infinite}
.ac-officer-blitz{--officer-delay:-2s}.ac-officer-bastion{--officer-delay:-7s}.ac-officer-scout{--officer-delay:-11s}.ac-officer-viper{--officer-delay:-14s}.ac-officer-atlas{--officer-delay:-5s}
.ac-officer-blitz .ac-officer-frames{background-image:url('portraits/runtime/blitz.webp')}.ac-officer-bastion .ac-officer-frames{background-image:url('portraits/runtime/bastion.webp')}.ac-officer-scout .ac-officer-frames{background-image:url('portraits/runtime/scout.webp')}.ac-officer-viper .ac-officer-frames{background-image:url('portraits/runtime/viper.webp')}.ac-officer-atlas .ac-officer-frames{background-image:url('portraits/runtime/atlas.webp')}
@keyframes ac-officer-idle{0%,77%,100%{background-position:0 0}80%,85%{background-position:50% 0}89%,94%{background-position:100% 0}}
.ac-cigar-smoke{position:absolute;left:52%;top:28%;width:35%;height:60%;background:url('sprites/runtime/smoke-sprite.webp') center/contain no-repeat;opacity:0;filter:blur(.3px);animation:ac-cigar-drift 8s ease-out -3s infinite;pointer-events:none}
@keyframes ac-cigar-drift{0%{opacity:0;transform:translate(0,30%) scale(.25)}25%{opacity:.3}70%{opacity:.15}100%{opacity:0;transform:translate(-25%,-50%) scale(1.2)}}
.army-chess-wrap .ac-bot-cards button{padding:10px;gap:8px}.ac-bot-cards q{font-size:12px;color:#d5bd81}.ac-bot-cards small{font-size:10px;color:#b7bea5}.ac-bot-cards .ac-officer{font-size:inherit}
.ac-opponent-dossier{padding:10px;display:flex;gap:12px;align-items:center;margin-bottom:12px}.ac-officer-small{width:78px;height:78px;flex:none}.ac-opponent-dossier strong,.ac-opponent-dossier small{display:block}.ac-opponent-dossier strong{font:600 22px 'Barlow Condensed',sans-serif}.ac-opponent-dossier small{font-size:10px;color:#bec6ad}.ac-opponent-dossier p{font-size:11px;margin:4px 0!important}
.ac-after-action{padding:16px;margin-bottom:12px}.ac-after-action p{font-size:13px}.ac-after-action button{font-size:11px!important}.ac-analysis-progress{font-size:11px;margin-top:10px;color:#d7c38f}.ac-analysis-moves{display:flex;gap:4px;flex-wrap:wrap;max-height:150px;overflow:auto;margin-top:10px}.ac-analysis-moves button{padding:5px!important}.ac-analysis-moves b{display:block}.ac-resign{margin-bottom:12px}
.ac-war-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:18px}.ac-war-stats strong{background:#182319;padding:15px;font:600 25px 'Barlow Condensed',sans-serif}.ac-war-stats small{display:block;font:11px Barlow,sans-serif;color:#c6ccb6;margin-top:8px}.ac-war-list{display:grid;gap:8px;margin-top:12px}.army-chess-wrap .ac-war-row{text-align:left;padding:12px;display:grid;gap:4px}.ac-war-row span,.ac-war-row small{font-size:11px;color:#c3cab6}.ac-import-label{display:flex;flex-direction:column;font-size:11px;gap:4px;max-width:220px}.ac-import-label input{max-width:100%;font-size:10px}.ac-service-record{margin:16px 0}.ac-table-scroll{overflow:auto}.ac-table-scroll table{width:100%;font-size:12px;margin:12px 0}.ac-table-scroll th,.ac-table-scroll td{padding:7px;border-bottom:1px solid #5e6b4e;text-align:left;white-space:nowrap}
.ac-living-terrain{position:absolute;inset:17px 9px 20px 19px;pointer-events:none;overflow:hidden;z-index:1;opacity:.45}.ac-water-glint{position:absolute;left:0;right:0;top:46%;height:8%;background:repeating-linear-gradient(174deg,transparent 0 12px,#d3e3d322 13px 14px,transparent 15px 29px);mask-image:linear-gradient(transparent,#000,transparent);animation:ac-river-flow 15s linear infinite}.ac-breeze{position:absolute;width:18%;height:18%;background:radial-gradient(ellipse,#a6b16a23,transparent 65%);filter:blur(7px);animation:ac-field-breeze 19s ease-in-out infinite}.ac-breeze-one{left:9%;top:12%}.ac-breeze-two{right:8%;bottom:13%;animation-delay:-11s}
@keyframes ac-river-flow{to{background-position:130px 8px}}@keyframes ac-field-breeze{0%,65%,100%{opacity:0;transform:translateX(0)}75%{opacity:.6}90%{opacity:0;transform:translateX(55%)}}
.army-chess-wrap:not([data-effects=on]) .ac-living-terrain,.army-chess-wrap[data-terrain-motion=off] .ac-living-terrain,.army-chess-wrap[data-board-style=normal] .ac-living-terrain,.army-chess-wrap[data-app=bomber] .ac-living-terrain{display:none}.army-chess-wrap[data-front=desert-badlands-front] .ac-water-glint{display:none}
.army-chess-wrap[data-page-visible=false] .ac-officer-frames,.army-chess-wrap[data-page-visible=false] .ac-cigar-smoke,.army-chess-wrap[data-page-visible=false] .ac-living-terrain *{animation-play-state:paused}
@media(max-width:760px){.ac-war-stats{grid-template-columns:1fr 1fr}.ac-war-stats strong:last-child{grid-column:1/-1}.army-chess-wrap .ac-bot-cards{grid-template-columns:repeat(2,minmax(0,1fr))}.army-chess-wrap .ac-bot-cards strong{font-size:21px}.army-chess-wrap .ac-bot-cards span:not(.ac-officer){font-size:11px}.ac-opponent-dossier{display:none}.ac-hub-card{padding:14px}.ac-hub-dialog{padding:10px}}
@media(prefers-reduced-motion:reduce){.ac-officer-frames,.ac-cigar-smoke,.ac-living-terrain *{animation:none!important}.ac-living-terrain,.ac-cigar-smoke{display:none}}
.army-chess-wrap[data-board-style=generated] .ac-breeze{inset:0;width:100%;height:100%;background:var(--ac-generated-map) center/100% 100%;filter:none;opacity:.6;mask-image:radial-gradient(ellipse 9% 8% at 13% 20%,#000 35%,transparent 90%);animation:ac-foliage-sway 21s ease-in-out infinite}
.army-chess-wrap[data-board-style=generated] .ac-breeze-two{mask-image:radial-gradient(ellipse 9% 8% at 85% 80%,#000 35%,transparent 90%);animation-delay:-13s}
@keyframes ac-foliage-sway{0%,70%,100%{transform:translate(0,0)}76%{transform:translate(.7px,-.3px)}82%{transform:translate(-.5px,.2px)}88%{transform:translate(.4px,0)}}
.army-chess-wrap:not([data-board-style=generated]) .ac-living-terrain{display:none}
.army-chess-wrap[data-training=archive] .ac-coach,.army-chess-wrap[data-training=archive] .ac-notes,.army-chess-wrap[data-training=archive] .ac-modes,.army-chess-wrap[data-training=archive] .ac-review-banner{display:none}
.ac-war-list{max-height:420px;overflow:auto}.ac-war-message{font-size:12px;color:#dfcc91}
@media(max-width:760px){.army-chess-wrap .ac-nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;overflow:visible}.army-chess-wrap .ac-nav button{min-width:0;margin:0;width:100%;padding:8px 4px;font-size:10px;white-space:nowrap}}
/* Mobile: board and evaluation share the same horizontal centre. */
.ac-opponent-face{display:none}.ac-account-panel{border-top:1px solid #65704e;margin-top:18px;padding-top:16px}.ac-account-panel h3{font-size:19px!important}.ac-account-panel button{margin:4px!important;font-size:12px!important}.ac-login-link{color:#dfc98b!important;text-decoration:underline}.ac-account-status{font-size:12px!important;color:#dcc790!important}
.army-chess-wrap .screen-reader-text{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:760px){
 .army-chess-wrap .ac-command{width:100%;margin-left:0;min-width:0}
 .army-chess-wrap .ac-board-frame{padding:14px 14px 17px}
 .army-chess-wrap .ac-edge-files{left:14px;right:14px}
 .army-chess-wrap .ac-living-terrain,.army-chess-wrap .ac-bomber-layer{inset:14px 14px 17px}
 .army-chess-wrap .ac-eval-bar{position:relative;left:auto;right:auto;top:auto;bottom:auto;width:calc(100% - 30px);height:14px;margin:7px 15px;border-radius:2px;overflow:hidden}
 .army-chess-wrap .ac-eval-bar i{height:100%;width:var(--white-share);left:0;right:auto;top:0;bottom:0;transition:width .5s}
 .army-chess-wrap[data-flip=true] .ac-eval-bar i{left:auto;right:0;top:0;bottom:0}
 .army-chess-wrap .ac-eval-bar span{writing-mode:horizontal-tb;left:50%;top:0;bottom:auto;transform:translateX(-50%);width:auto;min-width:36px;padding:0 5px;height:12px;line-height:12px;font-size:10px;background:#dcd3b3;color:#192318}
 .army-chess-wrap .ac-opponent-face:not([hidden]){display:block;flex:none}
 .army-chess-wrap .ac-opponent-face .ac-officer{width:clamp(32px,calc((100vw - 38px)/8),58px);height:auto;aspect-ratio:1}
 .army-chess-wrap[data-has-officer=true] .ac-opponent .ac-unit-dot{display:none}
 .army-chess-wrap .ac-opponent{gap:10px;padding:7px 9px;min-height:34px}
 .army-chess-wrap .ac-opponent strong{font-size:12px}
 .army-chess-wrap .ac-opponent>.ac-engine-label{max-width:40%;font-size:10px}
}
/* Painted pixels drive the masks: water glints stay off bridges, foliage moves. */
.army-chess-wrap .ac-living-terrain{opacity:1}
.army-chess-wrap .ac-board{isolation:isolate}
.army-chess-wrap .ac-board>.ac-square{z-index:1}
.army-chess-wrap .ac-board>.ac-living-terrain{inset:0;z-index:0}
.army-chess-wrap .ac-water-glint{inset:0;width:100%;height:100%;mask-image:var(--ac-water-mask);mask-size:100% 100%;background:repeating-linear-gradient(174deg,transparent 0 10px,#e0f3de99 11px 12px,transparent 14px 27px);opacity:.55;animation:ac-river-flow 5s linear infinite}
.army-chess-wrap[data-board-style=generated] .ac-breeze{mask-image:var(--ac-leaf-mask);mask-size:100% 100%;opacity:.82;animation:ac-visible-foliage 7s ease-in-out infinite;transform-origin:50% 85%}
.army-chess-wrap[data-board-style=generated] .ac-breeze-two{display:none}
@keyframes ac-visible-foliage{0%,38%,100%{transform:translate(0,0) skewX(0)}50%{transform:translate(3px,-.8px) skewX(.24deg)}62%{transform:translate(-2px,.6px) skewX(-.16deg)}75%{transform:translate(1px,0)}88%{transform:translate(-.4px,0)}}
.ac-wind-motes{position:absolute;inset:-15%;opacity:0;background-image:radial-gradient(ellipse at 15% 23%,#dac99d 0 1px,transparent 2px),radial-gradient(ellipse at 62% 71%,#b3b783 0 1px,transparent 2px),radial-gradient(ellipse at 40% 48%,#d3c593 0 1px,transparent 2px);background-size:210px 180px,270px 250px,370px 290px;animation:ac-visible-wind 10s linear -4s infinite}
@keyframes ac-visible-wind{0%,20%{opacity:0;transform:translate(-2%,1%)}35%,65%{opacity:.5}90%,100%{opacity:0;transform:translate(9%,-3%)}}
@media(prefers-reduced-motion:reduce){.army-chess-wrap .ac-living-terrain{display:none!important}.army-chess-wrap .ac-eval-bar i{transition:none}}
@media(prefers-reduced-motion:reduce){.army-chess-wrap[data-board-style=generated] .ac-breeze{animation:none!important}}
