html, body { margin: 0; height: 100%; background: #000; color: #fff; font: 14px/1.35 system-ui, -apple-system, Segoe UI, Roboto, sans-serif; }
#map { position: fixed; inset: 0; }
#top { position: fixed; top: 12px; left: 12px; right: 56px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; z-index: 4; pointer-events: none; }
#top > * { pointer-events: auto; }
#brand { padding: 6px 12px; background: #000c; border: 1px solid #bfff3b; border-radius: 10px; color: #bfff3b; font-weight: 800; letter-spacing: .08em; }
#brand span { color: #fff; font-weight: 400; }
#status { position: fixed; bottom: 12px; left: 12px; padding: 4px 10px; background: #000c; border-radius: 8px; color: #bfff3b; font-size: 12px; z-index: 2; pointer-events: none; }
#card { position: fixed; left: 12px; right: 12px; bottom: 44px; max-width: 380px; margin: 0 auto; padding: 14px 16px; background: #000; border: 1px solid #bfff3b; border-radius: 14px; box-shadow: 0 8px 30px #000a; z-index: 3; }
#card h3 { margin: 0 34px 4px 0; font-size: 17px; color: #fff; }
#card .cat { display: inline-block; margin-bottom: 8px; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; color: #000; }
#card .row { color: #ccc; font-size: 13px; }
#card .x { position: absolute; top: 8px; right: 10px; width: 28px; height: 28px; border: 0; border-radius: 50%; background: #1a1a1a; color: #bfff3b; font-size: 16px; cursor: pointer; }
#card a.go { display: block; margin-top: 12px; padding: 10px; text-align: center; background: #bfff3b; color: #000; font-weight: 800; border-radius: 10px; text-decoration: none; }
.maplibregl-ctrl-group { background: #000 !important; border: 1px solid #bfff3b55; }
.maplibregl-ctrl-group button .maplibregl-ctrl-icon { filter: invert(1) sepia(1) saturate(6) hue-rotate(30deg); }
.maplibregl-ctrl-attrib { background: #000a !important; color: #888; }
.maplibregl-ctrl-attrib a { color: #bfff3b; }

/* phase 1: top bar, panels, card actions, events, toast */
.pill { display: inline-flex; align-items: center; gap: 2px; padding: 6px 11px; background: #000d; color: #bfff3b; border: 1px solid #bfff3b66; border-radius: 10px; font: 700 12px/1 system-ui, sans-serif; letter-spacing: .04em; cursor: pointer; text-decoration: none; }
.pill:hover, .pill.on { background: #bfff3b; color: #000; }
@media (max-width: 560px) { .pill .lbl { display: none; } }
#panel { position: fixed; top: 54px; left: 12px; width: min(420px, calc(100% - 24px)); max-height: calc(100% - 140px); overflow: auto; padding: 14px; background: #000; border: 1px solid #bfff3b; border-radius: 14px; box-shadow: 0 8px 30px #000a; z-index: 5; }
#panel .x { position: absolute; top: 8px; right: 10px; width: 28px; height: 28px; border: 0; border-radius: 50%; background: #1a1a1a; color: #bfff3b; font-size: 16px; cursor: pointer; }
#panel .ptitle { margin: 0 34px 10px 0; font-weight: 800; color: #fff; }
.field { display: block; box-sizing: border-box; width: calc(100% - 36px); margin: 0 0 8px; padding: 10px 12px; background: #111; color: #fff; border: 1px solid #333; border-radius: 10px; font: 15px system-ui, sans-serif; }
textarea.field, #panel input.field + .field { width: 100%; }
.field:focus { outline: none; border-color: #bfff3b; }
#results { display: flex; flex-direction: column; gap: 4px; }
#results small { color: #999; }
.res { display: block; width: 100%; text-align: left; padding: 8px 10px; background: #111; color: #fff; border: 0; border-radius: 8px; cursor: pointer; }
.res:hover { background: #1d2a0a; }
.res b { display: block; font-size: 14px; }
.res small { display: block; color: #aaa; font-size: 12px; margin-top: 2px; }
#cats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; background: #111; color: #ddd; border: 1px solid #333; border-radius: 16px; font-size: 12px; cursor: pointer; }
.chip i { width: 10px; height: 10px; border-radius: 50%; }
.chip.on { border-color: #bfff3b; color: #fff; background: #1d2a0a; }
.send { margin-top: 4px; }
#card .acts { display: flex; gap: 6px; margin-top: 10px; }
#card .row.lime { color: #bfff3b; font-weight: 700; }
#card .row.info { margin-top: 6px; color: #bbb; max-height: 96px; overflow: auto; }
#card a.web { color: #bfff3b; word-break: break-all; }
.event-pin { padding: 4px 8px; background: #bfff3b; color: #000; border: 0; border-radius: 8px; font: 800 11px system-ui, sans-serif; white-space: nowrap; box-shadow: 0 2px 8px #0008; cursor: pointer; }
#toast { position: fixed; left: 50%; top: 60px; transform: translateX(-50%); padding: 8px 14px; background: #bfff3b; color: #000; font-weight: 700; border-radius: 10px; z-index: 6; }

/* phase 2: search tabs, category picker, open mall panel */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 34px 10px 0; }
#results .sep { margin: 8px 0 2px; color: #bfff3b; font: 800 11px system-ui, sans-serif; letter-spacing: .08em; }
#results.cats { gap: 6px; }
.crow { display: flex; gap: 4px; align-items: center; }
.exp { padding: 4px 8px; background: #111; color: #bfff3b; border: 1px solid #333; border-radius: 8px; cursor: pointer; }
.exp.open { transform: rotate(180deg); }
.subs { display: flex; flex-wrap: wrap; gap: 4px; margin: 2px 0 4px 18px; }
.chip.small { font-size: 11px; padding: 4px 8px; }
.chip small { color: #888; }
.catacts { display: flex; gap: 6px; margin-top: 8px; }
.search-pin { padding: 4px 8px; background: #bfff3b; color: #000; border-radius: 8px; font: 800 11px system-ui, sans-serif; white-space: nowrap; box-shadow: 0 2px 8px #0008; }
button.go { display: block; width: 100%; margin-top: 12px; padding: 10px; text-align: center; background: #bfff3b; color: #000; font: 800 14px system-ui, sans-serif; border: 0; border-radius: 10px; cursor: pointer; }
#mallPanel { position: fixed; top: 56px; right: 12px; bottom: 44px; width: 330px; overflow: auto; padding: 12px 14px; background: #000; border: 1px solid #bfff3b; border-radius: 14px; box-shadow: 0 8px 30px #000a; z-index: 4; }
#mallPanel .mhead { display: flex; gap: 8px; align-items: flex-start; justify-content: space-between; }
#mallPanel h2 { margin: 0; font-size: 17px; color: #fff; }
#mallPanel .meta { color: #aaa; font-size: 12px; margin: 4px 0 10px; }
#mallPanel .mrow { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
#mallPanel .field { width: 100%; }
#mallPanel .sel { margin: 0; color: #bfff3b; font-weight: 800; }
.gapbox span { color: #bfff3b; font: 800 11px system-ui, sans-serif; letter-spacing: .06em; white-space: nowrap; }
.gapbox input { flex: 1; accent-color: #bfff3b; }
.gapbox b { color: #fff; font-size: 12px; min-width: 48px; text-align: right; }
.mcat h3 { display: flex; align-items: center; gap: 6px; margin: 6px 0 2px; font-size: 13px; color: #fff; cursor: pointer; }
.mcat h3 i { width: 10px; height: 10px; border-radius: 50%; }
.mcat h3 small { color: #888; font-weight: 400; }
.mitem { padding: 6px 8px 6px 22px; color: #ddd; font-size: 13px; border-radius: 6px; cursor: pointer; }
.mitem:hover { background: #1d2a0a; }
.mitem.on { background: #bfff3b; color: #000; }
.mitem small { color: #999; }
.mitem.on small { color: #333; }
mark { background: #bfff3b; color: #000; }
body.mall-open #card { right: auto; left: 12px; margin: 0; }
@media (max-width: 760px) {
  #mallPanel { top: auto; left: 12px; right: 12px; bottom: 40px; width: auto; max-height: 55vh; }
  #mallPanel.collapsed { max-height: 64px; overflow: hidden; }
  body.mall-open #card { bottom: 120px; right: 12px; }
}

/* floor labels beside the open mall's slabs; shapes menu */
#floorTags { position: fixed; inset: 0; pointer-events: none; z-index: 2; }
.ftag { position: absolute; left: 0; top: 0; will-change: transform; pointer-events: auto; padding: 3px 8px; background: #000d; color: #bfff3b; border: 1px solid #bfff3b88; border-radius: 8px; font: 800 11px system-ui, sans-serif; white-space: nowrap; cursor: pointer; }
.ftag small { color: #fff; font-weight: 400; margin-left: 4px; }
.ftag:hover { background: #bfff3b; color: #000; }
.shapes { display: flex; flex-wrap: wrap; gap: 6px; }
#shapeLabel { margin-left: 2px; }
@media (max-width: 560px) { #shapeLabel { display: none; } }

/* open mall, as /tactical/: CLOSE pill top left, floor dropdown top middle, shop names on the floor */
#mallTop { position: fixed; top: 54px; left: 12px; right: 12px; z-index: 4; pointer-events: none; display: flex; justify-content: center; }
#mallTop > * { pointer-events: auto; }
#mallClose { position: absolute; left: 0; top: 0; background: #000d; color: #bfff3b; border-color: #bfff3b; }
.floorsel { appearance: none; -webkit-appearance: none; padding: 7px 28px 7px 14px; background: #000d url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23bfff3b'/%3E%3C/svg%3E") no-repeat right 10px center; color: #fff; border: 1px solid #bfff3b; border-radius: 10px; font: 700 13px system-ui, sans-serif; cursor: pointer; }
@media (max-width: 760px) { #mallTop { top: 96px; } }
.ftag { background: #000e; border: 1.5px solid; text-transform: uppercase; letter-spacing: .04em; }
.ftag small { color: #ccc; text-transform: none; font-weight: 400; }
#shopTags { position: fixed; inset: 0; pointer-events: none; z-index: 1; overflow: hidden; }
.stag { position: absolute; left: 0; top: 0; color: #fff; font: 700 10px system-ui, sans-serif; text-shadow: 0 0 3px #000, 0 0 2px #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }

[hidden] { display: none !important; }

/* search boxes with a clear (reset) button */
.sbox { position: relative; }
.sbox .field { padding-right: 36px; }
.clr { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); margin-top: -4px; width: 26px; height: 26px; border: 0; border-radius: 50%; background: #2a2a2a; color: #bfff3b; font-size: 13px; cursor: pointer; }
.clr:hover { background: #bfff3b; color: #000; }
#panel .sbox { width: calc(100% - 36px); }
#panel .sbox .field { width: 100%; }

/* indoor navigation: which-shop picker, I'M HERE button, written steps */
#startPick { position: fixed; left: 50%; top: 70px; transform: translateX(-50%); width: min(420px, calc(100% - 24px)); max-height: calc(100% - 120px); overflow: auto; padding: 14px; background: #000; border: 1px solid #bfff3b; border-radius: 14px; z-index: 7; color: #fff; box-shadow: 0 8px 30px #000a; }
#startPick .sp-sub { opacity: .75; font-size: 13px; margin: 4px 0 8px; }
#startPick .lime, .lime { color: #bfff3b; }
.sp-floors { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
#spList { max-height: 42vh; overflow: auto; margin: 8px 0 12px; }
.sp-row { display: flex; gap: 8px; padding: 9px 4px; border-bottom: 1px solid #222; cursor: pointer; }
.sp-row span { flex: 1; } .sp-row small { opacity: .6; }
.sp-row:hover { background: #1d2a0a; }
.sp-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.here-btn { position: fixed; transform: translateX(-50%); z-index: 7; }
#card .acts { flex-wrap: wrap; }
.walk-box { margin-top: 8px; }
.steps-sum { cursor: pointer; color: #bfff3b; font-weight: 700; letter-spacing: .04em; padding: 4px 0; }
.walk-steps { margin: 2px 0 0; padding-left: 20px; line-height: 1.5; font-size: 13px; color: #ddd; max-height: 34vh; overflow: auto; }
.walk-steps li { cursor: pointer; padding: 3px 0; }
.walk-steps li:hover { color: #fff; }
#card .row.small { font-size: 12px; opacity: .8; }
#card { max-height: calc(100% - 120px); overflow: auto; }

/* compass, compass mode and the phone STOP bar while walking, as /tactical/ */
#navBar { position: fixed; right: 12px; bottom: 34px; display: flex; gap: 6px; z-index: 3; }
.pill.round { width: 40px; height: 40px; padding: 0; justify-content: center; border-radius: 50%; font-size: 18px; }
#followBtn { display: none; }
#followBtn.on { background: #bfff3b; border-color: #bfff3b; box-shadow: 0 0 14px rgba(191,255,59,.5); }
@media (pointer: coarse), (max-width: 820px) { #followBtn { display: inline-flex; } }
@media (max-width: 820px) { #card { bottom: 60px; } }
.stoproute { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 8; padding: 10px 18px; font-size: 13px; font-weight: 800; color: #000; background: #bfff3b; border-color: #bfff3b; max-width: calc(100% - 32px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.routenext { bottom: 74px; background: #000; color: #bfff3b; }
#walkSteps { position: fixed; left: 12px; right: 12px; bottom: calc(env(safe-area-inset-bottom, 0px) + 78px); z-index: 8; max-height: 34vh; overflow: auto; background: rgba(0,0,0,.88); border: 1px solid #bfff3b; border-radius: 16px; padding: 6px 12px 8px; color: #fff; font-size: 13px; }
body.walking #walkSteps:not([hidden]) ~ .routenext, body.walking #routeNext:not([hidden]) { bottom: 74px; }
body.walking #routeNext:not([hidden]) ~ #walkSteps { bottom: calc(env(safe-area-inset-bottom, 0px) + 126px); }
body.walking #card, body.walking #top, body.walking #panel, body.walking #mallPanel, body.walking #mallTop, body.walking #status, body.walking #navBar, body.walking .maplibregl-ctrl-top-right, body.walking #floorTags { display: none !important; }

/* your dot with the beam the way you face (the small radar) and the end pin, as /tactical/ */
.me-mark, .end-mark { position: fixed; left: 0; top: 0; z-index: 2; pointer-events: none; will-change: transform; }
.me-dot { position: absolute; left: -9px; top: -9px; width: 18px; height: 18px; border-radius: 50%; background: #bfff3b; box-shadow: 0 0 0 2.5px #fff, 0 2px 6px #0008; }
.me-beam { position: absolute; left: -75px; top: -75px; transform-origin: 50% 50%; }
.me-pulse { position: absolute; left: -22px; top: -22px; width: 44px; height: 44px; border-radius: 50%; border: 2px solid #bfff3b; animation: mepulse 2s ease-out infinite; }
@keyframes mepulse { from { transform: scale(.4); opacity: .9; } to { transform: scale(1.4); opacity: 0; } }
.end-mark svg { position: absolute; left: -14px; top: -42px; filter: drop-shadow(0 2px 4px #0009); }
.end-label { position: absolute; left: 0; top: -70px; transform: translateX(-50%); padding: 3px 10px; background: #000e; color: #fff; border: 1.2px solid #bfff3b; border-radius: 11px; font: 700 12px system-ui, sans-serif; white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
#followBtn.on.free { background: #000d; color: #bfff3b; border-color: #bfff3b; }   /* compass mode on, you turned the map: tap to let the compass turn it again */

/* no pull-down-to-refresh or page bounce: the page is the map */
html, body { overscroll-behavior: none; overflow: hidden; }
/* while walking: compass, 🧭 and ⌖ stay at the top right (the toast tells you to tap 🧭) */
body.walking #navBar { display: flex !important; top: 12px; bottom: auto; flex-direction: column; }
/* HAHO popups: which floor are you on */
.haho-pop { position: fixed; left: 50%; top: 70px; transform: translateX(-50%); width: min(420px, calc(100% - 24px)); padding: 14px; background: #000; border: 1px solid #bfff3b; border-radius: 14px; z-index: 7; color: #fff; box-shadow: 0 8px 30px #000a; }
.haho-pop .sp-sub { opacity: .75; font-size: 13px; margin: 4px 0 8px; }

/* the card's GO on top; the mall panel's ✕; CLOSE <MALL> pill on the map; the walking figure for your spot */
#card .go-top { display: block; width: 100%; margin: 2px 0 10px; padding: 11px; background: #bfff3b; color: #000; border: 0; border-radius: 12px; font: 900 15px system-ui, sans-serif; letter-spacing: .08em; cursor: pointer; }
#card .go-top.stop { background: #000; color: #bfff3b; border: 1.5px solid #bfff3b; }
#mallPanel .x { width: 28px; height: 28px; flex: none; border: 0; border-radius: 50%; background: #1a1a1a; color: #bfff3b; font-size: 16px; cursor: pointer; }
#mallClose { position: static; background: #000d; color: #bfff3b; border-color: #bfff3b; max-width: calc(100vw - 24px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#mallTop { justify-content: flex-start; }
.me-dot { left: -14px; top: -14px; width: 28px; height: 28px; display: grid; place-items: center; }
#status:empty { display: none; }

/* top bar: APP and FEEDBACK the same size on the right; SEARCH a big lime button at the bottom middle */
#top { right: 12px; }
#appBtn { margin-left: auto; }
#top .pill.side { box-sizing: border-box; width: 112px; justify-content: center; }
@media (max-width: 560px) { #top .pill.side { width: 96px; padding: 6px 4px; } }
#searchBtn { position: fixed; left: 50%; transform: translateX(-50%); bottom: 40px; z-index: 3; display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; padding: 0; background: #bfff3b; color: #000; border: 0; border-radius: 50%; font: 900 15px system-ui, sans-serif; letter-spacing: .08em; box-shadow: 0 6px 20px #000a; cursor: pointer; }
#searchBtn:hover { filter: brightness(1.05); }
body.walking #searchBtn { display: none; }
@media (max-width: 820px) { #card { bottom: 100px; } }

/* search, filter and feedback panels open at the bottom, just above the SEARCH button that opens them */
#panel { top: auto; bottom: 100px; left: 50%; transform: translateX(-50%); width: min(460px, calc(100% - 24px)); max-height: calc(100% - 190px); }
/* a place card open: it takes the bottom; SEARCH steps aside until it closes */
body.card-open #searchBtn { display: none; }
@media (max-width: 820px) { #card { bottom: 44px; } }

/* land (Zaabeel Park): what stands on it, listed on its card */
.land-list { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; max-height: 30vh; overflow: auto; }

/* Mall Kart running: only the map and the game's own controls */
body.kart-on #top, body.kart-on #navBar, body.kart-on #searchBtn, body.kart-on #mallPanel, body.kart-on #mallTop, body.kart-on #status, body.kart-on #floorTags, body.kart-on #shopTags { display: none !important; }

/* arrival flight title; quiet screen: the buttons fade while you just look */
#immTitle { position: fixed; left: 50%; top: 38%; transform: translate(-50%, -50%); z-index: 6; pointer-events: none; text-align: center; color: #fff; font: 900 64px/1 system-ui, sans-serif; letter-spacing: .3em; text-shadow: 0 4px 30px #000c; transition: opacity .8s; }
#immTitle small { display: block; margin-top: 10px; font-size: 14px; font-weight: 700; letter-spacing: .25em; color: #bfff3b; }
#immTitle.gone { opacity: 0; }
@media (max-width: 560px) { #immTitle { font-size: 40px; } }
#top, #navBar, #searchBtn, #status, .maplibregl-ctrl-bottom-right { transition: opacity .6s; }
body.quiet #top, body.quiet #navBar, body.quiet #searchBtn, body.quiet #status, body.quiet .maplibregl-ctrl-bottom-right { opacity: 0; pointer-events: none; }

/* Together: the panel and the dots */
#togPins { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }
.tog { max-height: calc(100% - 180px); overflow: auto; top: auto; bottom: 100px; }
.tog b { display: block; margin: 4px 0 8px; color: #fff; }
.tog .field { width: 100%; }
.tog ul { list-style: none; margin: 6px 0 12px; padding: 0; }
.tog li { display: flex; gap: 6px; margin: 4px 0; }
.tog-go { flex: 1; display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: #111; color: #fff; border: 0; border-radius: 8px; cursor: pointer; text-align: left; font: 14px system-ui, sans-serif; }
.tog-go i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.tog-go span { margin-left: auto; color: #bfff3b; font-size: 12px; }
.tog-x { width: 32px; border: 0; border-radius: 8px; background: #1a1a1a; color: #ff6b6b; cursor: pointer; }
.tog .tog-close { position: absolute; top: 8px; right: 10px; width: 28px; height: 28px; border: 0; border-radius: 50%; background: #1a1a1a; color: #bfff3b; cursor: pointer; }
body.kart-on #togPins { display: none; }

/* edit mode: the move / rotate bar */
.editbar { position: fixed; left: 50%; bottom: 100px; transform: translateX(-50%); z-index: 8; width: min(420px, calc(100% - 24px)); padding: 12px; background: #000; border: 1px solid #bfff3b; border-radius: 14px; color: #fff; box-shadow: 0 8px 30px #000a; }
#editRead { font: 700 13px system-ui, sans-serif; color: #bfff3b; margin-bottom: 8px; }
.editkeys { display: grid; grid-template-columns: repeat(3, 44px); gap: 6px; justify-content: center; margin-bottom: 10px; }
body.editing #card { bottom: 100px; }

/* the info card covers the bottom: its buttons step aside while it is open */
body.card-open #navBar { display: none; }
/* 🏎: choosing where to drop the car */
body.dropping .maplibregl-canvas { cursor: crosshair; }

/* the logo starts the page again, as it first opens (no shared place, no saved view) */
a#brand { text-decoration: none; cursor: pointer; pointer-events: auto; }

/* phones: the round buttons wrap upwards instead of running under the search button, and the map credit stays a small (i) */
#navBar { max-width: calc(100% - 92px); flex-wrap: wrap-reverse; justify-content: flex-end; }
.maplibregl-ctrl-bottom-right { z-index: 2; }

/* phones: search in the bottom middle; the round buttons in one column on the right, the most used lowest (under the thumb):
   full screen, together, kart, day / night, compass, my location */
@media (max-width: 700px) {
  #searchBtn { left: 50%; transform: translateX(-50%); bottom: 34px; width: 60px; height: 60px; }
  #navBar { flex-direction: column; flex-wrap: nowrap; max-width: none; bottom: 34px; }
  #navBar #fullBtn { order: 1; } #navBar #togBtn { order: 2; } #navBar #kartBtn { order: 3; }
  #navBar #dayBtn { order: 4; } #navBar #followBtn { order: 5; } #navBar #locate { order: 6; }
}

/* phones: search opens as one sheet from the top that stays put while results come in (it used to sit low and jump
   up as the list grew); its list scrolls inside it, never the page; the buttons below step aside while it is open */
@media (max-width: 700px) {
  #panel { top: 60px; bottom: auto; left: 8px; right: 8px; transform: none; width: auto; max-height: calc(100% - 72px); max-height: calc(var(--vvh, 100dvh) - 72px); overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
  body:has(#panel:not([hidden])) #searchBtn, body:has(#panel:not([hidden])) #navBar { display: none; }
}

/* the place's name and line for search engines (read by them, not shown) */
.seo-text{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}

/* driving: a tapped building's card opens at the top, over the game, clear of its controls at the bottom */
body.kart-on #card { top: 60px; bottom: auto; z-index: 10001; max-height: 45%; }

/* phones, a fresh visit: the map waits under this until your GPS answers */
#gpsWait { position: fixed; inset: 0; z-index: 9000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: #000; color: #fff; text-align: center; padding: 24px; transition: opacity .45s; }
#gpsWait b { color: #bfff3b; font-size: 18px; letter-spacing: .04em; }
#gpsWait small { color: #9aa39b; font-size: 13px; }
#gpsWait button { margin-top: 10px; }
#gpsWait.gone { opacity: 0; pointer-events: none; }
#gpsWait .gw-dot { width: 18px; height: 18px; border-radius: 50%; background: #bfff3b; box-shadow: 0 0 0 0 #bfff3b88; animation: gwPulse 1.4s infinite; margin-bottom: 6px; }
@keyframes gwPulse { 0% { box-shadow: 0 0 0 0 #bfff3b88; } 100% { box-shadow: 0 0 0 26px #bfff3b00; } }

/* driving: the tapped building's name, pinned over its roof */
#kartTag { position: fixed; z-index: 10001; transform: translate(-50%, -100%); padding: 5px 12px; background: #000; color: #bfff3b; border: 1px solid #bfff3b; border-radius: 999px; font: 800 13px system-ui, sans-serif; letter-spacing: .04em; white-space: nowrap; pointer-events: none; box-shadow: 0 4px 14px #000a; }
#kartTag::after { content: ''; position: absolute; left: 50%; bottom: -7px; width: 2px; height: 7px; background: #bfff3b; transform: translateX(-50%); }

/* phones, a mall open: no top bar (logo, app, feedback), its CLOSE at the very top, the card at the bottom */
@media (max-width: 760px) {
  body.mall-open #brand, body.mall-open #appBtn, body.mall-open #fbBtn { display: none; }   /* not the whole bar: the search button lives in it */
  body.mall-open #mallTop { top: 12px; }
  body.mall-open #card { bottom: 12px; left: 8px; right: 8px; }
}

/* the mall's own pills (CLOSE, PLAY) side by side */
#mallTop { gap: 6px; }
/* phones: the info card always at the bottom, full width (driving keeps it at the top, clear of the game's controls) */
@media (max-width: 760px) {
  body:not(.kart-on) #card { top: auto !important; bottom: 12px !important; left: 8px !important; right: 8px !important; margin: 0 !important; max-width: none; }
}

/* phones, a mall open: its search (and the round buttons) stay on screen, just above a shop's card when one is open */
@media (max-width: 760px) {
  body.mall-open:not(.kart-on):not(.walking) #searchBtn { display: inline-flex !important; }
  body.mall-open.card-open:not(.kart-on):not(.walking) #searchBtn { bottom: calc(var(--cardH, 0px) + 24px); }
  body.mall-open.card-open:not(.kart-on):not(.walking) #navBar { display: flex !important; bottom: calc(var(--cardH, 0px) + 24px); }
  body.mall-open:has(#mallPanel:not([hidden])) #searchBtn { display: none !important; }
}

/* prayer time: the adhan's name and time, a small pill under the top bar (for 12 minutes from the call) */
#prayerPill { position: fixed; top: 58px; left: 50%; transform: translateX(-50%); z-index: 4; padding: 6px 14px; background: #000; color: #fff1b8; border: 1px solid #ffe08a; border-radius: 999px; font: 600 13px system-ui, sans-serif; box-shadow: 0 0 18px #ffe08a55; white-space: nowrap; pointer-events: none; }
#prayerPill b { color: #ffe08a; }
#prayerPill small { color: #9aa39b; margin-left: 4px; }
body.mall-open #prayerPill, body.kart-on #prayerPill, body.walking #prayerPill { display: none; }

/* desktop only: the time, a small pill at the top middle */
#clockPill { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 4; padding: 5px 14px; background: #000c; color: #bfff3b; border: 1px solid #bfff3b; border-radius: 999px; font: 700 13px system-ui, sans-serif; letter-spacing: .06em; pointer-events: none; font-variant-numeric: tabular-nums; }
@media (max-width: 760px), (pointer: coarse) { #clockPill { display: none; } }
body.kart-on #clockPill, body.walking #clockPill { display: none; }

/* phones: the clock shows while the screen is quiet (idle, buttons faded away), top middle */
@media (max-width: 760px), (pointer: coarse) { body.quiet:not(.kart-on):not(.walking) #clockPill { display: block; top: 18px; font-size: 15px; padding: 6px 16px; } }
