/* Squishy ABC — ported from the "Squishy ABC" design mockup (dark sensory-lab theme). */

#squishyAbcGame {
  --sq-bg: #100e16;
  --sq-bg-2: #1e1b28;
  --sq-bg-3: #35304a;
  --sq-text: #f1edf6;
  --sq-muted: #9a92aa;
  --sq-muted-2: #8b839b;
  --sq-faint: #524a63;
  --sq-orange: #ff8a5b;
  --sq-orange-ink: #241206;
  --sq-gold: #ffd76e;
  --sq-purple: #9d7ce8;
  --sq-teal: #4fd2c2;
  --sq-card: rgba(255, 255, 255, .05);
  --sq-card-hover: rgba(255, 255, 255, .09);
  --sq-card-border: rgba(255, 255, 255, .1);

  /* Type-token aliases: prefer the shared, canvas-measured --abz-game-type-*
     custom properties written by game_page_shell.js's installGameFitting();
     fall back to the same clamp() formulas when the shell isn't present
     (matches games/read_and_draft/read_and_draft.html's pattern). */
  --sqabc-display-size: var(--abz-game-type-display, clamp(64px, min(9.2cqw, 15.5cqh), 132px));
  --sqabc-screen-title-size: var(--abz-game-type-screen-title, clamp(38px, min(5.4cqw, 9cqh), 76px));
  --sqabc-card-title-size: var(--abz-game-type-card-title, clamp(24px, min(3.2cqw, 5.4cqh), 42px));
  --sqabc-body-size: var(--abz-game-type-body, clamp(16px, min(1.7cqw, 2.8cqh), 22px));
  --sqabc-control-size: var(--abz-game-type-control, clamp(16px, min(1.45cqw, 2.5cqh), 19px));
  --sqabc-caption-size: var(--abz-game-type-caption, clamp(12px, min(1cqw, 1.8cqh), 15px));

  position: relative;
  width: 100%;
  min-height: 640px;
  display: flex;
  flex-direction: column;
  background: var(--sq-bg);
  background-image: radial-gradient(90% 70% at 50% -10%, var(--sq-bg-3) 0%, var(--sq-bg-2) 45%, var(--sq-bg) 100%);
  font-family: 'Outfit', system-ui, sans-serif;
  color: var(--sq-text);
  user-select: none;
  border-radius: 20px;
  overflow: hidden;
  isolation: isolate;
}
#squishyAbcGame * { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
#squishyAbcGame a { color: var(--sq-orange); }
#squishyAbcGame a:hover { color: #ffbb98; }
#squishyAbcGame .hidden { display: none !important; }
#squishyAbcGame [data-sqabc-type="display"] { font-size: var(--sqabc-display-size); }
#squishyAbcGame [data-sqabc-type="screen-title"] { font-size: var(--sqabc-screen-title-size); }
#squishyAbcGame [data-sqabc-type="card-title"] { font-size: var(--sqabc-card-title-size); }
#squishyAbcGame [data-sqabc-type="body"] { font-size: var(--sqabc-body-size); }
#squishyAbcGame [data-sqabc-type="control"] { font-size: var(--sqabc-control-size); }
#squishyAbcGame [data-sqabc-type="caption"] { font-size: var(--sqabc-caption-size); }

@keyframes sqabc-pop-in { from { transform: translateY(8px) scale(.96); opacity: 0 } to { transform: none; opacity: 1 } }
@keyframes sqabc-bob { 0%, 100% { transform: translateY(0) rotate(-3deg) } 50% { transform: translateY(-18px) rotate(3deg) } }
@keyframes sqabc-squash { 0%, 100% { transform: scale(1, 1) } 42% { transform: scale(1.07, .93) } 70% { transform: scale(.97, 1.03) } }
@keyframes sqabc-title-in { from { transform: translateY(22px) scale(.9); opacity: 0 } to { transform: none; opacity: 1 } }
@keyframes sqabc-glow-pulse { 0%, 100% { box-shadow: 0 10px 30px rgba(255, 138, 91, .3) } 50% { box-shadow: 0 16px 50px rgba(255, 138, 91, .62) } }
@keyframes sqabc-drift { 0%, 100% { transform: translate(0, 0) } 50% { transform: translate(14px, -10px) } }
@media (prefers-reduced-motion: reduce) {
  #squishyAbcGame * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ---------- screen switching ---------- */
#squishyAbcGame .sqabc-screen {
  display: none;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  position: relative;
}
#squishyAbcGame[data-active-screen="start"] .sqabc-screen--start,
#squishyAbcGame[data-active-screen="mode"] .sqabc-screen--mode,
#squishyAbcGame[data-active-screen="pick"] .sqabc-screen--pick,
#squishyAbcGame[data-active-screen="game"] .sqabc-screen--game,
#squishyAbcGame[data-active-screen="over"] .sqabc-screen--over {
  display: flex;
}
#squishyAbcGame .sqabc-btn {
  border: 0;
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  min-height: 48px;
}
#squishyAbcGame .sqabc-btn--primary {
  background: var(--sq-orange);
  color: var(--sq-orange-ink);
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  border-radius: 999px;
  padding: 15px 40px;
  animation: sqabc-glow-pulse 2.4s ease-in-out infinite;
  transition: transform .18s;
}
#squishyAbcGame .sqabc-btn--primary:hover { transform: scale(1.05); }
#squishyAbcGame .sqabc-btn--primary:disabled { cursor: not-allowed; opacity: .45; animation: none; background: rgba(255, 255, 255, .07); color: var(--sq-faint); }
#squishyAbcGame .sqabc-btn--ghost {
  border: 1px solid var(--sq-card-border);
  background: transparent;
  border-radius: 999px;
  padding: 14px 26px;
  font-weight: 600;
  color: var(--sq-muted);
}
#squishyAbcGame .sqabc-btn--ghost:hover { color: var(--sq-text); border-color: rgba(255, 255, 255, .22); }
#squishyAbcGame .sqabc-btn--chip {
  border: 1px solid var(--sq-card-border);
  background: var(--sq-card);
  border-radius: 999px;
  padding: 9px 20px;
  font-weight: 600;
  font-size: 13px;
  color: #c9c2d6;
  min-height: 40px;
}
#squishyAbcGame .sqabc-btn--chip-ghost { background: transparent; color: var(--sq-muted); }

/* ---------- start screen ---------- */
#squishyAbcGame .sqabc-screen--start {
  align-items: center;
  justify-content: center;
  gap: clamp(20px, 4cqh, 34px);
  padding: clamp(24px, 5cqh, 40px);
  text-align: center;
}
#squishyAbcGame .sqabc-start-dots {
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(60% 55% at 50% 45%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(60% 55% at 50% 45%, #000 0%, transparent 78%);
  pointer-events: none;
}
#squishyAbcGame .sqabc-start-glow {
  position: absolute; width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(255, 180, 120, .16), rgba(0, 0, 0, 0) 70%);
  animation: sqabc-drift 9s ease-in-out infinite;
  pointer-events: none;
}
#squishyAbcGame .sqabc-start-letters { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
#squishyAbcGame .sqabc-float-letter {
  position: absolute; font-family: 'Andika', sans-serif; font-weight: 700; color: rgba(255, 255, 255, .035);
}
#squishyAbcGame .sqabc-float-letter--1 { left: 6%; top: 18%; font-size: 82px; animation: sqabc-bob 7s ease-in-out infinite; }
#squishyAbcGame .sqabc-float-letter--2 { left: 88%; top: 26%; font-size: 64px; animation: sqabc-bob 6s ease-in-out infinite 1.2s; }
#squishyAbcGame .sqabc-float-letter--3 { left: 16%; top: 72%; font-size: 70px; color: rgba(255, 255, 255, .03); animation: sqabc-drift 8s ease-in-out infinite .6s; }
#squishyAbcGame .sqabc-float-letter--4 { left: 78%; top: 76%; font-size: 56px; animation: sqabc-bob 5.4s ease-in-out infinite 2s; }
#squishyAbcGame .sqabc-start-blobs { display: flex; gap: 22px; align-items: flex-end; z-index: 1; }
#squishyAbcGame .sqabc-start-blob {
  display: flex; align-items: center; justify-content: center;
  font-family: 'Andika', sans-serif; font-weight: 700;
  box-shadow: 0 18px 34px rgba(0, 0, 0, .45), inset 0 -10px 22px rgba(0, 0, 0, .08);
}
#squishyAbcGame .sqabc-start-blob--a { width: 96px; height: 96px; font-size: 44px; border-radius: 38% 62% 55% 45% / 45% 40% 60% 55%; background: linear-gradient(150deg, #ffffff, #ffd9e8 45%, #f4a8c4); color: #bd4a74; animation: sqabc-bob 3.4s ease-in-out infinite; }
#squishyAbcGame .sqabc-start-blob--b { width: 118px; height: 118px; font-size: 54px; border-radius: 48% 52% 42% 58% / 55% 48% 52% 45%; background: linear-gradient(150deg, #ffffff, #d8f3ff 45%, #5cbde4); color: #12657f; animation: sqabc-bob 2.7s ease-in-out infinite .4s; }
#squishyAbcGame .sqabc-start-blob--c { width: 92px; height: 92px; font-size: 42px; border-radius: 56% 44% 60% 40% / 42% 58% 44% 56%; background: linear-gradient(150deg, #fffdf6, #fff0c0 45%, #f0cc6e); color: #a97f1c; animation: sqabc-bob 3.9s ease-in-out infinite .9s; }
#squishyAbcGame .sqabc-start-blob--d { width: 78px; height: 78px; font-size: 36px; border-radius: 42% 58% 48% 52% / 58% 44% 56% 42%; background: linear-gradient(150deg, #ffffff, #e6dcff 45%, #b49ef0); color: #4b2d8f; animation: sqabc-bob 3.1s ease-in-out infinite 1.4s; }
#squishyAbcGame .sqabc-start-title-wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; z-index: 1; animation: sqabc-title-in .6s cubic-bezier(.2, .9, .3, 1) both; }
#squishyAbcGame .sqabc-display { font-family: 'Fredoka', sans-serif; font-weight: 600; letter-spacing: -.02em; line-height: 1; margin: 0; }
#squishyAbcGame .sqabc-start-tagline { margin: 0; color: var(--sq-muted); max-width: 430px; text-wrap: pretty; }
#squishyAbcGame .sqabc-start-assignment-note { margin: 0; color: var(--sq-gold); max-width: 460px; font-weight: 600; }
#squishyAbcGame .sqabc-start-stats { display: flex; gap: 8px; margin-top: 4px; flex-wrap: wrap; justify-content: center; }
#squishyAbcGame .sqabc-start-stats span { border: 1px solid var(--sq-card-border); background: var(--sq-card); border-radius: 999px; padding: 7px 15px; font-size: 13px; font-weight: 600; color: #c9c2d6; }
#squishyAbcGame .sqabc-start-btn { z-index: 1; font-size: 25px; padding: 18px 62px; }

/* ---------- mode screen ---------- */
#squishyAbcGame .sqabc-screen--mode { align-items: center; justify-content: center; gap: 26px; padding: 40px; }
#squishyAbcGame .sqabc-screen-title { font-family: 'Fredoka', sans-serif; font-weight: 600; margin: 0; animation: sqabc-title-in .5s cubic-bezier(.2, .9, .3, 1) both; }
#squishyAbcGame .sqabc-mode-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; width: min(940px, 100%); }
#squishyAbcGame .sqabc-mode-card {
  text-align: center; border: 1px solid var(--sq-card-border); background: var(--sq-card); border-radius: 24px; padding: 28px 22px;
  display: flex; flex-direction: column; align-items: center; gap: 14px; transition: transform .18s cubic-bezier(.2, .9, .3, 1), background .18s;
  color: inherit; font: inherit;
}
#squishyAbcGame .sqabc-mode-card:hover, #squishyAbcGame .sqabc-mode-card:focus-visible { transform: translateY(-5px) scale(1.02); background: var(--sq-card-hover); }
#squishyAbcGame .sqabc-mode-card:focus-visible { outline: 2px solid var(--sq-orange); outline-offset: 3px; }
#squishyAbcGame .sqabc-mode-icon {
  flex: none; width: 76px; height: 76px; display: flex; align-items: center; justify-content: center;
  font-family: 'Andika', sans-serif; font-weight: 700; box-shadow: 0 12px 24px rgba(0, 0, 0, .4); animation: sqabc-bob 3.2s ease-in-out infinite;
}
#squishyAbcGame .sqabc-mode-icon--look { border-radius: 44% 56% 52% 48% / 50% 46% 54% 50%; background: linear-gradient(150deg, #fffdf6, #ffd9e8 45%, #f4a8c4); color: #bd4a74; font-size: 30px; }
#squishyAbcGame .sqabc-mode-icon--lower { border-radius: 48% 52% 58% 42% / 54% 44% 56% 46%; background: linear-gradient(150deg, #fffdf6, #fff0c0 45%, #f0cc6e); color: #a97f1c; font-size: 24px; animation-delay: .6s; }
#squishyAbcGame .sqabc-mode-icon--upper { border-radius: 56% 44% 46% 54% / 48% 56% 44% 52%; background: linear-gradient(150deg, #ffffff, #ece2ff 45%, #9d7ce8); color: #4b2d8f; font-size: 24px; animation-delay: .9s; }
#squishyAbcGame .sqabc-mode-copy { display: flex; flex-direction: column; gap: 4px; align-items: center; }
#squishyAbcGame .sqabc-mode-name { font-family: 'Fredoka', sans-serif; font-weight: 500; color: var(--sq-text); }
#squishyAbcGame .sqabc-mode-desc { color: var(--sq-muted); }

/* ---------- letter picker screen ---------- */
#squishyAbcGame .sqabc-screen--pick { align-items: center; gap: 20px; padding: 36px; }
#squishyAbcGame .sqabc-pick-sub { margin: 0; color: var(--sq-muted); }
#squishyAbcGame .sqabc-pick-actions { display: flex; gap: 8px; }
#squishyAbcGame .sqabc-pick-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; width: min(700px, 100%); }
#squishyAbcGame .sqabc-pick-letter {
  width: 58px; height: 58px; border: 0; font-family: 'Andika', sans-serif; font-size: 25px; font-weight: 700; cursor: pointer;
  transition: transform .18s cubic-bezier(.2, .9, .3, 1), opacity .18s, box-shadow .18s, border-radius .3s;
}
#squishyAbcGame .sqabc-pick-letter:hover, #squishyAbcGame .sqabc-pick-letter:focus-visible { transform: translateY(-5px) scale(1.07); }
#squishyAbcGame .sqabc-pick-letter:active { transform: scale(1.1, .9); }
#squishyAbcGame .sqabc-pick-letter:focus-visible { outline: 2px solid var(--sq-orange); outline-offset: 2px; }
#squishyAbcGame .sqabc-pick-footer { display: flex; gap: 10px; margin-top: 6px; }
#squishyAbcGame .sqabc-pick-warning { font-size: 13px; color: var(--sq-orange); margin: 0; }

/* ---------- game screen ---------- */
#squishyAbcGame .sqabc-screen--game { min-height: 0; }
#squishyAbcGame .sqabc-game-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 32px 0; flex-wrap: wrap; }
#squishyAbcGame .sqabc-game-brand { display: flex; align-items: center; gap: 11px; cursor: pointer; background: none; border: 0; color: inherit; font: inherit; padding: 4px; border-radius: 10px; }
#squishyAbcGame .sqabc-game-brand:focus-visible { outline: 2px solid var(--sq-orange); }
#squishyAbcGame .sqabc-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--sq-orange); box-shadow: 0 0 18px var(--sq-orange); flex: none; }
#squishyAbcGame .sqabc-game-brand span[data-sqabc-type] { font-family: 'Fredoka', sans-serif; font-weight: 600; letter-spacing: -.01em; }
#squishyAbcGame .sqabc-game-mode { display: flex; align-items: center; gap: 10px; }
#squishyAbcGame .sqabc-game-mode-name { font-family: 'Fredoka', sans-serif; font-weight: 500; color: var(--sq-text); }
#squishyAbcGame .sqabc-game-progress { display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 500; color: var(--sq-muted-2); }
#squishyAbcGame .sqabc-streak-chip { display: flex; align-items: center; gap: 5px; background: rgba(255, 215, 110, .14); border: 1px solid rgba(255, 215, 110, .3); border-radius: 999px; padding: 5px 12px; color: var(--sq-gold); font-weight: 700; animation: sqabc-pop-in .25s cubic-bezier(.2, .9, .3, 1); }
#squishyAbcGame .sqabc-progress-track { width: 74px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .09); overflow: hidden; }
#squishyAbcGame .sqabc-progress-fill { height: 100%; border-radius: 3px; background: var(--sq-orange); width: 0%; transition: width .5s cubic-bezier(.2, .8, .3, 1); }

#squishyAbcGame .sqabc-prompt-row { display: flex; align-items: center; justify-content: center; gap: 18px; padding: 24px 32px 2px; flex-wrap: wrap; text-align: center; }
#squishyAbcGame .sqabc-prompt-audio {
  display: flex; align-items: center; gap: 15px; border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .07);
  border-radius: 999px; padding: 12px 30px 12px 13px; cursor: pointer; backdrop-filter: blur(12px); transition: transform .18s; color: inherit;
}
#squishyAbcGame .sqabc-prompt-audio:hover { transform: scale(1.04); }
#squishyAbcGame .sqabc-prompt-audio-icon { width: 52px; height: 52px; border-radius: 50%; background: var(--sq-orange); display: flex; align-items: center; justify-content: center; animation: sqabc-glow-pulse 2.6s ease-in-out infinite; flex: none; }
#squishyAbcGame .sqabc-prompt-audio span[data-role="prompt-text"] { font-family: 'Fredoka', sans-serif; font-weight: 600; color: var(--sq-text); letter-spacing: -.01em; }
#squishyAbcGame .sqabc-peek-btn { border: 1px solid rgba(255, 255, 255, .12); background: transparent; border-radius: 999px; padding: 14px 24px; font-weight: 600; font-size: 15px; color: var(--sq-muted); cursor: pointer; }
#squishyAbcGame .sqabc-prompt-static { font-family: 'Fredoka', sans-serif; font-weight: 600; color: var(--sq-text); letter-spacing: -.01em; }
#squishyAbcGame .sqabc-cue-tile {
  animation: sqabc-pop-in .25s cubic-bezier(.2, .9, .3, 1), sqabc-squash 3.6s ease-in-out 1s infinite;
  width: 92px; height: 92px; border-radius: 44% 56% 50% 50% / 52% 46% 54% 48%;
  background: linear-gradient(150deg, #fffdf6, #ffe3d2 45%, #ffb289);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Andika', sans-serif; font-size: 52px; font-weight: 700; color: #93401f;
  box-shadow: 0 14px 28px rgba(0, 0, 0, .45), inset 0 -8px 18px rgba(0, 0, 0, .08);
}

#squishyAbcGame .sqabc-stage {
  position: relative; flex: 1; display: flex; align-items: flex-end; justify-content: center;
  padding: 6px 20px 0; min-height: 260px; touch-action: none; cursor: pointer;
}
#squishyAbcGame .sqabc-stage-glow {
  position: absolute; left: 50%; bottom: -40px; transform: translateX(-50%); width: min(1100px, 92%); height: 270px; border-radius: 50%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(255, 226, 196, .16) 0%, rgba(255, 214, 180, .05) 46%, rgba(0, 0, 0, 0) 72%);
  pointer-events: none;
}
#squishyAbcGame .sqabc-stage-vignette { position: absolute; left: 0; right: 0; bottom: 0; height: 120px; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, .32) 100%); pointer-events: none; }
#squishyAbcGame .sqabc-stage-motes { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
#squishyAbcGame .sqabc-stage-motes span { position: absolute; border-radius: 50%; opacity: .4; }
#squishyAbcGame .sqabc-stage-motes span:nth-child(1) { left: 12%; top: 18%; width: 10px; height: 10px; background: #ffd0ea; animation: sqabc-bob 5s ease-in-out infinite; }
#squishyAbcGame .sqabc-stage-motes span:nth-child(2) { left: 24%; top: 52%; width: 6px; height: 6px; background: #bfe8ff; opacity: .35; animation: sqabc-drift 7s ease-in-out infinite 1s; }
#squishyAbcGame .sqabc-stage-motes span:nth-child(3) { left: 46%; top: 14%; width: 8px; height: 8px; background: #fff3b0; animation: sqabc-bob 6s ease-in-out infinite 2s; }
#squishyAbcGame .sqabc-stage-motes span:nth-child(4) { left: 70%; top: 40%; width: 7px; height: 7px; background: #d9c2ff; opacity: .35; animation: sqabc-drift 6s ease-in-out infinite .5s; }
#squishyAbcGame .sqabc-stage-motes span:nth-child(5) { left: 86%; top: 20%; width: 11px; height: 11px; background: #ffd0b0; animation: sqabc-bob 5.4s ease-in-out infinite 1.4s; }
#squishyAbcGame .sqabc-stage-motes span:nth-child(6) { left: 60%; top: 64%; width: 5px; height: 5px; background: #c2ffe9; opacity: .3; animation: sqabc-bob 6.6s ease-in-out infinite 2.6s; }
#squishyAbcGame .sqabc-slot { position: relative; width: min(38vw, 540px); height: 100%; max-height: 580px; display: flex; align-items: flex-end; justify-content: center; }
#squishyAbcGame .sqabc-blob-svg { position: relative; width: 100%; height: 100%; overflow: visible; transform-origin: 50% 92%; animation: sqabc-squash 5.2s ease-in-out infinite; }
#squishyAbcGame .sqabc-blob-svg--1 { animation-duration: 4.6s; animation-delay: .9s; }
#squishyAbcGame .sqabc-blob-svg--2 { animation-duration: 5.8s; animation-delay: 1.8s; }
#squishyAbcGame .sqabc-blob-svg--3 { animation: none; }
#squishyAbcGame .sqabc-fx { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 3; }

#squishyAbcGame .sqabc-feedback {
  display: flex; justify-content: center; padding: 0 20px; margin-top: -6px;
}
#squishyAbcGame .sqabc-feedback span {
  animation: sqabc-pop-in .25s cubic-bezier(.2, .9, .3, 1); background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .11);
  backdrop-filter: blur(14px); border-radius: 16px; padding: 11px 24px; font-family: 'Fredoka', sans-serif; font-weight: 500; color: var(--sq-text);
}
#squishyAbcGame .sqabc-trail { display: flex; justify-content: center; gap: 4px; flex-wrap: wrap; padding: 14px 32px 16px; }
#squishyAbcGame .sqabc-trail-letter {
  width: 26px; height: 26px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-family: 'Andika', sans-serif; font-size: 15px; font-weight: 600;
}
#squishyAbcGame .sqabc-trail-letter--on { background: var(--sq-orange); color: var(--sq-orange-ink); }
#squishyAbcGame .sqabc-trail-letter--off { background: rgba(255, 255, 255, .045); color: var(--sq-faint); font-weight: 500; }

/* ---------- game over screen ---------- */
#squishyAbcGame .sqabc-screen--over { align-items: center; justify-content: center; gap: 22px; padding: 40px; text-align: center; }
#squishyAbcGame .sqabc-over-fx { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
#squishyAbcGame .sqabc-over-glow { position: absolute; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(50% 50% at 50% 50%, rgba(255, 200, 140, .2), rgba(0, 0, 0, 0) 70%); animation: sqabc-drift 8s ease-in-out infinite; pointer-events: none; }
#squishyAbcGame .sqabc-over-badge {
  position: relative; z-index: 1; width: 150px; height: 150px; border-radius: 46% 54% 52% 48% / 50% 46% 54% 50%;
  background: linear-gradient(150deg, #fffdf6, #ffe3d2 42%, #ffb289); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 24px 48px rgba(0, 0, 0, .5), inset 0 -12px 26px rgba(0, 0, 0, .08); animation: sqabc-squash 1.6s ease-in-out infinite;
}
#squishyAbcGame .sqabc-over-title-wrap { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 10px; animation: sqabc-title-in .6s cubic-bezier(.2, .9, .3, 1) both; }
#squishyAbcGame .sqabc-over-sub { margin: 0; color: var(--sq-muted); }
#squishyAbcGame .sqabc-over-stats { position: relative; z-index: 1; display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
#squishyAbcGame .sqabc-over-stat { border: 1px solid var(--sq-card-border); background: var(--sq-card); border-radius: 20px; padding: 16px 30px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
#squishyAbcGame .sqabc-over-stat span:first-child { font-family: 'Fredoka', sans-serif; font-size: 34px; font-weight: 600; }
#squishyAbcGame .sqabc-over-stat span:last-child { font-size: 13px; font-weight: 600; color: var(--sq-muted); }
#squishyAbcGame .sqabc-over-stat--orange span:first-child { color: var(--sq-orange); }
#squishyAbcGame .sqabc-over-stat--gold span:first-child { color: var(--sq-gold); }
#squishyAbcGame .sqabc-over-stat--purple span:first-child { color: var(--sq-purple); }
#squishyAbcGame .sqabc-over-stat--teal span:first-child { color: var(--sq-teal); }
#squishyAbcGame .sqabc-over-accuracy-detail { position: relative; z-index: 1; margin: -6px 0 0; color: var(--sq-muted); font-size: 14px; }
#squishyAbcGame .sqabc-over-actions { position: relative; z-index: 1; display: flex; gap: 10px; margin-top: 4px; flex-wrap: wrap; justify-content: center; }
#squishyAbcGame .sqabc-over-actions .sqabc-btn--primary { font-size: 21px; padding: 15px 44px; }

#squishyAbcGame .sqabc-recap-card {
  position: relative; z-index: 1; width: min(520px, 100%); border: 1px solid var(--sq-card-border); background: var(--sq-card);
  border-radius: 24px; padding: 24px 28px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
}
#squishyAbcGame .sqabc-recap-card h3 { margin: 0; font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 22px; }
#squishyAbcGame .sqabc-recap-card p { margin: 0; color: var(--sq-muted); }
#squishyAbcGame .sqabc-recap-card--assignment { border-color: rgba(255, 215, 110, .35); background: rgba(255, 215, 110, .08); }

/* ---------- responsive ---------- */
@media (max-width: 720px) {
  #squishyAbcGame .sqabc-mode-grid { grid-template-columns: 1fr; }
  #squishyAbcGame .sqabc-game-header { padding: 16px 18px 0; }
  #squishyAbcGame .sqabc-slot { width: 30vw; }
  #squishyAbcGame .sqabc-display { line-height: .95; }
  #squishyAbcGame .sqabc-start-blobs { gap: 12px; }
  #squishyAbcGame .sqabc-start-blob--a { width: 68px; height: 68px; font-size: 30px; }
  #squishyAbcGame .sqabc-start-blob--b { width: 82px; height: 82px; font-size: 36px; }
  #squishyAbcGame .sqabc-start-blob--c { width: 64px; height: 64px; font-size: 28px; }
  #squishyAbcGame .sqabc-start-blob--d { width: 54px; height: 54px; font-size: 24px; }
}
@media (max-width: 400px) {
  #squishyAbcGame .sqabc-start-blobs { gap: 8px; }
  #squishyAbcGame .sqabc-start-blob--a { width: 54px; height: 54px; font-size: 24px; }
  #squishyAbcGame .sqabc-start-blob--b { width: 66px; height: 66px; font-size: 28px; }
  #squishyAbcGame .sqabc-start-blob--c { width: 50px; height: 50px; font-size: 22px; }
  #squishyAbcGame .sqabc-start-blob--d { width: 42px; height: 42px; font-size: 18px; }
}
@media (max-height: 620px) {
  #squishyAbcGame .sqabc-stage { min-height: 200px; }
  #squishyAbcGame .sqabc-screen--start { gap: 16px; padding: 18px; }
}
