/* Map screens use the window as their stage. Text and actions remain HTML. */
body:has(.camp-shell[data-page="conquest"],.fortress-base) .topbar {display:none;}
.camp-shell[data-page="conquest"] {position:fixed;inset:0;z-index:100;display:block;max-width:none;height:100dvh;margin:0;padding:0;overflow:hidden;background:#253d2c;}
.camp-shell[data-page="conquest"] > .campaign {position:absolute;inset:0;width:100%;height:100%;min-height:0;margin:0;padding:0;border:0;border-radius:0;background:#253d2c;box-shadow:none;overflow:hidden;}
.camp-shell[data-page="conquest"] > .campaign::after {display:none;}
.camp-shell[data-page="conquest"] #camp-art {position:absolute;inset:0;display:block;width:100%;height:100%;max-width:none;max-height:none;touch-action:none;cursor:grab;}
.camp-shell[data-page="conquest"] .page-heading {position:absolute;z-index:3;top:calc(20px + env(safe-area-inset-top));left:24px;right:24px;align-items:start;pointer-events:none;color:var(--text);}
.camp-shell[data-page="conquest"] .page-heading > div {padding:12px 16px;border:1px solid #c4ccd840;border-radius:12px;background:#0b1526e8;box-shadow:0 4px 16px #0003;}
.camp-shell[data-page="conquest"] .page-heading .eyebrow {font-size:9px;margin-bottom:6px;}
.camp-shell[data-page="conquest"] .page-heading h1 {font-size:24px;line-height:1.1;}
.camp-shell[data-page="conquest"] .page-heading button {pointer-events:auto;}
.camp-shell[data-page="conquest"] .page-heading .wallet {gap:8px;min-width:0;}
.camp-shell[data-page="conquest"] .wallet strong {font-size:24px;}
.camp-shell[data-page="conquest"] .wallet small {font-size:9px;}
.camp-shell[data-page="conquest"] .campaign-action {position:absolute;z-index:3;left:auto;right:24px;bottom:calc(104px + env(safe-area-inset-bottom));transform:none;display:flex;flex-direction:column;align-items:stretch;gap:8px;width:260px;padding:14px;border:1px solid #c4ccd850;border-radius:12px;background:#0b1526eb;box-shadow:0 6px 24px #0004;}
.camp-shell[data-page="conquest"] .campaign-action small {display:block;text-align:center;line-height:1.4;font-size:11px;}
.camp-shell[data-page="conquest"] .campaign-action .primary {display:flex;justify-content:center;width:100%;min-height:48px;font-size:14px;}
.camp-shell[data-page="conquest"] .campaign:has(#prepare-army) #march {display:flex;}
.camp-shell[data-page="conquest"] .campaign-action .mission-blocked {font-size:11px;}
.camp-shell[data-page="conquest"] .campaign-action .secondary {white-space:normal;}
.mission-details {position:absolute;z-index:4;top:calc(120px + env(safe-area-inset-top));left:24px;width:310px;border:1px solid #c4ccd850;border-radius:12px;background:#0b1526eb;color:var(--text);box-shadow:0 6px 24px #0004;overflow:hidden;}
.mission-details > summary {position:relative;display:grid;gap:5px;min-height:68px;padding:14px 42px 14px 16px;list-style:none;cursor:pointer;}
.mission-details > summary::-webkit-details-marker {display:none;}
.mission-details > summary::after {content:'+';position:absolute;right:16px;top:22px;font-size:24px;color:var(--accent-ink);}
.mission-details[open] > summary::after {content:'−';}
.mission-details > summary > span:first-child {font-size:9px;letter-spacing:1.5px;color:var(--muted);}
.mission-details > summary strong {font-size:18px;font-weight:600;}
.mission-details .mission-disclosure {font-size:11px;color:var(--accent-ink);}
.mission-details-body {max-height:calc(100dvh - 330px);overflow:auto;overscroll-behavior:contain;padding:0 16px 16px;scrollbar-width:thin;}
.camp-shell[data-page="conquest"] .mission-details .campaign-copy {position:static;display:block;width:auto;height:auto;padding:0;transform:none;}
.camp-shell[data-page="conquest"] .mission-details .campaign-copy > .eyebrow,
.camp-shell[data-page="conquest"] .mission-details .campaign-copy > h2,
.camp-shell[data-page="conquest"] .mission-details .mission-meta {display:none;}
.camp-shell[data-page="conquest"] .mission-details .campaign-copy > p {display:block;margin:6px 0 14px;font-size:12px;line-height:1.6;color:var(--muted);}
.mission-details .field-map-picker {max-width:none;margin:0 0 16px;}
.camp-shell[data-page="conquest"] .mission-details .mission-forces {position:static;display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:0 0 16px;padding:14px 0;border:0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);border-radius:0;background:none;}
.mission-details .mission-forces > div:last-child {grid-column:1/-1;}
.mission-details .mission-forces span {font-size:11px;}
.mission-details .mission-forces strong {font-size:18px;}
.mission-details .deployment-blocked {display:block;margin:12px 0;padding:12px;font-size:12px;}
.mission-details .deployment-blocked button {margin-top:12px;}
.conquest-map-tools {position:absolute;z-index:3;right:24px;bottom:calc(264px + env(safe-area-inset-bottom));display:flex;gap:8px;}
.map-zoom {display:flex;gap:4px;}
.map-zoom button,.conquest-map-tools > button,.fort-base-camera button {display:grid;place-items:center;min-width:44px;width:44px;height:44px;padding:0;border:1px solid #c4ccd850;border-radius:9px;background:#0b1526e8;color:var(--text);font-size:22px;box-shadow:0 3px 12px #0003;}
.map-zoom button,.conquest-map-tools > button {cursor:pointer;}
.map-dragging,.map-dragging canvas {cursor:grabbing!important;}
#camp-art:focus-visible,.fort-map:focus-visible {outline:3px solid var(--accent-ink);outline-offset:-4px;}
.mission-details summary:focus-visible,.conquest-map-tools button:focus-visible {outline:3px solid var(--accent-ink);outline-offset:-3px;}

/* Village canvas fills the window; hit targets share the drawing transform. */
.fortress-base .fort-map {touch-action:none;cursor:grab;}
.fortress-base #fort-village {position:absolute;inset:0;width:100%;height:100%;border-radius:0;}
.fortress-base .fort-world {position:absolute;aspect-ratio:auto;pointer-events:none;}
.fortress-base .fort-world button {pointer-events:auto;}
.fortress-base .fort-heading {top:calc(20px + env(safe-area-inset-top));left:24px;right:24px;}
.fortress-base .fort-heading > div:first-child {padding:10px 16px;border-radius:12px;background:#172b23db;}
.fortress-base .fort-heading h1 {font-size:26px;}
.fortress-base .fort-toolbar {top:calc(22px + env(safe-area-inset-top));left:24px;}
.fortress-base .fort-dock {bottom:calc(104px + env(safe-area-inset-bottom));}
.fortress-base .fort-base-camera {bottom:calc(108px + env(safe-area-inset-bottom));}
.fortress-base .fort-structure-hit {min-height:32px;}
.fortress-base .fort-gate-hit {left:41%;top:49%;}
.fortress-base .fort-sector-west {left:41%;}
.fortress-base .fort-slot {min-width:80px;min-height:60px;}
.fortress-base .fort-detail,.fortress-base .fort-reserve,.fortress-base .fort-training-picker {top:115px;max-height:calc(100dvh - 225px);overscroll-behavior:contain;}

@media(max-width:700px) {
 .camp-shell[data-page="conquest"] .page-heading {top:calc(12px + env(safe-area-inset-top));left:12px;right:12px;gap:8px;}
 .camp-shell[data-page="conquest"] .page-heading > div {padding:10px 12px;}
 .camp-shell[data-page="conquest"] .page-heading h1 {font-size:18px;}
 .camp-shell[data-page="conquest"] .page-heading .eyebrow {max-width:170px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:8px;letter-spacing:1px;}
 .camp-shell[data-page="conquest"] .title-line {gap:4px;}
 .camp-shell[data-page="conquest"] .title-line button {width:32px;min-width:32px;height:28px;}
 .camp-shell[data-page="conquest"] .wallet > svg {display:none;}
 .camp-shell[data-page="conquest"] .wallet strong {font-size:21px;}
 .camp-shell[data-page="conquest"] .wallet small {font-size:8px;}
 .mission-details {top:calc(104px + env(safe-area-inset-top));left:12px;width:min(300px,calc(100% - 24px));}
 .mission-details > summary {min-height:0;padding:10px 40px 10px 12px;gap:4px;}
 .mission-details > summary strong {font-size:16px;}
 .mission-details > summary::after {top:13px;}
 .mission-details-body {max-height:calc(100dvh - 390px);padding:0 12px 12px;}
 .camp-shell[data-page="conquest"] .campaign-action {left:12px;right:12px;bottom:calc(100px + env(safe-area-inset-bottom));width:auto;padding:10px;gap:6px;}
 .camp-shell[data-page="conquest"] .campaign-action .primary {min-height:46px;}
 .conquest-map-tools {right:12px;bottom:calc(210px + env(safe-area-inset-bottom));}
 .camp-shell[data-page="conquest"] .campaign:has(#prepare-army) .conquest-map-tools {bottom:calc(295px + env(safe-area-inset-bottom));}
 .fortress-base .fort-heading {top:calc(12px + env(safe-area-inset-top));left:12px;right:12px;}
 .fortress-base .fort-heading > div:first-child {top:76px;padding:8px 14px;}
 .fortress-base .fort-heading h1 {font-size:22px;}
 .fortress-base .fort-toolbar {top:calc(18px + env(safe-area-inset-top));left:12px;}
 .fortress-base .fort-dock {bottom:calc(100px + env(safe-area-inset-bottom));}
 .fortress-base .fort-base-camera {left:12px;bottom:calc(176px + env(safe-area-inset-bottom));}
 .fortress-base .fort-detail,.fortress-base .fort-reserve,.fortress-base .fort-training-picker {top:auto;bottom:calc(176px + env(safe-area-inset-bottom));left:12px;right:12px;width:auto;max-height:calc(100dvh - 330px);}
}
@media(max-height:500px) and (min-width:601px) {
 body:has(.camp-shell[data-page="conquest"],.fortress-base) #camp-navigation {bottom:8px;width:320px;}
 body:has(.camp-shell[data-page="conquest"],.fortress-base) #camp-navigation .camp-dock-button {flex-direction:row;min-height:44px;gap:6px;}
 .camp-shell[data-page="conquest"] .page-heading {top:12px;left:12px;right:12px;}
 .camp-shell[data-page="conquest"] .page-heading > div {padding:8px 12px;}
 .camp-shell[data-page="conquest"] .page-heading h1 {font-size:18px;}
 .mission-details {top:90px;left:12px;width:250px;}
 .mission-details-body {max-height:calc(100dvh - 190px);}
 .camp-shell[data-page="conquest"] .campaign-action {right:12px;bottom:80px;width:230px;padding:10px;}
 .conquest-map-tools {right:12px;bottom:190px;}
 .fortress-base .fort-heading > div:first-child {top:0;}
 .fortress-base .fort-heading h1 {font-size:20px;}
 .fortress-base .fort-heading p {display:none;}
 .fortress-base .fort-heading > div:first-child {padding:6px 12px;}
 .fortress-base .fort-slot small {display:none;}
 .fortress-base .fort-slot {padding-top:22px;}
 .fortress-base .fort-structure-hit {min-height:24px;font-size:8px!important;}
 body:has(.camp-shell[data-page="conquest"],.fortress-base) #camp-navigation .camp-dock-label {font-size:12px;}
 .fortress-base .fort-dock {left:auto;right:12px;bottom:78px;transform:none;}
 .fortress-base .fort-base-camera {bottom:78px;left:12px;}
 .fortress-base .fort-detail,.fortress-base .fort-reserve,.fortress-base .fort-training-picker {top:85px;bottom:145px;max-height:none;width:290px;}
}
