:root {
  color-scheme: dark;
  --bg: #09090b;
  --panel: #111114;
  --ink: #f6f3ff;
  --muted: #9996a4;
  --accent: #8478ff;
  --accent-hot: #a49cff;
  --line: rgba(255,255,255,.1);
  --good: #63d7ae;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 80% 8%, rgba(132,120,255,.15), transparent 30rem),
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px),
    var(--bg);
  background-size: auto, 28px 28px, 28px 28px, auto;
  font-family: "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, a { font: inherit; }
.shell { width: min(100%, 520px); min-height: calc(100vh - 54px); margin: 0 auto; padding: max(20px, env(safe-area-inset-top)) 22px 32px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 750; letter-spacing: -.02em; }
.brand img { border-radius: 9px; }
.language-picker { display: flex; gap: 3px; margin-left: auto; padding: 3px; border: 1px solid var(--line); border-radius: 10px; }
.language-picker button { padding: 5px 7px; border: 0; border-radius: 7px; color: #777481; background: transparent; cursor: pointer; font-size: 9px; font-weight: 800; letter-spacing: .08em; }
.language-picker button.active { color: white; background: rgba(132,120,255,.65); }
.panel { display: none; min-height: calc(100vh - 150px); flex-direction: column; justify-content: center; animation: enter .55s cubic-bezier(.2,.8,.2,1) both; }
.panel.active { display: flex; }
.eyebrow { margin: 0 0 18px; color: var(--accent-hot); font-size: 12px; font-weight: 800; letter-spacing: .2em; }
h1 { margin: 0; font-size: clamp(42px, 11vw, 66px); line-height: 1.04; letter-spacing: -.065em; }
h1 em { color: var(--accent-hot); font-style: normal; }
.lead { margin: 28px 0 0; color: #bbb7c7; font-size: 16px; line-height: 1.75; }
.lead strong { color: var(--ink); }
.signal-preview { display: flex; gap: 9px; margin: 42px 0; }
.signal-preview span { width: 10px; height: 10px; border-radius: 50%; background: #29282f; }
.signal-preview span:nth-child(2) { background: var(--accent); box-shadow: 0 0 24px var(--accent); }
.primary, .secondary { width: 100%; min-height: 58px; border-radius: 17px; border: 0; cursor: pointer; text-align: center; font-weight: 800; }
.primary { color: white; background: var(--accent); box-shadow: 0 14px 44px rgba(100,84,255,.25); }
.primary:active { transform: scale(.985); }
.secondary { margin-top: 10px; color: #c7c3d2; background: transparent; border: 1px solid var(--line); }
.fine, .test-note, .install-note, .disclaimer { color: var(--muted); font-size: 12px; line-height: 1.6; text-align: center; }
.fine { margin: 14px 0 0; }

.test-panel { justify-content: flex-start; padding-top: 12vh; }
.test-head { display: flex; justify-content: space-between; align-items: center; }
.test-head .eyebrow { margin: 0; }
.best { margin: 0; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.reaction-pad { position: relative; width: 100%; aspect-ratio: 1/1.12; margin-top: 28px; border: 1px solid var(--line); border-radius: 38px; color: white; background: #17171b; overflow: hidden; cursor: pointer; transition: background .12s, transform .12s, box-shadow .12s; }
.reaction-pad::before { content: ""; position: absolute; inset: 16px; border: 1px solid rgba(255,255,255,.05); border-radius: 28px; }
.reaction-pad span { position: relative; display: block; font-size: clamp(30px, 8vw, 44px); font-weight: 850; letter-spacing: -.05em; }
.reaction-pad small { position: relative; display: block; margin-top: 10px; color: var(--muted); font-size: 13px; }
.reaction-pad.ready { background: var(--accent); box-shadow: 0 0 80px rgba(132,120,255,.42); transform: scale(1.015); }
.reaction-pad.ready small { color: rgba(255,255,255,.75); }
.reaction-pad.too-soon { background: #452729; }

.result-panel { padding-top: 46px; justify-content: flex-start; }
.score-card { position: relative; padding: 32px 26px 24px; border: 1px solid rgba(164,156,255,.28); border-radius: 30px; background: linear-gradient(145deg, rgba(132,120,255,.14), rgba(17,17,20,.8) 48%); overflow: hidden; }
.score-card > p:first-of-type { margin: 0; color: #bdb8cc; font-size: 13px; }
.score-card h1 { margin-top: 8px; font-size: clamp(72px, 20vw, 104px); font-variant-numeric: tabular-nums; }
.score-card h1 small { margin-left: 8px; color: var(--accent-hot); font-size: 18px; letter-spacing: 0; }
.orbit { position: absolute; width: 190px; height: 190px; right: -76px; top: -74px; border: 1px solid rgba(164,156,255,.27); border-radius: 50%; box-shadow: 0 0 60px rgba(132,120,255,.1) inset; }
.result-message { min-height: 46px; color: var(--ink); font-size: 17px; line-height: 1.55; }
.score-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 11px; letter-spacing: .13em; }
.score-row span { color: var(--muted); }
.score-row strong { color: var(--good); font-size: 13px; font-variant-numeric: tabular-nums; }
.disclaimer { margin: 16px 8px 24px; }
.install { display: grid; place-items: center; text-decoration: none; }
.install-note { margin: 20px 12px 0; }
footer { padding: 0 20px max(20px, env(safe-area-inset-bottom)); color: #625f6a; font-size: 11px; text-align: center; }
footer a { color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@keyframes enter { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
@media (min-width: 760px) { .shell { padding-top: 32px; } .panel { min-height: 700px; } }
