/* ═══════════════════════════════════════════════════════
   Robot Builder — Style
   Ages 5–8 · Mobile-first · WCAG 2.1 AA
   Theme: workshop / garden, warm oranges and greens
════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-a: #fff8e1;
  --bg-b: #e8f5e9;
  --bg-c: #e3f2fd;

  --scene-sky:    #e3f2fd;
  --scene-ground: #a5d6a7;
  --scene-ground2:#81c784;

  --block-walk:   #42a5f5;
  --block-pick:   #66bb6a;
  --block-action: #ff7043;
  --block-back:   #ab47bc;

  --run-btn:      #43a047;
  --run-btn-dark: #2e7d32;

  --white:   #ffffff;
  --text:    #1a237e;
  --soft:    #455a64;
  --radius:  18px;
  --shadow:  0 4px 16px rgba(0,0,0,0.12);
  --shadow-md: 0 8px 28px rgba(0,0,0,0.18);
  --pill:    50px;
}

html, body {
  height: 100%;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: linear-gradient(155deg, var(--bg-a) 0%, var(--bg-b) 55%, var(--bg-c) 100%);
  overflow: hidden;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

.screen { display: none; position: fixed; inset: 0; flex-direction: column; }
.screen.active { display: flex; }

/* ═══════════════════════════════════════════════════════
   START SCREEN
════════════════════════════════════════════════════════ */

#start-screen { align-items: center; justify-content: center; padding: 20px; }

.start-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  max-width: 420px;
  width: 100%;
}

#start-robot svg { width: 100px; height: auto; animation: robotBob 1.8s ease-in-out infinite; }

.start-inner h1 {
  font-size: clamp(2.2rem, 7.5vw, 3.4rem);
  font-weight: 900;
  color: var(--text);
  letter-spacing: -0.02em;
}

.start-tagline {
  font-size: clamp(0.95rem, 3.3vw, 1.15rem);
  color: var(--soft);
  line-height: 1.6;
}

/* Example block row */
.start-example {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ex-block {
  background: var(--bc, #42a5f5);
  color: white;
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  box-shadow: var(--shadow);
}

.ex-block span { font-size: 0.65rem; }
.ex-arrow { font-size: 1.4rem; color: var(--soft); font-weight: 700; }

/* ═══════════════════════════════════════════════════════
   HEADER
════════════════════════════════════════════════════════ */

.game-header {
  display: flex;
  align-items: center;
  padding: 8px 14px;
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1.5px solid rgba(255,255,255,0.9);
  flex-shrink: 0;
  gap: 8px;
}

.task-badge {
  background: var(--text);
  color: white;
  border-radius: var(--pill);
  padding: 4px 12px;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

.task-title {
  flex: 1;
  font-size: clamp(0.85rem, 3vw, 1rem);
  font-weight: 700;
  color: var(--text);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.star-pill {
  background: #fff8e1;
  border: 2px solid #ffe082;
  color: #f57f17;
  border-radius: var(--pill);
  padding: 4px 12px;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════
   SCENE STRIP
════════════════════════════════════════════════════════ */

.scene-strip {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  padding: 8px 20px 0;
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--scene-sky) 0%, #c8e6f9 70%, var(--scene-ground) 70%, var(--scene-ground2) 100%);
  border-radius: 0 0 16px 16px;
  min-height: 128px;
  overflow: visible;
  margin: 0 12px;
  border: 2px solid rgba(255,255,255,0.7);
}

.scene-pos {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding-bottom: 6px;
  min-width: 64px;
  position: relative;
  z-index: 1;
}

.scene-obj {
  font-size: clamp(2rem, 7vw, 2.8rem);
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.scene-obj.picked-up {
  transform: scale(0.3);
  opacity: 0;
}

.scene-obj.action-done {
  animation: objectJoy 0.5s ease;
}

.scene-pos-label {
  font-size: 0.62rem;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Ground dots */
.scene-pos::after {
  content: '';
  width: 8px; height: 8px;
  background: rgba(255,255,255,0.6);
  border-radius: 50%;
  position: absolute;
  bottom: 2px;
}

/* ─── Robot sprite ─────────────────────────────────── */

.robot-sprite {
  position: absolute;
  bottom: 4px;
  left: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  transition: transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2;
}

.robot-sprite.walking-right { animation: leanRight 0.65s ease; }
.robot-sprite.walking-left  { animation: leanLeft  0.65s ease; }

#robot-body svg { width: 52px; height: auto; }

.held-item {
  font-size: 1.5rem;
  line-height: 1;
  animation: heldBob 0.6s ease-in-out infinite alternate;
}

.held-item.hidden { display: none; }

/* Action effect burst */
.action-effect {
  position: absolute;
  font-size: 2.2rem;
  z-index: 3;
  pointer-events: none;
  animation: effectBurst 0.7s ease forwards;
}

.action-effect.hidden { display: none; }

/* ═══════════════════════════════════════════════════════
   TASK INSTRUCTION
════════════════════════════════════════════════════════ */

.task-instruction {
  text-align: center;
  font-size: clamp(0.92rem, 3.5vw, 1.1rem);
  font-weight: 600;
  color: var(--text);
  padding: 8px 20px 4px;
  flex-shrink: 0;
}

/* ─── Status message ─────────────────────────────────── */

.status-msg {
  margin: 0 12px;
  padding: 9px 16px;
  border-radius: 12px;
  font-size: clamp(0.85rem, 3vw, 0.98rem);
  font-weight: 600;
  text-align: center;
  flex-shrink: 0;
  line-height: 1.4;
  animation: popIn 0.3s ease;
}

.status-msg.hidden { display: none; }
.status-msg.error  { background: #fff3e0; color: #bf360c; border: 2px solid #ffcc80; }
.status-msg.success{ background: #e8f5e9; color: #1b5e20; border: 2px solid #a5d6a7; }
.status-msg.info   { background: #e3f2fd; color: #0d47a1; border: 2px solid #90caf9; }

/* ═══════════════════════════════════════════════════════
   BLOCK PALETTE
════════════════════════════════════════════════════════ */

.palette-label {
  padding: 6px 16px 3px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--soft);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.palette {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 12px 6px;
  justify-content: center;
  flex-shrink: 0;
}

.block-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 10px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  color: white;
  min-width: clamp(58px, 17vw, 76px);
  min-height: 62px;
  box-shadow: var(--shadow);
  transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.2s ease;
  position: relative;
  overflow: hidden;
}

.block-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.15);
  opacity: 0;
  transition: opacity 0.15s;
  border-radius: inherit;
}

.block-btn:hover:not(:disabled)::after { opacity: 1; }
.block-btn:hover:not(:disabled) { transform: translateY(-3px) scale(1.05); box-shadow: var(--shadow-md); }
.block-btn:active:not(:disabled) { transform: scale(0.96); }
.block-btn:focus-visible { outline: 4px solid var(--text); outline-offset: 3px; }

.block-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.block-btn.type-walk   { background: var(--block-walk);   }
.block-btn.type-pick   { background: var(--block-pick);   }
.block-btn.type-action { background: var(--block-action); }
.block-btn.type-back   { background: var(--block-back);   }

.block-emoji { font-size: 1.5rem; line-height: 1; pointer-events: none; }
.block-label { font-size: 0.68rem; font-weight: 700; pointer-events: none; text-align: center; line-height: 1.2; }

/* ═══════════════════════════════════════════════════════
   SEQUENCE PANEL
════════════════════════════════════════════════════════ */

.sequence-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 16px 2px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--soft);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.sequence-panel {
  display: flex;
  gap: 8px;
  padding: 6px 12px 8px;
  overflow-x: auto;
  min-height: 76px;
  background: rgba(255,255,255,0.45);
  border-radius: 16px;
  margin: 0 12px;
  align-items: center;
  flex-shrink: 0;
  scrollbar-width: none;
  border: 2px dashed rgba(0,0,0,0.1);
}

.sequence-panel::-webkit-scrollbar { display: none; }

.sequence-empty {
  font-size: 0.85rem;
  color: rgba(0,0,0,0.3);
  font-style: italic;
  text-align: center;
  width: 100%;
  pointer-events: none;
}

/* Sequence block */
.seq-block {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  border-radius: 12px;
  padding: 6px 8px;
  color: white;
  min-width: 52px;
  position: relative;
  cursor: pointer;
  transition: transform 0.12s ease;
  box-shadow: var(--shadow);
}

.seq-block:hover { transform: scale(0.93); }
.seq-block:hover .seq-remove { opacity: 1; }

.seq-block.type-walk   { background: var(--block-walk);   }
.seq-block.type-pick   { background: var(--block-pick);   }
.seq-block.type-action { background: var(--block-action); }
.seq-block.type-back   { background: var(--block-back);   }

.seq-block.executing {
  animation: blockPulse 0.4s ease infinite alternate;
  box-shadow: 0 0 0 3px #ffd54f, var(--shadow);
}

.seq-block.done {
  opacity: 0.55;
  filter: grayscale(0.3);
}

.seq-block.errored {
  animation: blockShake 0.4s ease;
  box-shadow: 0 0 0 3px #ef5350;
}

.seq-num {
  position: absolute;
  top: -6px;
  left: -4px;
  background: rgba(0,0,0,0.45);
  color: white;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  font-size: 0.6rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}

.seq-emoji { font-size: 1.3rem; line-height: 1; }
.seq-label { font-size: 0.6rem; font-weight: 700; text-align: center; line-height: 1.2; }

.seq-remove {
  position: absolute;
  top: -7px;
  right: -7px;
  width: 17px; height: 17px;
  background: #ef5350;
  border-radius: 50%;
  font-size: 0.7rem;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s;
  pointer-events: none;
  font-weight: 900;
  line-height: 1;
}

/* ═══════════════════════════════════════════════════════
   RUN CONTROLS
════════════════════════════════════════════════════════ */

.run-controls {
  display: flex;
  justify-content: center;
  padding: 6px 12px 8px;
  flex-shrink: 0;
}

.btn-run {
  background: var(--run-btn);
  color: white;
  border: none;
  border-radius: var(--pill);
  padding: 12px 48px;
  font-size: clamp(1.05rem, 4vw, 1.25rem);
  font-weight: 900;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(67,160,71,0.4);
  transition: transform 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
  min-height: 48px;
  letter-spacing: 0.02em;
}

.btn-run:hover:not(:disabled) {
  background: var(--run-btn-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(67,160,71,0.5);
}

.btn-run:active:not(:disabled) { transform: translateY(0); }
.btn-run:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }
.btn-run:focus-visible { outline: 4px solid #ffd54f; outline-offset: 3px; }

.btn-clear {
  background: transparent;
  border: 1.5px solid #ccc;
  border-radius: var(--pill);
  color: var(--soft);
  padding: 3px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.12s ease;
}
.btn-clear:hover { background: #f5f5f5; }
.btn-clear:focus-visible { outline: 3px solid var(--text); outline-offset: 2px; }

/* ═══════════════════════════════════════════════════════
   OVERLAYS
════════════════════════════════════════════════════════ */

.overlay {
  position: fixed; inset: 0;
  background: rgba(10,25,60,0.58);
  display: flex; align-items: center; justify-content: center;
  z-index: 200; padding: 20px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.overlay.hidden { display: none; }

.overlay-card {
  background: var(--white);
  border-radius: 30px;
  padding: 32px 26px;
  text-align: center;
  max-width: 380px;
  width: 100%;
  box-shadow: 0 24px 64px rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 1;
  animation: popIn 0.35s cubic-bezier(0.34,1.56,0.64,1) forwards;
}

.overlay-emoji { font-size: 3.5rem; }

.overlay-card h2 { font-size: clamp(1.5rem,6vw,2rem); font-weight: 900; color: var(--text); }
.overlay-card p  { font-size: clamp(0.95rem,3.5vw,1.1rem); color: var(--soft); line-height: 1.5; }

.learn-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #e8f5e9;
  border-radius: 50px;
  padding: 6px 14px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #1b5e20;
}

.learn-box {
  background: #e3f2fd;
  border-radius: 14px;
  padding: 12px 16px;
}
.learn-box p { font-size: 0.88rem; color: #0d47a1; line-height: 1.55; text-align: left; }

.stars-row       { font-size: 1.9rem; letter-spacing: 4px; }
.stars-row.large { font-size: 2.6rem; }

/* Robot name input */
.robot-name-input {
  width: 100%;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 1.1rem;
  font-family: inherit;
  text-align: center;
  transition: border-color 0.15s ease;
  outline: none;
}
.robot-name-input:focus { border-color: var(--text); }

/* Certificate */
.graduation .overlay-emoji { font-size: 4rem; }
.certificate {
  border: 3px solid #ffd54f;
  background: linear-gradient(135deg, #fffde7 0%, #fff 100%);
}
.cert-header {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--soft);
  text-transform: uppercase;
}
.cert-sub { font-size: 0.9rem; color: var(--soft); }
#cert-robot svg { width: 80px; height: auto; }
#grad-robot svg { width: 90px; height: auto; }

/* ─── Confetti ─────────────────────────────────────── */

#confetti-stage, #confetti-stage-2 {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0; overflow: hidden;
}
.confetti-bit {
  position: absolute; top: -20px;
  border-radius: 3px;
  animation: confettiFall linear forwards;
}

/* ═══════════════════════════════════════════════════════
   BUTTONS
════════════════════════════════════════════════════════ */

.btn-primary {
  background: var(--text);
  color: white;
  border: none; border-radius: var(--pill);
  padding: 13px 36px;
  font-size: clamp(1rem,3.8vw,1.2rem);
  font-weight: 800; font-family: inherit;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(26,35,126,0.35);
  transition: transform 0.14s, box-shadow 0.14s, background 0.14s;
  min-height: 50px;
}
.btn-primary:hover { background: #283593; transform: translateY(-2px); box-shadow: 0 10px 28px rgba(26,35,126,0.45); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:focus-visible { outline: 4px solid #ffd54f; outline-offset: 3px; }

.mute-btn {
  position: fixed; top: 12px; right: 14px;
  width: 40px; height: 40px;
  border-radius: 50%; border: none;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  font-size: 1.15rem; cursor: pointer; z-index: 9000;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow);
  transition: transform 0.12s;
}
.mute-btn:hover { transform: scale(1.1); }

/* ═══════════════════════════════════════════════════════
   ANIMATIONS
════════════════════════════════════════════════════════ */

@keyframes robotBob {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-12px); }
}

@keyframes leanRight {
  0%, 100% { transform: translateX(var(--robot-x, 0)) rotate(0deg); }
  35%       { transform: translateX(calc(var(--robot-x, 0) + 0px)) rotate(8deg); }
}

@keyframes leanLeft {
  0%, 100% { transform: translateX(var(--robot-x, 0)) rotate(0deg); }
  35%       { transform: translateX(calc(var(--robot-x, 0) + 0px)) rotate(-8deg); }
}

@keyframes heldBob {
  from { transform: translateY(0); }
  to   { transform: translateY(-4px); }
}

@keyframes effectBurst {
  0%   { transform: scale(0) translateY(0); opacity: 1; }
  50%  { transform: scale(1.6) translateY(-20px); opacity: 1; }
  100% { transform: scale(1) translateY(-40px); opacity: 0; }
}

@keyframes objectJoy {
  0%, 100% { transform: scale(1) rotate(0deg); }
  30%       { transform: scale(1.3) rotate(-10deg); }
  60%       { transform: scale(1.2) rotate(10deg); }
}

@keyframes blockPulse {
  from { transform: scale(1); }
  to   { transform: scale(1.08); }
}

@keyframes blockShake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-8px); }
  40%       { transform: translateX(8px); }
  60%       { transform: translateX(-5px); }
  80%       { transform: translateX(4px); }
}

@keyframes popIn {
  0%   { transform: scale(0.55); opacity: 0; }
  70%  { transform: scale(1.05); }
  100% { transform: scale(1);    opacity: 1; }
}

@keyframes confettiFall {
  0%   { transform: translateY(-30px) rotate(0deg); opacity: 1; }
  85%  { opacity: 1; }
  100% { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════════════ */

@media (max-width: 360px) {
  .block-btn { min-width: 52px; min-height: 56px; padding: 6px 7px; }
  .block-emoji { font-size: 1.3rem; }
  .block-label { font-size: 0.6rem; }
}

@media (min-height: 700px) {
  .scene-strip { min-height: 150px; }
  #robot-body svg { width: 60px; }
  .scene-obj { font-size: 3rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ═══════════════════════════════════════════════════════
   SPARKY SPEECH BUBBLE
════════════════════════════════════════════════════════ */

.sparky-bubble {
  position: relative;
  margin: 6px 14px 0;
  background: #ffffff;
  border: 2.5px solid #90caf9;
  border-radius: 20px;
  padding: 10px 16px;
  box-shadow: 0 4px 14px rgba(66,165,245,0.18);
  animation: popIn 0.22s cubic-bezier(0.34,1.56,0.64,1) forwards;
  flex-shrink: 0;
}

/* Tail pointing up toward Sparky */
.sparky-bubble::before {
  content: '';
  position: absolute;
  top: -12px; left: 36px;
  border: 12px solid transparent;
  border-bottom-color: #90caf9;
  border-top: 0;
}
.sparky-bubble::after {
  content: '';
  position: absolute;
  top: -8px; left: 38px;
  border: 10px solid transparent;
  border-bottom-color: #ffffff;
  border-top: 0;
}

.sparky-bubble.hidden { display: none; }

.bubble-text {
  font-size: clamp(0.88rem, 3.2vw, 1.02rem);
  font-weight: 600;
  color: #1a237e;
  line-height: 1.5;
  margin: 0;
}

/* Scaffold mode label */
#palette-label.watch-mode {
  font-style: italic;
  color: #7e57c2;
}

/* ═══════════════════════════════════════════════════════
   ENVIRONMENT ANIMATIONS (scene objects)
════════════════════════════════════════════════════════ */

@keyframes droop {
  0%, 100% { transform: rotate(-8deg) scale(0.95); }
  50%       { transform: rotate(-15deg) scale(0.93); }
}
@keyframes perk {
  0%   { transform: rotate(-8deg) scale(0.95); }
  40%  { transform: rotate(10deg) scale(1.3); }
  100% { transform: rotate(0deg) scale(1); }
}
@keyframes swimSlow {
  0%, 100% { transform: translateX(0); }
  50%       { transform: translateX(-7px); }
}
@keyframes swimFast {
  0%, 100% { transform: translateX(0); }
  25%       { transform: translateX(6px); }
  75%       { transform: translateX(-6px); }
}

.env-droop     { animation: droop    2.2s ease-in-out infinite; transform-origin: bottom center; }
.env-perk      { animation: perk     0.65s ease forwards; }
.env-swim      { animation: swimSlow 1.8s ease-in-out infinite; }
.env-swim-fast { animation: swimFast 0.45s ease-in-out infinite; }

/* Robot body spin (Spin distractor block) */
@keyframes bodySpinAnim {
  0%   { transform: rotate(0deg) scale(1); }
  50%  { transform: rotate(180deg) scale(1.15); }
  100% { transform: rotate(360deg) scale(1); }
}
.body-spin { animation: bodySpinAnim 0.55s ease; }

/* ═══════════════════════════════════════════════════════
   ROBOT LOG (Sparky's diary in task overlay)
════════════════════════════════════════════════════════ */

.robot-log {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: #f8faff;
  border: 1.5px dashed #90caf9;
  border-radius: 14px;
  padding: 10px 14px;
  width: 100%;
  text-align: left;
}
.robot-log.hidden { display: none; }
.log-icon { font-size: 1.25rem; flex-shrink: 0; line-height: 1.4; }
.log-text  {
  font-size: 0.82rem;
  color: #374151;
  line-height: 1.55;
  margin: 0;
  font-style: italic;
}

/* ═══════════════════════════════════════════════════════
   CELEBRATION OVERLAY (micro-break between tasks)
════════════════════════════════════════════════════════ */

.celebrate-overlay {
  position: fixed; inset: 0;
  background: linear-gradient(135deg, #1a237e 0%, #283593 60%, #1565c0 100%);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  z-index: 500;
  gap: 18px;
  animation: popIn 0.3s ease;
}
.celebrate-accessory { font-size: 5rem; animation: robotBob 1.2s ease-in-out infinite; }
.celebrate-title {
  font-size: clamp(1.6rem,6vw,2.2rem);
  font-weight: 900;
  color: #ffffff;
  text-align: center;
}
.celebrate-sub {
  font-size: clamp(1rem,3.5vw,1.2rem);
  color: rgba(255,255,255,0.8);
  text-align: center;
}
.celebrate-robot svg { width: 90px; height: auto; }

/* Try counter chip */
.try-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,0.15);
  border-radius: 50px;
  padding: 4px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--soft);
  margin-top: 4px;
}
