/* =========================================================
   ALMEBER 2026 — Design tokens
   Color:
     --ink        #2E2B54  deep indigo navy (headings, nav, text)
     --brand      #5B5A97  ALMEBER purple (primary actions, active states)
     --lavender   #B7B8D6  soft lavender (from the 30-años badge ring)
     --lavender-100 #EFEFF7 lavender tint (cards, panels)
     --cream      #FBF8F3  warm paper background
     --honey      #E7A44E  single warm accent — stars, checkmarks, CTA glow
     --sage       #7DA383  soft green for completed states
   Type:
     Headings / nav / numbers -> "Baloo 2" (rounded, echoes the bubble logotype)
     Body / UI text           -> "Nunito Sans" (clean, warm, legible small)
   ========================================================= */

:root{
  --ink: #2E2B54;
  --ink-soft: #5A5780;
  --brand: #5B5A97;
  --brand-dark: #46456f;
  --lavender: #B7B8D6;
  --lavender-100: #EFEFF7;
  --lavender-200: #E2E2F1;
  --cream: #FBF8F3;
  --honey: #E7A44E;
  --honey-dark: #C6853A;
  --sage: #7DA383;
  --card-shadow: 0 10px 24px -14px rgba(46,43,84,0.35);
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

*{ box-sizing: border-box; }
html,body{ margin:0; padding:0; }

body{
  background: var(--cream);
  background-image:
    radial-gradient(circle at 92% 0%, rgba(183,184,214,0.35), transparent 40%),
    radial-gradient(circle at 4% 18%, rgba(231,164,78,0.10), transparent 35%);
  color: var(--ink);
  font-family: "Nunito Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  padding-bottom: calc(78px + var(--safe-bottom));
}

h1,h2,h3{
  font-family: "Baloo 2", "Nunito Sans", sans-serif;
  color: var(--ink);
  margin: 0;
}

p{ margin: 0 0 0.6em; color: var(--ink-soft); }

button{ font-family: inherit; }

/* ---------------- Top bar ---------------- */
.topbar{
  background: var(--ink);
  padding-top: var(--safe-top);
  position: sticky;
  top: 0;
  z-index: 30;
}
.topbar-inner{
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
}
.topbar-logo{
  width: 46px;
  height: 46px;
  object-fit: contain;
  background: #fff;
  border-radius: 12px;
  padding: 3px;
  flex-shrink: 0;
}
.topbar-text{ flex: 1; min-width: 0; }
.topbar-kicker{
  display:block;
  font-size: 11.5px;
  letter-spacing: 0.02em;
  color: var(--lavender);
  font-weight: 700;
  margin-bottom: 1px;
}
.topbar-title{
  font-size: 21px;
  color: #fff;
  font-weight: 700;
  line-height: 1.1;
}
.network-badge{
  color: #fff;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.install-btn{
  background: var(--honey);
  color: var(--ink);
  border: none;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  flex-shrink: 0;
}
.install-btn:active{ transform: scale(0.97); }

/* ---------------- Hero ---------------- */
.hero{
  max-width: 560px;
  margin: 0 auto;
  padding: 22px 18px 6px;
  text-align: left;
}
.hero-dates{
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}
.hero-date-block{
  display:flex;
  align-items: baseline;
  gap: 4px;
}
.hero-day{
  font-family: "Baloo 2", sans-serif;
  font-size: 44px;
  font-weight: 800;
  color: var(--brand);
  line-height: 1;
}
.hero-month{
  font-family: "Baloo 2", sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink-soft);
}
.hero-sep{ color: var(--lavender); font-size: 26px; font-weight: 700; }
.hero-sep-word{
  font-size: 14px;
  color: var(--ink-soft);
  font-weight: 700;
  margin-left: 2px;
}
.hero-sub{
  max-width: 46ch;
  font-size: 15px;
  color: var(--ink-soft);
}

/* ---------------- Main / panels ---------------- */
main{
  max-width: 560px;
  margin: 0 auto;
  padding: 4px 18px 12px;
}
.tab-panel[hidden]{ display: none; }

.section-head{ margin-bottom: 16px; }
.section-head h2{ font-size: 22px; margin-bottom: 4px; }
.section-hint{ font-size: 14px; }

/* ---------------- Day switch ---------------- */
.day-switch{
  display: inline-flex;
  background: var(--lavender-100);
  border-radius: 999px;
  padding: 4px;
  gap: 2px;
  margin-top: 10px;
}
.day-btn{
  border: none;
  background: transparent;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-soft);
  cursor: pointer;
}
.day-btn.is-active{
  background: var(--brand);
  color: #fff;
  box-shadow: var(--card-shadow);
}

/* ---------------- Timeline ---------------- */
.timeline{
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  position: relative;
}
.timeline-item{
  display: grid;
  grid-template-columns: 52px 20px 1fr;
  column-gap: 10px;
  position: relative;
  padding-bottom: 20px;
}
.timeline-item::before{
  content: "";
  position: absolute;
  left: 61px;
  top: 22px;
  bottom: -4px;
  width: 2px;
  background: var(--lavender-200);
}
.timeline-item:last-child::before{ display: none; }
.timeline-time{
  font-family: "Baloo 2", sans-serif;
  font-weight: 700;
  font-size: 13.5px;
  color: var(--brand);
  padding-top: 2px;
  text-align: right;
}
.timeline-dot{
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--brand);
  margin-top: 4px;
  justify-self: center;
}
.timeline-content h3{
  font-size: 15.5px;
  font-weight: 700;
  margin-bottom: 2px;
}
.timeline-content p{ font-size: 13.5px; margin: 0; }

/* ---------------- Checklist card ---------------- */
.checklist-card{
  margin-top: 26px;
  background: var(--lavender-100);
  border-radius: var(--radius-lg);
  padding: 18px 18px 6px;
}
.checklist-title{
  font-size: 16px;
  margin-bottom: 10px;
}
.checklist{ list-style: none; margin: 0; padding: 0; }
.checklist li{ margin-bottom: 10px; }
.checklist label{
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14.5px;
  color: var(--ink);
  cursor: pointer;
}
.checklist input[type="checkbox"]{
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 2px solid var(--lavender);
  background: #fff;
  flex-shrink: 0;
  position: relative;
  cursor: pointer;
}
.checklist input[type="checkbox"]:checked{
  background: var(--sage);
  border-color: var(--sage);
}
.checklist input[type="checkbox"]:checked::after{
  content: "";
  position: absolute;
  left: 6px; top: 2px;
  width: 6px; height: 11px;
  border: solid #fff;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(40deg);
}
.checklist input[type="checkbox"]:checked + span{
  color: var(--ink-soft);
  text-decoration: line-through;
  text-decoration-color: var(--sage);
}

/* ---------------- Buttons ---------------- */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: 999px;
  padding: 13px 20px;
  font-weight: 800;
  font-size: 14.5px;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}
.btn-primary{
  background: var(--brand);
  color: #fff;
  box-shadow: var(--card-shadow);
}
.btn-primary:active{ background: var(--brand-dark); }
.btn-ghost{
  background: transparent;
  color: var(--brand);
  border: 1.6px solid var(--lavender);
}
.btn-block{ width: 100%; }
.btn:disabled,
.btn[aria-disabled="true"]{
  opacity: 0.58;
  cursor: wait;
}

/* ---------------- Photos ---------------- */
.upload-card{
  background: var(--lavender-100);
  border: 1px solid var(--lavender-200);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 18px;
}
.photo-actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.photo-privacy{
  font-size: 12.5px;
  line-height: 1.4;
  margin: 0;
}
.photo-status{
  min-height: 1.4em;
  font-size: 13px;
  font-weight: 700;
  margin: 8px 2px 0;
}
.photo-status.is-error{ color: #a33d45; }
.upload-progress{
  height: 7px;
  overflow: hidden;
  background: #fff;
  border-radius: 999px;
  margin-top: 12px;
}
.upload-progress-bar{
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--brand), var(--honey));
  border-radius: inherit;
  transition: width 0.22s ease;
}
.photo-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.photo-cell{
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--lavender-100);
  cursor: zoom-in;
  overflow: hidden;
  position: relative;
}
.photo-cell img{
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--lavender-100);
  transition: transform 0.2s ease;
}
.photo-cell:active img{ transform: scale(0.98); }
.photo-empty{
  font-size: 14px;
  text-align: center;
  padding: 30px 10px;
  color: var(--ink-soft);
}
.photo-empty[hidden]{ display: none; }
.photo-viewer{
  width: min(94vw, 820px);
  max-width: none;
  max-height: 92vh;
  padding: 0;
  border: 0;
  border-radius: var(--radius-md);
  background: #10101b;
  box-shadow: 0 24px 70px rgba(0,0,0,0.5);
  overflow: visible;
}
.photo-viewer::backdrop{ background: rgba(20,19,37,0.82); }
.photo-viewer img{
  display: block;
  width: 100%;
  max-height: 88vh;
  object-fit: contain;
  border-radius: var(--radius-md);
}
.photo-viewer-close{
  position: absolute;
  top: -12px;
  right: -8px;
  width: 38px;
  height: 38px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

/* ---------------- Survey ---------------- */
.survey{ display: flex; flex-direction: column; gap: 18px; }
.rating-field{
  background: var(--lavender-100);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}
.rating-label{
  display: block;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
}
.stars{ display: flex; gap: 6px; }
.star-btn{
  border: none;
  background: transparent;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  color: var(--lavender);
  padding: 2px;
}
.star-btn.is-filled{ color: var(--honey); }

.field-label{
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: -10px;
}
.text-input{
  font-family: inherit;
  font-size: 15px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1.6px solid var(--lavender-200);
  background: #fff;
  color: var(--ink);
  resize: vertical;
}
.text-input:focus{
  outline: none;
  border-color: var(--brand);
}

.survey-thanks{
  background: var(--lavender-100);
  border-radius: var(--radius-lg);
  padding: 22px;
  text-align: center;
}
.survey-thanks h3{ margin-bottom: 6px; font-size: 18px; }
.survey-thanks p{ font-size: 14px; margin-bottom: 16px; }
.survey-thanks .btn{ margin-bottom: 10px; }

/* ---------------- Info ---------------- */
.info-card{
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--lavender-100);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 18px;
}
.info-badge{ width: 64px; height: 64px; border-radius: 50%; flex-shrink: 0; }
.info-card p{ font-size: 14px; margin: 0; }

.info-list{ display: flex; flex-direction: column; gap: 16px; }
.info-item{
  background: #fff;
  border: 1.6px solid var(--lavender-200);
  border-radius: var(--radius-md);
  padding: 16px;
}
.info-item h3{ font-size: 15.5px; margin-bottom: 6px; }
.info-item p{ font-size: 13.5px; }
.info-link{
  display: inline-block;
  margin-top: 4px;
  color: var(--brand);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
}
.install-steps{
  margin: 8px 0 0;
  padding-left: 18px;
  font-size: 13.5px;
  color: var(--ink-soft);
}
.install-steps li{ margin-bottom: 6px; }
.info-footer{
  text-align: center;
  font-size: 12.5px;
  color: var(--ink-soft);
  margin: 26px 0 6px;
}

/* ---------------- Bottom nav ---------------- */
.bottom-nav{
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: #fff;
  border-top: 1px solid var(--lavender-200);
  display: flex;
  justify-content: space-around;
  padding: 8px 6px calc(8px + var(--safe-bottom));
  z-index: 40;
}
.nav-btn{
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  cursor: pointer;
  border-radius: 12px;
}
.nav-icon{
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav-btn.is-active{ color: var(--brand); }
.nav-btn.is-active .nav-icon{ stroke-width: 2.1; }

/* ---------------- Toast ---------------- */
.toast{
  position: fixed;
  left: 50%;
  bottom: calc(90px + var(--safe-bottom));
  transform: translateX(-50%) translateY(12px);
  background: var(--ink);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 50;
  max-width: 80vw;
  text-align: center;
}
.toast.is-visible{
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------------- Motion & accessibility ---------------- */
@media (prefers-reduced-motion: reduce){
  *{ transition: none !important; animation: none !important; }
}
:focus-visible{
  outline: 3px solid var(--honey);
  outline-offset: 2px;
}

/* ---------------- Small screens ---------------- */
@media (max-width: 360px){
  .hero-day{ font-size: 38px; }
  .topbar-title{ font-size: 19px; }
}
