:root {
  --ink: #061210;
  --teal: #0f3d38;
  --gold: #d4a84b;
  --copper: #b87333;
  --cream: #f5efe6;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Outfit", system-ui, sans-serif;
  color: var(--cream);
  background: var(--ink);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(26, 92, 84, 0.45), transparent),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(184, 115, 51, 0.12), transparent);
  min-height: 100vh;
}
.wrap { width: min(1100px, 92vw); margin: 0 auto; }
.site-header {
  position: sticky; top: 0; z-index: 10;
  border-bottom: 1px solid rgba(212, 168, 75, 0.15);
  background: rgba(6, 18, 16, 0.92); backdrop-filter: blur(8px);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem 0; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: inherit; }
.brand-logo { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(212,168,75,.4); }
.brand-text strong { display: block; font-family: "Bebas Neue", sans-serif; letter-spacing: .06em; font-size: 1.2rem; }
.brand-text em { font-family: "Great Vibes", cursive; color: var(--gold); font-size: 1.1rem; font-style: normal; }
.nav { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.nav-toggle { display: none; border: 0; font: inherit; color: inherit; }
.nav a { color: var(--cream); text-decoration: none; opacity: .85; }
.nav a:hover { color: var(--gold); opacity: 1; }
.nav .btn { opacity: 1; }
a { color: var(--gold); }
main a:not(.btn):not(.brand) { color: var(--gold); }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; padding: .65rem 1.25rem; text-decoration: none; border: 1px solid transparent; cursor: pointer; font-weight: 600;
}
.btn-primary { background: linear-gradient(180deg, var(--gold), var(--copper)); color: var(--ink); }
.btn-ghost { border-color: rgba(212,168,75,.35); color: var(--cream); background: transparent; }
.link-btn { background: none; border: none; color: var(--cream); cursor: pointer; text-decoration: underline; }
.inline-form { display: inline; margin: 0; }
.hero { display: grid; grid-template-columns: 1.2fr .8fr; gap: 2rem; padding: 3rem 0 2rem; align-items: center; }
.hero h1 { font-family: "Bebas Neue", sans-serif; font-size: clamp(2.4rem, 6vw, 4rem); line-height: 1; margin: 0; }
.hero h1 span { display: block; background: linear-gradient(90deg, var(--gold), var(--copper)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow { color: var(--gold); text-transform: uppercase; letter-spacing: .15em; font-size: .8rem; font-weight: 700; }
.lead, .muted { color: rgba(245,239,230,.72); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.25rem; }
.hero-logo img { width: min(360px, 80vw); aspect-ratio: 1; border-radius: 50%; object-fit: cover; border: 4px solid rgba(212,168,75,.35); box-shadow: 0 12px 40px rgba(0,0,0,.45); display: block; margin: 0 auto; }
.section { padding: 2.5rem 0 3rem; }
.countdown-section { text-align: center; padding-top: 1rem; }
.countdown-title { font-family: "Bebas Neue", sans-serif; font-size: clamp(1.75rem, 4vw, 2.5rem); margin: 0 0 1.25rem; letter-spacing: .04em; }
.sorteo-description.rich-html { max-width: 42rem; margin: 0 auto 1.25rem; line-height: 1.55; opacity: .92; }
.sorteo-description.rich-html ul { text-align: left; display: inline-block; margin: .5rem auto; }
.countdown {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin: 0 auto 1rem;
  max-width: 640px;
}
.countdown-unit {
  min-width: 5.5rem; padding: 1rem .75rem;
  border-radius: 1rem;
  border: 1px solid rgba(212,168,75,.35);
  background: linear-gradient(180deg, rgba(15,61,56,.55), rgba(6,18,16,.9));
}
.countdown-num {
  display: block; font-family: "Bebas Neue", sans-serif;
  font-size: clamp(2rem, 6vw, 3rem); line-height: 1; color: var(--gold);
}
.countdown-unit small { display: block; margin-top: .35rem; text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; opacity: .85; }
.countdown-done { margin-top: .5rem; }
.prize-date { font-size: .9rem; color: var(--gold); margin: .25rem 0 .5rem; }
.section h1, .section h2 { font-family: "Bebas Neue", sans-serif; letter-spacing: .04em; }
.subhead { margin-top: 2rem; color: var(--gold); }
.prize-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; margin-top: 1rem; }
.prize-card { border: 1px solid rgba(212,168,75,.25); border-radius: 1rem; overflow: hidden; background: linear-gradient(180deg, rgba(15,61,56,.4), rgba(6,18,16,.85)); }
.prize-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.prize-body { padding: 1rem; text-align: center; }
.prize-body h3 { margin: .35rem 0; font-family: "Bebas Neue", sans-serif; font-size: 1.35rem; }
.prize-body .badge { margin: 0 auto .25rem; }
.prize-body .prize-desc.rich-html { line-height: 1.55; margin-top: .35rem; text-align: center; }
.prize-body .prize-desc.rich-html ul,
.prize-body .prize-desc.rich-html ol { text-align: left; display: inline-block; margin: .35rem auto; }
.badge { display: inline-block; font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; background: rgba(212,168,75,.9); color: var(--ink); padding: .2rem .55rem; border-radius: 999px; font-weight: 700; }
.muted-badge { background: rgba(255,255,255,.12); color: var(--cream); }
.prize-card.dim { opacity: .85; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 1rem; margin-top: 1rem; }
.step-card { border: 1px solid rgba(212,168,75,.25); border-radius: 1rem; padding: 1rem; background: rgba(15,61,56,.25); }
.step-card span { font-family: "Bebas Neue", sans-serif; color: rgba(212,168,75,.55); font-size: 2rem; }
.step-card h3 { margin: .35rem 0 .5rem; font-size: 1.15rem; }
.step-photo {
  width: 100%; max-height: 160px; object-fit: cover; border-radius: .65rem;
  margin: .35rem 0 .65rem; border: 1px solid rgba(212,168,75,.2);
}
.step-desc.rich-html { font-size: .95rem; line-height: 1.55; color: rgba(245,239,230,.88); }
.step-desc.rich-html a { color: var(--gold, #d4a84b); }
.rich-html h2, .rich-html h3 { margin: .5rem 0 .35rem; line-height: 1.2; }
.rich-html p { margin: .35rem 0; }
.sorteo-description.rich-html { text-align: center; }
.site-footer { border-top: 1px solid rgba(212,168,75,.15); padding: 1.5rem 0 2rem; margin-top: 2rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem; color: rgba(245,239,230,.55); font-size: .9rem; }
.admin-link { color: rgba(245,239,230,.35); }

.site-modal-open { overflow: hidden; }
.site-modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 1000;
  background: rgba(6, 18, 16, .78); align-items: center; justify-content: center; padding: 1rem;
}
.site-modal-overlay.open { display: flex; }
.site-modal {
  position: relative; width: min(480px, 100%); max-height: 90vh; overflow-y: auto;
  background: rgba(15, 61, 56, .98); border: 1px solid rgba(212, 168, 75, .28);
  border-radius: 1rem; padding: 1.5rem 1.35rem 1.25rem; box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
}
.site-modal-close {
  position: absolute; top: .65rem; right: .75rem; border: 0; background: transparent;
  color: rgba(245, 239, 230, .7); font-size: 1.75rem; line-height: 1; cursor: pointer;
}
.site-modal-close:hover { color: var(--cream); }
.site-modal h2 { margin: 0 0 .35rem; font-family: "Bebas Neue", sans-serif; letter-spacing: .04em; color: var(--gold); }
.site-auth-error { margin: .5rem 0; }
.small { font-size: .9rem; }
.narrow { max-width: 520px; }
.auth-card-wide { max-width: 560px; margin: 0 auto; }
.auth-card { border: 1px solid rgba(212,168,75,.25); border-radius: 1rem; padding: 1.5rem; background: rgba(15,61,56,.25); }
.stack label { display: block; margin-bottom: 1rem; font-size: .9rem; }
.stack-large input { font-size: 1.05rem; padding: .85rem .9rem; }
.label-title { display: block; font-weight: 600; font-size: 1rem; margin-bottom: .15rem; }
.label-hint { display: block; font-size: .85rem; color: rgba(245,239,230,.6); margin-bottom: .4rem; }
.stack input { width: 100%; margin-top: 0; padding: .65rem .75rem; border-radius: .65rem; border: 1px solid rgba(212,168,75,.25); background: rgba(6,18,16,.65); color: var(--cream); }
.full { width: 100%; margin-top: .5rem; }
.btn-large { padding: .9rem 1.25rem; font-size: 1.05rem; }
.help-box { background: rgba(212,168,75,.12); border: 1px solid rgba(212,168,75,.25); padding: .85rem 1rem; border-radius: .75rem; line-height: 1.5; font-size: .95rem; }
.steps-simple { margin: 1rem 0 1.25rem 1.1rem; line-height: 1.6; color: rgba(245,239,230,.85); }
.auth-switch { margin-top: 1.25rem; text-align: center; font-size: .95rem; }
.auth-switch a { color: var(--gold); }
.error { color: #fca5a5; background: rgba(127,29,29,.25); padding: .5rem .75rem; border-radius: .5rem; }
.success-box { background: rgba(34,197,94,.15); border: 1px solid rgba(34,197,94,.35); padding: 1rem; border-radius: .75rem; margin-bottom: 1.25rem; line-height: 1.5; }
.center { text-align: center; margin-top: 1rem; }
.help-guide { max-width: 720px; }
.help-intro { font-size: 1.05rem; line-height: 1.6; }
.help-step { margin: 2.5rem 0; padding-bottom: 2rem; border-bottom: 1px solid rgba(212,168,75,.15); }
.help-step h2 { font-family: "Bebas Neue", sans-serif; font-size: 1.6rem; color: var(--gold); letter-spacing: .03em; }
.help-step figure { margin: 1rem 0 0; }
.help-step img {
  width: 100%; border-radius: 12px; border: 1px solid rgba(212,168,75,.3);
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
}
.help-step figcaption { font-size: .85rem; color: rgba(245,239,230,.55); margin-top: .5rem; }
.help-cta { display: flex; flex-wrap: wrap; gap: .75rem; margin: 2rem 0 1rem; }
.help-step code { background: rgba(255,255,255,.08); padding: .15rem .4rem; border-radius: 4px; }
/* ——— Móvil ——— */
@media (max-width: 768px) {
  body { overflow-x: hidden; }
  .wrap { width: min(1100px, 100%); padding-left: max(1rem, env(safe-area-inset-left)); padding-right: max(1rem, env(safe-area-inset-right)); }
  .site-header { padding-top: env(safe-area-inset-top); }
  .header-inner {
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    padding: .65rem 0;
  }
  .brand-logo { width: 48px; height: 48px; }
  .brand-text strong { font-size: 1.05rem; }
  .brand-text em { font-size: 1rem; }

  .nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    margin-left: auto;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(212, 168, 75, .35);
    border-radius: 10px;
    background: rgba(15, 61, 56, .5);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .nav-toggle-bar {
    display: block;
    width: 20px;
    height: 2px;
    margin: 0 auto;
    background: var(--cream);
    border-radius: 2px;
    transition: transform .2s ease, opacity .2s ease;
  }
  body.site-nav-open .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  body.site-nav-open .nav-toggle-bar:nth-child(2) { opacity: 0; }
  body.site-nav-open .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .nav {
    display: none;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: .35rem;
    padding: .75rem 0 .25rem;
    border-top: 1px solid rgba(212, 168, 75, .12);
    margin-top: .25rem;
  }
  body.site-nav-open .nav { display: flex; }
  .nav a, .nav .btn, .nav .link-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: .65rem 1rem;
    border-radius: 10px;
    font-size: 1rem;
  }
  .nav a:not(.btn) { background: rgba(15, 61, 56, .35); opacity: 1; }
  .nav .btn-primary { width: 100%; }
  .nav-form { display: block; margin: 0; }
  .nav .link-btn { width: 100%; text-decoration: none; background: rgba(255,255,255,.06); border-radius: 10px; }

  .hero { grid-template-columns: 1fr; gap: 1.25rem; padding: 2rem 0 1.5rem; }
  .hero-logo { order: -1; }
  .hero h1 { font-size: clamp(2rem, 10vw, 2.75rem); }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; min-height: 48px; }

  .section { padding: 2rem 0 2.5rem; }
  .countdown { gap: .5rem; }
  .countdown-unit { min-width: calc(50% - .35rem); flex: 1 1 calc(50% - .35rem); padding: .85rem .5rem; }
  .countdown-num { font-size: clamp(1.75rem, 8vw, 2.5rem); }

  .prize-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }

  .site-modal-overlay { padding: max(.75rem, env(safe-area-inset-top)) max(.75rem, env(safe-area-inset-right)) max(.75rem, env(safe-area-inset-bottom)) max(.75rem, env(safe-area-inset-left)); align-items: flex-end; }
  .site-modal {
    width: 100%;
    max-height: min(92vh, 100%);
    border-radius: 1rem 1rem 0 0;
    padding: 1.25rem 1rem max(1rem, env(safe-area-inset-bottom));
  }
  .site-modal-close { width: 44px; height: 44px; top: .25rem; right: .35rem; }

  .site-footer { padding-bottom: max(1.5rem, env(safe-area-inset-bottom)); }
  .site-footer .wrap { flex-direction: column; text-align: center; }
  .stack input, .btn-large { font-size: 16px; /* evita zoom en iOS */ }
}

@media (min-width: 769px) {
  .nav-toggle { display: none; }
}
