/* L-system explorer. Validated rewriting rules expand an axiom, then a turtle interpreter turns symbols into line segments.
 * Page-specific layout and controls; shared theme colors are supplied by /Theme.css.
 */
html, body { height: 100%; margin: 0; }
body { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
#nav-placeholder { flex: 0 0 auto; position: sticky; top: 0; z-index: 1030; background: var(--site-surface); }
#lsystem-view { position: relative; display: grid; grid-template-columns: 320px minmax(0, 1fr); flex: 1 1 0; min-height: 0; overflow: hidden; }
#lsystem-view canvas { display: block; grid-column: 2; grid-row: 1; width: 100%; height: 100%; min-width: 0; min-height: 0; touch-action: none; }
.lsystem-info { grid-column: 1; grid-row: 1; overflow-y: auto; padding: 20px; background: var(--site-surface); color: var(--site-text); border-right: 1px solid var(--site-border); }
.lsystem-info h1 { font-size: 1.5rem; margin: 0 0 8px; }
.lsystem-info h2 { font-size: .9rem; margin: 18px 0 10px; }
.lsystem-info p, .lsystem-info small { color: var(--site-muted); font-size: .8rem; }
.lsystem-info p { margin: 0 0 10px; }
.lsystem-info label { display: flex; justify-content: space-between; flex-wrap: wrap; font-size: .8rem; margin: 12px 0 5px; }
.lsystem-info label small { flex-basis: 100%; font-size: .68rem; }
.lsystem-info output { color: var(--site-accent); }
.lsystem-info textarea { font-family: monospace; }
.lsystem-info input[type=range] { width: 100%; }
.example-buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.example-buttons button { font-size: .72rem; }
.parameter-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.actions { margin: 16px 0; }
.lsystem-info details { font-size: .8rem; margin-bottom: 12px; }
.lsystem-info summary { color: var(--site-accent); cursor: pointer; }
#scene-error { position: absolute; bottom: 20px; right: 20px; max-width: 400px; z-index: 2; padding: 16px; background: var(--site-surface); color: var(--site-text); border: 1px solid var(--site-accent); border-radius: 8px; }
/* Stack or resize the project layout on narrower screens. */
@media (max-width: 767.98px) {
    body { height: auto; min-height: 100dvh; }
    #lsystem-view { display: flex; flex-direction: column; flex: 0 0 auto; overflow: visible; }
    .lsystem-info { overflow: visible; border-right: 0; border-bottom: 1px solid var(--site-border); }
    #lsystem-view canvas { flex: 0 0 auto; height: 55vh; min-height: 350px; }
}
