: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, select { 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); }
.seq-skip { position: fixed; top: 1rem; left: 1rem; z-index: 2000; padding: .75rem; background: var(--card-bg); transform: translateY(-200%); }
.seq-skip:focus { transform: none; }
.seq-main { width: min(100%, 600px); margin: auto; padding: 16px 16px 40px; }
.seq-main:focus { outline: none; }
.seq-breadcrumb { font-size: .85rem; margin-bottom: 18px; }
.seq-heading { text-align: center; margin-bottom: 22px; }
.seq-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; }
.seq-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; }
#seq-setup > p { margin-top: 12px; }
.seq-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; font-size: .85rem; font-weight: 800; margin-bottom: 14px; }
.seq-stats > span { min-width: 0; overflow-wrap: anywhere; display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 8px; background: #f0e5ff; padding: 5px 9px; }
.seq-stats > span:last-child { background: #e4f9da; }
#seq-stage { text-align: center; min-height: 2.6em; }
#seq-count { text-align: center; margin: 5px 0 16px; }
.seq-board { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; width: 100%; max-width: 300px; margin: 0 auto; scroll-margin-top: 90px; scroll-margin-bottom: 16px; }
.seq-cell { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 100%; min-width: 100px; min-height: 100px; aspect-ratio: 1; padding: 8px; border: 2px solid var(--ink); border-radius: 16px; color: var(--ink); font-weight: 800; }
.seq-cell:nth-child(1) { background: #ff2d78; }
.seq-cell:nth-child(2) { background: #00c2ff; }
.seq-cell:nth-child(3) { background: #ffd23f; }
.seq-cell:nth-child(4) { background: #7bed4f; }
.seq-cell svg { width: 40px; height: 40px; pointer-events: none; }
.seq-cell .pad-number { font-size: 1.5rem; line-height: 1.15; }
.seq-cell .tile-mark { font-size: .7rem; line-height: 1.4; min-height: 1.4em; letter-spacing: .04em; }
.seq-cell.is-lit { box-shadow: inset 0 0 0 5px #fff, inset 0 0 0 8px var(--ink); }
.seq-cell.is-wrong { box-shadow: inset 0 0 0 5px var(--ink); }
.seq-cell[aria-disabled="true"] { cursor: default; }
.seq-cell:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
#seq-score { margin-top: 14px; text-align: center; font-weight: 800; }
.seq-result { font-weight: 800; font-size: 1.4rem; text-align: center; margin-top: 16px; }
.seq-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.seq-primary, .seq-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; }
.seq-primary { background: var(--lime); box-shadow: 3px 3px 0 var(--ink); }
.seq-secondary { background: var(--card-bg); }
.seq-status { font-size: .9rem; margin-top: 16px; }
.seq-status:empty { margin: 0; }
.seq-best { text-align: center; font-size: 1.05rem; font-weight: 800; margin-top: 20px; }
.seq-small { font-size: .85rem; color: var(--ink-light); }
#seq-storage { text-align: center; margin-top: 5px; }
.seq-keyboard { margin: 20px 4px 28px; }
.seq-about { border-top: 2px solid var(--ink); padding-top: 22px; }
.seq-about h2 { font-size: 1.3rem; }
.seq-about p { margin-top: 12px; }
#seq-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"] .seq-primary { background: #0a66c2; color: #fff; box-shadow: none; }
[data-theme="pro"] .seq-stats > span { background: #edf2f6; }
[data-theme="pro"] .seq-cell { border-radius: 6px; }
@media (max-width: 359px) {
  .seq-main { padding-inline: 12px; }
  .seq-heading { margin-bottom: 14px; }
  .game-container { padding: 14px 12px; }
  .seq-board { gap: 10px; }
  .seq-cell { border-radius: 7px; }
  .seq-stats { font-size: .8rem; }
  .game-container h2 { font-size: 1.15rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}

#seq-play { scroll-margin-top: 90px; }
#seq-setup label { margin-top: 20px; }
#seq-setup select { width: 100%; min-height: 48px; border: 2px solid var(--ink); border-radius: 8px; padding: 10px; color: var(--ink); background: var(--card-bg); }
#seq-paused { margin: 24px 0; text-align: center; }
#seq-result { font-size: 1rem; overflow-wrap: anywhere; }
[data-theme="pro"] .seq-cell:nth-child(1) { background: #ede8fa; }
[data-theme="pro"] .seq-cell:nth-child(2) { background: #e5effa; }
[data-theme="pro"] .seq-cell:nth-child(3) { background: #fff1d6; }
[data-theme="pro"] .seq-cell:nth-child(4) { background: #e4f5ed; }
