.world-page { overflow: hidden; height: 100dvh; }
#world { position: fixed; inset: 0; }
#world canvas { display: block; touch-action: none; }

.hud-top { position: fixed; top: 0; inset-inline: 0; z-index: 20; padding: 10px 12px calc(8px); display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  background: linear-gradient(180deg, rgba(7,7,13,.92), rgba(7,7,13,0)); padding-bottom: 24px; pointer-events: none; }
.hud-top > * { pointer-events: auto; }
.brand { font-weight: 800; font-size: 1.5rem; color: var(--txt); text-shadow: 0 0 18px var(--pink); }
.brand span { color: var(--pink); }
.loc { display: flex; gap: 6px; flex: 1; min-width: 260px; }
.loc select { padding: 8px; font-size: .9rem; background: rgba(15,13,28,.9); }
.filters { display: flex; gap: 6px; align-items: center; width: 100%; overflow-x: auto; scrollbar-width: none; }
.filters input { max-width: 220px; padding: 7px 12px; border-radius: 99px; background: rgba(15,13,28,.9); }
.chip { font: inherit; padding: 6px 13px; border-radius: 99px; border: 1px solid var(--line); background: rgba(15,13,28,.85); color: var(--txt); cursor: pointer; white-space: nowrap; }
.chip.on { background: var(--pink); border-color: var(--pink); font-weight: 700; }

.hud-side { position: fixed; z-index: 20; inset-inline-end: 10px; top: 130px; display: grid; gap: 8px; }
.fab { position: relative; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; border: 1px solid var(--line); background: rgba(18,16,30,.88);
  color: var(--txt); font-size: 1.35rem; cursor: pointer; backdrop-filter: blur(8px); font-family: inherit; }
.fab span { font-size: .58rem; color: var(--muted); margin-top: -6px; }
.fab.hot { background: linear-gradient(135deg, #ff7a3f, var(--pink)); border: 0; box-shadow: 0 0 22px rgba(255,63,164,.6); animation: glow 2s infinite; }
.fab.hot span, .fab.pro span { color: #fff; }
.fab.pro { background: linear-gradient(135deg, #00b8ff, #6a5cff); border: 0; }
@keyframes glow { 50% { box-shadow: 0 0 34px rgba(255,63,164,.9); } }

.hud-bottom { position: fixed; bottom: 0; inset-inline: 0; z-index: 15; padding: 30px 10px calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(0deg, rgba(7,7,13,.95), rgba(7,7,13,0)); pointer-events: none; }
.hud-bottom > * { pointer-events: auto; }
.count { font-size: .85rem; color: var(--muted); margin: 0 4px 6px; }
.cards { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px; }
.scard { flex: 0 0 230px; scroll-snap-align: start; background: rgba(18,16,30,.92); border: 1px solid var(--line); border-radius: 16px; padding: 10px 12px; cursor: pointer; border-top: 3px solid var(--c, var(--pink)); }
.scard.promo { border-color: var(--gold); box-shadow: 0 0 18px rgba(255,210,63,.25); }
.scard b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scard small { color: var(--muted); }

.sheet { position: fixed; z-index: 30; inset-inline: 0; bottom: 0; max-height: 82dvh; overflow: auto; background: var(--panel2); border-radius: 22px 22px 0 0;
  border-top: 1px solid var(--line); transform: translateY(105%); transition: transform .35s cubic-bezier(.2,.8,.2,1); padding: 0 16px calc(20px + env(safe-area-inset-bottom)); }
.sheet.open { transform: none; box-shadow: 0 -20px 60px rgba(0,0,0,.6); }
@media (min-width: 900px) { .sheet { inset-inline: auto 16px; inset-inline-start: auto; width: 440px; bottom: 16px; top: 16px; max-height: none; border-radius: 22px; transform: translateX(-120%); } .sheet.open { transform: none; } [dir=rtl] .sheet { left: 16px; right: auto; } }
.sheet .grab { position: sticky; top: 0; background: var(--panel2); padding: 10px 0 6px; z-index: 2; display: flex; justify-content: space-between; align-items: center; }
.sheet .grab::before { content: ""; position: absolute; top: 6px; left: 50%; width: 44px; height: 4px; border-radius: 4px; background: var(--line); transform: translateX(-50%); }
.sheet .cover { width: 100%; height: 150px; object-fit: cover; border-radius: 14px; background: linear-gradient(135deg, var(--c, var(--pink)), #1a1730); }
.sheet .head { display: flex; gap: 12px; align-items: center; margin: 12px 0; }
.sheet .logo { width: 58px; height: 58px; border-radius: 14px; object-fit: cover; background: #0f0d1c; border: 2px solid var(--c, var(--pink)); flex: none; }
.svc { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px; border-radius: 12px; border: 1px solid var(--line); margin-bottom: 6px; cursor: pointer; }
.svc.on { border-color: var(--pink); background: rgba(255,63,164,.08); }
.svc .p { font-weight: 800; color: var(--gold); white-space: nowrap; }
.sum { position: sticky; bottom: -20px; background: var(--panel2); padding: 10px 0; border-top: 1px solid var(--line); margin-top: 10px; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; }
.review { padding: 10px 0; border-bottom: 1px solid var(--line); }
.review .st { color: var(--gold); }
.reply { margin-top: 6px; padding: 8px; border-radius: 10px; background: rgba(255,255,255,.04); font-size: .9rem; }

.req-panel { position: fixed; z-index: 35; top: 120px; inset-inline-start: 10px; width: min(360px, calc(100vw - 80px)); background: var(--panel2); border: 1px solid var(--pink); border-radius: 18px; padding: 14px; box-shadow: 0 0 30px rgba(255,63,164,.35); max-height: 65vh; overflow: auto; }
.offer { padding: 10px; border: 1px solid var(--line); border-radius: 12px; margin-top: 8px; }
.radar { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--pink); animation: radar 1.4s infinite; display: inline-block; vertical-align: middle; margin-inline-end: 8px; }
@keyframes radar { 0% { box-shadow: 0 0 0 0 rgba(255,63,164,.7); } 100% { box-shadow: 0 0 0 18px rgba(255,63,164,0); } }

.ad-strip { position: fixed; z-index: 16; bottom: 128px; inset-inline-start: 10px; width: min(320px, 70vw); border-radius: 14px; overflow: hidden; border: 1px solid var(--gold); background: #000; }
.ad-strip img { width: 100%; display: block; max-height: 90px; object-fit: cover; }
.ad-strip .t { padding: 6px 10px; font-size: .85rem; }
.ad-strip .x { position: absolute; top: 4px; left: 6px; background: rgba(0,0,0,.6); border: 0; color: #fff; border-radius: 99px; cursor: pointer; }

.loader { position: fixed; inset: 0; z-index: 100; display: grid; place-content: center; text-align: center; background: var(--bg); transition: opacity .6s; }
.loader.off { opacity: 0; pointer-events: none; }
.loader .ring { width: 70px; height: 70px; margin: 0 auto 14px; border-radius: 50%; border: 3px solid transparent; border-top-color: var(--pink); border-left-color: var(--cyan); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.map-attr { position: fixed; z-index: 14; bottom: 2px; inset-inline-start: 8px; font-size: .62rem; opacity: .7; }
.list-mode { position: fixed; inset: 150px 10px 140px; overflow: auto; z-index: 10; }
.map-prog { position: fixed; z-index: 16; top: 120px; left: 50%; transform: translateX(-50%); background: rgba(18,16,30,.9); border: 1px solid var(--line); padding: 6px 14px; border-radius: 99px; font-size: .85rem; }

/* ===== HUD v3 — nothing overlaps, on small phones and large system fonts ===== */
.hud-top { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center;
  padding: calc(8px + env(safe-area-inset-top)) 10px 16px; }
.hud-top .brand { min-width: 0; display: flex; align-items: center; gap: 8px; text-shadow: none; }
.hud-top .brand-t { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.hud-top .loc { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; min-width: 0; gap: 6px; }
.hud-top .loc select { min-width: 0; width: 100%; text-overflow: ellipsis; }
.hud-top .filters { grid-column: 1 / -1; min-width: 0; }
.filters input { flex: 1 0 150px; max-width: 260px; min-width: 0; }
#btn-near { white-space: nowrap; gap: 4px; }
#btn-near .ic { width: 18px; height: 18px; }

.hud-side { top: var(--hud-t, 150px); bottom: calc(var(--hud-b, 150px) + 60px); align-content: start; grid-auto-rows: max-content;
  overflow-y: auto; scrollbar-width: none; padding: 2px; }
.hud-side::-webkit-scrollbar { display: none; }
.fab { width: 60px; height: auto; min-height: 54px; padding: 7px 3px 5px; gap: 3px; border-radius: 16px; align-content: center; }
.fab .ic { width: 22px; height: 22px; }
.fab span { font-size: 10px; line-height: 1.15; margin: 0; max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--txt); opacity: .85; }
.fab.bell[data-count]:not([data-count=""])::after { content: attr(data-count); position: absolute; top: -4px; inset-inline-start: -4px; min-width: 18px; height: 18px;
  border-radius: 9px; background: var(--pink); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; padding: 0 4px; }
.world-page .sky-btn { bottom: calc(var(--hud-b, 150px) + 8px); inset-inline-end: 16px; }

.hud-bottom { padding-top: 22px; }
.count { text-shadow: 0 1px 4px #000; color: #e9e3f2; }
.scard { flex: 0 0 min(240px, 74vw); }
.ad-strip { bottom: calc(var(--hud-b, 140px) + 8px); }

@media (max-width: 600px) {
  .hud-top .lbl { display: none; }            /* admin + near become icon buttons */
  .hud-top .brand-ico { width: 36px; height: 36px; }
  .hud-top .brand-t { font-size: 1.25rem; }
  .hud-top .brand-t small { font-size: .5rem; letter-spacing: .12em; }
  .hud-top .lang-sw, .hud-top .dash-link { min-height: 38px; padding: 6px 10px; }
  .loc select { font-size: .85rem; padding: 7px 8px; }
  .chip { padding: 6px 11px; }
  .fab { width: 54px; min-height: 50px; }
}
@media (max-height: 640px) { .fab span { display: none; } .fab { min-height: 44px; width: 46px; } }
.list-mode { inset: var(--hud-t, 150px) 76px var(--hud-b, 140px) 10px; }
@media (max-width: 600px) { .fab span { font-size: 9.5px; } }
/* live position: the locate button glows while the map follows you */
#btn-near.following { background: #3d8bff; box-shadow: 0 0 0 3px rgba(61,139,255,.35); }
