.ldg-app { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; max-width: 100%; }
.ldg-composer { background: #ffffff; border: 1px solid #dce5f0; border-radius: 16px; padding: 14px 16px; box-shadow: 0 8px 28px rgba(15, 30, 60, 0.06); display: grid; gap: 10px; }
.ldg-form { display: flex; gap: 10px; align-items: stretch; }
.ldg-input { flex: 1; min-width: 0; min-height: 46px; padding: 10px 14px; border: 1.5px solid #c3d2e4; border-radius: 12px; font-family: 'JetBrains Mono', monospace; font-size: 0.98rem; font-weight: 600; color: #122038; background: #f8fafd; }
.ldg-input:focus { outline: none; border-color: #1d4ed8; background: #ffffff; box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.14); }
.ldg-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 16px; border-radius: 11px; border: 1px solid #c3d2e4; background: #ffffff; color: #122038; font-size: 0.88rem; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; }
.ldg-btn:hover { background: #f1f5fb; text-decoration: none; }
.ldg-btn-primary { background: #1d4ed8; border-color: #1d4ed8; color: #ffffff; min-height: 46px; padding: 8px 20px; }
.ldg-btn-primary:hover { background: #1e40af; border-color: #1e40af; color: #ffffff; }
.ldg-btn-pro { background: #0f172a; border-color: #0f172a; color: #ffffff; }
.ldg-btn-pro:hover { background: #1e293b; color: #ffffff; }
.ldg-presets { display: flex; flex-wrap: wrap; gap: 7px; }
.ldg-pill { min-height: 36px; padding: 5px 12px; border-radius: 999px; border: 1px solid #dce5f0; background: #f8fafd; color: #2b3c54; font-family: 'JetBrains Mono', monospace; font-size: 0.82rem; font-weight: 600; cursor: pointer; }
.ldg-pill:hover { border-color: #1d4ed8; color: #1d4ed8; }
.ldg-pill.active { background: #eff6ff; border-color: #1d4ed8; color: #1d4ed8; }
.ldg-grid { display: grid; grid-template-columns: minmax(0, 1.32fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.ldg-canvas-card, .ldg-fc-card, .ldg-pro-drawer { background: #ffffff; border: 1px solid #dce5f0; border-radius: 16px; padding: 14px 16px; box-shadow: 0 8px 28px rgba(15, 30, 60, 0.05); min-width: 0; }
.ldg-canvas-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.ldg-mol-name { display: block; font-family: 'Instrument Sans', sans-serif; font-size: 1.05rem; color: #122038; }
.ldg-mol-sub { display: block; font-size: 0.82rem; color: #52647d; }
.ldg-toggles { display: flex; flex-wrap: wrap; gap: 10px; font-size: 0.8rem; color: #52647d; }
.ldg-tog { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; font-weight: 500; }
.ldg-svg-stage { border: 1px solid #e2eaf4; border-radius: 12px; overflow: hidden; background: #fcfdff; }
.ldg-svg { display: block; width: 100%; height: auto; }
.ldg-canvas-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.ldg-status { font-size: 0.8rem; color: #52647d; }
.ldg-export-row { display: flex; flex-wrap: wrap; gap: 8px; }
.ldg-panel { display: grid; gap: 12px; min-width: 0; }
.ldg-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ldg-kpi { background: #ffffff; border: 1px solid #dce5f0; border-radius: 13px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ldg-kpi-accent { border-color: #93c5fd; background: #f8fbff; }
.ldg-kpi-lbl { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: #52647d; font-weight: 600; }
.ldg-kpi-val { font-family: 'Instrument Sans', sans-serif; font-size: 1.2rem; color: #122038; line-height: 1.2; }
.ldg-kpi-accent .ldg-kpi-val { color: #1d4ed8; font-size: 1.45rem; }
.ldg-kpi-sub { font-size: 0.76rem; color: #52647d; }
.ldg-mono { font-family: 'JetBrains Mono', monospace; }
.ldg-fc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.ldg-fc-head h2 { margin: 0; font-family: 'Instrument Sans', sans-serif; font-size: 0.96rem; }
.ldg-fc-formula { font-size: 0.74rem; color: #0d9488; font-weight: 600; }
.ldg-fc-table-wrap { overflow-x: auto; }
.ldg-fc-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; font-family: 'JetBrains Mono', monospace; }
.ldg-fc-table th, .ldg-fc-table td { padding: 6px 8px; border-bottom: 1px solid #edf2f8; text-align: left; }
.ldg-fc-table th { color: #52647d; font-weight: 600; font-family: 'Inter', sans-serif; font-size: 0.76rem; }
.ldg-fc-z { color: #0d9488; font-weight: 700; }
.ldg-fc-nz { color: #d97706; font-weight: 700; }
.ldg-pro-drawer { border-color: #93c5fd; background: #f8fbff; }
.ldg-pro-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.ldg-pro-head p { margin: 3px 0 0; font-size: 0.84rem; color: #52647d; }
.ldg-latex-box { background: #ffffff; border: 1px solid #dce5f0; border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; overflow-x: auto; }
.ldg-latex-lbl { display: block; font-size: 0.74rem; color: #52647d; margin-bottom: 4px; font-weight: 600; }
.ldg-pro-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ldg-pro-note { margin: 8px 0 0; font-size: 0.78rem; color: #52647d; }
@media (max-width: 880px) { .ldg-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  .ldg-form { flex-direction: column; }
  .ldg-btn-primary { width: 100%; }
  .ldg-export-row { width: 100%; }
  .ldg-export-row .ldg-btn { flex: 1 1 140px; }
  .ldg-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}