*, *::before, *::after { box-sizing: border-box; }

.steps-label { opacity: 0.6; margin-left: 6px; }
.steps-btn--active { outline: 2px solid #7ec8e3; font-weight: bold; }

body {
    margin: 0;
    min-height: 100vh;
    background: #060809;
    color: #c8d4e0;
    font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
    font-size: 13px;
}

.shell {
    max-width: 1220px;
    margin: 0 auto;
    padding: 12px 16px 20px;
}

.bar {
    margin-bottom: 10px;
}

.bar h1 {
    margin: 0 0 4px;
    font-size: 1.25rem;
    font-weight: 600;
    color: #7ec8e3;
    letter-spacing: 0.02em;
}

.tag {
    margin: 0;
    color: #6a7a88;
    font-size: 12px;
}

.hud {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    align-items: center;
}

.hud--top {
    margin: 0 0 8px;
    padding: 10px 12px;
    background: #0d141c;
    border: 1px solid #243444;
    border-radius: 6px;
}

.hud--physics {
    margin: 0 0 12px;
    padding: 8px 12px;
    background: #0a1018;
    border: 1px solid #1e3040;
    border-radius: 6px;
    gap: 10px 24px;
}

.phys-title {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #3a5a6a;
    align-self: center;
}

.phys-ctrl {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #7a9aaa;
    font-size: 12px;
}

.phys-ctrl input[type="range"] {
    width: 90px;
    accent-color: #4a8aaa;
}

.phys-ctrl span {
    min-width: 3.2em;
    color: #a8d0e0;
    font-size: 12px;
}

.panels {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.panels-top {
    display: flex;
    flex-direction: row;
    gap: 12px;
    align-items: flex-start;
}

.panels-center {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
    flex-shrink: 0;
}

.panels-right {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
    flex-shrink: 0;
}

.panels-bottom {
    display: flex;
    flex-direction: row;
    gap: 12px;
    align-items: flex-start;
}

.panel--left-col,
.panel--right-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

.panel--left {
    flex-shrink: 0;
}

.panel--game {
    flex-shrink: 0;
}

.panel--right {
    flex-shrink: 0;
    width: 260px;
    height: 600px;
}

.panel {
    position: relative;
    border: 1px solid #243444;
    border-radius: 6px;
    overflow: hidden;
    background: #0a1016;
}

.panel-label {
    position: absolute;
    top: 6px;
    right: 8px;
    font-size: 18px;
    font-weight: bold;
    color: #4a5a6a;
    z-index: 1;
    pointer-events: none;
}

canvas {
    display: block;
    vertical-align: middle;
}

.stat .k {
    color: #5a6a78;
    margin-right: 6px;
}

.stat strong {
    color: #a8e6cf;
    font-weight: 600;
}

.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    align-items: center;
}

.controls button {
    background: #1a2838;
    border: 1px solid #345;
    color: #cde;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font: inherit;
}

.controls button:hover {
    background: #243444;
    border-color: #4a6a8a;
}

.controls label.auto,
.controls label.hz {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #8a9aaa;
}

.controls input[type="range"] {
    width: 100px;
}

.controls input[type="checkbox"] {
    accent-color: #5cb896;
}
