:root{
  --bg:#FFFDF7;
  --accent:#FF9922;
  --accent-soft:#FFC169;
  --dark:#502314;
  --white:#FFFFFF;
  --neutral-light:#F0EEE8;
  --content-width:1200px;
  --sidebar-width:220px;
  --radius:22px;
  --radius-pill:999px;
  --gap:16px;
}

*{margin:0;padding:0;box-sizing:border-box;font-family:'Poppins',Arial,sans-serif;}
img{max-width:100%;height:auto;display:block;}
html,body{
  background:var(--bg);
  color:var(--dark);min-height:100vh;
  overscroll-behavior:none;touch-action:pan-y;
  overflow-x:hidden;
}
html.modal-lock,body.modal-lock{overflow:hidden;height:100%;touch-action:none;}
a{text-decoration:none;color:inherit;}
button{cursor:pointer;font-family:inherit;background:none;border:none;touch-action:manipulation;}
svg{display:block;}
input,select,textarea{font-family:inherit;}

input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear{display:none;}
input::-webkit-credentials-auto-fill-button,
input::-webkit-strong-password-auto-fill-button{visibility:hidden;position:absolute;}

@keyframes shakeAnim{
  0%,100%{transform:translateX(0);}
  20%{transform:translateX(-6px);}
  40%{transform:translateX(6px);}
  60%{transform:translateX(-4px);}
  80%{transform:translateX(4px);}
}

/* ===== Botones ===== */
.full{width:100%;}

/* Botón usado en login y en el modal de agregar lugar: mismo estilo siempre */
.modal-cta-btn{
  width:100%;background:var(--dark);color:var(--white);border:none;border-radius:var(--radius-pill);
  font-size:24px;font-weight:800;padding:14px 18px;cursor:pointer;font-family:inherit;
  transition:transform .12s ease, opacity .12s ease;
}
.modal-cta-btn:hover{opacity:.9;}
.modal-cta-btn:active{transform:scale(.97);}

/* ===================== LOGIN / REGISTRO (legado, login.php es autocontenido) ===================== */
.pw-toggle{
  position:absolute;right:4px;top:50%;transform:translateY(-50%);
  width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center;
  color:var(--dark);opacity:0;visibility:hidden;transition:opacity .15s ease;
}
.pw-toggle.show{opacity:.45;visibility:visible;}
.pw-toggle.show:hover{opacity:.85;}
.auth-switch{font-size:11.5px;color:var(--white);font-weight:400;opacity:.9;}
.auth-switch b{font-weight:600;text-decoration:underline;}

/* ===================== APP SHELL ===================== */
.app{width:100%;min-height:100vh;position:relative;display:flex;flex-direction:column;}

/* ===== Header: avatar izquierda + nombre + redes (paginas internas, legado) ===== */
.page-header{
  background:transparent;padding:20px 18px 0;position:relative;
}
.header-settings{
  position:absolute;top:14px;right:16px;width:25px;height:25px;border-radius:50%;
  background:var(--white);
}
.header-top-row{display:flex;align-items:center;gap:14px;padding-right:30px;}
.avatar-wrap{position:relative;width:70px;height:70px;flex:none;}
.avatar-circle{
  width:70px;height:70px;border-radius:50%;background:var(--white);color:var(--dark);
  display:flex;align-items:center;justify-content:center;font-size:24px;font-weight:800;
  border:4px solid var(--bg);
}
.avatar-edit{
  position:absolute;bottom:-2px;right:-2px;width:22px;height:22px;border-radius:50%;
  background:var(--accent);
  border:3px solid var(--bg);
}
.header-user-info{flex:1;min-width:0;text-align:left;}
.header-user-info h2{font-size:18px;font-weight:600;color:var(--dark);margin-bottom:8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.social-row{display:flex;gap:8px;}
.social-box{
  width:22px;height:22px;background:transparent;color:var(--accent-soft);
  display:flex;align-items:center;justify-content:center;flex:none;
}

.tabs-label{text-align:center;font-size:22px;font-weight:800;color:var(--dark);letter-spacing:.5px;text-transform:capitalize;margin-top:18px;padding-bottom:5px;}

/* Card blanca: esquinas superiores redondeadas revelan el fondo */
.page-card{
  background:var(--white);
  border-radius:36px 36px 0 0;
  position:relative;z-index:2;margin-top:0;
  padding:0 16px 130px;
  flex:1;
  overflow:visible;
}

.content-area{max-width:var(--content-width);margin:0 auto;}

/* ===== Tabs de categoría (legado) ===== */
.tab{
  background:none;color:var(--accent);
  display:flex;align-items:center;justify-content:center;
  transition:color .3s ease;
}
.tab svg{width:24px;height:24px;transition:width .3s ease, height .3s ease;}
.tab.active{color:var(--dark);}
.tab.active svg{width:32px;height:32px;}

/* Gap entre ITEMS completos (tarjeta+detalle juntos como una unidad), nunca
   entre la tarjeta y su propio detalle desplegado (eso se maneja dentro de
   cada .place-item, sin gap, para que no se vea una franja de otro color). */
.places-grid{display:flex;flex-direction:column;gap:12px;padding:0 20px;position:relative;}
.list-bottom-spacer{height:110px;flex:none;width:100%;}
  .place-item{display:flex;flex-direction:column;}

/* Items de listado: fondo blanco con sombra ligera, en todas las listas. */
.place-card{
  display:flex;align-items:center;gap:14px;background:var(--white);border-radius:var(--radius-pill);
  padding:8px;transition:transform .12s ease, box-shadow .12s ease, border-radius .2s ease, opacity .15s ease;
  cursor:pointer;box-shadow:0 2px 10px rgba(80,35,20,.08);
}
.place-card:hover{box-shadow:0 4px 14px rgba(80,35,20,.12);}
.place-card.expanded{border-radius:30px 30px 0 0;}

/* Modo reordenar: el item que se esta arrastrando queda COMPLETAMENTE oculto
   (opacity 0), ya que su lugar visual lo ocupa el "fantasma" que sigue al
   dedo/cursor — asi nunca se ven 2 copias del mismo item a la vez. */

/* Modo reordenar: SIN manija/icono aparte — se arrastra el item completo. */

/* Circulo del lugar: por ahora con fondo naranja detras del icono de
   categoria (prueba visual solicitada), en la MISMA ubicacion/tamano de
   siempre, solo en los listados. */
.place-thumb{width:44px;height:44px;border-radius:50%;background:transparent;flex:none;overflow:hidden;display:flex;align-items:center;justify-content:center;}
.place-thumb img{width:100%;height:100%;object-fit:contain;padding:8px;}
.place-info{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px;}
.place-info h4{font-size:16px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.2;}
.place-info span{font-size:12px;color:var(--dark);opacity:.55;line-height:1.1;}
.stars-row{display:inline-flex;gap:1px;color:var(--accent);vertical-align:middle;}

.place-meta{display:flex;align-items:center;gap:6px;flex:none;}
.place-rating-badge{
  position:relative;flex:none;height:44px;
  display:flex;align-items:center;justify-content:center;
}
.place-rating-badge-bg{
  display:block;height:44px;width:auto;
}
.place-rating-badge-num{
  position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);
  font-size:13px;font-weight:700;color:var(--dark);
}
.place-comment-toggle{
  width:26px;height:26px;border-radius:50%;background:var(--neutral-light);color:var(--dark);
  display:flex;align-items:center;justify-content:center;flex:none;transition:transform .2s ease;
}
.place-comment-toggle svg{width:12px;height:12px;}
.place-comment-toggle.open svg{transform:rotate(180deg);}
.place-comment-box{
  background:var(--white);padding:0 16px;animation:placeDetailIn .18s ease;
}
.place-comment-box p{padding:10px 0 14px;font-size:13px;color:var(--dark);opacity:.85;line-height:1.4;}


/* Panel de detalle: mismo fondo BLANCO que la tarjeta, tocandose directo
   sin gap ni margen negativo. */
.place-detail{
  position:relative;
  background:var(--white);border-radius:0 0 30px 30px;
  box-shadow:0 2px 10px rgba(80,35,20,.08);
  animation:placeDetailIn .22s ease;
  padding:14px 16px 16px;
}
@keyframes placeDetailIn{ from{opacity:0;} to{opacity:1;} }
.place-map-preview{
  width:100%;height:140px;border-radius:14px;background:var(--neutral-light);
  display:flex;align-items:center;justify-content:center;
  color:var(--dark);opacity:.55;font-size:12px;margin-bottom:12px;
}
.place-map-mini{ position:relative;overflow:hidden;opacity:1;cursor:pointer;z-index:0; }

.place-detail-actions{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;}
.place-detail-icon-btn{
  width:38px;height:38px;border-radius:50%;background:var(--neutral-light);color:var(--dark);
  display:flex;align-items:center;justify-content:center;border:none;
  transition:.12s ease;
}
.place-detail-icon-btn svg{width:16px;height:16px;}
.place-detail-icon-btn:hover{background:var(--accent);color:var(--white);}
.place-detail-icon-btn.danger{color:#B23A00;}
.place-detail-icon-btn.danger:hover{background:#B23A00;color:var(--white);}

.empty-state{text-align:center;color:var(--dark);opacity:.55;font-size:13px;padding:50px 20px;}

/* Spinner de carga simple, centrado, se reemplaza apenas llegan los datos */
.loading-spinner{
  width:32px;height:32px;margin:70px auto;
  border:3px solid rgba(80,35,20,.15);border-top-color:var(--accent);
  border-radius:50%;animation:spinLoad .7s linear infinite;
}
@keyframes spinLoad{ to{ transform:rotate(360deg); } }

.page-loader{
  position:fixed;inset:0;z-index:99999;background:var(--bg);
  display:flex;align-items:center;justify-content:center;
  transition:opacity .25s ease;opacity:1;
}
.page-loader.hide{ opacity:0;pointer-events:none; }
.page-loader .loading-spinner{ margin:0; }

/* ===== Bienvenida / Home (con o sin lugares): fondo unico y claro en toda
   la app (#FFFDF7) — antes era un degradado naranja, ahora es plano, pero
   la FORMA (cupula, avatar, boton +, etc.) es exactamente la misma. ===== */
.welcome-page{
  min-height:100vh;min-height:-webkit-fill-available;
  height:100vh;height:100dvh;
  position:relative;
  overflow:hidden;
  background:var(--bg);
  display:flex;flex-direction:column;
  padding-bottom:94px;
}
.welcome-page.has-grid{ overflow-y:auto; -webkit-overflow-scrolling:touch; }

.welcome-page::after{
  content:"";position:absolute;inset:0;z-index:5;pointer-events:none;
  background:rgba(0,0,0,0);-webkit-backdrop-filter:blur(0px);backdrop-filter:blur(0px);
  transition:background .35s ease, backdrop-filter .35s ease, -webkit-backdrop-filter .35s ease;
}

/* ===== Barra compacta: aparece al hacer scroll hacia abajo. Ahora clara
   (como el resto de la app), con el logo/icono en color oscuro. ===== */

/* ===== Menu de usuario: cupula+avatar se desliza como UNA sola pieza
   (misma forma/animacion de siempre; solo cambia el color de la cupula). ===== */


/* Texto que antes iba en blanco (para leerse sobre el degradado naranja)
   ahora en oscuro, ya que el fondo de la pagina es siempre claro. */



.big-plus{
  position:fixed;left:50%;bottom:30px;transform:translateX(-50%) scale(1);
  width:64px;height:64px;border-radius:32px;background:var(--accent);
  border:none;
  color:var(--white);display:flex;align-items:center;justify-content:center;font-size:32px;
  box-shadow:0 8px 20px rgba(255,153,34,.35);transition:transform .2s ease, box-shadow .2s ease;z-index:20;
  overflow:hidden;
}
.big-plus span{display:block;transition:transform .22s ease, opacity .22s ease;}
.big-plus:hover{transform:translateX(-50%) scale(1.08);box-shadow:0 10px 26px rgba(255,153,34,.42);}
.big-plus:hover span{transform:scale(1.15);}
.big-plus:active{transform:translateX(-50%) scale(.93);}


/* ===== Grid de categorías: SIEMPRE se muestran todas (6), aunque no
   tengan lugares — la que no tiene nada se ve apagada (clase .inactive).
   Tarjeta blanca con borde naranja, icono grande, texto abajo — mismo
   estilo limpio que el resto del sitio. ===== */
.cat-grid{
  display:flex;flex-wrap:wrap;justify-content:center;gap:20px;
  width:100%;margin:0 auto;padding:6px 20px 10px;
}
.cat-card{
  flex:0 0 calc(50% - 10px);aspect-ratio:1/1;
  background:var(--white); /*border:2px solid var(--accent); */ border-radius:20px;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;
  padding:10px;overflow:hidden;
  box-shadow:0 2px 10px rgba(80,35,20,.06);
  transition:transform .15s ease, opacity .15s ease;
}
.cat-card:hover{border:2px solid var(--accent);}
.cat-card:active{transform:scale(.96);}
.cat-card img{width:100%;max-width:90px;max-height:90px;object-fit:contain;}
.cat-card span{display:block;font-weight:800;font-size:14px;color:var(--dark);text-transform:uppercase;letter-spacing:.3px;}
/* Categoria sin ningun lugar agregado: se ve apagada (pero sigue siendo
   clicable, para invitar a agregar el primer lugar ahi). */
.cat-card.inactive{opacity:.4;filter:grayscale(70%);cursor:not-allowed;}

/* Modo lista (horizontal, una tras otra): solo disponible en movil */
.cat-grid.list-mode{flex-direction:column;max-width:460px;margin:0 auto;}
.cat-grid.list-mode .cat-card{
  flex:0 0 auto;aspect-ratio:auto;width:100%;
  flex-direction:row;justify-content:flex-start;gap:14px;padding:14px 18px;
}
.cat-grid.list-mode .cat-card img{width:52px;max-width:52px;max-height:52px;}
.cat-grid.list-mode .cat-card span{font-size:14px;}

/* ===== Cabecera de la lista dentro de una categoria ===== */







/* ===== Bottom nav: barra simple (legado) ===== */
.bottom-nav-wrap{position:fixed;bottom:0;left:0;right:0;width:100%;z-index:40;}
.bottom-nav{
  background:var(--white);
  border-radius:36px 36px 0 0;
  box-shadow:0 -2px 10px rgba(80,35,20,.06);
  display:grid;grid-template-columns:1fr 1fr 65px 1fr 1fr;align-items:center;
  padding:20px 18px calc(16px + env(safe-area-inset-bottom, 0px));
}
.bottom-nav a{
  justify-self:center;width:14px;height:14px;border-radius:50%;background:var(--neutral-light);
  transition:opacity .15s ease, transform .15s ease;
}
.bottom-nav a.active{opacity:1;background:var(--accent);}
.bottom-nav a:active{transform:scale(.85);}
.nav-plus{
  justify-self:center;margin-top:-30px;width:65px;height:65px;border-radius:50%!important;
  background:var(--accent);
  box-shadow:0 0 0 6px var(--white);
}
.nav-plus:active{transform:scale(.94);}

.sidebar{display:none;}

/* ===== Modal (bottom sheet) tipo iOS: sube y baja siempre animado ===== */
.modal-bg{
  position:fixed;inset:0;
  display:flex;align-items:flex-end;justify-content:center;z-index:50;
  opacity:0;visibility:hidden;pointer-events:none;
  background:rgba(0,0,0,0);-webkit-backdrop-filter:blur(0px);backdrop-filter:blur(0px);
  transition:opacity .32s ease, background .32s ease, visibility 0s linear .32s;
}
.modal-bg.show{
  opacity:1;visibility:visible;pointer-events:auto;
  background:rgba(0,0,0,.5);-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);
  transition:opacity .32s ease, background .32s ease;
}
.modal-box{
  background:var(--bg);width:100%;max-width:460px;border-radius:28px 28px 0 0;padding:24px 22px 28px;
  max-height:85vh;overflow-y:auto;transform:translateY(100%);
  transition:transform .38s cubic-bezier(.32,.72,0,1);
  display:flex;flex-direction:column;gap:10px;
}
.modal-bg.show .modal-box{transform:translateY(0);}
.modal-box h2{font-size:17px;font-weight:800;margin:0;text-align:center;}
.modal-box .input,.modal-box select{width:100%;background:var(--white);border:1px solid transparent;border-radius:var(--radius-pill);padding:13px 16px;font-size:14px;color:var(--dark);margin:0;transition:box-shadow .15s ease, border-color .15s ease;}
.modal-box textarea{width:100%;background:var(--white);border:1px solid transparent;border-radius:18px;padding:13px 16px;font-size:14px;color:var(--dark);margin:0;transition:box-shadow .15s ease, border-color .15s ease;resize:vertical;min-height:70px;}
.modal-box .input:focus,.modal-box select:focus,.modal-box textarea:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 1.5px var(--accent);}
.form-error{color:#B23A00;font-size:12.5px;margin:0;min-height:14px;text-align:center;}

.save-success{
  display:none;flex-direction:column;align-items:center;justify-content:center;
  gap:14px;padding:30px 10px 10px;text-align:center;
}
.save-success-icon{
  width:56px;height:56px;border-radius:50%;background:var(--accent);color:var(--white);
  display:flex;align-items:center;justify-content:center;font-size:28px;font-weight:800;
  animation:successPop .3s cubic-bezier(.34,1.56,.64,1);
}
@keyframes successPop{ from{ transform:scale(.4); opacity:0; } to{ transform:scale(1); opacity:1; } }
.save-success p{font-size:15px;font-weight:700;color:var(--dark);}

.field-wrap{position:relative;margin:0;}
.cat-dropdown-btn{
  width:100%;background:var(--white);border-radius:var(--radius-pill);padding:13px 16px;text-align:left;
  font-size:14px;color:var(--dark);display:flex;justify-content:space-between;align-items:center;gap:8px;
  border:1px solid transparent;
}
.cat-dropdown-btn .placeholder{opacity:.4;}

.dropdown-list{
  position:absolute;bottom:calc(100% + 4px);top:auto;left:0;right:0;background:var(--white);border-radius:16px;
  box-shadow:0 8px 24px rgba(80,35,20,.18);z-index:10;overflow:hidden;display:none;max-height:200px;overflow-y:auto;
}
.dropdown-list.open{display:block;}
.dropdown-list button, .dropdown-list div.opt{
  width:100%;text-align:left;padding:12px 16px;font-size:13.5px;color:var(--dark);display:flex;align-items:center;gap:10px;cursor:pointer;
}
.dropdown-list button:hover, .dropdown-list div.opt:hover{background:var(--bg);}
.dropdown-list small{display:block;opacity:.55;font-size:11px;}


.toggle-2{display:flex;gap:10px;margin:0;}
.toggle-2 button{
  flex:1;padding:12px;border-radius:var(--radius-pill);font-weight:700;font-size:13px;
  border:1px solid var(--accent);color:var(--accent);background:var(--white);transition:.15s ease;
}
.toggle-2 button.active{background:var(--accent);color:var(--white);}

.more-details-link{display:block;text-align:center;color:var(--accent);font-weight:700;font-size:13px;margin:14px 0 4px;}
.more-details-box{display:none;flex-direction:column;gap:10px;margin:0;}
.more-details-box.open{display:flex;}
.toast{
  position:fixed;bottom:100px;left:50%;transform:translateX(-50%) translateY(20px);
  background:var(--dark);color:var(--white);padding:10px 18px;border-radius:999px;font-size:12.5px;
  font-weight:600;opacity:0;pointer-events:none;transition:.3s ease;z-index:60;white-space:nowrap;
}
.toast.show{opacity:1;transform:translateX(-50%) translateY(0);}

@media(max-width:899px){
  .menu-dome-wrap{margin-top:-10px;}
  .welcome-avatar-wrap{margin-top:-68px;}
}

@media(min-width:900px){
  .app{display:grid;grid-template-columns:var(--sidebar-width) 1fr;max-width:var(--content-width);margin:0 auto;min-height:100vh;}

  .page-header{display:none;}
  .bottom-nav-wrap{display:none;}

  .sidebar{
    display:flex;flex-direction:column;gap:4px;padding:28px 18px;
    position:sticky;top:0;height:100vh;overflow:hidden;
  }
  .sidebar .brand-img{max-height:34px;width:auto;margin:0 auto 20px;}
  .sidebar-add{
    display:flex;align-items:center;gap:10px;background:var(--dark);color:var(--white)!important;
    padding:11px 16px;border-radius:14px;font-size:13.5px;font-weight:700;margin-bottom:16px;
  }
  .sidebar a{display:flex;align-items:center;gap:12px;color:var(--dark);opacity:.5;padding:11px 14px;border-radius:14px;font-size:14px;font-weight:600;transition:.12s ease;}
  .sidebar a.active{opacity:1;background:var(--white);}
  .sidebar a:hover{opacity:1;}

  .page-card{
    background:transparent;border-radius:0;padding:36px 40px 60px;margin-top:0;
  }
  .tabs-bar-wrap{padding-top:0;}
  .tabs-bar{justify-content:flex-start;gap:18px;}
  .tab-liquid-dot,.tab-bump{display:none;}
  .tab svg{width:30px;height:30px;}
  .tab.active svg{width:38px;height:38px;}

  .welcome-page{min-height:100vh;}
  .menu-dome-wrap{max-width:900px;margin:0 auto;}
  .welcome-mascot-wrap{max-width:460px;margin:0 auto;}
  .user-menu-items{top:530px;}

  .home-header-row{max-width:980px;margin:0 auto;padding:4px 20px 18px;justify-content:center;}
  .view-toggle{display:none;}
  .cat-grid{max-width:980px;}
  .cat-card{flex:0 0 calc(25% - 15px);}
  .cat-card img{max-width:140px;max-height:140px;}
  .cat-card span{font-size:18px;}

  .cat-header-row{max-width:620px;margin-left:auto;margin-right:auto;}
  .places-grid{display:flex;flex-direction:column;max-width:620px;margin-left:auto;margin-right:auto;}
  .place-info h4{font-size:17px;}

  .modal-box{max-width:380px;padding:32px 30px 34px;gap:13px;border-radius:28px 28px 0 0;}

  .pub-tabs{max-width:620px;margin:0 auto 14px;}
}

/* ===== Paso a paso del modal "Agregar lugar" con Google Places ===== */
.modal-title-row{position:relative;display:flex;align-items:center;justify-content:center;}
.modal-title-row h2{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0 32px;}
.modal-back-btn{
  width:28px;height:28px;border-radius:50%;background:transparent;border:2px solid var(--dark);
  color:var(--dark);display:flex;align-items:center;justify-content:center;
  position:absolute;top:50%;left:0;transform:translateY(-50%);
}
.modal-back-btn svg{width:13px;height:13px;}

.modal-box-tall{min-height:24vh;}
.dropdown-list-up{
  z-index:60;
}
.dropdown-list-up.open{
  display:flex;
  flex-direction:column-reverse;
}


.suggest-loading{padding:12px 16px;font-size:13px;color:var(--dark);opacity:.55;}

.step-label{font-size:13px;font-weight:700;color:var(--dark);opacity:.7;margin:0 0 4px;text-align:center;}
.tag-chip-list{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:6px;justify-content:center;}
.tag-chip-list:empty{display:none;}
.tag-chip{
  padding:5px 6px 5px 11px;border-radius:var(--radius-pill);font-size:11px;font-weight:600;
  background:var(--dark);color:var(--white);border:none;
  display:inline-flex;align-items:center;gap:7px;
}
.tag-chip-remove{
  color:var(--accent);font-size:16px;font-weight:800;line-height:1;
}

.rating-slider-wrap{position:relative;padding:0 13px;margin:38px 0 2px;}
.rating-track{
  position:relative;height:10px;border-radius:999px;background:var(--neutral-light);touch-action:none;
}
.rating-fill{
  position:absolute;top:0;left:0;height:100%;border-radius:999px;width:0%;
  background:#ed1c24;
}
.rating-thumb{
  position:absolute;top:50%;left:0%;width:26px;height:26px;border-radius:50%;background:var(--dark);
  transform:translate(-50%,-50%);cursor:grab;box-shadow:0 2px 6px rgba(80,35,20,.25);
  overflow:hidden;
}
.rating-thumb-face{
  position:absolute;inset:0;width:100%;height:100%;pointer-events:none;
}
.rating-thumb-face path{
  fill:var(--white);transform-box:fill-box;transform-origin:center;transform:scale(0);
}
.rating-bubble{
  position:absolute;top:-34px;left:0%;transform:translate(-50%,0);background:var(--bg);color:var(--dark);
  font-weight:700;font-size:14px;padding:5px 10px;border-radius:10px;white-space:nowrap;
}

.mini-field-group{display:flex;flex-direction:column;gap:8px;margin-top:4px;}

.place-item.editing{position:relative;z-index:2;background:var(--white);border-radius:22px;box-shadow:0 10px 30px rgba(0,0,0,.25);}

.place-edit-view{max-width:380px;margin:0 auto;}

.edit-top-row{display:flex;flex-direction:column;align-items:center;gap:12px;margin-bottom:14px;}
.edit-top-row .field-wrap,
.edit-top-row .liquid-toggle{width:100%;max-width:260px;box-sizing:border-box;}
@media(min-width:900px){
  .edit-top-row{flex-direction:row;align-items:flex-start;justify-content:center;}
  .place-edit-view{max-width:480px;}
  .edit-top-row .field-wrap,
  .edit-top-row .liquid-toggle{flex:1 1 0;max-width:300px;}
}

/* Switch Visitado/Quiero ir tipo "liquido": el pill blanco se desliza de
   un lado al otro con una transicion suave. */
.liquid-toggle{position:relative;display:flex;background:var(--white);border:1.5px solid var(--accent);border-radius:999px;padding:4px;overflow:hidden;}
.liquid-thumb{
  position:absolute;top:4px;bottom:4px;left:4px;width:calc(50% - 4px);
  background:var(--accent);border:none;border-radius:999px;
  transition:transform .4s cubic-bezier(.65,0,.35,1);z-index:0;
}
.liquid-toggle[data-active="pendiente"] .liquid-thumb{transform:translateX(100%);}
.liquid-toggle button{
  position:relative;z-index:1;flex:1;border:none;background:none;padding:10px 8px;
  font-weight:700;font-size:12px;font-family:inherit;cursor:pointer;color:var(--accent);transition:color .25s ease;
  white-space:nowrap;
}
.liquid-toggle button.active{color:var(--white);}


.edit-actions-row{display:flex;gap:10px;justify-content:center;margin-top:14px;}
.edit-save-btn{
  flex:none;padding:0 30px;height:44px;background:var(--dark);color:var(--white);border:none;
  border-radius:var(--radius-pill);font-size:14px;font-weight:700;cursor:pointer;font-family:inherit;
}



/* ===== Interruptores de privacidad (perfil publico) ===== */
.switch-row{
  display:flex;align-items:center;justify-content:space-between;
  padding:10px 0;font-size:13.5px;color:var(--dark);
}
.switch{position:relative;display:inline-block;width:44px;height:26px;flex:none;}
.switch input{position:absolute;opacity:0;width:100%;height:100%;margin:0;cursor:pointer;}
.switch-track{
  position:absolute;inset:0;background:var(--neutral-light);border-radius:999px;
  transition:background .15s ease;
}
.switch-track::before{
  content:"";position:absolute;top:3px;left:3px;width:20px;height:20px;border-radius:50%;
  background:var(--white);box-shadow:0 1px 3px rgba(80,35,20,.25);
  transition:transform .15s ease;
}
.switch input:checked + .switch-track{background:var(--accent);}
.switch input:checked + .switch-track::before{transform:translateX(18px);}

/* ===== Perfil publico: tabs Mi Top / Quiero ir / Visitados. ===== */
.pub-tabs{display:flex;gap:6px;padding:0 20px 12px;justify-content:center;flex-wrap:wrap;}


/* ===== home.php ===== */

  html.page-home{
    --bg:#FFFDF7;
    --bg-soft:#FFF8EC;
    --accent:#FF9922;
    --accent-soft:#FFC169;
    --dark:#502314;
    --white:#FFFFFF;
    --neutral:#F3F0E8;
  }
  html.page-home *{margin:0;padding:0;box-sizing:border-box;font-family:"Poppins",Arial,sans-serif;}
  html.page-home{scroll-behavior:smooth;}
  html.page-home body{background:var(--bg);color:var(--dark);overflow-x:hidden;}
  html.page-home a{text-decoration:none;color:inherit;}
  html.page-home img{display:block;max-width:100%;}
  html.page-home .wrap{max-width:1100px;margin:0 auto;padding:0 24px;}

  /* =========================
     NUEVA CABECERA / BANNER
     ========================= */
  html.page-home .hero-scroll{
    position:relative;
    height:142vh;
    min-height:900px;
    background:linear-gradient(180deg,#FFFDF7 0%,#FFF8EC 100%);
  }
  html.page-home .hero-sticky{
    position:sticky;
    top:0;
    height:100vh;
    min-height:650px;
    overflow:hidden;
  }
  html.page-home .hero-sticky::before{
    content:"";
    position:absolute;
    width:min(58vw,760px);
    aspect-ratio:1/1;
    right:-4vw;
    top:12vh;
    border-radius:50%;
    background:radial-gradient(circle at 42% 38%,rgba(255,193,105,.62),rgba(255,153,34,.20) 56%,rgba(255,153,34,0) 72%);
    pointer-events:none;
  }
  html.page-home .hero-sticky::after{
    content:"";
    position:absolute;
    left:-14vw;
    right:-8vw;
    bottom:-18vh;
    height:42vh;
    border-radius:50% 50% 0 0 / 100% 100% 0 0;
    background:rgba(255,239,213,.68);
    transform:rotate(3deg);
    pointer-events:none;
  }
  html.page-home .home-header{
    position:relative;
    z-index:20;
    width:min(92vw,1500px);
    margin:0 auto;
    padding:24px 0 0;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:22px;
  }
  html.page-home .home-logo{height:38px;width:auto;}
  html.page-home .header-actions{display:flex;align-items:center;gap:12px;}
  html.page-home .header-actions .btn-primary, html.page-home .header-actions .btn-secondary{padding:12px 22px;font-size:14px;}

  html.page-home .hero-banner{
    position:relative;
    z-index:5;
    width:min(92vw,1500px);
    height:calc(100vh - 74px);
    min-height:570px;
    margin:0 auto;
    padding:0;
    display:grid;
    grid-template-columns:minmax(390px,42%) minmax(0,58%);
    align-items:center;
    gap:10px;
  }
  html.page-home .hero-copy{
    position:relative;
    z-index:8;
    padding-bottom:4vh;
    max-width:600px;
  }
  html.page-home .hero-copy h1{
    font-size:clamp(42px,3.7vw,62px);
    font-weight:800;
    line-height:1.02;
    letter-spacing:-1.8px;
    margin-bottom:22px;
    white-space:normal;
  }
  html.page-home .hero-copy h1 span{color:var(--accent);}
  html.page-home .hero-copy p{
    font-size:clamp(16px,1.45vw,20px);
    color:rgba(80,35,20,.72);
    max-width:520px;
    line-height:1.55;
    margin-bottom:28px;
  }
  html.page-home .hero-ctas{display:flex;gap:14px;align-items:center;flex-wrap:wrap;}
  html.page-home .btn-primary{
    background:var(--accent);color:var(--white);padding:15px 30px;border-radius:999px;
    font-weight:700;font-size:15px;box-shadow:0 10px 24px rgba(255,153,34,.25);
    transition:transform .2s ease,box-shadow .2s ease;
  }
  html.page-home .btn-primary:hover{transform:translateY(-2px);box-shadow:0 14px 30px rgba(255,153,34,.32);}
  html.page-home .btn-secondary{
    background:rgba(255,255,255,.86);color:var(--dark);padding:15px 30px;border-radius:999px;
    font-weight:700;font-size:15px;border:1.5px solid rgba(80,35,20,.12);
    backdrop-filter:blur(10px);
    transition:transform .2s ease,border-color .2s ease;
  }
  html.page-home .btn-secondary:hover{transform:translateY(-2px);border-color:rgba(80,35,20,.25);}

  html.page-home .phone-stage{
    position:relative;
    z-index:6;
    width:100%;
    height:100%;
    min-height:570px;
    overflow:visible;
    align-self:stretch;
  }
  html.page-home .phone{
    position:absolute;
    width:clamp(320px,27vw,500px);
    max-width:none;
    height:auto;
    will-change:transform,opacity;
    transform-origin:center center;
    filter:drop-shadow(0 28px 34px rgba(35,25,20,.20));
    user-select:none;
    pointer-events:none;
  }
  html.page-home .phone-map{left:2%;top:24%;opacity:0;}
  html.page-home .phone-list{right:2%;top:13%;opacity:0;}
  html.page-home .scroll-cue{
    position:absolute;
    z-index:15;
    left:50%;
    bottom:26px;
    transform:translateX(-50%);
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:8px;
    color:rgba(80,35,20,.58);
    font-size:11px;
    transition:opacity .2s linear;
  }
  html.page-home .scroll-mouse{
    width:19px;height:29px;border:1.7px solid rgba(80,35,20,.62);border-radius:12px;position:relative;
  }
  html.page-home .scroll-mouse::before{
    content:"";position:absolute;left:50%;top:6px;width:3px;height:6px;border-radius:4px;
    background:rgba(80,35,20,.68);transform:translateX(-50%);animation:scrollDot 1.35s ease-in-out infinite;
  }
  @keyframes scrollDot{0%{opacity:0;transform:translate(-50%,0);}35%{opacity:1;}100%{opacity:0;transform:translate(-50%,9px);}}

  html.page-home .section{padding:70px 24px;}
  html.page-home .section h2{text-align:center;font-size:30px;font-weight:800;}
  html.page-home .section-sub{text-align:center;font-size:15px;opacity:.6;max-width:480px;margin:0 auto 46px;line-height:1.6;}

  html.page-home .steps{display:grid;grid-template-columns:repeat(4,1fr);gap:20px;max-width:1000px;margin:0 auto;}
  html.page-home .step-card{background:var(--white);border-radius:20px;padding:26px 18px;text-align:center;box-shadow:0 6px 20px rgba(80,35,20,.05);}
  html.page-home .step-num{width:34px;height:34px;border-radius:50%;background:var(--dark);color:var(--white);display:flex;align-items:center;justify-content:center;font-weight:800;font-size:14px;margin:0 auto 14px;}
  html.page-home .step-card h4{font-size:14px;font-weight:700;margin-bottom:6px;}
  html.page-home .step-card p{font-size:12.5px;opacity:.6;line-height:1.5;}

  html.page-home .features-bg{background:var(--bg-soft);}
  html.page-home .feat-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;max-width:1000px;margin:0 auto;}
  html.page-home .feat-card{background:var(--white);border-radius:20px;padding:28px 24px;box-shadow:0 6px 20px rgba(80,35,20,.05);}
  html.page-home .feat-icon{width:46px;height:46px;border-radius:14px;background:var(--neutral);display:flex;align-items:center;justify-content:center;margin-bottom:16px;font-size:20px;}
  html.page-home .feat-card h4{font-size:15px;font-weight:700;margin-bottom:8px;}
  html.page-home .feat-card p{font-size:13px;opacity:.6;line-height:1.55;}

  html.page-home .benefits{display:grid;grid-template-columns:repeat(3,1fr);gap:24px;max-width:1000px;margin:0 auto;}
  html.page-home .benefit-item{text-align:center;padding:10px;}
  html.page-home .benefit-icon{width:56px;height:56px;border-radius:50%;background:var(--accent);color:var(--white);display:flex;align-items:center;justify-content:center;margin:0 auto 16px;}
  html.page-home .benefit-icon svg{width:28px;height:28px;}
  html.page-home .benefit-item h4{font-size:15px;font-weight:700;margin-bottom:8px;}
  html.page-home .benefit-item p{font-size:13px;opacity:.6;line-height:1.55;}

  html.page-home footer{text-align:center;padding:50px 24px 40px;}
  html.page-home footer img{height:22px;margin:0 auto 10px;opacity:.7;}
  html.page-home footer p{font-size:12px;opacity:.5;}

  @media(max-width:1180px){
    html.page-home .home-header, html.page-home .hero-banner{width:min(94vw,1180px);}
    html.page-home .hero-banner{grid-template-columns:minmax(330px,43%) minmax(0,57%);gap:8px;}
    html.page-home .hero-copy h1{font-size:clamp(38px,4.3vw,52px);}
    html.page-home .phone{width:clamp(280px,31vw,430px);}
  }
  @media(max-width:800px){
    /* En móvil se eliminan las formas decorativas para dejar el bloque de texto limpio. */
    html.page-home .hero-sticky::before, html.page-home .hero-sticky::after{display:none;}
    html.page-home .home-header{width:calc(100% - 36px);padding:18px 0 0;}
    html.page-home .home-logo{height:31px;}
    html.page-home .header-actions .btn-primary, html.page-home .header-actions .btn-secondary{padding:10px 15px;font-size:12px;}
    html.page-home .hero-scroll{height:155vh;min-height:980px;}
    html.page-home .hero-sticky{min-height:700px;}
    html.page-home .hero-banner{
      width:100%;
      height:calc(100vh - 58px);
      min-height:640px;
      grid-template-columns:1fr;
      grid-template-rows:auto minmax(0,1fr);
      align-items:start;
      padding:26px 18px 0;
      gap:8px;
    }
    html.page-home .hero-copy{width:min(100%,520px);margin:0 auto;text-align:center;padding:8px 8px 0;z-index:10;}
    html.page-home .hero-copy h1{font-size:clamp(34px,9vw,46px);line-height:1.04;letter-spacing:-1.15px;margin-bottom:15px;}
    html.page-home .hero-copy p{font-size:15px;line-height:1.5;max-width:420px;margin:0 auto 20px;}
    html.page-home .hero-ctas{justify-content:center;}
    html.page-home .phone-stage{width:min(100%,700px);min-height:390px;height:100%;margin:0 auto;overflow:visible;}
    html.page-home .phone{width:clamp(250px,54vw,360px);}
    html.page-home .phone-map{left:1%;top:15%;}
    html.page-home .phone-list{right:1%;top:7%;}
    html.page-home .scroll-cue{bottom:12px;}
    html.page-home .steps, html.page-home .feat-grid, html.page-home .benefits{grid-template-columns:1fr 1fr;}
  }
  @media(max-width:560px){
    html.page-home .home-header{width:calc(100% - 28px);gap:10px;}
    html.page-home .header-actions{gap:8px;}
    html.page-home .header-actions .btn-primary, html.page-home .header-actions .btn-secondary{padding:9px 12px;font-size:11px;}
    html.page-home .hero-scroll{height:150vh;min-height:900px;}
    html.page-home .hero-banner{min-height:610px;padding:22px 14px 0;}
    html.page-home .hero-copy{max-width:390px;padding-left:10px;padding-right:10px;}
    html.page-home .hero-copy h1{font-size:clamp(31px,9.7vw,39px);line-height:1.04;letter-spacing:-.9px;max-width:360px;margin-left:auto;margin-right:auto;}
    html.page-home .hero-copy p{font-size:14px;line-height:1.5;max-width:320px;}
    html.page-home .hero-ctas .btn-primary, html.page-home .hero-ctas .btn-secondary{padding:12px 18px;font-size:13px;}
    html.page-home .phone-stage{width:100%;min-height:360px;max-height:48vh;}
    html.page-home .phone{width:clamp(230px,60vw,315px);}
    html.page-home .phone-map{left:2%;top:16%;}
    html.page-home .phone-list{right:2%;top:7%;}
    html.page-home .steps, html.page-home .feat-grid, html.page-home .benefits{grid-template-columns:1fr;}
  }
  @media(prefers-reduced-motion:reduce){
    html.page-home{scroll-behavior:auto;}
    html.page-home .scroll-mouse::before{animation:none;}
  }

  /* Se va armando conforme se hace scroll (estilo Apple): cada seccion
     empieza invisible y levemente abajo, y aparece con un fundido +
     deslizamiento suave cuando entra en pantalla. */
  html.page-home .reveal{opacity:0;transform:translateY(28px);transition:opacity .7s ease, transform .7s ease;}
  html.page-home .reveal.in{opacity:1;transform:translateY(0);}


/* ===== login.php ===== */

  html.page-login, html.page-login body{
    width:100%;height:100%;overflow:hidden;
    background:linear-gradient(160deg, var(--accent-soft) 0%, var(--accent) 45%, var(--dark) 130%);
  }
  html.page-login .stage{position:relative;width:100%;min-height:100vh;min-height:100svh;display:flex;align-items:center;justify-content:center;}

  html.page-login .blob{position:absolute;pointer-events:none;transition:transform .6s cubic-bezier(.2,.6,.3,1);will-change:transform;}
  html.page-login .blob-1{
    width:60vw;height:60vw;max-width:900px;max-height:900px;top:-15%;left:-15%;
    background:radial-gradient(circle at 40% 40%, rgba(255,255,255,.10), transparent 70%);
    border-radius:42% 58% 65% 35% / 45% 40% 60% 55%;
  }
  html.page-login .blob-2{
    width:50vw;height:50vw;max-width:760px;max-height:760px;bottom:-20%;right:-10%;
    background:radial-gradient(circle at 60% 60%, rgba(80,35,20,.14), transparent 70%);
    border-radius:60% 40% 35% 65% / 55% 65% 35% 45%;
  }
  html.page-login .bg-mark{
    position:absolute;left:calc(50% - 400px);top:50%;
    width:calc(270vh - 200px);max-width:none;opacity:.06;pointer-events:none;user-select:none;
    transition:transform .6s cubic-bezier(.2,.6,.3,1);will-change:transform;
  }

  html.page-login .mini-logo{width:100%;max-width:110px;margin:0 auto 24px;overflow:visible;}
  html.page-login #logo-o{transform-box:fill-box;transform-origin:center;animation:rollO 2.6s ease-in-out infinite;}
  @keyframes rollO{
    0%,100%{ transform:translateX(-4px) rotate(-7deg); }
    50%{ transform:translateX(4px) rotate(7deg); }
  }
  html.page-login #logo-bar{transform-box:fill-box;transform-origin:12% 96%;animation:rotateBar 2.6s ease-in-out infinite;}
  @keyframes rotateBar{
    0%,100%{ transform:rotate(0deg); }
    50%{ transform:rotate(3deg); }
  }

  html.page-login .auth-outer{position:relative;z-index:2;width:100%;display:flex;flex-direction:column;align-items:center;padding:0 24px;}
  html.page-login .slider-stage{position:relative;width:100%;max-width:250px;min-height:60px;overflow:visible;transition:min-height .25s ease;}

  html.page-login .slider-stage{
    display:flex;flex-direction:column;align-items:center;gap:12px;
  }

  html.page-login .auth-field{width:100%;position:relative;}
  html.page-login .auth-input{
    width:100%;background:#fff;border:1.5px solid transparent;border-radius:999px;
    padding:14px 18px;font-size:14px;color:var(--dark);font-family:inherit;
    box-sizing:border-box;transition:box-shadow .15s ease;
  }
  html.page-login .auth-input::placeholder{color:var(--dark);opacity:.35;}
  html.page-login .auth-input:focus{outline:none;box-shadow:0 0 0 2px rgba(255,255,255,.6);}
  html.page-login .auth-field.has-toggle .auth-input{padding-right:42px;}
  html.page-login .auth-field.field-error .auth-input{animation:shakeAnim .4s ease;border-color:var(--dark);}
  @keyframes shakeAnim{
    0%,100%{transform:translateX(0);}
    20%{transform:translateX(-6px);}
    40%{transform:translateX(6px);}
    60%{transform:translateX(-4px);}
    80%{transform:translateX(4px);}
  }
  html.page-login .pw-toggle{
    position:absolute;right:4px;top:50%;transform:translateY(-50%);
    width:32px;height:32px;border-radius:50%;border:none;background:none;display:flex;
    align-items:center;justify-content:center;color:var(--dark);opacity:0;visibility:hidden;
    transition:opacity .15s ease;cursor:pointer;
  }
  html.page-login .pw-toggle.show{opacity:.45;visibility:visible;}
  html.page-login .pw-toggle.show:hover{opacity:.85;}

  html.page-login .auth-btn{
    width:100%;background:var(--dark);color:#fff;border:none;border-radius:999px;
    font-size:15px;font-weight:800;padding:14px 18px;cursor:pointer;font-family:inherit;white-space:nowrap;
    transition:transform .12s ease, opacity .12s ease;
  }
  html.page-login .auth-btn:hover{opacity:.9;}
  html.page-login .auth-btn:active{transform:scale(.97);}

  html.page-login .auth-switch{
    display:block;width:100%;text-align:center;cursor:pointer;user-select:none;
    font-size:13px;color:#fff;font-weight:400;opacity:.9;text-decoration:none;
  }
  html.page-login .auth-switch b{font-weight:600;text-decoration:underline;}

  /* ---- Recuerdame + separador + Google (compartido por ambos paneles) ---- */


  html.page-login .google-btn-wrap{ width:100%;max-width:250px;display:flex;justify-content:center; }

  /* ---- Asistente de registro por pasos (mismos tokens visuales de siempre) ---- */
  html.page-login .wizard-step{
    position:absolute;top:0;left:0;width:100%;display:flex;flex-direction:column;align-items:center;gap:12px;
    opacity:0;pointer-events:none;transition:opacity .3s ease;
  }
  html.page-login .wizard-step.step-active{ opacity:1;pointer-events:auto;position:relative; }
  html.page-login .back-link{opacity:.7;font-size:11px;}
  html.page-login .step-title{color:#fff;font-size:15px;font-weight:700;text-align:center;}
  html.page-login .step-sub{color:rgba(255,255,255,.75);font-size:12px;text-align:center;margin-top:-6px;}

  html.page-login .username-input{padding-right:38px;}
  html.page-login .username-check{
    display:none;position:absolute;right:14px;top:50%;transform:translateY(-50%);
    color:#2ecc71;font-weight:800;font-size:15px;
  }
  html.page-login .username-check.show{display:block;}

  html.page-login .spinner{
    width:14px;height:14px;border:2px solid rgba(255,255,255,.35);border-top-color:#fff;
    border-radius:50%;display:inline-block;animation:loginSpin .7s linear infinite;
    margin-right:8px;vertical-align:-2px;
  }
  @keyframes loginSpin{ to{ transform:rotate(360deg); } }

  html.page-login .avatar-circle{
    position:relative;width:84px;height:84px;border-radius:50%;background:rgba(255,255,255,.14);
    border:2px dashed rgba(255,255,255,.5);display:flex;align-items:center;justify-content:center;
    color:#fff;font-size:26px;cursor:pointer;
  }
  html.page-login .avatar-circle.uploading::after{
    content:"";position:absolute;inset:-5px;border-radius:50%;
    border:3px solid rgba(255,255,255,.25);border-top-color:#fff;
    animation:loginSpin .8s linear infinite;
  }

  html.page-login .success-icon{
    width:56px;height:56px;border-radius:50%;background:var(--white);color:var(--dark);
    display:flex;align-items:center;justify-content:center;font-size:26px;font-weight:800;
  }

  html.page-login .toast{
    position:fixed;bottom:30px;left:50%;transform:translateX(-50%) translateY(20px);
    background:var(--dark);color:#fff;padding:10px 18px;border-radius:999px;font-size:12.5px;
    font-weight:600;opacity:0;pointer-events:none;transition:.3s ease;z-index:60;white-space:nowrap;
  }
  html.page-login .toast.show{ opacity:1;transform:translateX(-50%) translateY(0); }


/* ===== perfil.php ===== */

  html.page-perfil #perfilPage{padding-bottom:0;}
  html.page-perfil .settings-top-row{display:flex;align-items:center;gap:14px;padding:20px 20px 0;}
  /* Boton propio de ESTA fila (NO usar .cat-round-btn: esa clase tiene una
     regla en el CSS externo que la saca de su lugar cuando esta dentro de
     .settings-top-row, causando que quede flotando encima del titulo). */
  html.page-perfil .settings-round-btn{width:36px;height:36px;border-radius:50%;border:2px solid var(--dark);background:transparent;color:var(--dark);display:flex;align-items:center;justify-content:center;flex:none;cursor:pointer;}
  html.page-perfil .settings-round-btn svg{width:16px;height:16px;}
  html.page-perfil .settings-title{color:var(--dark);font-weight:800;font-size:17px;flex:1;text-align:center;}
  html.page-perfil .settings-avatar-wrap{position:relative;width:96px;height:96px;margin:22px auto 0;}
  html.page-perfil .settings-avatar{width:96px;height:96px;border-radius:50%;background:var(--white);border:4px solid #FFFFFF;display:flex;align-items:center;justify-content:center;font-size:34px;font-weight:800;color:var(--dark);overflow:hidden;}
  html.page-perfil .settings-avatar img{width:100%;height:100%;object-fit:cover;}
  html.page-perfil .settings-avatar-edit{position:absolute;bottom:0;right:0;width:30px;height:30px;border-radius:50%;background:var(--dark);color:var(--white);display:flex;align-items:center;justify-content:center;border:3px solid #FFFDF7;cursor:pointer;}
  html.page-perfil .settings-avatar-edit svg{width:14px;height:14px;}
  html.page-perfil .settings-name{color:var(--dark);font-weight:700;font-size:20px;text-align:center;margin-top:14px;}
  html.page-perfil .settings-username{color:var(--dark);opacity:.7;font-size:13px;text-align:center;margin-top:4px;}
  html.page-perfil .editable-row{display:flex;align-items:center;justify-content:center;gap:8px;}
  /* El margen va en la fila, no en el texto: el boton de editar queda alineado al lado. */
  html.page-perfil .editable-row > .settings-name,html.page-perfil .editable-row .settings-username{margin-top:0;margin-bottom:0;}
  html.page-perfil #nameDisplayRow{margin-top:18px;}
  html.page-perfil .edit-icon-btn{width:22px;height:22px;border-radius:50%;background:var(--neutral-light);color:var(--dark);display:inline-flex;align-items:center;justify-content:center;flex:none;cursor:pointer;border:none;}
  html.page-perfil .edit-icon-btn svg{width:11px;height:11px;}
  html.page-perfil .edit-ok-btn{width:26px;height:26px;border-radius:50%;background:var(--accent);color:#fff;display:inline-flex;align-items:center;justify-content:center;flex:none;cursor:pointer;border:none;}
  html.page-perfil .edit-ok-btn svg{width:13px;height:13px;}
  html.page-perfil .field-shake{animation:shakeAnim .4s ease;border-color:var(--dark) !important;}
  html.page-perfil .social-row-remove{width:26px;height:26px;border-radius:50%;background:var(--neutral-light);color:var(--dark);opacity:.5;display:flex;align-items:center;justify-content:center;flex:none;border:none;cursor:pointer;}
  html.page-perfil .social-row-remove:hover{opacity:1;}
  html.page-perfil .social-row-remove svg{width:13px;height:13px;}
  html.page-perfil .switch-end{display:flex;align-items:center;gap:8px;flex:none;}
  html.page-perfil .switch-status{width:16px;height:16px;flex:none;display:flex;align-items:center;justify-content:center;}
  html.page-perfil .switch-status .mini-spinner{width:14px;height:14px;border:2px solid var(--neutral-light);border-top-color:var(--accent);border-radius:50%;animation:spinLoad .7s linear infinite;}
  html.page-perfil .switch-status .mini-check{width:16px;height:16px;color:var(--accent);opacity:0;transition:opacity .2s ease;}
  html.page-perfil .switch-status .mini-check.show{opacity:1;}
  html.page-perfil .settings-card{background:var(--white);border-radius:36px 36px 0 0;margin-top:30px;position:relative;z-index:2;padding:36px 20px 40px;flex:1;}
  html.page-perfil .settings-section{margin-bottom:26px;}
  html.page-perfil .settings-label{font-size:12.5px;font-weight:700;color:var(--dark);opacity:.6;margin-bottom:8px;}
  html.page-perfil .input{width:100%;background:var(--neutral-light);border:1.5px solid transparent;border-radius:var(--radius-pill);padding:8px 14px;font-size:13.5px;color:var(--dark);font-family:inherit;}
  html.page-perfil .input:focus{outline:none;border-color:var(--accent);}
  html.page-perfil .modal-cta-btn{width:100%;background:var(--dark);color:var(--white);border:none;border-radius:var(--radius-pill);font-size:16px;font-weight:800;padding:14px 18px;cursor:pointer;font-family:inherit;}
  html.page-perfil .stats-grid{grid-template-columns:repeat(2,1fr);}
  html.page-perfil .stat-card{background:var(--neutral-light);border-radius:16px;padding:14px 10px;text-align:center;}
  html.page-perfil .stat-card .stat-num{font-size:22px;font-weight:800;color:var(--dark);line-height:1.1;}
  html.page-perfil .stat-card .stat-label{font-size:11px;color:var(--dark);opacity:.6;margin-top:2px;}
  html.page-perfil .add-social-link{display:block;text-align:center;color:var(--accent);font-weight:700;font-size:13px;background:none;border:none;cursor:pointer;font-family:inherit;padding:8px 0;width:100%;}
  html.page-perfil .social-row-item{display:flex;align-items:center;gap:8px;margin-bottom:8px;}
  html.page-perfil .social-icon-badge{width:22px;height:22px;background:transparent;color:var(--accent-soft);display:flex;align-items:center;justify-content:center;flex:none;}
  html.page-perfil .social-icon-badge svg{width:22px;height:22px;}
  html.page-perfil .social-row-add{width:34px;height:34px;border-radius:50%;background:var(--accent);color:var(--white);display:flex;align-items:center;justify-content:center;flex:none;border:none;cursor:pointer;}
  html.page-perfil .social-row-add svg{width:14px;height:14px;}
  html.page-perfil .switch-row{display:flex;align-items:center;justify-content:space-between;padding:10px 0;font-size:13.5px;color:var(--dark);gap:14px;}
  html.page-perfil .switch{position:relative;display:inline-block;width:44px;height:26px;flex:none;}
  html.page-perfil .switch input{position:absolute;opacity:0;width:100%;height:100%;margin:0;cursor:pointer;}
  html.page-perfil .switch-track{position:absolute;inset:0;background:var(--neutral-light);border-radius:999px;transition:background .15s ease;}
  html.page-perfil .switch-track::before{content:"";position:absolute;top:3px;left:3px;width:20px;height:20px;border-radius:50%;background:var(--white);box-shadow:0 1px 3px rgba(80,35,20,.25);transition:transform .15s ease;}
  html.page-perfil .switch input:checked + .switch-track{background:var(--accent);}
  html.page-perfil .switch input:checked + .switch-track::before{transform:translateX(18px);}
  html.page-perfil .logout-icon-btn{width:36px;height:36px;border-radius:50%;border:2px solid var(--dark);background:transparent;color:var(--dark);display:flex;align-items:center;justify-content:center;flex:none;cursor:pointer;}
  html.page-perfil .logout-icon-btn svg{width:16px;height:16px;}
  /* Notificacion flotante. */
  html.page-perfil .toast{
    position:fixed;top:16px;bottom:auto;left:50%;right:auto;transform:translateX(-50%) translateY(-20px);
    background:var(--dark);color:var(--white);padding:12px 20px;border-radius:999px;font-size:13px;
    font-weight:600;opacity:0;pointer-events:none;transition:.3s ease;z-index:999;white-space:nowrap;
    max-width:90vw;width:auto;height:auto;overflow:hidden;text-overflow:ellipsis;margin:0;
  }
  html.page-perfil .toast.show{opacity:1;transform:translateX(-50%) translateY(0);}
  html.page-perfil .toast.error{background:#B23A00;}

  /* Boton de guardar: nunca a lo ancho completo, en movil y desktop. */
  html.page-perfil #btnSaveProfile{ width:auto;min-width:220px;display:block;margin:0 auto 30px; }


  /* Modal de recorte de foto de perfil */
  html.page-perfil .crop-modal{
    position:fixed;inset:0;z-index:2000;background:rgba(0,0,0,.48);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);
    display:none;align-items:center;justify-content:center;padding:20px;
  }
  html.page-perfil .crop-modal.show{ display:flex; }
  html.page-perfil .crop-box{
    background:var(--white);border-radius:28px;padding:24px 22px 22px;max-width:340px;width:100%;
    text-align:center;box-shadow:0 10px 40px rgba(0,0,0,.25);
  }
  html.page-perfil .crop-title{font-weight:800;color:var(--dark);font-size:16px;margin-bottom:16px;}
  html.page-perfil .crop-viewport{
    width:260px;height:260px;border-radius:50%;overflow:hidden;position:relative;
    margin:0 auto;background:var(--neutral-light);touch-action:none;cursor:grab;
    box-shadow:0 0 0 3px var(--white),0 0 0 5px var(--dark);
  }
  html.page-perfil .crop-viewport img{position:absolute;top:0;left:0;transform-origin:top left;user-select:none;pointer-events:none;max-width:none;max-height:none;}
  html.page-perfil .crop-zoom-slider{
    width:100%;margin:18px 0 6px;-webkit-appearance:none;appearance:none;
    height:4px;border-radius:999px;background:var(--neutral-light);outline:none;touch-action:pan-y;
  }
  html.page-perfil .crop-zoom-slider::-webkit-slider-thumb{
    -webkit-appearance:none;appearance:none;width:22px;height:22px;border-radius:50%;
    background:var(--accent);border:3px solid var(--white);box-shadow:0 1px 4px rgba(80,35,20,.3);cursor:pointer;
  }
  html.page-perfil .crop-zoom-slider::-moz-range-thumb{
    width:22px;height:22px;border-radius:50%;background:var(--accent);border:3px solid var(--white);
    box-shadow:0 1px 4px rgba(80,35,20,.3);cursor:pointer;
  }
  html.page-perfil .crop-zoom-slider::-moz-range-track{ height:4px;border-radius:999px;background:var(--neutral-light); }
  html.page-perfil .crop-actions{display:flex;gap:10px;margin-top:12px;}
  html.page-perfil .crop-btn{flex:1;border:none;border-radius:var(--radius-pill);padding:12px 10px;font-size:14px;font-weight:700;font-family:inherit;cursor:pointer;}
  html.page-perfil .crop-btn-cancel{background:var(--neutral-light);color:var(--dark);}
  html.page-perfil .crop-btn-confirm{background:var(--dark);color:var(--white);}
  @media(min-width:900px){
    html.page-perfil #perfilPage{ padding-top:10px; }
    html.page-perfil .settings-top-row{ max-width:640px;margin:0 auto;padding:36px 0 0;gap:28px; }
    html.page-perfil .settings-round-btn, html.page-perfil .logout-icon-btn{ width:42px;height:42px; }
    html.page-perfil .settings-round-btn svg, html.page-perfil .logout-icon-btn svg{ width:18px;height:18px; }
    html.page-perfil .settings-title{ font-size:19px; }
    html.page-perfil .settings-avatar-wrap{ width:116px;height:116px;margin-top:30px; }
    html.page-perfil .settings-avatar{ width:116px;height:116px;font-size:40px; }
    html.page-perfil .settings-name{ font-size:24px;margin-top:18px; }
    html.page-perfil .settings-card{
      max-width:640px;margin-left:auto;margin-right:auto;flex:none;
      padding:44px 48px 50px;border-radius:32px;margin-top:34px;
      box-shadow:0 4px 24px rgba(80,35,20,.08);
    }
    html.page-perfil .settings-section{ margin-bottom:32px; }
    html.page-perfil .stats-grid{ grid-template-columns:repeat(4,1fr); }
  }


/* ===== INDEX: categorías e iconos ===== */
@media(max-width:899px){
  html.page-index .home-header-row{margin-bottom:14px!important}
  html.page-index .cat-grid:not(.list-mode){
    grid-template-columns:repeat(2,120px)!important;justify-content:space-evenly!important;column-gap:0!important;row-gap:60px!important;
    width:100%!important;padding:0 0 44px!important;
  }
  html.page-index .cat-grid:not(.list-mode) .cat-card{
    width:120px!important;height:auto!important;min-height:0!important;max-width:none!important;padding:0!important;margin:0!important;gap:10px!important;
  }
  html.page-index .cat-grid:not(.list-mode) .cat-art{
    width:120px!important;height:120px!important;min-width:120px!important;min-height:120px!important;max-width:none!important;max-height:none!important;
    padding:0!important;margin:0!important;border-radius:22px!important;overflow:hidden!important;
  }
  html.page-index .cat-grid:not(.list-mode) .cat-art-mask img{width:108%!important;height:108%!important}
  html.page-index .cat-grid:not(.list-mode) .cat-label-color{
    width:120px!important;height:auto!important;max-width:none!important;margin:0!important;padding:0!important;text-align:center!important;
    font-size:10.5px!important;line-height:1.15!important;white-space:nowrap!important;
  }
  html.page-index .cat-grid.list-mode{padding:16px 16px 34px!important;gap:12px!important;width:100%!important;max-width:430px!important}
  html.page-index .cat-grid.list-mode .cat-card{min-height:64px!important;padding:6px!important;gap:13px!important;box-shadow:0 3px 14px rgba(80,35,20,.14)!important}
  html.page-index .cat-grid.list-mode .cat-art{width:52px!important;flex:0 0 52px!important}
  html.page-index .cat-grid.list-mode .cat-label-color{font-size:12.5px!important;line-height:1.2!important}
}
@media(max-width:380px){
  html.page-index .cat-grid:not(.list-mode){
    grid-template-columns:repeat(2,120px)!important;justify-content:space-evenly!important;column-gap:0!important;row-gap:28px!important;
    padding-left:0!important;padding-right:0!important;
  }
  html.page-index .cat-grid:not(.list-mode) .cat-card{width:120px!important}
  html.page-index .cat-grid:not(.list-mode) .cat-label-color{width:120px!important;font-size:10px!important}
}


/* ===== Edición de lugar: flujo modal ===== */
@keyframes placeEditFade{from{opacity:0}to{opacity:1}}
@keyframes placeEditPop{from{opacity:0;transform:translateY(10px) scale(.985)}to{opacity:1;transform:none}}
.edit-tag-chip{font-weight:400!important}
@media(max-width:899px){.place-edit-overlay{padding:14px}.place-edit-modal{width:min(100%,430px);max-height:84vh;border-radius:22px;padding:22px 18px}.edit-flow-title{font-size:17px}}


/* ===== Swipe horizontal tipo iOS en la lista (solo movil) ===== */
/* .place-card necesita position:relative para quedar SIEMPRE por encima
   de los botones de accion (position:absolute) durante el arrastre; sin
   isolation (rompia la sombra/las esquinas en movil): el orden correcto
   con .place-detail se resuelve solo por orden en el DOM, igual que antes. */

/* Ocultos por defecto: solo se ven mientras se arrastra o quedan
   revelados (nunca detras en reposo, ni durante el modo reordenar). */
/* Al confirmarse (tocar el boton o deslizar mas alla), ocupa TODO el
   ancho para que no se vea ningun corte detras mientras colapsa. */
@media(min-width:900px){
  .swipe-action{display:none}
}
/* ===== Ajuste cuenta - mejora estetica de perfil.php (avatar, tarjetas de
   resumen, tarjeta de cuenta). Solo visual, ninguna clase/id nueva que la
   logica dependa de ella. ===== */
html.page-perfil .settings-avatar{
  box-shadow:0 6px 20px rgba(80,35,20,.16),0 0 0 4px #fff,0 0 0 6px var(--accent-soft,#FFE1B8);
}
html.page-perfil .settings-card{
  box-shadow:0 -2px 24px rgba(80,35,20,.10);
}
html.page-perfil .settings-username{
  display:inline-flex;align-items:center;gap:0;padding:4px 12px;border-radius:999px;
  background:var(--neutral-light);text-decoration:none;transition:opacity .15s ease;
}
html.page-perfil .settings-username:active{opacity:.7;}
html.page-perfil .stat-card{
  box-shadow:0 2px 10px rgba(80,35,20,.06);position:relative;overflow:hidden;
}
html.page-perfil .switch-row{border-bottom:1px solid var(--neutral-light);}
html.page-perfil .switch-row:last-child{border-bottom:none;}
html.page-perfil .settings-label{letter-spacing:.3px;}
html.page-perfil #nameDisplayRow,
html.page-perfil #slugDisplayRow{
  display:flex;align-items:center;justify-content:center;gap:8px;
}
html.page-perfil #nameDisplayRow::before,
html.page-perfil #slugDisplayRow::before{
  content:'';width:22px;height:1px;flex:none;
}

/* ===== Cuenta: contadores en fila sin huecos y por gama de color =====
   Los bloques se reparten el ancho (nunca queda espacio vacio al lado).
   Resumen = naranja medio; categorias = naranja mas claro (misma gama). */
html.page-perfil .stats-grid{display:flex!important;flex-wrap:wrap;gap:10px;}
html.page-perfil .stats-grid .stat-card{flex:1 1 calc(33.333% - 7px);min-width:0;box-sizing:border-box;}
html.page-perfil .stats-grid:not(.stats-grid ~ .stats-grid) .stat-card{background:#FFE1BD;}
html.page-perfil .stats-grid ~ .stats-grid .stat-card{background:#FFF0DE;}
@media (min-width:768px){
  html.page-perfil .stats-grid .stat-card{flex:1 1 calc(20% - 8px);}
}
/* Formulario agregar: el titulo (con la flecha atras) separado de los campos con el mismo aire que tiene arriba. */
#modalAdd .modal-title-row{margin-bottom:14px;}
/* Formulario agregar en computadora: mismo espaciado interno que en celular y 420 px de ancho. */
@media (min-width:900px){
  #modalAdd .modal-box{max-width:420px!important;padding:24px 22px 28px!important;gap:10px!important;}
  #modalAdd .modal-title-row{margin-bottom:14px!important;}
}
/* =====================================================================
   Formulario "Agregar point" — modo claro: exactamente lo mismo que en oscuro
   (switch, espacios, "Agregar mas datos", sin contornos) con los colores claros.
   Celular y computadora iguales.
   ===================================================================== */
/* Alto minimo solo en celular; en computadora el formulario se ajusta a su contenido (crece al aparecer cada boton). */
@media (max-width:768px){ #modalAdd .modal-box-tall{ min-height:17vh!important; } }
@media (min-width:769px){ #modalAdd .modal-box-tall{ min-height:0!important; } }
html:not([data-theme="dark"]) #modalAdd .modal-cta-btn{ margin-top:12px!important; }
html:not([data-theme="dark"]) #nameSuggestList,
html:not([data-theme="dark"]) #tagSuggestList,
html:not([data-theme="dark"]) #catDropdownList,
html:not([data-theme="dark"]) #sedeDropdownList{ margin-bottom:6px!important; }
html:not([data-theme="dark"]) #modalAdd .more-details-link{
  display:block; width:max-content; margin:9px auto -4px!important; padding:0 16px;
  border-radius:999px; color:var(--accent)!important; font-weight:400!important; font-size:13px; text-align:center;
}
html:not([data-theme="dark"]) #modalAdd .step-label{ font-weight:400!important; }
html:not([data-theme="dark"]) #modalAdd .modal-back-btn{ background:var(--neutral-light)!important; border:0!important; color:var(--dark)!important; box-shadow:none!important; }
html:not([data-theme="dark"]) #modalAdd .toggle-2{
  position:relative; gap:0!important; padding:4px; border-radius:999px; background:var(--neutral-light)!important; box-shadow:none!important; border:0!important;
}
html:not([data-theme="dark"]) #modalAdd .toggle-2::before{
  content:""; position:absolute; top:4px; bottom:4px; left:4px; width:calc(50% - 4px); border-radius:999px;
  background:var(--accent); opacity:0; transform:translateX(0) scale(.92);
  transition:transform .3s cubic-bezier(.65,0,.35,1), opacity .18s ease;
}
html:not([data-theme="dark"]) #modalAdd .toggle-2[data-active="visitado"]::before{ opacity:1; transform:translateX(0) scale(1); }
html:not([data-theme="dark"]) #modalAdd .toggle-2[data-active="pendiente"]::before{ opacity:1; transform:translateX(100%) scale(1); }
html:not([data-theme="dark"]) #modalAdd .toggle-2 button,
html:not([data-theme="dark"]) #modalAdd .toggle-2 button.active{
  position:relative; z-index:1; flex:1; background:transparent!important; box-shadow:none!important; border:0!important;
  color:var(--dark)!important; font-weight:400!important; transition:color .25s ease;
}
html:not([data-theme="dark"]) #modalAdd .toggle-2 button.active{ color:#fff!important; }
html:not([data-theme="dark"]) #modalAdd #stepExperience{ gap:12px!important; padding-bottom:4px; }
html:not([data-theme="dark"]) #modalAdd #stepExperience .rating-slider-wrap{ margin:34px 0 6px!important; }
html:not([data-theme="dark"]) #modalAdd .input:focus,html:not([data-theme="dark"]) #modalAdd textarea:focus{ outline:none!important; border-color:transparent!important; box-shadow:0 0 0 2px var(--accent)!important; }
