/* =========================================================
   ASTRO DEGUSTACIÓN — Alquimia de Venus
   Fase 2 — Web independiente (índice de participante + panel privado)
   ========================================================= */

:root{
  /* ---- identidad: neutros (manual de marca) ---- */
  --cream:      #FBF5EE;
  --cream-deep: #F3E5D6;
  --card:       #FFFFFF;
  --line:       #E7D9C9;
  --ink:        #33261F;
  --ink-soft:   #6B5A4E;
  --muted:      #97887C;
  --brand:      #A65F5E;      /* rojo del logo */
  --brand-deep: #8B4C4C;

  /* ---- los cuatro elementos (EXACTOS, sección 05) ---- */
  --fuego:   #B85C4B;
  --aire:    #B7CFD8;
  --agua:    #597A92;
  --tierra:  #896B58;

  /* variante SOLO para texto de Aire — el tono oficial es demasiado
     claro para leer sobre fondo crema (contraste); ver nota final */
  --aire-texto: #5D7C89;

  --radius-s: 10px;
  --radius-m: 16px;
  --radius-l: 26px;
  --shadow: 0 6px 24px rgba(51,38,31,0.08);
  --shadow-s: 0 2px 10px rgba(51,38,31,0.06);
}

*{box-sizing:border-box; -webkit-tap-highlight-color:transparent;}
html,body{margin:0;padding:0;}
body{
  background:var(--cream);
  color:var(--ink);
  font-family:'Jost',sans-serif;
  font-weight:400;
  line-height:1.55;
  min-height:100vh;
  -webkit-font-smoothing:antialiased;
}
h1,h2,h3,.serif{
  font-family:'Fraunces',serif;
  font-weight:500;
  letter-spacing:0.01em;
  margin:0;
}
p{margin:0;}
button{font-family:inherit;}
img{max-width:100%;display:block;}
a{color:inherit;}
::selection{background:var(--brand); color:#fff;}

/* ---------- layout shell ---------- */
#app{
  max-width:560px;
  margin:0 auto;
  min-height:100vh;
  background:var(--cream);
  position:relative;
  padding-bottom:56px; /* room for solidarity strip */
}

/* ---------- barra superior del panel de organizadora ---------- */
.admin-bar{
  position:sticky; top:0; z-index:40;
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding:12px 18px; background:var(--ink); border-bottom:1px solid rgba(255,255,255,0.08);
}
.admin-bar .admin-title{ color:#fff; font-family:'Fraunces',serif; font-size:15px; }
.sync-pill{
  display:inline-flex; align-items:center; gap:6px; font-size:10.5px; letter-spacing:0.04em;
  color:rgba(255,255,255,0.65); padding:5px 10px; border-radius:999px; background:rgba(255,255,255,0.08);
}
.sync-pill .dot{ width:6px; height:6px; border-radius:50%; background:#8FBF9F; flex:none; }
.sync-pill.local .dot{ background:#D8A45C; }
.sync-pill.error .dot{ background:#C97569; }

.config-banner{
  border:1px dashed #C9A66B; background:#FBF1DE; color:#6B4F1D;
  border-radius:var(--radius-m); padding:14px 16px; font-size:12.5px; line-height:1.55; margin-bottom:20px;
}
.config-banner strong{ display:block; margin-bottom:4px; font-size:13px; }
.config-banner code{ background:rgba(0,0,0,0.06); padding:1px 5px; border-radius:5px; font-size:11.5px; }

.no-token-screen{ text-align:center; padding:80px 24px; }
.no-token-screen .glyph{ font-size:34px; color:var(--muted); margin-bottom:14px; font-family:'Fraunces',serif; }

/* ---------- generic containers ---------- */
.screen{ padding:26px 20px 40px; animation:fadeIn .45s ease; }
@keyframes fadeIn{ from{opacity:0; transform:translateY(6px);} to{opacity:1; transform:translateY(0);} }

.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius-m);
  padding:20px;
  box-shadow:var(--shadow-s);
}

.eyebrow{
  font-size:11.5px; letter-spacing:0.14em; text-transform:uppercase;
  color:var(--muted); margin-bottom:8px; display:block;
}

.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  width:100%; min-height:52px; padding:14px 20px;
  border-radius:999px; border:1px solid transparent;
  font-family:'Jost',sans-serif; font-size:15.5px; font-weight:500; letter-spacing:0.02em;
  cursor:pointer; transition:transform .15s ease, opacity .2s ease, background .2s ease, box-shadow .2s ease;
  -webkit-user-select:none; user-select:none;
}
.btn:active{ transform:scale(0.98); }
.btn-primary{ background:var(--ink); color:#fff; box-shadow:0 8px 20px rgba(51,38,31,0.18); }
.btn-primary:disabled{ background:#D9CCBF; color:#fff; box-shadow:none; cursor:not-allowed; opacity:.75; }
.btn-primary:not(:disabled):hover{ opacity:.92; }
.btn-outline{ background:transparent; color:var(--ink); border-color:var(--line); }
.btn-outline:hover{ background:var(--cream-deep); }
.btn-ghost{ background:transparent; color:var(--muted); border:none; min-height:40px; font-size:13.5px; }
.btn-small{ min-height:40px; padding:8px 16px; font-size:13.5px; width:auto; }
.btn-danger-outline{ background:transparent; color:var(--brand-deep); border-color:#E3C6C4; }

/* ---------- brand header / logo ---------- */
.brand-logo{ display:block; margin:0 auto; height:auto; }
.brand-logo.w-lg{ width:min(78%, 320px); }
.brand-logo.w-sm{ width:150px; }
.brand-mark{ width:34px; opacity:.9; }

/* ---------- typographic bits ---------- */
.title-xl{ font-size:27px; line-height:1.22; text-align:center; }
.title-lg{ font-size:23px; line-height:1.28; }
.subtitle-quote{
  font-family:'Fraunces',serif; font-style:italic; font-weight:400;
  color:var(--ink-soft); text-align:center; font-size:15.5px; line-height:1.5;
}
.lede{ color:var(--ink-soft); font-size:15px; text-align:center; }

/* ---------- solidarity strip ---------- */
.solidarity{
  position:fixed; left:0; right:0; bottom:0; z-index:30;
  max-width:560px; margin:0 auto;
  background:rgba(251,245,238,0.94); backdrop-filter:blur(6px);
  border-top:1px solid var(--line);
  padding:8px 16px; text-align:center;
}
.solidarity p{
  font-family:'Fraunces',serif; font-style:italic; font-size:11.5px;
  color:var(--ink-soft); line-height:1.35;
}
.solidarity .ig-row{ display:flex; justify-content:center; gap:14px; margin-top:3px; }
.solidarity a{ font-size:10.5px; color:var(--brand-deep); text-decoration:none; letter-spacing:0.02em; }
.solidarity a:hover{ text-decoration:underline; }

.solidarity-block{
  border:1px dashed var(--line); border-radius:var(--radius-m);
  padding:16px 18px; margin-top:18px; text-align:center; background:var(--cream-deep);
}
.solidarity-block p{ font-family:'Fraunces',serif; font-style:italic; font-size:13.5px; color:var(--ink-soft); line-height:1.5; }
.solidarity-block .ig-row{ display:flex; justify-content:center; gap:16px; margin-top:10px; flex-wrap:wrap; }
.solidarity-block a{ font-size:12.5px; color:var(--brand-deep); text-decoration:none; font-weight:500; }
.solidarity-block a:hover{ text-decoration:underline; }

/* ---------- progress dots ---------- */
.progress-row{ display:flex; justify-content:center; gap:6px; padding:14px 0 4px; }
.progress-row .dot{ width:6px; height:6px; border-radius:50%; background:var(--line); transition:background .3s, transform .3s; }
.progress-row .dot.done{ background:var(--muted); }
.progress-row .dot.now{ background:var(--ink); transform:scale(1.35); }

/* ---------- chips: símbolo + nombre ---------- */
.chip{
  display:inline-flex; align-items:center; gap:8px;
  font-family:'Jost',sans-serif; font-size:14.5px; color:var(--ink);
}
.chip .swatch{
  width:30px; height:30px; border-radius:50%; flex:none;
  display:flex; align-items:center; justify-content:center;
  font-size:15px; font-family:'Fraunces',serif;
  border:1px solid rgba(0,0,0,0.05);
}
.chip.lg .swatch{ width:40px; height:40px; font-size:19px; }
.chip.xl{ gap:12px; }
.chip.xl .swatch{ width:52px; height:52px; font-size:24px; }
.chip.xl .name{ font-size:19px; font-family:'Fraunces',serif; }

/* ---------- section header per element ---------- */
.element-hero{ text-align:center; padding:6px 0 4px; }
.element-hero .swatch{
  width:74px; height:74px; border-radius:50%; margin:0 auto 14px;
  display:flex; align-items:center; justify-content:center; font-size:34px;
  font-family:'Fraunces',serif; box-shadow:var(--shadow-s);
}
.element-hero h2{ font-size:26px; margin-bottom:6px; }
.element-hero .cue{ color:var(--ink-soft); font-size:14.5px; font-style:italic; font-family:'Fraunces',serif; }
.element-rule{ height:2px; width:44px; margin:16px auto; border-radius:2px; }

/* ---------- form fields ---------- */
.field{ margin-bottom:18px; }
.field label{
  display:block; font-size:12.5px; letter-spacing:0.05em; text-transform:uppercase;
  color:var(--muted); margin-bottom:8px;
}
.field input[type=text], .field textarea{
  width:100%; border:1px solid var(--line); border-radius:var(--radius-s);
  background:var(--card); color:var(--ink); font-family:'Jost',sans-serif;
  font-size:15.5px; padding:13px 14px; resize:vertical; min-height:52px;
}
.field textarea{ min-height:104px; line-height:1.5; }
.field input[type=text]:focus, .field textarea:focus{
  outline:none; border-color:var(--ink-soft); box-shadow:0 0 0 3px rgba(51,38,31,0.06);
}
.field .hint{ font-size:12px; color:var(--muted); margin-top:6px; }
.field .optional-tag{ font-size:10.5px; color:var(--muted); text-transform:none; letter-spacing:0; font-style:italic; }

/* ---------- picker (dropdown reemplazo, mobile-first) ---------- */
.picker-btn{
  width:100%; display:flex; align-items:center; justify-content:space-between; gap:10px;
  border:1px solid var(--line); border-radius:var(--radius-s); background:var(--card);
  padding:12px 14px; min-height:56px; cursor:pointer; text-align:left;
}
.picker-btn .picker-value{ display:flex; align-items:center; gap:10px; }
.picker-btn .placeholder{ color:var(--muted); font-size:14.5px; }
.picker-btn .chev{ color:var(--muted); font-size:13px; }
.picker-btn:focus{ outline:none; border-color:var(--ink-soft); }

.sheet-overlay{
  position:fixed; inset:0; background:rgba(51,38,31,0.42); z-index:100;
  display:flex; align-items:flex-end; opacity:0; pointer-events:none; transition:opacity .22s ease;
}
.sheet-overlay.open{ opacity:1; pointer-events:auto; }
.sheet{
  background:var(--cream); width:100%; max-width:560px; margin:0 auto;
  border-radius:22px 22px 0 0; max-height:78vh; display:flex; flex-direction:column;
  transform:translateY(100%); transition:transform .28s cubic-bezier(.32,.72,0,1);
  box-shadow:0 -10px 40px rgba(0,0,0,0.2);
}
.sheet-overlay.open .sheet{ transform:translateY(0); }
.sheet-handle{ width:38px; height:4px; background:var(--line); border-radius:4px; margin:12px auto 4px; }
.sheet-title{ text-align:center; padding:6px 20px 12px; font-size:16px; }
.sheet-list{ overflow-y:auto; padding:4px 12px 20px; }
.sheet-option{
  display:flex; align-items:center; gap:12px; width:100%; border:none; background:transparent;
  padding:12px 10px; border-radius:12px; min-height:52px; cursor:pointer; font-family:'Jost',sans-serif;
  font-size:15.5px; color:var(--ink); text-align:left;
}
.sheet-option:active{ background:var(--cream-deep); }
.sheet-option.selected{ background:var(--cream-deep); font-weight:500; }
.sheet-option .swatch{ width:34px; height:34px; border-radius:50%; flex:none; display:flex; align-items:center; justify-content:center; font-size:16px; font-family:'Fraunces',serif; }
.sheet-close{ padding:10px 20px 6px; }

/* ---------- checkbox planetas ---------- */
.check-row{
  display:flex; align-items:center; gap:12px; padding:12px 10px; border-radius:12px;
  border:1px solid var(--line); background:var(--card); margin-bottom:8px; min-height:52px; cursor:pointer;
  transition:border-color .2s, background .2s;
}
.check-row.checked{ border-color:var(--ink); background:var(--cream-deep); }
.check-row .box{
  width:22px; height:22px; border-radius:7px; border:1.6px solid var(--line); flex:none;
  display:flex; align-items:center; justify-content:center; transition:all .2s; background:#fff;
}
.check-row.checked .box{ background:var(--ink); border-color:var(--ink); }
.check-row .box svg{ opacity:0; transform:scale(.6); transition:all .15s; }
.check-row.checked .box svg{ opacity:1; transform:scale(1); }
.check-row .rlabel{ display:flex; align-items:center; gap:10px; font-size:15px; flex:1; }
.check-row .rswatch{ width:28px; height:28px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:14px; font-family:'Fraunces',serif; flex:none; }

/* ---------- silhouettes / canvas ---------- */
.silhouette-wrap{ display:flex; gap:12px; margin:10px 0 6px; }
.silhouette-box{ flex:1; text-align:center; }
.silhouette-canvas-holder{
  position:relative; border:1px solid var(--line); border-radius:var(--radius-m);
  background:var(--card); overflow:hidden; touch-action:none; aspect-ratio:220/440;
}
.silhouette-canvas-holder canvas{ position:absolute; inset:0; width:100%; height:100%; touch-action:none; }
.silhouette-caption{ font-size:12.5px; color:var(--muted); margin-top:8px; letter-spacing:0.04em; text-transform:uppercase; }
.silhouette-tools{ display:flex; gap:8px; justify-content:center; margin-top:14px; }
.tool-btn{
  display:flex; align-items:center; gap:6px; border:1px solid var(--line); background:var(--card);
  color:var(--ink-soft); border-radius:999px; padding:9px 16px; font-size:12.5px; letter-spacing:0.03em;
  min-height:40px; cursor:pointer;
}
.tool-btn:active{ background:var(--cream-deep); }

/* ---------- lightbox (carta natal) ---------- */
.lightbox{
  position:fixed; inset:0; background:rgba(20,14,10,0.94); z-index:200;
  display:flex; align-items:center; justify-content:center; opacity:0; pointer-events:none;
  transition:opacity .25s ease;
}
.lightbox.open{ opacity:1; pointer-events:auto; }
.lightbox img{ max-width:92vw; max-height:80vh; touch-action:none; will-change:transform; border-radius:6px; }
.lightbox-close{
  position:absolute; top:18px; right:18px; width:42px; height:42px; border-radius:50%;
  background:rgba(255,255,255,0.12); color:#fff; border:none; font-size:20px; cursor:pointer;
}
.lightbox-hint{ position:absolute; bottom:26px; left:0; right:0; text-align:center; color:rgba(255,255,255,0.55); font-size:12px; letter-spacing:0.04em; }

/* ---------- chart card ---------- */
.chart-frame{
  border-radius:var(--radius-l); overflow:hidden; border:1px solid var(--line);
  background:var(--card); box-shadow:var(--shadow); position:relative; cursor:zoom-in;
}
.chart-frame img{ width:100%; display:block; }
.chart-frame .zoom-hint{
  position:absolute; bottom:10px; right:10px; background:rgba(51,38,31,0.72); color:#fff;
  font-size:11px; padding:5px 10px; border-radius:999px; letter-spacing:0.03em;
}
.chart-pending{
  border-radius:var(--radius-l); border:1.5px dashed var(--line); background:var(--cream-deep);
  padding:56px 20px; text-align:center;
}
.chart-pending .glyph{ font-size:30px; color:var(--muted); margin-bottom:10px; font-family:'Fraunces',serif; }
.chart-pending p{ color:var(--ink-soft); font-family:'Fraunces',serif; font-style:italic; font-size:15px; }

/* ---------- toast (autoguardado) ---------- */
.toast{
  position:fixed; left:50%; bottom:70px; transform:translate(-50%,10px); z-index:60;
  background:var(--ink); color:#fff; font-size:12.5px; padding:8px 16px; border-radius:999px;
  opacity:0; transition:opacity .35s ease, transform .35s ease; pointer-events:none;
  display:flex; align-items:center; gap:6px; white-space:nowrap;
}
.toast.show{ opacity:0.94; transform:translate(-50%,0); }

/* ---------- organizadora ---------- */
.participant-row{
  border:1px solid var(--line); border-radius:var(--radius-m); background:var(--card);
  padding:16px; margin-bottom:12px;
}
.participant-row .p-top{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:4px; }
.participant-row .p-name{ font-family:'Fraunces',serif; font-size:18px; }
.status-pill{ font-size:11px; padding:4px 10px; border-radius:999px; letter-spacing:0.02em; white-space:nowrap; }
.status-pill.ok{ background:#E4EEE6; color:#3E6B4C; }
.status-pill.pending{ background:#F3E5D6; color:var(--brand-deep); }
.participant-row .p-token{ font-size:11.5px; color:var(--muted); font-family:monospace; letter-spacing:0.02em; margin-bottom:12px; }
.p-actions{ display:flex; gap:8px; flex-wrap:wrap; }
.p-actions .btn{ width:auto; flex:1 1 auto; min-height:42px; font-size:13px; padding:9px 12px; }

.form-section-title{ font-size:16px; margin-bottom:14px; }
.upload-zone{
  border:1.5px dashed var(--line); border-radius:var(--radius-m); background:var(--cream-deep);
  padding:22px; text-align:center; cursor:pointer; position:relative;
}
.upload-zone input[type=file]{ position:absolute; inset:0; opacity:0; cursor:pointer; }
.upload-zone .up-icon{ font-size:22px; color:var(--muted); margin-bottom:6px; }
.upload-zone p{ font-size:13.5px; color:var(--ink-soft); }
.upload-preview{ display:flex; align-items:center; gap:12px; }
.upload-preview img{ width:64px; height:64px; object-fit:cover; border-radius:12px; border:1px solid var(--line); }

.link-box{
  display:flex; align-items:center; gap:8px; border:1px solid var(--line); background:var(--cream-deep);
  border-radius:var(--radius-s); padding:10px 12px; margin-top:6px;
}
.link-box input{ flex:1; border:none; background:transparent; font-size:12px; color:var(--ink-soft); font-family:monospace; }
.link-box input:focus{ outline:none; }

.empty-state{ text-align:center; padding:40px 20px; color:var(--muted); }
.privacy-note{
  display:flex; gap:10px; align-items:flex-start; background:var(--cream-deep); border:1px solid var(--line);
  border-radius:var(--radius-m); padding:14px 16px; margin-top:22px;
}
.privacy-note .pi{ font-size:16px; }
.privacy-note p{ font-size:12.5px; color:var(--ink-soft); line-height:1.55; }

.top-bar{ display:flex; align-items:center; justify-content:space-between; margin-bottom:20px; }
.top-bar .brand-logo{ margin:0; }
.mode-caption{ text-align:center; margin-bottom:4px; }
.mode-caption .eyebrow{ margin-bottom:2px; }

/* ---------- integración / educativo ---------- */
.integra-q{ margin-bottom:24px; }
.integra-q .qn{ font-family:'Fraunces',serif; font-style:italic; font-size:16.5px; margin-bottom:10px; display:block; }

.edu-card{
  border-left:3px solid var(--muted); background:var(--card); border:1px solid var(--line);
  border-radius:var(--radius-m); padding:18px; margin-bottom:14px;
}
.edu-card h3{ font-size:17px; margin-bottom:8px; }
.edu-card p{ font-size:14.5px; color:var(--ink-soft); line-height:1.65; }
.edu-section-title{ margin:26px 0 14px; text-align:center; }

/* ---------- misc ---------- */
.hairline{ height:1px; background:var(--line); margin:22px 0; border:none; }
.center{ text-align:center; }
.stack{ display:flex; flex-direction:column; gap:12px; }
.spacer-sm{ height:8px; } .spacer-md{ height:20px; } .spacer-lg{ height:36px; }
.small-note{ font-size:12px; color:var(--muted); text-align:center; margin-top:10px; }
.fade-in{ animation:fadeIn .4s ease; }

.close-x{
  width:36px; height:36px; border-radius:50%; border:1px solid var(--line); background:var(--card);
  display:flex; align-items:center; justify-content:center; font-size:16px; color:var(--ink-soft); cursor:pointer;
}

.summary-list{ display:flex; flex-direction:column; gap:10px; margin:14px 0 4px; }
.summary-item{ display:flex; align-items:center; justify-content:space-between; padding:10px 4px; border-bottom:1px solid var(--line); }
.summary-item:last-child{ border-bottom:none; }

.final-glyph{ text-align:center; font-size:30px; margin-bottom:6px; font-family:'Fraunces',serif; color:var(--brand); }

@media (min-width:560px){
  #app{ box-shadow:0 0 60px rgba(0,0,0,0.06); }
}
