/* =============================================================
   GAME: Color Sequence
   ============================================================= */
.board-colorsequence { display: flex; flex-direction: column; align-items: center; }
.cs-disc {
  --size: min(calc(100vw - 60px), 440px, calc(100vh - 240px)); --gap: calc(var(--size) * .035);
  position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); width: var(--size); min-width: 240px; aspect-ratio: 1;
  padding: var(--gap); border-radius: 50%; background: radial-gradient(circle at 50% 40%, #241a52, #0c0826 70%);
  box-shadow: 0 0 0 2px #7d6bff, 0 0 30px rgba(125, 107, 255, .4), inset 0 -8px 0 rgba(0, 0, 0, .35); touch-action: manipulation;
}
.cs-pad {
  --c: #3dff7a; --d: #0f5a2a;
  position: relative; overflow: hidden; display: grid; place-items: center; padding: 0; border: 0; cursor: pointer;
  background: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--c) 55%, #000) 0, var(--d) 75%);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--c) 45%, transparent), inset 0 -6px 0 rgba(0, 0, 0, .3), 0 4px 0 rgba(0, 0, 0, .35);
  transition: filter .12s, box-shadow .12s, transform .12s; -webkit-tap-highlight-color: transparent; user-select: none; touch-action: manipulation;
}
.cs-p0 { --c: #3dff7a; --d: #0c4a24; border-radius: 100% 10px 10px 10px; }
.cs-p1 { --c: #ff3d6e; --d: #5a0c22; border-radius: 10px 100% 10px 10px; }
.cs-p2 { --c: #ffd23f; --d: #5a4308; border-radius: 10px 10px 10px 100%; }
.cs-p3 { --c: #3daeff; --d: #0c2f5a; border-radius: 10px 10px 100% 10px; }
.cs-shape { width: 34%; height: 34%; fill: color-mix(in srgb, var(--c) 30%, transparent); stroke: color-mix(in srgb, var(--c) 80%, #fff); stroke-width: 2.5; stroke-linejoin: round; opacity: .75; transition: opacity .12s, transform .12s; }
.cs-p0 .cs-shape { translate: 14% 14%; }
.cs-p1 .cs-shape { translate: -14% 14%; }
.cs-p2 .cs-shape { translate: 14% -14%; }
.cs-p3 .cs-shape { translate: -14% -14%; }
.cs-key {
  position: absolute; font: 700 .72rem var(--font-head); color: color-mix(in srgb, var(--c) 70%, #fff); opacity: .55; pointer-events: none;
}
.cs-p0 .cs-key { left: 12%; bottom: 10%; } .cs-p1 .cs-key { right: 12%; bottom: 10%; }
.cs-p2 .cs-key { left: 12%; top: 10%; } .cs-p3 .cs-key { right: 12%; top: 10%; }
@media (pointer: coarse) { .cs-key { display: none; } }
.cs-pad:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.cs-listen .cs-pad:hover { filter: brightness(1.15); }
.cs-pad.cs-lit {
  background: radial-gradient(circle at 40% 40%, #fff 0, color-mix(in srgb, var(--c) 85%, #fff) 30%, var(--c) 70%);
  box-shadow: inset 0 0 0 2px #fff, 0 0 34px var(--c), 0 0 70px color-mix(in srgb, var(--c) 60%, transparent); filter: none; transform: scale(.985);
}
.cs-lit .cs-shape { opacity: 1; fill: rgba(255, 255, 255, .55); stroke: #fff; transform: scale(1.12); }
.cs-pad.cs-bad { background: radial-gradient(circle, #ff8a8a, #b3122e 70%); box-shadow: inset 0 0 0 3px #fff, 0 0 40px #ff3d5e; }
.cs-ripple {
  position: absolute; left: 50%; top: 50%; width: 30%; aspect-ratio: 1; margin: -15% 0 0 -15%; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .8); animation: csRipple .55s ease-out forwards; pointer-events: none;
}
@keyframes csRipple { to { transform: scale(4); opacity: 0; } }

.cs-hub {
  position: absolute; left: 50%; top: 50%; width: 38%; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-align: center;
  background: radial-gradient(circle at 50% 35%, #2d2470, #110c30 75%);
  box-shadow: 0 0 0 calc(var(--gap) * .9) #0c0826, 0 0 0 calc(var(--gap) * .9 + 2px) rgba(125, 107, 255, .7), inset 0 -4px 0 rgba(0, 0, 0, .35);
  pointer-events: none;
}
.cs-count { font: 800 clamp(1.3rem, calc(var(--size) * .09), 2.6rem)/1 var(--font-head); color: #fff; text-shadow: 0 0 16px rgba(160, 140, 255, .8); font-variant-numeric: tabular-nums; }
.cs-hint { font-size: clamp(.68rem, calc(var(--size) * .03), .9rem); font-weight: 700; color: #c9c2ff; max-width: 90%; line-height: 1.15; }
.cs-start {
  pointer-events: auto; margin-top: 4px; border: 0; border-radius: 999px; padding: 5px 14px; cursor: pointer;
  font: 700 clamp(.72rem, calc(var(--size) * .032), .92rem) var(--font-body); color: #fff; background: var(--grad);
  box-shadow: 0 3px 12px rgba(160, 60, 255, .45);
}
.cs-start[hidden] { display: none; }
.cs-start:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.cs-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); margin: 0; }
.cs-num { color: #b3a8ff; font-variant-numeric: tabular-nums; }
.cs-hearts { color: #ff3d6e; letter-spacing: 2px; }
.cs-lost { color: rgba(255, 255, 255, .18); }
.cs-strict { color: #ffd23f; }

.cs-win { animation: csWin .6s ease; }
@keyframes csWin { 40% { box-shadow: 0 0 0 4px #7dff9a, 0 0 60px rgba(125, 255, 154, .7), inset 0 -8px 0 rgba(0, 0, 0, .35); } }
.cs-fail { animation: csFail .45s cubic-bezier(.36, .07, .19, .97); }
@keyframes csFail { 15%, 55% { translate: -7px 0; box-shadow: 0 0 0 3px #ff3d5e, 0 0 50px rgba(255, 61, 94, .6); } 35%, 75% { translate: 7px 0; } }
@media (prefers-reduced-motion: reduce) { .cs-win, .cs-fail, .cs-ripple { animation: none; } .cs-pad, .cs-shape { transition: none; } }
