.ln-howto {
  margin: 0 0 0.85rem;
  padding-left: 1.2rem;
  font-size: 0.82rem;
  color: #9eb0c2;
  line-height: 1.5;
}

.ln-howto li {
  margin-bottom: 0.45rem;
}

.ln-howto strong {
  color: #e8f0f8;
}

.ln-layout .field.check {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.ln-layout .field.check input {
  width: auto;
}

.ln-stroke-readout {
  display: flex;
  justify-content: space-between;
  margin-top: 0.35rem;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.ln-stroke-readout #stroke-pct {
  color: #f0d2c0;
  font-weight: 600;
}

.ln-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.75rem 0 1rem;
}

.ln-scheme .btn.on {
  border-color: #3d8bfd;
  background: rgba(61, 139, 253, 0.18);
  color: #e8f0f8;
}

.ln-note {
  margin: 0 0 0.85rem;
  padding: 0.65rem 0.75rem;
  background: #141b22;
  border: 1px solid #2a3540;
  border-radius: 10px;
  font-size: 0.78rem;
  color: #9eb0c2;
  line-height: 1.45;
}

.ln-note p {
  margin: 0 0 0.5rem;
}

.ln-note p:last-child {
  margin-bottom: 0;
}

.ln-note strong {
  color: #e8f0f8;
}

.ln-state {
  margin: 0.85rem 0;
  padding: 0.75rem 0.85rem;
  background: #141b22;
  border: 1px solid #2a3540;
  border-radius: 10px;
}

.ln-state h3 {
  margin: 0 0 0.4rem;
  font-size: 0.85rem;
}

.ln-state p {
  margin: 0;
  font-size: 0.8rem;
  color: #9eb0c2;
  line-height: 1.45;
}

.ln-legend {
  display: grid;
  gap: 0.35rem;
  margin: 0.85rem 0;
  font-size: 0.78rem;
  color: #9eb0c2;
}

.ln-legend i {
  display: inline-block;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 2px;
  margin-right: 0.45rem;
  vertical-align: -0.05rem;
}

.ln-legend .c-bracket {
  background: #8a9aab;
}
.ln-legend .c-shaft {
  background: #c0c8d4;
}
.ln-legend .c-gate {
  background: #c45c26;
}
.ln-legend .c-ramp {
  background: #3d8bfd;
}
.ln-legend .c-ball {
  background: #e8f0a8;
}
.ln-legend .c-pin {
  background: #5dcea0;
}

.ln-kine {
  margin: 0 0 0.85rem;
  padding: 0.65rem 0.75rem;
  background: #141b22;
  border: 1px solid #2a3540;
  border-radius: 10px;
  font-size: 0.78rem;
  color: #9eb0c2;
  line-height: 1.45;
}

.ln-kine .kine-row {
  display: grid;
  grid-template-columns: 3.6rem 1fr;
  gap: 0.45rem;
  margin: 0 0 0.35rem;
}

.ln-kine .kine-row:last-child {
  margin-bottom: 0;
}

.ln-kine b {
  color: #e8f0f8;
  font-weight: 600;
}

.ln-bom {
  margin-top: 0.5rem;
  padding: 0.75rem 0.85rem;
  background: #141b22;
  border: 1px solid #2a3540;
  border-radius: 10px;
  font-size: 0.78rem;
  color: #9eb0c2;
  max-height: 180px;
  overflow: auto;
}

.ln-bom h3 {
  margin: 0 0 0.4rem;
  font-size: 0.85rem;
  color: #e8f0f8;
}

.ln-bom table {
  width: 100%;
  border-collapse: collapse;
}

.ln-bom th,
.ln-bom td {
  text-align: left;
  padding: 0.25rem 0.15rem;
  border-bottom: 1px solid #24303a;
}

.ln-bom td.num {
  text-align: right;
}

/* Keep the 3D pane on screen: left column scrolls, right fills the viewport. */
.ln-layout.layout {
  height: calc(100dvh - 7rem);
  min-height: 0;
  overflow: hidden;
  align-items: stretch;
}

.ln-layout .panel {
  overflow-y: auto;
  min-height: 0;
}

.ln-layout .viewport-wrap,
.ln-layout #viewport {
  height: 100%;
  min-height: 0;
}

@media (max-width: 900px) {
  .ln-layout.layout {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(46vh, 1fr) minmax(0, 48vh);
    grid-template-areas:
      "view"
      "panel";
  }

  .ln-layout .viewport-wrap {
    grid-area: view;
    min-height: 46vh;
  }

  .ln-layout .panel {
    grid-area: panel;
    border-right: 0;
    border-top: 1px solid var(--line);
  }
}
