:root { font-family: Inter, "PingFang SC", system-ui, sans-serif; color: #e8efed; background: #101919; color-scheme: dark; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
main { width: min(940px, calc(100% - 36px)); margin: 32px auto; }
header, footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
main > header { flex-wrap: wrap; }
h1 { margin: 0; font-size: clamp(23px, 5vw, 36px); letter-spacing: -.045em; }
h2 { margin: 0; font-size: 20px; }
.connection, form { margin-top: 20px; padding: 18px 20px; border: 1px solid #36504c; background: #172424; border-radius: 14px; }
.connection { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: end; }
.connection label { min-width: 0; }
.connection input, .connection select { width: 100%; min-width: 0; }
label { display: grid; gap: 7px; font-size: 14px; }
input, select, button { font: inherit; }
input:not([type="checkbox"]), select, button { border: 1px solid #54716b; border-radius: 6px; padding: 8px 10px; color: inherit; background: #101919; }
button { cursor: pointer; white-space: nowrap; }
button:disabled { opacity: .45; cursor: default; }
button[type="submit"] { background: #99edc6; color: #0d2a20; font-weight: 700; border-color: #99edc6; }
input[type="checkbox"] { accent-color: #99edc6; width: 16px; height: 16px; }
#status { min-height: 1.2em; color: #b5c8c3; font-size: 14px; }
#status.error { color: #ffb2a6; }
#format { color: #9ebbb3; font-size: 14px; }
.globals { display: flex; justify-content: space-between; margin: 18px 0; gap: 16px; }
.globals label:first-child { display: flex; align-items: center; }
.table { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 8px 6px; border-block-end: 1px solid #36504c; white-space: nowrap; }
th { font-size: 13px; color: #b4c7c1; }
td input:not([type="checkbox"]) { width: 90px; }
footer { margin-top: 20px; flex-wrap: wrap; }
.tools { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 610px) { .connection { grid-template-columns: 1fr; } form { padding-inline: 12px; } }
.plot { position: relative; margin-top: 14px; background: #101919; border-radius: 8px; }
#response { display: block; width: 100%; height: 300px; }
#nodes { position: absolute; inset: 0; pointer-events: none; }
#nodes button {
    position: absolute; transform: translate(-50%, -50%); pointer-events: auto; touch-action: none;
    padding: 0; width: 24px; height: 24px; border-radius: 50%; color: var(--tone);
    border-color: var(--tone); font: 12px ui-monospace, monospace;
}
#nodes button[data-enabled="false"] { opacity: .5; }
#nodes button[aria-pressed="true"] { outline: 2px solid var(--tone); }
.plot[data-unavailable]::before { content: attr(data-unavailable); display: block; padding: 12px; }

.tuning-header, .effect header { flex-wrap: wrap; }
#effects-nav a { color: #99edc6; font-size: 14px; text-underline-offset: 4px; }
.effect { margin-top: 22px; padding: 18px 0 0; border-block-start: 1px solid #36504c; }
.enable-effect { display: flex; align-items: center; gap: 8px; }
.dynamics-fields { display: grid; gap: 14px; margin-top: 14px; grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); }
.dynamics-fields input { width: 100%; }

.connection[data-bearer] { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; }
@media (max-width: 610px) { .connection[data-bearer] { grid-template-columns: 1fr; } }
.transfer-figure { background: #101919; border: 1px solid #36504c; border-radius: 10px; margin: 14px 0 0; padding: 12px 14px; }
.transfer-figure figcaption { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 12px; font-size: 13px; }
.transfer-figure figcaption span::before { content: ""; display: inline-block; width: 16px; margin: 0 8px 3px 0; border-top: 2px solid #99edc6; }
.transfer-figure .transfer-unity::before { border-top: 2px dashed #82968f; }
.transfer-figure canvas { display: block; width: 100%; height: clamp(170px, 34vw, 265px); }
.transfer-output, .transfer-input, .transfer-invalid { font-size: 12px; color: #b5c8c3; }
.transfer-input { display: block; text-align: right; }
.transfer-invalid { margin-bottom: 0; color: #ffb2a6; }

html { scroll-padding-bottom: 110px; }
.band-actions { display: flex; justify-content: flex-end; margin: 12px 0 6px; }
.preset-actions {
    position: sticky;
    bottom: 0;
    z-index: 1;
    margin: 22px -20px -18px;
    padding: 10px 20px 14px;
    background: #172424;
    border-top: 1px solid #36504c;
    border-radius: 0 0 14px 14px;
}
#editor-status { flex: 0 0 100%; }
#editor-status #status { margin: 0; }
@media (max-width: 610px) {
    .preset-actions { margin-inline: -12px; padding-inline: 12px; }
}

[data-mode="preview"] :is(.connection, #discover, #apply, #connection-status) { display: none; }
.preview-notice { color: #b5c8c3; font-size: 14px; line-height: 1.6; margin: 12px 0 0; }
