:root{font-family:system-ui,sans-serif;color:#263d48;background:#eef3f4;color-scheme:light}*{box-sizing:border-box}body{margin:0;padding:32px 20px}main{max-width:1100px;margin:auto}header{display:flex;align-items:center;justify-content:space-between;gap:16px}h1{font-size:clamp(24px,4vw,34px);margin:4px 0 16px;letter-spacing:.06em}.eyebrow{font-size:11px;letter-spacing:.2em;color:#527986}p{font-size:14px;line-height:1.7}button{background:#fff;color:#294e5d;border:1px solid #afc6cf;border-radius:8px;padding:12px 16px;cursor:pointer}button:hover{background:#dfedf1}button:focus-visible{outline:3px solid #167ca4}canvas{display:block;width:100%;aspect-ratio:1000/620;background:#dde7e9;border:1px solid #afc6cf;border-radius:18px;touch-action:none}footer{display:flex;justify-content:space-between;flex-wrap:wrap;gap:10px;margin-top:16px;font-size:12px;color:#496573}output{font-variant-numeric:tabular-nums}.note{font-size:12px;color:#627b86}@media(max-width:600px){body{padding:18px 10px}header{align-items:start}button{font-size:12px;padding:10px}footer{font-size:11px}}

.settings-panel{margin:18px 0;background:#fff;border:1px solid #afc6cf;border-radius:10px;padding:14px}summary{cursor:pointer;font-weight:600}#settings{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:18px;padding-top:10px}#settings label{display:grid;grid-template-columns:1fr 48px;gap:8px;font-size:12px}#settings label span{grid-column:1/-1}#settings input{width:100%;accent-color:#238bb2}#settings output{text-align:right}
.toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin:14px 0;font-size:13px}select{font:inherit;padding:8px 12px;border:1px solid #afc6cf;border-radius:6px;background:white;color:inherit}#legend{display:flex;gap:12px}#legend span{display:inline-flex;align-items:center;gap:5px}#legend span::before{content:'';width:12px;height:12px;background:var(--swatch);border-radius:50%;border:1px solid #0002}canvas{aspect-ratio:1366/768;border-radius:10px;border:0;background:#f5f5f6;cursor:none}#error{color:#9d2736;background:#fff;padding:12px}

.game-panel{background:#fff;border:1px solid #afc6cf;border-radius:12px;padding:16px;margin:16px 0}.game-summary{display:flex;align-items:center;flex-wrap:wrap;gap:18px}#target{display:inline-flex;gap:8px;align-items:center;font-size:20px}#target::before{content:"";background:var(--target-color);width:20px;height:20px;border-radius:50%}#score{font-size:24px;font-weight:700}#game-message{margin-bottom:0;color:#496573}#result{margin-bottom:4px;color:#294e5d}#result-details{margin-top:4px}#start{background:#294e5d;color:#fff}

#sequence{list-style:none;display:flex;flex-wrap:wrap;gap:8px;margin:16px 0;padding:0}#sequence li{padding:7px 12px;border:1px solid #afc6cf;border-radius:8px;font-size:13px}#sequence li::before{content:"";display:inline-block;background:var(--sequence-color);width:10px;height:10px;border-radius:50%;margin-right:6px}#sequence li.current{outline:2px solid #294e5d;font-weight:700}#sequence li.done{background:#edf5f0;color:#496573}
