
:root {
  --navy:#0c2b3e;
  --navy2:#123d55;
  --orange:#ef8d32;
  --cream:#f7f1e7;
  --paper:#fffdf9;
  --ink:#17222a;
  --muted:#65737c;
  --line:#e4ddd2;
  --green:#53765a;
  --warn:#fff2d9;
  --danger:#8c3f2d;
  --shadow:0 14px 38px rgba(21,34,42,.13);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
*{box-sizing:border-box}
body{margin:0;background:linear-gradient(180deg,#e9e1d5 0,#f8f4ee 34%,#f8f4ee 100%);color:var(--ink)}
button,a{font:inherit}
.app{max-width:520px;margin:0 auto;min-height:100vh;background:var(--paper);box-shadow:0 0 60px rgba(0,0,0,.12);padding-bottom:88px}
.header{position:sticky;top:0;z-index:10;background:rgba(12,43,62,.96);backdrop-filter:blur(10px);color:white;padding:14px 18px;display:flex;align-items:center;justify-content:space-between}
.brand{display:flex;gap:11px;align-items:center}
.logo{width:42px;height:42px;border-radius:14px;background:var(--orange);display:grid;place-items:center;font-size:23px;box-shadow:inset 0 0 0 2px rgba(255,255,255,.28)}
.brand strong{display:block;font-size:15px;letter-spacing:.2px}
.brand small{display:block;color:#c9d7de;font-size:11px;margin-top:2px}
.icon-btn{border:1px solid rgba(255,255,255,.3);background:transparent;color:white;width:40px;height:40px;border-radius:13px;cursor:pointer}
.screen{display:none}
.screen.active{display:block}
.hero{position:relative;height:340px;overflow:hidden;background:#2c3e47}
.hero img{width:100%;height:100%;object-fit:cover;filter:brightness(.68) saturate(.85)}
.hero:after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(12,43,62,.04),rgba(12,43,62,.88))}
.hero-copy{position:absolute;z-index:2;left:22px;right:22px;bottom:24px;color:white}
.eyebrow{text-transform:uppercase;letter-spacing:1.5px;font-size:11px;font-weight:800;color:#ffd8ac}
.hero h1{font-family:Georgia,serif;font-weight:600;font-size:36px;line-height:1.04;margin:8px 0 10px}
.hero p{font-size:15px;line-height:1.48;margin:0;color:#e8f0f4}
.content{padding:20px}
.notice{background:#f0e6d8;border:1px solid #decbb3;color:#5d4a36;border-radius:16px;padding:13px 14px;font-size:12px;line-height:1.45;margin-bottom:18px}
.section-title{font-family:Georgia,serif;font-size:26px;margin:8px 0 7px}
.lead{color:var(--muted);font-size:14px;line-height:1.55;margin:0 0 18px}
.material-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.material-card{border:1px solid var(--line);background:white;border-radius:20px;overflow:hidden;box-shadow:0 8px 24px rgba(20,33,40,.07);cursor:pointer;text-align:left;padding:0}
.material-card img{width:100%;height:140px;object-fit:cover;display:block}
.material-body{padding:14px}
.material-body strong{display:block;font-size:17px}
.material-body span{font-size:12px;color:var(--muted);display:block;margin-top:5px;line-height:1.4}
.badge{display:inline-flex;align-items:center;gap:6px;border-radius:999px;background:#e9f0eb;color:#36543d;padding:6px 9px;font-size:11px;font-weight:800;margin-bottom:8px}
.cta{border:0;background:var(--orange);color:#20170f;font-weight:800;border-radius:15px;padding:13px 16px;cursor:pointer;box-shadow:0 8px 20px rgba(239,141,50,.25)}
.cta.secondary{background:white;color:var(--navy);border:1px solid #cdd6da;box-shadow:none}
.full{width:100%}
.guide-cover{padding:24px 20px 14px;background:linear-gradient(145deg,var(--navy),var(--navy2));color:white}
.back{display:inline-flex;gap:6px;align-items:center;border:0;background:transparent;color:#dbe7ec;padding:0;margin-bottom:18px;cursor:pointer}
.guide-cover h1{font-family:Georgia,serif;font-size:31px;line-height:1.08;margin:4px 0 10px}
.guide-cover p{font-size:14px;line-height:1.5;color:#dce8ed;margin:0}
.progress-wrap{margin-top:18px}
.progress-info{display:flex;justify-content:space-between;font-size:11px;color:#d9e5ea;margin-bottom:7px}
.progress{height:8px;background:rgba(255,255,255,.17);border-radius:99px;overflow:hidden}
.progress>div{height:100%;width:0;background:var(--orange);transition:.25s}
.guide-image{margin:18px 20px 0;height:210px;border-radius:22px;overflow:hidden;position:relative;box-shadow:var(--shadow)}
.guide-image img{width:100%;height:100%;object-fit:cover}
.ref-label{position:absolute;left:10px;bottom:10px;background:rgba(10,25,34,.82);color:white;border-radius:10px;padding:6px 9px;font-size:10px}
.checklist{border:1px solid var(--line);border-radius:18px;background:#fff;padding:15px;margin:18px 0}
.checklist strong{display:block;margin-bottom:10px}
.checklist div{font-size:13px;color:#46535b;margin:8px 0;display:flex;gap:9px}
.checklist div:before{content:"✓";color:var(--green);font-weight:900}
.steps{display:grid;gap:13px}
.step{border:1px solid var(--line);border-radius:20px;background:white;overflow:hidden;box-shadow:0 8px 22px rgba(30,40,45,.055)}
.step-top{padding:15px;display:flex;gap:12px;align-items:flex-start}
.step-num{flex:0 0 38px;height:38px;border-radius:13px;background:var(--navy);color:white;display:grid;place-items:center;font-weight:900}
.step h3{margin:1px 0 5px;font-size:16px}
.step p{margin:0;color:var(--muted);font-size:13px;line-height:1.5}
.step-details{padding:0 15px 15px}
.tip{background:var(--warn);border-left:4px solid var(--orange);padding:11px 12px;border-radius:10px;font-size:12px;line-height:1.45;margin-top:11px}
.actions{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:13px}
.small-btn{border:1px solid #cfd8dc;background:white;color:var(--navy);padding:10px;border-radius:12px;font-size:12px;font-weight:800;cursor:pointer}
.small-btn.done{background:#e6f1e9;border-color:#a9c8b0;color:#35593e}
.timer{font-variant-numeric:tabular-nums;background:#edf2f4;border-radius:12px;padding:10px;text-align:center;font-size:12px;color:#3b4a52;margin-top:9px}
.result-card{margin-top:18px;border-radius:20px;background:#e9f0eb;padding:17px;border:1px solid #cddfce}
.result-card h3{margin:0 0 6px;font-size:17px}
.result-card p{margin:0;color:#49604e;font-size:13px;line-height:1.5}
.care-grid{display:grid;gap:12px}
.care-card{border:1px solid var(--line);background:white;border-radius:18px;padding:16px}
.care-card h3{margin:0 0 7px;font-size:16px}
.care-card p{margin:0;color:var(--muted);font-size:13px;line-height:1.5}
.warning-card{background:#fff0eb;border:1px solid #f1c5b9;border-radius:18px;padding:16px;margin-top:14px}
.warning-card strong{color:var(--danger)}
.warning-card p{font-size:13px;line-height:1.5;margin:7px 0 0;color:#74483c}
.faq details{border-bottom:1px solid var(--line);padding:15px 0}
.faq summary{font-weight:800;cursor:pointer}
.faq p{color:var(--muted);font-size:13px;line-height:1.55}
.bottom-nav{position:fixed;z-index:20;bottom:0;left:50%;transform:translateX(-50%);width:min(520px,100%);height:74px;padding:8px 10px max(8px,env(safe-area-inset-bottom));display:grid;grid-template-columns:repeat(4,1fr);background:rgba(255,253,249,.96);backdrop-filter:blur(12px);border-top:1px solid var(--line)}
.nav-btn{border:0;background:transparent;color:#6c787f;font-size:10px;display:flex;flex-direction:column;gap:4px;align-items:center;justify-content:center;cursor:pointer}
.nav-btn span{font-size:20px}
.nav-btn.active{color:var(--navy);font-weight:900}
.footer-actions{display:grid;gap:10px;margin-top:20px}
.prototype-note{font-size:11px;color:#7f898f;text-align:center;margin-top:16px;line-height:1.4}
@media(max-width:380px){
  .hero{height:310px}
  .hero h1{font-size:31px}
  .material-grid{grid-template-columns:1fr}
  .material-card img{height:170px}
}

/* Ajustes V2 — identidad oficial y guía de algarrobo */
.logo{
  width:52px;
  height:52px;
  border-radius:50%;
  padding:0;
  background:transparent;
  box-shadow:none;
  overflow:hidden;
  flex:0 0 52px;
}
.logo img{width:100%;height:100%;object-fit:contain;display:block}
.header{padding:10px 16px}
.brand strong{font-size:15px}
.guide-hero-photo{
  position:relative;
  height:265px;
  overflow:hidden;
  margin:0;
  background:#ede3d5;
}
.guide-hero-photo img{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center 56%;
  display:block;
}
.guide-hero-photo:after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(180deg,rgba(12,43,62,0) 52%,rgba(12,43,62,.78) 100%);
}
.guide-hero-caption{
  position:absolute;
  z-index:2;
  left:18px;
  right:18px;
  bottom:14px;
  color:white;
  font-size:12px;
  font-weight:750;
  letter-spacing:.1px;
}
.step-media{
  margin:0 15px 15px;
  border-radius:16px;
  overflow:hidden;
  background:#eee6dc;
  border:1px solid var(--line);
}
.step-media img{
  width:100%;
  height:210px;
  object-fit:cover;
  display:block;
}
.step-media.tall img{height:250px}
.step-media figcaption{
  padding:9px 11px;
  background:#faf7f1;
  color:#5e6b72;
  font-size:11px;
  line-height:1.4;
}
.step-media-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:9px;
  margin:0 15px 15px;
}
.step-media-grid figure{
  margin:0;
  border:1px solid var(--line);
  border-radius:15px;
  overflow:hidden;
  background:#faf7f1;
}
.step-media-grid img{
  width:100%;
  height:175px;
  object-fit:cover;
  display:block;
}
.step-media-grid figcaption{
  padding:8px 9px;
  color:#5e6b72;
  font-size:10px;
  line-height:1.35;
}
.material-note{
  background:#f2eee6;
  border:1px solid #ddd1c1;
  border-radius:16px;
  padding:13px 14px;
  font-size:12px;
  line-height:1.48;
  color:#594c3f;
  margin:0 0 18px;
}
.material-note strong{color:#342b23}
@media(max-width:380px){
  .step-media-grid{grid-template-columns:1fr}
  .step-media-grid img{height:220px}
}


/* Ajustes V3 — rediseño profesional de la guía de calabaza */
.calabaza-hero{
  position:relative;
  height:300px;
  overflow:hidden;
  background:#3d2a1d;
}
.calabaza-hero img.hero-product{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center;
  display:block;
}
.calabaza-hero:after{
  content:"";
  position:absolute;
  inset:0;
  background:
    linear-gradient(90deg,rgba(8,26,38,.91) 0%,rgba(8,26,38,.72) 43%,rgba(8,26,38,.10) 76%,rgba(8,26,38,.05) 100%),
    linear-gradient(180deg,rgba(8,26,38,.04),rgba(8,26,38,.40));
}
.calabaza-hero-content{
  position:absolute;
  z-index:2;
  left:20px;
  top:22px;
  bottom:20px;
  width:58%;
  display:flex;
  flex-direction:column;
  justify-content:center;
  color:white;
}
.calabaza-brand{
  display:inline-flex;
  align-items:center;
  gap:9px;
  width:max-content;
  max-width:100%;
  background:rgba(255,255,255,.12);
  border:1px solid rgba(255,255,255,.25);
  backdrop-filter:blur(8px);
  border-radius:999px;
  padding:6px 10px 6px 7px;
  margin-bottom:12px;
}
.calabaza-brand img{
  width:34px;
  height:34px;
  object-fit:contain;
  border-radius:50%;
}
.calabaza-brand strong{
  display:block;
  font-size:11px;
  line-height:1.15;
  letter-spacing:.2px;
}
.calabaza-brand span{
  display:block;
  font-size:9px;
  color:#dce8ed;
  margin-top:2px;
}
.calabaza-hero h2{
  font-family:Georgia,serif;
  font-size:31px;
  line-height:1.02;
  margin:0 0 8px;
}
.calabaza-hero p{
  margin:0;
  font-size:12px;
  line-height:1.45;
  color:#e4edf0;
}
.process-label{
  display:inline-flex;
  align-items:center;
  gap:7px;
  background:#eef4ef;
  color:#3c5d42;
  border:1px solid #cfe0d2;
  border-radius:999px;
  padding:7px 10px;
  font-size:11px;
  font-weight:850;
  margin-bottom:10px;
}
.step-photo-pair{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:9px;
  margin:0 15px 15px;
}
.step-photo-pair figure{
  margin:0;
  overflow:hidden;
  border-radius:15px;
  border:1px solid var(--line);
  background:#faf7f1;
}
.step-photo-pair img{
  width:100%;
  height:182px;
  object-fit:cover;
  display:block;
}
.step-photo-pair figcaption{
  padding:8px 9px;
  color:#5e6b72;
  font-size:10px;
  line-height:1.35;
}
.final-result{
  margin-top:18px;
  display:grid;
  grid-template-columns:112px 1fr;
  gap:14px;
  align-items:center;
  border-radius:20px;
  padding:14px;
  background:#e9f0eb;
  border:1px solid #cddfce;
}
.final-result img{
  width:112px;
  height:136px;
  object-fit:cover;
  border-radius:15px;
  display:block;
}
.final-result h3{margin:0 0 6px;font-size:17px}
.final-result p{margin:0;color:#49604e;font-size:12px;line-height:1.48}
@media(max-width:390px){
  .calabaza-hero{height:325px}
  .calabaza-hero-content{width:66%}
  .calabaza-hero h2{font-size:27px}
  .step-photo-pair{grid-template-columns:1fr}
  .step-photo-pair img{height:220px}
  .final-result{grid-template-columns:94px 1fr}
  .final-result img{width:94px;height:125px}
}


/* Ajustes V4 solicitados */
.hero img{
  object-position:center 55%;
}
#care .guide-image img{
  object-position:center 48%;
}
.calabaza-hero img.hero-product{
  object-position:center;
}


/* V5 — visualización profesional y preservación del encuadre original */
img{
  image-rendering:auto;
  backface-visibility:hidden;
}

/* Banner de calabaza: diseño dividido, sin fondos estirados ni reconstrucciones */
.calabaza-hero{
  display:grid !important;
  grid-template-columns:minmax(0,1.08fr) minmax(230px,.92fr) !important;
  height:390px !important;
  background:linear-gradient(145deg,#081f2d,#0c3449) !important;
  overflow:hidden;
}
.calabaza-hero:after{
  display:none !important;
  content:none !important;
}
.calabaza-hero img.hero-product{
  position:relative !important;
  z-index:1;
  grid-column:2;
  grid-row:1;
  width:100% !important;
  height:100% !important;
  object-fit:cover !important;
  object-position:center 48% !important;
  display:block;
  filter:none !important;
}
.calabaza-hero-content{
  position:relative !important;
  z-index:2;
  grid-column:1;
  grid-row:1;
  left:auto !important;
  right:auto !important;
  top:auto !important;
  bottom:auto !important;
  width:auto !important;
  padding:28px 22px 26px 24px;
  justify-content:center;
  background:linear-gradient(90deg,#071e2b 0%,#0a2b3d 82%,rgba(10,43,61,.92) 100%);
}
.calabaza-hero-content:after{
  content:"";
  position:absolute;
  top:0;
  right:-36px;
  width:72px;
  height:100%;
  background:linear-gradient(90deg,#0a2b3d,rgba(10,43,61,0));
  pointer-events:none;
}
.calabaza-hero h2{
  font-size:36px !important;
  line-height:1.04 !important;
}
.calabaza-hero p{
  max-width:330px;
  font-size:13px !important;
  line-height:1.55 !important;
}

/* Las imágenes explicativas muestran el contenido completo, sin cortes bruscos */
.step-media,
.step-media.tall,
.guide-image{
  height:auto !important;
  background:#f3ede4;
}
.step-media img,
.step-media.tall img,
.guide-image img{
  width:100% !important;
  height:auto !important;
  max-height:440px;
  object-fit:contain !important;
  object-position:center !important;
  display:block;
  background:#f3ede4;
}
.step-media-grid img,
.step-photo-pair img{
  width:100% !important;
  height:230px !important;
  object-fit:contain !important;
  object-position:center !important;
  display:block;
  background:#f3ede4;
}
.final-result img{
  object-fit:contain !important;
  object-position:center !important;
  background:#f3ede4;
}
.guide-hero-photo img{
  object-fit:contain !important;
  object-position:center !important;
  background:#eee5da;
}
.material-card img{
  object-position:center !important;
}

/* Portada: conserva la fotografía limpia sin pixelado ni zoom excesivo */
.hero img{
  object-position:center 51% !important;
  filter:brightness(.66) saturate(.92) !important;
}

/* Cuidados esenciales */
#care .guide-image{
  max-height:none !important;
}
#care .guide-image img{
  max-height:430px !important;
  object-position:center !important;
}

@media(max-width:430px){
  .calabaza-hero{
    grid-template-columns:1fr !important;
    grid-template-rows:220px auto !important;
    height:auto !important;
  }
  .calabaza-hero img.hero-product{
    grid-column:1;
    grid-row:1;
    object-fit:cover !important;
    object-position:center 47% !important;
  }
  .calabaza-hero-content{
    grid-column:1;
    grid-row:2;
    padding:21px 20px 24px;
  }
  .calabaza-hero-content:after{display:none}
  .calabaza-hero h2{font-size:30px !important}
  .step-media-grid,
  .step-photo-pair{
    grid-template-columns:1fr !important;
  }
  .step-media-grid img,
  .step-photo-pair img{
    height:auto !important;
    max-height:430px;
  }
}



/* ================================================================
   Producción PWA
   ================================================================ */

html {
  scroll-behavior: smooth;
  background: #e9e1d5;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
}

button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(239, 141, 50, .75);
  outline-offset: 3px;
}

noscript {
  display: block;
  max-width: 520px;
  margin: 0 auto;
  padding: 12px 16px;
  background: #fff0eb;
  color: #74483c;
  font-size: 13px;
  text-align: center;
}

.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 0 18px;
}

.quick-actions .cta {
  min-height: 48px;
  padding: 11px 12px;
  font-size: 12px;
}

.install-help {
  margin: -7px 0 18px;
  padding: 13px 14px;
  border: 1px solid #d7dfe2;
  border-radius: 15px;
  background: #edf3f5;
  color: #405159;
  font-size: 12px;
  line-height: 1.5;
}

.install-help strong {
  display: block;
  color: var(--navy);
  margin-bottom: 3px;
}

.install-help p {
  margin: 0;
}

.actions.has-calendar {
  grid-template-columns: 1fr 1fr;
}

.actions.has-calendar .calendar-btn {
  grid-column: 1 / -1;
  min-height: 42px;
  border-color: #b9cbd3;
  background: #eef4f6;
}

.calendar-btn:not(:disabled) {
  color: #0c2b3e;
  background: #e8f2f5;
  border-color: #9fbcc7;
}

.calendar-btn:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.timer {
  min-height: 39px;
}

.timer strong {
  display: block;
  color: var(--navy);
  margin-bottom: 2px;
}

.app-toast {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: 88px;
  width: min(460px, calc(100% - 32px));
  transform: translate(-50%, 20px);
  padding: 13px 15px;
  border-radius: 14px;
  background: rgba(12, 43, 62, .96);
  color: #fff;
  box-shadow: 0 16px 36px rgba(0, 0, 0, .22);
  font-size: 13px;
  line-height: 1.45;
  opacity: 0;
  transition: opacity .2s ease, transform .2s ease;
}

.app-toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.offline-banner {
  position: fixed;
  z-index: 90;
  top: 72px;
  left: 50%;
  width: min(500px, calc(100% - 20px));
  transform: translateX(-50%);
  padding: 9px 12px;
  border-radius: 12px;
  background: #fff2d9;
  border: 1px solid #e6c98f;
  color: #5f4a24;
  font-size: 12px;
  text-align: center;
  box-shadow: 0 8px 22px rgba(0,0,0,.12);
}

.screen[aria-hidden="true"] {
  display: none;
}

@media (min-width: 450px) {
  .actions.has-calendar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .actions.has-calendar .calendar-btn {
    grid-column: auto;
  }
}

@media (max-width: 390px) {
  .quick-actions {
    grid-template-columns: 1fr;
  }
}

@media (display-mode: standalone) {
  #installAppButton {
    display: none;
  }

  .header {
    padding-top: max(10px, env(safe-area-inset-top));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
