:root{
  --bg:#0f1115; --panel:#11151c; --border:#202632; --text:#eaeef3; --muted:#9aa4b2;
  --brand:#ff7b00; --brand2:#ff9f3a;
  --header-h:56px; --nav-h:68px;
}
*{box-sizing:border-box}
html,body{height:100dvh}
body{
  margin:0; background:var(--bg); color:var(--text);
  font-family:system-ui, Segoe UI, Roboto, Arial, sans-serif;
}
a{color:#fff; text-decoration:none}
a.btn-link{display:inline-flex; gap:8px; align-items:center}

header{
  position:fixed; top:0; left:0; right:0; height:var(--header-h);
  display:flex; align-items:center; gap:8px; padding:0 12px;
  background:var(--panel); border-bottom:1px solid var(--border); z-index:30;
}
main{margin-top:var(--header-h)}
.container{max-width:920px; margin:0 auto; padding:16px}

.btn{
  appearance:none; border:1px solid #334155; background:#1f2937; color:#eaeef3;
  padding:10px 14px; border-radius:10px; cursor:pointer;
  transition:background .15s ease, transform .04s ease;
}
.btn:hover{background:#273141}
.btn:active{transform:scale(.98)}
.input{
  width:100%; padding:12px 14px; border-radius:10px;
  border:1px solid #2b3445; background:#0f1420; color:#eaeef3;
}
.row{display:flex; gap:12px; align-items:center}
.grid{display:grid; gap:12px}
.card{
  background:var(--panel); border:1px solid var(--border);
  border-radius:16px; padding:16px;
}

nav{
  position:fixed; left:0; right:0; bottom:0; height:var(--nav-h);
  background:linear-gradient(180deg,#101520,var(--panel));
  border-top:1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
  z-index:50;
}
.nav-grid{max-width:720px; margin:0 auto; height:var(--nav-h); display:grid; grid-template-columns:repeat(3,1fr)}
.nav-btn{
  appearance:none; border:0; background:transparent; color:#c7cedb;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:4px; font-size:12px; cursor:pointer; transition:color .15s ease, transform .05s ease;
}
.nav-btn:active{ transform:scale(.98) }
.nav-btn .ico{ font-size:18px; line-height:1 }
.nav-btn.active{ color:#fff }
.nav-btn.active .underline{
  width:24px; height:3px; border-radius:3px;
  background:linear-gradient(90deg,var(--brand),var(--brand2));
  margin-top:2px;
}

/* Vistas con mapa fijo */
.main-fixed{
  position:fixed; top:var(--header-h); left:0; right:0;
  height: calc(100dvh - var(--header-h) - var(--nav-h) - env(safe-area-inset-bottom));
  overflow:hidden;
}
#view-map{position:relative; height:100%; width:100%}
#map-canvas{position:absolute; inset:0}

.section-scroll{height: calc(100dvh - var(--header-h) - var(--nav-h) - env(safe-area-inset-bottom)); overflow:auto; -webkit-overflow-scrolling:touch}

/* Sheet sobre nav fija */
.sheet-wrap{position:fixed; inset:0; display:none; z-index:40}
.sheet-wrap.open{display:block}
.sheet-backdrop{position:absolute; inset:0; background:#0008}
.sheet{
  position:absolute; left:50%;
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom));
  transform:translateX(-50%);
  width:min(720px,100%); background:var(--panel);
  border:1px solid var(--border); border-bottom:0;
  border-top-left-radius:16px; border-top-right-radius:16px;
  box-shadow:0 -10px 40px #0007; overflow:hidden;
}
.sheet .handle{display:flex; justify-content:center; padding:10px}
.sheet .handle>div{width:56px; height:6px; border-radius:6px; background:#4b5563}
.sheet .content{padding:12px 14px 16px}
.chips{display:flex; gap:10px; align-items:center; flex-wrap:wrap}
.chip{background:#121722; border:1px solid var(--border); padding:8px 10px; border-radius:12px}
