:root {
  --bg: #f5f5f7;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --blue: #0071e3;
  --line: #dedee3;
  --soft: #eeeef2;
  font-family: -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  color: var(--ink);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body { margin: 0; font-size: 15px; line-height: 1.55; }
button, input, textarea { font: inherit; }
button { color: inherit; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; opacity: .42; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid #0071e3; outline-offset: 5px; }
h1:focus { outline: none; }
[hidden] { display: none !important; }
h1,h2,p { margin: 0; }
h1,h2 { line-height: 1.18; letter-spacing: -.055em; font-weight: 700; word-break: keep-all; overflow-wrap: anywhere; }
h1 { font-size: clamp(30px, 4vw, 48px); }
h2 { font-size: 30px; }
label { display: block; font-size: 12px; }
strong { font-weight: 650; word-break: keep-all; overflow-wrap: anywhere; }
.app-shell { max-width: 1200px; min-height: 100svh; margin: auto; padding: 0 44px; display: flex; flex-direction: column; }
header { height: 76px; flex-shrink: 0; display: flex; align-items: center; gap: 20px; border-bottom: 1px solid #1d1d1f0d; }
.wordmark { border: 0; padding: 8px 0; background: none; font-size: 24px; font-weight: 800; letter-spacing: -1.5px; }
#modeLabel { margin-left: auto; font-size: 11px; color: #515158; background: #e9e9ed; border: 1px solid #fff; padding: 5px 12px; border-radius: 30px; }
.text-button { border: 0; background: none; padding: 12px 4px; min-height: 44px; font-size: 12px; font-weight: 500; color: var(--muted); }
.text-button:hover { color: var(--blue); }
main { flex: 1; display: flex; min-width: 0; }
footer { min-height: 54px; display: flex; justify-content: space-between; align-items: center; color: var(--muted); border-top: 1px solid #1d1d1f0d; font-size: 11px; }
footer .text-button { font-size: 11px; }
.stage { width: 100%; min-width: 0; padding: 38px 0; min-height: min(660px, calc(100svh - 130px)); }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .025em; }
.primary { border: 0; border-radius: 30px; background: var(--blue); color: white; padding: 15px 25px; min-height: 54px; font-size: 15px; font-weight: 550; display: flex; align-items: center; justify-content: center; gap: 25px; transition: background .2s, transform .2s, box-shadow .2s; }
.primary span { font-size: 22px; line-height: 1; }
.primary:hover { background: #0077ed; box-shadow: 0 6px 20px #0071e324; transform: translateY(-2px); }
.primary:active { transform: scale(.98); }
.secondary { border: 1px solid var(--line); background: #fff; border-radius: 24px; padding: 11px 23px; min-height: 44px; font-size: 13px; }
.secondary:hover:not(:disabled) { border-color: var(--blue); color: var(--blue); }
.fine { text-align: center; font-size: 11px; color: var(--muted); margin-top: 13px; }
/* The home balances an editorial headline with a quiet glass character. */
.home-stage { position: relative; display: grid; grid-template-columns: 1.15fr 1fr; align-items: center; column-gap: 30px; padding-top: 30px; padding-bottom: 24px; }
.home-intro { position: relative; z-index: 1; padding: 24px 0; }
.home-kicker { display: flex; align-items: center; gap: 8px; color: #5b5b63; font-size: 12px; margin-bottom: 24px; }
.home-kicker>span { width: 6px; height: 6px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 4px #0071e30b; }
.home-intro h1 { font-size: clamp(42px, 4.7vw, 64px); line-height: 1.18; letter-spacing: -.065em; }
.home-intro h1>span { color: #8b8b93; }
.home-copy { font-size: 16px; color: var(--muted); line-height: 1.8; margin-top: 25px; letter-spacing: -.025em; }
.home-bottom { margin-top: 30px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.home-bottom .primary { padding: 15px 25px; min-width: 188px; }
.home-fine { font-size: 11px; color: var(--muted); padding-left: 5px; }
.home-art { position: relative; width: 100%; height: 380px; display: grid; place-items: center; isolation: isolate; }
.home-art:before { content: ''; position: absolute; width: 88%; height: 70%; border-radius: 50%; background: radial-gradient(ellipse, #cddfff80, #e3e7f333 50%, transparent 72%); filter: blur(20px); z-index: -1; }
.glass-orb { position: relative; width: 274px; height: 274px; border-radius: 50%; transform: rotate(-12deg); background: radial-gradient(circle at 30% 22%, #fff 0, #ffffffd9 15%, transparent 40%), radial-gradient(circle at 72% 77%, #a3bee6a8, transparent 50%), linear-gradient(135deg, #f5f9ff, #d7e2ef 42%, #e8eef8 62%, #adbfda); border: 1px solid #fff; box-shadow: inset 6px 8px 22px #fff, inset -6px -9px 16px #7e97bd30, 15px 30px 40px -16px #7990b64d, -10px -10px 30px #fff; }
.glass-orb:after { content: ''; position: absolute; inset: 8px; border-radius: 50%; border: 1px solid #ffffff90; border-bottom-color: #ffffff20; }
.orb-eyes { position: absolute; inset: 93px 52px 83px; display: flex; justify-content: space-between; transform: rotate(12deg); }
.orb-eyes i { width: 57px; border-radius: 50%; background: linear-gradient(120deg, #fff, #f0f5ff 70%, #aebed6); box-shadow: 2px 4px 10px #5e759330, inset 0 2px 3px white; position: relative; }
.orb-eyes i:after { content: ''; position: absolute; width: 23px; height: 34px; top: 29px; left: 24px; border-radius: 50%; background: radial-gradient(circle at 35% 25%, #627284, #262f3c 55%, #141c27); box-shadow: 0 2px 3px #fff; }
.orb-shine { position: absolute; left: 52px; top: 27px; width: 90px; height: 24px; border-radius: 50%; background: #ffffffa8; filter: blur(10px); transform: rotate(-23deg); }
.orbit { position: absolute; width: 360px; height: 360px; border: 1px solid #cdd6e650; border-radius: 50%; z-index: -1; }
.orbit-two { width: 430px; height: 430px; border-color: #d8dfea50; }
.floating-note { position: absolute; padding: 11px 16px; border: 1px solid #ffffffed; border-radius: 15px; background: #ffffffb5; backdrop-filter: blur(16px); box-shadow: 0 8px 24px #2f4d7c08; font-size: 11px; color: #5a6474; display: flex; align-items: center; gap: 9px; }
.note-one { top: 53px; right: 5px; transform: rotate(6deg); }
.note-one i { width: 6px; height: 6px; background: #75a5df; border-radius: 50%; }
.note-two { bottom: 62px; left: -7px; transform: rotate(-6deg); }
.note-two span { color: var(--blue); }
.art-caption { position: absolute; bottom: 5px; font-size: 9px; letter-spacing: .21em; color: #9299a6; }
.home-foot { grid-column: 1/-1; text-align: center; padding-top: 35px; }
.home-steps { display: flex; justify-content: center; align-items: center; gap: 27px; font-size: 12px; color: #626269; padding-bottom: 19px; }
.home-steps b { font-size: 10px; font-weight: 500; margin-right: 9px; color: #8b8b92; font-variant-numeric: tabular-nums; }
.home-steps i { width: 35px; height: 1px; background: var(--line); }
.learning-choice { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; font-size: 11px; color: var(--muted); cursor: pointer; }
.learning-choice input { width: 16px; height: 16px; accent-color: var(--blue); margin: 0; }
.setup-note { font-size: 10px; color: var(--muted); }
.challenge-note { display: inline-block; font-size: 12px; background: #e7f0fe; color: #2863a7; border-radius: 12px; padding: 7px 13px; margin-top: 16px; }
/* Shared play surfaces. */
.question-stage, .reveal-stage, .result-stage, .detail-stage { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; }
.round-meta, .result-top { display: flex; align-items: center; justify-content: space-between; min-height: 35px; font-size: 12px; color: var(--muted); }
.question-count { color: var(--ink); font-size: 19px; font-weight: 600; font-variant-numeric: tabular-nums; }
.question-count span { font-size: 12px; color: var(--muted); margin-left: 4px; font-weight: 400; }
.tracks { width: 100%; display: flex; gap: 5px; margin-top: 15px; }
.tracks span { flex: 1; height: 3px; background: #e1e1e6; border-radius: 5px; }
.tracks .done { background: #9abfe9; }
.tracks .current { background: var(--blue); }
.question-copy { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 60px 0; }
.question-copy h1 { max-width: 720px; }
.question-copy .sub { margin-top: 15px; font-size: 20px; color: var(--muted); word-break: keep-all; }
.sealed-note { margin-top: 22px; background: #e8eff8; color: #4c6e97; font-size: 11px; border-radius: 20px; padding: 6px 12px; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.choice { min-height: 156px; border: 1px solid #e3e3e8; border-radius: 24px; background: #fff; padding: 28px; text-align: left; display: flex; flex-direction: column; justify-content: space-between; gap: 19px; font-size: 19px; font-weight: 600; letter-spacing: -.03em; line-height: 1.5; transition: border-color .18s, box-shadow .18s, transform .18s, background .18s; word-break: keep-all; }
.choice-number { font-size: 11px; color: var(--muted); font-weight: 500; border: 1px solid #e6e6eb; border-radius: 50%; width: 25px; height: 25px; display: grid; place-items: center; }
.choice.selected { background: #e8f2ff; border-color: var(--blue); transform: scale(.985); opacity: 1; }
@media(hover:hover) { .choice:hover:not(:disabled) { border-color: #96b9e4; box-shadow: 0 8px 24px #1f385c08; transform: translateY(-3px); } }
.stage-bottom .primary, .result-bottom>.primary { width: 100%; }
.reveal-dots { display: flex; gap: 10px; margin: 16px 0 25px; }
.reveal-dots span { flex: 1; height: 30px; display: grid; place-items: center; background: #eaeaef; color: var(--muted); border-radius: 8px; font-size: 11px; }
.reveal-dots .current { background: var(--blue); color: white; }
.reveal-dots .done { background: #e0ebfa; color: #376ba8; }
.sealed-prediction { flex: 1; min-height: 280px; position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; padding: 40px; border: 1px solid white; border-radius: 28px; background: linear-gradient(125deg,#fff,#eef3fb); box-shadow: 0 12px 32px #233f6105; margin-bottom: 25px; }
.sealed-prediction .eyebrow { color: var(--blue); margin-bottom: 15px; }
.sealed-prediction h1 { max-width: 550px; font-size: 38px; }
.folded-number { position: absolute; right: 12px; bottom: -45px; font-size: 240px; letter-spacing: -.08em; color: #dbe4f180; font-weight: 750; z-index: -1; }
.seal-tab { position: absolute; top: 23px; right: 25px; font-size: 11px; color: var(--muted); }
.prediction { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 30px 0 45px; }
.prediction-heading { display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.result-badge { background: #e1eee8; color: #247451; font-size: 12px; border-radius: 20px; padding: 6px 13px; flex-shrink: 0; }
.result-badge.miss { background: #f8e8e6; color: #a65048; }
.paper-question { margin-top: 14px; color: var(--muted); font-size: 14px; }
.prediction-body { display: grid; grid-template-columns: 1fr 1.5fr; gap: 30px; margin: 35px 0; padding: 30px; background: white; border: 1px solid #e9e9ee; border-radius: 24px; }
.confidence { display: flex; flex-direction: column; justify-content: center; }
.confidence>span { font-size: 76px; letter-spacing: -.06em; line-height: 1.1; font-weight: 650; }
.confidence small { font-size: .35em; margin-left: 4px; }
.confidence label { color: var(--muted); margin-top: 8px; }
.answer-pair { display: flex; flex-direction: column; gap: 20px; padding-left: 28px; border-left: 1px solid var(--line); }
.answer-pair label, .detail-answers label { color: var(--muted); margin-bottom: 6px; }
.answer-pair strong { display: block; font-size: 17px; }
.reaction { color: var(--muted); font-size: 13px; text-align: center; }
.result-stage { gap: 23px; }
.result-main { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 30px; padding-top: 15px; }
.result-title h1 { font-size: 44px; }
.result-title p { margin-top: 12px; font-size: 12px; color: var(--muted); }
.score { display: flex; gap: 30px; justify-content: center; align-items: center; }
.score>div { width: 130px; padding: 16px; border-radius: 24px; }
.score label { font-size: 12px; color: var(--muted); }
.score strong { font-size: 82px; line-height: 1.2; letter-spacing: -.07em; font-weight: 650; }
.score .you { background: #e5effd; color: #1a67bc; }
.score-divider { font-size: 35px; color: #b4b4bc; }
.moments { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.moments>div { background: white; border: 1px solid #e8e8ed; border-radius: 18px; padding: 18px 22px; }
.moments label { color: var(--muted); font-size: 11px; margin-bottom: 6px; }
.moments strong { font-size: 17px; }
.result-links { display: flex; justify-content: center; gap: 38px; margin-top: 7px; }
.learning-note, .learning-stats { font-size: 11px !important; }
.detail-content { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 40px 0; }
.detail-content .eyebrow { color: var(--muted); margin-bottom: 20px; }
.detail-content h1 { font-size: 36px; }
.detail-answers { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 32px; }
.detail-answers>div { background: #fff; border-radius: 20px; padding: 24px; }
.detail-answers strong { font-size: 18px; }
.detail-nav { display: flex; justify-content: space-between; align-items: center; gap: 15px; font-size: 12px; color: var(--muted); }
.waiting-stage, .error-stage { max-width: 650px; margin: auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; text-align: center; }
.waiting-stage p, .error-stage p { color: var(--muted); font-size: 14px; }
.error-stage .stage-bottom { margin-top: 14px; display: grid; gap: 12px; width: min(100%,340px); }
.waiting-graphic { display: flex; gap: 10px; margin-bottom: 16px; }
.waiting-graphic span { width: 35px; height: 52px; border: 1px solid #fff; border-radius: 50%; background: linear-gradient(125deg,#fff,#cad9ee); box-shadow: 0 6px 16px #1c315a10; position: relative; }
.waiting-graphic span:after { content: ''; position: absolute; width: 13px; height: 19px; left: 14px; top: 17px; border-radius: 50%; background: #344052; animation: blink 2s ease-in-out infinite; }
dialog { position: fixed; width: min(460px,calc(100% - 32px)); max-height: calc(100dvh - 40px); border: 1px solid #fff; border-radius: 28px; padding: 30px; background: #fafafcf5; color: var(--ink); box-shadow: 0 30px 100px #0002; overflow: auto; overscroll-behavior: contain; }
dialog::backdrop { background: #171d2940; backdrop-filter: blur(8px); }
.dialog-close { display: block; margin: -8px -6px 12px auto; border: 0; border-radius: 18px; padding: 10px 12px; min-height: 44px; background: #eaeaef; font-size: 12px; }
dialog h2 { margin-bottom: 20px; }
dialog p { font-size: 13px; line-height: 1.8; margin-bottom: 16px; color: #626269; }
dialog .secondary { width: 100%; margin-top: 8px; }
#previewDialog { height: min(760px,calc(100dvh - 40px)); padding: 22px; }
#previewDialog[open] { display: flex; flex-direction: column; }
#previewDialog .dialog-close { flex-shrink: 0; }
#imagePreview { width: 100%; min-height: 0; flex: 1; object-fit: contain; border-radius: 12px; }
.copy-box { width: 100%; resize: vertical; min-height: 130px; border: 1px solid var(--line); background: white; border-radius: 12px; padding: 14px; font-size: 13px; color: var(--ink); }
#toast { position: fixed; left: 50%; bottom: max(24px,env(safe-area-inset-bottom)); transform: translate(-50%,12px); width: max-content; max-width: calc(100% - 32px); background: #252528ed; color: white; border-radius: 18px; padding: 13px 20px; font-size: 12px; opacity: 0; pointer-events: none; transition: opacity .2s,transform .2s; z-index: 5; }
#toast.show { opacity: 1; transform: translate(-50%,0); }
.page-enter { animation: enter .3s ease-out; }
.unfolded { animation: enter .35s ease-out; }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes blink { 0%,40%,100% { transform: scaleY(1); } 50% { transform: scaleY(.15); } }
@media(min-width: 1000px) and (min-height: 850px) { .home-stage { padding-top: 60px; } .home-art { height: 420px; } .glass-orb { width: 300px; height: 300px; } .orb-eyes { inset: 103px 62px 99px; } }
@media(max-width: 850px) {
  .app-shell { padding: 0 28px; }
  .home-stage { column-gap: 0; }
  .home-intro h1 { font-size: 46px; }
  .glass-orb { width: 230px; height: 230px; }
  .orb-eyes { inset: 75px 42px 73px; }
  .orb-eyes i { width: 50px; }
  .orb-eyes i:after { width: 21px; height: 29px; top: 24px; left: 22px; }
  .orbit { width: 280px; height: 280px; }
  .orbit-two { width: 330px; height: 330px; }
  .note-one { right: 0; top: 63px; }
  .note-two { left: 0; bottom: 68px; }
}
@media(max-width: 600px) {
  .app-shell { padding: 0 22px; }
  header { height: 64px; gap: 12px; }
  .wordmark { font-size: 22px; }
  #modeLabel { font-size: 10px; padding: 4px 9px; }
  header #reset { font-size: 11px; }
  footer { min-height: 50px; padding-bottom: env(safe-area-inset-bottom); }
  .footer-note { font-size: 10px; }
  .stage { min-height: calc(100svh - 114px); padding: 24px 0; }
  .home-stage { grid-template-columns: 1fr; padding: 30px 0 18px; align-content: center; }
  .home-intro { text-align: center; padding: 0; }
  .home-kicker { justify-content: center; font-size: 11px; margin-bottom: 19px; }
  .home-intro h1 { font-size: clamp(36px,10.4vw,49px); }
  .home-copy { margin-top: 18px; font-size: 14px; line-height: 1.7; }
  .home-bottom { margin-top: 23px; align-items: center; gap: 10px; }
  .home-bottom .primary { min-width: 180px; min-height: 50px; }
  .home-art { height: 235px; margin: 16px auto 0; max-width: 360px; }
  .glass-orb { width: 180px; height: 180px; }
  .orb-eyes { inset: 60px 34px 55px; }
  .orb-eyes i { width: 38px; }
  .orb-eyes i:after { width: 16px; height: 24px; top: 18px; left: 16px; }
  .orb-shine { left: 32px; top: 18px; width: 65px; height: 15px; }
  .orbit { width: 210px; height: 210px; }
  .orbit-two { width: 250px; height: 250px; }
  .floating-note { font-size: 9px; padding: 9px 12px; border-radius: 12px; }
  .note-one { top: 24px; right: 2px; }
  .note-two { bottom: 35px; left: 2px; }
  .art-caption { bottom: -2px; font-size: 8px; }
  .home-foot { padding-top: 23px; }
  .home-steps { gap: 10px; font-size: 10px; padding-bottom: 8px; }
  .home-steps b { font-size: 9px; margin-right: 4px; }
  .home-steps i { width: 12px; }
  .learning-choice { font-size: 10px; min-height: 40px; }
  .question-copy { padding: 45px 0; }
  .question-copy h1 { font-size: 31px; }
  .question-copy .sub { font-size: 17px; line-height: 1.6; margin-top: 14px; }
  .choices { grid-template-columns: 1fr; gap: 12px; }
  .choice { min-height: 106px; padding: 21px; border-radius: 20px; font-size: 17px; flex-direction: row; justify-content: flex-start; align-items: center; gap: 17px; }
  .choice-number { flex-shrink: 0; }
  .tracks { gap: 4px; }
  .reveal-dots { gap: 5px; margin: 15px 0 20px; }
  .reveal-dots span { height: 26px; font-size: 10px; border-radius: 6px; }
  .sealed-prediction { min-height: 300px; padding: 26px; border-radius: 22px; }
  .sealed-prediction h1 { font-size: 30px; }
  .folded-number { font-size: 190px; bottom: -28px; }
  .prediction-heading h1 { font-size: 34px; }
  .prediction { padding: 25px 0 32px; }
  .prediction-body { gap: 17px; padding: 22px 18px; margin: 25px 0; grid-template-columns: .9fr 1.3fr; }
  .confidence>span { font-size: 56px; }
  .confidence label { font-size: 10px; }
  .answer-pair { padding-left: 17px; gap: 17px; }
  .answer-pair label { font-size: 10px; }
  .answer-pair strong { font-size: 14px; }
  .result-stage { gap: 20px; }
  .result-main { gap: 25px; padding: 22px 0 5px; }
  .result-title h1 { font-size: 35px; }
  .score { gap: 20px; }
  .score>div { width: 110px; padding: 12px; }
  .score strong { font-size: 70px; }
  .moments { gap: 10px; }
  .moments>div { padding: 16px; }
  .moments strong { font-size: 14px; }
  .result-links { gap: 22px; }
  .result-links .text-button { font-size: 11px; }
  .detail-content h1 { font-size: 30px; }
  .detail-answers { grid-template-columns: 1fr; gap: 12px; margin-top: 25px; }
  .detail-answers>div { padding: 20px; }
  .detail-answers strong { font-size: 16px; }
  dialog { padding: 24px; border-radius: 24px; }
  dialog h2 { font-size: 27px; }
}
@media(max-width: 360px) {
  .app-shell { padding: 0 18px; }
  .home-intro h1 { font-size: 36px; }
  .home-steps { gap: 7px; font-size: 9px; }
  .question-copy h1 { font-size: 27px; }
  .confidence>span { font-size: 47px; }
  .prediction-body { gap: 12px; padding: 18px 14px; }
  .score { gap: 12px; }
  .moments>div { padding: 13px; }
}
@media(max-height: 700px) and (min-width: 601px) {
  .stage { min-height: 510px; }
  .home-art { height: 330px; }
  .home-foot { padding-top: 14px; }
  .question-copy { padding: 35px 0; }
}
@media(prefers-reduced-motion: reduce) { *, *:before, *:after { animation: none !important; transition: none !important; } }
