:root {
  color-scheme: light;
  --ink: #071735;
  --muted: #53627c;
  --blue: #0a6cff;
  --blue-2: #2aa8ff;
  --cyan: #10c7c0;
  --coral: #ff7164;
  --green: #64c95c;
  --gold: #ffb61f;
  --surface: rgba(255, 255, 255, .84);
  --line: #dce8f7;
  --shadow: 0 18px 50px rgba(31, 79, 139, .12), 0 2px 8px rgba(24, 75, 138, .06);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
html { background: #f7fbff; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(42, 168, 255, .12), transparent 26rem),
    radial-gradient(circle at 91% 27%, rgba(16, 199, 192, .09), transparent 23rem),
    linear-gradient(165deg, #fff 0%, #f9fcff 45%, #f2f9ff 100%);
  overscroll-behavior-y: none;
}
button { font: inherit; }
button, [role="button"] { -webkit-tap-highlight-color: transparent; }
button:focus-visible, [role="button"]:focus-visible { outline: 3px solid rgba(10, 108, 255, .26); outline-offset: 3px; }
.hidden { visibility: hidden; pointer-events: none; }

.app-shell {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
}
.aurora { position: fixed; z-index: -1; border-radius: 50%; filter: blur(4px); pointer-events: none; }
.aurora-a { width: 22rem; height: 22rem; top: -12rem; left: -10rem; background: rgba(36, 153, 255, .12); }
.aurora-b { width: 28rem; height: 28rem; right: -18rem; bottom: -16rem; background: rgba(22, 201, 187, .09); }

.app-header {
  position: relative;
  z-index: 5;
  height: calc(74px + env(safe-area-inset-top));
  padding: calc(12px + env(safe-area-inset-top)) 18px 8px;
  display: grid;
  grid-template-columns: 54px 1fr 54px;
  align-items: center;
  max-width: 720px;
  margin: 0 auto;
}
.brand { justify-self: center; display: flex; align-items: center; gap: 9px; color: var(--blue); font-weight: 700; letter-spacing: -.02em; }
.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  color: var(--blue);
  font-size: 27px;
  font-weight: 850;
  line-height: 1;
}
.brand-mark::before, .brand-mark::after, .brand-mark span::before {
  content: "";
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 2px white;
}
.brand-mark::before { left: 2px; top: 7px; }
.brand-mark::after { left: 3px; bottom: 5px; }
.brand-mark span::before { left: -16px; top: 1px; }
.brand-name { font-size: 16px; white-space: nowrap; }
.icon-button, .text-button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.icon-button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,.82);
  box-shadow: 0 8px 24px rgba(45,80,123,.1), inset 0 0 0 1px rgba(218,229,244,.8);
}
.icon-button svg { width: 25px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.text-button { justify-self: end; color: var(--blue); font-size: 14px; font-weight: 700; }

#screen { min-height: calc(100svh - 74px - env(safe-area-inset-top)); outline: none; }
.screen { width: min(100%, 680px); min-height: inherit; margin: 0 auto; padding: 6px 20px calc(24px + env(safe-area-inset-bottom)); }
.reveal { animation: enter .52s cubic-bezier(.2,.8,.2,1) both; }
.reveal-delay { animation-delay: .08s; }
.reveal-delay-2 { animation-delay: .16s; }
@keyframes enter { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.035); } }

.home-screen { display: flex; flex-direction: column; justify-content: space-between; gap: 8px; text-align: center; }
.hero-copy { margin-top: 2px; }
.eyebrow {
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 999px;
  color: #08746f;
  background: rgba(16,199,192,.1);
  border: 1px solid rgba(16,199,192,.2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
h1, h2, p { margin-top: 0; }
.hero-copy h1 {
  margin: 12px 0 8px;
  color: var(--ink);
  font-size: clamp(42px, 12vw, 62px);
  line-height: .98;
  letter-spacing: -.058em;
  font-weight: 850;
}
.hero-copy h1 span { color: var(--blue); }
.hero-copy h1 i { display: inline-block; width: 18px; height: 18px; margin-left: 7px; border-top: 4px solid var(--cyan); border-right: 4px solid var(--cyan); transform: rotate(-15deg); border-radius: 2px; }
.hero-copy p { max-width: 490px; margin: 0 auto; color: var(--muted); font-size: clamp(16px, 4.4vw, 20px); line-height: 1.45; }

.pattern-orbit { position: relative; width: min(82vw, 360px); aspect-ratio: 1; margin: 4px auto; }
.orbit-ring { position: absolute; inset: 16%; border: 2px dashed #d7e5f5; border-radius: 50%; animation: slow-spin 35s linear infinite; }
@keyframes slow-spin { to { transform: rotate(360deg); } }
.brain-core {
  position: absolute;
  inset: 31%;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--blue);
  background: radial-gradient(circle at 35% 28%, #fff, #e7f5ff 62%, #d7efff);
  box-shadow: 0 18px 42px rgba(10,108,255,.2), inset 0 0 0 1px rgba(10,108,255,.12);
  animation: pulse 4s ease-in-out infinite;
}
.brain-core svg { width: 68%; fill: none; stroke: currentColor; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.orbit-node { position: absolute; display: grid; place-items: center; gap: 3px; color: var(--ink); font-size: 11px; font-weight: 850; }
.orbit-node > span { width: 62px; height: 62px; display: grid; place-items: center; border-radius: 22px; background: rgba(255,255,255,.9); box-shadow: var(--shadow); border: 1px solid currentColor; font-size: 30px; }
.orbit-node svg { width: 31px; height: 31px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.node-why { top: 0; left: 50%; transform: translateX(-50%); color: var(--cyan); }
.node-see { left: 0; top: 31%; color: var(--blue-2); }
.node-do { right: 0; top: 31%; color: var(--coral); }
.node-connect { left: 13%; bottom: 1%; color: var(--green); }
.node-explain { right: 13%; bottom: 1%; color: var(--gold); }
.orbit-node b { color: var(--ink); letter-spacing: .03em; }
.home-actions { margin-top: 2px; }

.primary-button, .secondary-button, .share-button {
  width: 100%;
  min-height: 58px;
  border-radius: 20px;
  border: 0;
  cursor: pointer;
  font-weight: 800;
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}
.primary-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: white;
  background: linear-gradient(120deg, #0564f4, #1185ff);
  box-shadow: 0 16px 30px rgba(10,108,255,.25), inset 0 1px rgba(255,255,255,.24);
  font-size: 19px;
}
.primary-button span { font-size: 25px; font-weight: 500; }
.primary-button:active, .secondary-button:active, .option-button:active, .share-button:active { transform: scale(.985); }
.primary-button:disabled { opacity: .45; box-shadow: none; cursor: default; }
.microcopy { margin: 9px 0 0; color: #7a879b; font-size: 12px; }

.quiz-screen { display: flex; flex-direction: column; }
.progress-wrap { margin: 3px 4px 15px; }
.progress-track { height: 7px; overflow: hidden; border-radius: 999px; background: #e7edf7; }
.progress-fill { height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--blue-2)); transition: width .35s cubic-bezier(.2,.8,.2,1); }
.question-number { margin: 9px 0 0; color: var(--muted); text-align: center; font-size: 14px; font-weight: 650; }
.question-card { flex: 1; display: flex; flex-direction: column; }
.question-kicker { margin: 2px 0 7px; color: var(--blue); text-align: center; font-size: 12px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.question-title { margin: 0 auto 14px; max-width: 600px; text-align: center; font-size: clamp(28px, 8vw, 42px); line-height: 1.06; letter-spacing: -.04em; }
.question-visual { width: min(100%, 420px); height: 122px; margin: 0 auto 14px; position: relative; display: grid; place-items: center; border-radius: 28px; border: 1px solid rgba(10,108,255,.12); background: linear-gradient(135deg, rgba(255,255,255,.92), rgba(231,247,255,.84)); box-shadow: var(--shadow); overflow: hidden; }
.question-visual::before, .question-visual::after { content: ""; position: absolute; border-radius: 50%; filter: blur(1px); }
.question-visual::before { width: 150px; height: 150px; left: -50px; bottom: -90px; background: rgba(255,182,31,.14); }
.question-visual::after { width: 170px; height: 170px; right: -60px; top: -100px; background: rgba(16,199,192,.14); }
.visual-icon { position: relative; z-index: 1; width: 76px; height: 76px; display: grid; place-items: center; border-radius: 28px; color: var(--blue); background: #fff; box-shadow: 0 14px 34px rgba(10,108,255,.2); }
.visual-icon svg { width: 45px; height: 45px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.visual-spark { position: absolute; z-index: 2; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); box-shadow: 110px -25px var(--coral), -112px 26px var(--cyan), 92px 38px var(--green); }
.options { display: grid; gap: 9px; width: min(100%, 520px); margin: 0 auto; }
.option-button {
  width: 100%;
  min-height: 61px;
  padding: 9px 13px;
  display: grid;
  grid-template-columns: 42px 1fr 25px;
  gap: 12px;
  align-items: center;
  text-align: left;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 19px;
  background: rgba(255,255,255,.83);
  box-shadow: 0 7px 20px rgba(37,75,123,.06);
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background .18s ease;
}
.option-button:hover { border-color: #aacdfb; }
.option-button.selected { border-color: var(--blue); background: rgba(240,248,255,.96); box-shadow: 0 10px 28px rgba(10,108,255,.13), inset 0 0 0 1px var(--blue); }
.option-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 15px; color: var(--option-color); background: color-mix(in srgb, var(--option-color) 10%, white); font-size: 21px; font-weight: 850; }
.option-copy { font-size: 15px; line-height: 1.25; font-weight: 650; }
.option-check { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; color: transparent; background: #edf2f8; font-size: 14px; font-weight: 900; }
.option-button.selected .option-check { color: white; background: var(--blue); }
.quiz-actions { width: min(100%, 520px); margin: 13px auto 0; }

.analysis-screen { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; }
.analysis-screen h1 { margin: 5px 0 2px; font-size: clamp(38px, 10.5vw, 56px); line-height: 1; letter-spacing: -.05em; }
.analysis-screen > p { max-width: 460px; color: var(--muted); font-size: 18px; line-height: 1.4; }
.analysis-visual { position: relative; width: min(78vw, 340px); aspect-ratio: 1; margin: 5px auto 1px; }
.analysis-visual .pattern-orbit { width: 100%; }
.analysis-visual .orbit-node > span { animation: signal 1.25s ease-in-out infinite alternate; }
.analysis-visual .node-see > span { animation-delay: .15s; }
.analysis-visual .node-do > span { animation-delay: .3s; }
.analysis-visual .node-connect > span { animation-delay: .45s; }
.analysis-visual .node-explain > span { animation-delay: .6s; }
@keyframes signal { to { transform: translateY(-3px); box-shadow: 0 12px 30px color-mix(in srgb, currentColor 22%, transparent); } }
.analysis-progress { width: min(70vw, 260px); margin-top: 2px; }
.analysis-percent { margin: 0 0 8px; font-size: 32px; font-weight: 850; color: var(--blue); }
.analysis-caption { color: var(--muted); font-size: 14px; }

.result-screen { padding-bottom: calc(30px + env(safe-area-inset-bottom)); text-align: center; }
.result-label { margin: 2px 0 7px; color: var(--blue); font-size: 12px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.result-screen h1 { margin: 0; font-size: clamp(33px, 9vw, 52px); line-height: 1.03; letter-spacing: -.05em; }
.result-screen h1 span { display: block; color: var(--blue); }
.result-summary { max-width: 510px; margin: 9px auto 14px; color: var(--muted); font-size: 17px; line-height: 1.43; }
.result-emblem { position: relative; width: 170px; height: 170px; margin: 4px auto 14px; display: grid; place-items: center; border-radius: 50%; color: var(--blue); background: radial-gradient(circle at 36% 30%, #fff, #e6f5ff 68%, #d4efff); box-shadow: 0 18px 44px rgba(10,108,255,.19), inset 0 0 0 1px rgba(10,108,255,.14); }
.result-emblem::before { content: ""; position: absolute; inset: -12px; border: 2px dashed #cfe2f7; border-radius: inherit; animation: slow-spin 28s linear infinite; }
.result-emblem svg { width: 92px; height: 92px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.secondary-card { max-width: 520px; margin: 0 auto 15px; padding: 13px 16px; display: flex; align-items: center; gap: 13px; text-align: left; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); }
.secondary-card .option-icon { flex: 0 0 auto; }
.secondary-card small { display: block; color: var(--muted); font-size: 12px; }
.secondary-card strong { display: block; margin-top: 2px; font-size: 17px; }
.score-bars { max-width: 520px; margin: 0 auto 16px; display: grid; gap: 9px; text-align: left; }
.score-row { display: grid; grid-template-columns: 27px 72px 1fr; align-items: center; gap: 7px; }
.score-symbol { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 50%; color: var(--score-color); background: color-mix(in srgb, var(--score-color) 10%, white); font-weight: 850; }
.score-name { font-size: 12px; font-weight: 850; }
.score-track { height: 12px; overflow: hidden; border-radius: 999px; background: #eaf0f7; }
.score-fill { height: 100%; width: 0; border-radius: inherit; background: var(--score-color); transition: width .7s .2s cubic-bezier(.2,.8,.2,1); }
.result-actions { max-width: 520px; margin: 0 auto; }
.secondary-button { color: var(--blue); background: white; border: 1px solid #acd0ff; font-size: 16px; }

.guide-screen { text-align: center; }
.guide-screen h1 { margin: 5px auto 7px; max-width: 540px; font-size: clamp(32px, 9vw, 48px); line-height: 1.04; letter-spacing: -.045em; }
.guide-screen > p { max-width: 500px; margin: 0 auto 16px; color: var(--muted); line-height: 1.45; }
.tips { max-width: 540px; margin: 0 auto 16px; display: grid; gap: 10px; text-align: left; counter-reset: tip; }
.tip-card { position: relative; padding: 15px 15px 15px 58px; min-height: 76px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: 0 8px 22px rgba(37,75,123,.06); counter-increment: tip; }
.tip-card::before { content: counter(tip); position: absolute; left: 14px; top: 15px; width: 31px; height: 31px; display: grid; place-items: center; border-radius: 11px; color: white; background: linear-gradient(145deg, var(--blue), var(--blue-2)); font-weight: 850; }
.tip-card strong { display: block; margin-bottom: 3px; }
.tip-card span { color: var(--muted); font-size: 14px; line-height: 1.35; }
.guide-actions { max-width: 540px; margin: 0 auto; display: grid; gap: 9px; }

.share-screen { text-align: center; }
.share-screen h1 { margin: 5px 0 5px; font-size: clamp(36px, 10vw, 52px); letter-spacing: -.05em; }
.share-screen > p { color: var(--muted); }
.share-card {
  --share-accent: var(--blue);
  position: relative;
  width: min(100%, 440px);
  aspect-ratio: 4 / 5;
  margin: 13px auto 16px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  border-radius: 30px;
  border: 1px solid #dbe9f7;
  background:
    radial-gradient(circle at 85% 14%, color-mix(in srgb, var(--share-accent) 18%, transparent), transparent 34%),
    radial-gradient(circle at 10% 90%, rgba(16,199,192,.14), transparent 34%),
    linear-gradient(155deg, #fff, #edf7ff);
  box-shadow: 0 22px 55px rgba(29,77,135,.16);
}
.share-card::before, .share-card::after { content: ""; position: absolute; border-radius: 50%; border: 2px dashed rgba(10,108,255,.12); }
.share-card::before { width: 280px; height: 280px; left: -130px; bottom: -120px; }
.share-card::after { width: 190px; height: 190px; right: -80px; top: -70px; }
.share-brand { position: relative; z-index: 1; align-self: flex-start; display: flex; align-items: center; gap: 7px; color: var(--blue); font-size: 13px; font-weight: 850; }
.share-brand .brand-mark { width: 28px; height: 28px; font-size: 22px; }
.share-card-copy { position: relative; z-index: 1; }
.share-pill { display: inline-flex; padding: 5px 11px; border-radius: 999px; color: white; background: var(--share-accent); font-size: 11px; font-weight: 800; }
.share-card h2 { margin: 13px 0 5px; font-size: clamp(28px, 8vw, 40px); line-height: 1.03; letter-spacing: -.045em; }
.share-card h2 span { display: block; color: var(--share-accent); }
.share-card-copy p { max-width: 310px; margin: 10px auto 0; color: #42516c; line-height: 1.4; }
.share-card .result-emblem { z-index: 1; width: 125px; height: 125px; margin: 3px 0; box-shadow: 0 14px 34px color-mix(in srgb, var(--share-accent) 18%, transparent); color: var(--share-accent); }
.share-card .result-emblem svg { width: 70px; height: 70px; }
.share-secondary { position: relative; z-index: 1; color: #53627c; font-size: 13px; }
.share-secondary strong { color: var(--ink); }
.share-actions { width: min(100%, 440px); margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.share-button { color: var(--blue); background: white; border: 1px solid #acd0ff; font-size: 15px; }
.share-button.primary { color: white; border-color: transparent; background: linear-gradient(120deg, #0564f4, #1185ff); box-shadow: 0 14px 28px rgba(10,108,255,.22); }
.share-note { margin: 12px 0 0; color: #7a879b !important; font-size: 12px; }
.toast { position: fixed; z-index: 20; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translate(-50%, 18px); padding: 11px 15px; border-radius: 999px; color: white; background: rgba(6,23,51,.9); box-shadow: 0 12px 32px rgba(0,0,0,.2); opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; font-size: 13px; font-weight: 700; white-space: nowrap; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 390px) {
  .app-header { height: calc(66px + env(safe-area-inset-top)); padding-inline: 14px; }
  #screen { min-height: calc(100svh - 66px - env(safe-area-inset-top)); }
  .screen { padding-inline: 15px; }
  .brand-name { font-size: 14px; }
  .brand-mark { width: 30px; height: 30px; font-size: 24px; }
  .hero-copy h1 { font-size: 42px; }
  .hero-copy p { font-size: 15px; }
  .pattern-orbit { width: min(78vw, 310px); }
  .orbit-node > span { width: 54px; height: 54px; border-radius: 19px; font-size: 26px; }
  .orbit-node svg { width: 27px; height: 27px; }
  .primary-button { min-height: 54px; }
  .question-title { font-size: 28px; }
  .question-visual { height: 102px; border-radius: 23px; }
  .visual-icon { width: 64px; height: 64px; border-radius: 23px; }
  .visual-icon svg { width: 38px; height: 38px; }
  .options { gap: 7px; }
  .option-button { min-height: 56px; padding-block: 7px; grid-template-columns: 38px 1fr 22px; gap: 10px; border-radius: 17px; }
  .option-icon { width: 38px; height: 38px; border-radius: 13px; }
  .option-copy { font-size: 14px; }
  .quiz-actions { margin-top: 10px; }
  .result-emblem { width: 148px; height: 148px; }
  .score-bars { gap: 7px; }
  .share-card { padding: 17px; }
}

@media (max-width: 350px) {
  .share-actions { grid-template-columns: 1fr; }
  .share-card { aspect-ratio: auto; min-height: 520px; }
}

@media (min-width: 700px) {
  .home-screen { justify-content: flex-start; gap: 16px; }
  .pattern-orbit { margin-block: 8px; }
  .home-actions { width: 520px; margin: 0 auto; }
}

@media (max-height: 720px) and (max-width: 500px) {
  .eyebrow { display: none; }
  .hero-copy h1 { margin-top: 4px; font-size: 38px; }
  .hero-copy p { font-size: 14px; line-height: 1.35; }
  .pattern-orbit { width: min(64vh, 285px); }
  .question-visual { display: none; }
  .question-title { margin-bottom: 10px; font-size: 26px; }
  .option-button { min-height: 52px; }
  .analysis-visual { width: min(48vh, 275px); }
}

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