/* Curs Scratch pentru începători — stil comun */
:root {
  --bg: #f4f7fb;
  --card: #ffffff;
  --ink: #1f2a44;
  --ink-soft: #5a6785;
  --line: #dde3ee;
  --accent: #4c6fff;
  --accent-soft: #e8edff;
  --good: #1fa463;
  --good-soft: #e3f6ec;
  --bad: #e5484d;
  --bad-soft: #fdecec;
  --warn: #f5a524;
  --radius: 16px;
  --shadow: 0 2px 10px rgba(31, 42, 68, .08);

  /* culorile categoriilor de blocuri, ca în Scratch 3 */
  --c-motion: #4c97ff;   --c-motion-d: #3373cc;
  --c-looks: #9966ff;    --c-looks-d: #774dcb;
  --c-sound: #cf63cf;    --c-sound-d: #bd42bd;
  --c-events: #ffbf00;   --c-events-d: #cc9900;
  --c-control: #ffab19;  --c-control-d: #cf8b17;
  --c-sensing: #5cb1d6;  --c-sensing-d: #2e8eb8;
  --c-operators: #59c059;--c-operators-d: #389438;
  --c-variables: #ff8c1a;--c-variables-d: #db6e00;
  --c-robot: #0fbd8c;    --c-robot-d: #0b8e69;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Segoe UI", "Trebuchet MS", system-ui, -apple-system, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 18px;
  line-height: 1.5;
}
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 .75em; }
button { font: inherit; cursor: pointer; }
.hidden { display: none !important; }

/* ---------- bara de sus ---------- */
.topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 22px; background: var(--card);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20;
}
.topbar .brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; color: var(--ink); text-decoration: none; }
.topbar .brand svg { width: 40px; height: 40px; }
.topbar .spacer { flex: 1; }
.topbar .chip { background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 4px 12px; font-size: .9rem; font-weight: 600; }
.iconbtn { background: none; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; color: var(--ink-soft); }
.iconbtn:hover { background: var(--accent-soft); }

main { max-width: 1240px; margin: 0 auto; padding: 22px; }

/* ---------- butoane ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: none; border-radius: 12px; padding: 12px 22px;
  font-weight: 700; font-size: 1.05rem; background: var(--accent); color: #fff;
  box-shadow: 0 3px 0 rgba(0,0,0,.15); text-decoration: none;
  transition: transform .08s;
}
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0,0,0,.15); }
.btn:disabled { background: #b8c1d6; cursor: not-allowed; box-shadow: none; }
.btn.secondary { background: var(--card); color: var(--ink); border: 2px solid var(--line); box-shadow: none; }
.btn.good { background: var(--good); }
.btn.small { padding: 7px 14px; font-size: .95rem; }
.btn.flag { background: #3fb44f; }
.btn.stop { background: var(--bad); }

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.muted { color: var(--ink-soft); }
.center { text-align: center; }

/* ---------- vorbire (TTS) ---------- */
.say-btn { border: none; background: var(--accent-soft); color: var(--accent); border-radius: 50%; width: 32px; height: 32px; font-size: 15px; margin-left: 6px; vertical-align: middle; flex: none; }
.say-btn:hover { background: var(--accent); color: #fff; }
.no-voice .say-btn { display: none; }

/* ---------- mascota și bula ---------- */
.mascot-line { display: flex; gap: 16px; align-items: flex-start; margin: 10px 0 18px; }
.mascot-line .robi { width: 92px; height: 92px; flex: none; }
.bubble {
  position: relative; background: var(--card); border: 2px solid var(--line);
  border-radius: 18px; padding: 14px 18px; flex: 1; box-shadow: var(--shadow);
}
.bubble::before {
  content: ""; position: absolute; left: -12px; top: 28px; width: 20px; height: 20px;
  background: var(--card); border-left: 2px solid var(--line); border-bottom: 2px solid var(--line);
  transform: rotate(45deg);
}
.bubble p:last-child { margin-bottom: 0; }

/* ---------- blocuri în stil Scratch ---------- */
.blk {
  --c: var(--c-motion); --cd: var(--c-motion-d);
  position: relative; display: inline-flex; align-items: center; flex-wrap: nowrap; gap: 6px;
  background: var(--c); color: #fff; border: 1px solid var(--cd);
  border-radius: 6px; padding: 8px 12px 8px 12px; min-height: 40px;
  font-size: 15px; font-weight: 600; white-space: nowrap; user-select: none;
  margin-top: 6px;
}
/* „crestătura” de sus și „dintele” de jos */
.blk::before {
  content: ""; position: absolute; top: -1px; left: 16px; width: 24px; height: 6px;
  background: var(--bg-under, #fff); border: 1px solid var(--cd); border-top: none;
  border-radius: 0 0 6px 6px;
}
.blk::after {
  content: ""; position: absolute; bottom: -7px; left: 16px; width: 24px; height: 7px;
  background: var(--c); border: 1px solid var(--cd); border-top: none;
  border-radius: 0 0 6px 6px; z-index: 1;
}
.blk.hat { border-radius: 22px 22px 6px 6px; padding-top: 14px; margin-top: 0; }
.blk.hat::before { display: none; }
.blk.cap::after { display: none; }
.blk .inp {
  background: #fff; color: #575e75; border-radius: 999px; padding: 1px 10px; min-width: 30px;
  text-align: center; font-weight: 600; border: 1px solid rgba(0,0,0,.12);
}
.blk input.inp { width: 74px; font: inherit; font-weight: 600; outline: none; -moz-appearance: textfield; appearance: textfield; }
.blk input.inp::-webkit-outer-spin-button, .blk input.inp::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.blk input.inp.txt { width: 110px; border-radius: 6px; }
.blk input.inp:focus { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--cd); }
.blk .flagicon { width: 22px; height: 22px; vertical-align: middle; }
.blk.cat-motion { --c: var(--c-motion); --cd: var(--c-motion-d); }
.blk.cat-looks { --c: var(--c-looks); --cd: var(--c-looks-d); }
.blk.cat-sound { --c: var(--c-sound); --cd: var(--c-sound-d); }
.blk.cat-events { --c: var(--c-events); --cd: var(--c-events-d); }
.blk.cat-control { --c: var(--c-control); --cd: var(--c-control-d); }
.blk.cat-sensing { --c: var(--c-sensing); --cd: var(--c-sensing-d); }
.blk.cat-operators { --c: var(--c-operators); --cd: var(--c-operators-d); }
.blk.cat-variables { --c: var(--c-variables); --cd: var(--c-variables-d); }
.blk.cat-robot { --c: var(--c-robot); --cd: var(--c-robot-d); }
.blk.running { filter: drop-shadow(0 0 6px #ffe36e) drop-shadow(0 0 3px #ffd000); }
.blk.wrongpick { outline: 3px solid var(--bad); outline-offset: 2px; }
.blk.rightpick { outline: 3px solid var(--good); outline-offset: 2px; }

.script { display: flex; flex-direction: column; align-items: flex-start; }
.script .blk { margin-top: 0; }
.script .blk + .blk { margin-top: 0; }

/* ---------- simulator ---------- */
.sim { display: grid; grid-template-columns: 290px minmax(300px, 1fr) 420px; gap: 16px; align-items: start; }
.sim .panel { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; }
.sim .panel h3 { font-size: 1rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 10px; }
.sim .palette { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; --bg-under: #fff; min-height: 300px; }
.sim .palette .blk { cursor: grab; touch-action: none; }
.sim .palette.drop-delete { outline: 3px dashed var(--bad); outline-offset: -6px; }
.sim .code { min-height: 380px; position: relative; display: flex; flex-direction: column; --bg-under: #f7f8fc; background: #f7f8fc; border-radius: 12px; padding: 14px; border: 2px dashed var(--line); }
.sim .code.over { border-color: var(--accent); }
.sim .code .script .blk:not(.hat) { cursor: grab; touch-action: none; }
.sim .code .hint { margin-top: auto; padding-top: 16px; font-size: .85rem; color: var(--ink-soft); }
.sim .insert-line { height: 4px; width: 200px; background: var(--accent); border-radius: 2px; margin: 2px 0; }
.sim .stage-wrap { position: relative; }
.sim canvas.stage { width: 100%; aspect-ratio: 4 / 3; border-radius: 12px; border: 2px solid var(--line); background: #fff; display: block; }
.sim .stage-bar { display: flex; gap: 8px; margin-bottom: 8px; align-items: center; }
.sim .coords { margin-left: auto; font-size: .85rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.sim .goal { margin-top: 10px; background: var(--accent-soft); border-radius: 12px; padding: 10px 14px; font-size: .95rem; }
.sim .feedback { margin-top: 10px; border-radius: 12px; padding: 10px 14px; font-weight: 600; }
.sim .feedback.ok { background: var(--good-soft); color: #11734a; }
.sim .feedback.no { background: var(--bad-soft); color: #a32025; }
.drag-ghost { position: fixed; pointer-events: none; z-index: 1000; opacity: .9; transform: rotate(2deg); }

.levels { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; align-items: center; }
.levels .lv { width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--line); background: var(--card); font-weight: 700; color: var(--ink-soft); }
.levels .lv.cur { border-color: var(--accent); color: var(--accent); }
.levels .lv.done { background: var(--good); border-color: var(--good); color: #fff; }

@media (max-width: 1100px) {
  .sim { grid-template-columns: 260px 1fr; }
  .sim .stage-col { grid-column: 1 / -1; max-width: 520px; }
}

/* ---------- lecția ---------- */
.lesson-head { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.steps-dots { display: flex; gap: 6px; flex-wrap: wrap; }
.steps-dots span { width: 34px; height: 8px; border-radius: 4px; background: var(--line); }
.steps-dots span.done { background: var(--good); }
.steps-dots span.cur { background: var(--accent); }
.step-title { display: flex; align-items: center; gap: 10px; }
.step-kicker { font-size: .85rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.nav-row { display: flex; justify-content: space-between; margin-top: 20px; gap: 12px; }

.quick-q { margin: 12px 0; }
.opts { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); margin-top: 10px; }
.opts .blk, .sim .palette .blk, .sim .code .blk { flex-wrap: wrap; white-space: normal; max-width: 100%; }
.opt {
  background: var(--card); border: 2px solid var(--line); border-radius: 14px; padding: 12px 14px;
  text-align: left; display: flex; align-items: center; gap: 10px; min-height: 58px; --bg-under: #fff;
}
.opt:hover:not(:disabled) { border-color: var(--accent); }
.opt.correct { border-color: var(--good); background: var(--good-soft); }
.opt.wrong { border-color: var(--bad); background: var(--bad-soft); }
.opt:disabled { cursor: default; }
.opt .blk { margin-top: 0; }

.checklist { list-style: none; padding: 0; margin: 10px 0; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 2px solid var(--line); border-radius: 14px; margin-bottom: 10px; background: var(--card); --bg-under: #fff; }
.checklist li.done { border-color: var(--good); background: var(--good-soft); }
.checklist input[type=checkbox] { width: 26px; height: 26px; flex: none; margin-top: 2px; accent-color: var(--good); }
.checklist .blk { margin: 6px 0 0; }

.cards3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.cards3 .card { border-top: 6px solid var(--accent); }

.callout { border-radius: 14px; padding: 12px 16px; background: #fff7e6; border: 2px solid #ffe2a8; margin: 12px 0; }
.callout.parent { background: #eef6ff; border-color: #cfe3ff; }
.callout b:first-child { display: block; margin-bottom: 4px; }

.vocab { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin: 12px 0; }
.vocab div { background: var(--card); border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.vocab b { color: var(--accent); }

/* hotspots */
.hotspots { display: grid; grid-template-columns: 1fr 320px; gap: 18px; align-items: start; }
.hotspots svg { width: 100%; height: auto; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.hotspots .hs { cursor: pointer; }
.hotspots .hs .dot { fill: var(--accent); }
.hotspots .hs.seen .dot { fill: var(--good); }
.hotspots .hs:hover rect.zone { stroke: var(--accent); stroke-width: 3; }
.hotspots .info { position: sticky; top: 80px; }
@media (max-width: 900px) { .hotspots { grid-template-columns: 1fr; } }

/* jocul coordonatelor */
.coordgame { display: grid; grid-template-columns: 480px 1fr; gap: 18px; align-items: start; }
.coordgame canvas { width: 100%; aspect-ratio: 4/3; background: #fff; border-radius: 12px; border: 2px solid var(--line); cursor: crosshair; }
@media (max-width: 900px) { .coordgame { grid-template-columns: 1fr; } }

/* ---------- test ---------- */
.quiz { max-width: 860px; margin: 0 auto; }
.qbar { height: 12px; background: var(--line); border-radius: 6px; overflow: hidden; margin: 8px 0 18px; }
.qbar div { height: 100%; background: var(--accent); width: 0; transition: width .3s; }
.qtext { font-size: 1.3rem; font-weight: 700; display: flex; align-items: flex-start; gap: 8px; }
.qscript { background: #f7f8fc; border-radius: 12px; padding: 14px; margin: 12px 0; display: inline-block; --bg-under: #f7f8fc; }
.qscript .blk.clickable { cursor: pointer; }
.qscript .blk.clickable:hover { filter: brightness(1.08); outline: 2px dashed var(--ink); outline-offset: 2px; }
.order-list { list-style: none; padding: 0; margin: 12px 0; }
.order-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 2px solid var(--line); border-radius: 12px; margin-bottom: 8px; background: var(--card); --bg-under: #fff; }
.order-list li .num { font-weight: 800; color: var(--ink-soft); width: 22px; }
.order-list li .item { flex: 1; }
.order-list li.correct { border-color: var(--good); background: var(--good-soft); }
.order-list li.wrong { border-color: var(--bad); background: var(--bad-soft); }
.order-list .mv { width: 40px; height: 40px; border-radius: 10px; border: 2px solid var(--line); background: var(--card); font-size: 18px; }
.order-list .mv:disabled { opacity: .3; }
.match-row { display: flex; align-items: center; gap: 12px; padding: 10px; border: 2px solid var(--line); border-radius: 12px; margin-bottom: 10px; flex-wrap: wrap; background: var(--card); --bg-under: #fff; }
.match-row .left { min-width: 240px; }
.match-row.correct { border-color: var(--good); background: var(--good-soft); }
.match-row.wrong { border-color: var(--bad); background: var(--bad-soft); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chipbtn { border: 2px solid var(--line); background: var(--card); border-radius: 999px; padding: 6px 14px; font-weight: 600; }
.chipbtn.sel { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.chipbtn .sw { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.explain { margin-top: 16px; border-radius: 14px; padding: 14px 16px; }
.explain.ok { background: var(--good-soft); }
.explain.no { background: var(--bad-soft); }
.explain.retry { background: #fff7e6; }
.stars { font-size: 3rem; letter-spacing: 6px; }
.stars .off { opacity: .2; }
.badge { display: inline-flex; flex-direction: column; align-items: center; gap: 6px; }
.badge svg { width: 120px; height: 120px; }

/* ---------- harta ---------- */
.map-wrap { position: relative; }
.map-wrap svg.map { width: 100%; height: auto; display: block; }
.island { cursor: pointer; }
.island.locked { cursor: not-allowed; }
.island:not(.locked):hover .isl-top { filter: brightness(1.06); }
.modal-back { position: fixed; inset: 0; background: rgba(20, 28, 48, .45); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 20px; }
.modal { background: var(--card); border-radius: 20px; padding: 26px; max-width: 560px; width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal h2 { display: flex; align-items: center; gap: 10px; }
.status-line { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0 18px; }
.pill { border-radius: 999px; padding: 4px 12px; font-size: .9rem; font-weight: 600; background: var(--line); color: var(--ink); }
.pill.good { background: var(--good-soft); color: #11734a; }
.pill.warn { background: #fff4dc; color: #8a5a00; }
.badges-row { display: flex; gap: 14px; flex-wrap: wrap; }
.badges-row .b { text-align: center; width: 92px; font-size: .8rem; color: var(--ink-soft); }
.badges-row .b svg { width: 72px; height: 72px; }
.badges-row .b.off svg { filter: grayscale(1); opacity: .35; }

/* ---------- formulare ---------- */
label.field { display: block; margin: 12px 0; font-weight: 600; }
label.field input, label.field select { display: block; margin-top: 6px; width: 100%; padding: 10px 12px; font: inherit; border: 2px solid var(--line); border-radius: 10px; }
.colors { display: flex; gap: 10px; margin-top: 8px; }
.colors button { width: 44px; height: 44px; border-radius: 50%; border: 3px solid transparent; }
.colors button.sel { border-color: var(--ink); }

/* ---------- pagina de părinte ---------- */
table.res { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.res th, table.res td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.res th { color: var(--ink-soft); font-weight: 600; }
details.guide { border: 2px solid var(--line); border-radius: 14px; padding: 12px 16px; margin-bottom: 12px; background: var(--card); }
details.guide summary { font-weight: 700; cursor: pointer; }
.pinbox { max-width: 360px; margin: 60px auto; text-align: center; }
.pinbox input { font-size: 2rem; letter-spacing: 12px; text-align: center; width: 200px; padding: 8px; border: 2px solid var(--line); border-radius: 12px; }

/* confetti */
.confetti { position: fixed; top: -12px; width: 10px; height: 14px; z-index: 2000; pointer-events: none; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(105vh) rotate(720deg); } }

@media print {
  .topbar, .no-print { display: none !important; }
  body { background: #fff; }
}

.qrbox svg { width: 100%; height: auto; display: block; border-radius: 8px; }

/* ---------- blocuri noi (capitolele 3+): blocuri „C”, rotunde, hexagonale, meniuri ---------- */
:root { --c-pen: #0fbd8c; --c-pen-d: #0b8e69; }
.blk.cat-pen { --c: var(--c-pen); --cd: var(--c-pen-d); }
.blk.cblock { display: inline-flex; flex-direction: column; align-items: stretch; padding: 0; gap: 0; min-width: 170px; }
.blk.cblock > .chead { display: flex; align-items: center; gap: 6px; padding: 8px 12px; min-height: 40px; flex-wrap: wrap; }
.blk.cblock > .chead.mid { min-height: 30px; padding: 4px 12px; }
.blk.cblock > .mouth {
  margin-left: 18px; background: var(--bg-under, #fff); min-height: 26px; min-width: 120px;
  display: flex; flex-direction: column; align-items: flex-start; border-radius: 0 0 0 4px;
  border-left: 1px solid var(--cd); border-top: 1px solid var(--cd); border-bottom: 1px solid var(--cd); padding: 0 0 6px 0;
}
.blk.cblock > .mouth > .blk { margin-top: 0; }
.blk.cblock > .cfoot { height: 18px; }
.blk.cblock.cap > .cfoot { height: 14px; }
.blk.rep, .blk.bool { margin: 0 2px; min-height: 30px; padding: 3px 12px; font-size: 14px; flex-wrap: nowrap; }
.blk.rep { border-radius: 999px; }
.blk.bool { border: none; padding: 3px 18px; clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 14px 100%, 0 50%); }
.blk.rep::before, .blk.rep::after, .blk.bool::before, .blk.bool::after { display: none; }
.blk .slot-b { display: inline-block; width: 46px; height: 24px; background: var(--cd); clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 10px 100%, 0 50%); }
.blk .vname { padding: 0 2px; }
.blk .dd { background: var(--cd); color: #fff; border-radius: 6px; padding: 2px 8px; font: inherit; font-weight: 600; border: 1px solid rgba(0,0,0,.15); }
.blk select.dd { cursor: pointer; max-width: 170px; }
.blk select.dd option { color: #1f2a44; background: #fff; }
.blk .dd.color { padding: 3px 6px; display: inline-flex; background: #fff; }
.blk .dd.color.edit { cursor: pointer; }
.blk .swatch { display: inline-block; width: 22px; height: 18px; border-radius: 4px; border: 1px solid rgba(0,0,0,.25); }
.blk .penicon { display: inline-flex; }
.blk .rep .inp, .blk .bool .inp { padding: 0 8px; }
.blk.bool input.inp, .blk.rep input.inp { width: 56px; }
.blk.bool input.inp.txt, .blk.rep input.inp.txt { width: 70px; }
.blk.slot-hover, .blk .slot-hover { outline: 3px solid #fff; box-shadow: 0 0 0 5px var(--accent); }
.script .blk.cblock + .blk { margin-top: 0; }

/* ---------- simulatorul 2 ---------- */
.sim2 .code { overflow: auto; max-height: 640px; }
.sim2 .code .scripts { display: flex; flex-direction: column; gap: 22px; align-items: flex-start; }
.sim2 .code .blk { cursor: grab; touch-action: none; }
.sim2 .code .blk.hat.fixed { cursor: default; }
.sim2 .palette { max-height: 640px; overflow: auto; padding-right: 4px; }
.sim2 .palette .pcat { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; margin: 6px 0 -2px; display: flex; align-items: center; gap: 6px; color: var(--ink-soft); }
.sim2 .palette .pcat i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.sim2 .ins-mark { position: absolute; height: 5px; width: 180px; background: var(--accent); border-radius: 3px; pointer-events: none; z-index: 5; box-shadow: 0 0 0 2px #fff; }
.sim2 .ask-box { position: absolute; left: 3%; right: 3%; bottom: 3%; background: #fff; border: 2px solid #5cb1d6; border-radius: 12px; padding: 6px; display: flex; gap: 6px; }
.sim2 .ask-box input { flex: 1; border: 1px solid #c9d6f2; border-radius: 8px; padding: 6px 10px; font: inherit; font-size: 1rem; }
.sim2 .ask-box button { border: none; background: #5cb1d6; color: #fff; border-radius: 50%; width: 36px; height: 36px; font-size: 1.1rem; cursor: pointer; }
.sim2 canvas.stage:focus { outline: 3px solid var(--accent); outline-offset: 2px; }
.sim2 .keys-help { font-size: .85rem; color: var(--ink-soft); margin-top: 6px; }
.sim2 .others { margin-top: 10px; }
.sim2 .others details { background: #f7f8fc; border-radius: 10px; padding: 6px 10px; margin-top: 6px; --bg-under: #f7f8fc; }
.sim2 .others summary { cursor: pointer; font-weight: 700; color: var(--ink-soft); }
.sim2 .others .script { margin: 8px 0; transform-origin: left top; }
.sim2 .solution { margin-top: 10px; --bg-under: #fffbea; background: #fffbea; border-radius: 12px; padding: 10px; border: 1px dashed #e3c35a; }
.sim2 .solution .script { margin-top: 6px; }
.sim2 .code .scripts .script { padding-bottom: 6px; }
.blk.cblock, .sim2 .palette .blk { flex-wrap: nowrap !important; }
.sim2 .palette .blk > span:not(.inp):not(.dd) { white-space: normal; }
.sim2 .code input.inp { min-width: 0; }
.sim2 .code input.inp.txt { max-width: 260px; }
.sim2 .palette > * { flex-shrink: 0; }
.sim.sim2 { grid-template-columns: 320px minmax(300px, 1fr) 420px; }
.blk.bool select.dd, .blk.rep select.dd { max-width: 130px; }
@media (max-width: 1100px) { .sim.sim2 { grid-template-columns: 290px 1fr; } }

/* ---------- cele trei programe (categorii de vârstă) ---------- */
.prog-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 14px 0; }
.prog-card { display: flex; align-items: center; gap: 12px; text-align: left; background: #fff; border: 3px solid #4c97ff; border-radius: 18px; padding: 12px 14px; cursor: pointer; font: inherit; color: inherit; opacity: .78; transition: transform .12s, opacity .12s, box-shadow .12s; }
.prog-card:hover { opacity: 1; transform: translateY(-2px); }
.prog-card.sel { opacity: 1; box-shadow: 0 6px 0 rgba(31, 42, 68, .12); }
.prog-card.inchis { background: #f3f5f9; }
.prog-emoji { font-size: 2.2rem; line-height: 1; }
.prog-text { display: flex; flex-direction: column; font-size: .92rem; }
.prog-text b { font-size: 1.08rem; }
.prog-stare { color: var(--ink-soft); font-weight: 600; }
@media (max-width: 760px) { .prog-row { grid-template-columns: 1fr; } }

/* ---------- ScratchJR (5–7 ani): blocuri-imagine și scena cu pătrățele ---------- */
.jr { font-size: 1.25rem; }
.jr .bubble p { font-size: 1.35rem; line-height: 1.45; }
.jr-blk { position: relative; width: 62px; height: 62px; border: none; border-radius: 14px; padding: 9px; cursor: pointer; box-shadow: 0 4px 0 rgba(0, 0, 0, .22); flex: none; }
.jr-blk svg { width: 100%; height: 100%; display: block; }
.jr-blk:active { transform: translateY(2px); box-shadow: 0 2px 0 rgba(0, 0, 0, .22); }
.jr-blk.static { cursor: default; }
.jr-blk.mare { width: 120px; height: 120px; padding: 18px; border-radius: 26px; }
.jr-nr { position: absolute; right: -7px; bottom: -7px; min-width: 28px; height: 28px; border-radius: 14px; background: #fff; color: #1f2a44; font-weight: 800; font-size: 1.05rem; line-height: 24px; text-align: center; border: 2px solid #1f2a44; }
.jr-prog { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-height: 86px; padding: 12px; background: #eef3fb; border-radius: 18px; flex: 1; }
.jr-prog.static { display: inline-flex; background: #f4f7fb; min-height: 0; }
.jr-rep { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 8px 10px; border: 3px dashed #ff9f1c; border-radius: 18px; background: #fff6e6; }
.jr-rep.activ { border-style: solid; }
.jr-loc { width: 44px; height: 62px; border: 3px dashed #b8c4dc; border-radius: 14px; background: #fff; color: #9aa8c4; font-size: 1.6rem; font-weight: 800; cursor: pointer; }
.jr-loc.activ { border-color: #1fa463; color: #1fa463; background: #e3f6ec; animation: jr-puls 1.2s infinite; }
@keyframes jr-puls { 50% { transform: scale(1.08); } }
.jr-paleta { display: flex; flex-wrap: wrap; gap: 12px; padding: 12px; background: #fff; border: 2px solid var(--line); border-radius: 18px; }
.jr-joc { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.jr-joc.demo { grid-template-columns: minmax(0, 420px); justify-content: center; }
@media (max-width: 900px) { .jr-joc { grid-template-columns: 1fr; } }
.jr-eticheta { font-weight: 700; font-size: 1rem; color: var(--ink-soft); margin: 4px 0 6px; }
.jr-rand { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.jr-scena { position: relative; aspect-ratio: 8 / 5; display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(5, 1fr); border-radius: 18px; overflow: hidden; border: 3px solid #1f2a44; container-type: inline-size; }
.jr-cel { border: 1px dashed rgba(31, 42, 68, .13); }
.jr-sp { position: absolute; width: 12.5%; height: 20%; display: flex; align-items: center; justify-content: center; transition: left .4s linear, top .4s linear; pointer-events: none; }
.jr-sp.pers { pointer-events: auto; cursor: pointer; z-index: 2; }
.jr-sp span { font-size: 8.5cqw; line-height: 1; }
.jr-corp { width: 92%; height: 92%; display: flex; align-items: center; justify-content: center; transition: transform .35s, opacity .35s; }
.jr-corp svg { width: 100%; height: 100%; }
.jr-sp.stea span { font-size: 6.5cqw; }
.jr-sp.stea.luata { opacity: 0; transition: opacity .3s; }
.jr-sp.sare { animation: jr-sare .43s ease-out; }
@keyframes jr-sare { 50% { transform: translateY(-70%); } }
.jr-sp.pop { animation: jr-pop .35s; }
@keyframes jr-pop { 50% { transform: scale(1.3); } }
.jr-bula { position: absolute; bottom: 96%; left: 50%; transform: translateX(-50%); background: #fff; border: 2px solid #1f2a44; border-radius: 12px; padding: 3px 9px; font-size: 3.4cqw; font-weight: 700; white-space: nowrap; z-index: 5; }
.jr-plic { position: absolute; top: -30%; font-size: 6cqw; animation: jr-plic .43s linear; }
@keyframes jr-plic { to { transform: translate(120%, -60%); opacity: 0; } }
.jr-butoane { display: flex; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.jr-rot { width: 66px; height: 66px; border-radius: 50%; border: 3px solid #1f2a44; background: #fff; font-size: 1.8rem; cursor: pointer; box-shadow: 0 4px 0 rgba(0, 0, 0, .18); flex: none; }
.jr-rot.verde { background: #7be08a; padding: 10px; }
.jr-rot.mic { width: 50px; height: 50px; font-size: 1.3rem; }
.jr-rot:active { transform: translateY(2px); box-shadow: 0 2px 0 rgba(0, 0, 0, .18); }
.jr-mesaj { flex: 1; min-width: 140px; font-weight: 700; border-radius: 14px; padding: 8px 12px; }
.jr-mesaj:empty { display: none; }
.jr-mesaj.da { background: var(--good-soft); color: #11734a; } .jr-mesaj.nu { background: var(--bad-soft); color: #a32025; } .jr-mesaj.info { background: #fff7e6; color: #7a4f00; }
.jr-mare { font-size: 4.5rem; text-align: center; line-height: 1.2; margin: 6px 0; }
.jr-nivele { display: flex; gap: 10px; margin: 0 0 14px; flex-wrap: wrap; }
.jr-nivele button { width: 52px; height: 52px; border-radius: 50%; border: 3px solid var(--line); background: #fff; font-size: 1.3rem; font-weight: 800; cursor: pointer; }
.jr-nivele button.cur { border-color: var(--accent); } .jr-nivele button.gata { background: var(--good-soft); border-color: var(--good); }
.jr-opts { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; margin: 18px 0; }
.jr-opt { min-width: 150px; min-height: 130px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 14px; border: 4px solid var(--line); border-radius: 22px; background: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.jr-opt .em { font-size: 3rem; line-height: 1; }
.jr-opt.da { border-color: var(--good); background: var(--good-soft); } .jr-opt.nu { border-color: var(--bad); background: var(--bad-soft); }
.jr-opt:disabled { cursor: default; }
.jr-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 22px; gap: 12px; }
.jr-nav .btn { font-size: 1.4rem; padding: 14px 28px; }
.jr-mascota { width: 110px; flex: none; }

/* ---------- limba, data nașterii, bifa „ține minte dispozitivul” (2.5.0) ---------- */
.limba { display: inline-flex; border: 2px solid var(--line, #d9e1ee); border-radius: 999px; overflow: hidden; background: #fff; }
.limba .lb { border: 0; background: transparent; padding: 5px 10px; font: inherit; font-weight: 800; font-size: .8rem; cursor: pointer; color: #5b6b86; }
.limba .lb.on { background: #4c97ff; color: #fff; cursor: default; }
.limba-sus { display: flex; justify-content: flex-end; margin-bottom: -6px; }
.nastere { display: grid; grid-template-columns: 1fr 1.6fr 1.2fr; gap: 8px; margin-top: 6px; }
.nastere select { width: 100%; padding: 10px 8px; border: 2px solid #d9e1ee; border-radius: 12px; font: inherit; background: #fff; }
.bifa { display: flex; align-items: center; gap: 10px; margin: 6px 0 14px; font-weight: 600; text-align: left; cursor: pointer; }
.bifa input { width: 22px; height: 22px; flex: none; }
:root { --c-myblocks: #ff6680; --c-myblocks-d: #d94c66; }
.blk.cat-myblocks { --c: var(--c-myblocks); --cd: var(--c-myblocks-d); }

/* ---- 2.8.0: raportarea problemelor, prerechizite, trasee ---- */
.raport-btn { position: fixed; left: 14px; bottom: 14px; z-index: 40; border: 2px solid var(--line); background: var(--card); color: var(--ink);
  border-radius: 999px; padding: 6px 12px; font: inherit; font-size: .85rem; cursor: pointer; box-shadow: var(--shadow); opacity: .82; }
.raport-btn:hover, .raport-btn:focus-visible { opacity: 1; }
@media (max-width: 700px) { .raport-btn span { display: none; } }
@media print { .raport-btn { display: none !important; } }
.modal select, .modal textarea { width: 100%; font: inherit; padding: 8px 10px; border: 2px solid var(--line); border-radius: 10px; box-sizing: border-box; }
.prereq-card { margin-bottom: 16px; }
ul.prereq { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
ul.prereq li { display: flex; gap: 10px; align-items: flex-start; }
.prereq-ico { font-size: 1.3rem; line-height: 1.4; }
.traseu-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.traseu-card { text-align: left; border: 2px solid var(--line); border-radius: 16px; background: var(--card); padding: 12px 14px; font: inherit; color: var(--ink); cursor: pointer; display: flex; gap: 10px; align-items: flex-start; }
.traseu-card .t-emoji { font-size: 1.8rem; }
.traseu-card .t-stare { display: block; font-size: .85rem; margin-top: 4px; color: var(--muted, #6b7280); }
.traseu-card.inchis { opacity: .7; }
.surse-lista li { margin-bottom: 8px; }
/* ---- 2.8.1: fișa modulului și activarea ---- */
.fisa { margin-top: 10px; }
.fisa-cap { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 1.05rem; }
.fisa-sec { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 10px; }
.fisa-sec h4 { margin: 0 0 6px; font-size: 1rem; }
.fisa-sec p { margin: 4px 0; }
.fisa-pasi { margin: 4px 0; padding-left: 22px; }
.fisa-pasi li { margin: 2px 0; }
.fisa-acces { background: #fff8e6; border-radius: 12px; padding: 10px 12px; border-top: none; }
.modal { max-height: 90vh; overflow-y: auto; }
