body.immersive.immersive.immersive{height:100dvh;overflow:hidden;background:#0c1714}
body.immersive.immersive.immersive>header{position:relative;height:64px;min-height:64px;padding:8px 20px;box-sizing:border-box;display:flex;align-items:center;justify-content:space-between}
body.immersive.immersive.immersive main{position:relative!important;display:block!important;width:100%;height:calc(100dvh - 64px)!important;padding:0!important;margin:0!important;grid-template-columns:1fr!important}
body.immersive.immersive.immersive .battle{position:relative!important;display:grid!important;grid-template-rows:52px minmax(0,1fr) auto 22px;height:100%!important;min-height:0;padding:0 12px;gap:6px;box-sizing:border-box}
body.immersive.immersive.immersive .battleheading{position:relative!important;inset:auto!important;height:auto!important;padding:4px;pointer-events:auto}
body.immersive.immersive.immersive .battleheading h1{font-size:22px;margin:0}
body.immersive.immersive.immersive .battle .field{position:relative!important;inset:auto!important;height:auto!important;min-height:0;width:100%!important;overflow:hidden;border:1px solid #65724d;border-radius:12px}
body.immersive.immersive.immersive .map-scroll{position:absolute;inset:0;width:100%;height:100%;overflow:hidden!important;cursor:grab!important;touch-action:none}
body.immersive.immersive.immersive .map-scroll:active{cursor:grabbing!important}
body.immersive.immersive.immersive .map-scroll #game{display:block;max-width:none;max-height:none;min-width:0;margin:0;touch-action:none}
body.immersive.immersive.immersive .battlecontrols{position:relative!important;inset:auto!important;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;padding:8px;gap:8px;background:#15201f;border:1px solid #806942;border-radius:10px;height:auto!important}
body.immersive.immersive.immersive #buildAside{display:none!important}
body.immersive.immersive.immersive #message{position:relative!important;inset:auto!important;margin:0;padding:0 4px;font-size:12px;line-height:18px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.map-nav{position:absolute;right:10px;bottom:12px;display:flex;gap:5px;z-index:12}
body.immersive.immersive.immersive .map-nav button{display:block!important;width:48px;height:48px;min-height:48px;padding:0;font-size:24px;background:#15211fea;border:1px solid #a58a52;border-radius:8px}
body.immersive.immersive.immersive .fieldtop{top:10px;left:10px;right:10px;display:flex;gap:6px;justify-content:flex-start}
body.immersive.immersive.immersive .fieldbottom{bottom:12px;left:12px;right:170px}
body.immersive.immersive.immersive .battle .context-card{position:absolute!important;right:auto!important;bottom:auto!important;height:auto!important;min-height:0;display:flex;flex-direction:column;overflow:visible;background:linear-gradient(145deg,#253129,#101c19);border:1px solid #be9a5c;border-radius:12px;box-shadow:0 8px 28px #0009;z-index:30;padding:0}
body.immersive.immersive.immersive .context-card[hidden]{display:none!important}
body.immersive.immersive.immersive .context-card>header{position:relative;inset:auto;height:auto;min-height:44px;padding:6px 8px 6px 14px;display:flex;align-items:center;justify-content:space-between;gap:8px;background:transparent;border-bottom:1px solid #b28a493b;border-radius:12px 12px 0 0}
body.immersive.immersive.immersive .context-card>header strong{font-size:15px;color:#ecd7a8}
body.immersive.immersive.immersive .context-card>header button{width:44px;height:44px;min-height:44px;padding:0;font-size:24px;background:transparent;border:0}
body.immersive.immersive.immersive .context-card .inspect{padding:10px 12px;margin:0;overflow:auto;min-height:0}
.context-card .context-actions{display:none}
.context-card::after{content:'';position:absolute;width:14px;height:14px;background:#17231e;border-right:1px solid #be9a5c;border-bottom:1px solid #be9a5c;transform:rotate(45deg)}
.context-card[data-placement=above]::after{bottom:-8px;left:calc(var(--pointer-x) - 7px)}
.context-card[data-placement=below]::after{top:-8px;left:calc(var(--pointer-x) - 7px);transform:rotate(225deg)}
.context-card[data-placement=right]::after{left:-8px;top:calc(var(--pointer-y) - 7px);transform:rotate(135deg)}
.context-card[data-placement=left]::after{right:-8px;top:calc(var(--pointer-y) - 7px);transform:rotate(-45deg)}
.bubble-health{font-size:12px;display:grid;gap:5px}.bubble-health progress{width:100%;height:6px;accent-color:#a1c394}
.bubble-stats{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:12px 0}.bubble-stats dt{font-size:12px;color:#b5bfb4}.bubble-stats dd{font-size:16px;margin:3px 0 0;font-weight:700}.bubble-stats dd span{color:#d8bd7c;font-size:14px}
.bubble-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}.bubble-actions button{min-height:64px;padding:10px 6px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;border-radius:8px;white-space:normal}.bubble-actions button img{width:48px;height:48px;object-fit:contain}.bubble-actions strong{font-size:14px}.bubble-actions small{font-size:11px;line-height:1.3}.bubble-actions .action-cost{margin:0}.bubble-actions .action-reason{color:inherit;margin:0}.bubble-more{width:100%;margin-top:8px;min-height:36px;font-size:12px;border:0;background:transparent;color:#d7c18d}.bubble-hint{margin:0 0 10px;font-size:13px}
body.immersive.immersive.immersive .prep-tools button{min-height:48px}.prep-tools button img{width:36px;height:36px;object-fit:contain}
body.immersive.immersive.immersive .minimap-panel{width:130px;right:10px;top:62px;bottom:auto}
body.immersive.immersive.immersive .intro-panel{max-width:300px;top:65px;left:10px}.context-open .intro-panel{display:none}
body.immersive.immersive.immersive .ability-bar{bottom:110px;left:24px;right:auto;max-width:calc(100% - 48px)}
@media(max-width:760px){
 body.immersive.immersive.immersive>header{height:90px;min-height:90px;padding:6px 12px;display:grid;grid-template-columns:1fr auto;grid-template-rows:38px 34px;gap:4px}
 body.immersive.immersive.immersive .brand{font-size:18px;gap:8px}.brand small{font-size:8px}.brandmark{width:32px;height:32px;font-size:26px}
 body.immersive.immersive.immersive .resourcebar{grid-column:1/-1;grid-row:2;width:100%;justify-content:space-between;gap:10px}.resourcebar b{font-size:17px}.resourcebar small{font-size:9px}.resourcebar .resourceicon{font-size:16px}
 body.immersive.immersive.immersive main{height:calc(100dvh - 90px)!important}
 body.immersive.immersive.immersive .battle{padding:0 6px;grid-template-rows:42px minmax(0,1fr) auto 18px;gap:4px}
 body.immersive.immersive.immersive .battleheading h1{font-size:19px}.battleheading .eyebrow{font-size:10px}
 body.immersive.immersive.immersive .battlecontrols{padding:6px;gap:6px}
 body.immersive.immersive.immersive .prep-tools{width:100%;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}
 body.immersive.immersive.immersive .prep-tools button{display:flex;flex-direction:column;gap:3px;padding:5px 2px;min-height:64px;font-size:11px;margin:0}.prep-tools button img{width:30px;height:30px}
 body.immersive.immersive.immersive .wave-preparation{width:100%;display:grid;grid-template-columns:auto 1fr;gap:6px}body.immersive.immersive.immersive #waveBtn{min-height:48px;font-size:14px}
 body.immersive.immersive.immersive .minimap-panel{width:94px;top:56px;font-size:10px}.minimap-panel small{display:none}
 body.immersive.immersive.immersive .fieldtop{top:6px;left:6px;right:6px;font-size:10px;gap:4px}.fieldtop button{padding:6px;font-size:11px;min-height:36px}
 body.immersive.immersive.immersive .fieldbottom{left:8px;bottom:8px;right:160px}.keepstatus{font-size:10px;padding:8px}.keepstatus b{font-size:11px}
 body.immersive.immersive.immersive .map-nav{right:6px;bottom:8px;gap:3px}.map-nav button{width:44px!important}
 body.immersive.immersive.immersive .ability-bar{bottom:98px;left:12px;right:12px}.ability-bar button{min-height:48px}
 body.immersive.immersive.immersive #selectionLabel{display:none}.bubble-stats{margin:8px 0}.bubble-actions button{min-height:64px}
}

body.immersive.immersive.immersive .fieldtop{height:auto;top:8px;left:8px;right:8px;justify-content:flex-start}
body.immersive.immersive.immersive .minimap-panel{top:62px;bottom:auto;right:10px}
body.immersive.immersive.immersive .ability-bar{position:absolute;grid-row:auto;bottom:calc(var(--controls-height,72px) + 32px);left:24px;right:auto;z-index:15}
body.immersive.immersive.immersive #message{grid-row:4;min-height:0;height:18px;white-space:nowrap;overflow:hidden}
body.immersive.immersive.immersive .wave-summary{display:none}
@media(max-width:760px){body.immersive.immersive.immersive #wavePreparation{grid-template-columns:1fr}body.immersive.immersive.immersive #preparationsBtn{display:none}body.immersive.immersive.immersive .intro-panel{left:8px;right:auto;width:240px}body.immersive.immersive.immersive .minimap-panel{top:54px;bottom:auto}body.immersive.immersive.immersive .ability-bar{left:12px;right:12px}}
