:root {
  --ink: #061923;
  --ink-soft: #0b2a37;
  --ink-raised: #103342;
  --cream: #f7f0df;
  --paper: #efe5d1;
  --cream-muted: #d6cbb5;
  --gold: #c8a45d;
  --gold-light: #e4c98e;
  --teal: #6eb9b0;
  --display: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Manrope', Arial, sans-serif;
  --header-height: 78px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--sans);
}

button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; font: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }

.site-shell {
  display: flex;
  min-height: 100svh;
  flex-direction: column;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 15%, rgb(46 119 120 / 19%), transparent 34rem),
    linear-gradient(160deg, #0b2a38 0%, var(--ink) 54%, #040f17 100%);
}

body.landing-mode { overflow: hidden; }
body.landing-mode .site-shell { height: 100svh; min-height: 100svh; }

.global-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 50;
  display: grid;
  height: var(--header-height);
  padding: 0 clamp(20px, 4vw, 60px);
  grid-template-columns: minmax(190px, 1fr) minmax(240px, 460px) minmax(116px, 1fr);
  align-items: center;
  border-bottom: 1px solid rgb(228 201 142 / 19%);
  background: rgb(6 25 35 / 89%);
  backdrop-filter: blur(18px);
}

.site-title {
  display: flex;
  width: max-content;
  padding: 0;
  align-items: center;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.title-copy { display: grid; gap: 2px; }
.title-copy strong,
.title-copy small {
  color: var(--cream);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.1;
}
.title-copy strong { font-family: var(--display); }
.title-copy small { color: var(--gold-light); font-size: 10px; letter-spacing: 0.14em; }

.header-progress {
  display: grid;
  width: 100%;
  grid-column: 2;
  justify-self: center;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 14px;
}

.header-progress > span {
  color: var(--cream-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.progress-track {
  position: relative;
  height: 1px;
  overflow: visible;
  background: rgb(247 240 223 / 20%);
}

.progress-track span {
  position: absolute;
  inset: -1px auto auto 0;
  width: 8.333%;
  height: 3px;
  background: var(--gold-light);
  box-shadow: 0 0 16px rgb(228 201 142 / 56%);
  transition: width 360ms ease;
}

.share-button {
  display: flex;
  min-width: 152px;
  height: 42px;
  padding: 0 17px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  grid-column: 3;
  justify-self: end;
  border: 1px solid rgb(228 201 142 / 35%);
  border-radius: 2px;
  background: transparent;
  color: var(--gold-light);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.share-glyph { font-family: Georgia, serif; font-size: 18px; font-weight: 400; letter-spacing: 0; }
.share-button:hover { border-color: var(--gold-light); background: rgb(228 201 142 / 8%); transform: translateY(-1px); }

main { display: flex; min-height: calc(100svh - var(--header-height)); padding-top: var(--header-height); flex: 1 0 auto; flex-direction: column; }
body.landing-mode main { min-height: 0; flex: 1 1 auto; overflow: hidden; }
.view { display: none; }
.view.is-active { display: block; animation: view-in 500ms ease both; }
.landing-view.is-active { display: grid; place-items: center; }

@keyframes view-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.landing-view {
  position: relative;
  min-height: 0;
  padding: clamp(28px, 5vh, 56px) 24px;
  flex: 1 1 auto;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(ellipse at 74% 8%, rgb(215 236 231 / 12%) 0%, rgb(29 102 98 / 6%) 28%, transparent 55%),
    linear-gradient(154deg, #020f14 0%, #09262a 48%, #03171b 100%);
}

.landing-view::before,
.landing-view::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: '';
}
.landing-view::before {
  z-index: -1;
  background:
    linear-gradient(118deg, transparent 25%, rgb(215 236 231 / 3%) 44%, rgb(215 236 231 / 7%) 51%, transparent 70%),
    radial-gradient(ellipse at 18% 90%, rgb(29 102 98 / 8%) 0%, transparent 46%);
  filter: blur(18px);
}
.landing-view::after {
  z-index: 1;
  background:
    radial-gradient(ellipse at center, transparent 30%, rgb(1 9 14 / 24%) 78%, rgb(1 8 12 / 58%) 100%),
    linear-gradient(180deg, rgb(1 10 15 / 16%) 0%, transparent 28%, transparent 72%, rgb(1 9 13 / 28%) 100%);
}

.atmosphere {
  position: absolute;
  inset: -20%;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.atmosphere::before {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 70% 15%, rgb(215 236 231 / 8%) 0%, transparent 36%),
    radial-gradient(ellipse at 17% 78%, rgb(29 102 98 / 10%) 0%, transparent 40%);
  content: '';
  filter: blur(32px);
  opacity: 0.8;
}
.forest-shadow {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(81deg, rgb(0 8 12 / 48%) 0%, transparent 14%),
    linear-gradient(99deg, transparent 78%, rgb(0 7 11 / 44%) 100%),
    radial-gradient(ellipse at 16% 22%, rgb(1 11 15 / 44%) 0%, transparent 34%),
    radial-gradient(ellipse at 88% 78%, rgb(0 8 12 / 40%) 0%, transparent 32%);
  filter: blur(18px);
  transform: scale(1.08);
}

.fluid-light-canvas {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  mix-blend-mode: screen;
  pointer-events: none;
  opacity: 0.92;
}

.landing-copy {
  position: relative;
  z-index: 3;
  width: min(800px, 100%);
  margin: 0 auto;
  text-align: center;
  text-shadow: 0 3px 30px rgb(0 10 15 / 42%);
}

.eyebrow,
.story-name,
.section-kicker,
.question-number {
  margin: 0;
  color: var(--gold-light);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.28em;
}

.landing-copy h1 {
  margin: 22px auto 18px;
  font-family: var(--display);
  font-size: clamp(68px, 8vw, 104px);
  font-weight: 500;
  line-height: 0.91;
  letter-spacing: -0.045em;
}

.landing-intro {
  max-width: 600px;
  margin: 0 auto;
  color: var(--cream-muted);
  font-family: var(--display);
  font-size: clamp(22px, 2.2vw, 28px);
  line-height: 1.42;
}

.primary-button,
.secondary-button {
  min-height: 50px;
  padding: 0 24px;
  border: 1px solid var(--gold);
  border-radius: 2px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.16em;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

.primary-button { background: var(--gold); color: #10202a; }
.secondary-button { background: transparent; color: var(--cream); }
.primary-button:hover, .secondary-button:hover { transform: translateY(-2px); }
.secondary-button:hover { background: rgb(247 240 223 / 7%); }
.creator-line {
  margin: 0;
  color: rgb(214 203 181 / 64%);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.creator-line a {
  color: var(--gold-light);
  text-decoration: none;
  text-underline-offset: 4px;
}

.creator-line a:hover { text-decoration: underline; }

.start-form {
  width: min(430px, 100%);
  margin: 30px auto 0;
}

.start-form > label {
  display: block;
  margin-bottom: 10px;
  color: rgb(214 203 181 / 72%);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.nickname-field {
  display: grid;
  min-height: 58px;
  padding: 0 18px;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 13px;
  border: 1px solid rgb(228 201 142 / 43%);
  background: rgb(3 17 24 / 62%);
  box-shadow: inset 0 1px 0 rgb(231 250 247 / 4%), 0 18px 54px rgb(0 7 11 / 16%);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.nickname-field:focus-within {
  border-color: var(--gold-light);
  box-shadow: 0 0 0 3px rgb(110 185 176 / 12%), 0 12px 40px rgb(0 0 0 / 18%);
}

.nickname-field input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--cream);
  font-family: var(--display);
  font-size: 22px;
  line-height: 1;
}

.nickname-field input::placeholder { color: rgb(214 203 181 / 46%); }

.field-error {
  margin: 8px 0 0;
  color: #f1b9a9;
  font-size: 12px;
  font-weight: 600;
}

.start-form > .primary-button { min-width: 210px; margin-top: 20px; }
.start-form > .primary-button span { margin-left: 12px; font-size: 17px; }

.time-note {
  margin: 13px 0 0;
  color: rgb(214 203 181 / 55%);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.quiz-view {
  position: relative;
  min-height: calc(100svh - var(--header-height));
  padding: clamp(52px, 9vh, 92px) 24px 90px;
  overflow: hidden;
}
.quiz-view::before {
  position: absolute;
  top: -15rem;
  left: 50%;
  width: 43rem;
  height: 43rem;
  transform: translateX(-50%);
  border: 1px solid rgb(110 185 176 / 13%);
  border-radius: 50%;
  content: '';
}

.quiz-card { position: relative; z-index: 1; width: min(820px, 100%); margin: 0 auto; }
.question-number { text-align: center; }
.quiz-card h1 {
  max-width: 780px;
  margin: 20px auto 38px;
  text-align: center;
  font-family: var(--display);
  font-size: clamp(44px, 5vw, 60px);
  font-weight: 500;
  line-height: 1.03;
  letter-spacing: -0.025em;
}

.answer-list { display: grid; gap: 11px; }
.answer-button {
  position: relative;
  display: grid;
  min-height: 68px;
  padding: 16px 56px 16px 26px;
  grid-template-columns: 1fr auto;
  align-items: center;
  border: 1px solid rgb(228 201 142 / 23%);
  border-radius: 2px;
  background: rgb(10 39 51 / 56%);
  color: var(--cream);
  cursor: pointer;
  text-align: left;
  font-family: var(--display);
  font-size: clamp(20px, 2vw, 24px);
  line-height: 1.2;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}
.answer-button::after { color: var(--gold-light); content: '›'; font-family: Georgia, serif; font-size: 25px; opacity: 0; transform: translateX(-6px); transition: opacity 180ms ease, transform 180ms ease; }
.answer-button:hover, .answer-button.is-selected { border-color: rgb(228 201 142 / 72%); background: rgb(19 58 70 / 86%); transform: translateX(4px); }
.answer-button:hover::after, .answer-button.is-selected::after { opacity: 1; transform: translateX(0); }

.quiz-controls { display: flex; margin-top: 24px; align-items: center; justify-content: space-between; }
.quiz-controls p { margin: 0; color: rgb(214 203 181 / 65%); font-family: var(--display); font-size: 18px; font-style: italic; }
.text-button { padding: 8px 0; border: 0; background: transparent; color: var(--cream-muted); cursor: pointer; font-size: 13px; font-weight: 700; letter-spacing: 0.12em; }
.text-button:hover { color: var(--gold-light); }
.text-button:disabled { cursor: default; opacity: 0.25; }

.result-hero {
  position: relative;
  min-height: calc(100svh - var(--header-height));
  padding: 56px 24px 72px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 28%, rgb(53 116 119 / 30%), transparent 29rem),
    radial-gradient(circle at 50% 110%, rgb(175 104 61 / 14%), transparent 42rem);
}
.result-hero::before, .result-hero::after { position: absolute; width: 30rem; height: 30rem; border: 1px solid rgb(200 164 93 / 9%); border-radius: 50%; content: ''; }
.result-hero::before { top: -21rem; left: -15rem; }
.result-hero::after { right: -18rem; bottom: -20rem; }
.result-hero-inner { position: relative; z-index: 1; display: flex; width: min(920px, 100%); margin: 0 auto; flex-direction: column; align-items: center; text-align: center; }

.portrait-stage { position: relative; width: clamp(230px, 28vw, 320px); aspect-ratio: 1; margin: 14px 0; }
.portrait-frame { position: absolute; inset: 20px; overflow: hidden; border: 1px solid rgb(228 201 142 / 72%); border-radius: 50% 50% 46% 46%; background: #273845; box-shadow: 0 24px 80px rgb(0 0 0 / 34%), 0 0 60px rgb(76 164 162 / 18%); }
.portrait-frame img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.03); }
.orbit { position: absolute; border: 1px solid rgb(200 164 93 / 32%); border-radius: 50%; }
.orbit-one { inset: 5px; }
.orbit-two { inset: -9px 22px 20px -4px; transform: rotate(16deg); border-color: rgb(110 185 176 / 22%); }
.result-seal { position: absolute; right: 6px; bottom: 22px; display: grid; width: 54px; height: 54px; place-items: center; border: 1px solid rgb(228 201 142 / 78%); border-radius: 50%; background: var(--ink); color: var(--gold-light); font-family: var(--display); font-size: 18px; letter-spacing: 0.08em; box-shadow: 0 8px 24px rgb(0 0 0 / 32%); }

.result-hero h1 { margin: 2px 0 0; font-family: var(--display); font-size: clamp(50px, 7vw, 78px); font-weight: 500; line-height: 0.94; letter-spacing: -0.035em; }
.identity-block { display: grid; width: min(720px, 100%); margin-top: 22px; grid-template-columns: minmax(26px, 1fr) auto minmax(26px, 1fr); align-items: center; column-gap: 20px; }
.identity-block p { margin: 0; color: var(--gold-light); font-size: 12px; font-weight: 700; letter-spacing: 0.2em; }
.identity-block h2 { grid-column: 1 / -1; margin: 7px 0 0; font-family: var(--display); font-size: clamp(25px, 3vw, 35px); font-weight: 400; font-style: italic; line-height: 1.08; }
.fine-rule { height: 1px; background: linear-gradient(90deg, transparent, rgb(200 164 93 / 72%)); }
.fine-rule.reverse { transform: scaleX(-1); }
.hero-summary { max-width: 570px; margin: 16px auto 0; color: var(--cream-muted); font-family: var(--display); font-size: clamp(19px, 2vw, 22px); line-height: 1.4; }
.trope-row { display: flex; margin-top: 18px; align-items: center; gap: 11px; color: rgb(214 203 181 / 72%); font-size: 12px; font-weight: 700; letter-spacing: 0.16em; }
.trope-row strong { padding: 9px 12px; border: 1px solid rgb(200 164 93 / 38%); color: var(--gold-light); font-size: 12px; }
.result-actions { display: flex; margin-top: 24px; gap: 12px; }

.match-details { padding: 92px 24px 76px; background: var(--cream); color: #17313a; }
.details-heading { width: min(780px, 100%); margin: 0 auto; text-align: center; }
.section-kicker { color: #916e31; }
.details-heading h2 { margin: 15px 0 12px; font-family: var(--display); font-size: clamp(39px, 5vw, 60px); font-weight: 500; line-height: 0.98; letter-spacing: -0.03em; }
.details-heading > p:last-child { max-width: 670px; margin: 0 auto; color: #586568; font-family: var(--display); font-size: 21px; line-height: 1.5; }
.love-pattern { display: grid; width: min(960px, 100%); margin: 58px auto 0; padding: 38px 42px; grid-template-columns: 1fr 1.35fr; align-items: center; gap: 46px; border: 1px solid rgb(145 110 49 / 24%); background: #f3e9d5; }
.pattern-heading > p, .exchange-card > p:first-child, .friction-card > div > p, .fandom-note > p { margin: 0 0 11px; color: #916e31; font-size: 11px; font-weight: 700; letter-spacing: 0.17em; }
.pattern-heading h3 { margin: 0; font-family: var(--display); font-size: 37px; font-weight: 500; line-height: 0.98; }
.pattern-traits { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pattern-traits span { padding: 13px 14px; border: 1px solid rgb(145 110 49 / 24%); background: rgb(255 255 255 / 30%); color: #4e5d60; font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-align: center; }
.reason-list { display: grid; width: min(960px, 100%); margin: 38px auto 0; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgb(145 110 49 / 26%); border-bottom: 1px solid rgb(145 110 49 / 26%); }
.reason-card { display: grid; min-height: 250px; padding: 32px 28px; grid-template-columns: auto 1fr; gap: 17px; border-right: 1px solid rgb(145 110 49 / 22%); }
.reason-card:last-child { border-right: 0; }
.reason-card > span { color: #a17d3d; font-size: 12px; font-weight: 700; letter-spacing: 0.14em; }
.reason-card h3 { margin: 0 0 8px; font-family: var(--display); font-size: 27px; font-weight: 600; line-height: 1.02; }
.reason-card p { margin: 0; color: #687174; font-family: var(--display); font-size: 17px; line-height: 1.48; }
.exchange-grid { display: grid; width: min(960px, 100%); margin: 38px auto 0; grid-template-columns: 1fr 1fr; gap: 18px; }
.exchange-card { min-height: 290px; padding: 42px; border: 1px solid rgb(145 110 49 / 22%); background: #fbf5e8; }
.exchange-card:last-child { background: #eadfc9; }
.exchange-card h3 { max-width: 390px; margin: 0 0 18px; font-family: var(--display); font-size: 36px; font-weight: 500; line-height: 1.02; }
.exchange-card > p:last-child { margin: 0; color: #657174; font-family: var(--display); font-size: 18px; line-height: 1.5; }
.friction-card { display: grid; width: min(960px, 100%); margin: 18px auto 0; padding: 40px 42px; grid-template-columns: 0.9fr 1.1fr; align-items: start; gap: 50px; background: #173641; color: var(--cream); }
.friction-card h3 { margin: 0; font-family: var(--display); font-size: 34px; font-weight: 500; line-height: 1.05; }
.friction-card > p { margin: 0; color: var(--cream-muted); font-family: var(--display); font-size: 18px; line-height: 1.52; }
.result-story-grid { display: grid; width: min(960px, 100%); margin: 38px auto 0; grid-template-columns: 1fr 1fr; }
.story-card { position: relative; min-height: 300px; padding: 44px; overflow: hidden; }
.story-card > p { margin: 0 0 20px; font-size: 12px; font-weight: 700; letter-spacing: 0.16em; }
.story-card h3 { max-width: 390px; margin: 0; font-family: var(--display); font-size: clamp(30px, 4vw, 42px); font-weight: 500; line-height: 1.03; }
.story-card > span { position: absolute; right: 30px; bottom: 20px; font-family: var(--display); font-size: 64px; opacity: 0.09; }
.story-card-dark { background: var(--ink-soft); color: var(--cream); }
.story-card-dark > p { color: var(--gold-light); }
.story-card-light { border: 1px solid rgb(145 110 49 / 22%); background: #f4ead7; }
.story-card-light > p { color: #916e31; }
.story-card .signature { color: #8a6530; font-family: var(--display); font-size: 28px; font-style: italic; opacity: 0.7; }
.fandom-note { display: grid; width: min(960px, 100%); margin: 18px auto 0; padding: 28px 34px; grid-template-columns: auto 110px 1fr; align-items: center; column-gap: 26px; border: 1px solid rgb(145 110 49 / 22%); }
.fandom-note > p { margin: 0; }
.fandom-note strong { color: #173641; font-family: var(--display); font-size: 58px; font-weight: 500; line-height: 1; }
.fandom-note span { color: #657174; font-family: var(--display); font-size: 17px; line-height: 1.42; }
.final-verdict { width: min(720px, 100%); margin: 54px auto 0; color: #173641; text-align: center; font-family: var(--display); font-size: clamp(30px, 4vw, 44px); font-style: italic; line-height: 1.12; }
.retake-button { display: block; margin: 36px auto 0; color: #755c37; }

.site-footer {
  flex: 0 0 auto;
  padding: 25px clamp(24px, 6vw, 88px);
  border-top: 1px solid rgb(228 201 142 / 18%);
  background: #04131c;
  color: var(--cream-muted);
}
.footer-inner { display: grid; width: min(1040px, 100%); margin: 0 auto; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.footer-column { min-width: 0; padding: 0 clamp(24px, 4vw, 48px); }
.footer-column:first-child { padding-left: 0; }
.footer-column:last-child { padding-right: 0; border-left: 1px solid rgb(228 201 142 / 20%); }
.footer-heading { display: inline-flex; align-items: center; gap: 6px; color: var(--gold-light); font-family: var(--sans); font-size: 15px; font-weight: 600; letter-spacing: 0.01em; text-decoration: none; white-space: nowrap; }
.footer-heading span { font-family: Georgia, serif; font-size: 12px; transition: transform 180ms ease; }
.footer-heading:hover span { transform: translate(3px, -3px); }
.footer-column p { max-width: 440px; margin: 6px 0 0; color: rgb(214 203 181 / 68%); font-family: var(--sans); font-size: 12px; line-height: 1.5; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  padding: 24px;
  place-items: center;
  background: rgb(2 12 18 / 76%);
  backdrop-filter: blur(9px);
}
.exit-dialog { width: min(460px, 100%); padding: 44px; border: 1px solid rgb(228 201 142 / 40%); background: #0a2633; box-shadow: 0 30px 100px rgb(0 0 0 / 42%); text-align: center; }
.exit-dialog h2 { margin: 14px 0 8px; font-family: var(--display); font-size: 45px; font-weight: 500; }
.exit-dialog > p:not(.section-kicker) { margin: 0; color: var(--cream-muted); font-family: var(--display); font-size: 19px; }
.dialog-actions { display: flex; margin-top: 28px; gap: 10px; }
.dialog-actions button { flex: 1; }

.share-dialog { position: relative; width: min(720px, 100%); max-height: calc(100svh - 40px); padding: 46px; overflow-y: auto; border: 1px solid rgb(228 201 142 / 40%); background: #0a2633; box-shadow: 0 30px 100px rgb(0 0 0 / 42%); }
.share-dialog > h2 { margin: 14px 0 8px; font-family: var(--display); font-size: clamp(40px, 5vw, 54px); font-weight: 500; line-height: 1; }
.share-dialog > p:not(.section-kicker) { max-width: 570px; margin: 0; color: var(--cream-muted); font-family: var(--display); font-size: 18px; line-height: 1.45; }
.modal-close { position: absolute; top: 18px; right: 20px; display: grid; width: 38px; height: 38px; padding: 0; place-items: center; border: 1px solid rgb(228 201 142 / 28%); border-radius: 50%; background: transparent; color: var(--cream-muted); cursor: pointer; font-family: var(--display); font-size: 28px; line-height: 1; }
.modal-close:hover { border-color: var(--gold-light); color: var(--gold-light); }
.community-options { display: grid; margin-top: 30px; gap: 12px; }
.community-option { display: grid; width: 100%; min-height: 108px; padding: 22px 22px; grid-template-columns: auto 1fr auto; align-items: start; gap: 18px; border: 1px solid rgb(228 201 142 / 24%); background: rgb(6 25 35 / 48%); color: var(--cream); cursor: pointer; text-align: left; transition: border-color 180ms ease, background 180ms ease, transform 180ms ease; }
.community-option:hover { border-color: rgb(228 201 142 / 70%); background: rgb(16 51 66 / 82%); transform: translateY(-2px); }
.community-option-featured { background: rgb(28 72 78 / 42%); }
.community-order { padding-top: 5px; color: var(--gold-light); font-size: 10px; font-weight: 700; letter-spacing: 0.12em; }
.community-copy { display: grid; gap: 6px; }
.community-copy strong { font-family: var(--display); font-size: 27px; font-weight: 600; line-height: 1; }
.community-copy small { max-width: 520px; color: rgb(214 203 181 / 72%); font-family: var(--display); font-size: 16px; line-height: 1.35; }
.community-arrow { padding-top: 2px; color: var(--gold-light); font-family: Georgia, serif; font-size: 20px; }
.native-share { margin-top: 20px; padding-top: 20px; border-top: 1px solid rgb(228 201 142 / 17%); text-align: center; }
.native-share button { width: 100%; }
.native-share p { margin: 9px 0 0; color: rgb(214 203 181 / 52%); font-size: 11px; }

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 120;
  display: flex;
  min-width: 190px;
  padding: 15px 18px;
  align-items: center;
  gap: 11px;
  border: 1px solid rgb(228 201 142 / 45%);
  background: #0c2d39;
  color: var(--cream);
  box-shadow: 0 16px 50px rgb(0 0 0 / 32%);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  animation: toast-in 250ms ease both;
}
.toast > span:first-child { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; background: var(--gold); color: var(--ink); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

button:focus-visible, a:focus-visible { outline: 2px solid var(--teal); outline-offset: 4px; }

@media (max-width: 760px) {
  :root { --header-height: 68px; }
  .global-header { padding: 0 17px; grid-template-columns: minmax(160px, 1fr) minmax(120px, 220px) minmax(132px, 1fr); }
  .title-copy strong { font-size: 18px; }
  .title-copy small { font-size: 8px; }
  .header-progress { position: static; display: grid; }
  .header-progress > span { position: static; font-size: 10px; }
  .progress-track { width: 100%; }
  .share-button { min-width: 132px; height: 40px; padding: 0 12px; grid-column: 3; gap: 7px; font-size: 10px; }
  .share-glyph { font-size: 16px; }

  .landing-view { padding: clamp(20px, 4vh, 34px) 20px; }
  .eyebrow, .story-name, .section-kicker, .question-number { font-size: 10px; }
  .landing-copy h1 { font-size: clamp(50px, 15vw, 68px); }
  .landing-intro { font-size: 20px; }
  .creator-line, .start-form > label { font-size: 10px; }
  .start-form { margin-top: 26px; }
  .nickname-field { min-height: 54px; }
  .nickname-field input { font-size: 19px; }
  .primary-button, .secondary-button { min-height: 48px; font-size: 12px; }
  .time-note { font-size: 10px; }
  .forest-shadow { filter: blur(12px); }

  .quiz-view { padding-top: 52px; }
  .quiz-card h1 { margin-bottom: 30px; font-size: clamp(34px, 10vw, 44px); }
  .answer-button { min-height: 64px; padding: 14px 38px 14px 20px; font-size: 18px; line-height: 1.35; }
  .quiz-controls p { display: none; }
  .text-button { font-size: 11px; }

  .result-hero { padding-top: 42px; }
  .identity-block { column-gap: 10px; }
  .identity-block p { font-size: 10px; }
  .trope-row { flex-direction: column; }
  .trope-row, .trope-row strong { font-size: 10px; }
  .result-actions { width: 100%; flex-direction: column; }
  .result-actions button { width: 100%; }

  .match-details { padding: 70px 20px 60px; }
  .details-heading > p:last-child { font-size: 19px; }
  .love-pattern { padding: 30px 24px; grid-template-columns: 1fr; gap: 26px; }
  .pattern-heading h3 { font-size: 33px; }
  .pattern-traits { grid-template-columns: 1fr; }
  .reason-list { grid-template-columns: 1fr; }
  .reason-card { min-height: auto; padding: 26px 10px; border-right: 0; border-bottom: 1px solid rgb(145 110 49 / 22%); }
  .reason-card:last-child { border-bottom: 0; }
  .exchange-grid { grid-template-columns: 1fr; }
  .exchange-card { min-height: auto; padding: 32px 26px; }
  .exchange-card h3 { font-size: 32px; }
  .friction-card { padding: 34px 26px; grid-template-columns: 1fr; gap: 22px; }
  .result-story-grid { grid-template-columns: 1fr; }
  .story-card { min-height: 260px; padding: 34px 28px; }
  .fandom-note { padding: 28px 24px; grid-template-columns: 1fr; gap: 8px; }
  .fandom-note strong { font-size: 52px; }

  .site-footer { padding: 22px 20px; }
  .footer-column { padding: 0 18px; }
  .footer-column:first-child { padding-left: 0; }
  .footer-column:last-child { padding-right: 0; }
  .footer-heading { font-size: 14px; }
  .footer-column p { font-size: 11px; line-height: 1.5; }
  .exit-dialog { padding: 38px 24px; }
  .dialog-actions { flex-direction: column; }
  .share-dialog { padding: 40px 20px 24px; }
  .community-option { padding: 20px 16px; grid-template-columns: auto 1fr; gap: 13px; }
  .community-arrow { display: none; }
  .community-copy strong { font-size: 24px; }
  .community-copy small { font-size: 15px; }
  .toast { right: 16px; bottom: 16px; left: 16px; }
}

@media (max-width: 560px) {
  .global-header { grid-template-columns: 1fr auto; }
  .header-progress {
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    display: block;
    width: 100%;
  }
  .header-progress > span { display: none; }
  .share-button { grid-column: 2; }
}

@media (max-width: 520px) {
  .footer-inner { grid-template-columns: 1fr; gap: 15px; }
  .footer-column, .footer-column:first-child, .footer-column:last-child { padding: 0; }
  .footer-column:last-child { padding-top: 14px; border-top: 1px solid rgb(228 201 142 / 18%); border-left: 0; }
}

@media (hover: none), (pointer: coarse) {
  .fluid-light-canvas { display: none; }
}

@media (max-height: 720px) {
  .landing-copy h1 { margin-top: 14px; margin-bottom: 12px; font-size: clamp(54px, 7vw, 78px); }
  .start-form { margin-top: 20px; }
  .start-form > .primary-button { margin-top: 14px; }
  .site-footer { padding-top: 17px; padding-bottom: 17px; }
}

@media (max-width: 520px) and (max-height: 720px) {
  .landing-copy h1 { font-size: clamp(46px, 14vw, 58px); }
  .nickname-field { min-height: 50px; }
  .start-form > .primary-button { min-height: 44px; }
  .footer-column p { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* --- v2 result modules --- */
.rarity-badge { display: inline-block; margin: 10px auto 0; padding: 7px 16px; border: 1px solid rgb(228 201 142 / 55%); color: var(--gold-light); font-size: 11px; font-weight: 700; letter-spacing: 0.2em; }

.result-quote { margin: 22px auto 0; max-width: 560px; }
.result-quote p { margin: 0; font-family: var(--display); font-style: italic; font-size: 24px; line-height: 1.35; color: var(--cream); }
.result-quote cite { display: block; margin-top: 8px; font-style: normal; color: var(--cream-muted); font-size: 12px; letter-spacing: 0.12em; }

.pattern-bars { margin-top: 22px; }
.pattern-bars-legend { display: flex; gap: 22px; margin-bottom: 14px; color: #916e31; font-size: 10px; font-weight: 700; letter-spacing: 0.14em; }
.pattern-bars-legend span { display: inline-flex; align-items: center; gap: 7px; }
.pattern-bar-row { display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: 16px; margin-bottom: 12px; }
.pattern-bar-label { color: #4e5d60; font-size: 10px; font-weight: 700; letter-spacing: 0.1em; }
.pattern-bar-track { position: relative; height: 4px; background: rgb(145 110 49 / 20%); }
.pattern-bar-track i, .pattern-bars-legend i { display: inline-block; width: 11px; height: 11px; }
.pattern-bar-track i { position: absolute; top: 50%; transform: translate(-50%, -50%); }
.marker-you { background: #103342; border-radius: 50%; }
.marker-them { border: 2px solid #a17d3d; background: #fbf5e8; border-radius: 50%; }

.roast-card { width: min(960px, 100%); margin: 18px auto 0; padding: 34px 42px; border: 1px dashed rgb(145 110 49 / 45%); background: #fbf5e8; }
.roast-kicker { margin: 0 0 10px; color: #916e31; font-size: 11px; font-weight: 700; letter-spacing: 0.17em; }
.roast-line { margin: 0; color: #3c4a4e; font-family: var(--display); font-size: 21px; font-style: italic; line-height: 1.45; }

.runner-ups { width: min(960px, 100%); margin: 38px auto 0; }
.runner-ups > .section-kicker { margin: 0 0 14px; color: #916e31; font-size: 11px; font-weight: 700; letter-spacing: 0.17em; }
.runner-up-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.runner-up-item { display: grid; grid-template-columns: auto 52px 1fr auto; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid rgb(145 110 49 / 22%); background: rgb(255 255 255 / 34%); }
.runner-up-order { color: #a17d3d; font-size: 11px; font-weight: 700; letter-spacing: 0.12em; }
.runner-up-item img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; object-position: top; border: 1px solid rgb(145 110 49 / 30%); }
.runner-up-copy { display: grid; }
.runner-up-copy strong { color: #34444a; font-family: var(--display); font-size: 18px; font-weight: 600; line-height: 1.1; }
.runner-up-copy small { color: #85796a; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; }
.runner-up-percent { color: #103342; font-size: 15px; font-weight: 700; }

.method-note { width: min(960px, 100%); margin: 26px auto 0; color: #9b8f7c; font-size: 11px; letter-spacing: 0.04em; text-align: center; }

@media (max-width: 760px) {
  .pattern-bar-row { grid-template-columns: 1fr; gap: 6px; }
  .runner-up-list { grid-template-columns: 1fr; }
  .result-quote p { font-size: 20px; }
}
