:root {
  --hot-pink: #ff2d78; --electric-blue: #00c2ff; --sunny: #ffd23f;
  --lime: #7bed4f; --grape: #9b5de5; --tangerine: #ff6b35;
  --cream: #fff8f0; --ink: #1a1a2e; --ink-light: #3d3d5c;
  --muted: #62627b; --card-bg: #fff;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 1rem/1.5 'Outfit', 'Inter', system-ui, sans-serif; }
button, textarea { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
a { color: inherit; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; }
h1, h2, p { margin: 0; }
.fun-font { font-family: 'Titan One', 'Outfit', sans-serif; font-weight: 400; }
.color-bar { display: flex; height: 6px; }
.color-bar span { flex: 1; background: var(--hot-pink); }
.color-bar span:nth-child(2) { background: var(--grape); }
.color-bar span:nth-child(3) { background: var(--lime); }
.color-bar span:nth-child(4) { background: var(--sunny); }
.color-bar span:nth-child(5) { background: var(--electric-blue); }
.sc-skip { position: fixed; top: 1rem; left: 1rem; z-index: 2000; padding: .75rem; background: var(--card-bg); transform: translateY(-200%); }
.sc-skip:focus { transform: none; }
.sc-main { width: min(100%, 600px); margin: auto; padding: 16px 16px 40px; }
.sc-main:focus { outline: none; }
.sc-breadcrumb { font-size: .85rem; margin-bottom: 18px; }
.sc-heading { text-align: center; margin-bottom: 22px; }
.sc-eyebrow { font-size: .72rem; letter-spacing: .12em; font-weight: 800; margin-bottom: 8px; }
h1 { overflow-wrap: anywhere; font-size: clamp(2.1rem, 9vw, 3.3rem); line-height: 1.12; margin-bottom: 12px; text-decoration: underline; text-decoration-color: var(--sunny); text-decoration-thickness: 7px; text-underline-offset: 4px; }
.sc-heading > p:last-child { font-size: 1.05rem; }
.game-container { border: 2px solid var(--ink); border-radius: 20px; padding: 20px; background: var(--card-bg); box-shadow: 5px 5px 0 var(--grape); }
.game-container h2 { font-size: 1.25rem; line-height: 1.3; }
#sc-setup > p { margin-top: 12px; }
.sc-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; font-size: .8rem; font-weight: 800; margin-bottom: 12px; }
.sc-stats > span { min-width: 0; min-height: calc(3em + 16px); display: flex; align-content: center; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px; border: 2px solid var(--ink); border-radius: 8px; background: #e4f9da; padding: 4px 8px; }
.sc-stats > span:last-child { background: #fff1c6; }
#sc-time { font-variant-numeric: tabular-nums; }
.sc-stats > span { background: #fff1c6; }
.sc-stats > span:last-child { background: #eee3fb; }
#sc-arena { width: min(100%, 360px); margin: auto; scroll-margin-top: 90px; }
.sc-panel { padding: 12px; border: 2px solid var(--ink); border-radius: 14px; background: var(--card-bg); }
.sc-target-title { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 1.5em; font-size: .9rem; line-height: 1.5; font-weight: 800; }
.sc-target-title span { font-size: 12px; }
.sc-band { padding: 20px 0; margin: 8px 0; }
.sc-track { position: relative; height: 56px; border: 2px solid var(--ink); border-radius: 12px; background: #ededf2; }
.sc-rail { position: absolute; inset: 0 12px; }
.sc-target { position: absolute; top: 0; bottom: 0; left: 35%; width: 30%; border-inline: 2px solid #1a1a2e; background: repeating-linear-gradient(135deg, #7bed4f 0 7px, #285f18 7px 9px); }
.sc-marker { position: absolute; top: -9px; left: 0%; width: 8px; height: 70px; border: 1px solid #fff8f0; border-radius: 5px; background: #1a1a2e; transform: translateX(-50%); }
.sc-marker::before { content: ''; position: absolute; top: -10px; left: -2px; width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 7px solid #1a1a2e; }
.sc-width { min-height: 1.5em; font-size: .85rem; line-height: 1.5; font-weight: 800; text-align: center; }
.sc-primary-slot { display: grid; min-height: max(80px, calc(3em + 26px)); margin-top: 20px; }
.sc-primary-slot button { min-height: 80px; }
.sc-primary-slot .sc-stop { background: #ff2d78; color: #1a1a2e; font-size: 1.4rem; }
.sc-time { min-height: 1.5em; margin-top: 8px; font-size: .85rem; line-height: 1.5; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; }
.sc-travel { min-height: 3em; margin-top: 6px; font-size: .75rem; line-height: 1.5; text-align: center; }
.sc-feedback, .sc-detail { margin-top: 12px; text-align: center; font-size: .85rem; overflow-wrap: anywhere; }
.sc-feedback:empty, .sc-detail:empty { margin: 0; }
.sc-result { margin-top: 16px; font-weight: 800; text-align: center; overflow-wrap: anywhere; }
.sc-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.sc-primary, .sc-secondary { min-height: 52px; flex: 1; min-width: 110px; border: 2px solid var(--ink); border-radius: 10px; padding: 11px 14px; font-weight: 800; line-height: 1.3; }
.sc-primary { background: var(--lime); box-shadow: 3px 3px 0 var(--ink); }
.sc-secondary { background: var(--card-bg); }
.sc-status { font-size: .9rem; margin-top: 16px; }
.sc-status:empty { margin: 0; }
.sc-best { text-align: center; font-size: 1.05rem; font-weight: 800; margin-top: 20px; }
.sc-small { font-size: .85rem; color: var(--ink-light); }
#sc-storage { text-align: center; margin-top: 5px; }
.sc-keyboard { margin: 20px 4px 28px; }
.sc-about { border-top: 2px solid var(--ink); padding-top: 22px; }
.sc-about h2 { font-size: 1.3rem; }
.sc-about p { margin-top: 12px; }
#sc-share-fallback { margin-top: 18px; }
label { display: block; font-weight: 700; margin-bottom: 8px; }
textarea { width: 100%; border: 2px solid var(--ink); border-radius: 8px; background: var(--card-bg); padding: 10px; resize: vertical; }
[data-theme="pro"] .sc-primary { background: #0a66c2; color: #fff; box-shadow: none; }
@media (max-width: 359px) {
  .sc-main { padding-inline: 12px; }
  .sc-heading { margin-bottom: 14px; }
  .game-container { padding: 14px 12px; }
  .game-container h2 { font-size: 1.15rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}

#sc-play { scroll-margin-top: 90px; }
#sc-paused { margin: 24px 0; text-align: center; }

.sc-primary { flex-basis: 100%; }
.sc-primary, .sc-secondary, .sc-best, .sc-status { overflow-wrap: anywhere; }
[data-theme="pro"] .sc-primary-slot .sc-stop { background: #0a66c2; color: #fff; }
[data-theme="pro"] .sc-target { background: repeating-linear-gradient(135deg, #d6f0d2 0 7px, #398243 7px 9px); }
[data-theme="pro"] .sc-track { background: #edf0f2; }
