: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); }
.ct-skip { position: fixed; top: 1rem; left: 1rem; z-index: 2000; padding: .75rem; background: var(--card-bg); transform: translateY(-200%); }
.ct-skip:focus { transform: none; }
.ct-main { width: min(100%, 600px); margin: auto; padding: 16px 16px 40px; }
.ct-main:focus { outline: none; }
.ct-breadcrumb { font-size: .85rem; margin-bottom: 18px; }
.ct-heading { text-align: center; margin-bottom: 22px; }
.ct-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; }
.ct-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; }
#ct-setup > p { margin-top: 12px; }
.ct-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; font-size: .8rem; font-weight: 800; margin-bottom: 12px; }
.ct-stats > span { min-width: 0; min-height: calc(3em + 10px); 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; }
.ct-stats > span:last-child { background: #fff1c6; }
.ct-origin-panel { padding: 10px; border: 2px solid var(--ink); border-radius: 14px; background: var(--card-bg); text-align: center; }
.ct-origin-label { display: inline-block; padding: 3px 12px; font-size: .75rem; font-weight: 800; border-radius: 8px; background: #eee3fb; }
#ct-origin { display: grid; place-items: center; min-height: 2.6em; font-size: 1.65rem; line-height: 1.3; overflow-wrap: anywhere; padding: 4px 0; }
.ct-distance-label { font-size: .75rem; }
.ct-board { display: grid; gap: 12px; margin-top: 14px; }
.ct-choice { width: 100%; min-height: max(72px, calc(2.6em + 24px)); display: grid; grid-template-columns: 1.5rem minmax(0, 1fr) 1.25rem; align-items: center; gap: 8px; border: 2px solid var(--ink); border-radius: 12px; padding: 10px; color: #1a1a2e; background: #fff8f0; font-size: 1.05rem; line-height: 1.3; font-weight: 800; text-align: left; overflow-wrap: anywhere; }
.ct-choice .ct-name { min-width: 0; }
.ct-badge { width: 1.5rem; height: 1.5rem; display: grid; place-items: center; border: 2px solid #1a1a2e; border-radius: 50%; font-size: .75rem; line-height: 1; background: #eee3fb; }
.ct-mark { font-size: 1rem; text-align: center; }
.ct-choice.is-correct { background: #e4f9da; box-shadow: inset 0 0 0 2px #278614; }
.ct-choice.is-wrong { background: #ffd0df; box-shadow: inset 0 0 0 2px #9c1647; }
.ct-choice[aria-disabled="true"] { cursor: default; }
.ct-feedback { margin-top: 16px; padding: 12px; border: 2px solid var(--ink); border-radius: 10px; background: #f4effb; font-size: .9rem; overflow-wrap: anywhere; }
.ct-feedback h3 { margin: 0 0 6px; font-size: 1rem; }
.ct-result { margin-top: 20px; font-weight: 800; text-align: center; overflow-wrap: anywhere; }
#ct-arena { width: min(100%, 360px); margin: auto; scroll-margin-top: 90px; scroll-margin-bottom: 16px; }
.ct-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.ct-primary, .ct-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; }
.ct-primary { background: var(--lime); box-shadow: 3px 3px 0 var(--ink); }
.ct-secondary { background: var(--card-bg); }
.ct-status { font-size: .9rem; margin-top: 16px; }
.ct-status:empty { margin: 0; }
.ct-best { text-align: center; font-size: 1.05rem; font-weight: 800; margin-top: 20px; }
.ct-small { font-size: .85rem; color: var(--ink-light); }
#ct-storage { text-align: center; margin-top: 5px; }
.ct-keyboard { margin: 20px 4px 28px; }
.ct-about { border-top: 2px solid var(--ink); padding-top: 22px; }
.ct-about h2 { font-size: 1.3rem; }
.ct-about p { margin-top: 12px; }
#ct-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"] .ct-primary { background: #0a66c2; color: #fff; box-shadow: none; }
@media (max-width: 359px) {
  .ct-main { padding-inline: 12px; }
  .ct-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; }
}

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

.ct-primary { flex-basis: 100%; }
.ct-primary, .ct-secondary, .ct-best, .ct-status { overflow-wrap: anywhere; }
.ct-sources { margin-top: 18px; }
.ct-sources summary { cursor: pointer; min-height: 44px; padding: 10px 0; font-weight: 800; }
.ct-sources ul { padding-left: 22px; }
.ct-sources li { padding: 6px 0; overflow-wrap: anywhere; }
.ct-about h2:not(:first-child) { margin-top: 24px; }
[data-theme="pro"] .ct-origin-label { background: #ede8fa; }
