/* YarkeixZ 3.1 — mobile-first geometry. Loaded last. */
:root { --yz31-edge: 12px; --yz31-nav-bottom: max(10px, var(--safe-bottom)); --yz31-nav-height: 66px; --yz31-map-bottom: calc(var(--yz31-nav-bottom) + var(--yz31-nav-height) + 32px); }
html,body { max-width:100%; overflow:hidden; -webkit-text-size-adjust:100%; }
.app { width:100%; max-width:510px; height:100vh; height:100dvh; height:var(--yz31-keyboard-height,100dvh); min-height:0; margin-inline:auto; }
.view,.chat-room { min-width:0; min-height:0; }
.map-view { isolation:isolate; }
#map { z-index:0; }
.map-header { top:calc(var(--safe-top) + 10px); left:max(var(--yz31-edge),env(safe-area-inset-left)); right:max(var(--yz31-edge),env(safe-area-inset-right)); gap:8px; height:42px; }
.brand { font-size:21px; min-width:0; }
.brand-mark { width:36px;height:36px;flex-shrink:0; }
.demo-pill { min-width:0; padding:7px 9px; font-size:9px; white-space:nowrap; }
.map-search-wrap { top:calc(var(--safe-top) + 62px); left:max(var(--yz31-edge),env(safe-area-inset-left)); right:max(var(--yz31-edge),env(safe-area-inset-right)); z-index:740; }
.map-search { height:48px; border-radius:17px; padding:0 12px; }
.search-results { max-height: min(40dvh, 300px); overflow:auto; }
.yz31-map-tools { position:absolute; z-index:630; top:calc(var(--safe-top) + 120px); left:max(var(--yz31-edge),env(safe-area-inset-left)); right:max(var(--yz31-edge),env(safe-area-inset-right)); display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
.yz31-map-tools .yz30-tools { display:contents; }
.yz31-map-tools button { position:static; min-width:0; width:100%; height:44px; margin:0; padding:4px 3px; display:flex; align-items:center; justify-content:center; gap:4px; white-space:nowrap; font-size:clamp(10px,3vw,12px); border-radius:15px; color:#5635b3; background:rgba(255,255,255,.96); border:1px solid #fff; box-shadow:0 5px 16px #39255d22; }
.yz-map-status { top:calc(var(--safe-top) + 174px); left:max(var(--yz31-edge),env(safe-area-inset-left)); padding:7px 11px; display:flex; }
.map-view .yz-map-friends { top:calc(var(--safe-top) + 212px); left:max(var(--yz31-edge),env(safe-area-inset-left)); right:max(var(--yz31-edge),env(safe-area-inset-right)); }
.bottom-nav { left:max(var(--yz31-edge),env(safe-area-inset-left)); right:max(var(--yz31-edge),env(safe-area-inset-right)); bottom:var(--yz31-nav-bottom); width:auto; height:var(--yz31-nav-height); transform:none; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:3px; padding:5px; border-radius:23px; }
.nav-btn { height:auto; min-width:0; padding:4px 0; gap:4px; border-radius:17px; }
.nav-btn span { font-size:11px; white-space:nowrap; }
.map-actions { right:max(var(--yz31-edge),env(safe-area-inset-right)); bottom:var(--yz31-map-bottom); gap:8px; }
.circle-button { width:46px;height:46px;border-radius:15px; }
.yz-map-zoom { right:max(var(--yz31-edge),env(safe-area-inset-right)); bottom:calc(var(--yz31-map-bottom) + 108px);width:46px;border-radius:15px; }
.yz-map-zoom button { width:44px;height:44px; }
.map-view .yz-places-trigger { left:max(var(--yz31-edge),env(safe-area-inset-left)); bottom:var(--yz31-map-bottom); min-height:44px; max-width:calc(100% - 86px); }
.map-view .map-caption { left:max(var(--yz31-edge),env(safe-area-inset-left)); bottom:calc(var(--yz31-map-bottom) + 56px); max-width:calc(100% - 86px); font-size:11px; padding:9px 11px; border-radius:15px; }
#mapCaption { overflow-wrap:anywhere; min-width:0; }
#map .leaflet-control-attribution { margin-bottom:calc(var(--yz31-nav-bottom) + var(--yz31-nav-height) + 3px); max-width:100%; }
.friend-card { bottom:calc(var(--yz31-nav-bottom) + var(--yz31-nav-height) + 10px); }
.sheet-view { overflow-x:hidden; padding:calc(var(--safe-top) + 23px) max(16px,env(safe-area-inset-right)) calc(var(--yz31-nav-bottom) + var(--yz31-nav-height) + 24px) max(16px,env(safe-area-inset-left)); }
.message-list { min-height:0; }
.message-composer { flex-shrink:0; }
.message-composer button { flex-shrink:0; }
.yz31-keyboard .message-composer { padding-bottom:10px; }
.yz31-keyboard .bottom-nav { display:none; }
.auth-gate { overflow-x:hidden; }
.auth-orb { position:absolute; }
.yz-earth-panel { min-width:0; }
.yz-earth-scene { flex:1 1 0; min-height:0; height:auto; }
.yz-earth-bottom { flex-shrink:0; }
.yz-earth-controls button { min-height:44px; }
.yz-earth-controls .yz-earth-primary { min-width:0; flex:1 1 125px; }
.yz31-invite { margin:0 0 20px; padding:18px; border-radius:22px; background:var(--surface); color:var(--ink); border:1px solid var(--border); box-shadow:0 8px 24px #48316c12; }
.yz31-invite h2 { font-size:19px; margin:5px 0 8px; }
.yz31-invite p { font-size:13px; line-height:1.55; color:var(--muted); margin:0 0 12px; }
.yz31-invite .yz31-share { width:100%; min-height:46px; border-radius:14px; padding:10px; color:white; background:linear-gradient(120deg,#9259fa,#6844df); font-weight:800; }
.yz31-invite input { width:100%; min-width:0; margin-top:10px; padding:10px; border:1px solid var(--border); border-radius:12px; color:var(--ink); background:var(--background); }
.yz31-connect { display:flex; align-items:center; gap:8px; color:var(--muted); font-size:12px; margin-top:13px; }
.yz31-connect::before { content:''; width:8px;height:8px;border-radius:50%;background:#32b68b;flex-shrink:0; }
.yz31-connect[data-offline]::before { background:#e19042; }
.yz31-day { align-self:center; font-size:11px; font-weight:700; color:var(--muted); padding:6px 12px; border-radius:999px; background:var(--purple-soft); }
.message-bubble p { font-size:15px; }
@media (max-width:649px) { .app { max-width:100%; } input:not([type=checkbox]):not([type=radio]):not([type=file]), textarea, select { font-size:16px !important; } .yz-launch-emoji { font-size:40px; right:12px; top:18px; } .yz-launch-card h2,.yz-launch-card p { max-width:calc(100% - 40px); } }
@media (max-height:660px) { .yz-map-status { display:none; } .map-view .yz-map-friends { top:calc(var(--safe-top) + 172px); } .map-view .map-caption { display:none; } }
@media (max-height:500px) { .map-header { display:none; } .map-search-wrap { top:calc(var(--safe-top) + 8px); } .yz31-map-tools { top:calc(var(--safe-top) + 64px); } .map-view .yz-map-friends { top:calc(var(--safe-top) + 113px); } .yz-map-zoom { display:none; } .map-actions { flex-direction:row; } .map-view .yz-places-trigger { max-width:calc(100% - 126px); } .yz-earth-help,.yz-earth-note { display:none; } }
@media (prefers-reduced-motion:no-preference) { .yz31-share:active,.yz31-map-tools button:active { transform:scale(.97); } }
