/* Lernpfad Informatik 7 – grid robot, blocks, Struktogramm (Basis Programmieren). */
.rb-work { display: grid; grid-template-columns: minmax(0, auto) minmax(320px, 1fr); gap: 22px; align-items: start; margin-top: 8px; }
@media (max-width: 900px) { .rb-work { grid-template-columns: 1fr; } }
.rb-gridbox { display: inline-block; border-radius: 10px; }
.rb-gridbox svg, .rb-grid { max-width: 100%; height: auto; display: block; }
.rb-gridbox.rb-crash { box-shadow: 0 0 0 4px var(--hint-soft), 0 0 0 6px var(--hint); }
.rb-status { margin-top: 6px; font-size: .9rem; }
.rb-task-head .auftrag { margin-bottom: 2px; }
.rb-out { margin-top: 12px; }
.rb-tipp { background: var(--accent-soft); border-radius: 8px; padding: 8px 12px; }
.rb-controls { margin-top: 12px; }
.rb-plan { margin-top: 12px; }
.rb-plan-label, .rb-prog-label, .rb-pal-label { font-size: .9rem; font-weight: 600; color: var(--muted); }
.rb-prog-label { margin: 12px 0 6px; }

/* blocks */
.rb-palette { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rb-block {
  display: flex; align-items: center; gap: 8px; font: inherit; font-weight: 600; text-align: left;
  border-radius: 8px; padding: 7px 12px; margin: 3px 0; border: 2px solid transparent; min-height: 40px;
}
.rb-move { background: #2f6fd6; color: #fff; border-color: #1f4f9e; }
.rb-ctrl { background: #ffb238; color: #17202c; border-color: #c27c00; }
.rb-pal { cursor: pointer; }
.rb-pal:hover { filter: brightness(1.08); box-shadow: 0 2px 0 rgba(0, 0, 0, .25); }
.rb-c { border-radius: 8px; margin: 3px 0; border-width: 2px; border-style: solid; padding: 0 0 0 0; }
.rb-head { display: flex; align-items: center; gap: 8px; padding: 7px 12px; font-weight: 700; min-height: 40px; }
.rb-slot { padding: 2px 12px; font-weight: 700; font-size: .9rem; }
.rb-body { margin: 0 6px 0 22px; padding: 4px 6px; background: #fff7e6; border-radius: 6px; min-height: 34px; }
.rb-foot { height: 14px; }
.rb-edit .rb-foot { cursor: pointer; }
.rb-edit .rb-foot:hover { background: rgba(255, 255, 255, .45); }
.rb-empty { color: var(--muted); font-style: italic; padding: 6px 4px; cursor: pointer; }
.rb-prog { background: var(--bg); border: 2px solid var(--line); border-radius: 10px; padding: 10px; min-height: 80px; }
.rb-static { display: inline-block; min-width: 220px; background: #fff; }
.rb-static .rb-empty { cursor: default; }
.rb-edit .rb-block, .rb-edit .rb-head { cursor: pointer; }
.rb-sel { outline: 3px solid var(--sel); outline-offset: 1px; }
.rb-run { box-shadow: 0 0 0 4px #ffe066, 0 0 0 6px #b38f00; }
.rb-tools { display: inline-flex; gap: 4px; margin-left: auto; }
.rb-tools .btn-sm { background: #fff; color: var(--ink); padding: 2px 8px; }
.rb-caret { border: 2px dashed var(--sel); color: var(--sel); border-radius: 8px; padding: 2px 10px; font-size: .85rem; font-weight: 600; margin: 3px 0; }
.rb-nr { display: inline-flex; width: 1.6em; height: 1.6em; border-radius: 50%; background: #fff; color: #1f4f9e; align-items: center; justify-content: center; font-size: .85rem; font-weight: 800; }
.rb-szene { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.rb-szene .rb-grid { max-width: 340px; }
.opt-pic .rb-static, .opt-pic .sg { min-width: 0; }
.opt-pic .rb-block, .opt-pic .rb-head { min-height: 32px; padding: 4px 10px; font-size: .9rem; }

/* fehlersuche */
.rb-fs-list { list-style: none; padding: 0; margin: 8px 0; }
.rb-fs-btn { width: 100%; cursor: pointer; }
.rb-fs-btn:hover { filter: brightness(1.1); }

/* Struktogramm (Nassi–Shneiderman) */
.sg { display: inline-block; min-width: 240px; background: #fff; border: 2px solid #17202c; font-weight: 600; }
.sg-seq > * + * { border-top: 2px solid #17202c; }
.sg-cmd { padding: 8px 12px; }
.sg-leer { color: var(--muted); text-align: center; }
.sg-loop { display: grid; grid-template-columns: 28px 1fr; }
.sg-loop-head { grid-column: 1 / -1; padding: 8px 12px; background: #fff3d6; }
.sg-loop-bar { grid-column: 1; background: #fff3d6; }
.sg-loop-body { grid-column: 2; border-left: 2px solid #17202c; border-top: 2px solid #17202c; }
.sg-if-head { position: relative; height: 64px; background: #fff3d6; }
.sg-if-head svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.sg-if-q { position: absolute; top: 4px; left: 0; right: 0; text-align: center; }
.sg-if-ja { position: absolute; bottom: 4px; left: 10px; }
.sg-if-nein { position: absolute; bottom: 4px; right: 10px; }
.sg-if-cols { display: grid; grid-template-columns: 1fr 1fr; border-top: 2px solid #17202c; }
.sg-if-cols > .sg-seq + .sg-seq { border-left: 2px solid #17202c; }
.rb-gleich { align-items: center; }
.rb-eq { font-size: 2rem; font-weight: 800; color: var(--muted); }
.card-pic svg.rb-grid { width: 78px; height: 78px; }
