/*
 * SEO content is a document section, not part of the simulated phone.
 * The seo-* visual classes stay separate from the game's own style system.
 */
#seo-content {
  --seo-ink: #202235;
  --seo-muted: #686b7f;
  --seo-soft: #f6f4f8;
  --seo-line: #e7e3ec;
  --seo-accent: #9a4f73;
  --seo-accent-deep: #68304e;
  --seo-cyan: #2b7e91;
  width: min(1080px, calc(100% - 32px));
  margin: clamp(42px, 8vw, 96px) auto 0;
  color: var(--seo-ink);
  background: #fff;
  border: 1px solid rgba(231, 227, 236, 0.95);
  border-radius: 36px 36px 0 0;
  box-shadow: 0 -18px 70px rgba(7, 9, 20, 0.18);
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Noto Sans Thai', 'Segoe UI', system-ui, sans-serif;
  line-height: 1.85;
  letter-spacing: 0;
  isolation: isolate;
}

#seo-content,
#seo-content * {
  -webkit-user-select: text;
  user-select: text;
}

#seo-content a {
  color: var(--seo-accent-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

#seo-content a:hover {
  color: var(--seo-cyan);
}

#seo-content :focus-visible {
  outline: 3px solid rgba(43, 126, 145, 0.42);
  outline-offset: 4px;
}

.seo-hero {
  position: relative;
  padding: clamp(42px, 7vw, 86px) clamp(24px, 8vw, 92px) 34px;
  color: #fff;
  background:
    radial-gradient(circle at 86% 12%, rgba(218, 149, 177, 0.32), transparent 31%),
    radial-gradient(circle at 8% 92%, rgba(83, 170, 185, 0.27), transparent 34%),
    linear-gradient(136deg, #171a31 0%, #302844 56%, #51334d 100%);
  overflow: hidden;
}

.seo-hero::after {
  content: '';
  position: absolute;
  right: 7%;
  bottom: -96px;
  width: 220px;
  height: 220px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  box-shadow: 0 0 0 28px rgba(255, 255, 255, 0.035), 0 0 0 56px rgba(255, 255, 255, 0.025);
  pointer-events: none;
}

.seo-eyebrow,
.seo-section-index {
  margin: 0;
  color: #c9a9ba;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.15em;
  line-height: 1.4;
  text-transform: uppercase;
}

.seo-hero h1 {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin: 18px 0 18px;
  color: #fff;
  font-size: clamp(2rem, 4.9vw, 4.25rem);
  font-weight: 760;
  letter-spacing: -0.04em;
  line-height: 1.12;
}

.seo-lead {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1rem, 1.55vw, 1.18rem);
  line-height: 1.9;
}

.seo-hero-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.seo-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.94rem;
  font-weight: 750;
  line-height: 1.2;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.seo-button:hover {
  transform: translateY(-2px);
}

.seo-button-primary {
  color: #3a2030 !important;
  background: #ffd4df;
}

.seo-button-primary:hover {
  background: #ffe5ec;
}

.seo-button-secondary {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.34);
}

.seo-button-secondary:hover {
  background: rgba(255, 255, 255, 0.18);
}

.seo-nav {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 42px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.17);
}

#seo-content .seo-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  color: #fff;
  font-size: 0.86rem;
  text-decoration: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
  background: rgba(255, 255, 255, 0.1);
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}

#seo-content .seo-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.55);
}

.seo-article {
  padding: 0 clamp(20px, 8vw, 92px);
}

.seo-section {
  padding: clamp(42px, 7vw, 78px) 0;
  border-bottom: 1px solid var(--seo-line);
}

.seo-section h2[id] {
  scroll-margin-top: 24px;
}

.seo-section:last-child {
  border-bottom: 0;
}

.seo-section h2 {
  max-width: 820px;
  margin: 12px 0 20px;
  color: var(--seo-ink);
  font-size: clamp(1.55rem, 3.2vw, 2.35rem);
  font-weight: 760;
  letter-spacing: -0.025em;
  line-height: 1.28;
}

.seo-section h3 {
  margin: 32px 0 8px;
  color: var(--seo-accent-deep);
  font-size: clamp(1.06rem, 2vw, 1.35rem);
  font-weight: 730;
  line-height: 1.4;
}

.seo-section h4 {
  margin: 26px 0 7px;
  color: var(--seo-cyan);
  font-size: 1rem;
  font-weight: 750;
}

.seo-section p {
  max-width: 850px;
  margin: 0 0 16px;
  color: var(--seo-muted);
  font-size: 1rem;
}

.seo-section p:last-child {
  margin-bottom: 0;
}

.seo-disclaimer {
  padding: 18px 20px;
  color: #57424e !important;
  background: #fbf1f5;
  border-left: 4px solid #c67b9d;
  border-radius: 0 14px 14px 0;
}

.seo-help-list,
.seo-disclosure-copy ol {
  max-width: 850px;
  margin: 12px 0 0;
  padding-left: 1.4rem;
  color: var(--seo-muted);
}

.seo-help-list li,
.seo-disclosure-copy li {
  margin: 8px 0;
  padding-left: 5px;
}

.seo-disclosure {
  max-width: 850px;
  margin: 12px 0 20px;
  border: 1px solid var(--seo-line);
  border-radius: 16px;
  background: var(--seo-soft);
}

.seo-disclosure summary {
  padding: 16px 19px;
  color: var(--seo-ink);
  cursor: pointer;
  font-weight: 700;
  list-style-position: inside;
}

.seo-disclosure summary::marker {
  color: var(--seo-accent);
}

.seo-disclosure-copy {
  padding: 0 19px 17px;
}

.seo-disclosure-copy p {
  font-size: 0.96rem;
}

.seo-price-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 26px 0 30px;
}

.seo-price-card {
  display: flex;
  min-height: 220px;
  flex-direction: column;
  padding: 22px;
  border: 1px solid var(--seo-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(35, 29, 48, 0.06);
}

.seo-price-card h3 {
  margin: 0 0 10px;
  color: var(--seo-ink);
  font-size: 1.14rem;
}

.seo-price-card p {
  font-size: 0.93rem;
}

.seo-purchase-note {
  margin-top: 22px !important;
  padding: 14px 16px;
  border: 1px solid rgba(154, 79, 115, 0.28);
  border-radius: 14px;
  color: #51243b !important;
  background: #fff3f7;
}

.seo-purchase-note strong {
  color: var(--seo-accent-deep);
}

.seo-price-card.is-featured {
  border-color: #c889a6;
  background: linear-gradient(160deg, #fff6f9, #f8f4fc);
  box-shadow: 0 12px 30px rgba(154, 79, 115, 0.14);
}

.seo-price-label {
  margin-bottom: 7px !important;
  color: var(--seo-accent) !important;
  font-size: 0.7rem !important;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.seo-price-cta {
  margin-top: 26px !important;
  padding: 17px 20px;
  color: #5e304a !important;
  background: #fff1f5;
  border-radius: 14px;
  font-weight: 700;
}

.seo-faq-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.seo-faq-item {
  padding: 18px 20px;
  border: 1px solid var(--seo-line);
  border-radius: 16px;
  background: var(--seo-soft);
}

.seo-faq-item h3 {
  margin: 0 0 8px;
  color: var(--seo-ink);
  font-size: 1rem;
}

.seo-faq-item p {
  font-size: 0.92rem;
}

.seo-about {
  padding-bottom: 52px;
}

.seo-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 20px clamp(20px, 8vw, 92px) 30px;
  color: #777589;
  background: #f7f5f9;
  font-size: 0.82rem;
}

.seo-footer a {
  font-weight: 750;
}

/* The original phone is a viewport canvas. Once SEO content follows it,
   return the document itself to normal flow while keeping #screen contained. */
html {
  height: auto;
  min-height: 100%;
}

html,
body {
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: auto;
}

body {
  position: relative;
  display: block;
  min-height: 100%;
  height: auto;
}

#phone {
  margin: clamp(24px, 6vh, 72px) auto 0;
}

#phone.mob {
  position: relative;
  inset: auto;
  margin: 0;
  width: 100vw !important;
  height: var(--phone-height, 100dvh) !important;
}

#external-controls {
  position: absolute;
  top: 50dvh;
}

@media (max-width: 760px) {
  #seo-content {
    width: 100%;
    margin-top: 0;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .seo-price-list,
  .seo-faq-list {
    grid-template-columns: 1fr;
  }

  .seo-price-card {
    min-height: 0;
  }
}

@media (max-width: 520px) {
  .seo-hero {
    padding-top: 38px;
  }

  .seo-hero h1 {
    font-size: clamp(1.8rem, 9vw, 2.7rem);
  }

  .seo-hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .seo-button {
    width: 100%;
  }

  .seo-nav {
    gap: 8px 14px;
  }

  #seo-content .seo-nav a {
    font-size: 0.8rem;
  }

  .seo-section {
    padding: 38px 0;
  }

  .seo-section p,
  .seo-help-list,
  .seo-disclosure-copy ol {
    font-size: 0.96rem;
  }

  .seo-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .seo-button {
    transition: none;
  }
}

/* --- เฉลยแบบ opt-in (รหัสล็อกหน้าจอ) --- */
.seo-spoiler {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(255, 207, 92, 0.35);
  border-radius: 14px;
  background: rgba(255, 207, 92, 0.06);
}
.seo-spoiler-warn {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.7;
  color: #e6dcc4;
}
.seo-spoiler-warn strong {
  color: #ffcf5c;
}
.seo-spoiler-check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 14px;
  color: #ded4bd;
  cursor: pointer;
}
.seo-spoiler-check input {
  width: 18px;
  height: 18px;
  accent-color: #ffcf5c;
  flex: none;
}
.seo-spoiler-button {
  width: 100%;
  padding: 12px 16px;
  border: 0;
  border-radius: 12px;
  background: #ffcf5c;
  color: #241c05;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.seo-spoiler-button:disabled {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.38);
  cursor: not-allowed;
}
.seo-spoiler-answer {
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.06em;
}
