/* Scoped to map selection: home and modal styles retain their existing cascade. */
.app-screen.map-select-screen{display:flex;flex-direction:column;gap:12px;padding:max(14px,env(safe-area-inset-top)) 12px max(18px,env(safe-area-inset-bottom));background-image:linear-gradient(100deg,#a3adeda8,#e6e6ffe0 48%,#a6b2edb8),url('../img/ui/laboratory_v2.png');color:#18237d;}
.app-screen.map-select-screen[hidden]{display:none;}
.map-select-header{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:48px;}
.map-select-header h1{font-size:clamp(16px,4.8vw,24px);line-height:1.1;margin:0;text-align:center;font-weight:900;}
.map-select-screen .map-round-button{display:grid;place-items:center;width:44px;height:44px;flex-shrink:0;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;}
.map-round-button img{display:block;width:100%;height:100%;object-fit:contain;pointer-events:none;filter:drop-shadow(0 2px 2px #4b589855);transition:transform 80ms ease,filter 80ms ease;}
.map-round-button:active:not(:disabled) img,.map-round-button.is-pressing img{transform:translateY(2px) scale(.96);filter:brightness(.93);}
.map-select-screen button:focus-visible{outline:3px solid #00dcff;outline-offset:3px;}
.map-select-screen .map-currency{position:relative;display:block;flex:0 0 90px;width:90px;height:27px;padding:0;margin:0 3px 0 0;border:0;border-radius:0;background:none;box-shadow:none;color:white;}
.map-currency img{position:absolute;top:50%;display:block;max-width:none;border:0;border-radius:0;padding:0;background:none;box-shadow:none;pointer-events:none;transform:translateY(-50%);}
.map-currency .map-particles-panel{z-index:1;left:10px;width:79px;height:25px;object-fit:fill;}
.map-currency .map-particle-vial{z-index:3;left:-6px;width:31px;height:auto;object-fit:contain;transform:translateY(-50%) rotate(-8deg);}
.map-currency b{position:absolute;z-index:2;left:31px;right:26px;top:50%;transform:translateY(-50%);text-align:center;color:white;font-size:11px;font-weight:700;line-height:1;text-shadow:none;}
.map-currency .map-currency-plus{z-index:4;right:2px;width:21px;height:21px;object-fit:contain;}
.map-mode-tabs{display:flex;flex-shrink:0;gap:6px;padding:4px 0 6px;border:0;border-radius:0;background:none;box-shadow:none;}
.map-mode-tabs .map-mode-button{flex:1;min-width:0;height:49px;min-height:0;padding:0;border:0;border-radius:0;background:none;box-shadow:none;overflow:visible;--ui-shadow:drop-shadow(0 3px 2px #19236480);}
.map-mode-button .ui-3slice__content{padding:0 8px;gap:0;color:white;font-family:var(--font-display);font-size:clamp(10px,2.9vw,14px);font-weight:700;line-height:1.12;text-align:center;}
.map-mode-button .ui-3slice__content span{-webkit-text-stroke:1.3px #174b9d;paint-order:stroke fill;text-shadow:0 1px 0 #123b80,0 2px 0 #0c2b64;}
.map-mode-button[aria-selected="true"] .ui-3slice__content span{-webkit-text-stroke-color:#552300;text-shadow:0 1px 0 #4b2209,0 2px 0 #2d1205;}
.map-mode-button:active .ui-3slice__skin,.map-mode-button:active .ui-3slice__content{transform:translateY(2px) scale(.985);}
.map-pages{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;touch-action:pan-y pinch-zoom;overscroll-behavior-x:contain;}
.map-card-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,minmax(180px,1fr));gap:9px;height:100%;min-height:369px;padding:2px 1px 5px;}
.map-select-screen .map-select-card{display:flex;flex-direction:column;min-width:0;padding:5px;border:1px solid #fff;border-radius:19px;background:linear-gradient(125deg,#adbdf3e6,#c7d2ffee 60%,#aabdf4ed);box-shadow:inset 0 0 0 3px #ecedffc9,0 3px 3px #7484c087;overflow:hidden;}
.map-preview-space{display:flex;align-items:center;justify-content:center;flex:1;min-height:0;width:100%;padding:7px;}
.map-preview-space img{width:100%;height:100%;object-fit:contain;pointer-events:none;}
.map-object-counts{display:flex;justify-content:center;flex-wrap:wrap;gap:3px 5px;padding:6px 2px;border-radius:11px;background:linear-gradient(#6275bd,#3f5495);box-shadow:inset 0 1px 1px #a4baff;color:#fff;}
.map-object-count{display:inline-flex;align-items:center;gap:2px;white-space:nowrap;line-height:1;}
.map-object-count b{font:700 10px Arial,sans-serif;}
.map-count-icon{display:inline-block;width:12px;height:16px;flex-shrink:0;}
.map-count-rock{background:linear-gradient(130deg,#edf2ff,#8f9bb6 50%,#53617e);clip-path:polygon(25% 0,75% 8%,100% 42%,80% 95%,25% 100%,0 55%);}
.map-count-wall{width:7px;border:1px solid #3a4664;border-radius:3px;background:linear-gradient(90deg,#5e6984,#ecedfa,#5e6984);}
.map-count-crystal{background:linear-gradient(105deg,#e4baff,#c83fff 48%,#7830be 50%,#f0c5ff);clip-path:polygon(50% 0,95% 48%,75% 100%,20% 100%,0 45%);}
.map-count-portal{height:13px;border:2px solid #efafff;border-radius:50%;background:#6b04ad;box-shadow:0 0 4px #e73bff,inset 0 0 3px #fa7aff;}
.map-count-unstable{display:grid;place-items:center;width:16px;height:16px;border:1px solid #fff2aa;border-radius:3px;background:#ffb222;color:#fff;font:bold 10px Arial;box-shadow:0 0 4px #ffad35;}
.map-pagination{display:flex;justify-content:center;align-items:center;gap:20px;min-height:55px;flex-shrink:0;}
.map-page-dots{display:flex;align-items:center;gap:7px;max-width:55%;overflow:auto;padding:5px;}
.map-page-dots button{width:13px;height:13px;padding:0;flex-shrink:0;border:0;border-radius:50%;background:#7584c5;}
.map-page-dots button[aria-current]{width:17px;height:17px;border:1px solid white;background:linear-gradient(#00eaff,#0090ed);box-shadow:0 0 5px #00daff;}

.map-page-next img{rotate:180deg;}
.map-pagination button:disabled{opacity:.35;cursor:default;box-shadow:none;}
.map-empty{padding:35px 15px;text-align:center;}
.map-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;}
@media(max-width:360px){.app-screen.map-select-screen{padding-left:8px;padding-right:8px;gap:9px;}.map-card-grid{gap:6px;}.map-select-header h1{font-size:16px;}.map-select-screen .map-currency{font-size:14px;}}

/* Three adjacent pages move together; only the middle page accepts input. */
.map-slide-track{display:flex;width:100%;height:100%;min-height:369px;transform:translate3d(-100%,0,0);will-change:transform;}
.map-slide-page{flex:0 0 100%;width:100%;min-width:0;height:100%;padding:0 3px;box-sizing:border-box;}
.map-slide-page[aria-hidden="true"]{pointer-events:none;}
.map-slide-page .map-card-grid{width:100%;box-sizing:border-box;}
.map-pages{user-select:none;-webkit-user-select:none;}
