:root {
  color-scheme: dark;
  --bg: #07101d;
  --panel: rgba(13, 27, 46, .78);
  --panel-strong: #0f1d31;
  --line: rgba(151, 177, 207, .16);
  --text: #f5f8ff;
  --muted: #93a7bf;
  --cyan: #42e8e0;
  --violet: #9d71ff;
  --coral: #ff6f91;
  --gold: #ffc65c;
  --danger: #ff5f78;
  --success: #5df0ad;
  --shadow: 0 28px 80px rgba(0, 0, 0, .42);
  --radius-lg: 30px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button { color: inherit; }
button:focus-visible, select:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
button { border: 0; cursor: pointer; }

.app-shell {
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding-top: var(--safe-top);
}
.ambient { position: fixed; pointer-events: none; filter: blur(10px); opacity: .65; z-index: -3; border-radius: 50%; }
.ambient-one { width: 620px; height: 620px; background: radial-gradient(circle, rgba(61, 229, 223, .16), transparent 68%); left: -250px; top: -160px; }
.ambient-two { width: 760px; height: 760px; background: radial-gradient(circle, rgba(152, 103, 255, .17), transparent 68%); right: -300px; bottom: -300px; }
.noise { position: fixed; inset: 0; pointer-events: none; z-index: -2; opacity: .032; 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='.8'/%3E%3C/svg%3E"); }

.topbar, .footer { width: min(1440px, calc(100% - 48px)); margin-inline: auto; display: flex; align-items: center; justify-content: space-between; }
.topbar { min-height: 90px; padding-block: 18px 8px; z-index: 8; }
.brand { background: transparent; display: inline-flex; align-items: center; gap: 13px; padding: 8px; border-radius: 15px; text-align: left; }
.brand strong { display: block; letter-spacing: .11em; font-size: 15px; }
.brand small { display: block; color: var(--muted); font-size: 9px; letter-spacing: .28em; margin-top: 2px; }
.brand-mark { width: 39px; height: 39px; position: relative; display: inline-grid; place-items: center; }
.brand-mark::before, .brand-mark::after, .brand-mark i { content: ""; position: absolute; border: 1.5px solid rgba(66, 232, 224, .5); border-radius: 50%; }
.brand-mark::before { width: 36px; height: 16px; transform: rotate(30deg); }
.brand-mark::after { width: 36px; height: 16px; transform: rotate(-30deg); }
.brand-mark i:nth-child(1) { width: 8px; height: 8px; border: 0; background: var(--cyan); box-shadow: 0 0 18px var(--cyan); }
.brand-mark i:nth-child(2) { width: 4px; height: 4px; border: 0; background: var(--violet); transform: translate(14px, -7px); }
.brand-mark i:nth-child(3) { width: 4px; height: 4px; border: 0; background: var(--coral); transform: translate(-12px, 9px); }
.brand-mark.large { transform: scale(1.75); }
.top-actions { display: flex; align-items: center; gap: 10px; }
.icon-button, .hud-icon { width: 45px; height: 45px; display: grid; place-items: center; border-radius: 14px; background: rgba(13, 28, 47, .72); border: 1px solid var(--line); backdrop-filter: blur(18px); transition: .2s ease; }
.icon-button:hover, .hud-icon:hover { transform: translateY(-2px); border-color: rgba(66, 232, 224, .4); background: rgba(18, 39, 64, .9); }
.icon-button svg { width: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pill-button { border-radius: 999px; padding: 12px 20px; background: rgba(66,232,224,.12); border: 1px solid rgba(66,232,224,.28); color: var(--cyan); font-weight: 700; }
.pill-button.compact { padding: 10px 16px; font-size: 13px; }

.main-content { display: grid; min-height: 0; }
.screen { display: none; width: min(1360px, calc(100% - 48px)); margin: auto; min-height: 680px; align-items: center; animation: screenIn .45s ease both; }
.screen.active { display: grid; }
@keyframes screenIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.home-screen { grid-template-columns: minmax(420px, .9fr) minmax(500px, 1.1fr); gap: clamp(36px, 7vw, 110px); padding: 38px 0 58px; }
.hero-copy { max-width: 650px; }
.eyebrow { color: var(--cyan); font-size: 12px; letter-spacing: .18em; font-weight: 800; text-transform: uppercase; display: inline-flex; align-items: center; gap: 9px; }
.eyebrow > span { width: 26px; height: 1px; background: currentColor; box-shadow: 0 0 8px currentColor; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(52px, 6.1vw, 96px); line-height: .96; letter-spacing: -.055em; margin: 22px 0 25px; }
h1 em { color: transparent; -webkit-text-stroke: 1px rgba(185, 208, 233, .42); font-style: normal; }
.hero-copy > p { color: var(--muted); font-size: clamp(16px, 1.35vw, 20px); line-height: 1.75; max-width: 610px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 34px 0 42px; }
.primary-button, .secondary-button, .card-play { min-height: 54px; padding: 0 25px; border-radius: 17px; font-weight: 800; letter-spacing: .01em; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.primary-button { background: linear-gradient(135deg, var(--cyan), #28b9d9); color: #04151e; box-shadow: 0 14px 36px rgba(56, 220, 219, .22), inset 0 1px rgba(255,255,255,.5); }
.primary-button:hover { transform: translateY(-2px); box-shadow: 0 18px 42px rgba(56, 220, 219, .32); }
.secondary-button { background: rgba(14, 29, 49, .74); border: 1px solid var(--line); }
.secondary-button:hover { transform: translateY(-2px); background: rgba(23, 43, 68, .9); }
.primary-button.small { min-height: 46px; }
.play-icon { font-size: 12px; margin-right: 9px; }
.hero-stats { display: flex; gap: clamp(22px, 4vw, 56px); }
.hero-stats div { display: grid; gap: 6px; }
.hero-stats strong { font-size: 25px; letter-spacing: -.03em; }
.hero-stats span { color: var(--muted); font-size: 12px; }

.hero-visual { min-height: 610px; position: relative; display: grid; place-items: center; }
.orbit-stage { width: min(590px, 48vw); aspect-ratio: 1; position: relative; display: grid; place-items: center; }
.orbit-stage::before { content: ""; position: absolute; inset: 8%; border-radius: 50%; background: radial-gradient(circle, rgba(26, 63, 89, .52), rgba(8, 18, 31, .08) 55%, transparent 72%); filter: blur(3px); }
.orbit { position: absolute; border-radius: 50%; border: 1px solid rgba(151,177,207,.15); animation: spin linear infinite; }
.orbit::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; border-top: 1px solid rgba(66,232,224,.28); border-right-color: transparent; }
.orbit-a { width: 38%; height: 38%; animation-duration: 9s; }
.orbit-b { width: 62%; height: 62%; animation-duration: 15s; animation-direction: reverse; }
.orbit-c { width: 86%; height: 86%; animation-duration: 22s; }
.orb { position: absolute; width: 18px; height: 18px; border-radius: 50%; top: 50%; left: -9px; margin-top: -9px; box-shadow: 0 0 24px currentColor; }
.orb::after { content: ""; position: absolute; inset: -9px; border: 1px solid currentColor; border-radius: 50%; opacity: .25; }
.orb.cyan { background: var(--cyan); color: var(--cyan); }
.orb.violet { background: var(--violet); color: var(--violet); }
.orb.coral { background: var(--coral); color: var(--coral); }
.core-preview { width: 88px; height: 88px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, #8ff8f1, var(--cyan) 38%, #168d99 72%); box-shadow: 0 0 22px rgba(66,232,224,.5), 0 0 80px rgba(66,232,224,.25); z-index: 2; }
.core-preview::before { content: ""; position: absolute; width: 110px; height: 110px; border: 1px solid rgba(66,232,224,.32); border-radius: 50%; animation: pulse 2.2s ease-out infinite; }
.core-preview span { width: 18px; height: 18px; border-radius: 50%; background: white; opacity: .75; filter: blur(3px); transform: translate(-12px,-13px); }
.target-line { position: absolute; height: 1px; width: 36%; left: 50%; top: 50%; transform-origin: 0 50%; background: linear-gradient(90deg, rgba(66,232,224,.6), transparent); animation: aim 5.2s ease-in-out infinite alternate; }
.score-float { position: absolute; left: 70%; top: 22%; color: var(--cyan); font-weight: 900; animation: floatScore 2.8s ease infinite; }
.daily-card { position: absolute; right: 0; bottom: 30px; left: 5%; margin: auto; max-width: 430px; min-height: 82px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 16px 17px; border: 1px solid var(--line); background: rgba(11, 25, 43, .78); backdrop-filter: blur(22px); border-radius: 22px; box-shadow: var(--shadow); }
.daily-icon { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; background: rgba(157,113,255,.14); color: var(--violet); font-size: 24px; }
.daily-card span { display: block; color: var(--muted); font-size: 9px; letter-spacing: .15em; margin-bottom: 5px; }
.daily-card strong { font-size: 14px; }
.daily-card button { width: 42px; height: 42px; border-radius: 13px; background: rgba(255,255,255,.06); font-size: 20px; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes aim { from { transform: rotate(-42deg); } to { transform: rotate(58deg); } }
@keyframes pulse { 0% { transform: scale(.72); opacity: .7; } 100% { transform: scale(1.55); opacity: 0; } }
@keyframes floatScore { 0%,100% { transform: translateY(0); opacity: .45; } 50% { transform: translateY(-14px); opacity: 1; } }

.footer { min-height: 58px; padding-bottom: var(--safe-bottom); color: rgba(148,168,190,.65); font-size: 11px; letter-spacing: .06em; border-top: 1px solid rgba(151,177,207,.07); }
.footer strong { color: var(--muted); }
.footer button { background: transparent; color: var(--muted); }

.modes-screen { display: none; align-content: center; padding: 40px 0 70px; }
.modes-screen.active { display: grid; }
.section-heading { display: flex; align-items: flex-start; gap: 20px; margin-bottom: 34px; }
.section-heading h2 { font-size: clamp(34px, 4vw, 54px); letter-spacing: -.04em; margin: 10px 0 0; }
.back-button { width: 48px; height: 48px; border-radius: 15px; background: rgba(13,28,47,.72); border: 1px solid var(--line); font-size: 22px; }
.mode-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.mode-card { display: grid; grid-template-columns: 180px 1fr auto; gap: 24px; align-items: center; min-height: 215px; padding: 22px; background: linear-gradient(135deg, rgba(15,31,52,.87), rgba(9,20,35,.82)); border: 1px solid var(--line); border-radius: 28px; transition: .25s ease; overflow: hidden; position: relative; }
.mode-card:hover { transform: translateY(-4px); border-color: rgba(66,232,224,.28); box-shadow: 0 20px 55px rgba(0,0,0,.24); }
.mode-card.featured { grid-column: span 2; grid-template-columns: 250px 1fr auto; }
.mode-art { height: 100%; min-height: 165px; border-radius: 21px; position: relative; overflow: hidden; background: radial-gradient(circle, rgba(66,232,224,.15), rgba(8,20,34,.55)); border: 1px solid rgba(151,177,207,.1); display: grid; place-items: center; }
.classic-art::before, .classic-art::after, .classic-art i { content:""; position:absolute; border:1px solid rgba(66,232,224,.25); border-radius:50%; }
.classic-art::before { width: 55px; height: 55px; }
.classic-art::after { width: 98px; height: 98px; }
.classic-art i:nth-child(1) { width: 18px; height:18px; background:var(--cyan); border:0; box-shadow:0 0 24px var(--cyan); }
.classic-art i:nth-child(2) { width:10px; height:10px; background:var(--coral); border:0; transform:translate(49px,-21px); }
.classic-art i:nth-child(3) { width:10px; height:10px; background:var(--violet); border:0; transform:translate(-35px,37px); }
.timed-art span { font-size: 58px; font-weight: 900; color: var(--gold); text-shadow: 0 0 30px rgba(255,198,92,.35); }
.daily-art span { font-size: 68px; color: var(--violet); text-shadow: 0 0 36px rgba(157,113,255,.48); }
.zen-art i { position:absolute; width:80px; height:80px; border:1px solid rgba(66,232,224,.25); border-radius:50%; }
.zen-art i:nth-child(2) { width:28px; height:28px; background:rgba(66,232,224,.3); border:0; filter:blur(5px); }
.mode-content h3 { font-size: 27px; margin-bottom: 10px; }
.mode-content p { color: var(--muted); line-height: 1.6; margin-bottom: 17px; max-width: 590px; }
.mode-tag { display: inline-block; font-size: 9px; font-weight: 900; letter-spacing: .13em; color: var(--cyan); background: rgba(66,232,224,.1); border: 1px solid rgba(66,232,224,.18); padding: 6px 9px; border-radius: 999px; margin-bottom: 10px; }
.mode-meta { display: flex; gap: 18px; color: #b9c7d8; font-size: 12px; }
.card-play { min-width: 92px; min-height: 46px; padding: 0 18px; background: rgba(255,255,255,.07); border: 1px solid var(--line); }
.card-play:hover { background: var(--cyan); color: #04151e; }

.game-screen { width: 100%; min-height: 0; height: calc(100vh - 148px); height: calc(100dvh - 148px); padding: 8px 24px 10px; }
.game-layout { width: 100%; height: 100%; display: grid; grid-template-columns: minmax(130px, .18fr) minmax(480px, 1fr) minmax(130px, .18fr); gap: 22px; align-items: center; }
.canvas-wrap { position: relative; width: 100%; height: min(75vh, 820px); min-height: 430px; border-radius: 34px; overflow: hidden; background: radial-gradient(circle, rgba(17, 42, 64, .5), rgba(6, 15, 27, .72) 70%); border: 1px solid rgba(151,177,207,.11); box-shadow: inset 0 0 80px rgba(0,0,0,.22), 0 25px 80px rgba(0,0,0,.26); }
#gameCanvas { display: block; width: 100%; height: 100%; touch-action: manipulation; }
.hud-panel { min-height: 250px; display: flex; flex-direction: column; gap: 26px; justify-content: center; }
.left-hud { align-items: flex-end; text-align: right; }
.right-hud { align-items: flex-start; }
.hud-stat { display: grid; gap: 5px; min-width: 110px; }
.hud-stat span { color: var(--muted); font-size: 10px; letter-spacing: .18em; font-weight: 800; }
.hud-stat strong { font-size: clamp(22px, 2.2vw, 34px); letter-spacing: -.04em; }
.hud-stat.combo strong { color: var(--cyan); }
.combo-bar { width: 110px; height: 4px; background: rgba(255,255,255,.08); border-radius: 99px; overflow: hidden; margin-top: 5px; }
.combo-bar i { display: block; height: 100%; width: 0; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); transition: width .2s ease; }
.lives { display: flex; gap: 7px; }
.lives i { width: 18px; height: 16px; position: relative; transform: rotate(-45deg); background: var(--coral); border-radius: 3px 0 3px 3px; box-shadow: 0 0 12px rgba(255,111,145,.4); }
.lives i::before, .lives i::after { content:""; position:absolute; width:18px; height:16px; background:inherit; border-radius:50%; }
.lives i::before { top:-8px; left:0; }
.lives i::after { left:8px; top:0; }
.lives i.lost { background:#334155; box-shadow:none; }
.control-hint { text-align:center; color:rgba(149,168,190,.6); font-size:11px; letter-spacing:.05em; margin: -36px 0 16px; pointer-events:none; }
kbd { border:1px solid rgba(151,177,207,.2); padding:4px 7px; border-radius:6px; background:rgba(255,255,255,.04); font:inherit; }
.game-message { position:absolute; left:50%; top:16%; transform:translate(-50%,-50%); font-size:clamp(18px,2vw,30px); font-weight:900; letter-spacing:.06em; pointer-events:none; opacity:0; text-shadow:0 5px 30px currentColor; }
.game-message.show { animation: messagePop .75s ease; }
.power-toast { position:absolute; left:50%; bottom:24px; transform:translateX(-50%) translateY(20px); padding:10px 15px; border-radius:999px; background:rgba(10,24,40,.85); border:1px solid rgba(66,232,224,.22); color:var(--cyan); font-size:12px; font-weight:800; opacity:0; transition:.25s ease; }
.power-toast.show { opacity:1; transform:translateX(-50%) translateY(0); }
@keyframes messagePop { 0% { opacity:0; transform:translate(-50%,-30%) scale(.8); } 35% { opacity:1; transform:translate(-50%,-50%) scale(1.08); } 100% { opacity:0; transform:translate(-50%,-80%) scale(1); } }
.mobile-hud { display:none; }

.modal-backdrop { position:fixed; inset:0; z-index:50; background:rgba(2,8,15,.72); backdrop-filter:blur(12px); animation:fadeIn .2s ease; }
.modal { position:fixed; z-index:60; left:50%; top:50%; transform:translate(-50%,-50%); width:min(520px,calc(100% - 32px)); max-height:calc(100dvh - 32px); overflow:auto; background:linear-gradient(160deg,rgba(17,35,57,.98),rgba(8,19,33,.98)); border:1px solid rgba(151,177,207,.18); border-radius:30px; padding:28px; box-shadow:var(--shadow); animation:modalIn .25s ease both; }
.modal.wide { width:min(700px,calc(100% - 32px)); }
.modal-header { display:flex; justify-content:space-between; align-items:flex-start; gap:18px; margin-bottom:24px; }
.modal-header h2 { font-size:34px; letter-spacing:-.04em; margin:8px 0 0; }
.modal-close { width:42px; height:42px; border-radius:13px; background:rgba(255,255,255,.06); font-size:27px; font-weight:300; }
.settings-list { display:grid; gap:4px; }
.setting-row, .setting-select { display:grid; grid-template-columns:1fr auto; align-items:center; gap:18px; padding:16px 0; border-bottom:1px solid rgba(151,177,207,.09); cursor:pointer; }
.setting-row span, .setting-select span { display:grid; gap:5px; }
.setting-row small, .setting-select small { color:var(--muted); }
.setting-row input { position:absolute; opacity:0; pointer-events:none; }
.setting-row i { width:49px; height:28px; border-radius:99px; background:#25354a; position:relative; transition:.2s ease; }
.setting-row i::after { content:""; position:absolute; width:20px; height:20px; left:4px; top:4px; border-radius:50%; background:#a9b6c5; transition:.2s ease; }
.setting-row input:checked + i { background:rgba(66,232,224,.25); box-shadow:inset 0 0 0 1px rgba(66,232,224,.25); }
.setting-row input:checked + i::after { transform:translateX(21px); background:var(--cyan); box-shadow:0 0 12px rgba(66,232,224,.5); }
.setting-select select { min-width:120px; padding:10px 12px; border-radius:12px; border:1px solid var(--line); background:#12243a; color:var(--text); }
.modal-actions { display:flex; justify-content:space-between; align-items:center; gap:15px; margin-top:24px; }
.danger-link, .text-button { background:transparent; color:var(--danger); padding:10px; }
.tabs { display:flex; gap:8px; padding:5px; border-radius:15px; background:rgba(255,255,255,.04); margin-bottom:18px; overflow-x:auto; }
.tabs button { flex:1; min-width:100px; padding:10px 12px; border-radius:11px; background:transparent; color:var(--muted); font-weight:700; }
.tabs button.active { background:rgba(66,232,224,.13); color:var(--cyan); }
.leaderboard-list { display:grid; gap:8px; min-height:280px; }
.leader-row { display:grid; grid-template-columns:45px 1fr auto; align-items:center; gap:12px; padding:13px 15px; border-radius:15px; background:rgba(255,255,255,.035); border:1px solid rgba(151,177,207,.06); }
.leader-row .rank { color:var(--muted); font-weight:900; }
.leader-row:nth-child(1) .rank { color:var(--gold); }
.leader-row:nth-child(2) .rank { color:#ccd7e3; }
.leader-row:nth-child(3) .rank { color:#d79367; }
.leader-row strong { font-size:18px; }
.leader-row small { color:var(--muted); }
.empty-state { min-height:250px; display:grid; place-items:center; text-align:center; color:var(--muted); }

.pause-visual { width:84px; height:84px; border-radius:50%; display:grid; place-items:center; margin:0 auto 22px; background:rgba(66,232,224,.1); border:1px solid rgba(66,232,224,.2); color:var(--cyan); font-size:26px; }
.centered { text-align:center; }
.centered h2 { font-size:38px; letter-spacing:-.04em; margin:10px 0 8px; }
.centered p { color:var(--muted); }
.stacked-actions { display:grid; gap:10px; margin-top:26px; }
.stacked-actions .text-button { color:var(--muted); }
.result-badge { display:table; margin:0 auto 18px; padding:7px 11px; border-radius:999px; background:rgba(255,198,92,.12); border:1px solid rgba(255,198,92,.22); color:var(--gold); font-size:10px; font-weight:900; letter-spacing:.12em; }
.result-score { display:grid; justify-items:center; margin:24px 0; }
.result-score span { color:var(--muted); font-size:10px; letter-spacing:.18em; }
.result-score strong { font-size:72px; line-height:1; letter-spacing:-.06em; margin:5px 0; }
.result-score small { color:var(--success); }
.result-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
.result-grid div { padding:14px 8px; border-radius:14px; background:rgba(255,255,255,.04); text-align:center; display:grid; gap:5px; }
.result-grid span { color:var(--muted); font-size:10px; }
.result-grid strong { font-size:18px; }
.achievement-pop { display:grid; grid-template-columns:auto 1fr; gap:12px; align-items:center; padding:13px; border-radius:16px; background:rgba(157,113,255,.1); border:1px solid rgba(157,113,255,.2); margin-top:16px; }
.achievement-pop > span { font-size:27px; }
.achievement-pop small { display:block; color:var(--violet); font-size:9px; letter-spacing:.12em; }
.achievement-pop strong { font-size:13px; }
.tutorial-demo { min-height:190px; display:grid; place-items:center; }
.mini-orbit { width:155px; height:155px; border:1px solid rgba(151,177,207,.25); border-radius:50%; position:relative; display:grid; place-items:center; }
.mini-core { width:48px; height:48px; border-radius:50%; background:var(--cyan); box-shadow:0 0 28px rgba(66,232,224,.6); }
.mini-target { width:16px; height:16px; border-radius:50%; background:var(--cyan); position:absolute; left:-8px; top:50%; margin-top:-8px; box-shadow:0 0 18px var(--cyan); animation:spinTarget 3.1s linear infinite; transform-origin:85.5px 8px; }
.mini-orbit b { position:absolute; width:68px; height:2px; left:50%; top:50%; transform-origin:left center; background:linear-gradient(90deg,var(--cyan),transparent); animation:aimDemo 3.1s linear infinite; }
@keyframes spinTarget { to { transform:rotate(360deg); } }
@keyframes aimDemo { to { transform:rotate(360deg); } }
.tutorial-steps { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin:20px 0; }
.tutorial-steps span { display:grid; justify-items:center; gap:7px; color:var(--muted); font-size:11px; text-align:center; }
.tutorial-steps b { width:30px; height:30px; display:grid; place-items:center; border-radius:50%; color:var(--cyan); background:rgba(66,232,224,.1); }
.credits-content { text-align:center; }
.credits-logo { min-height:110px; display:grid; place-items:center; }
.credits-content > p { color:var(--muted); line-height:1.6; }
dl { margin-top:24px; }
dl div { display:flex; justify-content:space-between; gap:20px; padding:12px 0; border-bottom:1px solid rgba(151,177,207,.08); text-align:left; }
dt { color:var(--muted); } dd { margin:0; font-weight:700; text-align:right; }
.toast { position:fixed; z-index:100; left:50%; bottom:28px; transform:translate(-50%,20px); background:#13263d; border:1px solid var(--line); border-radius:14px; padding:12px 17px; box-shadow:var(--shadow); opacity:0; pointer-events:none; transition:.25s ease; font-size:13px; }
.toast.show { opacity:1; transform:translate(-50%,0); }
@keyframes fadeIn { from { opacity:0; } }
@keyframes modalIn { from { opacity:0; transform:translate(-50%,-46%) scale(.97); } }

body.reduced-motion *, body.reduced-motion *::before, body.reduced-motion *::after { animation-duration:.01ms !important; animation-iteration-count:1 !important; scroll-behavior:auto !important; transition-duration:.01ms !important; }
body.colorblind { --cyan:#49d6ff; --violet:#f2c94c; --coral:#ff6b5f; --gold:#b785ff; }

@media (max-width: 1100px) {
  .home-screen { grid-template-columns: 1fr 1fr; gap: 30px; }
  .orbit-stage { width: 48vw; }
  .mode-card, .mode-card.featured { grid-template-columns: 150px 1fr; }
  .mode-card.featured { grid-column: span 2; }
  .mode-card .card-play { grid-column: 2; justify-self:start; }
  .game-layout { grid-template-columns: 100px minmax(420px,1fr) 100px; gap:12px; }
}

@media (max-width: 820px) {
  .topbar, .footer, .screen { width: min(100% - 28px, 720px); }
  .topbar { min-height:72px; }
  .brand small { display:none; }
  .home-screen { grid-template-columns:1fr; text-align:center; padding-top:28px; }
  .hero-copy { margin:auto; }
  .eyebrow { justify-content:center; }
  .hero-copy > p { margin-inline:auto; }
  .hero-actions, .hero-stats { justify-content:center; }
  .hero-visual { min-height:500px; }
  .orbit-stage { width:min(530px,88vw); }
  .daily-card { left:0; }
  .mode-grid { grid-template-columns:1fr; }
  .mode-card, .mode-card.featured { grid-column:auto; grid-template-columns:130px 1fr; }
  .game-screen { width:100%; height:calc(100dvh - 130px); padding:0 10px 10px; }
  .game-layout { grid-template-columns:1fr; display:block; height:calc(100% - 74px); }
  .hud-panel { display:none; }
  .canvas-wrap { height:100%; min-height:400px; border-radius:24px; }
  .mobile-hud { height:64px; display:grid; grid-template-columns:auto repeat(3,1fr); align-items:center; gap:8px; padding:5px 4px; }
  .mobile-hud > div { display:grid; justify-items:center; gap:2px; }
  .mobile-hud span { color:var(--muted); font-size:8px; letter-spacing:.12em; }
  .mobile-hud strong { font-size:17px; }
  .mobile-hud .hud-icon { width:42px; height:42px; }
  .control-hint { display:none; }
}

@media (max-width: 560px) {
  .top-actions .pill-button { display:none; }
  .icon-button { width:42px; height:42px; }
  h1 { font-size:clamp(43px,14vw,66px); }
  .hero-copy > p { font-size:15px; }
  .hero-actions { display:grid; grid-template-columns:1fr; }
  .hero-actions button { width:100%; }
  .hero-stats { gap:18px; justify-content:space-around; }
  .hero-stats strong { font-size:20px; }
  .hero-visual { min-height:420px; }
  .daily-card { bottom:0; }
  .footer { justify-content:center; gap:12px; flex-wrap:wrap; padding:13px 0; }
  .footer > span:first-child { display:none; }
  .section-heading { margin-top:10px; }
  .mode-card, .mode-card.featured { grid-template-columns:1fr; padding:16px; gap:15px; }
  .mode-art { min-height:120px; }
  .mode-card .card-play { grid-column:auto; width:100%; }
  .mode-meta { flex-wrap:wrap; }
  .modal { padding:22px; border-radius:24px; }
  .modal-header h2 { font-size:29px; }
  .result-score strong { font-size:60px; }
  .result-grid { grid-template-columns:1fr; }
  .result-grid div { grid-template-columns:1fr auto; text-align:left; align-items:center; }
  .tutorial-steps { grid-template-columns:1fr; }
  .tutorial-steps span { grid-template-columns:auto 1fr; justify-items:start; align-items:center; text-align:left; }
}
