:root {
  --teal: #07989a;
  --teal-dark: #05787b;
  --teal-soft: #e9f7f6;
  --orange: #ff6d00;
  --orange-dark: #df5b00;
  --navy: #082344;
  --text: #162033;
  --muted: #657083;
  --white: #ffffff;
  --surface: #f7fafb;
  --line: #dfe8ea;
  --shadow: 0 24px 70px rgba(8, 35, 68, .12);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background: var(--white);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }

.skip-link {
  position: fixed; left: 12px; top: -80px; z-index: 9999;
  background: var(--navy); color: white; padding: 12px 18px; border-radius: 10px;
}
.skip-link:focus { top: 12px; }
.container { width: min(calc(100% - 40px), var(--container)); margin-inline: auto; }
.section-pad { padding: 104px 0; }

.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(255,255,255,.93);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(8,35,68,.07);
}
.nav-wrap { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.brand { width: 158px; height: 68px; display: flex; align-items: center; overflow: hidden; }
.brand img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.main-nav { display: flex; align-items: center; gap: 28px; font-weight: 700; font-size: .95rem; }
.main-nav > a:not(.btn) { position: relative; }
.main-nav > a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -6px; height: 2px; background: var(--teal); transition: .25s ease; }
.main-nav > a:not(.btn):hover::after { right: 0; }
.menu-toggle { display: none; border: 0; background: transparent; padding: 10px; }
.menu-toggle span { display: block; width: 24px; height: 2px; background: var(--navy); margin: 5px 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 24px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 800; cursor: pointer; transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { color: white; background: linear-gradient(135deg, var(--orange), #ff8d1c); box-shadow: 0 16px 36px rgba(255,109,0,.27); }
.btn-primary:hover { box-shadow: 0 20px 42px rgba(255,109,0,.35); }
.btn-secondary { color: var(--navy); background: white; border-color: var(--line); }
.btn-secondary:hover { box-shadow: 0 12px 30px rgba(8,35,68,.10); }
.btn-sm { min-height: 44px; padding: 0 18px; }
.btn-whatsapp { color: #fff; background: #16a765; }
.btn-light { background: #fff; color: var(--teal-dark); min-height: 58px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 18px;
  font-size: .78rem; text-transform: uppercase; letter-spacing: .14em; font-weight: 900; color: var(--teal-dark);
}
.eyebrow .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 5px rgba(255,109,0,.11); }
.eyebrow.orange { color: var(--orange-dark); }
.eyebrow.light { color: #d9fffb; }

.hero { position: relative; overflow: hidden; padding-top: 80px; background: radial-gradient(circle at 88% 20%, #effbfa 0, transparent 31%), linear-gradient(#fff, #fbfdfd); }
.hero-grid { display: grid; grid-template-columns: 1.03fr .97fr; align-items: center; gap: 72px; }
.hero-copy { position: relative; z-index: 2; }
.hero h1 { margin: 0; max-width: 680px; color: var(--navy); font-size: clamp(3rem, 6.2vw, 6rem); letter-spacing: -.065em; line-height: .96; }
.hero h1 span { display: block; color: var(--teal); }
.hero-lead { max-width: 640px; margin: 28px 0 30px; font-size: clamp(1.08rem, 2vw, 1.3rem); color: #49566a; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 9px 18px; margin-top: 28px; font-size: .9rem; font-weight: 700; color: #536176; }
.hero-media { position: relative; min-height: 620px; display: grid; place-items: center; }
.hero-card-main { position: relative; z-index: 2; width: min(100%, 470px); height: 610px; overflow: hidden; border-radius: 42px 42px 140px 42px; box-shadow: var(--shadow); border: 10px solid white; transform: rotate(1.4deg); }
.hero-card-main img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.hero-orb { position: absolute; border-radius: 50%; filter: blur(1px); opacity: .95; }
.hero-orb-1 { width: 450px; height: 450px; background: var(--teal); right: -130px; top: 150px; }
.hero-orb-2 { width: 180px; height: 180px; border: 28px solid #ffeddc; right: 36%; bottom: -92px; }
.floating-badge { position: absolute; z-index: 4; padding: 13px 18px; border-radius: 999px; background: white; box-shadow: 0 18px 40px rgba(8,35,68,.17); font-weight: 900; color: var(--navy); font-size: .88rem; }
.badge-top { top: 52px; right: -8px; }
.badge-bottom { bottom: 42px; left: -36px; color: var(--teal-dark); }

.trust-strip { background: var(--navy); color: white; }
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.trust-grid > div { min-height: 128px; display: flex; flex-direction: column; justify-content: center; padding: 24px 30px; border-right: 1px solid rgba(255,255,255,.12); }
.trust-grid > div:last-child { border-right: 0; }
.trust-grid strong { color: #6ee4dc; font-size: 1.12rem; }
.trust-grid span { color: rgba(255,255,255,.78); font-size: .9rem; }

.section-head { max-width: 740px; margin-bottom: 48px; }
.section-head h2, .benefits-copy h2, .anniversary-copy h2, .final-cta h2 { margin: 0; color: var(--navy); font-size: clamp(2.2rem, 4vw, 3.8rem); line-height: 1.02; letter-spacing: -.04em; }
.section-head p { margin: 18px 0 0; color: var(--muted); font-size: 1.08rem; }

.programs { background: var(--surface); }
.program-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.program-card { background: white; border: 1px solid #edf1f2; border-radius: var(--radius-lg); overflow: hidden; box-shadow: 0 16px 42px rgba(8,35,68,.07); transition: transform .25s ease, box-shadow .25s ease; }
.program-card:hover { transform: translateY(-7px); box-shadow: 0 24px 55px rgba(8,35,68,.12); }
.program-card.featured { outline: 2px solid rgba(7,152,154,.20); }
.program-image { height: 340px; overflow: hidden; background: #edf7f6; }
.program-image img { width: 100%; height: 100%; object-fit: cover; object-position: center top; transition: transform .5s ease; }
.program-card:hover .program-image img { transform: scale(1.025); }
.portrait-position img { object-position: center 22%; }
.program-body { padding: 28px; }
.program-tag { display: inline-block; color: var(--teal-dark); background: var(--teal-soft); padding: 7px 11px; border-radius: 999px; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 900; }
.program-body h3 { margin: 17px 0 11px; color: var(--navy); font-size: 1.35rem; line-height: 1.2; }
.program-body > p { margin: 0; color: var(--muted); }
.meta-list { padding: 18px 0; margin: 20px 0; list-style: none; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: #596477; }
.meta-list li + li { margin-top: 8px; }
.meta-list strong { color: var(--navy); }
.text-link { color: var(--orange-dark); font-weight: 900; }

.benefits { background: #fff; }
.benefits-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 90px; align-items: center; }
.benefits-copy p { color: var(--muted); font-size: 1.08rem; margin: 22px 0 30px; }
.benefit-list { display: grid; gap: 14px; }
.benefit-item { display: grid; grid-template-columns: 64px 1fr; gap: 20px; align-items: start; padding: 25px; border-radius: var(--radius-md); background: linear-gradient(145deg, #f7fbfb, #fff); border: 1px solid var(--line); }
.benefit-item .icon { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 18px; background: var(--teal); color: white; font-weight: 900; }
.benefit-item h3 { margin: 2px 0 6px; color: var(--navy); }
.benefit-item p { margin: 0; color: var(--muted); }

.anniversary { background: linear-gradient(135deg, #fff8f0, #f8fffe); }
.anniversary-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 70px; align-items: center; }
.anniversary-media img { width: 100%; border-radius: var(--radius-xl); box-shadow: var(--shadow); }
.anniversary-copy h2 { max-width: 650px; }
.anniversary-lead { color: var(--muted); font-size: 1.08rem; }
.rules { margin: 28px 0; display: grid; gap: 14px; }
.rules > div { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; }
.rules span { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; background: #fff; color: var(--orange); font-weight: 900; box-shadow: 0 10px 24px rgba(8,35,68,.08); }
.rules p { margin: 5px 0 0; color: #4e5c6d; }

.final-cta { padding-top: 70px; padding-bottom: 70px; }
.final-cta-card { position: relative; overflow: hidden; background: linear-gradient(120deg, #078c8e, #0ca6a6); color: white; border-radius: 36px; padding: 56px 62px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 50px; align-items: center; box-shadow: 0 28px 70px rgba(7,152,154,.25); }
.final-cta-card::after { content: "+"; position: absolute; right: -20px; top: -105px; font-size: 290px; line-height: 1; font-weight: 900; color: rgba(255,255,255,.08); }
.final-cta h2 { color: white; }
.final-cta p { max-width: 620px; color: rgba(255,255,255,.85); margin-bottom: 0; }
.cta-actions { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.cta-actions span { font-size: .85rem; color: rgba(255,255,255,.76); }

.site-footer { background: #06182e; color: rgba(255,255,255,.73); padding-top: 56px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr .8fr .8fr; gap: 60px; padding-bottom: 40px; }
.footer-brand img { width: 120px; height: 82px; object-fit: cover; object-position: center; border-radius: 16px; margin-bottom: 18px; }
.footer-brand p { max-width: 420px; }
.site-footer h3 { color: white; margin-top: 0; font-size: .95rem; }
.site-footer a, .site-footer span { display: block; margin: 8px 0; }
.site-footer a:hover { color: white; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; padding: 22px 0; border-top: 1px solid rgba(255,255,255,.1); font-size: .84rem; }
.footer-bottom span { margin: 0; }

.whatsapp-float { position: fixed; right: 22px; bottom: 22px; z-index: 999; display: inline-flex; align-items: center; gap: 9px; background: #16a765; color: white; padding: 13px 18px 13px 13px; border-radius: 999px; font-weight: 900; box-shadow: 0 18px 42px rgba(0,0,0,.2); transition: transform .2s ease; }
.whatsapp-float:hover { transform: translateY(-3px) scale(1.01); }
.whatsapp-float svg { width: 30px; height: 30px; fill: currentColor; }

.rules-modal { width: min(92vw, 760px); padding: 0; border: 0; border-radius: 24px; overflow: visible; background: transparent; }
.rules-modal::backdrop { background: rgba(6,24,46,.72); backdrop-filter: blur(5px); }
.modal-image-wrap { border-radius: 22px; overflow: hidden; box-shadow: 0 30px 90px rgba(0,0,0,.32); }
.modal-image-wrap img { width: 100%; }
.modal-close { position: absolute; right: -10px; top: -13px; width: 42px; height: 42px; border: 0; border-radius: 50%; background: white; color: var(--navy); font-size: 28px; line-height: 1; cursor: pointer; box-shadow: 0 8px 24px rgba(0,0,0,.18); }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal-delay, .reveal-delay-1 { transition-delay: .08s; }
.reveal-delay-2 { transition-delay: .16s; }
.reveal-delay-3 { transition-delay: .24s; }
.reveal-delay-4 { transition-delay: .32s; }

@media (max-width: 980px) {
  .section-pad { padding: 82px 0; }
  .menu-toggle { display: block; }
  .main-nav { position: absolute; top: 82px; left: 20px; right: 20px; display: none; flex-direction: column; align-items: stretch; gap: 4px; padding: 18px; border-radius: 18px; background: white; box-shadow: var(--shadow); }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 10px 12px; }
  .hero-grid, .benefits-grid, .anniversary-grid, .final-cta-card { grid-template-columns: 1fr; }
  .hero-grid { gap: 46px; }
  .hero-media { min-height: auto; }
  .hero-card-main { height: 590px; }
  .badge-top { right: 0; }
  .badge-bottom { left: 0; }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .trust-grid > div:nth-child(2) { border-right: 0; }
  .trust-grid > div:nth-child(-n+2) { border-bottom: 1px solid rgba(255,255,255,.12); }
  .program-grid { grid-template-columns: 1fr; }
  .program-card { display: grid; grid-template-columns: .9fr 1.1fr; }
  .program-image { height: 100%; min-height: 390px; }
  .benefits-grid, .anniversary-grid { gap: 50px; }
  .final-cta-card { padding: 48px; gap: 30px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .container { width: min(calc(100% - 28px), var(--container)); }
  .section-pad { padding: 66px 0; }
  .brand { width: 130px; height: 62px; }
  .nav-wrap { min-height: 74px; }
  .main-nav { top: 74px; }
  .hero { padding-top: 54px; }
  .hero h1 { font-size: clamp(2.8rem, 15vw, 4.3rem); }
  .hero-lead { margin-top: 22px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .btn { width: 100%; }
  .hero-points { display: grid; }
  .hero-card-main { height: 500px; border-radius: 30px 30px 90px 30px; border-width: 7px; }
  .floating-badge { font-size: .75rem; }
  .badge-top { top: 18px; }
  .badge-bottom { bottom: 18px; }
  .hero-orb-1 { width: 300px; height: 300px; right: -160px; top: 46%; }
  .trust-grid { grid-template-columns: 1fr; }
  .trust-grid > div { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.12); min-height: 100px; padding: 20px; }
  .trust-grid > div:last-child { border-bottom: 0; }
  .program-card { display: block; }
  .program-image { min-height: 0; height: 330px; }
  .program-body { padding: 24px; }
  .benefit-item { grid-template-columns: 52px 1fr; padding: 20px; }
  .benefit-item .icon { width: 50px; height: 50px; }
  .anniversary-grid { gap: 38px; }
  .final-cta { padding-top: 40px; }
  .final-cta-card { padding: 38px 26px; border-radius: 26px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-brand { grid-column: auto; }
  .footer-bottom { flex-direction: column; }
  .whatsapp-float { right: 14px; bottom: 14px; width: 58px; height: 58px; padding: 13px; justify-content: center; }
  .whatsapp-float span { display: none; }
  .whatsapp-float svg { width: 32px; height: 32px; }
}

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


/* Integraciones SEO/localización: usan la misma identidad visual del diseño existente. */
.location { background: #fff; }
.location-grid { display: grid; grid-template-columns: .86fr 1.14fr; gap: 70px; align-items: center; }
.location-copy h2 { margin: 0; color: var(--navy); font-size: clamp(2.2rem, 4vw, 3.8rem); line-height: 1.02; letter-spacing: -.04em; }
.location-copy > p { color: var(--muted); font-size: 1.08rem; margin: 22px 0 20px; }
.location-address { margin: 0 0 28px; padding: 20px 22px; border-left: 4px solid var(--teal); border-radius: 0 var(--radius-md) var(--radius-md) 0; background: var(--teal-soft); color: #4e5c6d; font-style: normal; }
.location-address strong { color: var(--navy); }
.location-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.map-card { min-height: 470px; overflow: hidden; border: 8px solid #fff; border-radius: var(--radius-xl); box-shadow: var(--shadow); background: var(--teal-soft); }
.map-card iframe { width: 100%; height: 470px; display: block; border: 0; }

.seo-faq { background: var(--surface); }
.faq-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.faq-item { padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius-md); background: #fff; box-shadow: 0 12px 32px rgba(8,35,68,.05); }
.faq-item summary { cursor: pointer; color: var(--navy); font-weight: 800; line-height: 1.35; }
.faq-item summary::marker { color: var(--orange); }
.faq-item p { margin: 14px 0 0; color: var(--muted); }

@media (max-width: 980px) {
  .location-grid { grid-template-columns: 1fr; gap: 44px; }
  .faq-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .location-actions { flex-direction: column; }
  .map-card, .map-card iframe { min-height: 380px; height: 380px; }
}

/* Ajuste puntual: sección de aniversario/rifa. Solo controla su adaptación y proporciones. */
.anniversary.section-pad {
  padding: 28px 0 40px;
}

.anniversary .anniversary-grid {
  width: min(calc(100% - 40px), 940px);
  grid-template-columns: minmax(280px, 365px) minmax(0, 1fr);
  gap: clamp(30px, 4.8vw, 46px);
  align-items: center;
}

/* Mantiene la pieza de la rifa siempre cuadrada y sin deformación. */
.anniversary .anniversary-media {
  width: 100%;
  max-width: 365px;
  justify-self: start;
}
.anniversary .anniversary-media img {
  display: block;
  width: 100%;
  height: auto !important;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  object-position: center;
  border-radius: 24px;
  box-shadow: 0 18px 48px rgba(8, 35, 68, .09);
}

.anniversary .anniversary-copy {
  min-width: 0;
}
.anniversary .anniversary-copy .eyebrow {
  margin-bottom: 10px;
  font-size: .61rem;
  letter-spacing: .12em;
}
.anniversary .anniversary-copy h2 {
  max-width: 460px;
  font-size: clamp(2rem, 4.1vw, 2.55rem);
  line-height: 1.01;
  letter-spacing: -.045em;
}
.anniversary .anniversary-lead {
  margin: 12px 0 0;
  max-width: 460px;
  font-size: .79rem;
  line-height: 1.55;
}
.anniversary .rules {
  margin: 18px 0 16px;
  gap: 8px;
}
.anniversary .rules > div {
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}
.anniversary .rules span {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  font-size: .72rem;
  box-shadow: 0 8px 18px rgba(8,35,68,.07);
}
.anniversary .rules p {
  margin: 2px 0 0;
  font-size: .70rem;
  line-height: 1.5;
}
.anniversary .btn-secondary {
  min-height: 38px;
  padding: 0 16px;
  font-size: .69rem;
}

@media (max-width: 980px) and (min-width: 721px) {
  .anniversary .anniversary-grid {
    width: min(calc(100% - 40px), 880px);
    grid-template-columns: minmax(250px, 335px) minmax(0, 1fr);
    gap: clamp(26px, 4vw, 40px);
  }
  .anniversary .anniversary-media {
    max-width: 335px;
  }
  .anniversary .anniversary-copy h2 {
    font-size: clamp(1.9rem, 4vw, 2.35rem);
  }
}

@media (max-width: 720px) {
  .anniversary.section-pad {
    padding: 48px 0;
  }
  .anniversary .anniversary-grid {
    width: min(calc(100% - 28px), 560px);
    grid-template-columns: 1fr;
    gap: 26px;
  }
  .anniversary .anniversary-media {
    width: min(100%, 360px);
    max-width: 360px;
    margin-inline: auto;
    justify-self: center;
  }
  .anniversary .anniversary-copy {
    width: min(100%, 520px);
    margin-inline: auto;
  }
  .anniversary .anniversary-copy h2 {
    max-width: 520px;
    font-size: clamp(2rem, 9vw, 2.7rem);
  }
  .anniversary .anniversary-lead {
    max-width: 520px;
    font-size: .9rem;
  }
  .anniversary .rules {
    margin: 17px 0 16px;
    gap: 9px;
  }
  .anniversary .rules > div {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 11px;
  }
  .anniversary .rules span {
    width: 34px;
    height: 34px;
    font-size: .78rem;
  }
  .anniversary .rules p {
    font-size: .82rem;
  }
  .anniversary .btn-secondary {
    width: auto;
    min-height: 42px;
    padding: 0 18px;
    font-size: .76rem;
  }
}

@media (max-width: 420px) {
  .anniversary.section-pad {
    padding: 42px 0;
  }
  .anniversary .anniversary-grid {
    gap: 22px;
  }
  .anniversary .anniversary-media {
    width: min(100%, 310px);
  }
  .anniversary .anniversary-copy h2 {
    font-size: clamp(1.85rem, 10vw, 2.35rem);
  }
  .anniversary .anniversary-lead {
    font-size: .86rem;
  }
  .anniversary .rules p {
    font-size: .79rem;
  }
}

/* Ajuste puntual del modal de bases: imagen completa y adaptable en cualquier dispositivo. */
.rules-modal {
  width: min(94vw, 760px);
  max-width: 760px;
  max-height: calc(100dvh - 24px);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 24px;
  overflow: visible;
  background: transparent;
}
.rules-modal::backdrop {
  background: rgba(6,24,46,.78);
  backdrop-filter: blur(5px);
}
.rules-modal .modal-image-wrap {
  width: 100%;
  max-height: calc(100dvh - 24px);
  display: grid;
  place-items: center;
  border-radius: 22px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 30px 90px rgba(0,0,0,.32);
}
.rules-modal .modal-image-wrap img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100dvh - 24px);
  object-fit: contain;
  object-position: center;
}
.rules-modal .modal-close {
  position: absolute;
  z-index: 2;
  right: 10px;
  top: 10px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.96);
  color: var(--navy);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
}
@media (max-width: 640px) {
  .rules-modal {
    width: calc(100vw - 16px);
    max-width: none;
    max-height: calc(100dvh - 16px);
    border-radius: 18px;
  }
  .rules-modal .modal-image-wrap {
    max-height: calc(100dvh - 16px);
    border-radius: 18px;
  }
  .rules-modal .modal-image-wrap img {
    max-height: calc(100dvh - 16px);
  }
  .rules-modal .modal-close {
    right: 8px;
    top: 8px;
    width: 40px;
    height: 40px;
  }
}
@media (max-height: 520px) {
  .rules-modal {
    width: min(94vw, 760px);
    max-height: calc(100dvh - 12px);
  }
  .rules-modal .modal-image-wrap,
  .rules-modal .modal-image-wrap img {
    max-height: calc(100dvh - 12px);
  }
}

