:root {
  --bg: #0b0c11;
  --panel: #13151b;
  --card: #1b1e26;
  --ink: #f2f3f7;
  --soft: rgba(242, 243, 247, 0.56);
  --faint: rgba(242, 243, 247, 0.34);
  --line: rgba(242, 243, 247, 0.09);
  --accent: #3fd6c2;
  --warn: #f5b440;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: radial-gradient(110% 70% at 50% -10%, color-mix(in srgb, var(--accent) 13%, transparent), transparent 62%), var(--bg);
  color: var(--ink);
  font-family: "Mona Sans Variable", "Mona Sans", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 10px 14px;
}

.sc { position: relative; width: min(312px, 100%); padding: 14px 14px 8px; border-radius: 26px; background: linear-gradient(180deg, #171920, var(--panel)); box-shadow: inset 0 0 0 1px var(--line), inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 30px 54px -30px rgba(0, 0, 0, 0.9); }

.sc__head { display: flex; align-items: center; gap: 11px; padding: 0 2px; }
.sc__badge { position: relative; flex: none; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); transition: background-color 0.4s ease, color 0.4s ease; }
.sc.is-done .sc__badge { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.sc__badge svg { grid-area: 1 / 1; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.700; stroke-linecap: round; stroke-linejoin: round; }
.sc__ok { stroke-width: 2.100 !important; }
.sc__ok path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.sc__titles { min-width: 0; }
.sc__title { height: 20px; overflow: hidden; font-size: 15px; line-height: 20px; font-weight: 700; letter-spacing: -0.01em; }
.sc__sub { height: 17px; overflow: hidden; font-size: 12px; line-height: 17px; font-weight: 540; color: var(--soft); white-space: nowrap; }
.sc__title span, .sc__sub span { display: block; }

/* the two versions: each slot is moved by the script, the card inside is styled here */
.sc__deck { position: relative; height: 150px; margin-top: 14px; }
.sc__slot { position: absolute; top: 6px; width: 50.500%; height: 138px; will-change: transform; }
.sc__slot:first-child { left: 0; }
.sc__slot:last-child { right: 0; }
.sc__card { display: flex; flex-direction: column; width: 100%; height: 100%; padding: 11px 12px; border: 0; border-radius: 17px; background: linear-gradient(180deg, #222630, var(--card)); color: var(--ink); font: inherit; text-align: left; cursor: pointer; outline: none; box-shadow: inset 0 0 0 1px var(--line), inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 16px 24px -14px rgba(0, 0, 0, 0.8); transition: box-shadow 0.3s ease; -webkit-tap-highlight-color: transparent; }
.sc__slot.is-on .sc__card { box-shadow: inset 0 0 0 1.500px var(--accent), inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 18px 28px -14px color-mix(in srgb, var(--accent) 40%, #000000); }
.sc__card:focus-visible { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--ink); }
.sc__dev { display: flex; align-items: center; gap: 6px; font-size: 12.500px; line-height: 18px; white-space: nowrap; }
.sc__dev > svg { flex: none; width: 17px; height: 17px; fill: none; stroke: var(--soft); stroke-width: 1.500; stroke-linecap: round; stroke-linejoin: round; }
.sc__dev b { flex: 1 1 auto; font-weight: 680; }
.sc__ring { flex: none; width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 1.500px var(--faint); transition: background-color 0.25s ease, box-shadow 0.25s ease; }
.sc__slot.is-on .sc__ring { background: var(--accent); box-shadow: none; }
.sc__ring svg { width: 12px; height: 12px; fill: none; stroke: #06231f; stroke-width: 1.900; stroke-linecap: round; stroke-linejoin: round; }
.sc__ring path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.sc__when { margin-top: 1px; font-size: 11px; line-height: 15px; font-weight: 540; color: var(--faint); }
.sc__lines { display: grid; gap: 2px; margin-top: 8px; font-size: 12px; line-height: 19px; font-weight: 560; color: var(--soft); white-space: nowrap; }
.sc__lines > span { display: block; }
.sc__lines mark { margin: 0 -5px; padding: 2px 5px; border-radius: 6px; background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--ink); transition: background-color 0.5s ease; }
.sc.is-done .sc__lines mark { background: transparent; }

.sc__keys { display: grid; gap: 2px; margin-top: 12px; }
.sc__btn { height: 44px; border: 0; border-radius: 15px; background: var(--accent); color: #06231f; font: inherit; font-size: 14.500px; font-weight: 700; cursor: pointer; outline: none; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 12px 22px -14px var(--accent); transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease; touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
.sc__btn:disabled { background: #1f222b; color: var(--faint); box-shadow: inset 0 0 0 1px var(--line); cursor: default; }
.sc__btntext { display: block; height: 20px; line-height: 20px; overflow: hidden; }
.sc__btntext span { display: block; }
.sc__link { height: 34px; border: 0; border-radius: 12px; background: transparent; color: var(--soft); font: inherit; font-size: 13px; font-weight: 620; cursor: pointer; outline: none; transition: color 0.2s ease, background-color 0.2s ease, opacity 0.3s ease; -webkit-tap-highlight-color: transparent; }
.sc__btn:focus-visible, .sc__link:focus-visible { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--ink); }
@media (hover: hover) { .sc__link:hover { color: var(--ink); background: rgba(242, 243, 247, 0.06); } }

.sc__say { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.ghost { position: absolute; left: 0; top: 0; width: 24px; height: 24px; margin: -3px 0 0 -5px; transform-origin: 20% 15%; pointer-events: none; opacity: 0; fill: #f2f3f7; stroke: #13151b; stroke-width: 1.300; stroke-linejoin: round; filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.6)); z-index: 5; }
