body { display: flex; flex-direction: column; height: 100vh; }

.spielwiese {
  flex: 1; min-height: 0; display: grid; grid-template-columns: 300px 1fr; gap: 12px; padding: 12px 14px 14px;
}
body.embed .spielwiese { padding: 4px; grid-template-columns: 290px 1fr; gap: 10px; }
.spielwiese.grid, body.embed .spielwiese.grid { grid-template-columns: 340px 1fr; }
/* On a slide the clicker drives the grid steps; the CSS on the left says it all. */
body.embed #felder-grid { display: none; }
#felder-grid label:not(.haken) { grid-template-columns: 4.5em 1fr; }

.steuerung { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.modus { display: flex; gap: 6px; }
.modus button { flex: 1; }
.felder { display: flex; flex-direction: column; gap: 5px; }
.felder[hidden] { display: none; }
.felder label { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 6px; font-family: var(--mono); font-size: 0.78em; }
.felder select { font-family: var(--mono); font-size: 1em; padding: 2px 4px; min-width: 0; }
.felder .haken { display: flex; gap: 6px; font-family: inherit; }
.felder .haken input { accent-color: var(--rot); width: 18px; height: 18px; }

.code {
  flex: 1; min-height: 0; margin: 0; padding: 6px 10px; overflow: auto;
  border: 2px solid var(--linie); border-radius: 10px; background: #fbfbfb;
  font-size: 0.66em; line-height: 1.4; white-space: pre-wrap;
}
.code .neu { background: var(--rot-hell); color: var(--rot-dunkel); border-radius: 3px; }

.breite { text-transform: none; letter-spacing: 0; font-size: 1.2em; color: var(--text); }
.breite b { color: var(--rot); }

.buehne { flex: 1; min-height: 0; padding: 8px; background: repeating-linear-gradient(45deg, #fafafa 0 10px, #f2f2f2 10px 20px); }
.rahmen { position: relative; height: 100%; max-width: 100%; }
.rahmen.animiert { transition: width .7s ease; }
#vorschau { display: block; width: 100%; height: 100%; border: 0; background: #fff; box-shadow: 0 0 0 1px #ccc; }
.griff {
  position: absolute; top: 50%; right: -9px; transform: translateY(-50%);
  width: 18px; height: 64px; padding: 0; border-radius: 9px; cursor: ew-resize;
  background: var(--blau); border: 2px solid #fff; box-shadow: 0 1px 4px rgb(0 0 0 / .3);
}
.griff::before { content: "⋮"; color: #fff; font-size: 16px; line-height: 60px; }

@media (max-width: 760px) {
  .spielwiese { grid-template-columns: 1fr; }
  .buehne-panel { min-height: 340px; }
}
body:not(.embed) .code { font-size: 0.82em; }
