/* Kioder app — light, playful "sticker" theme for kids (matches the website) */
:root {
  --paper: #f3f7ff;
  --ink: #1d1f4d;
  --violet: #6c4bff;
  --violet-soft: #e4ddff;
  --mint: #2fd9a6;
  --mint-soft: #c8f6e6;
  --sun: #ffd23f;
  --sun-soft: #fff0a8;
  --pink: #ff5fa2;
  --pink-soft: #ffd5e8;
  --sky: #5cc8ff;
  --white: #fff;
  --text: #1d1f4d;
  --text-soft: #46497a;
  --text-mute: #6b6f9c;
  --line-w: 3px;
  --line: #1d1f4d;
  --pop: 4px 4px 0 #1d1f4d;
  --radius: 22px;
  /* legacy names still used in places */
  --bg-panel: #fff;
  --bg-panel-2: #f3f7ff;
  --ink-deep: #1d1f4d;
}

* { box-sizing: border-box; }
:focus-visible { outline: 4px solid var(--violet); outline-offset: 3px; border-radius: 8px; }

body {
  margin: 0;
  font-family: "Fredoka", ui-rounded, "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  background: var(--paper) radial-gradient(circle, #cfd9f7 1.6px, transparent 1.8px) 0 0 / 26px 26px;
  color: var(--text);
  min-height: 100vh;
  position: relative;
}

h1, h2 { font-family: "Fredoka", ui-rounded, sans-serif; font-weight: 700; color: var(--ink); }

/* --- floating shapes (injected by byte.js) --- */
.lcc-field { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.lcc-pixel { position: absolute; border-radius: 50%; opacity: .35; animation: lcc-drift linear infinite alternate; }
.lcc-blob { display: none; }
@keyframes lcc-drift { 0% { transform: translateY(0) rotate(0deg); } 100% { transform: translateY(-36px) rotate(90deg); } }
@keyframes lcc-twinkle { 0%, 100% { opacity: .15; } 50% { opacity: .5; } }

.topbar {
  position: relative; z-index: 2;
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 24px;
  background: var(--white);
  border-bottom: var(--line-w) solid var(--ink);
}

.logo {
  font-family: "Fredoka", ui-rounded, sans-serif;
  font-weight: 700; font-size: 1.5rem;
  color: var(--ink);
  display: flex; align-items: center; gap: 10px;
}
.logo::before {
  content: "🧩";
  width: 36px; height: 36px; border-radius: 11px;
  background: var(--sun);
  border: var(--line-w) solid var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.05rem;
}

.topbar-right { display: flex; align-items: center; gap: 12px; }

.theme-badge {
  font-weight: 700; font-size: .85rem;
  color: var(--ink); background: var(--sun);
  border: 2px solid var(--ink);
  border-radius: 999px; padding: 4px 14px;
}

.logout-btn {
  background: var(--white);
  border: 2px solid var(--ink);
  color: var(--ink);
  padding: 6px 16px; border-radius: 999px;
  font: 600 .9rem "Fredoka", sans-serif;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--ink);
  transition: transform .12s ease, box-shadow .12s ease;
}
.logout-btn:hover { transform: translate(-1px,-1px); box-shadow: 3px 3px 0 var(--ink); }

.help-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--sky); border: 2px solid var(--ink);
  font-size: .95rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 2px 2px 0 var(--ink);
  transition: transform .12s ease;
}
.help-btn:hover { transform: translate(-1px,-1px) rotate(-6deg); }

.screen { position: relative; z-index: 1; padding: 40px 24px; max-width: 1100px; margin: 0 auto; }
.screen[hidden] { display: none !important; }

#theme-picker, #child-picker-screen, #language-screen, #level-picker { text-align: center; }
#theme-picker h1, #child-picker-screen h1, #language-screen h1, #level-picker h1 { font-size: 2.3rem; margin-bottom: 6px; }

.subtitle { color: var(--text-soft); margin-bottom: 30px; font-size: 1.12rem; }

.theme-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 18px; }

/* cards: levels + themes */
.theme-card, .level-card {
  position: relative;
  background: var(--white);
  border: var(--line-w) solid var(--ink);
  border-radius: 24px;
  box-shadow: var(--pop);
  cursor: pointer;
  text-align: center;
  font-weight: 600; color: var(--ink);
  transition: transform .15s ease, box-shadow .15s ease;
}
.theme-card { padding: 24px 16px; font-size: 1.05rem; }
.theme-card:nth-child(5n+1), .level-card:nth-child(5n+1) { background: var(--sun-soft); }
.theme-card:nth-child(5n+2), .level-card:nth-child(5n+2) { background: var(--mint-soft); }
.theme-card:nth-child(5n+3), .level-card:nth-child(5n+3) { background: var(--pink-soft); }
.theme-card:nth-child(5n+4), .level-card:nth-child(5n+4) { background: var(--violet-soft); }
.theme-card:nth-child(5n+5), .level-card:nth-child(5n+5) { background: #d2f0ff; }
.theme-card:hover, .level-card:hover { transform: translate(-3px,-3px) rotate(-1deg); box-shadow: 7px 7px 0 var(--ink); }
.theme-card:active, .level-card:active { transform: translate(3px,3px); box-shadow: 1px 1px 0 var(--ink); }
.theme-card .emoji { font-size: 2.5rem; display: block; margin-bottom: 8px; }

.lang-grid { max-width: 620px; margin: 0 auto; }
#language-screen h1 { font-size: 1.5rem; max-width: 700px; margin: 0 auto 30px; }

.section-label { font-weight: 700; font-size: .85rem; color: var(--violet); margin-right: 10px; }

.workspace-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 20px; }
@media (max-width: 800px) { .workspace-grid { grid-template-columns: 1fr; } }

.editor-panel, .preview-panel {
  background: var(--white);
  border: var(--line-w) solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 5px 5px 0 var(--ink);
  padding: 18px;
}

.panel-header {
  font-weight: 700; font-size: .95rem;
  color: var(--ink);
  margin: 14px 0 6px;
  display: flex; align-items: center; gap: 8px;
}
.panel-header:first-child { margin-top: 0; }
.panel-header::before { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--ink); background: var(--pink); }
.panel-header:first-child::before { background: var(--mint); }

textarea {
  width: 100%; height: 112px;
  font-family: "JetBrains Mono", monospace; font-size: .86rem; line-height: 1.6;
  color: #e9ecff; background: var(--ink);
  border: var(--line-w) solid var(--ink);
  border-radius: 14px; padding: 12px; resize: vertical;
  caret-color: var(--sun);
}
textarea:focus { outline: none; box-shadow: 0 0 0 4px var(--violet-soft), 0 0 0 7px var(--violet); }

.run-btn {
  margin-top: 16px; width: 100%;
  background: var(--mint); color: var(--ink);
  border: var(--line-w) solid var(--ink);
  padding: 13px; border-radius: 999px;
  font: 700 1.12rem "Fredoka", ui-rounded, sans-serif;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform .12s ease, box-shadow .12s ease;
}
.run-btn:hover { transform: translate(-2px,-2px); box-shadow: 6px 6px 0 var(--ink); }
.run-btn:active { transform: translate(3px,3px); box-shadow: 1px 1px 0 var(--ink); }

#preview-frame {
  width: 100%; height: 320px;
  border: var(--line-w) solid var(--ink);
  border-radius: 14px; background: white; display: block;
}

.live-indicator { font-weight: 600; font-size: .85rem; color: var(--violet); }

.made-this-btn {
  margin-top: 14px; width: 100%;
  background: var(--sun); color: var(--ink);
  border: var(--line-w) solid var(--ink);
  padding: 13px; border-radius: 999px;
  font: 700 1.12rem "Fredoka", ui-rounded, sans-serif;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--ink);
  animation: lcc-pop .4s ease both;
  transition: transform .12s ease, box-shadow .12s ease;
}
.made-this-btn:hover { transform: translate(-2px,-2px); box-shadow: 6px 6px 0 var(--ink); }
.made-this-btn:active { transform: translate(3px,3px); box-shadow: 1px 1px 0 var(--ink); }

@keyframes lcc-pop { 0% { transform: scale(.85); opacity: 0; } 60% { transform: scale(1.05); } 100% { transform: scale(1); opacity: 1; } }
@keyframes lcc-blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

/* --- tutor panel --- */
.tutor-panel {
  margin-top: 22px;
  background: var(--violet-soft);
  border: var(--line-w) solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 5px 5px 0 var(--ink);
  padding: 18px 22px;
}
.tutor-header { font-weight: 700; font-size: 1.05rem; color: var(--ink); margin-bottom: 10px; }

.tutor-response {
  font-family: "Fredoka", ui-rounded, sans-serif;
  font-size: 1.05rem; line-height: 1.55; font-weight: 500;
  color: var(--ink);
  background: var(--white);
  border: var(--line-w) solid var(--ink);
  border-radius: 18px 18px 18px 4px;
  padding: 14px 18px; margin-bottom: 14px;
}
.tutor-response::before { content: "🤖 "; }

.quick-questions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.quick-question-chip {
  background: var(--white); border: 2px solid var(--ink); color: var(--ink);
  padding: 7px 14px; border-radius: 999px;
  font: 600 .88rem "Fredoka", sans-serif; cursor: pointer;
  box-shadow: 2px 2px 0 var(--ink);
  transition: transform .12s ease, background .12s ease;
}
.quick-question-chip:hover { background: var(--sun); transform: translate(-1px,-1px); }

.tutor-controls input {
  flex: 1; min-width: 200px; width: 100%;
  padding: 11px 14px; margin-bottom: 10px;
  border: var(--line-w) solid var(--ink); border-radius: 14px;
  font: 500 1rem "Fredoka", sans-serif;
  background: var(--white); color: var(--ink);
}
.tutor-controls input:focus { outline: none; box-shadow: 0 0 0 4px var(--violet-soft), 0 0 0 7px var(--violet); }

.hint-levels { display: flex; gap: 10px; flex-wrap: wrap; }
.hint-btn {
  font: 700 .95rem "Fredoka", ui-rounded, sans-serif;
  padding: 10px 18px; border-radius: 999px; cursor: pointer;
  color: var(--ink); border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform .12s ease, box-shadow .12s ease;
}
.hint-btn:hover { transform: translate(-2px,-2px); box-shadow: 5px 5px 0 var(--ink); }
.hint-btn:active { transform: translate(2px,2px); box-shadow: 1px 1px 0 var(--ink); }
.hint-btn:nth-of-type(1) { background: var(--mint); }
.hint-btn:nth-of-type(2) { background: var(--sun); }
.hint-btn:nth-of-type(3) { background: var(--pink); }

/* --- name card --- */
.auth-card {
  max-width: 400px; margin: 0 auto;
  background: var(--white);
  border: var(--line-w) solid var(--ink); border-radius: 28px;
  box-shadow: 7px 7px 0 var(--ink);
  padding: 30px; text-align: left;
}
.auth-card h1 { font-size: 1.7rem; }
.auth-card input {
  width: 100%; padding: 12px 14px; margin-bottom: 12px;
  border-radius: 14px; border: var(--line-w) solid var(--ink);
  background: var(--white); color: var(--ink);
  font: 500 1.1rem "Fredoka", sans-serif;
}
.auth-card input:focus { outline: none; box-shadow: 0 0 0 4px var(--violet-soft), 0 0 0 7px var(--violet); }
.auth-buttons { display: flex; gap: 10px; }

.secondary-btn {
  flex: 1; background: var(--white);
  border: var(--line-w) solid var(--ink); color: var(--ink);
  padding: 11px; border-radius: 999px;
  font: 700 1rem "Fredoka", sans-serif; cursor: pointer;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform .12s ease, box-shadow .12s ease;
}
.secondary-btn:hover { transform: translate(-2px,-2px); box-shadow: 5px 5px 0 var(--ink); }
.auth-buttons .run-btn { flex: 1; margin-top: 0; }
.auth-error { color: #c4145f; font-size: .95rem; margin-top: 10px; font-weight: 600; }
.add-child-card { margin-top: 24px; }

.challenge-banner {
  background: var(--sun-soft);
  border: var(--line-w) solid var(--ink); border-radius: 18px;
  box-shadow: 4px 4px 0 var(--ink);
  padding: 13px 18px; margin-bottom: 18px;
  font-size: 1.05rem; font-weight: 600; color: var(--ink);
}

/* --- Byte, the robot tutor mascot --- */
.byte-wrap {
  position: fixed; right: 22px; bottom: 22px; z-index: 6;
  display: flex; flex-direction: column; align-items: flex-end; gap: 12px;
}
.byte-bubble {
  background: var(--sun-soft);
  border: var(--line-w) solid var(--ink);
  border-radius: 18px 18px 4px 18px;
  padding: 12px 16px; max-width: 240px;
  font: 500 .95rem "Fredoka", sans-serif; color: var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  opacity: 0; transform: translateY(6px) scale(.96);
  transition: opacity .22s ease, transform .22s ease;
  pointer-events: none;
}
.byte-bubble.show { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.byte-bubble b { color: var(--violet); }

.byte-row { display: flex; align-items: center; gap: 8px; }
.byte-mute-btn {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--white); border: 2px solid var(--ink);
  font-size: .95rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 2px 2px 0 var(--ink);
  transition: transform .12s ease;
}
.byte-mute-btn:hover { transform: translate(-1px,-1px); }
.byte-mute-btn.muted { background: var(--pink-soft); }

.byte { width: 66px; height: 62px; cursor: pointer; animation: lcc-float 3.2s ease-in-out infinite; }
@keyframes lcc-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

.byte-body {
  position: relative; width: 100%; height: 100%;
  background: var(--violet);
  border: var(--line-w) solid var(--ink);
  border-radius: 22px;
  box-shadow: 3px 3px 0 var(--ink);
  transition: background .2s ease;
}
.byte-body.byte-speaking { background: #8f73ff; }
.byte-antenna { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); width: 3px; height: 12px; background: var(--ink); }
.byte-antenna::after {
  content: ''; position: absolute; top: -9px; left: 50%; transform: translateX(-50%);
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--pink); border: 3px solid var(--ink);
  animation: lcc-twinkle 1.6s ease-in-out infinite;
}
@keyframes lcc-twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
.byte-eyes { position: absolute; top: 18px; left: 0; right: 0; display: flex; justify-content: center; gap: 12px; }
.byte-eye {
  width: 15px; height: 17px; border-radius: 50%;
  background: var(--white); border: 2.5px solid var(--ink);
  animation: lcc-blink-eye 4.5s infinite;
}
@keyframes lcc-blink-eye { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
.byte-mouth {
  position: absolute; bottom: 11px; left: 50%; transform: translateX(-50%);
  width: 22px; height: 10px;
  border: 4px solid transparent; border-bottom-color: var(--sun);
  border-radius: 0 0 50% 50%; background: transparent;
  transition: height .1s ease, width .1s ease;
}
.byte-body.byte-speaking .byte-mouth { animation: lcc-talk .32s ease-in-out infinite alternate; }
@keyframes lcc-talk { 0% { height: 6px; width: 22px; } 100% { height: 13px; width: 15px; } }
.byte-body::before, .byte-body::after {
  content: ""; position: absolute; top: 36px; width: 9px; height: 6px; border-radius: 50%;
  background: var(--pink); opacity: .9;
}
.byte-body::before { left: 7px; }
.byte-body::after { right: 7px; }

/* RTL support kept for code editors */
[dir="rtl"] #html-editor, [dir="rtl"] #css-editor, [dir="rtl"] #preview-frame, [dir="rtl"] .tutor-response { direction: ltr; text-align: left; }
[dir="rtl"] .auth-card { text-align: right; }
[dir="rtl"] .byte-wrap { right: auto; left: 22px; align-items: flex-start; }

/* --- tutorial --- */
.tutorial-screen {
  position: relative; min-height: calc(100vh - 62px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; max-width: 560px; padding-top: 20px;
}
.tut-skip {
  position: absolute; top: 16px; right: 24px;
  background: var(--white); border: 2px solid var(--ink); cursor: pointer;
  color: var(--ink); font: 600 .9rem "Fredoka", sans-serif; padding: 7px 16px;
  border-radius: 999px; box-shadow: 2px 2px 0 var(--ink);
  transition: transform .12s ease;
}
.tut-skip:hover { transform: translate(-1px,-1px); }
[dir="rtl"] .tut-skip { right: auto; left: 24px; }

.tut-dots { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 28px; }
.tut-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--white); border: 2px solid var(--ink); transition: width .2s ease, background .2s ease; }
.tut-dot.on { background: var(--pink); width: 30px; border-radius: 8px; }

.tut-stage {
  width: 100%; max-width: 330px; height: 195px;
  background: var(--sun-soft);
  border: var(--line-w) solid var(--ink); border-radius: 26px;
  box-shadow: 6px 6px 0 var(--ink);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 30px; overflow: hidden; position: relative;
}
.tut-title { font-size: 1.8rem; margin-bottom: 10px; }
.tut-text { color: var(--text-soft); font-size: 1.12rem; line-height: 1.5; min-height: 3.2em; max-width: 420px; }
.tut-nav { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 26px; width: 100%; max-width: 330px; }
.tut-nav .tut-prev { flex: 0 0 56px; padding: 11px; }
.tut-nav .tut-next { flex: 1; margin-top: 0; }

.tut-logo-pulse {
  width: 90px; height: 90px; border-radius: 26px;
  background: var(--violet); border: var(--line-w) solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  display: flex; align-items: center; justify-content: center; font-size: 2.5rem;
  animation: tut-pulse 1.8s ease-in-out infinite;
}
@keyframes tut-pulse { 0%, 100% { transform: scale(1) rotate(-3deg); } 50% { transform: scale(1.1) rotate(3deg); } }

.tut-chips { display: flex; gap: 10px; }
.tut-chip {
  width: 48px; height: 48px; border-radius: 15px;
  background: var(--white); border: var(--line-w) solid var(--ink);
  display: flex; align-items: center; justify-content: center; font-size: 1.4rem;
  animation: tut-chip-light 2.4s ease-in-out infinite;
}
.tut-chip:nth-child(1) { animation-delay: 0s; } .tut-chip:nth-child(2) { animation-delay: .18s; }
.tut-chip:nth-child(3) { animation-delay: .36s; } .tut-chip:nth-child(4) { animation-delay: .54s; } .tut-chip:nth-child(5) { animation-delay: .72s; }
@keyframes tut-chip-light { 0%, 70%, 100% { background: var(--white); transform: translateY(0); } 20% { background: var(--mint); transform: translateY(-8px); } }

.tut-code-box { width: 240px; padding: 16px 18px; border-radius: 16px; background: var(--ink); border: var(--line-w) solid var(--ink); text-align: left; }
.tut-code-line { font-family: "JetBrains Mono", monospace; font-size: .95rem; color: var(--mint); }
.tut-code-line::after { content: ""; display: inline-block; width: 7px; height: 1.1em; background: var(--sun); margin-left: 3px; vertical-align: -2px; animation: lcc-blink 1s step-end infinite; }

.tut-run-row { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.tut-run-fake {
  font: 700 1.05rem "Fredoka", sans-serif; color: var(--ink); background: var(--mint);
  border: var(--line-w) solid var(--ink); border-radius: 999px; padding: 10px 28px;
  box-shadow: 4px 4px 0 var(--ink);
  animation: tut-run-pulse 2.2s ease-in-out infinite;
}
@keyframes tut-run-pulse { 0%, 40%, 100% { transform: scale(1); } 55% { transform: scale(.92); box-shadow: 1px 1px 0 var(--ink); } }
.tut-world-pop { font-size: 1.9rem; opacity: 0; transform: scale(.4); animation: tut-world-pop 2.2s ease-in-out infinite; }
@keyframes tut-world-pop { 0%, 55% { opacity: 0; transform: scale(.4); } 70% { opacity: 1; transform: scale(1.15); } 85%, 100% { opacity: 1; transform: scale(1); } }

.tut-byte-row { display: flex; align-items: center; gap: 16px; }
.tut-mini-byte { width: 66px; height: 62px; position: relative; animation: lcc-float 3.2s ease-in-out infinite; }
.tut-bulb { font-size: 1.8rem; animation: tut-bulb-glow 1.8s ease-in-out infinite; }
@keyframes tut-bulb-glow { 0%, 100% { opacity: .55; transform: translateY(0) scale(1); } 50% { opacity: 1; transform: translateY(-6px) scale(1.15); } }

.tut-rocket { font-size: 3.2rem; animation: tut-launch 2.4s ease-in-out infinite; }
@keyframes tut-launch { 0% { transform: translateY(30px) rotate(0deg); opacity: .3; } 55% { transform: translateY(-6px) rotate(-4deg); opacity: 1; } 100% { transform: translateY(-60px) rotate(6deg); opacity: 0; } }

/* --- level picker --- */
.back-btn {
  position: absolute; top: 0; left: 0;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--white); border: 2px solid var(--ink);
  color: var(--ink); font-size: 1.1rem; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 2px 2px 0 var(--ink);
  transition: transform .12s ease;
}
.back-btn:hover { transform: translateX(-2px); }
[dir="rtl"] .back-btn { left: auto; right: 0; transform: scaleX(-1); }
[dir="rtl"] .back-btn:hover { transform: scaleX(-1) translateX(-2px); }

.level-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 20px; }
.level-card {
  padding: 22px 16px 16px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.level-card .level-num {
  position: absolute; top: -12px; left: -8px;
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  font: 700 1rem "Fredoka", sans-serif; color: var(--ink);
  background: var(--white); border: var(--line-w) solid var(--ink);
}
[dir="rtl"] .level-card .level-num { left: auto; right: -8px; }
.level-card .emoji { font-size: 2.4rem; margin-top: 2px; }
.level-card .level-name { font-weight: 700; font-size: 1.2rem; color: var(--ink); }
.level-card .level-skill { font-size: .92rem; font-weight: 500; color: var(--text-soft); min-height: 2.4em; }
.level-card .level-preview { font-size: 1.1rem; letter-spacing: 3px; margin-top: 4px; }
.level-card-classics { background: var(--sun) !important; }

/* --- mission steps panel --- */
.steps-panel {
  background: var(--mint-soft);
  border: var(--line-w) solid var(--ink); border-radius: var(--radius);
  box-shadow: 5px 5px 0 var(--ink);
  padding: 16px 20px; margin-bottom: 18px;
}
.steps-header { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 1.1rem; color: var(--ink); margin-bottom: 12px; }
.steps-count { font-weight: 700; font-size: .9rem; color: var(--ink); background: var(--white); border: 2px solid var(--ink); border-radius: 999px; padding: 2px 12px; }
.steps-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 9px; }
.step-item { display: flex; align-items: center; gap: 10px; font-size: 1.02rem; font-weight: 500; color: var(--text-soft); transition: color .2s ease; }
.step-item .step-num {
  flex: 0 0 28px; height: 28px; border-radius: 50%;
  background: var(--white); border: 2px solid var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .85rem; color: var(--ink);
  transition: background .2s ease, transform .2s ease;
}
.step-item.done { color: var(--ink); }
.step-item.done .step-num { background: var(--sun); transform: scale(1.1); }

/* name screen */
.name-emoji { font-size: 3.6rem; text-align: center; animation: lcc-float 3s ease-in-out infinite; }

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

@media (max-width: 520px) {
  .topbar { padding: 10px 14px; }
  .logo { font-size: 1.25rem; white-space: nowrap; }
  .logo::before { width: 30px; height: 30px; }
  .theme-badge { font-size: .72rem; padding: 3px 10px; }
  .logout-btn { padding: 5px 12px; font-size: .82rem; white-space: nowrap; }
  .screen { padding: 28px 16px; }
}
