/* PlotBot-Kinematiksimulator – Seitenlayout und Bedienfeld.
   Bedienfeld angepasst aus dem PlotBot-Kinematiksimulator, hier unter .sim eingegrenzt. */
.page-head { background: var(--cream); border-bottom: 4px dashed var(--sun); }
.page-intro h1 { font-size: clamp(1.9rem, 6vw, 2.8rem); line-height: 1.1; margin: .5rem 0 1rem; letter-spacing: -.01em; }
.page-intro h1 span { color: var(--pink); }
.back { font-size: .95rem; }
.legend-static { margin: 1rem 0; }
@media (min-width: 40rem) { .legend-static { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; } }
.legend-static dt { font-weight: 700; }
.legend-static dd { margin: 0 0 .5rem; }
.shot { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.sim-section { padding: 1rem 0 2rem; }
.sim-section noscript p { background: var(--cream); border-left: 5px solid var(--sun); padding: .75rem 1rem; }

/* Bedienfeld */
.sim { font: 14px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif; color: #1d2733; background: #f4f7fa;
  display: grid; grid-template-columns: 300px minmax(0, 1fr) 340px; height: min(88vh, 960px);
  border-top: 1px solid #d0d9e2; border-bottom: 1px solid #d0d9e2; }
.sim[hidden] { display: none; }
.sim section { padding: 0; border: 0; }
.sim h2 { font-size: .95rem; margin: .7rem 0 .35rem; color: #1f3b57; border-bottom: 1px solid #e3e9ef; padding-bottom: .15rem; line-height: 1.3; }
.sim #steuerung, .sim #rechts { overflow-y: auto; padding: .5rem .8rem; background: #fff; min-height: 0; }
.sim #steuerung { border-right: 1px solid #d0d9e2; }
.sim #rechts { border-left: 1px solid #d0d9e2; font-size: 13px; overflow-x: hidden; }
.sim .row { display: grid; grid-template-columns: 112px minmax(0, 1fr) 64px 26px; gap: .35rem; align-items: center; margin: .15rem 0; }
.sim .row span { font-size: .85rem; }
.sim .row input[type=number] { width: 64px; font-size: .85rem; padding: 1px 3px; }
.sim .row input[type=range] { width: 100%; min-width: 0; }
.sim .row output { grid-column: span 2; font-variant-numeric: tabular-nums; }
.sim .unit { color: #6a7684; font-size: .8rem; }
.sim .pair { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin: .3rem 0; }
.sim .check { display: block; margin: .15rem 0; }
.sim .pair .check { display: inline-block; }
.sim .indent { margin-left: 1.4rem; }
.sim .wide select { margin-left: .4rem; max-width: 210px; }
.sim select { max-width: 100%; }
.sim .buttons { display: flex; flex-wrap: wrap; gap: .3rem; }
.sim button { font: inherit; font-size: .85rem; padding: .25rem .55rem; border: 1px solid #9fb1c3; border-radius: 4px; background: #eef3f8; cursor: pointer; color: inherit; }
.sim button:hover { background: #dce8f5; }
.sim button.active { background: #2f7bd8; color: #fff; border-color: #2f7bd8; }
.sim .small button { font-size: .8rem; padding: .15rem .45rem; }
.sim .hint { color: #5a6876; font-size: .8rem; margin: .3rem 0; }
.sim textarea { width: 100%; font-family: ui-monospace, monospace; font-size: .78rem; }
.sim #buehne { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.sim #cv { flex: 1; width: 100%; min-height: 0; display: block; cursor: crosshair; touch-action: none; max-width: none; }
.sim .legende { list-style: none; margin: 0; padding: .3rem .6rem; display: flex; flex-wrap: wrap; gap: .25rem 1rem; font-size: .8rem;
  background: #fff; border-top: 1px solid #d0d9e2; }
.sim .legende i { display: inline-block; width: 18px; height: 10px; margin-right: 4px; vertical-align: middle; border-radius: 2px; }
.sim .legende i.dash { border: 2px dashed; height: 10px; background: none; }
.sim .legende i.hatch { border: 1.5px solid #db2777; background: repeating-linear-gradient(-45deg, rgba(219,39,119,.45) 0 1px, transparent 1px 5px); }
.sim .legende i.hatch.grey { border-color: #475569; background: repeating-linear-gradient(-45deg, rgba(71,85,105,.55) 0 1px, transparent 1px 5px); }
.sim .legende i.x { color: #dc2626; font-style: normal; font-weight: bold; width: auto; height: auto; }
.sim .check input.num { width: 52px; font-size: .85rem; padding: 1px 3px; }
.sim #rechts h3 { font-size: .9rem; margin: .7rem 0 .25rem; color: #1f3b57; }
.sim #rechts table { border-collapse: collapse; width: 100%; }
.sim #rechts td { padding: 2px 3px; border-bottom: 1px solid #eef1f4; vertical-align: top; }
.sim #rechts td:last-child { text-align: right; font-variant-numeric: tabular-nums; white-space: normal; min-width: 7.5em; }
.sim .ok { color: #15803d; font-weight: 600; }
.sim .bad { color: #b91c1c; font-weight: 600; }
.sim .warnTxt { color: #b45309; font-weight: 600; }

@media (max-width: 1000px) {
  .sim { grid-template-columns: minmax(0, 1fr); height: auto; }
  .sim #buehne { order: 1; height: 70vh; }
  .sim #rechts { order: 2; }
  .sim #steuerung { order: 3; }
  .sim #steuerung, .sim #rechts { border: 0; overflow: visible; }
}
