/* ============================================================
   VESTIO — style.css
   ============================================================ */

/* VARIABLES Y RESET */
:root {
  --black: #0A0A0A;
  --white: #FAFAF8;
  --cream: #F5F3EE;
  --gold: #C9A96E;
  --gold-light: #F0E6D3;
  --premium: #6B4E9C;
  --premium-light: #EAE0F5;
  --text: #1A1A1A;
  --mid: #404040;
  --light: #606060;
  --border: #E8E5DF;
  --r: 12px;
  --rs: 8px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'DM Sans', sans-serif; background: var(--cream); color: var(--text); min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.app { width: 100%; max-width: 460px; min-height: 100vh; background: var(--white); display: flex; flex-direction: column; box-shadow: 0 0 60px rgba(0,0,0,0.08); position: relative; }

/* UTILIDADES */
.hidden { display: none !important; }
.app.modo-alto-contraste { filter: contrast(1.18) saturate(1.35); }
.spacer { height: 2rem; flex-shrink: 0; }
.ok-note { font-size: 12px; color: #27ae60; display: none; }

/* ANIMACION */
@keyframes fi { from { opacity: 0; } to { opacity: 1; } }

/* ============================================================
   ESTADO 1 y 2: PANTALLAS .screen
   ============================================================ */
.screen { display: none; flex-direction: column; min-height: 100vh; }
.screen.active { display: flex; animation: fi 0.3s ease; }

/* LANDING */
.landing { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3rem 2rem; text-align: center; position: relative; overflow: hidden; }
.l-top { position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.l-bg { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 30%, rgba(201,169,110,0.1) 0%, transparent 70%); pointer-events: none; }
.l-content { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 1.5rem; }
.logo { font-family: 'Cormorant Garamond', serif; font-size: 56px; font-weight: 400; letter-spacing: -2px; line-height: 1; }
.logo em { color: var(--gold); font-style: italic; }
.badge { display: inline-flex; align-items: center; gap: 6px; background: var(--gold-light); color: var(--gold); font-size: 10px; font-weight: 600; padding: 5px 12px; border-radius: 20px; letter-spacing: 1.5px; text-transform: uppercase; }
.badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }
.landing h2 { font-family: 'Cormorant Garamond', serif; font-size: 26px; font-weight: 400; line-height: 1.3; font-style: italic; max-width: 300px; }
.landing p { font-size: 14px; color: var(--mid); line-height: 1.7; max-width: 300px; }
.l-note { font-size: 11px; color: var(--light); letter-spacing: 0.5px; }
.l-tagline { font-size: 13px; color: var(--mid); line-height: 1.7; max-width: 280px; text-align: center; padding: 0 1rem; }

/* BOTONES */
.btn { background: var(--black); color: var(--white); border: none; padding: 15px 32px; border-radius: var(--r); font-size: 14px; font-weight: 500; font-family: 'DM Sans', sans-serif; cursor: pointer; width: 100%; max-width: 280px; transition: all 0.2s; position: relative; overflow: hidden; }
.btn::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 2px; background: var(--gold); border-radius: 0 0 var(--r) var(--r); }
.btn:hover { background: #1a1a1a; transform: translateY(-1px); }
.btn-ghost { background: var(--cream); color: var(--text); border: 1px solid var(--border); }
.btn-ghost::after { display: none; }
.btn-ghost:hover { border-color: var(--text); transform: none; }
.ghost-btn { background: var(--cream); border: 1px solid var(--border); color: var(--text); padding: 15px 32px; border-radius: var(--r); font-size: 14px; font-weight: 500; font-family: 'DM Sans', sans-serif; cursor: pointer; width: 100%; max-width: 280px; transition: all 0.2s; }
.btn, .ghost-btn, .btn-ghost { max-width: 100% !important; }
.action-btn { background: var(--gold); color: var(--white); border: none; padding: 12px 24px; border-radius: var(--r); font-size: 14px; font-weight: 500; font-family: 'DM Sans', sans-serif; cursor: pointer; width: 100%; transition: all 0.2s; }
.action-btn:hover { background: #b8934a; }

/* MURO EMAIL */
.email-gate { flex: 1; display: flex; flex-direction: column; padding: 2rem 1.5rem; gap: 1.25rem; max-width: 100%; }
.email-gate h2 { font-family: 'Cormorant Garamond', serif; font-size: 22px; font-weight: 400; line-height: 1.35; text-align: center; color: var(--text); width: 100%; margin: 0 auto; }
.email-gate-form { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 320px; margin: 0 auto; }
.email-gate-form input { padding: 0 14px; height: 48px; border-radius: var(--r); border: 1px solid var(--border); background: var(--cream); color: var(--text); font-size: 15px; font-family: 'DM Sans', sans-serif; outline: none; width: 100%; }
.email-gate-form input:focus { border-color: var(--gold); }
.email-gate-trust { display: flex; gap: 10px; align-items: flex-start; background: var(--gold-light); border: 1px solid var(--gold); border-radius: var(--r); padding: 12px 14px; font-size: 12px; color: #5C4209; line-height: 1.55; max-width: 320px; margin: 0 auto; }
.email-gate-trust svg { flex-shrink: 0; margin-top: 2px; }
.email-gate-err { font-size: 12px; color: #c0392b; text-align: center; display: none; }
.email-gate-form.hidden { display: none; }

/* HEADER */
.hdr { padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; background: var(--white); position: sticky; top: 0; z-index: 10; }
.av { width: 34px; height: 34px; border-radius: 50%; background: var(--black); display: flex; align-items: center; justify-content: center; font-family: 'Cormorant Garamond', serif; font-size: 16px; color: var(--gold); font-style: italic; flex-shrink: 0; }
.hdr-info .name { font-size: 13px; font-weight: 600; }
.hdr-info .sub { font-size: 11px; color: var(--light); }
.hdr-right { margin-left: auto; font-size: 10px; font-weight: 600; color: var(--light); letter-spacing: 1px; text-transform: uppercase; }

/* PROGRESS BAR */
.prog-bar { height: 2px; background: var(--border); flex-shrink: 0; }
.prog-fill { height: 2px; background: linear-gradient(90deg, var(--gold), var(--black)); transition: width 0.5s ease; }

/* CHAT */
.msgs { flex: 1; overflow-y: auto; padding: 1.25rem; display: flex; flex-direction: column; gap: 14px; }
.msg { max-width: 88%; display: flex; flex-direction: column; }
.msg.bot { align-self: flex-start; }
.msg.usr { align-self: flex-end; }
.bbl { padding: 11px 15px; border-radius: 16px; font-size: 14px; line-height: 1.6; }
.bot .bbl { background: var(--cream); color: var(--text); border-bottom-left-radius: 4px; }
.usr .bbl { background: var(--black); color: var(--white); border-bottom-right-radius: 4px; }
.typing { display: flex; gap: 5px; align-items: center; padding: 14px 15px; }
.dot { width: 5px; height: 5px; border-radius: 50%; background: var(--light); animation: bo 1.2s infinite; }
.dot:nth-child(2) { animation-delay: 0.2s; }
.dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes bo { 0%,60%,100% { transform: translateY(0); } 30% { transform: translateY(-5px); } }

/* OPCIONES CHAT */
.opts { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 1.25rem 0.75rem; }
.opt { background: var(--white); border: 1px solid var(--border); color: var(--text); padding: 9px 15px; border-radius: var(--r); font-size: 13px; font-family: 'DM Sans', sans-serif; cursor: pointer; transition: all 0.15s; }
.opt:hover { background: var(--black); border-color: var(--black); color: var(--white); }

/* PIE DE CHAT */
.chat-foot { border-top: 1px solid var(--border); background: var(--white); }
.back-row { padding: 6px 1.25rem 0; }
.back-btn { background: none; border: none; color: var(--light); font-size: 12px; font-family: 'DM Sans', sans-serif; cursor: pointer; display: flex; align-items: center; gap: 4px; padding: 4px 0; }
.back-btn:hover { color: var(--text); }
.inp-row { padding: 0.75rem 1.25rem; display: flex; gap: 8px; align-items: center; }
.inp-row input { flex: 1; padding: 0 14px; height: 42px; border-radius: var(--r); border: 1px solid var(--border); background: var(--cream); color: var(--text); font-size: 14px; font-family: 'DM Sans', sans-serif; outline: none; transition: border-color 0.15s; }
.inp-row input:focus { border-color: var(--gold); }
.send { height: 42px; padding: 0 18px; border-radius: var(--r); background: var(--black); border: none; cursor: pointer; color: var(--white); font-size: 13px; font-weight: 500; font-family: 'DM Sans', sans-serif; flex-shrink: 0; }
.send:hover { background: #1a1a1a; }

/* BRIDGE */

/* LOADING */
.load { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.25rem; padding: 2rem; text-align: center; }
.spin { width: 48px; height: 48px; border: 2px solid var(--border); border-top-color: var(--gold); border-radius: 50%; animation: sp 0.9s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }
.load p { font-size: 14px; color: var(--mid); }
.load small { font-size: 12px; color: var(--light); }

/* ============================================================
   ESTADO 2: RESULTADO IA
   ============================================================ */
.res-wrap { flex: 1; overflow-y: auto; display: flex; flex-direction: column; }
.res-hero { background: var(--black); padding: 2.5rem 1.75rem 2rem; color: var(--white); position: relative; overflow: hidden; }
.res-hero::before { content: ''; position: absolute; top: -40px; right: -40px; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, rgba(201,169,110,0.15), transparent 70%); }
.res-greeting { font-size: 11px; color: var(--gold); letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 8px; }
.res-hero h2 { font-family: 'Cormorant Garamond', serif; font-size: 30px; font-weight: 400; margin-bottom: 16px; }
.arch-label { font-size: 10px; color: rgba(255,255,255,0.4); letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 6px; }
.arch-name { font-family: 'Cormorant Garamond', serif; font-size: 24px; font-weight: 500; color: var(--gold); margin-bottom: 12px; }
.frase { font-size: 14px; color: rgba(255,255,255,0.85); font-style: italic; line-height: 1.5; border-left: 2px solid var(--gold); padding-left: 12px; }
.res-body { padding: 1.25rem; display: flex; flex-direction: column; gap: 1rem; }
.card { background: var(--cream); border-radius: var(--r); padding: 1.25rem; display: flex; flex-direction: column; gap: 10px; }
.card-lbl { font-size: 10px; font-weight: 600; color: var(--light); text-transform: uppercase; letter-spacing: 1px; }
.card-txt { font-size: 14px; color: var(--mid); line-height: 1.7; }
.dark-card { background: var(--black); color: var(--white); border-radius: var(--r); padding: 1.25rem; display: flex; flex-direction: column; gap: 10px; }
.dark-card .card-lbl { color: var(--gold); }
.dark-card .card-txt { color: rgba(255,255,255,0.85); font-size: 14px; line-height: 1.7; }
.gold-card { background: var(--gold-light); border: 1px solid var(--gold); border-radius: var(--r); padding: 1.25rem; display: flex; flex-direction: column; gap: 10px; }
.share-txt { font-size: 13px; color: var(--text); font-style: italic; line-height: 1.6; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { background: var(--white); border: 1px solid var(--border); color: var(--text); font-size: 11px; padding: 4px 10px; border-radius: 20px; }
.tag.gold { background: var(--gold-light); border-color: var(--gold); color: #7a5c1e; }

/* TRIADA */
.triada-screen { flex: 1; padding: 1.5rem 1.25rem; display: flex; flex-direction: column; gap: 1.25rem; overflow-y: auto; }
.triada-screen h2 { font-family: 'Cormorant Garamond', serif; font-size: 24px; font-weight: 400; }
.triada-screen p { font-size: 14px; color: var(--mid); line-height: 1.6; }
.triada-cards { display: flex; flex-direction: column; gap: 10px; }
.triada-card { display: flex; align-items: flex-start; gap: 14px; background: var(--cream); border-radius: var(--r); padding: 1rem 1.25rem; border-left: 3px solid var(--border); }
.triada-card.segura { border-left-color: var(--gold); }
.triada-card.maestro { border-left-color: var(--black); }
.triada-card.experimento { border-left-color: var(--mid); }
.triada-ico { flex-shrink: 0; }
.triada-info h4 { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.triada-info p { font-size: 13px; color: var(--mid); line-height: 1.5; }

/* SWIPE */
.sw-prog { height: 3px; background: var(--border); flex-shrink: 0; }
.sw-prog-fill { height: 3px; background: linear-gradient(90deg, var(--gold), var(--black)); transition: width 0.4s ease; }
.sw-card { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.sw-img-wrap { position: relative; background: var(--cream); flex: 1; min-height: 340px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.sw-img-wrap::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 55%, rgba(0,0,0,0.4) 100%); pointer-events: none; }
.sw-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: opacity 0.2s; }
.sw-type { position: absolute; top: 12px; left: 12px; font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; padding: 5px 12px; border-radius: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.18); }
.sw-type.segura { background: var(--gold-light); color: #7a5c1e; }
.sw-type.maestro { background: var(--black); color: var(--gold); }
.sw-type.experimento { background: var(--white); color: var(--mid); border: 1px solid var(--border); }
.sw-info { padding: 1.25rem; display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--border); flex-shrink: 0; }
.sw-nombre { font-family: 'Cormorant Garamond', serif; font-size: 21px; font-weight: 500; }
.sw-precio { display: inline-flex; align-items: center; font-size: 13px; color: #7a5c1e; font-weight: 600; background: var(--gold-light); padding: 3px 10px; border-radius: 20px; width: fit-content; }
.sw-razon { font-size: 13px; color: var(--mid); line-height: 1.5; }
.no-img { width: 100%; min-height: 260px; display: flex; align-items: center; justify-content: center; background: var(--cream); }
.oraculo-btn { background: none; border: 1px dashed var(--gold); color: var(--gold); padding: 6px 12px; border-radius: var(--rs); font-size: 11px; font-family: 'DM Sans', sans-serif; cursor: pointer; text-align: left; width: 100%; display: flex; align-items: center; gap: 8px; }
.oraculo-detail { font-size: 12px; color: var(--mid); line-height: 1.6; padding: 8px 10px; background: var(--cream); border-radius: var(--rs); display: none; }
.sw-actions { padding: 0.75rem 1.25rem 1.25rem; display: grid; grid-template-columns: 0.85fr 1.3fr 0.85fr; gap: 8px; align-items: stretch; flex-shrink: 0; border-top: 1px solid var(--border); }
.sw-btn { border: none; border-radius: var(--r); padding: 12px 6px; font-size: 11px; font-weight: 600; font-family: 'DM Sans', sans-serif; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; transition: transform 0.15s, box-shadow 0.15s, background 0.15s; }
.sw-btn:active { transform: scale(0.95); }
.sw-no { background: var(--cream); color: var(--mid); border: 1px solid var(--border); }
.sw-no:hover { background: #FFE8E8; border-color: #FFB3B3; color: #CC0000; }
.sw-si { background: var(--black); color: var(--gold); font-size: 12px; padding: 14px 6px; box-shadow: 0 4px 14px rgba(0,0,0,0.25); }
.sw-si:hover { background: #1a1a1a; box-shadow: 0 6px 18px rgba(0,0,0,0.32); }
.sw-ver { background: var(--gold-light); color: #8B6914; border: 1px solid var(--gold); }
.sw-ver:hover { background: var(--gold); color: var(--white); }
.sw-done { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2rem; text-align: center; gap: 1.25rem; }
.sw-done h2 { font-family: 'Cormorant Garamond', serif; font-size: 26px; font-weight: 400; }
.sw-done p { font-size: 14px; color: var(--mid); line-height: 1.6; max-width: 280px; }
.honesty { background: var(--cream); border: 1px solid var(--border); border-radius: var(--r); padding: 1.5rem; text-align: center; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.honesty h3 { font-family: 'Cormorant Garamond', serif; font-size: 20px; font-weight: 400; }
.honesty p { font-size: 13px; color: var(--mid); line-height: 1.6; max-width: 240px; }
.swipe-navbar { padding: 15px; display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--border); }
.sw-color-col { display: flex; flex-direction: column; align-items: center; }
.sw-swatch { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--border); box-sizing: border-box; display: block; }
.sw-color-btn { background: none; border: none; cursor: pointer; padding: 0; display: inline-flex; flex-direction: column; align-items: center; }
.sw-color-label { font-size: 12px; color: var(--mid); margin-top: 6px; white-space: nowrap; }
.sw-color-btn.active .sw-swatch { transform: scale(1.15); border-color: var(--black); }
.star-btn { background: none; border: none; cursor: pointer; }

/* ============================================================
   ESTADO 3: APP CONTAINER + BOTTOM NAV FIJA
   ============================================================ */

/* El app-container ocupa pantalla completa, oculto por defecto */
#app-container {
  display: none;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
}

#app-container.visible {
  display: flex;
  animation: fi 0.3s ease;
}

/* Panels: ocultos por defecto, activo = visible */
.panel {
  display: none;
  flex-direction: column;
  flex: 1;
  overflow-y: auto;
  /* Espacio para que la bottom-nav no tape el contenido */
  padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
}

.panel.active {
  display: flex;
  animation: fi 0.25s ease;
}
.panel .btn, .panel .ghost-btn { max-width: 100%; }

/* Placeholders para paneles futuros */
.panel-placeholder {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem;
  text-align: center;
  color: var(--mid);
}
.panel-placeholder svg { opacity: 0.3; }
.panel-placeholder h3 { font-family: 'Cormorant Garamond', serif; font-size: 22px; font-weight: 400; color: var(--text); }
.panel-placeholder p { font-size: 13px; line-height: 1.65; max-width: 240px; }

/* BOTTOM NAV — fija, centrada, max 460px */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 460px;
  background: var(--white);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: stretch;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.nav-btn {
  flex: 1;
  background: none;
  border: none;
  padding: 10px 4px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  color: var(--mid);
  letter-spacing: 0.3px;
  transition: color 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.nav-btn svg {
  width: 24px;
  height: 24px;
  stroke: var(--mid);
  stroke-width: 1.9;
  transition: stroke 0.15s;
}

.nav-btn.active { color: var(--gold); }
.nav-btn.active svg { stroke: var(--gold); }

/* TOUR GUIADO — COACHMARKS */
.tour-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 2000; pointer-events: none; }
.tour-spotlight { position: absolute; border-radius: 12px; box-shadow: 0 0 0 9999px rgba(0,0,0,0.75); transition: all 0.3s ease; pointer-events: none; }
.tour-tooltip { position: fixed; background: var(--white); border-radius: var(--r); padding: 1rem 1.25rem; width: 260px; max-width: calc(100% - 32px); box-shadow: 0 8px 24px rgba(0,0,0,0.3); pointer-events: auto; display: flex; flex-direction: column; gap: 10px; z-index: 2001; }
.tour-tooltip-text { font-size: 13px; color: var(--text); line-height: 1.5; font-family: 'DM Sans', sans-serif; }
.tour-tooltip-actions { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tour-skip-link { font-size: 11px; color: var(--light); cursor: pointer; background: none; border: none; padding: 0; font-family: 'DM Sans', sans-serif; }
.tour-next-btn { background: var(--gold); color: var(--black); border: none; border-radius: 8px; padding: 8px 16px; font-size: 12px; font-weight: 600; cursor: pointer; font-family: 'DM Sans', sans-serif; }
/* ONBOARDING FASE 2 */
.ob2-opt.selected,
.ob3-opt.selected {
  border: 2px solid var(--gold) !important;
  background: var(--gold-light);
  font-weight: 700;
  color: #7a5c1e;
  box-shadow: 0 0 0 2px var(--gold);
}
.ob2-multi.selected,
.ob3-multi.selected {
  border: 2px solid var(--gold) !important;
  background: var(--gold-light);
  font-weight: 700;
  color: #7a5c1e;
  box-shadow: 0 0 0 2px var(--gold);
}
/* CÍRCULOS DE COLOR */
.color-circle {
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--gold);
}

/* MENU DE AJUSTES — MI PERFIL */
.pref-section-label { font-size:11px; font-weight:700; color:var(--mid); text-transform:uppercase; letter-spacing:1.2px; margin:18px 0 8px; padding:0 2px; }
.pref-section-label:first-child { margin-top:4px; }
.pref-row { display:flex; align-items:center; gap:12px; padding:14px 12px; background:var(--white); border:1px solid var(--border); border-radius:var(--r); cursor:pointer; transition:background .15s; margin-bottom:8px; }
.pref-row:hover { background:var(--cream); }
.pref-row:active { background:var(--gold-light); }
.pref-icon { flex-shrink:0; width:32px; height:32px; display:flex; align-items:center; justify-content:center; }
.pref-text { flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; }
.pref-title { font-size:13px; font-weight:600; color:var(--text); }
.pref-sub { font-size:12px; color:var(--mid); }
.pref-chevron { flex-shrink:0; color:var(--light); font-size:16px; }
.pref-row-danger .pref-title { color:#c0392b; }
.pref-row-danger:hover { background:#FFE8E8; }

/* ONBOARDING PASO A PASO */
.oc-step.oc-anim { animation: fi 0.3s ease; }
.msgs-anim { animation: fi 0.3s ease; }

/* CTA SWIPE — PULSO SUTIL */
@keyframes ctaSwipePulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.015); } }
.cta-swipe-pulse { animation: ctaSwipePulse 2.6s ease-in-out infinite; }

/* SELECCION DE COLORES DECLARADOS */
.chip-color-circle { position: relative; transition: box-shadow 0.15s ease; }
.chip-color-circle.selected { box-shadow: 0 0 0 2px var(--gold); }
.chip-color-circle.selected::after {
  content: '';
  position: absolute;
  bottom: -3px;
  right: -3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid var(--white);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230A0A0A' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: 10px;
  background-repeat: no-repeat;
  background-position: center;
}
.chip-color-circle.selected::after {
  content: '';
  position: absolute;
  bottom: -3px;
  right: -3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid var(--white);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230A0A0A' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: 10px;
  background-repeat: no-repeat;
  background-position: center;
}
/* ============================================================
   SISTEMA VISUAL PRO — reutilizable en cualquier bloque exclusivo Pro
   ============================================================ */
.pro-card {
  background-color: var(--black);
  background-image: linear-gradient(135deg, rgba(201,169,110,0.14), rgba(201,169,110,0.04));
  border: 2px solid var(--gold);
  border-radius: var(--r);
  padding: 1.25rem 1.4rem;
  position: relative;
  overflow: hidden;
  --card-text: var(--white);
  --card-text-soft: rgba(255,255,255,0.75);
  --card-text-softer: rgba(255,255,255,0.5);
  --card-track: rgba(255,255,255,0.08);
}
.pro-badge-solid {
  background: var(--gold);
  color: var(--black);
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  letter-spacing: 0.04em;
  display: inline-block;
}
.pro-badge-outline {
  background: rgba(201,169,110,0.15);
  color: var(--gold);
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-block;
}
.pro-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  position: relative;
}
.pro-label-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  position: relative;
}
.pro-label-bar {
  width: 3px;
  height: 14px;
  background: var(--gold);
  border-radius: 2px;
}
.pro-label-text {
  font-size: 10px;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-weight: 600;
}
.free-card {
  border: 0.5px solid rgba(201,169,110,0.3);
  border-radius: var(--r);
  padding: 1rem 1.1rem;
  /* Sin background-color fijo a proposito: hereda el fondo de su
     contenedor padre. Si se usa sobre fondo claro (ej. Mi Perfil),
     anadir background-color explicito al aplicarlo — la falta de
     este aviso fue la causa del bug del bloque Pro en Mi Perfil. */
}
/* ============================================================
   SISTEMA VISUAL PREMIUM — color decidido (violeta), sesion 88.
   Convive con .pro-card sin tocarlo. Pendiente aparte: si el dorado
   pasa a ser exclusivo de Pro (rebranding completo, no aqui).
   ============================================================ */
.premium-card {
  background-color: var(--white);
  border: 2px solid var(--premium);
  border-radius: var(--r);
  padding: 1.25rem 1.4rem;
  position: relative;
  --card-text: var(--text);
  --card-text-soft: var(--mid);
  --card-text-softer: var(--light);
  --card-track: var(--border);
}
.premium-badge-solid {
  background: var(--premium);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  letter-spacing: 0.04em;
  display: inline-block;
}
.premium-badge-outline {
  background: rgba(107,78,156,0.15);
  color: var(--premium);
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-block;
}
.premium-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--premium);
  color: var(--white);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 600;
}
.premium-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  position: relative;
}
.premium-label-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  position: relative;
}
.premium-label-bar {
  width: 3px;
  height: 14px;
  background: var(--premium);
  border-radius: 2px;
}
.premium-label-text {
  font-size: 10px;
  color: var(--premium);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-weight: 600;
}
.racha-spark {
  position: absolute;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  background: var(--gold);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  opacity: 0;
  transform: scale(0.3) translate(0px, 0px);
}
.racha-sparks-activa .racha-spark {
  animation: rachaSparkPop 900ms ease-out forwards;
}
@keyframes rachaSparkPop {
  0% { opacity: 0; transform: scale(0.2) translate(0px, 0px); }
  35% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.4) translate(var(--sx, 0px), var(--sy, 0px)); }
}
.clima-track { animation: climaScroll 22s linear infinite; }
@keyframes climaScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-650px); }
}
.outfit-hero-blur { filter: blur(22px) brightness(0.35) saturate(0.85); transform: scale(1.15); object-position: 50% 75% !important; transition: filter 0.5s ease, transform 0.5s ease, object-position 0.5s ease; }

/* ============================================================
   CALENDARIO — panel-eventos rediseñado
   ============================================================ */
.cal-hero { position: relative; min-height: 340px; background: linear-gradient(160deg, #1a1520 0%, var(--black) 100%); overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; padding: 1.25rem 1.5rem; }
.cal-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; z-index: 0; }
.cal-hero-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,10,10,0.1) 0%, rgba(10,10,10,0.75) 100%); z-index: 1; }
.cal-hero-tag { position: relative; z-index: 2; font-size: 9px; color: var(--gold); letter-spacing: 2px; text-transform: uppercase; margin-bottom: 6px; }
.cal-hero-title { position: relative; z-index: 2; font-family: 'Cormorant Garamond', serif; font-size: 24px; color: var(--white); font-weight: 500; line-height: 1.25; }

.cal-nav { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem 0.5rem; }
.cal-nav button { background: var(--cream); border: 1px solid var(--border); border-radius: 8px; width: 32px; height: 32px; cursor: pointer; color: var(--text); font-size: 14px; }
.cal-nav button:disabled { opacity: 0.3; cursor: default; }
.cal-nav .mes-label { font-family: 'Cormorant Garamond', serif; font-size: 18px; font-weight: 500; text-transform: capitalize; }

.cal-grid { padding: 0.5rem 1.25rem 1.25rem; }
.cal-dow { display: grid; grid-template-columns: repeat(7,1fr); gap: 4px; margin-bottom: 6px; }
.cal-dow span { font-size: 9px; color: var(--light); text-align: center; text-transform: uppercase; }
.cal-days { display: grid; grid-template-columns: repeat(7,1fr); gap: 4px; }
.cal-day { aspect-ratio: 1; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 12px; cursor: pointer; position: relative; background: var(--cream); color: var(--text); border: none; font-family: 'DM Sans', sans-serif; }
.cal-day.empty { background: none; cursor: default; }
.cal-day.today { border: 1.5px solid var(--gold); font-weight: 700; }
.cal-day.has-outfit { background: var(--premium-light); color: var(--premium); font-weight: 600; }
.cal-day.has-outfit::after { content: ''; position: absolute; bottom: 4px; width: 4px; height: 4px; border-radius: 50%; background: var(--premium); }
.cal-day.has-evento { background: var(--gold-light); color: #7a5c1e; font-weight: 600; }
.cal-day.has-evento::after { content: ''; position: absolute; bottom: 4px; width: 4px; height: 4px; border-radius: 50%; background: var(--gold); }
.cal-day.has-outfit.has-evento::after { background: linear-gradient(90deg, var(--gold) 50%, var(--premium) 50%); }

.cal-leyenda { display: flex; gap: 14px; padding: 0 1.25rem 1rem; font-size: 10px; color: var(--light); }
.cal-leyenda span { display: inline-flex; align-items: center; gap: 5px; }
.cal-dot { width: 7px; height: 7px; border-radius: 50%; }
.cal-dot.gold { background: var(--gold); }
.cal-dot.premium { background: var(--premium); }

.day-modal-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.55); align-items: flex-end; justify-content: center; z-index: 500; }
.day-modal-backdrop.open { display: flex; }
.day-modal { position: relative; background: var(--white); border-radius: 20px 20px 0 0; width: 100%; max-width: 480px; max-height: 88vh; overflow-y: auto; padding: 1.5rem 1.25rem calc(1.5rem + env(safe-area-inset-bottom)); }
.day-modal .close-modal { position: absolute; top: 14px; right: 14px; background: none; border: none; font-size: 18px; color: var(--light); cursor: pointer; }
.day-modal-fecha { font-size: 10px; color: var(--light); text-transform: uppercase; letter-spacing: 1px; }
.day-modal-title { font-family: 'Cormorant Garamond', serif; font-size: 22px; margin: 4px 0 10px; }
.clima-mini { display: inline-flex; align-items: center; gap: 6px; background: var(--cream); border-radius: 20px; padding: 5px 12px; font-size: 11px; color: var(--mid); margin-bottom: 14px; }

.outfit-elegido-card { background: var(--cream); border-radius: var(--r); padding: 1rem; display: flex; gap: 10px; margin-bottom: 12px; }
.outfit-elegido-card .pieza { flex: 1; text-align: center; }
.outfit-elegido-card .pieza-foto { aspect-ratio: 3/4; background: var(--border); background-size: cover; background-position: center; border-radius: 8px; margin-bottom: 4px; }
.outfit-elegido-card .pieza-label { font-size: 9px; color: var(--gold); text-transform: uppercase; letter-spacing: 0.5px; }

.validacion-msg { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 14px; color: var(--text); line-height: 1.5; margin-bottom: 14px; padding: 10px 12px; background: var(--gold-light); border-radius: 10px; }

.cal-seccion-label { font-size: 10px; font-weight: 700; color: var(--light); text-transform: uppercase; letter-spacing: 1px; margin: 14px 0 8px; }
.alt-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.alt-chip { flex-shrink: 0; width: 62px; text-align: center; background: none; border: none; padding: 0; cursor: pointer; font-family: 'DM Sans', sans-serif; }
.alt-chip .foto { aspect-ratio: 3/4; background: var(--cream); background-size: cover; background-position: center; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 3px; }
.alt-chip .foto.selected { border: 2px solid var(--premium); }
.alt-chip span { font-size: 9px; color: var(--mid); }

.complemento-card { display: flex; align-items: center; gap: 10px; background: var(--premium-light); border-radius: 10px; padding: 10px 12px; margin-top: 8px; }
.complemento-card .foto { width: 42px; height: 42px; border-radius: 8px; background: var(--white); background-size: cover; background-position: center; flex-shrink: 0; }
.complemento-card .txt { font-size: 11.5px; color: var(--premium); line-height: 1.4; }

.btn-quitar-outfit { width: 100%; background: none; border: none; color: #b5453a; font-size: 12px; font-family: 'DM Sans', sans-serif; cursor: pointer; margin-top: 10px; text-decoration: underline; text-underline-offset: 2px; }

.sin-outfit-box { text-align: center; padding: 2rem 1rem; }
.sin-outfit-box p { font-size: 13px; color: var(--mid); margin: 10px 0 16px; line-height: 1.5; }

.confirmado-box { text-align: center; padding: 1.5rem 1rem; }
.confirmado-icon { width: 52px; height: 52px; border-radius: 50%; background: var(--gold); display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; font-size: 22px; color: var(--black); }
.confirmado-title { font-family: 'Cormorant Garamond', serif; font-size: 19px; margin-bottom: 6px; }
.confirmado-msg { font-size: 13px; color: var(--mid); font-style: italic; line-height: 1.5; }

/* ============================================================
   LANDING — copy nueva, logo primero, selector de entrada
   ============================================================ */
.landing-headline {
  font-family: 'Cormorant Garamond', serif;
  font-size: 34px;
  font-weight: 600;
  line-height: 1.24;
  letter-spacing: -0.5px;
  max-width: 320px;
  color: var(--text);
}
.landing-gold-line { color: var(--gold); }
.landing-cta-stack { width: 100%; max-width: 300px; display: flex; flex-direction: column; gap: 12px; margin-top: 0.4rem; }
.landing-divider { display: flex; align-items: center; gap: 10px; margin: 2px 0; }
.landing-divider .line { flex: 1; height: 1px; background: var(--border); }
.landing-divider .word { font-size: 11px; color: var(--light); white-space: nowrap; }
.btn-google {
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 13px 24px;
  border-radius: var(--r);
  font-size: 13.5px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background 0.15s;
}
.btn-google:hover { background: var(--cream); }
.link-ya-tengo-perfil { font-size: 12.5px; color: var(--light); text-decoration: underline; cursor: pointer; margin-top: 4px; background: none; border: none; font-family: 'DM Sans', sans-serif; }

/* ============================================================
   PANTALLA DE PLANES — clases propias, no reutilizan .premium-card
   a proposito: esa clase la usan otros bloques ya probados hoy
   (informe, swipe capas, teasers) con fondo claro; aqui Premium
   necesita fondo oscuro para diferenciarse visualmente de Free.
   ============================================================ */
.plan-feat-list { display: flex; flex-direction: column; gap: 9px; font-size: 12.5px; line-height: 1.45; font-family: 'DM Sans', sans-serif; }
.plan-feat-row { display: flex; align-items: flex-start; gap: 8px; }
.plan-feat-row.off { opacity: 0.55; }
.plan-feat-row.soon { opacity: 0.82; }
.plan-feat-check { flex-shrink: 0; margin-top: 1px; }
.plan-soon-tag { font-size: 8.5px; font-weight: 700; color: var(--gold); background: rgba(201,169,110,0.15); padding: 2px 6px; border-radius: 6px; letter-spacing: 0.3px; margin-left: 6px; white-space: nowrap; }

.premium-plan-card {
  background: linear-gradient(160deg, var(--black) 0%, #17111f 100%);
  border-radius: var(--r);
  padding: 1.4rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  border: 1px solid var(--premium);
  overflow: hidden;
  margin-top: 10px;
}
.premium-plan-card::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(107,78,156,0.35), transparent 70%);
  pointer-events: none;
}
.premium-plan-hook { position: relative; z-index: 1; font-size: 14px; font-family: 'Cormorant Garamond', serif; font-style: italic; color: var(--premium-light); line-height: 1.4; }

.duracion-selector { position: relative; z-index: 1; display: flex; gap: 6px; background: rgba(255,255,255,0.06); border-radius: 10px; padding: 4px; }
.duracion-pill { flex: 1; text-align: center; padding: 9px 4px; border-radius: 8px; font-size: 12px; font-weight: 600; font-family: 'DM Sans', sans-serif; color: rgba(255,255,255,0.55); cursor: pointer; transition: all 0.15s; position: relative; }
.duracion-pill.active { background: var(--premium); color: var(--white); }
.duracion-pill .pill-badge { position: absolute; top: -9px; right: -6px; background: var(--gold); color: var(--black); font-size: 8px; font-weight: 700; padding: 2px 6px; border-radius: 8px; letter-spacing: 0.3px; white-space: nowrap; }

.plan-precio-grande { position: relative; z-index: 1; font-size: 30px; font-family: 'Cormorant Garamond', serif; font-weight: 600; color: var(--white); display: flex; align-items: baseline; gap: 6px; }
.plan-precio-grande span { font-size: 12px; color: rgba(255,255,255,0.5); font-family: 'DM Sans', sans-serif; font-weight: 400; }
.plan-precio-ahorro { position: relative; z-index: 1; font-size: 12px; color: var(--gold); font-weight: 600; margin-top: 4px; min-height: 15px; }
.plan-precio-nota { position: relative; z-index: 1; font-size: 10.5px; color: rgba(255,255,255,0.4); margin-top: 2px; min-height: 13px; }
.premium-plan-card .plan-feat-list { position: relative; z-index: 1; color: rgba(255,255,255,0.82); }