:root {
  color-scheme: dark;
  --bg: #11131c;
  --surface: #1a1d29;
  --surface-deep: #151823;
  --text: #f2f2f8;
  --muted: #a6a9bb;
  --subtle: #81859b;
  --line: #303341;
  --purple: #b3a2ff;
  --mint: #c6f481;
  --font: "Inter", "Segoe UI", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { min-width: 320px; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 1rem; line-height: 1.5; -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -1; background: radial-gradient(ellipse at 15% 35%, #7564cf0c, transparent 52%); }
button, summary { -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; }
button:disabled { cursor: wait; }
button, summary { touch-action: manipulation; }
button:focus-visible, summary:focus-visible, a:focus-visible { outline: 3px solid var(--purple); outline-offset: 5px; }
button:hover { transition: background-color .18s, transform .18s; }
[hidden] { display: none !important; }
.svg-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.site-shell { max-width: 1192px; padding: 0 36px; margin: 0 auto; }
.site-header { min-height: 96px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid #ffffff10; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 1.45rem; font-weight: 750; letter-spacing: -.055em; }
.brand-mark { background: var(--purple); color: #242033; width: 35px; height: 35px; border-radius: 10px; display: grid; place-items: center; }
.brand-mark .icon { width: 23px; height: 23px; }
.brand-soft { font-weight: 400; }
.brand-dot { color: var(--mint); }
.header-label { color: var(--subtle); font-size: .75rem; letter-spacing: .12em; }
.header-badge { font-size: .8125rem; color: #c9cbd8; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); padding: 7px 13px; border-radius: 100px; }
.header-badge > span { color: var(--purple); }
.intro { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 42px 0 31px; }
.eyebrow { color: var(--subtle); font-size: .75rem; letter-spacing: .1em; margin: 0 0 9px; }
h1 { font-size: clamp(2rem, 3.7vw, 2.75rem); line-height: 1.2; font-weight: 650; letter-spacing: -.05em; margin: 0; }
h1 span { color: var(--purple); }
.intro-description { margin: 11px 0 0; color: var(--muted); font-size: 1rem; }
.round-badge { display: flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; padding: 9px 13px; border: 1px solid var(--line); border-radius: 8px; color: #c8cad6; font-size: .875rem; }
.round-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--purple); }
#round-number { font-variant-numeric: tabular-nums; }
.game-layout { display: grid; grid-template-columns: minmax(0, 1fr) 326px; gap: 24px; align-items: stretch; }
.game-card { min-width: 0; background: var(--surface); border: 1px solid #373947; border-radius: 22px; padding: 27px 32px 23px; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.game-card::before { position: absolute; content: ""; width: 60%; height: 200px; top: 14%; left: 20%; background: radial-gradient(ellipse, #a08aee0e 0, transparent 70%); pointer-events: none; }
.game-topline { display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: .75rem; letter-spacing: .075em; font-weight: 600; color: #d7d7e4; }
.muted { color: var(--subtle); margin-left: 4px; }
#stage-label { color: var(--muted); letter-spacing: 0; font-size: .8125rem; font-weight: 400; text-align: right; }
.progress-track { display: flex; gap: 7px; padding-top: 14px; }
.progress-track span { background: #343745; height: 3px; flex: 1; border-radius: 5px; transition: background .25s; }
.progress-track span.active { background: var(--purple); }
.progress-track span.done { background: #b3a2ff70; }
.game-card.is-result .progress-track span { background: #c6f48185; }
.play-content { position: relative; flex: 1; min-height: 364px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 30px 0 20px; }
.play-content.entering { animation: arrive .3s ease-out both; }
.stage-tag { display: flex; align-items: center; gap: 7px; color: #c4b9f5; font-size: .75rem; letter-spacing: .1em; }
.stage-tag .icon { width: .875rem; height: .875rem; }
.number-display { color: var(--purple); font-size: clamp(4.5rem, 7.2vw, 6.5rem); font-weight: 600; letter-spacing: -.065em; line-height: 1.2; padding: 10px 0 14px; font-variant-numeric: lining-nums tabular-nums; }
.range-dash { display: inline-block; font-size: .65em; font-weight: 300; margin: 0 .08em; vertical-align: .08em; color: #8d7bc2; }
.number-display .operator { font-weight: 300; padding-right: .12em; color: #8d7bc2; }
.number-display.question { font-weight: 450; }
.number-display.text-display { font-size: clamp(2.5rem, 4.8vw, 4rem); padding: 22px 0 25px; letter-spacing: -.04em; }
.play-content h2 { margin: 0; font-size: 1.6rem; font-weight: 600; letter-spacing: -.03em; line-height: 1.3; }
.play-content h2:focus { outline: none; }
.step-description { margin: 12px 0 0; max-width: 430px; color: var(--muted); line-height: 1.7; font-size: 1rem; }
.step-description strong { color: #dedee9; font-weight: 600; }
.step-hint { display: flex; align-items: center; gap: 6px; margin: 19px 0 0; color: #9397ad; font-size: .8125rem; }
.game-actions { width: 100%; max-width: 402px; align-self: center; position: relative; }
.button { min-height: 55px; border: 0; border-radius: 11px; display: flex; align-items: center; justify-content: center; gap: 13px; padding: 13px 20px; width: 100%; font-size: 1rem; font-weight: 650; line-height: 1.4; }
.button-primary { color: #232c1a; background: var(--mint); box-shadow: 0 3px 0 #02060220; }
.button-primary:hover:not(:disabled) { background: #d5ffa0; transform: translateY(-1px); }
.button-primary:active:not(:disabled) { transform: translateY(1px); }
.button-primary:disabled { opacity: .7; }
.under-button { min-height: 42px; padding-top: 13px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.keyboard-hint { font-size: .75rem; color: var(--subtle); margin: 0 auto; }
kbd { border: 1px solid #414351; border-radius: 4px; padding: 2px 5px; font-family: inherit; margin-left: 4px; color: #b2b4c4; }
.under-button:has(#restart-button:not([hidden])) .keyboard-hint { margin: 0; }
.text-button { border: none; background: transparent; color: #b1b4c7; font-size: .8125rem; padding: 4px; display: flex; align-items: center; gap: 6px; border-radius: 3px; }
.text-button .icon { width: 13px; height: 13px; }
.text-button:hover { color: var(--text); }
.side-column { min-width: 0; display: flex; flex-direction: column; gap: 21px; }
.prediction-card { background: radial-gradient(ellipse at 50% 54%, #70629a22 0, transparent 72%), #1b1b2a; border: 1px solid #433c5a; padding: 20px 22px 0; border-radius: 18px; text-align: center; position: relative; overflow: hidden; }
.prediction-top { display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.prediction-top h2 { margin: 0; font-size: .9375rem; font-weight: 550; color: #e0ddee; }
.status-badge { display: flex; align-items: center; gap: 5px; font-size: .75rem; color: #c2b6e6; padding: 4px 8px; background: #a293d114; border: 1px solid #a293d12b; border-radius: 5px; }
.status-badge .icon { width: 12px; height: 12px; }
.prediction-number { font-size: 6.1rem; font-weight: 450; letter-spacing: -.08em; line-height: 1.15; color: #b2a1e7; padding: 8px 0 2px; }
.prediction-card p { font-size: .8125rem; line-height: 1.65; color: #aaa3bd; margin: 6px 0 19px; }
.prediction-bottom { border-top: 1px dashed #74668e50; display: flex; justify-content: space-between; gap: 8px; padding: 12px 0; font-size: .75rem; color: #9687b1; }
.prediction-bottom > span:nth-child(2) { font-size: .75rem; letter-spacing: .01em; }
.prediction-card.unlocked { border-color: #688443; background: radial-gradient(ellipse at 50% 54%, #93ad5020 0, transparent 72%), #1b221b; }
.prediction-card.unlocked .prediction-number { color: var(--mint); }
.prediction-card.unlocked .status-badge { color: var(--mint); border-color: #c6f48130; background: #c6f48112; }
.prediction-card.unlocked p { color: #b2c2a4; }
.prediction-card.unlocked .prediction-bottom { color: #a8ba90; border-color: #768e5050; }
.journey { padding: 0 6px 1px; }
.journey h2 { margin: 0 0 14px; color: #c3c5d4; font-size: .875rem; font-weight: 550; }
.journey ol { list-style: none; margin: 0; padding: 0; }
.journey li { display: flex; align-items: center; gap: 11px; color: #8b8fa5; font-size: .875rem; min-height: 36px; position: relative; }
.journey li:not(:last-child)::after { content: ""; width: 1px; height: 12px; position: absolute; left: 12px; bottom: -6px; background: #353746; }
.journey-marker { display: grid; place-items: center; width: 25px; height: 25px; flex-shrink: 0; border: 1px solid #373a49; border-radius: 50%; font-size: .75rem; color: #8b8fa5; background: var(--bg); }
.journey-marker .icon { width: 13px; height: 13px; }
.journey-operation { margin-left: auto; color: #767b94; font-size: 1rem; font-variant-numeric: tabular-nums; }
.journey li.current { color: #d4c9fb; }
.journey li.current .journey-marker { background: #b3a2ff1c; border-color: #8573c2; color: #d7cafd; }
.journey li.current .journey-operation { color: var(--purple); }
.journey li.completed { color: #b9becd; }
.journey li.completed .journey-marker { border-color: transparent; background: #c6f48112; color: var(--mint); }
.explanation { margin: 22px 0 0; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-deep); }
.explanation summary { list-style: none; cursor: pointer; padding: 19px 23px; display: flex; align-items: center; justify-content: space-between; gap: 14px; font-size: .9375rem; border-radius: 14px; }
.explanation summary::-webkit-details-marker { display: none; }
.explanation summary > span { display: flex; align-items: center; gap: 10px; }
.explanation summary > span .icon { color: var(--purple); }
.explanation[open] .chevron { transform: rotate(180deg); }
.explanation-content { padding: 0 23px 24px; color: var(--muted); font-size: 1rem; }
.explanation-content p { margin: 0 0 14px; }
.explanation-content p:last-child { margin-bottom: 0; }
.formula { display: block; width: fit-content; max-width: 100%; padding: 13px 17px; color: var(--mint); background: #c6f48108; border-left: 2px solid #c6f48180; font: 1rem/1.8 ui-monospace, "SFMono-Regular", Consolas, monospace; overflow-wrap: anywhere; margin: 16px 0; }
.example-steps { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin: 16px 0; color: #d1d2dd; font-variant-numeric: tabular-nums; }
.example-steps span { padding: 6px 10px; background: #ffffff05; border: 1px solid var(--line); border-radius: 6px; }
.example-steps .icon { width: 16px; height: 16px; color: var(--subtle); }
.site-footer { padding: 26px 0 27px; display: flex; justify-content: space-between; align-items: center; gap: 20px; color: #9296ab; font-size: .75rem; }
.footer-note { display: flex; align-items: center; gap: 6px; }
.footer-note .icon { width: 13px; height: 13px; }
.is-result .number-display, .is-result .stage-tag { color: var(--mint); }
.is-result .number-display { font-size: 7rem; }
.is-revealing .number-display { animation: breathe .55s ease-in-out infinite alternate; }
.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; }
.noscript { border: 1px solid var(--purple); border-radius: 10px; padding: 15px; }
@keyframes arrive { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes breathe { from { opacity: .35; transform: scale(.97); } to { opacity: 1; transform: scale(1.03); } }
@media (min-width: 1500px) { .intro { padding-top: 52px; padding-bottom: 37px; } .play-content { min-height: 390px; } }
@media (max-width: 1000px) { .header-label { display: none; } .game-layout { grid-template-columns: minmax(0,1fr) 290px; gap: 18px; } .game-card { padding: 24px; } .site-shell { padding: 0 28px; } .prediction-card { padding-left: 17px; padding-right: 17px; } .intro { padding-top: 33px; } .eyebrow { font-size: .75rem; letter-spacing: .04em; } }
@media (max-width: 740px) {
  .site-shell { max-width: 570px; padding: 0 20px; }
  .site-header { min-height: 77px; gap: 12px; }
  .brand { font-size: 1.35rem; }
  .brand-mark { width: 31px; height: 31px; border-radius: 9px; }
  .header-badge { padding: 5px 9px; font-size: .75rem; }
  .header-badge > span { display: none; }
  .intro { padding: 29px 0 23px; align-items: start; gap: 10px; position: relative; }
  .eyebrow { display: none; }
  h1 { font-size: clamp(1.75rem,6.6vw,2.15rem); letter-spacing: -.05em; }
  .intro-description { font-size: .875rem; max-width: 290px; margin-top: 10px; }
  .round-badge { position: absolute; right: 0; bottom: -46px; z-index: 1; border: 0; font-size: .75rem; padding: 6px 21px 6px 0; background: var(--surface); }
  .round-dot { display: none; }
  .game-layout { grid-template-columns: 1fr; gap: 18px; }
  .game-card { padding: 23px 22px 17px; border-radius: 18px; }
  #stage-label { display: none; }
  .play-content { min-height: 320px; padding: 28px 0 22px; }
  .number-display { font-size: 5.5rem; padding-top: 8px; }
  .play-content h2 { font-size: 1.4rem; }
  .step-description { font-size: 1rem; }
  .step-hint { font-size: .8125rem; margin-top: 16px; }
  .under-button { justify-content: center; min-height: 22px; padding-top: 10px; }
  .keyboard-hint { display: none; }
  .side-column { gap: 22px; }
  .prediction-card { display: grid; grid-template-columns: 1fr 76px; text-align: left; padding: 17px 20px; column-gap: 12px; border-radius: 14px; }
  .prediction-top { justify-content: flex-start; gap: 12px; }
  .prediction-number { grid-column: 2; grid-row: 1 / 3; align-self: center; text-align: center; padding: 0; font-size: 4rem; }
  .prediction-card p { grid-column: 1; margin: 7px 0 0; font-size: .8125rem; }
  .prediction-bottom { display: none; }
  .journey { padding: 0 3px; }
  .journey ol { display: grid; grid-template-columns: 1fr 1fr; column-gap: 18px; row-gap: 7px; }
  .journey li { font-size: .8125rem; gap: 7px; }
  .journey li:not(:last-child)::after { display: none; }
  .journey-operation { display: none; }
  .journey-marker { width: 23px; height: 23px; }
  .site-footer { align-items: flex-start; flex-direction: column; gap: 6px; margin-top: 22px; border-top: 1px solid #ffffff10; padding: 20px 0; }
  .explanation summary { padding: 17px; }
  .explanation-content { padding: 0 17px 20px; }
  .number-display.text-display { font-size: 3rem; }
}
@media (max-width: 370px) { .site-shell { padding: 0 14px; } .header-badge { display: none; } .game-card { padding: 21px 17px 15px; } h1 { font-size: 1.75rem; } .play-content h2 { font-size: 1.3rem; } .prediction-top { flex-wrap: wrap; gap: 7px; } .stage-tag { font-size: .75rem; letter-spacing: .055em; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
