:root{--ink:#18161a;--aub:#35263d;--purple:#69477a;--paper:#f5f1f6;--line:#e6dfe8;--muted:#8c8290}*{box-sizing:border-box}html,body{margin:0;font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);background:var(--paper)}button,input{font:inherit}button{cursor:pointer}.eyebrow{font-size:10px;letter-spacing:.16em;font-weight:900;color:#8f7899}.primary,.secondary{border:0;border-radius:14px;padding:13px 16px;font-weight:850}.primary{background:var(--purple);color:#fff}.secondary{background:#f4eff5;color:var(--aub);border:1px solid var(--line)}.wide{width:100%;margin-top:10px}.auth-body{min-height:100vh;background:linear-gradient(135deg,#18161a,#38283f 55%,#684779);display:grid;place-items:center;padding:22px}.auth-shell{width:min(440px,100%)}.auth-logo{display:block;width:150px;height:86px;object-fit:cover;margin:0 auto 16px;border-radius:20px}.auth-card{background:#fff;border-radius:26px;padding:28px;box-shadow:0 25px 70px #0005}.auth-card h1{font-size:32px;margin:6px 0}.auth-card p{color:var(--muted)}label{display:grid;gap:7px;font-size:12px;font-weight:800;margin:14px 0}input{border:1px solid var(--line);background:#faf8fb;border-radius:13px;padding:13px;outline:0}input:focus{border-color:var(--purple)}label small{color:var(--muted);font-weight:500}.form-error,.error{color:#a22;font-size:12px;min-height:18px;margin-top:6px}.auth-foot{text-align:center;font-size:13px}.auth-foot a{color:var(--purple);font-weight:800}.app{min-height:100dvh;padding-bottom:74px}.topbar{height:76px;display:grid;grid-template-columns:70px 1fr 44px;align-items:center;padding:8px 15px;background:linear-gradient(110deg,#18161a,#35263d 60%,#613f71);color:#fff}.mini-logo{width:58px;height:52px;object-fit:cover;border-radius:14px}.group-title{background:transparent;border:0;color:#fff;text-align:left}.group-title small{display:block;font-size:9px;letter-spacing:.14em;opacity:.65}.group-title strong{font-size:18px}.gear{width:40px;height:40px;border-radius:50%;border:1px solid #ffffff22;background:#ffffff12;color:#fff}.members{background:#fff;padding:10px 14px;border-bottom:1px solid var(--line)}.members-head{display:flex;justify-content:space-between;font-size:12px}.members-head button{border:0;background:transparent;color:var(--purple);font-weight:800}.member-row{display:flex;gap:15px;overflow:auto;margin-top:8px}.member{min-width:62px;text-align:center}.avatar{width:48px;height:48px;margin:auto;border-radius:50%;display:grid;place-items:center;background:linear-gradient(145deg,#251d29,#755188);color:#fff;font-weight:900;position:relative}.avatar i{position:absolute;right:-7px;bottom:-4px;width:24px;height:24px;border-radius:50%;background:#fff;display:grid;place-items:center;font-style:normal;font-size:12px;box-shadow:0 2px 9px #0003}.member span,.member small{display:block;font-size:10px;margin-top:4px}.member small{color:var(--muted)}.empty-inline{padding:12px;color:var(--muted);font-size:12px}.map-wrap{height:calc(100dvh - 76px - 91px - 74px);min-height:430px;position:relative}#map{position:absolute;inset:0}.map-buttons{position:absolute;z-index:400;right:15px;top:15px}.map-buttons button{width:46px;height:46px;border:0;border-radius:50%;background:#fff;font-size:24px;box-shadow:0 10px 30px #0003}.location-card{position:absolute;z-index:400;left:14px;right:14px;bottom:64px;background:#18161aee;color:#fff;border-radius:18px;padding:13px 14px;display:flex;justify-content:space-between;align-items:center}.location-card small{display:block;color:#cfc5d2;margin-top:4px}.location-card button{border:0;background:var(--purple);color:#fff;border-radius:12px;padding:10px 13px;font-weight:800}.ad{position:absolute;z-index:390;bottom:0;left:0;right:0;height:54px;background:#fff;display:grid;place-items:center;border-top:1px solid var(--line);font-size:10px;color:#777}nav{position:fixed;z-index:700;bottom:0;left:0;right:0;height:74px;background:#fff;display:grid;grid-template-columns:repeat(4,1fr);border-top:1px solid var(--line)}nav button{border:0;background:transparent;color:#938899;font-size:22px;display:grid;place-items:center;align-content:center}nav button small{font-size:10px;font-weight:750}nav button.active{color:var(--purple)}.shade{position:fixed;inset:0;background:#0007;z-index:800;opacity:0;pointer-events:none;transition:.2s}.shade.on{opacity:1;pointer-events:auto}.sheet{position:fixed;z-index:810;left:50%;bottom:0;transform:translate(-50%,105%);width:min(560px,100%);background:#fff;border-radius:26px 26px 0 0;padding:24px 20px 30px;transition:.25s;max-height:82vh;overflow:auto}.sheet.on{transform:translate(-50%,0)}.sheet .x{position:absolute;right:18px;top:17px;border:0;background:#f2edf4;width:35px;height:35px;border-radius:50%;font-size:20px}.sheet h2{margin:3px 45px 18px 0}.option{display:block;text-decoration:none;color:inherit;border:1px solid var(--line);border-radius:14px;padding:14px;margin:8px 0}.option small{display:block;color:var(--muted);margin-top:4px}.code{text-align:center;font-size:34px;font-weight:900;letter-spacing:.16em;background:#f4eef6;border-radius:18px;padding:20px;color:var(--aub)}.muted{color:var(--muted);line-height:1.5}.plan{display:inline-block;background:var(--aub);color:#fff;border-radius:999px;padding:7px 12px;font-size:11px;font-weight:900;margin-bottom:14px}@media(min-width:700px){.app{max-width:520px;margin:auto;box-shadow:0 0 60px #0002;background:#fff}nav{left:50%;right:auto;width:520px;transform:translateX(-50%)}}
.avatar img{width:100%;height:100%;object-fit:cover;border-radius:50%}.profileline{display:flex;align-items:center;gap:12px;margin:8px 0 18px}.profileline img,.avatar.big{width:58px;height:58px;border-radius:50%;object-fit:cover}.profileline small{display:block;color:var(--muted);margin-top:3px}.optionbtn,.danger{width:100%;text-align:left;border:0;background:#fff;border-bottom:1px solid var(--line);padding:15px 5px;font-weight:750}.danger{color:#b22}.clean{height:calc(100dvh - 76px - 91px - 74px)}hr{border:0;border-top:1px solid var(--line);margin:12px 0}.leaflet-control-attribution{font-size:8px!important;opacity:.72}


/* =========================================================
   UBBY V2.2
   ========================================================= */

.menu-btn{
  width:42px;
  height:42px;
  border:0;
  border-radius:14px;
  background:#ffffff12;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:7px;
  padding:0;
}
.menu-btn span{
  display:block;
  width:20px;
  height:2px;
  border-radius:100px;
  background:#fff;
}

/* Foto de integrante: siempre recortada y centrada dentro del círculo */
.avatar > img{
  position:absolute !important;
  inset:0 !important;
  width:100% !important;
  height:100% !important;
  max-width:none !important;
  object-fit:cover !important;
  object-position:center center !important;
  border-radius:50% !important;
  clip-path:circle(50% at 50% 50%);
}

/* Foto grande del perfil dentro del menú */
.profile-photo{
  width:58px !important;
  height:58px !important;
  min-width:58px;
  border-radius:50% !important;
  object-fit:cover !important;
  object-position:center center !important;
}

.menu-profile{
  display:flex;
  align-items:center;
  gap:13px;
  padding:4px 2px 18px;
}
.menu-profile small{
  display:block;
  margin-top:4px;
  color:var(--muted);
}
.menu-list{
  border-top:1px solid var(--line);
}
.menu-list form{
  margin:0;
}
.menu-item{
  width:100%;
  border:0;
  border-bottom:1px solid var(--line);
  background:#fff;
  padding:16px 4px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  text-align:left;
  color:var(--ink);
  font-weight:760;
}
.menu-item b{
  font-size:22px;
  font-weight:400;
  line-height:1;
  color:#aaa0ad;
}
.menu-danger{
  margin-top:22px;
  padding:14px;
  border:0;
  border-radius:14px;
  text-align:center;
  background:#fff3f3;
}

/* La marca propia de Leaflet se elimina. Solo queda la atribución mínima de OSM. */
.leaflet-control-attribution{
  display:none !important;
}
.osm-credit{
  position:absolute;
  z-index:390;
  left:6px;
  bottom:6px;
  padding:2px 5px;
  border-radius:5px;
  background:rgba(255,255,255,.76);
  color:#655d68;
  font-size:7px;
  line-height:1.15;
  pointer-events:none;
}

/* El panel siempre queda por encima del mapa y de la atribución */
.shade{z-index:900 !important}
.sheet{z-index:910 !important}

@media(max-width:560px){
  .osm-credit{
    left:4px;
    bottom:4px;
    font-size:6.5px;
  }
}


/* =========================================================
   UBBY V2.3 - MENU + INTEGRANTES
   ========================================================= */

/* Botón tipo FIBI: recuadro blanco redondeado con SOLO 2 rayas */
.menu-btn{
  width:46px !important;
  height:46px !important;
  border:1px solid rgba(0,0,0,.08) !important;
  border-radius:15px !important;
  background:#fff !important;
  display:flex !important;
  flex-direction:column !important;
  align-items:center !important;
  justify-content:center !important;
  gap:7px !important;
  padding:0 !important;
  box-shadow:0 5px 16px rgba(0,0,0,.10);
}
.menu-btn .menu-line{
  display:block !important;
  width:21px !important;
  height:2.5px !important;
  border-radius:999px !important;
  background:#1c2027 !important;
}

/* Integrantes: nada puede crecer al tamaño de la foto original */
.member-row{
  display:flex !important;
  align-items:flex-start !important;
  gap:16px !important;
  min-height:82px !important;
  max-height:96px !important;
  overflow-x:auto !important;
  overflow-y:hidden !important;
  padding:2px 2px 5px !important;
}
.member-card{
  flex:0 0 62px !important;
  width:62px !important;
  min-width:62px !important;
  max-width:62px !important;
  text-align:center !important;
  overflow:visible !important;
}
.member-avatar-shell{
  position:relative !important;
  width:52px !important;
  height:52px !important;
  margin:0 auto !important;
  flex:0 0 52px !important;
}
.member-avatar{
  position:relative !important;
  width:52px !important;
  height:52px !important;
  min-width:52px !important;
  min-height:52px !important;
  max-width:52px !important;
  max-height:52px !important;
  border-radius:50% !important;
  overflow:hidden !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  background:linear-gradient(145deg,#251d29,#755188) !important;
  color:#fff !important;
  font-weight:900 !important;
  font-size:18px !important;
}
.member-photo{
  position:absolute !important;
  inset:0 !important;
  display:block !important;
  width:52px !important;
  height:52px !important;
  min-width:52px !important;
  min-height:52px !important;
  max-width:52px !important;
  max-height:52px !important;
  object-fit:cover !important;
  object-position:50% 50% !important;
  border:0 !important;
  border-radius:50% !important;
  margin:0 !important;
  padding:0 !important;
}
.member-initial{
  display:block !important;
  line-height:1 !important;
}
.activity-badge{
  position:absolute !important;
  z-index:3 !important;
  right:-5px !important;
  bottom:-3px !important;
  width:22px !important;
  height:22px !important;
  border-radius:50% !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  background:#fff !important;
  color:#222 !important;
  font-size:11px !important;
  box-shadow:0 2px 8px rgba(0,0,0,.22) !important;
}
.member-name{
  display:block !important;
  margin-top:6px !important;
  font-size:10px !important;
  line-height:1.1 !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}
.member-battery{
  display:block !important;
  margin-top:2px !important;
  color:var(--muted) !important;
  font-size:9px !important;
}

/* Anula por completo las clases antiguas para que no deformen las fotos */
.members .avatar,
.members .member{
  all:unset;
}

/* Menú real: foto pequeña + todas las opciones debajo */
.settings-title{
  font-size:24px;
  font-weight:850;
  margin:2px 44px 18px 0;
}
.menu-profile-row{
  display:flex !important;
  align-items:center !important;
  gap:13px !important;
  padding:0 0 18px !important;
}
.menu-avatar{
  position:relative !important;
  width:58px !important;
  height:58px !important;
  min-width:58px !important;
  max-width:58px !important;
  border-radius:50% !important;
  overflow:hidden !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  background:linear-gradient(145deg,#251d29,#755188) !important;
  color:#fff !important;
  font-size:20px !important;
  font-weight:900 !important;
}
.menu-avatar img{
  position:absolute !important;
  inset:0 !important;
  width:58px !important;
  height:58px !important;
  min-width:58px !important;
  max-width:58px !important;
  object-fit:cover !important;
  object-position:center !important;
  border-radius:50% !important;
  margin:0 !important;
  padding:0 !important;
}
.menu-profile-text{
  min-width:0 !important;
}
.menu-profile-text b{
  display:block;
  font-size:16px;
}
.menu-profile-text small{
  display:block;
  margin-top:4px;
  color:var(--muted);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

/* El panel no puede quedar detrás del mapa */
.shade{z-index:10000 !important}
.sheet{z-index:10001 !important}


/* =========================================================
   UBBY V2.4 - SWITCH DE UBICACIÓN
   ========================================================= */

.location-toggle-row{
  cursor:default !important;
}
.location-toggle-row > div{
  display:flex;
  flex-direction:column;
  gap:3px;
}
.location-toggle-row small{
  color:var(--muted);
  font-size:10px;
  font-weight:600;
}

.switch{
  position:relative;
  display:inline-block;
  width:48px;
  height:28px;
  margin:0;
  flex:0 0 48px;
}
.switch input{
  position:absolute;
  opacity:0;
  width:0;
  height:0;
}
.switch-slider{
  position:absolute;
  inset:0;
  border-radius:999px;
  background:#d8d2da;
  transition:.2s ease;
  box-shadow:inset 0 0 0 1px rgba(0,0,0,.05);
}
.switch-slider:before{
  content:"";
  position:absolute;
  width:22px;
  height:22px;
  left:3px;
  top:3px;
  border-radius:50%;
  background:#fff;
  box-shadow:0 2px 7px rgba(0,0,0,.25);
  transition:.2s ease;
}
.switch input:checked + .switch-slider{
  background:var(--purple);
}
.switch input:checked + .switch-slider:before{
  transform:translateX(20px);
}
.switch input:disabled + .switch-slider{
  opacity:.6;
}


/* =========================================================
   UBBY V2.5 - UBICACIÓN ENTRE INTEGRANTES
   ========================================================= */

.group-members-title{
  margin:20px 0 8px;
  font-size:12px;
  font-weight:850;
  color:var(--muted);
  text-transform:uppercase;
  letter-spacing:.08em;
}

.manage-member{
  display:flex;
  align-items:center;
  gap:11px;
  padding:10px 0;
  border-bottom:1px solid var(--line);
}
.manage-member-avatar{
  position:relative;
  width:42px;
  height:42px;
  min-width:42px;
  border-radius:50%;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(145deg,#251d29,#755188);
  color:#fff;
  font-weight:900;
}
.manage-member-avatar img{
  position:absolute;
  inset:0;
  width:42px !important;
  height:42px !important;
  object-fit:cover !important;
  object-position:center !important;
  border-radius:50% !important;
}
.manage-member-info{
  flex:1;
  min-width:0;
}
.manage-member-info b,
.manage-member-info small{
  display:block;
}
.manage-member-info small{
  margin-top:2px;
  color:var(--muted);
  font-size:10px;
}
.remove-member{
  border:0;
  background:#fff1f1;
  color:#a22525;
  border-radius:10px;
  padding:8px 10px;
  font-size:10px;
  font-weight:800;
}
.loading-line{
  padding:12px 0;
  color:var(--muted);
  font-size:12px;
}

/* Leaflet div icon */
.tuubi-div-icon{
  background:transparent !important;
  border:0 !important;
}
.tuubi-person-marker{
  position:relative;
  width:64px;
  height:64px;
}
.map-avatar{
  position:absolute;
  z-index:3;
  left:7px;
  top:7px;
  width:50px;
  height:50px;
  border-radius:50%;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(145deg,#665f67,#8d8790);
  color:#fff;
  font-size:19px;
  font-weight:900;
  border:3px solid #fff;
  box-shadow:0 3px 12px rgba(0,0,0,.33);
}
.map-avatar img{
  position:absolute;
  inset:0;
  width:50px !important;
  height:50px !important;
  max-width:50px !important;
  max-height:50px !important;
  object-fit:cover !important;
  object-position:center !important;
  border-radius:50% !important;
  margin:0 !important;
  padding:0 !important;
}
.direction-wrap{
  position:absolute;
  z-index:1;
  left:0;
  top:0;
  width:64px;
  height:64px;
  transform-origin:32px 32px;
  pointer-events:none;
}
.direction-cone{
  position:absolute;
  left:22px;
  top:-30px;
  width:20px;
  height:44px;
  background:linear-gradient(to top,rgba(105,71,122,.05),rgba(105,71,122,.62));
  clip-path:polygon(50% 0,100% 100%,0 100%);
  filter:drop-shadow(0 2px 3px rgba(0,0,0,.10));
}
.member-popup{
  min-width:155px;
  font-size:12px;
}
.member-popup b{
  display:block;
  font-size:14px;
  margin-bottom:6px;
}
.member-popup-status{
  margin-bottom:5px;
  color:var(--aub);
  font-weight:800;
}
.leaflet-popup-content{
  margin:12px 14px !important;
}


/* UBBY V2.6 */
.member-battery{
  min-height:11px;
}
.direction-cone{
  /* El vértice apunta hacia el rumbo del borde superior del teléfono. */
  transform-origin:50% 100%;
}


/* UBBY V2.6.1 — cono de orientación estilo referencia
   El vértice queda pegado al marcador y el cono se abre hacia la dirección apuntada. */
.direction-cone{
  clip-path:polygon(0 0,100% 0,50% 100%) !important;
}


/* =========================================================
   UBBY V2.7 — LUGARES
   ========================================================= */

.places-intro{
  margin:-4px 0 12px;
  color:var(--muted);
  font-size:12px;
  line-height:1.45;
}
.places-section-title{
  margin:22px 0 8px;
  font-size:10px;
  font-weight:900;
  letter-spacing:.10em;
  color:var(--muted);
  text-transform:uppercase;
}
.places-empty{
  padding:18px 8px;
  text-align:center;
  color:var(--muted);
}
.places-empty b,
.places-empty span{
  display:block;
}
.places-empty b{
  color:var(--ink);
  margin-bottom:5px;
}
.place-card{
  display:flex;
  align-items:center;
  gap:8px;
  border-bottom:1px solid var(--line);
}
.place-main{
  flex:1;
  min-width:0;
  display:flex;
  align-items:center;
  gap:11px;
  border:0;
  background:#fff;
  text-align:left;
  padding:12px 0;
}
.place-card-icon{
  width:38px;
  height:38px;
  min-width:38px;
  border-radius:13px;
  display:grid;
  place-items:center;
  background:#f1eaf4;
  color:var(--purple);
  font-size:22px;
  font-weight:900;
}
.place-card-copy{
  min-width:0;
}
.place-card-copy b,
.place-card-copy small{
  display:block;
}
.place-card-copy small{
  margin-top:3px;
  color:var(--muted);
  font-size:10px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.place-edit{
  border:0;
  background:transparent;
  color:var(--purple);
  font-size:11px;
  font-weight:850;
  padding:10px 4px;
}
.place-event{
  display:flex;
  gap:10px;
  align-items:flex-start;
  padding:10px 0;
  border-bottom:1px solid var(--line);
}
.place-event-dot{
  width:26px;
  height:26px;
  min-width:26px;
  border-radius:50%;
  display:grid;
  place-items:center;
  background:#f1eaf4;
  color:var(--purple);
  font-weight:900;
}
.place-event b,
.place-event small{
  display:block;
}
.place-event b{
  font-size:11px;
}
.place-event small{
  margin-top:3px;
  color:var(--muted);
  font-size:9px;
}
.place-no-events{
  padding:10px 0;
  font-size:11px;
}
.place-div-icon{
  background:transparent !important;
  border:0 !important;
}
.place-pin{
  width:34px;
  height:34px;
  border-radius:50%;
  display:grid;
  place-items:center;
  background:#fff;
  color:var(--purple);
  border:2px solid var(--purple);
  font-size:20px;
  font-weight:900;
  box-shadow:0 3px 12px rgba(0,0,0,.18);
}
.place-popup b{
  display:block;
  margin-bottom:5px;
}
.place-popup small{
  display:block;
  margin-top:4px;
  color:var(--muted);
}
.place-pick-banner{
  position:absolute;
  z-index:650;
  left:14px;
  right:14px;
  top:14px;
  background:#18161aee;
  color:#fff;
  border-radius:17px;
  padding:12px 14px;
  display:grid;
  grid-template-columns:1fr auto;
  column-gap:10px;
  align-items:center;
  box-shadow:0 8px 25px rgba(0,0,0,.24);
}
.place-pick-banner b{
  font-size:13px;
}
.place-pick-banner span{
  grid-column:1;
  margin-top:2px;
  color:#d9d0dc;
  font-size:10px;
}
.place-pick-banner button{
  grid-column:2;
  grid-row:1 / span 2;
  border:0;
  border-radius:10px;
  background:#ffffff18;
  color:#fff;
  padding:8px 10px;
  font-size:10px;
  font-weight:800;
}
.place-picking #map{
  cursor:crosshair;
}
.radius-row{
  display:grid;
  grid-template-columns:1fr 58px;
  align-items:center;
  gap:10px;
}
.radius-row input[type="range"]{
  width:100%;
  padding:0;
  accent-color:var(--purple);
}
.radius-row b{
  font-size:11px;
  text-align:right;
}
.place-switch-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:13px 0;
  border-bottom:1px solid var(--line);
  font-size:12px;
  font-weight:750;
}
.place-coords{
  margin-top:12px;
  padding:10px;
  border-radius:11px;
  background:#f7f4f8;
  color:var(--muted);
  font-size:9px;
}


/* =========================================================
   UBBY V2.9 — VIAJES
   ========================================================= */

.trips-intro{
  margin:-4px 0 12px;
  color:var(--muted);
  font-size:12px;
  line-height:1.45;
}
.trip-filter{
  display:flex;
  gap:7px;
  overflow-x:auto;
  padding:2px 0 12px;
}
.trip-filter-chip{
  flex:0 0 auto;
  border:1px solid var(--line);
  background:#fff;
  color:var(--muted);
  border-radius:999px;
  padding:8px 11px;
  font-size:10px;
  font-weight:800;
}
.trip-filter-chip.active{
  background:var(--aub);
  color:#fff;
  border-color:var(--aub);
}
.trip-card{
  width:100%;
  display:flex;
  align-items:center;
  gap:11px;
  border:0;
  border-bottom:1px solid var(--line);
  background:#fff;
  padding:13px 0;
  text-align:left;
}
.trip-avatar{
  position:relative;
  width:43px;
  height:43px;
  min-width:43px;
  overflow:hidden;
  border-radius:50%;
  display:grid;
  place-items:center;
  background:linear-gradient(145deg,#251d29,#755188);
  color:#fff;
  font-weight:900;
}
.trip-avatar img{
  position:absolute;
  inset:0;
  width:43px !important;
  height:43px !important;
  object-fit:cover !important;
  object-position:center !important;
  border-radius:50% !important;
}
.trip-copy{
  min-width:0;
  flex:1;
}
.trip-title{
  display:flex;
  align-items:center;
  gap:7px;
  min-width:0;
}
.trip-title b{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:12px;
}
.trip-title em{
  font-style:normal;
  color:var(--purple);
  font-size:10px;
  white-space:nowrap;
}
.trip-copy > small{
  display:block;
  margin-top:3px;
  color:var(--muted);
  font-size:9px;
}
.trip-stats{
  display:flex;
  gap:10px;
  margin-top:6px;
}
.trip-stats strong{
  font-size:10px;
  font-weight:850;
}
.trip-live{
  color:var(--purple);
  font-size:8px !important;
}
.trip-arrow{
  color:#afa5b1;
  font-size:24px;
}
.trips-empty{
  padding:28px 8px;
  text-align:center;
  color:var(--muted);
}
.trips-empty b,
.trips-empty span{
  display:block;
}
.trips-empty b{
  color:var(--ink);
  margin-bottom:5px;
}
.trip-map-summary{
  position:absolute;
  z-index:640;
  left:14px;
  right:14px;
  bottom:68px;
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 42px 12px 13px;
  border-radius:17px;
  background:rgba(24,22,26,.94);
  color:#fff;
  box-shadow:0 8px 28px rgba(0,0,0,.24);
}
.trip-summary-icon{
  font-size:23px;
}
.trip-map-summary b,
.trip-map-summary small{
  display:block;
}
.trip-map-summary b{
  font-size:12px;
}
.trip-map-summary small{
  margin-top:3px;
  color:#d4cbd7;
  font-size:10px;
}
.trip-summary-close{
  position:absolute;
  right:10px;
  top:9px;
  width:27px;
  height:27px;
  border:0;
  border-radius:50%;
  background:#ffffff16;
  color:#fff;
  font-size:18px;
}


/* =========================================================
   UBBY V3.0 — PLANES + ADMINISTRACIÓN
   ========================================================= */

.member-card{
  appearance:none !important;
  -webkit-appearance:none !important;
  border:0 !important;
  background:transparent !important;
  padding:0 !important;
  color:inherit !important;
  font:inherit !important;
  cursor:pointer !important;
}
.member-card:active .member-avatar{transform:scale(.96)}
.member-avatar{transition:transform .12s ease}

/* Sube los controles + / - para que no invadan la barra inferior */
.leaflet-bottom.leaflet-right{bottom:78px !important}
.leaflet-bottom.leaflet-right .leaflet-control{margin-bottom:0 !important}

.group-name-edit,
.group-code-row{
  display:grid;
  grid-template-columns:1fr auto;
  gap:8px;
  align-items:center;
}
.group-name-edit .secondary,
.group-code-row .secondary{
  width:auto;
  margin:0;
  padding:12px 13px;
}
.menu-plan-label{
  display:inline-block;
  margin-left:5px;
  color:var(--purple);
  font-size:8px;
  letter-spacing:.08em;
}

.plan-lock{
  padding:30px 12px;
  text-align:center;
}
.plan-lock-icon{
  width:56px;
  height:56px;
  margin:0 auto 12px;
  border-radius:18px;
  display:grid;
  place-items:center;
  background:#f1eaf4;
  color:var(--purple);
  font-size:27px;
}
.plan-lock b{display:block;font-size:17px}
.plan-lock p{
  max-width:310px;
  margin:7px auto 17px;
  color:var(--muted);
  font-size:11px;
  line-height:1.5;
}
.plan-lock-button{
  display:inline-block;
  text-decoration:none;
  width:auto;
}

/* Planes */
.plans-body{min-height:100vh;background:#f5f1f6}
.plans-shell{
  width:min(920px,100%);
  margin:0 auto;
  padding:22px 18px 50px;
}
.plans-top{
  display:grid;
  grid-template-columns:42px 66px 1fr;
  align-items:center;
  gap:12px;
  margin-bottom:20px;
}
.plans-top img{
  width:62px;
  height:62px;
  border-radius:17px;
  object-fit:cover;
}
.plans-top h1{margin:3px 0 2px;font-size:30px}
.plans-top p{margin:0;color:var(--muted);font-size:12px}
.plans-back{
  width:38px;height:38px;border-radius:50%;
  display:grid;place-items:center;
  background:#fff;color:var(--ink);
  text-decoration:none;font-size:28px;
  box-shadow:0 3px 15px rgba(0,0,0,.08);
}
.plans-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:14px;
}
.plan-card{
  background:#fff;
  border:1px solid var(--line);
  border-radius:23px;
  padding:20px;
  box-shadow:0 12px 30px rgba(0,0,0,.04);
}
.plan-card.featured{border-color:#725282}
.plan-card.current{box-shadow:0 0 0 2px var(--purple)}
.plan-card-head{
  display:flex;
  justify-content:space-between;
  gap:8px;
  align-items:flex-start;
}
.plan-card h2{margin:4px 0 0;font-size:28px}
.plan-card h2 small{font-size:10px;color:var(--muted);font-weight:650}
.plan-card>p{
  color:var(--muted);
  font-size:11px;
  line-height:1.5;
  min-height:49px;
}
.plan-card ul{list-style:none;padding:0;margin:18px 0}
.plan-card li{
  padding:8px 0;
  border-bottom:1px solid var(--line);
  font-size:11px;
}
.plan-card li:before{
  content:"✓";
  margin-right:8px;
  color:var(--purple);
  font-weight:900;
}
.current-badge{
  flex:0 0 auto;
  background:#eee7f1;
  color:var(--purple);
  border-radius:999px;
  padding:6px 8px;
  font-size:8px;
  font-weight:900;
}
.plan-action{
  display:block;
  text-decoration:none;
  text-align:center;
}
.plans-note{
  margin:18px auto 0;
  max-width:650px;
  text-align:center;
  color:var(--muted);
  font-size:10px;
  line-height:1.5;
}
.checkout-summary{
  display:grid;
  grid-template-columns:1fr auto;
  gap:10px;
  margin:20px 0;
  padding:14px;
  border-radius:14px;
  background:#f6f2f7;
  font-size:12px;
}
.checkout-month{font-size:12px;color:var(--muted)}
.checkout-back{
  display:block;
  text-align:center;
  text-decoration:none;
}

@media(max-width:720px){
  .plans-grid{grid-template-columns:1fr}
  .plan-card>p{min-height:0}
}


/* =========================================================
   UBBY V3.1 — FACTURACIÓN MENSUAL / ANUAL
   ========================================================= */
.billing-toggle{
  width:max-content;
  max-width:100%;
  margin:0 auto 20px;
  padding:4px;
  border-radius:999px;
  display:flex;
  gap:3px;
  background:#eae4ec;
}
.billing-toggle a{
  text-decoration:none;
  color:var(--muted);
  border-radius:999px;
  padding:10px 17px;
  font-size:11px;
  font-weight:850;
  white-space:nowrap;
}
.billing-toggle a.active{
  background:#fff;
  color:var(--aub);
  box-shadow:0 3px 12px rgba(0,0,0,.08);
}
.billing-toggle a span{
  margin-left:4px;
  color:var(--purple);
  font-size:9px;
}
.annual-saving{
  display:flex;
  align-items:center;
  gap:7px;
  margin-top:5px;
  font-size:9px;
}
.annual-saving s{
  color:var(--muted);
}
.annual-saving span{
  color:var(--purple);
  font-weight:850;
}
.annual-equivalent{
  display:block;
  margin-top:4px;
  color:var(--muted);
  font-size:9px !important;
}
.annual-note{
  text-align:center;
  margin:18px 0 0;
  font-size:10px;
  color:var(--purple);
  font-weight:800;
}
.checkout-discount{
  display:inline-block;
  margin:0 0 8px;
  padding:7px 10px;
  border-radius:999px;
  background:#eee7f1;
  color:var(--purple);
  font-size:10px;
  font-weight:900;
}


/* =========================================================
   UBBY V3.2 — STRIPE + ACTIVIDAD ANIMADA
   ========================================================= */

.manage-subscription-form{
  margin:18px auto 0;
  display:grid;
  justify-items:center;
  gap:7px;
}
.manage-subscription-form .secondary{
  width:auto;
  padding:11px 18px;
}
.manage-subscription-form small{
  color:var(--muted);
  font-size:9px;
}
.payment-result{text-align:center}
.payment-check{
  width:62px;height:62px;margin:0 auto 14px;
  display:grid;place-items:center;
  border-radius:50%;
  background:#eee7f1;color:var(--purple);
  font-size:30px;font-weight:900;
}

/* Actividad animada alrededor del marcador */
.motion-icon{
  position:absolute;
  z-index:5;
  right:-7px;
  bottom:-5px;
  width:28px;
  height:28px;
  border-radius:50%;
  display:grid;
  place-items:center;
  background:#fff;
  box-shadow:0 3px 10px rgba(0,0,0,.24);
  font-size:16px;
  transform-origin:50% 100%;
}
.motion-walking{animation:tuubiWalk .62s ease-in-out infinite alternate}
.motion-running{animation:tuubiRun .34s ease-in-out infinite alternate}
.motion-cycling{animation:tuubiCycle .55s linear infinite}
.motion-driving{animation:tuubiDrive .72s ease-in-out infinite alternate}

@keyframes tuubiWalk{
  from{transform:translate(-2px,1px) rotate(-7deg)}
  to{transform:translate(2px,-2px) rotate(7deg)}
}
@keyframes tuubiRun{
  from{transform:translate(-3px,1px) rotate(-10deg) scale(1)}
  to{transform:translate(3px,-3px) rotate(10deg) scale(1.05)}
}
@keyframes tuubiCycle{
  0%{transform:translateY(0) rotate(-3deg)}
  25%{transform:translateY(-2px) rotate(2deg)}
  50%{transform:translateY(0) rotate(3deg)}
  75%{transform:translateY(-2px) rotate(-2deg)}
  100%{transform:translateY(0) rotate(-3deg)}
}
@keyframes tuubiDrive{
  from{transform:translateX(-3px)}
  to{transform:translateX(3px)}
}

@media (prefers-reduced-motion: reduce){
  .motion-icon{animation:none !important}
}
