.physics-debug { position: relative; z-index: 50; margin: 28px 0; padding: 20px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); box-shadow: 5px 5px 0 var(--shadow-ink); overflow: hidden; }
.physics-debug[hidden] { display: none; }
.physics-dialog .physics-debug-toggle { align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); background: var(--surface-soft); }
.physics-debug-toggle input { flex: 0 0 auto; }
.physics-debug header { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.physics-debug h2 { margin: 4px 0 12px; font: 30px/1.1 var(--display-font); }
.physics-debug p { font-size: 13px; line-height: 1.55; }
.physics-debug-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding: 14px 0; }
.physics-debug-controls label { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; font-size: 13px; }
.physics-debug select { max-width: 240px; min-width: 0; }
.physics-debug button, .physics-debug select { border: 1px solid var(--line); padding: 7px; background: var(--surface-soft); color: var(--ink); border-radius: 3px; }
.physics-debug button { cursor: pointer; }
.physics-debug-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(280px, 1fr); gap: 20px; }
.physics-debug-grid > div { min-width: 0; }
.physics-debug svg { display: block; width: 100%; border: 1px solid var(--line); background: var(--surface-soft); }
.physics-debug svg text { font: 15px monospace; }
.physics-debug svg [data-body] { cursor: pointer; }
.physics-debug-table { overflow-x: auto; max-height: 380px; }
.physics-debug table { border-collapse: collapse; width: 100%; font: 12px/1.5 monospace; }
.physics-debug td, .physics-debug th { padding: 5px 8px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.physics-debug th { position: sticky; top: 0; background: var(--surface); }
.physics-debug caption { text-align: left; padding: 8px 0; }
.physics-debug pre { max-height: 350px; overflow: auto; font-size: 11px; }
.physics-debug summary { cursor: pointer; margin-top: 14px; }
@media (max-width: 850px) { .physics-debug-grid { grid-template-columns: minmax(0, 1fr); } .physics-debug { padding: 12px; } }
