:root {
  --bg: #160f1c;
  --panel: rgba(44, 28, 48, 0.78);
  --panel-solid: #2a1b2f;
  --cream: #fff7ed;
  --muted: #cdbecf;
  --pink: #ff6f91;
  --coral: #ff8a72;
  --lilac: #c9a6ff;
  --line: rgba(255,255,255,.12);
  --danger: #ff9b9b;
  --shadow: 0 24px 80px rgba(0,0,0,.35);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--cream);
  background:
    radial-gradient(circle at 50% -15%, rgba(255,111,145,.16), transparent 38%),
    linear-gradient(160deg, #120c18 0%, #211326 48%, #140e1a 100%);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid rgba(255,138,114,.75);
  outline-offset: 3px;
}

.ambient {
  position: fixed;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .16;
  pointer-events: none;
}
.ambient-one { background: var(--pink); top: -180px; right: -100px; }
.ambient-two { background: var(--lilac); bottom: -220px; left: -160px; }

.topbar {
  width: min(100%, 560px);
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 20px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 5;
}
.brand-button, .icon-button, .ghost-button, .text-button {
  border: 0;
  background: transparent;
  cursor: pointer;
}
.brand-button {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .02em;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pink), var(--coral));
  color: #241222;
}
.icon-button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-weight: 800;
  background: rgba(255,255,255,.04);
}

.app-shell {
  width: min(100%, 560px);
  margin: 0 auto;
  min-height: calc(100vh - 120px);
  padding: 18px 20px 48px;
  display: grid;
  align-items: center;
  position: relative;
  z-index: 2;
}
.screen { display: none; animation: screenIn .38s ease both; }
.screen.active { display: block; }
#welcomeScreen, #completeScreen { text-align: center; }
@keyframes screenIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-badge, .section-kicker {
  color: var(--coral);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
}
h1 {
  margin: 16px 0 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(52px, 16vw, 82px);
  line-height: .88;
  letter-spacing: -.055em;
}
h1 em { color: var(--pink); font-weight: 400; }
h2 {
  margin: 10px 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 9vw, 48px);
  line-height: 1;
  letter-spacing: -.035em;
}
.hero-copy, .section-copy {
  color: var(--muted);
  line-height: 1.6;
  margin: 0 auto;
  max-width: 430px;
}
.hero-copy { font-size: 17px; }

.hero-card-stack {
  height: 205px;
  width: 230px;
  margin: 34px auto 28px;
  position: relative;
}
.mini-card {
  position: absolute;
  inset: 0;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: var(--shadow);
}
.mini-card-back { background: #6c456f; transform: rotate(-9deg) translate(-9px, 5px); opacity: .56; }
.mini-card-middle { background: #ab5579; transform: rotate(7deg) translate(8px, 3px); opacity: .75; }
.mini-card-front {
  background:
    radial-gradient(circle at 90% 5%, rgba(255,255,255,.22), transparent 24%),
    linear-gradient(145deg, #ff7898, #d85d83 68%, #833e71);
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #250f20;
}
.mini-card-front span { text-transform: uppercase; font-size: 10px; letter-spacing: .15em; font-weight: 900; }
.mini-card-front strong { font-family: Georgia, serif; font-size: 28px; line-height: 1; margin: 12px 0; }
.mini-card-front i { font-style: normal; font-size: 20px; }

.primary-button, .secondary-button {
  border: 0;
  border-radius: 999px;
  min-height: 54px;
  padding: 0 22px;
  font-weight: 900;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease;
}
.primary-button {
  color: #2a1423;
  background: linear-gradient(135deg, #ff7697, #ff9b79);
  box-shadow: 0 12px 34px rgba(255,111,145,.2);
}
.primary-button:hover, .secondary-button:hover { transform: translateY(-2px); }
.primary-button:active, .secondary-button:active { transform: translateY(0); }
.primary-button span { margin-left: 8px; }
.secondary-button {
  color: var(--cream);
  background: rgba(255,255,255,.08);
  border: 1px solid var(--line);
}
.wide { width: 100%; }
.text-button {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 4px;
  margin-top: 16px;
  font-size: 13px;
}
.microcopy { color: #9f8da3; font-size: 12px; margin-top: 13px; }

#setupScreen { padding-top: 10px; }
#setupScreen > h2 { margin-top: 9px; }
#setupScreen > .section-copy { margin: 0 0 24px; }

.category-grid {
  border: 0;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.category-option {
  min-height: 92px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255,255,255,.045);
  color: var(--cream);
  padding: 14px;
  text-align: left;
  cursor: pointer;
  position: relative;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.category-option:last-child { grid-column: 1 / -1; min-height: 78px; }
.category-option:hover { transform: translateY(-2px); }
.category-option.selected {
  border-color: rgba(255,126,153,.7);
  background: linear-gradient(145deg, rgba(255,111,145,.17), rgba(255,138,114,.08));
}
.category-option .emoji { display: block; font-size: 21px; margin-bottom: 9px; }
.category-option strong { display: block; font-size: 14px; }
.category-option small { color: var(--muted); display: block; margin-top: 3px; font-size: 11px; }
.category-option .check {
  width: 20px; height: 20px; border-radius: 50%;
  position: absolute; top: 12px; right: 12px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  font-size: 11px;
}
.category-option.selected .check { background: var(--pink); border-color: var(--pink); color: #2a1423; }

.intensity-panel, .player-panel {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.035);
  padding: 16px;
}
.intensity-panel legend { padding: 0 6px; font-weight: 800; font-size: 13px; }
.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  padding: 5px;
  background: rgba(0,0,0,.18);
  border-radius: 14px;
}
.segmented button {
  min-height: 40px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.segmented button.selected { background: rgba(255,255,255,.11); color: var(--cream); }
.intensity-panel p { color: var(--muted); font-size: 11px; line-height: 1.5; margin: 10px 3px 0; }
.player-panel { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.label { display: block; font-weight: 900; font-size: 13px; }
.player-panel small { color: var(--muted); font-size: 10px; }
.stepper { display: flex; align-items: center; gap: 12px; }
.stepper button {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(255,255,255,.06); cursor: pointer;
}
.stepper strong { min-width: 18px; text-align: center; }
.form-error { min-height: 20px; margin: 8px 0 0; color: var(--danger); font-size: 12px; text-align: center; }

.game-toolbar { display: flex; justify-content: space-between; align-items: center; }
.ghost-button { color: var(--muted); padding: 8px 0; font-size: 12px; }
.progress-copy { color: var(--muted); font-size: 12px; font-weight: 800; }
.progress-track {
  height: 4px; margin: 8px 0 18px;
  background: rgba(255,255,255,.08); border-radius: 99px; overflow: hidden;
}
.progress-track span {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--pink), var(--coral));
  transition: width .25s ease;
}
.party-note { text-align: center; color: #9c8b9f; font-size: 11px; margin-bottom: 12px; }

.game-card {
  min-height: 410px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255,255,255,.14);
  background:
    radial-gradient(circle at 82% 8%, rgba(255,255,255,.18), transparent 28%),
    linear-gradient(145deg, #d15b82, #6f3f76 75%);
  padding: 28px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  display: grid;
}
.card-shine {
  position: absolute; width: 230px; height: 230px; border-radius: 50%;
  background: rgba(255,255,255,.08); filter: blur(3px);
  right: -120px; top: -120px;
}
.card-cover, .card-content {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: opacity .35s ease, transform .35s ease;
}
.card-cover strong { font-family: Georgia, serif; font-size: 34px; }
.card-cover small { margin-top: 8px; color: rgba(255,247,237,.65); }
.cover-icon { font-size: 42px; margin-bottom: 18px; }
.card-content { opacity: 1; }
.card-content h2 { font-size: clamp(30px, 8vw, 44px); line-height: 1.08; max-width: 420px; }
.category-pill, .intensity-chip {
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(25,10,24,.16);
  border-radius: 999px;
  padding: 7px 11px;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 10px;
  font-weight: 900;
}
.intensity-chip { margin-top: 20px; font-size: 9px; }
.game-card.is-covered .card-content { opacity: 0; transform: scale(.96); pointer-events: none; }
.game-card:not(.is-covered) .card-cover { opacity: 0; transform: scale(1.05); pointer-events: none; }
.game-card.revealing { animation: cardPop .38s ease both; }
@keyframes cardPop {
  0% { transform: rotateY(0) scale(1); }
  48% { transform: rotateY(8deg) scale(.985); }
  100% { transform: rotateY(0) scale(1); }
}
.game-actions { display: grid; grid-template-columns: .7fr 1.3fr; gap: 10px; margin-top: 16px; }
.keyboard-tip { color: #806f84; font-size: 10px; text-align: center; }

.completion-icon {
  width: 76px; height: 76px; border-radius: 50%;
  display: grid; place-items: center;
  margin: 0 auto 20px;
  color: #261324;
  background: linear-gradient(135deg, var(--pink), var(--coral));
  font-size: 32px;
  box-shadow: 0 16px 50px rgba(255,111,145,.24);
}
#completeScreen .section-copy { margin: 16px auto 26px; }
#completeScreen .secondary-button { margin-top: 10px; }

footer {
  width: min(100%, 560px);
  margin: 0 auto;
  padding: 0 20px max(18px, env(safe-area-inset-bottom));
  text-align: center;
  color: #79697d;
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.modal-backdrop {
  position: fixed; inset: 0; z-index: 20;
  background: rgba(8,5,10,.76);
  backdrop-filter: blur(10px);
  display: grid;
  place-items: end center;
  padding: 18px;
}
.modal-backdrop[hidden] { display: none; }
.modal {
  width: min(100%, 480px);
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  padding: 28px 22px 22px;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: linear-gradient(165deg, #332039, #211625);
  box-shadow: var(--shadow);
  position: relative;
  animation: modalIn .25s ease both;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(25px); } }
.modal h2 { font-size: 40px; }
.modal > p:not(.section-kicker):not(.tiny-note) { color: var(--muted); line-height: 1.55; }
.modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(255,255,255,.05); cursor: pointer;
}
.modal-icon {
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; margin-bottom: 18px;
  background: rgba(255,111,145,.15); color: var(--pink);
}
.price-line { display: flex; align-items: baseline; gap: 10px; margin: 20px 0 16px; }
.price-line strong { font-family: Georgia, serif; font-size: 42px; }
.price-line span { color: var(--muted); font-size: 12px; }
.divider { display: flex; align-items: center; gap: 10px; margin: 20px 0 14px; color: #8d7c91; font-size: 10px; }
.divider::before, .divider::after { content: ""; height: 1px; background: var(--line); flex: 1; }
#unlockForm label { display: block; font-size: 11px; font-weight: 800; margin-bottom: 7px; }
.code-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.code-row input {
  min-width: 0; border-radius: 999px; padding: 0 16px;
  color: var(--cream); background: rgba(0,0,0,.18);
  border: 1px solid var(--line); text-transform: uppercase;
}
.tiny-note { color: #847288; text-align: center; font-size: 10px; margin: 8px 0 0; }
.how-list { list-style: none; padding: 0; margin: 24px 0; }
.how-list li { display: flex; gap: 14px; margin: 18px 0; }
.how-list li > span {
  flex: 0 0 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,111,145,.14); color: var(--pink); font-weight: 900;
}
.how-list strong { font-size: 14px; }
.how-list p { margin: 4px 0 0; color: var(--muted); line-height: 1.45; font-size: 12px; }

.toast {
  position: fixed; z-index: 30; left: 50%; bottom: max(24px, env(safe-area-inset-bottom));
  transform: translate(-50%, 18px);
  width: max-content; max-width: calc(100% - 32px);
  padding: 11px 15px; border-radius: 999px;
  background: var(--cream); color: #2a1423;
  font-size: 12px; font-weight: 800;
  opacity: 0; pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

@media (min-width: 700px) {
  .modal-backdrop { place-items: center; }
  .app-shell { padding-top: 32px; }
}
@media (max-height: 720px) {
  .hero-card-stack { height: 160px; width: 190px; margin: 22px auto; }
  h1 { font-size: 54px; }
  .game-card { min-height: 350px; }
}
@media (max-width: 350px) {
  .app-shell { padding-left: 14px; padding-right: 14px; }
  .category-option { padding: 11px; }
  .game-card { min-height: 360px; padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

.seo-content {
  width: min(calc(100% - 40px), 760px);
  margin: 0 auto 54px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(255,255,255,.035);
  position: relative;
  z-index: 2;
}
.seo-content h2 { max-width: 620px; margin-top: 10px; }
.seo-content > p { color: var(--muted); line-height: 1.7; max-width: 680px; }
.seo-grid { display: grid; gap: 10px; margin: 22px 0; }
.seo-grid article { padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-md); background: rgba(0,0,0,.12); }
.seo-grid strong, .seo-grid span { display: block; }
.seo-grid span { color: var(--muted); font-size: 12px; line-height: 1.5; margin-top: 5px; }
.faq-list { display: grid; gap: 8px; }
.faq-list details { border-top: 1px solid var(--line); padding: 13px 2px 3px; }
.faq-list summary { cursor: pointer; font-weight: 800; }
.faq-list p { color: var(--muted); line-height: 1.6; font-size: 13px; }
@media (min-width: 640px) { .seo-grid { grid-template-columns: repeat(3, 1fr); } }
