:root{
  --bg:#06111c;
  --bg2:#0b1828;
  --panel:rgba(11,22,37,.80);
  --line:rgba(255,255,255,.08);
  --text:#f4f7fb;
  --muted:#9bb2cb;
  --blue:#5cb7ff;
  --cyan:#7de8ff;
  --shadow:0 24px 60px rgba(0,0,0,.35);
  --radius-xl:28px;
}

*{box-sizing:border-box}
html,body{
  margin:0;
  padding:0;
  min-height:100%;
  background:
    radial-gradient(circle at 10% 0%, rgba(91,184,255,.16), transparent 30%),
    radial-gradient(circle at 100% 100%, rgba(73,224,255,.08), transparent 24%),
    linear-gradient(180deg,var(--bg2),var(--bg));
  color:var(--text);
  font-family:Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a{text-decoration:none;color:inherit}
button,input,textarea{font:inherit}
button{
  cursor:pointer;
  appearance:none;
  -webkit-appearance:none;
  border:0;
  background:transparent;
  color:inherit;
}
.hidden{display:none!important}

body::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:-2;
  opacity:.18;
  background:
    linear-gradient(to top, rgba(3,8,17,.92), rgba(3,8,17,.26)),
    url('https://images.unsplash.com/photo-1500530855697-b586d89ba3ee?auto=format&fit=crop&w=1600&q=80') center/cover no-repeat;
}
body::after{
  content:"";
  position:fixed;
  inset:0;
  z-index:-1;
  pointer-events:none;
  background:linear-gradient(135deg, rgba(92,183,255,.08), transparent 45%, rgba(125,232,255,.05));
}

.glass{
  background:rgba(8,18,31,.72);
  backdrop-filter:blur(16px);
  border:1px solid var(--line);
}
.premium-card{
  border:1px solid var(--line);
  background:var(--panel);
  backdrop-filter:blur(14px);
  box-shadow:var(--shadow);
  border-radius:var(--radius-xl);
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  font-size:18px;
  font-weight:800;
}
.brand-mark{
  width:24px;
  height:24px;
  border-radius:8px;
  transform:rotate(45deg);
  position:relative;
  background:linear-gradient(135deg,var(--cyan),var(--blue));
  box-shadow:0 10px 22px rgba(92,183,255,.34);
}
.brand-mark::before{
  content:"";
  position:absolute;
  inset:6px;
  border-radius:5px;
  background:#0c1829;
}
.brand-mark::after{
  content:"";
  position:absolute;
  left:4px;
  right:4px;
  bottom:4px;
  height:6px;
  border-radius:999px;
  background:linear-gradient(90deg,var(--cyan),var(--blue));
}

.icon-btn,.ghost-btn,.primary-btn{border-radius:14px;color:var(--text)}
.icon-btn{
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  background:rgba(255,255,255,.07);
  border:1px solid rgba(255,255,255,.08);
}
.ghost-btn{
  background:rgba(255,255,255,.08);
  border:1px solid var(--line);
  padding:10px 14px;
  font-weight:700;
}
.primary-btn{
  background:linear-gradient(135deg,#4f90ff,#5bd0ff);
  padding:14px 18px;
  font-weight:800;
}
.eyebrow{
  display:inline-flex;
  padding:8px 12px;
  border-radius:999px;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.08);
  font-size:12px;
  font-weight:800;
  letter-spacing:.2px;
  text-transform:uppercase;
}
.section-block{margin-top:18px}
.section-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}
.section-head h2{
  margin:0;
  font-size:24px;
  letter-spacing:-.4px;
}
.section-head p{
  margin:4px 0 0;
  color:var(--muted);
  font-size:13px;
}
.helper-text{color:var(--muted);font-size:13px}
.detail-block{color:#dfe9f7;line-height:1.55}
.mini-list{display:grid;gap:8px;margin-top:10px}
.mini-list-item{
  padding:10px 12px;
  border-radius:14px;
  background:rgba(255,255,255,.05);
  border:1px solid rgba(255,255,255,.07);
  font-size:13px;
}
.empty-state{
  padding:20px;
  border-radius:20px;
  background:rgba(255,255,255,.04);
  border:1px solid var(--line);
  color:var(--muted);
  text-align:center;
}
.leaflet-container{background:#0b1625}

/* PUBLIC */
.mobile-shell{
  width:min(100%, 520px);
  margin:0 auto;
  min-height:100vh;
  padding-bottom:108px;
}
.mobile-topbar{
  position:sticky;
  top:0;
  z-index:20;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:14px 16px;
  border-radius:0 0 24px 24px;
}
.top-actions{display:flex;gap:10px}
.public-main{padding:16px}
.hero-card{
  min-height:320px;
  padding:22px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  overflow:hidden;
  position:relative;
  background:
    linear-gradient(to top, rgba(5,12,20,.90), rgba(5,12,20,.12)),
    url('https://images.unsplash.com/photo-1506744038136-46273834b3fb?auto=format&fit=crop&w=1400&q=80') center/cover no-repeat;
}
.hero-copy h1{
  margin:14px 0 10px;
  font-size:34px;
  line-height:.95;
  letter-spacing:-1.1px;
  max-width:360px;
}
.hero-copy p{
  margin:0;
  color:#d9e6f6;
  font-size:14px;
  max-width:360px;
}
.hero-stats{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:10px;
}
.stat-card{
  padding:14px 12px;
  border-radius:18px;
  background:rgba(6,14,24,.56);
  backdrop-filter:blur(12px);
  border:1px solid rgba(255,255,255,.08);
}
.stat-card strong{
  display:block;
  font-size:17px;
  margin-bottom:4px;
}
.stat-card span{
  color:#bfd0e5;
  font-size:12px;
}

.map-wrap{
  position:relative;
  overflow:hidden;
  min-height:360px;
}
#publicMap,#adminMap{
  width:100%;
  height:100%;
  min-height:360px;
  border-radius:inherit;
}
.map-chip{
  position:absolute;
  left:14px;
  bottom:14px;
  padding:12px 14px;
  border-radius:16px;
  background:rgba(5,12,20,.72);
  border:1px solid rgba(255,255,255,.08);
  backdrop-filter:blur(12px);
}
.map-chip span{
  display:block;
  color:var(--muted);
  font-size:11px;
}
.map-chip strong{
  display:block;
  font-size:14px;
  margin-top:4px;
}

.two-col,.three-col{
  display:grid;
  gap:14px;
  grid-template-columns:1fr;
}
.weather-card,.spotify-card,.info-card{padding:14px}
.spotify-card{
  display:grid;
  grid-template-columns:88px 1fr;
  gap:14px;
  background:linear-gradient(135deg, rgba(11,18,28,.95), rgba(31,44,66,.78));
}
.spotify-cover{
  width:88px;
  height:88px;
  border-radius:20px;
  background:
    linear-gradient(to top, rgba(0,0,0,.22), rgba(0,0,0,.22)),
    url('https://images.unsplash.com/photo-1493225457124-a3eb161ffa5f?auto=format&fit=crop&w=500&q=80') center/cover no-repeat;
}
.spotify-copy small{color:#bfd0e5}
.spotify-copy strong{
  display:block;
  font-size:24px;
  margin:4px 0 2px;
}
.spotify-copy span{color:var(--muted)}
.text-link{
  display:inline-block;
  margin-top:8px;
  color:var(--cyan);
  font-weight:700;
}
.progress-line{
  margin-top:12px;
  height:6px;
  background:rgba(255,255,255,.08);
  border-radius:999px;
  overflow:hidden;
}
.progress-line span{
  display:block;
  width:62%;
  height:100%;
  background:linear-gradient(90deg,#61ffa9,#99ffd0);
}
.info-card span{
  display:block;
  color:var(--muted);
  font-size:13px;
}
.info-card strong{
  display:block;
  font-size:28px;
  margin:10px 0 6px;
}
.info-card small{color:#d8e5f6}
.ai-card{
  position:relative;
  padding:18px 18px 18px 64px;
}
.ai-badge{
  position:absolute;
  left:18px;
  top:18px;
  width:34px;
  height:34px;
  border-radius:50%;
  display:grid;
  place-items:center;
  background:linear-gradient(135deg,var(--cyan),var(--blue));
  color:#072036;
  font-weight:900;
}
.ai-card p{
  margin:0;
  color:#e4edf8;
  line-height:1.5;
}

/* MURO: UNA SOLA PREVIEW GRANDE */
.moments-feed{display:block}
.moment-gallery{
  padding:12px;
  overflow:hidden;
}
.moment-gallery-stage{position:relative}
.moment-stage-btn{
  position:relative;
  display:block;
  width:100%;
  min-height:520px;
  border-radius:24px;
  overflow:hidden;
  padding:0;
  text-align:left;
  background:#07111c;
}
.moment-stage-image{
  position:absolute;
  inset:0;
  background:center center / cover no-repeat;
}
.moment-stage-overlay{
  position:absolute;
  inset:0;
  background:
    linear-gradient(to top, rgba(3,8,17,.96) 8%, rgba(3,8,17,.44) 42%, rgba(3,8,17,.08) 72%);
}
.moment-stage-copy{
  position:relative;
  z-index:2;
  min-height:520px;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  gap:10px;
  padding:18px;
}
.moment-stage-topline{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.moment-stage-topline-left{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}
.moment-options-wrap{
  position:relative;
  z-index:4;
  margin-left:auto;
}
.moment-options-toggle{
  width:38px;
  height:38px;
  border-radius:50%;
  display:grid;
  place-items:center;
  background:rgba(255,255,255,.10);
  border:1px solid rgba(255,255,255,.10);
  backdrop-filter:blur(10px);
}
.moment-options-toggle span{
  display:block;
  width:4px;
  height:4px;
  border-radius:50%;
  background:#fff;
  margin:2px auto;
}
.moment-options-menu{
  position:absolute;
  top:46px;
  right:0;
  min-width:168px;
  padding:8px;
  border-radius:16px;
  background:rgba(6,14,24,.96);
  border:1px solid rgba(255,255,255,.10);
  box-shadow:0 18px 40px rgba(0,0,0,.35);
  display:none;
  gap:6px;
}
.moment-options-wrap.open .moment-options-menu{
  display:grid;
}
.moment-option-item{
  width:100%;
  text-align:left;
  padding:10px 12px;
  border-radius:12px;
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.06);
  color:#fff;
  font-weight:700;
}
.moment-option-item.danger{
  color:#ffb4b4;
}
#momentStageTitle[contenteditable="true"],
#momentStageDescription[contenteditable="true"]{
  outline:1px dashed rgba(125,232,255,.45);
  outline-offset:6px;
}
.moment-stage-chip,
.moment-stage-count{
  display:inline-flex;
  align-items:center;
  padding:8px 12px;
  border-radius:999px;
  background:rgba(255,255,255,.10);
  border:1px solid rgba(255,255,255,.10);
  font-size:12px;
  font-weight:800;
}
.moment-stage-copy h3{
  margin:0;
  font-size:28px;
  letter-spacing:-.6px;
}
.moment-stage-copy p{
  margin:0;
  color:#dce8f6;
  line-height:1.45;
  font-size:14px;
}
.moment-stage-meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.moment-stage-meta span{
  display:inline-flex;
  align-items:center;
  padding:8px 10px;
  border-radius:12px;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.08);
  font-size:12px;
  color:#e8f1fb;
}

/* SOLO FLECHAS + DOTS. SIN MINI PREVIEWS */
.moment-gallery-controls{
  display:grid;
  grid-template-columns:44px 1fr 44px;
  align-items:center;
  gap:10px;
  margin-top:12px;
}
.moment-nav-btn{
  width:38px;
  height:38px;
  border-radius:50%;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.06);
  color:#fff;
  font-size:18px;
  display:grid;
  place-items:center;
  justify-self:center;
}
.moment-dots{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:20px;
}
.moment-dot{
  width:8px;
  height:8px;
  border-radius:50%;
  background:rgba(255,255,255,.22);
  padding:0;
}
.moment-dot.active{
  width:22px;
  border-radius:999px;
  background:linear-gradient(90deg,var(--cyan),var(--blue));
}

/* FORZAR OCULTAR CUALQUIER PREVIEW CHICA */
.moment-thumbs{
  display:none !important;
}
.moment-thumb{
  display:none !important;
}

/* FULLSCREEN REAL */
.viewer{
  position:fixed;
  inset:0;
  z-index:100;
  padding:0;
  background:#020812;
  display:flex;
  flex-direction:column;
}
.viewer-close{
  position:absolute;
  top:12px;
  right:12px;
  z-index:105;
  width:46px;
  height:46px;
  border-radius:50%;
  font-size:24px;
  color:#fff;
  background:rgba(255,255,255,.10);
}
.viewer-image{
  position:relative;
  width:100vw;
  height:100vh;
  overflow:hidden;
  background:#020812;
}
.viewer-image-inner{
  width:100%;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  transform-origin:center center;
  transition:transform .08s linear;
  will-change:transform;
}
.viewer-image-inner img{
  max-width:100vw;
  max-height:100vh;
  width:auto;
  height:auto;
  user-select:none;
  -webkit-user-drag:none;
  pointer-events:none;
}
.viewer-caption,
.viewer-meta{
  position:absolute;
  left:0;
  right:0;
  z-index:104;
  padding-left:16px;
  padding-right:16px;
}
.viewer-caption{
  bottom:116px;
  font-size:20px;
  font-weight:800;
  color:#fff;
}
.viewer-meta{
  bottom:20px;
  display:grid;
  gap:8px;
  color:#dbe7f6;
}
.viewer-meta-main{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.viewer-meta-main strong{font-size:16px}
.viewer-meta-main span{
  color:var(--muted);
  font-size:13px;
}
.viewer-meta-text{
  line-height:1.5;
  font-size:14px;
}
.viewer-meta-stats{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.viewer-meta-stats span{
  display:inline-flex;
  align-items:center;
  padding:8px 10px;
  border-radius:12px;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.08);
  font-size:12px;
}
.viewer-nav{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  width:48px;
  height:48px;
  border-radius:50%;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.10);
  color:#fff;
  font-size:24px;
  z-index:105;
  display:grid;
  place-items:center;
}
.viewer-nav-prev{left:12px}
.viewer-nav-next{right:12px}

/* MENU INFERIOR */
.bottom-nav{
  position:fixed;
  left:50%;
  bottom:12px;
  transform:translateX(-50%);
  z-index:30;
  width:min(calc(100% - 24px), 520px);
  display:grid;
  grid-template-columns:repeat(5,1fr);
  gap:4px;
  padding:8px;
  border-radius:24px;
}
.nav-item{
  min-height:58px;
  border-radius:18px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:4px;
  color:#d9e6f6;
  background:transparent;
  font-size:12px;
  font-weight:700;
}
.nav-item strong{
  display:block;
  font-size:18px;
  line-height:1;
}
.nav-item span{
  display:block;
  font-size:12px;
  line-height:1;
}
.nav-item.active{
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.08);
}

/* ADMIN */
.admin-shell{
  width:min(1500px, calc(100% - 24px));
  margin:12px auto;
  display:grid;
  grid-template-columns:280px 1fr;
  gap:16px;
}
.sidebar{
  position:sticky;
  top:12px;
  align-self:start;
  padding:20px;
}
.sidebar-brand{margin-bottom:20px}
.sidebar-nav{display:grid;gap:10px}
.sidebar-link{
  padding:14px 16px;
  border-radius:16px;
  background:transparent;
  border:1px solid transparent;
  color:#d9e6f6;
  font-weight:700;
}
.sidebar-link.active,.sidebar-link:hover{
  background:linear-gradient(135deg, rgba(75,137,255,.26), rgba(93,183,255,.18));
  border-color:rgba(125,232,255,.18);
}
.sidebar-note{
  margin-top:18px;
  padding-top:18px;
  border-top:1px solid var(--line);
  color:var(--muted);
}
.sidebar-note p{line-height:1.55}
.admin-main{display:grid;gap:16px}
.admin-header{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:14px;
  padding:20px;
  border-radius:26px;
}
.admin-header h1{
  margin:8px 0 0;
  font-size:34px;
  letter-spacing:-1px;
}
.dashboard-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:14px;
}
.metric-box{padding:18px}
.metric-box span{
  display:block;
  color:var(--muted);
  font-size:13px;
}
.metric-box strong{
  display:block;
  font-size:42px;
  margin:10px 0 6px;
}
.metric-box small{color:#d9e6f6}
.metric-box.featured{
  background:linear-gradient(135deg, rgba(71,134,255,.24), rgba(73,224,255,.16));
}
.metric-box.success{
  background:linear-gradient(135deg, rgba(55,167,122,.22), rgba(86,223,158,.12));
}
.admin-panels{
  display:grid;
  grid-template-columns:1.05fr .95fr;
  gap:14px;
}
.route-panel,.form-panel,.settings-panel,.admin-feed-panel{padding:18px}
.moment-form,.settings-form{display:grid;gap:12px}
.field-row{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:12px;
}
label span{
  display:block;
  font-size:13px;
  color:var(--muted);
  margin-bottom:8px;
}
input,textarea{
  width:100%;
  border:1px solid var(--line);
  background:rgba(255,255,255,.05);
  color:var(--text);
  padding:14px 14px;
  border-radius:16px;
  outline:none;
}
.upload-preview{
  width:100%;
  min-height:220px;
  border-radius:20px;
  border:1px dashed rgba(255,255,255,.18);
  background:rgba(255,255,255,.03);
  display:grid;
  place-items:center;
  color:var(--muted);
  background-position:center;
  background-size:cover;
  overflow:hidden;
}
.settings-grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:14px;
}
.actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.admin-feed{
  display:grid;
  gap:12px;
}
.admin-moment{
  display:grid;
  grid-template-columns:120px 1fr auto;
  gap:14px;
  align-items:center;
  padding:12px;
  border-radius:20px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.04);
}
.admin-moment-image{
  width:120px;
  height:120px;
  border-radius:16px;
  background:#0b1625 center/cover no-repeat;
}
.delete-btn{
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.05);
  color:#fff;
  padding:10px 14px;
  border-radius:14px;
}

@media (min-width: 720px){
  .two-col{grid-template-columns:1fr 1fr}
  .three-col{grid-template-columns:repeat(3,1fr)}
}

@media (max-width: 1080px){
  .admin-shell{grid-template-columns:1fr}
  .sidebar{position:relative;top:0}
  .admin-panels,.settings-grid,.dashboard-grid{grid-template-columns:1fr}
}

@media (max-width: 680px){
  .public-main{padding:14px}
  .hero-copy h1{font-size:30px}
  .hero-stats,.field-row{grid-template-columns:1fr}
  .spotify-card{grid-template-columns:1fr}
  .moment-stage-btn{min-height:420px;border-radius:22px}
  .moment-stage-copy{min-height:420px;padding:16px}
  .moment-stage-copy h3{font-size:22px}
  .moment-stage-copy p{font-size:13px;line-height:1.4}
  .moment-stage-topline{
    align-items:flex-start;
    gap:8px;
  }
  .moment-stage-topline-left{
    flex-wrap:wrap;
  }
  .moment-options-wrap{
    margin-left:0;
    align-self:flex-end;
  }
  .moment-gallery-controls{
    grid-template-columns:34px 1fr 34px;
    gap:8px;
    margin-top:10px;
  }
  .moment-nav-btn{
    width:30px;
    height:30px;
    font-size:16px;
    opacity:.85;
  }
  .moment-dots{gap:6px}
  .moment-dot{width:7px;height:7px}
  .moment-dot.active{width:18px}

  .viewer-nav{
    width:40px;
    height:40px;
    font-size:20px;
    top:auto;
    bottom:132px;
    transform:none;
  }
  .viewer-nav-prev{left:12px}
  .viewer-nav-next{right:12px}
  .viewer-caption{bottom:118px;font-size:18px}
  .viewer-meta{bottom:14px}

  .bottom-nav{
    width:calc(100% - 16px);
    bottom:8px;
    padding:6px;
    border-radius:20px;
  }
  .nav-item{
    min-height:52px;
    gap:3px;
  }
  .nav-item strong{font-size:16px}
  .nav-item span{font-size:11px}
}

@media (max-width: 420px){
  .moment-stage-btn{min-height:380px}
  .moment-stage-copy{min-height:380px;padding:14px}
  .moment-stage-copy h3{font-size:20px}
  .moment-stage-meta span{font-size:11px;padding:7px 9px}
  .moment-nav-btn{width:28px;height:28px;font-size:15px}
}

/* FINAL: ocultar panel duplicado de momentos en privado */
.admin-feed-panel {
  display: none !important;
}


/* FIX FINAL FULLSCREEN + MENU */
.moment-gallery-stage{position:relative}
.moment-stage-shell{position:relative;min-height:520px;border-radius:24px;overflow:hidden;background:#07111c}
.moment-stage-open-hitarea{position:absolute;inset:0;z-index:1;padding:0;border:0;background:transparent}
.moment-stage-image,.moment-stage-overlay{pointer-events:none}
.moment-stage-copy{position:relative;z-index:2;pointer-events:none}
.moment-options-wrap,.moment-options-toggle,.moment-options-menu,.moment-option-item{pointer-events:auto}
.moment-stage-topline-left,.moment-stage-chip,.moment-stage-count{display:none!important}
