:root {
  color-scheme: dark;
  --bg: #090a0f;
  --panel: rgba(19, 23, 32, 0.92);
  --panel-strong: #151925;
  --text: #f5f7fb;
  --muted: #a6afc0;
  --line: rgba(255, 255, 255, 0.14);
  --cyan: #44d9e8;
  --red: #ff4f71;
  --gold: #f4c95d;
  --green: #5ee0a1;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 79, 113, 0.16), transparent 28%),
    radial-gradient(circle at 80% 0%, rgba(68, 217, 232, 0.14), transparent 34%),
    linear-gradient(145deg, #050507 0%, #11121a 48%, #07080c 100%);
  color: var(--text);
  overflow-x: hidden;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.home-shell,
.survey-shell,
.result-shell {
  min-height: 100vh;
}

.page-frame {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.cover-backdrop,
.frame-shade {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.cover-backdrop {
  z-index: 0;
  display: grid;
  align-content: center;
  gap: 26px;
  opacity: 0.74;
  transform: rotate(-7deg) scale(1.08);
}

.frame-shade {
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(5,5,7,.95) 0%, rgba(5,5,7,.78) 38%, rgba(5,5,7,.36) 100%),
    linear-gradient(180deg, rgba(5,5,7,.62) 0%, rgba(5,5,7,.25) 44%, rgba(5,5,7,.9) 100%);
}

.cover-rail {
  display: flex;
  gap: 18px;
  width: max-content;
  animation: cover-slide 42s linear infinite;
}

.cover-rail.reverse {
  animation-name: cover-slide-reverse;
}

.cover-card {
  position: relative;
  width: 176px;
  height: 254px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: 0 24px 45px rgba(0,0,0,.42);
  background-image: url("./playlet-covers.png");
  background-repeat: no-repeat;
  background-size: 500% 200%;
  background-color: #171923;
}

.cover-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,.06) 0%, rgba(0,0,0,.12) 46%, rgba(0,0,0,.78) 100%),
    linear-gradient(135deg, rgba(255,255,255,.18), transparent 32%);
}

.cover-card span,
.cover-card strong,
.cover-card small,
.cover-card i {
  position: relative;
  z-index: 1;
}

.cover-card span {
  color: rgba(255,255,255,.72);
  font-size: 11px;
  font-weight: 900;
}

.cover-card strong {
  margin-top: 4px;
  font-size: 23px;
  line-height: 1.02;
}

.cover-card small {
  margin-top: 8px;
  color: rgba(255,255,255,.72);
}

.cover-card i {
  display: block;
  width: 54px;
  height: 4px;
  margin-top: 14px;
  border-radius: 99px;
  background: rgba(255,255,255,.8);
}

.pos-0 { background-position: 0% 0%; }
.pos-1 { background-position: 25% 0%; }
.pos-2 { background-position: 50% 0%; }
.pos-3 { background-position: 75% 0%; }
.pos-4 { background-position: 100% 0%; }
.pos-5 { background-position: 0% 100%; }
.pos-6 { background-position: 25% 100%; }
.pos-7 { background-position: 50% 100%; }
.pos-8 { background-position: 75% 100%; }
.pos-9 { background-position: 100% 100%; }

@keyframes cover-slide {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-1 * ((176px + 18px) * 5))); }
}

@keyframes cover-slide-reverse {
  from { transform: translateX(calc(-1 * ((176px + 18px) * 5))); }
  to { transform: translateX(0); }
}

.hero-scene {
  position: relative;
  min-height: 86vh;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.82fr);
  gap: 40px;
  align-items: center;
  padding: 52px clamp(20px, 6vw, 92px) 36px;
}

.hero-scene::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, #000, transparent 82%);
}

.scene-glow {
  position: absolute;
  right: 12%;
  top: 10%;
  width: 380px;
  height: 520px;
  background: linear-gradient(160deg, rgba(68,217,232,.32), rgba(255,79,113,.28));
  filter: blur(72px);
  transform: rotate(-18deg);
}

.hero-copy,
.preview-board,
.info-band,
.question-panel,
.survey-header,
.result-panel {
  position: relative;
  z-index: 2;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-copy h1,
.question-panel h1,
.result-panel h1 {
  margin: 0;
  line-height: 1.05;
  letter-spacing: 0;
}

.hero-copy h1 {
  max-width: 760px;
  font-size: clamp(44px, 8vw, 96px);
}

.hero-copy p:not(.eyebrow) {
  max-width: 660px;
  margin: 24px 0 0;
  color: #d9deea;
  font-size: clamp(16px, 2vw, 22px);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 34px;
}

.hero-actions span,
.question-subtitle,
.question-meta,
.result-panel p {
  color: var(--muted);
}

.primary,
.ghost {
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  padding: 0 22px;
  font-weight: 800;
}

.primary {
  color: #081014;
  background: linear-gradient(135deg, var(--cyan), var(--gold));
  box-shadow: 0 16px 36px rgba(68, 217, 232, 0.22);
}

.ghost {
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line);
}

.preview-board {
  min-height: 560px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(155deg, rgba(21, 25, 37, 0.92), rgba(9, 10, 15, 0.86));
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.34);
  border-radius: 8px;
  padding: 28px;
  display: grid;
  align-content: center;
  gap: 22px;
}

.film-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.film-strip span {
  aspect-ratio: 1 / 1.3;
  border: 1px solid rgba(255,255,255,.15);
  background:
    linear-gradient(180deg, rgba(255, 79, 113, .22), transparent),
    linear-gradient(135deg, #1e2636, #0e121b);
  border-radius: 6px;
}

.story-card {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 18px;
}

.story-card b,
.story-card span {
  display: block;
}

.story-card b {
  color: var(--gold);
}

.story-card span {
  margin-top: 8px;
  color: #dfe6f4;
}

.story-card.main {
  min-height: 170px;
}

.story-card.main i {
  display: block;
  width: 78%;
  height: 10px;
  margin-top: 54px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--red), var(--cyan));
}

.story-card.side {
  margin-left: 24%;
}

.timeline {
  display: grid;
  grid-template-columns: 1fr 0.75fr 1.2fr;
  gap: 8px;
}

.timeline span {
  height: 12px;
  border-radius: 999px;
  background: rgba(68, 217, 232, 0.42);
}

.info-band {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 clamp(20px, 6vw, 92px) 40px;
}

.info-band span,
.summary-tags span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 14px;
  color: #dce3f1;
  background: rgba(255,255,255,.05);
}

.survey-shell {
  position: relative;
  z-index: 2;
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(22px, 5vh, 46px) 0 44px;
  display: grid;
  align-content: center;
}

.survey-header {
  display: grid;
  grid-template-columns: minmax(150px, 220px) 1fr auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 22px;
}

.survey-header strong {
  display: block;
}

.progress-wrap {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.1);
}

.progress-wrap span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--red), var(--cyan), var(--gold));
  transition: width .24s ease;
}

.question-panel {
  border: 1px solid rgba(255,255,255,.14);
  background:
    linear-gradient(135deg, rgba(255,255,255,.08), rgba(255,255,255,.025)),
    rgba(12, 14, 20, 0.84);
  backdrop-filter: blur(18px);
  border-radius: 8px;
  padding: clamp(20px, 5vw, 44px);
  box-shadow: 0 28px 80px rgba(0,0,0,.46);
  animation: rise .22s ease;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.question-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  font-size: 14px;
}

.question-panel h1 {
  max-width: 780px;
  font-size: clamp(30px, 5.4vw, 56px);
}

.question-subtitle {
  margin: 14px 0 0;
  line-height: 1.7;
}

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

.option {
  min-height: 70px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255,255,255,.065);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  text-align: left;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.option:hover {
  transform: translateY(-1px);
  border-color: rgba(68,217,232,.55);
}

.option.active {
  background: linear-gradient(135deg, rgba(68,217,232,.18), rgba(255,79,113,.15));
  border-color: rgba(68,217,232,.75);
}

.mark {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.24);
  color: var(--cyan);
  font-weight: 900;
}

.consent-box {
  margin-top: 24px;
  padding: 18px;
  border-radius: 8px;
  border: 1px solid rgba(255, 79, 113, 0.45);
  background: rgba(255, 79, 113, 0.08);
}

.consent-box p {
  margin: 0;
  color: #ffd5dd;
  line-height: 1.7;
}

.consent-options {
  grid-template-columns: 1fr;
  margin-top: 16px;
}

.contact-grid {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

.contact-grid label {
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.contact-grid input,
.contact-grid textarea {
  width: 100%;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255,255,255,.06);
  padding: 14px 16px;
  outline: 0;
}

.contact-grid textarea {
  min-height: 130px;
  resize: vertical;
}

.survey-actions {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 32px;
}

.result-shell {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  padding: 24px;
}

.result-panel,
.loading-panel {
  position: relative;
  overflow: hidden;
  width: min(640px, 100%);
  border-radius: 8px;
  padding: clamp(24px, 5vw, 44px);
  border: 1px solid rgba(255,255,255,.14);
  background:
    linear-gradient(135deg, rgba(68,217,232,.14), transparent 32%),
    linear-gradient(225deg, rgba(255,79,113,.16), transparent 34%),
    rgba(12, 14, 20, 0.88);
  backdrop-filter: blur(18px);
  text-align: center;
  box-shadow: 0 34px 90px rgba(0,0,0,.48);
}

.loading-panel {
  width: min(680px, 100%);
}

.result-panel h1,
.loading-panel h1 {
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  font-size: clamp(34px, 6vw, 60px);
}

.result-copy,
.next-steps p {
  line-height: 1.7;
}

.result-copy {
  max-width: 560px;
  margin: 18px auto 0;
  color: #dce3f1;
}

.result-orbit {
  width: 92px;
  height: 92px;
  margin: 0 auto 22px;
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(68,217,232,.32), rgba(68,217,232,.08) 48%, transparent 70%);
}

.loading-core {
  position: relative;
  width: 118px;
  height: 118px;
  margin: 0 auto 24px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(68,217,232,.18) 0 36%, transparent 37%),
    conic-gradient(from 0deg, var(--cyan), var(--red), var(--gold), var(--cyan));
  animation: spin 1.8s linear infinite;
}

.loading-core::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: inherit;
  background: rgba(12,14,20,.96);
  box-shadow: inset 0 0 28px rgba(68,217,232,.24);
}

.loading-core::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 42px;
  height: 42px;
  transform: translate(-50%, -50%);
  border-radius: 8px;
  background:
    linear-gradient(90deg, transparent 46%, rgba(255,255,255,.22) 47%, transparent 53%),
    linear-gradient(180deg, transparent 46%, rgba(255,255,255,.18) 47%, transparent 53%),
    linear-gradient(135deg, rgba(68,217,232,.8), rgba(244,201,93,.84));
}

.loading-core span {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 20px rgba(68,217,232,.9);
}

.loading-core span:nth-child(1) {
  left: 14px;
  top: 34px;
}

.loading-core span:nth-child(2) {
  right: 12px;
  top: 54px;
  background: var(--red);
}

.loading-core span:nth-child(3) {
  left: 54px;
  bottom: 12px;
  background: var(--gold);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 28px;
}

.loading-steps span {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 8px;
  padding: 13px 10px;
  color: #dce3f1;
  background: rgba(255,255,255,.06);
  font-size: 13px;
  font-weight: 800;
}

.loading-steps span::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-110%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.16), transparent);
  animation: scan 1.3s ease-in-out infinite;
}

.loading-steps span:nth-child(2)::after {
  animation-delay: .16s;
}

.loading-steps span:nth-child(3)::after {
  animation-delay: .32s;
}

@keyframes scan {
  to { transform: translateX(110%); }
}

.result-orbit::before {
  content: "✓";
  position: relative;
  z-index: 2;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #081014;
  background: linear-gradient(135deg, var(--cyan), var(--gold));
  font-weight: 900;
  font-size: 26px;
}

.result-orbit span {
  position: absolute;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 50%;
}

.result-orbit span:nth-child(1) {
  inset: 4px;
}

.result-orbit span:nth-child(2) {
  inset: 18px;
  border-color: rgba(244,201,93,.34);
}

.result-orbit span:nth-child(3) {
  width: 8px;
  height: 8px;
  right: 8px;
  top: 26px;
  background: var(--red);
  border: 0;
  box-shadow: 0 0 20px rgba(255,79,113,.8);
}

.result-dashboard {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 28px 0 22px;
  text-align: left;
}

.result-dashboard article,
.next-steps {
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 8px;
  background: rgba(255,255,255,.065);
  padding: 16px;
}

.result-dashboard span,
.result-dashboard small {
  display: block;
  color: var(--muted);
}

.result-dashboard span {
  font-size: 12px;
  font-weight: 900;
}

.result-dashboard strong {
  display: block;
  min-height: 50px;
  margin: 9px 0;
  line-height: 1.28;
  color: var(--text);
}

.result-dashboard small {
  font-size: 12px;
}

.summary-tags {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

.next-steps {
  margin: 22px 0 24px;
  text-align: left;
}

.next-steps b {
  color: var(--gold);
}

.next-steps p {
  margin: 8px 0 0;
  color: #dce3f1;
}

@media (max-width: 820px) {
  .hero-scene {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-top: 36px;
  }

  .preview-board {
    min-height: 360px;
  }

  .survey-header {
    grid-template-columns: 1fr auto;
  }

  .progress-wrap {
    grid-column: 1 / -1;
    order: 3;
  }

  .option-grid {
    grid-template-columns: 1fr;
  }

  .result-dashboard {
    grid-template-columns: 1fr;
  }

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

  .result-dashboard strong {
    min-height: auto;
  }
}

@media (max-width: 520px) {
  .hero-copy h1 {
    font-size: 42px;
  }

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

  .primary,
  .ghost {
    width: 100%;
  }
}
