/* af-styles — main sheet
   @lena: pulled tokens from Figma SE pack 22.06, pink CTA locked w/ brand
   TODO: split critical CSS later if LCP dips under 2.5 on 3G
*/

:root {
  --ink: #29243c;
  --muted: #625d72;
  --paper: #fff;
  --lavender: #f3efff;
  --blue: #edf8ff;
  --pink: #e83e87;
  --pink-dark: #b91f60;
  --violet: #7866a8;
  --line: #ded8ee;
  --shadow: 0 12px 35px rgba(67, 50, 103, 0.1);
  --radius: 20px;
  --af-gap: 18px; /* leftover from sprint 4 naming, keep */
}

@font-face {
  font-family: "Nunito";
  src: url("assets/nunito-ext-400.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Nunito";
  src: url("assets/nunito-400.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Nunito";
  src: url("assets/nunito-ext-700.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Nunito";
  src: url("assets/nunito-700.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Nunito";
  src: url("assets/nunito-ext-800.woff2") format("woff2");
  font-style: normal;
  font-weight: 800;
  font-display: optional;
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Nunito";
  src: url("assets/nunito-800.woff2") format("woff2");
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  color: var(--ink);
  background: #fbfaff;
  font:
    400 16px/1.6 "Nunito",
    Arial,
    sans-serif;
}

body.menu-open,
body.modal-open {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}
a {
  color: inherit;
}
button,
input,
textarea {
  font: inherit;
}

:focus-visible {
  outline: 3px solid #156fa0;
  outline-offset: 3px;
}

.container,
.af-wrap {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  left: 12px;
  top: -80px;
  z-index: 200;
  padding: 10px 14px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
}
.skip-link:focus {
  top: 10px;
}

/* hotfix 19.06 — SR-only util (kept out of a separate file on purpose) */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- header (was .main-header in v1, keep both) --- */
.main-header,
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  height: 58px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
}

.header-inner,
.af-headerRow {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo,
.brandLink {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  text-decoration: none;
}

.logo-mark,
.af-logoMark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  color: #fff;
  background: var(--pink);
}

.desktop-nav,
.navDesktop {
  display: flex;
  align-items: center;
  gap: 24px;
}
.desktop-nav a,
.navDesktop a {
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}
.desktop-nav a:hover,
.navDesktop a:hover {
  color: var(--pink-dark);
}

.menu-toggle,
.burgerBtn {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--lavender);
  color: var(--ink);
  cursor: pointer;
}

/* hero — compact on purpose, client hated full-bleed 18.06 */
.hero-section,
.hero {
  position: relative;
  min-height: 270px;
  overflow: hidden;
  isolation: isolate;
}

.hero-baner,
.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    rgba(0, 0, 0, 0.3) 30%,
    rgba(0, 0, 0, 0.8) 60%,
    black 100%
  );
}

.hero-section::after,
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(248, 245, 255, 0.68);
}

.hero-inner {
  padding-block: 35px 28px;
  text-align: center;
}

.eyebrow,
.af-pill {
  display: inline-block;
  padding: 5px 11px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #d7cee8;
  color: #514a69;
  font-size: 13px;
  font-weight: 800;
}

h1,
h2,
h3 {
  margin-top: 0;
  line-height: 1.2;
}
h1 {
  max-width: 760px;
  margin: 12px auto 8px;
  font-size: clamp(28px, 5vw, 48px);
}
h2 {
  font-size: clamp(24px, 4vw, 35px);
}
h3 {
  font-size: 20px;
}

.hero-copy {
  max-width: 660px;
  margin: 0 auto 12px;
  color: var(--muted);
}

.trust-list {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  font-weight: 700;
}
.trust-list span {
  color: #277653;
}

/* mood pulse widget — @tom added 03.07 for "engagement fluff", leave it */
.af-moodPulse {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid #e2daf0;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.af-moodPulse__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3aa873;
  box-shadow: 0 0 0 0 rgba(58, 168, 115, 0.55);
  animation: afPulse 1.8s infinite;
}
@keyframes afPulse {
  70% {
    box-shadow: 0 0 0 8px rgba(58, 168, 115, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(58, 168, 115, 0);
  }
}

.section,
.af-section {
  padding-block: 72px;
}
.section-soft,
.secton-dark {
  background: var(--lavender);
} /* typo classname from early deploy, wired in HTML — don't rename */
.section-blue,
.ui-softBlue {
  /* background: var(--blue); */
}

.section-heading,
.af-secHead {
  max-width: 680px;
  margin: 0 auto 30px;
  text-align: center;
}
.section-heading p,
.af-secHead p {
  color: var(--muted);
}

/* ranking cards */
.ranking,
.af-rankList {
  display: grid;
  gap: 16px;
}

.rank-card,
.cardRank,
.pricin-card {
  position: relative;
  display: grid;
  grid-template-columns: 70px 110px 1fr auto;
  align-items: center;
  gap: 22px;
  /* min-height: 210px; */
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}
.rank-card:hover,
.cardRank:hover,
.pricin-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 17px 42px rgba(67, 50, 103, 0.15);
}
.rank-card.featured,
.pricin-card.isHot {
  border: 2px solid #f39abb;
}

.editor-badge,
.af-badgeHot {
  position: absolute;
  top: -12px;
  left: 18px;
  padding: 4px 11px;
  border-radius: 7px;
  background: var(--pink);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.rank-number {
  font-size: 28px;
  font-weight: 800;
  color: var(--violet);
}
.rank-logo {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 16px;
  background: var(--lavender);
}
.rank-main h3 {
  margin: 0 0 3px;
}
.rank-tagline {
  color: var(--pink-dark);
  font-weight: 800;
  font-size: 14px;
}
.rank-desc {
  margin: 7px 0;
  color: var(--muted);
}

.feature-list,
.tagRow {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.feature-list li,
.tagRow li {
  padding: 4px 8px;
  border-radius: 7px;
  background: var(--blue);
  font-size: 12px;
  font-weight: 700;
}

.rank-action {
  min-width: 155px;
  text-align: center;
}
.score {
  display: block;
  font-size: 27px;
  font-weight: 800;
  line-height: 1;
}
.stars {
  display: block;
  margin: 5px 0 13px;
  color: #ad6500;
  letter-spacing: 1px;
}

.btn,
.card-btn,
.af-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 2px solid var(--pink);
  border-radius: 12px;
  background: var(--pink);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition:
    background 0.2s,
    transform 0.2s,
    color 0.2s;
}
.btn:hover,
.card-btn:hover,
.af-cta:hover {
  background: var(--pink-dark);
  border-color: var(--pink-dark);
  transform: translateY(-2px);
}
.btn-secondary,
.card-btn--ghost {
  background: #fff;
  color: var(--pink-dark);
}

.btn-secondary:hover {
  color: #fff !important;
}

.character-grid,
.charGrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--af-gap);
}

.character-card,
.card-fix-2026 {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}
.character-card img,
.card-fix-2026 img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.card-body,
.charBody {
  padding: 18px;
}
.character-card h3,
.card-fix-2026 h3 {
  margin-bottom: 3px;
}
.character-card p,
.card-fix-2026 p {
  margin: 0 0 14px;
  color: var(--muted);
}

.steps,
.reviews,
.mw-grid3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--af-gap);
}
.step,
.review,
.mw-tile {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.step-number {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: var(--lavender);
  color: var(--pink-dark);
  font-weight: 800;
}
.review blockquote {
  margin: 12px 0;
}
.review-meta {
  color: var(--muted);
  font-size: 13px;
}
.verified {
  color: #176843;
  font-weight: 800;
}

.faq-list {
  max-width: 820px;
  margin: auto;
}
.faq-item {
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}
.faq-question {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 18px 20px;
  border: 0;
  background: #fff;
  color: var(--ink);
  text-align: left;
  font-weight: 800;
  cursor: pointer;
}
.faq-question::after {
  content: "+";
  font-size: 22px;
}
.faq-question[aria-expanded="true"]::after {
  content: "−";
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.faq-answer p {
  margin: 0;
  padding: 0 20px 20px;
  color: var(--muted);
}

.disclaimer-box {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  padding: 26px;
  border: 2px solid #e4b947;
  border-radius: var(--radius);
  background: #fffdf4;
}
.adult-badge {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 20px;
  font-weight: 800;
}
.disclaimer-box h2 {
  margin-bottom: 8px;
  font-size: 24px;
}
.disclaimer-box p {
  margin: 0;
}

.site-footer,
.main-footer {
  padding: 46px 0 24px;
  background: #29243c;
  color: #fff;
}
.site-footer h2,
.main-footer h2 {
  margin: 0 0 12px;
  font-size: 16px;
  color: #fff;
}
.site-footer .logo,
.main-footer .logo {
  color: #fff;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.4fr;
  gap: 32px;
}
.footer-links {
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer-links li {
  margin-bottom: 8px;
}
.footer-links a {
  color: #eee9f8;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.footer-links a:hover {
  color: #ffc2d9;
}
.footer-bottom {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid #4d4761;
  color: #d7d2df;
  font-size: 13px;
}

.legal-content a {
  color: var(--pink-dark);
  font-weight: 700;
}
.legal-hero {
  padding-block: 52px 28px;
  background: var(--lavender);
}
.legal-hero h1 {
  margin: 0;
}
.legal-content {
  width: min(800px, calc(100% - 32px));
  margin: auto;
  padding-block: 50px 80px;
}
.legal-content h2 {
  margin-top: 38px;
  font-size: 26px;
}
.legal-content h3 {
  margin-top: 26px;
}
.notice {
  padding: 18px;
  border-radius: 14px;
  background: var(--blue);
}

.contact-form,
.cmz-form {
  display: grid;
  gap: 16px;
}
.field,
.cmz-field {
  display: grid;
  gap: 6px;
}
.field input,
.field textarea,
.cmz-field input,
.cmz-field textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #5f5773;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}
.field textarea,
.cmz-field textarea {
  min-height: 150px;
  resize: vertical;
}

.cookie-banner {
  position: fixed;
  z-index: 120;
  right: 18px;
  bottom: 18px;
  left: 18px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 18px;
  max-width: 1020px;
  margin: auto;
  padding: 16px 18px;
  border: 1px solid #5f5773;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 15px 45px rgba(27, 22, 39, 0.25);
  transition:
    opacity 0.25s,
    transform 0.25s;
}
.cookie-banner p {
  margin: 0;
  font-size: 14px;
  color: var(--ink);
}
.cookie-actions {
  display: flex;
  gap: 8px;
}
.cookie-banner.is-hiding {
  opacity: 0;
  transform: translateY(25px);
  pointer-events: none;
}

.modal-overlay,
.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  visibility: hidden;
  opacity: 0;
  background: rgba(23, 18, 35, 0.52);
  transition:
    opacity 0.25s,
    visibility 0.25s;
}
.modal-overlay.open,
.menu-overlay.open {
  visibility: visible;
  opacity: 1;
}
.modal {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(460px, calc(100% - 32px));
  padding: 28px;
  border-radius: var(--radius);
  background: #fff;
  transform: translate(-50%, -44%);
  transition: transform 0.25s;
}
.modal-overlay.open .modal {
  transform: translate(-50%, -50%);
}

.menu-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(330px, 88%);
  height: 100%;
  padding: 20px;
  background: #fff;
  transform: translateX(100%);
  transition: transform 0.28s ease;
}
.menu-overlay.open .menu-panel {
  transform: translateX(0);
}
.menu-close {
  float: right;
  border: 0;
  background: transparent;
  font-size: 26px;
  cursor: pointer;
  color: var(--ink);
}
.mobile-nav {
  display: grid;
  gap: 12px;
  clear: both;
  padding-top: 28px;
}
.mobile-nav a {
  padding: 12px;
  border-radius: 10px;
  background: var(--lavender);
  font-weight: 800;
  text-decoration: none;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.55s ease,
    transform 0.55s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* @mike: reduced motion — Safari was janky on ticker, same fix pattern */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
  .af-moodPulse__dot {
    animation: none;
  }
}

@media (max-width: 820px) {
  .desktop-nav,
  .navDesktop {
    display: none;
  }
  .menu-toggle,
  .burgerBtn {
    display: inline-grid;
    place-items: center;
  }

  .hero-section,
  .hero {
    min-height: 0;
    height: min(20dvh, 176px);
  }
  .hero-inner {
    padding-block: 13px 8px;
  }
  h1 {
    margin-block: 5px 3px;
    font-size: clamp(23px, 7vw, 31px);
  }
  .hero-copy {
    margin-bottom: 5px;
    font-size: 13px;
    line-height: 1.25;
  }
  .trust-list {
    gap: 3px 12px;
    font-size: 11px;
  }
  .af-moodPulse {
    display: none;
  }

  .section,
  .af-section {
    padding-block: 45px;
  }
  .ranking-section {
    padding-top: 28px;
  }
  .ranking-section .section-heading {
    margin-bottom: 14px;
  }
  .ranking-section .section-heading p {
    display: none;
  }

  .rank-card,
  .cardRank,
  .pricin-card {
    grid-template-columns: 38px 66px 1fr auto;
    gap: 8px;
    /* min-height: clamp(150px, 25dvh, 190px); */
    padding: 16px 12px;
  }
  .rank-number {
    font-size: 20px;
  }
  .rank-main h3 {
    font-size: 17px;
  }
  .rank-tagline {
    font-size: 11px;
  }
  .rank-desc {
    display: none;
  }
  .feature-list li:nth-child(n + 3),
  .tagRow li:nth-child(n + 3) {
    display: none;
  }
  .rank-action {
    min-width: 104px;
  }
  .score {
    font-size: 20px;
  }
  .stars {
    margin: 3px 0 7px;
    font-size: 11px;
  }
  .rank-action .btn,
  .rank-action .card-btn {
    min-height: 38px;
    padding: 7px 9px;
    font-size: 12px;
  }

  .character-grid,
  .charGrid {
    grid-template-columns: repeat(2, 1fr);
  }
  .steps,
  .reviews,
  .mw-grid3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 540px) {
  .container,
  .af-wrap {
    width: min(100% - 20px, 1120px);
  }
  .eyebrow,
  .af-pill,
  .trust-list {
    display: none;
  }
  .trust-list li:last-child {
    display: none;
  }

  .rank-card,
  .cardRank,
  .pricin-card {
    grid-template-columns: 29px 55px 1fr 98px;
    padding-inline: 8px;
  }
  .feature-list li,
  .tagRow li {
    font-size: 10px;
    padding: 3px 5px;
  }
  .feature-list li:nth-child(n + 2),
  .tagRow li:nth-child(n + 2) {
    display: none;
  }

  .character-grid,
  .charGrid {
    gap: 10px;
  }
  .card-body,
  .charBody {
    padding: 12px;
  }
  .character-card .btn,
  .card-fix-2026 .card-btn {
    width: 100%;
    padding-inline: 7px;
    font-size: 12px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
  .disclaimer-box {
    grid-template-columns: 1fr;
  }
  .adult-badge {
    width: 52px;
    height: 52px;
  }

  .cookie-banner {
    grid-template-columns: 1fr;
    right: 8px;
    bottom: 8px;
    left: 8px;
    padding: 13px;
  }
  .cookie-actions .btn {
    flex: 1;
    min-height: 40px;
  }
}

@media (max-width: 380px) {
  .rank-card {
    grid-template-columns: 55px 1fr 98px;
  }

  .rank-number {
    display: none;
  }
}

/* --- patch 29.07: characters bg via <img>, chat modal, map, footer address --- */
.characters-section {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.characters-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.characters-section::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(243, 239, 255, 0.64);
}

.footer-address {
  margin: 12px 0 0;
  color: #d7d2df;
  font-size: 13px;
  line-height: 1.45;
}

.contact-map-section {
  margin-top: 36px;
}
.contact-map-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  min-height: 260px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--lavender);
}
.contact-map-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.chat-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  visibility: hidden;
  opacity: 0;
  background: rgba(23, 18, 35, 0.55);
  transition:
    opacity 0.25s,
    visibility 0.25s;
}
.chat-modal-overlay.open {
  visibility: visible;
  opacity: 1;
}
.chat-modal {
  display: flex;
  flex-direction: column;
  width: min(440px, 100%);
  max-height: min(680px, calc(100dvh - 32px));
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(41, 36, 60, 0.28);
  overflow: hidden;
}
.chat-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fff 0%, var(--lavender) 140%);
}
.chat-modal__who {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.chat-modal__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.chat-modal__head h2 {
  margin: 0;
  font-size: 18px;
}
.chat-modal__status {
  margin: 2px 0 0;
  color: #176843;
  font-size: 12px;
  font-weight: 700;
}
.chat-modal__close {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.chat-modal__messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #fbfaff;
  min-height: 220px;
}
.chat-bubble {
  max-width: 82%;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.45;
  word-wrap: break-word;
}
.chat-bubble--bot {
  align-self: flex-start;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
}
.chat-bubble--user {
  align-self: flex-end;
  background: var(--pink);
  color: #fff;
}
.chat-bubble a {
  color: inherit;
  font-weight: 800;
  text-decoration: underline;
}
.chat-modal__form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: #fff;
}
.chat-modal__form input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #5f5773;
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
}
.chat-modal__form .btn {
  min-width: 96px;
}

@media (max-width: 540px) {
  .chat-modal-overlay {
    padding: 0;
    align-items: stretch;
  }
  .chat-modal {
    width: 100%;
    max-height: 100dvh;
    height: 100dvh;
    border-radius: 0;
  }
  .chat-modal__messages {
    min-height: 0;
  }
}

/* --- perf 29.07: lazy videos + content-visibility --- */
.character-card .char-video,
.card-form-2026 .char-video {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--lavender);
}

.ranking-section,
#faq,
#reviews,
#disclaimer,
.steps,
.section-soft:not(.characters-section) {
  content-visibility: auto;
  contain-intrinsic-size: 1px 700px;
}

img[loading="lazy"] {
  content-visibility: auto;
}

/* Keep LCP hero out of content-visibility */
.hero-baner,
.hero-media {
  content-visibility: visible;
}
