:root {
  --ink: #17111f;
  --paper: #f7f3ff;
  --violet: #6d4aff;
  --violet-2: #9c78ff;
  --coral: #ff6b74;
  --gold: #ffcf63;
  --mint: #8ff0d1;
  --muted: #756e7c;
  --line: rgba(23, 17, 31, 0.13);
  --serif: "Noto Serif SC", serif;
  --sans: "Noto Sans SC", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--ink); }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  background:
    radial-gradient(circle at 85% 10%, rgba(156, 120, 255, 0.34), transparent 31rem),
    linear-gradient(150deg, #f7f3ff 0%, #fdf8ec 48%, #f8eeff 100%);
}
button { font: inherit; }
.is-hidden { display: none !important; }
.noise {
  position: fixed; inset: 0; pointer-events: none; z-index: 10; opacity: .18;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.08'/%3E%3C/svg%3E");
}
.app-shell { width: 100%; min-height: 100vh; }
.screen { min-height: 100vh; }
.access-screen { display:flex; min-height:100vh; padding:30px clamp(24px,6vw,88px) 24px; flex-direction:column; overflow:hidden; background:linear-gradient(145deg,#17111f 0%,#26163a 57%,#3b205e 100%); color:white; }
.access-topbar .edition { border-color:rgba(255,255,255,.18); }
.access-layout { width:min(1120px,100%); margin:auto; display:grid; grid-template-columns:1.1fr .9fr; gap:clamp(48px,8vw,110px); align-items:center; }
.access-copy h1 { margin:0; font:900 clamp(2.7rem,5.7vw,5.2rem)/1.14 var(--serif); letter-spacing:-.055em; }
.access-copy h1 em { color:var(--gold); font-style:normal; }
.access-copy > p:last-child { max-width:590px; margin:30px 0 0; color:rgba(255,255,255,.58); font-size:1rem; line-height:1.85; }
.access-card { position:relative; padding:38px; overflow:hidden; color:var(--ink); background:linear-gradient(145deg,#fff 0%,#f3ebff 100%); border-radius:28px; box-shadow:24px 26px 0 rgba(255,207,99,.12); }
.access-card::before { content:""; position:absolute; width:180px; height:180px; right:-70px; top:-80px; background:radial-gradient(circle,rgba(156,120,255,.32),transparent 70%); }
.access-glyph { display:grid; width:54px; height:54px; margin-bottom:44px; place-items:center; color:var(--ink); background:var(--gold); border-radius:16px; font-size:1.4rem; transform:rotate(8deg); }
.access-card label { display:block; margin-bottom:10px; font-size:.82rem; font-weight:800; letter-spacing:.08em; }
.access-card input { width:100%; height:62px; padding:0 17px; color:var(--ink); background:white; border:1px solid rgba(23,17,31,.16); border-radius:14px; outline:none; font:800 1.08rem/1 var(--sans); letter-spacing:.1em; text-transform:uppercase; transition:border-color .2s,box-shadow .2s; }
.access-card input:focus { border-color:var(--violet); box-shadow:0 0 0 4px rgba(109,74,255,.12); }
.access-card .primary-btn { width:100%; margin-top:14px; }
.access-card.is-loading .primary-btn { opacity:.7; pointer-events:none; }
.access-error { min-height:1.4em; margin:14px 0 0; color:#c53948; font-size:.82rem; text-align:center; }
.access-help { margin:5px 0 0; color:var(--muted); font-size:.72rem; line-height:1.6; text-align:center; }
.welcome-screen { display: flex; flex-direction: column; padding: 30px clamp(24px, 6vw, 88px) 24px; overflow: hidden; }
.topbar, .result-topbar { display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: .95rem; font-weight: 800; letter-spacing: .08em; }
.brand-mark { display: inline-grid; width: 28px; height: 28px; margin-right: 8px; place-items: center; color: var(--ink); background: var(--gold); border-radius: 50%; }
.edition { padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: .72rem; font-weight: 700; letter-spacing: .12em; }
.hero-grid { width: min(1180px, 100%); margin: auto; display: grid; grid-template-columns: 1.08fr .92fr; gap: clamp(48px, 8vw, 120px); align-items: center; }
.eyebrow { margin: 0 0 22px; color: var(--violet); font-size: .72rem; font-weight: 900; letter-spacing: .18em; }
.hero-copy h1 { max-width: 740px; margin: 0; font: 900 clamp(2.7rem, 5.7vw, 5.5rem)/1.12 var(--serif); letter-spacing: -.055em; }
.hero-copy h1 em { color: var(--violet); font-style: normal; text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: .12em; text-underline-offset: .12em; }
.intro { max-width: 620px; margin: 30px 0; color: #5f5867; font-size: clamp(1rem, 1.4vw, 1.17rem); line-height: 1.9; }
.primary-btn { display: inline-flex; min-height: 56px; padding: 0 24px; align-items: center; justify-content: center; gap: 46px; color: white; background: var(--ink); border: 0; border-radius: 14px; box-shadow: 0 11px 24px rgba(23,17,31,.18); cursor: pointer; font-weight: 800; transition: transform .2s ease, background .2s ease; }
.primary-btn:hover { transform: translateY(-2px); background: var(--violet); }
.primary-btn:focus-visible, .option-btn:focus-visible, .icon-btn:focus-visible, .text-btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.trust-row { display: flex; align-items: center; gap: 12px; margin-top: 24px; color: var(--muted); font-size: .79rem; }
.trust-row i { width: 3px; height: 3px; border-radius: 50%; background: var(--coral); }
.hero-card { position: relative; min-height: 500px; overflow: hidden; padding: 42px; color: white; background: var(--ink); border-radius: 36px 36px 120px 36px; box-shadow: 28px 30px 0 rgba(109,74,255,.13); isolation: isolate; }
.hero-card::before { content:""; position:absolute; width:300px; height:300px; right:-50px; top:-55px; background:radial-gradient(circle,var(--coral),transparent 65%); opacity:.65; z-index:-1; }
.card-index { font-size: .7rem; letter-spacing: .18em; opacity: .6; }
.hero-number { margin-top: 100px; font-size: clamp(5.5rem, 10vw, 9rem); font-weight: 900; letter-spacing: -.09em; line-height: .8; }
.hero-label { margin-top: 16px; font-family: var(--serif); font-size: 1.25rem; }
.spectrum { position: absolute; right: 42px; bottom: 45px; left: 42px; height: 92px; display: flex; align-items: flex-end; gap: 9px; }
.spectrum span { flex: 1; height: var(--h); background: linear-gradient(var(--gold), var(--violet-2)); border-radius: 999px 999px 3px 3px; }
.orbit { position: absolute; border: 1px solid rgba(255,255,255,.15); border-radius: 50%; }
.orbit-one { width: 260px; height:260px; right:-80px; bottom:20px; }
.orbit-two { width: 390px; height:390px; right:-165px; bottom:-50px; }
.spark { position:absolute; color:var(--gold); animation:float 4s ease-in-out infinite; }
.spark-a { top:70px; right:74px; font-size:2rem; }
.spark-b { top:160px; right:135px; font-size:.9rem; animation-delay:-2s; }
@keyframes float { 50% { transform: translateY(-10px) rotate(20deg); } }
.welcome-note { text-align:center; color:var(--muted); font-size:.72rem; letter-spacing:.08em; }

.quiz-screen { padding: 28px clamp(20px, 5vw, 64px); background: linear-gradient(145deg, #17111f 0%, #27173d 58%, #39205c 100%); color:white; }
.quiz-header { width:min(900px,100%); margin:auto; display:grid; grid-template-columns:44px 1fr 44px; align-items:center; gap:22px; }
.icon-btn { width:44px; height:44px; color:white; background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.12); border-radius:50%; cursor:pointer; }
.icon-btn:disabled { opacity:.25; cursor:not-allowed; }
.progress-meta { display:flex; justify-content:space-between; margin-bottom:9px; color:rgba(255,255,255,.58); font-size:.72rem; letter-spacing:.08em; }
.progress-meta strong { color:white; }
.progress-track { height:4px; overflow:hidden; background:rgba(255,255,255,.12); border-radius:99px; }
.progress-bar { width:6.25%; height:100%; background:linear-gradient(90deg,var(--gold),var(--coral)); border-radius:99px; transition:width .35s ease; }
.mini-mark { display:grid; place-items:center; color:var(--gold); font-size:1.2rem; }
.question-wrap { width:min(760px,100%); margin:clamp(72px, 10vh, 118px) auto 40px; }
.question-kicker { margin:0 0 18px; color:var(--gold); font-size:.73rem; font-weight:800; letter-spacing:.14em; }
.question-wrap h2 { min-height:2.5em; margin:0 0 38px; font:700 clamp(1.75rem, 4vw, 2.7rem)/1.35 var(--serif); letter-spacing:-.025em; }
.options { display:grid; gap:13px; }
.option-btn { width:100%; min-height:70px; padding:16px 20px; display:grid; grid-template-columns:36px 1fr; align-items:center; gap:12px; text-align:left; color:white; background:rgba(255,255,255,.055); border:1px solid rgba(255,255,255,.14); border-radius:17px; cursor:pointer; transition:transform .2s, background .2s, border-color .2s; }
.option-btn:hover { transform:translateX(5px); background:rgba(255,255,255,.11); border-color:rgba(255,207,99,.5); }
.option-letter { display:grid; width:32px; height:32px; place-items:center; color:var(--gold); border:1px solid rgba(255,207,99,.4); border-radius:10px; font-weight:800; }
.option-text { font-size:.96rem; line-height:1.55; }
.hint { margin-top:24px; color:rgba(255,255,255,.36); text-align:center; font-size:.74rem; }

.loading-screen { padding:30px; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; color:white; background:var(--ink); }
.loader-glyph { width:110px; height:110px; margin-bottom:34px; display:grid; place-items:center; border:1px solid rgba(255,255,255,.15); border-radius:50%; animation:spin 4s linear infinite; }
.loader-glyph span { color:var(--gold); font-size:2.2rem; }
@keyframes spin { to { transform:rotate(360deg); } }
.loading-screen h2 { margin:0; font:700 clamp(2rem,5vw,3.6rem)/1.32 var(--serif); }
.loading-track { width:min(380px,75vw); height:5px; margin:42px 0 18px; overflow:hidden; background:rgba(255,255,255,.1); border-radius:99px; }
.loading-track div { height:100%; width:40%; background:linear-gradient(90deg,var(--violet),var(--gold),var(--coral)); animation:load 1.4s ease-in-out infinite; }
@keyframes load { from { transform:translateX(-105%); } to { transform:translateX(255%); } }
#loading-copy { color:rgba(255,255,255,.55); font-size:.85rem; }

.result-screen { color:var(--ink); background:#f8f4ff; }
.result-topbar { padding:26px clamp(22px,6vw,80px); border-bottom:1px solid var(--line); }
.result-hero { position:relative; padding:72px clamp(22px,8vw,120px) 64px; overflow:hidden; color:white; background:var(--ink); }
.result-hero::after { content:"✦"; position:absolute; right:clamp(20px,10vw,150px); top:20px; color:rgba(255,207,99,.1); font-size:clamp(11rem,26vw,24rem); line-height:1; }
.result-stamp { display:inline-block; padding:7px 12px; color:var(--ink); background:var(--gold); border-radius:999px; font-size:.73rem; font-weight:800; }
.result-code { margin:28px 0 12px; color:var(--violet-2); font-size:.72rem; font-weight:800; letter-spacing:.16em; }
.result-hero h1 { position:relative; z-index:1; max-width:880px; margin:0; font:900 clamp(3rem,8vw,6.8rem)/1.08 var(--serif); letter-spacing:-.06em; }
.result-tagline { position:relative; z-index:1; max-width:700px; margin:26px 0 48px; color:rgba(255,255,255,.68); font-size:1.08rem; line-height:1.8; }
.rarity-row { position:relative; z-index:1; display:flex; align-items:center; gap:22px; }
.rarity-score { display:flex; align-items:flex-end; gap:9px; }
.rarity-score span { color:var(--gold); font-size:3.8rem; font-weight:900; line-height:.8; }
.rarity-score span::after { content:"%"; font-size:1.25rem; }
.rarity-score small { padding-bottom:3px; color:rgba(255,255,255,.55); font-size:.7rem; }
.rarity-row p { max-width:390px; margin:0; padding-left:22px; border-left:1px solid rgba(255,255,255,.18); color:rgba(255,255,255,.5); font-size:.75rem; line-height:1.6; }
.report-section, .action-section { width:min(1080px,calc(100% - 44px)); margin:0 auto; padding:76px 0; border-bottom:1px solid var(--line); }
.section-heading { display:flex; align-items:center; gap:14px; margin-bottom:32px; }
.section-heading span { display:grid; width:31px; height:31px; place-items:center; color:white; background:var(--violet); border-radius:50%; font-size:.7rem; font-weight:800; }
.section-heading h2 { margin:0; font:700 clamp(1.5rem,3vw,2rem) var(--serif); }
.strength-cards { display:grid; grid-template-columns:1fr 1fr; gap:18px; }
.strength-card { min-height:260px; padding:30px; border-radius:24px; }
.strength-card.primary { color:white; background:var(--violet); }
.strength-card.secondary { background:var(--gold); }
.strength-card .rank { font-size:.7rem; font-weight:800; letter-spacing:.12em; opacity:.65; }
.strength-card h3 { margin:50px 0 12px; font:800 clamp(1.7rem,4vw,2.6rem) var(--serif); }
.strength-card p { max-width:430px; margin:0; line-height:1.7; opacity:.76; }
blockquote { margin:0; padding:0; max-width:900px; border:0; font:700 clamp(1.55rem,3.6vw,2.55rem)/1.55 var(--serif); }
blockquote::before { content:"“"; color:var(--coral); }
blockquote::after { content:"”"; color:var(--coral); }
.rare-points { margin-top:42px; display:grid; grid-template-columns:repeat(3,1fr); gap:14px; }
.rare-point { padding:22px; background:white; border:1px solid var(--line); border-radius:18px; box-shadow:0 10px 32px rgba(23,17,31,.04); }
.rare-point strong { display:block; margin-bottom:9px; color:var(--violet); }
.rare-point p { margin:0; color:var(--muted); font-size:.86rem; line-height:1.7; }
.dimension-bars { display:grid; gap:18px; }
.dimension-row { display:grid; grid-template-columns:74px 1fr 44px; align-items:center; gap:15px; }
.dimension-name { font-size:.85rem; font-weight:700; }
.dimension-track { height:10px; overflow:hidden; background:#e9e2f1; border-radius:99px; }
.dimension-fill { height:100%; background:linear-gradient(90deg,var(--violet),var(--coral)); border-radius:99px; transform-origin:left; animation:grow .8s ease both; }
@keyframes grow { from { transform:scaleX(0); } }
.dimension-value { color:var(--muted); font-size:.78rem; text-align:right; }
.split-section { display:grid; grid-template-columns:1fr 1fr; gap:18px; }
.insight-card { min-height:280px; padding:30px; border-radius:24px; }
.insight-card.warm { background:#ffe6dd; }
.insight-card.dark { color:white; background:var(--ink); }
.card-label { margin:0 0 62px; font-size:.72rem; font-weight:800; letter-spacing:.1em; opacity:.55; }
.insight-card h3 { margin:0 0 13px; font:800 1.5rem var(--serif); }
.insight-card p:last-child { margin:0; line-height:1.75; opacity:.72; }
.action-section { text-align:center; border-bottom:0; }
.action-section h2 { margin:0 0 36px; font:800 clamp(1.8rem,4vw,3rem) var(--serif); }
.action-list { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; text-align:left; counter-reset:actions; }
.action-item { padding:24px; background:white; border:1px solid var(--line); border-radius:18px; counter-increment:actions; }
.action-item::before { content:"0" counter(actions); color:var(--coral); font-size:.72rem; font-weight:900; }
.action-item h3 { margin:22px 0 8px; font-size:1rem; }
.action-item p { margin:0; color:var(--muted); font-size:.85rem; line-height:1.7; }
.result-actions { display:flex; flex-direction:column; align-items:center; gap:16px; padding:12px 22px 54px; }
.text-btn { color:var(--muted); background:transparent; border:0; cursor:pointer; text-decoration:underline; text-underline-offset:4px; }
.share-feedback { min-height:1.5em; margin:-38px 0 30px; color:var(--violet); text-align:center; font-size:.8rem; }
.disclaimer { padding:24px; color:#8c8492; background:#eee8f3; text-align:center; font-size:.72rem; }

@media (max-width: 760px) {
  .access-screen { min-height:100svh; padding:22px 20px 18px; }
  .access-layout { margin:52px auto 30px; grid-template-columns:1fr; gap:34px; }
  .access-copy h1 { font-size:clamp(2.45rem,12vw,3.65rem); }
  .access-copy > p:last-child { margin-top:20px; font-size:.92rem; }
  .access-card { padding:26px 22px; border-radius:22px; box-shadow:12px 14px 0 rgba(255,207,99,.1); }
  .access-glyph { width:46px; height:46px; margin-bottom:28px; }
  .welcome-screen { min-height:100svh; padding:22px 20px 18px; }
  .hero-grid { margin:56px auto 24px; display:flex; flex-direction:column; gap:42px; align-items:stretch; }
  .hero-copy h1 { font-size:clamp(2.55rem,12vw,4rem); }
  .intro { margin:22px 0; font-size:.98rem; }
  .primary-btn { width:100%; }
  .hero-card { min-height:320px; padding:28px; border-radius:28px 28px 82px 28px; }
  .hero-number { margin-top:56px; }
  .spectrum { right:28px; bottom:30px; left:28px; height:68px; }
  .welcome-note { margin-top:15px; }
  .quiz-screen { padding:20px; }
  .quiz-header { grid-template-columns:40px 1fr 28px; gap:13px; }
  .icon-btn { width:40px; height:40px; }
  .question-wrap { margin-top:64px; }
  .question-wrap h2 { min-height:auto; margin-bottom:28px; font-size:1.8rem; }
  .option-btn { min-height:68px; padding:14px; }
  .result-topbar { padding:20px; }
  .result-topbar .edition { display:none; }
  .result-hero { padding:58px 22px 48px; }
  .result-tagline { margin-bottom:36px; }
  .rarity-row { align-items:flex-start; }
  .rarity-score { flex-direction:column; align-items:flex-start; gap:8px; }
  .rarity-row p { padding-left:15px; }
  .report-section, .action-section { width:calc(100% - 36px); padding:56px 0; }
  .strength-cards, .split-section, .action-list, .rare-points { grid-template-columns:1fr; }
  .strength-card { min-height:235px; }
  .dimension-row { grid-template-columns:60px 1fr 38px; gap:10px; }
  .card-label { margin-bottom:45px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration:.01ms !important; animation-iteration-count:1 !important; scroll-behavior:auto !important; }
}
