/* =========================================================
   Tutorial Studio
   Audio Editor
========================================================= */


/* =========================================================
   Base
========================================================= */

:root {

    color-scheme: dark;

    --audio-bg: #101218;
    --audio-panel: #181b23;
    --audio-border: #2a2f3a;

    --audio-text: #eef1f7;
    --audio-muted: #9098a8;
    --audio-soft: #242833;

    --audio-primary: #8d7bff;
    --audio-primary-dark: #7562ed;
    --audio-primary-soft: #2d2846;

    --audio-danger: #ef4444;

    --audio-sidebar-width: 260px;
    --audio-inspector-width: 280px;

    --audio-topbar-height: 64px;
    --audio-footer-height: 32px;

    --audio-radius: 12px;
}


* {
    box-sizing: border-box;
}


html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
}


body {

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        "PingFang SC",
        "Microsoft YaHei",
        sans-serif;

    background: var(--audio-bg);

    color: var(--audio-text);

    overflow: hidden;
}


button,
input {
    font: inherit;
}


button {
    border: 0;
}


button:focus,
input:focus {
    outline: none;
}


/* =========================================================
   App
========================================================= */

.audio-app {

    width: 100%;
    height: 100vh;

    display: flex;
    flex-direction: column;

    overflow: hidden;
}


/* =========================================================
   Top Bar
========================================================= */

.audio-topbar {

    height: var(--audio-topbar-height);

    flex-shrink: 0;

    display: flex;
    align-items: center;

    padding: 0 18px;

    background: var(--audio-panel);

    border-bottom: 1px solid var(--audio-border);

    position: relative;

    z-index: 20;
}


.audio-brand {

    width: var(--audio-sidebar-width);

    display: flex;
    align-items: center;

    gap: 12px;
}


.audio-back-button {

    width: 36px;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 8px;

    background: var(--audio-soft);

    color: var(--audio-text);

    cursor: pointer;

    font-size: 20px;

    transition:
        background .15s ease,
        transform .15s ease;
}


.audio-back-button:hover {

    background: #e7e9ed;

    transform: translateX(-2px);
}


.audio-brand-text {

    display: flex;
    flex-direction: column;

    gap: 2px;
}


.audio-brand-title {

    font-size: 14px;

    font-weight: 800;

    letter-spacing: .08em;
}


.audio-brand-subtitle {

    font-size: 11px;

    color: var(--audio-muted);

    letter-spacing: .04em;
}


.audio-project-name {

    flex: 1;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 10px;

    font-size: 13px;
}


.audio-project-status {

    padding: 4px 8px;

    border-radius: 999px;

    background: #edf8f0;

    color: #3b8b50;

    font-size: 11px;
}


.audio-top-actions {

    width: 360px;
    flex-shrink: 0;

    display: flex;
    justify-content: flex-end;

    gap: 8px;
}


/* =========================================================
   Common Button
========================================================= */

.audio-button {

    min-height: 34px;

    padding: 0 14px;

    border-radius: 7px;

    background: var(--audio-soft);

    color: var(--audio-text);

    cursor: pointer;

    font-size: 12px;

    font-weight: 600;

    transition:
        background .15s ease,
        transform .15s ease;
}


.audio-button:hover {

    background: #e6e8ec;
}


.audio-button:active {

    transform: translateY(1px);
}


.audio-button.primary {

    background: var(--audio-primary);

    color: #ffffff;
}


.audio-button.primary:hover {

    background: var(--audio-primary-dark);
}


.icon-button {

    width: 32px;
    height: 32px;

    border-radius: 7px;

    background: var(--audio-primary-soft);

    color: var(--audio-primary);

    cursor: pointer;

    font-size: 20px;

    display: flex;
    align-items: center;
    justify-content: center;
}


.icon-button:hover {

    background: #e4e0ff;
}


/* =========================================================
   Main Workspace
========================================================= */

.audio-workspace {

    flex: 1;

    min-height: 0;

    display: grid;

    grid-template-columns:
        var(--audio-sidebar-width)
        minmax(0, 1fr)
        var(--audio-inspector-width);

    overflow: hidden;
}


/* =========================================================
   Sidebar
========================================================= */

.audio-sidebar {

    min-width: 0;

    background: var(--audio-panel);

    display: flex;
    flex-direction: column;

    overflow: hidden;
}


.audio-sidebar-left {

    border-right: 1px solid var(--audio-border);
}


.audio-sidebar-right {

    border-left: 1px solid var(--audio-border);
}


.audio-panel-header {

    min-height: 68px;

    padding: 14px 16px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-bottom: 1px solid var(--audio-border);
}


.audio-panel-eyebrow {

    margin-bottom: 4px;

    color: var(--audio-primary);

    font-size: 9px;

    font-weight: 800;

    letter-spacing: .12em;
}


.audio-panel-header h2 {

    margin: 0;

    font-size: 15px;

    font-weight: 700;
}


/* =========================================================
   Upload Zone
========================================================= */

.audio-upload-zone {

    margin: 14px;

    min-height: 120px;

    padding: 18px;

    border: 1px dashed #d5d8de;

    border-radius: 10px;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    gap: 5px;

    background: #fafbfc;

    cursor: pointer;

    transition:
        border-color .15s ease,
        background .15s ease;
}


.audio-upload-zone:hover {

    border-color: var(--audio-primary);

    background: var(--audio-primary-soft);
}


.upload-icon {

    width: 38px;
    height: 38px;

    margin-bottom: 3px;

    border-radius: 10px;

    background: var(--audio-primary-soft);

    color: var(--audio-primary);

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 20px;
}


.audio-upload-zone strong {

    font-size: 12px;
}


.audio-upload-zone span {

    font-size: 10px;

    color: var(--audio-muted);
}


/* =========================================================
   Audio Library
========================================================= */

.audio-library {

    flex: 1;

    min-height: 0;

    padding: 0 12px 12px;

    overflow-y: auto;
}


.audio-library::-webkit-scrollbar {

    width: 5px;
}


.audio-library::-webkit-scrollbar-thumb {

    background: #d7dae0;

    border-radius: 10px;
}


.audio-library-empty {

    height: 180px;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    gap: 8px;

    color: var(--audio-muted);

    font-size: 11px;
}


.empty-icon {

    width: 42px;
    height: 42px;

    border-radius: 12px;

    background: var(--audio-soft);

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 20px;
}


/* =========================================================
   Editor
========================================================= */

.audio-editor {

    min-width: 0;
    min-height: 0;

    display: flex;
    flex-direction: column;

    background: #f7f8fa;

    overflow: hidden;
}


/* =========================================================
   Transport
========================================================= */

.audio-transport {

    height: 58px;

    flex-shrink: 0;

    display: flex;
    align-items: center;

    padding: 0 14px;

    background: #ffffff;

    border-bottom: 1px solid var(--audio-border);
}


.transport-left,
.transport-right {

    display: flex;
    align-items: center;

    gap: 6px;
}


.transport-left {

    width: 180px;
}


.transport-right {

    width: 180px;

    justify-content: flex-end;
}


.transport-button {

    width: 32px;
    height: 32px;

    border-radius: 7px;

    background: var(--audio-soft);

    color: #454951;

    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 15px;
}


.transport-button:hover {

    background: #e5e7eb;
}


.transport-play {

    width: 38px;
    height: 38px;

    border-radius: 50%;

    background: var(--audio-primary);

    color: #ffffff;

    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 14px;

    padding-left: 2px;
}


.transport-play:hover {

    background: var(--audio-primary-dark);
}


.transport-time {

    flex: 1;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 7px;

    font-family:
        "SFMono-Regular",
        Consolas,
        monospace;

    font-size: 12px;

    color: #3e4249;
}


.time-separator {

    color: #b4b8be;
}


.volume-control input {

    width: 70px;
}


/* =========================================================
   Toolbar
========================================================= */

.audio-toolbar {

    height: 46px;

    flex-shrink: 0;

    display: flex;
    align-items: center;

    padding: 0 12px;

    background: #ffffff;

    border-bottom: 1px solid var(--audio-border);
}


.toolbar-group {

    display: flex;
    align-items: center;

    gap: 4px;

    padding-right: 10px;

    margin-right: 10px;

    border-right: 1px solid var(--audio-border);
}


.toolbar-button {

    width: 30px;
    height: 30px;

    border-radius: 6px;

    background: transparent;

    color: #555a63;

    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 14px;
}


.toolbar-button:hover {

    background: var(--audio-soft);
}


.toolbar-spacer {

    flex: 1;
}


.zoom-control {

    display: flex;
    align-items: center;

    gap: 5px;
}


.zoom-control span {

    min-width: 42px;

    text-align: center;

    font-size: 11px;

    color: var(--audio-muted);
}


/* =========================================================
   Timeline
========================================================= */

.audio-timeline-container {

    flex: 1;

    min-height: 0;

    display: flex;
    flex-direction: column;

    overflow: hidden;

    background: #f4f5f7;
}


/* =========================================================
   Ruler
========================================================= */

.audio-ruler-area {

    height: 38px;

    flex-shrink: 0;

    display: grid;

    grid-template-columns: 120px minmax(0, 1fr);

    background: #ffffff;

    border-bottom: 1px solid var(--audio-border);
}


.audio-ruler-spacer {

    border-right: 1px solid var(--audio-border);
}


.audio-ruler {

    position: relative;

    height: 100%;

    overflow: hidden;
    min-width: 0;
    cursor: crosshair;
}


.audio-ruler span {

    position: absolute;

    top: 12px;

    transform: translateX(-50%);

    font-family:
        "SFMono-Regular",
        Consolas,
        monospace;

    font-size: 9px;

    color: #9297a0;

    white-space: nowrap;
}


.audio-ruler span::before {

    content: "";

    position: absolute;

    top: -12px;

    left: 50%;

    width: 1px;

    height: 7px;

    background: #cfd2d8;
}


/* =========================================================
   Tracks
========================================================= */

.audio-tracks {

    flex: 1;

    min-height: 0;

    overflow: auto;

    position: relative;
    overscroll-behavior: contain;
}

.audio-tracks.is-drop-target {
    outline: 2px solid var(--audio-primary);
    outline-offset: -2px;
    background-color: #211d37;
}


.audio-tracks::-webkit-scrollbar {

    width: 7px;
    height: 7px;
}


.audio-tracks::-webkit-scrollbar-thumb {

    background: #d1d4da;

    border-radius: 10px;
}


.audio-row {

    min-height: 76px;
    width: var(--audio-timeline-width, 100%);

    display: grid;

    grid-template-columns: 120px minmax(0, 1fr);

    border-bottom: 1px solid #e3e5e9;

    background: #ffffff;
}


.track-name {

    min-width: 0;
    position: sticky;
    left: 0;
    z-index: 3;

    padding: 0 12px;

    display: flex;
    align-items: center;

    border-right: 1px solid var(--audio-border);

    color: #565b64;

    font-size: 11px;

    overflow: hidden;

    white-space: nowrap;

    text-overflow: ellipsis;
}


.audio-track-content {

    position: relative;

    min-width: 0;

    background:
        repeating-linear-gradient(
            to right,
            transparent 0,
            transparent 99px,
            rgba(0, 0, 0, .035) 100px
        );
}


.audio-clip {

    position: absolute;

    top: 12px;

    height: 52px;

    min-width: 50px;

    border-radius: 7px;

    background: var(--audio-primary-soft);

    border: 1px solid #d5cffd;

    color: #5145bb;

    cursor: pointer;

    overflow: hidden;

    display: flex;
    flex-direction: column;

    justify-content: center;

    padding: 0 10px;

    transition:
        border-color .12s ease,
        box-shadow .12s ease;
}


.audio-clip:hover {

    border-color: var(--audio-primary);

}


.audio-clip.selected {

    border-color: var(--audio-primary);

    box-shadow:
        0 0 0 2px rgba(109, 93, 252, .14);
}


.audio-clip b {

    font-size: 9px;

    font-family:
        "SFMono-Regular",
        Consolas,
        monospace;
}


.audio-clip span {

    margin-top: 2px;

    font-size: 10px;

    font-weight: 600;

    overflow: hidden;

    white-space: nowrap;

    text-overflow: ellipsis;
}


/* =========================================================
   Empty Timeline
========================================================= */

.audio-empty-state {

    min-height: 280px;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    color: var(--audio-muted);

    text-align: center;
}


.empty-state-icon {

    width: 52px;
    height: 52px;

    margin-bottom: 14px;

    border-radius: 14px;

    background: #ffffff;

    border: 1px solid var(--audio-border);

    display: flex;
    align-items: center;
    justify-content: center;

    color: var(--audio-primary);

    font-size: 24px;
}


.audio-empty-state h3 {

    margin: 0 0 6px;

    color: #454951;

    font-size: 14px;
}


.audio-empty-state p {

    margin: 0 0 16px;

    font-size: 11px;
}


/* =========================================================
   Status Bar
========================================================= */

.audio-statusbar {

    height: 30px;

    flex-shrink: 0;

    padding: 0 12px;

    display: flex;
    align-items: center;

    background: #ffffff;

    border-top: 1px solid var(--audio-border);

    color: var(--audio-muted);

    font-size: 10px;
}


.status-left,
.status-right {

    width: 180px;

    display: flex;
    align-items: center;

    gap: 6px;
}


.status-center {

    flex: 1;

    text-align: center;
}


.status-right {

    justify-content: flex-end;
}


.status-left strong,
.status-right strong {

    color: #555a63;
}


/* =========================================================
   Inspector
========================================================= */

.audio-inspector {

    flex: 1;

    min-height: 0;

    overflow-y: auto;
}


.audio-inspector::-webkit-scrollbar {

    width: 5px;
}


.audio-inspector::-webkit-scrollbar-thumb {

    background: #d7dae0;

    border-radius: 10px;
}


.inspector-empty {

    min-height: 260px;

    padding: 24px 20px;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    text-align: center;

    gap: 8px;

    color: var(--audio-muted);
}


.inspector-empty strong {

    color: #555a63;

    font-size: 12px;
}


.inspector-empty span {

    max-width: 190px;

    font-size: 10px;

    line-height: 1.6;
}


.inspector-empty-icon {

    width: 46px;
    height: 46px;

    margin-bottom: 4px;

    border-radius: 50%;

    background: var(--audio-soft);

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 22px;

    color: #9ba0a8;
}


.inspector-content {

    padding: 4px 0 20px;
}


.inspector-section {

    padding: 16px;

    border-bottom: 1px solid var(--audio-border);
}


.inspector-section-title {

    margin-bottom: 14px;

    font-size: 11px;

    font-weight: 700;

    color: #4d5159;
}


.inspector-field {

    display: flex;
    flex-direction: column;

    gap: 6px;

    margin-bottom: 12px;
}


.inspector-field:last-child {

    margin-bottom: 0;
}


.inspector-field > span {

    font-size: 10px;

    color: var(--audio-muted);
}


.inspector-field input {

    width: 100%;
    height: 32px;

    padding: 0 9px;

    border: 1px solid var(--audio-border);

    border-radius: 6px;

    background: #fafbfc;

    color: #454951;

    font-size: 11px;
}


.inspector-field input:focus {

    border-color: var(--audio-primary);

    background: #ffffff;
}


.inspector-range {

    display: flex;
    align-items: center;

    gap: 10px;
}


.inspector-range input {

    flex: 1;
}


.inspector-range span {

    width: 42px;

    text-align: right;

    color: #565b64;

    font-size: 10px;
}


/* =========================================================
   Footer
========================================================= */

.audio-footer {

    height: var(--audio-footer-height);

    flex-shrink: 0;

    padding: 0 14px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    background: #ffffff;

    border-top: 1px solid var(--audio-border);

    color: #9a9fa7;

    font-size: 9px;

    letter-spacing: .03em;
}


/* =========================================================
   Responsive
========================================================= */

@media (max-width: 1100px) {

    :root {

        --audio-sidebar-width: 220px;

        --audio-inspector-width: 240px;
    }

}


@media (max-width: 850px) {

    .audio-workspace {

        grid-template-columns:
            200px
            minmax(0, 1fr);
    }


    .audio-sidebar-right {

        display: none;
    }


    .audio-top-actions {

        width: auto;
    }


    .audio-project-name {

        justify-content: flex-start;
    }

}


@media (max-width: 650px) {

    .audio-workspace {

        grid-template-columns:
            minmax(0, 1fr);
    }


    .audio-sidebar-left {

        display: none;
    }


    .audio-brand {

        width: auto;
    }


    .audio-brand-text {

        display: none;
    }


    .audio-project-name {

        padding-left: 15px;
    }


    .audio-top-actions .audio-button:not(.primary) {

        display: none;
    }


    .transport-left,
    .transport-right {

        width: 100px;
    }

}


/* =========================================================
   AUDIO GRAPH
========================================================= */

.audio-graph {
    position: relative;
    min-height: 360px;
    overflow: hidden;
    background:
        linear-gradient(
            rgba(255, 255, 255, 0.025) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.025) 1px,
            transparent 1px
        );
    background-size:
        24px 24px;
}


.audio-graph-canvas {
    position: relative;
    width: 100%;
    min-height: 360px;
}


.audio-graph-connections {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
}


.audio-graph-connection {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    opacity: 0.65;
}


.audio-graph-nodes {
    position: absolute;
    inset: 0;
}


.audio-graph-node {
    position: absolute;
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    background: #17191d;
    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.28);
    user-select: none;
    cursor: grab;
}


.audio-graph-node:active {
    cursor: grabbing;
}


.audio-graph-node-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 34px;
    padding: 0 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}


.audio-graph-node-header span {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
}


.audio-graph-node-header button {
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font-size: 18px;
    opacity: 0.55;
}


.audio-graph-node-header button:hover {
    opacity: 1;
}


.audio-graph-node-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px;
}


.audio-graph-node-type {
    font-size: 9px;
    letter-spacing: 0.12em;
    opacity: 0.45;
}


.audio-graph-node-body strong {
    font-size: 13px;
}


.audio-graph-node-source {
    border-color: rgba(80, 180, 255, 0.35);
}


.audio-graph-node-effect {
    border-color: rgba(180, 130, 255, 0.35);
}


.audio-graph-node-destination {
    border-color: rgba(80, 220, 150, 0.35);
}


.audio-graph-port {
    position: absolute;
    top: 50%;
    width: 10px;
    height: 10px;
    margin-top: -5px;
    border-radius: 50%;
    background: #888;
    border: 2px solid #17191d;
    box-sizing: border-box;
    cursor: crosshair;
}


.audio-graph-input {
    left: -6px;
}


.audio-graph-output {
    right: -6px;
}

/* Professional studio finish */

body {
    background: var(--audio-bg);
    color: var(--audio-text);
}

.audio-topbar,
.audio-sidebar,
.audio-transport,
.audio-toolbar,
.audio-statusbar,
.audio-footer {
    background: var(--audio-panel);
    color: var(--audio-text);
    border-color: var(--audio-border);
}

.audio-topbar {
    box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
}

.audio-brand-title {
    letter-spacing: .14em;
}

.audio-project-name strong {
    font-size: 13px;
    font-weight: 650;
}

.audio-project-status {
    background: #1d342d;
    color: #82dbb5;
}

.audio-button,
.transport-button,
.toolbar-button,
.icon-button {
    background: #242833;
    color: #cbd1dd;
    border: 1px solid #303644;
}

.audio-button:hover,
.transport-button:hover,
.toolbar-button:hover,
.icon-button:hover {
    background: #303644;
    border-color: #444c5d;
    color: #fff;
}

.audio-button.primary,
.transport-play {
    background: var(--audio-primary);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 5px 16px rgba(141, 123, 255, .22);
}

.audio-button.primary:hover,
.transport-play:hover {
    background: var(--audio-primary-dark);
}

.audio-button-small {
    min-height: 30px;
    padding: 0 10px;
    font-size: 11px;
    white-space: nowrap;
}

.audio-top-actions .audio-button {
    flex-shrink: 0;
    white-space: nowrap;
}

.audio-upload-zone {
    border-color: #383e4b;
    background: #1c2029;
}

.audio-upload-zone:hover {
    background: #252237;
}

.audio-library-item {
    width: 100%;
    min-height: 58px;
    margin: 0 0 8px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #2e3440;
    border-radius: 9px;
    background: #1d212b;
    color: #e4e8f0;
    text-align: left;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
}

.audio-library-item:hover {
    border-color: #51477f;
    background: #252437;
}

.library-icon {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #2d2846;
    color: #b6aaff;
}

.library-info {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.library-info strong {
    overflow: hidden;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.library-info small {
    color: var(--audio-muted);
    font-size: 10px;
}

.audio-editor {
    background: #11141b;
}

.audio-graph-panel {
    flex: 0 0 250px;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-bottom: 1px solid var(--audio-border);
}

.audio-graph-header {
    min-height: 58px;
    flex-shrink: 0;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: #171a22;
    border-bottom: 1px solid var(--audio-border);
}

.audio-graph-header h2 {
    margin: 0;
    font-size: 13px;
    font-weight: 650;
}

.audio-graph-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.graph-connection-hint {
    color: var(--audio-muted);
    font-size: 10px;
    white-space: nowrap;
}

.audio-graph-actions select {
    height: 30px;
    padding: 0 8px;
    border: 1px solid #343a47;
    border-radius: 7px;
    background: #20242e;
    color: var(--audio-text);
    font-size: 11px;
}

.audio-graph {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    overflow: auto;
    background-color: #12151c;
    background-image:
        radial-gradient(rgba(159, 170, 192, .16) 1px, transparent 1px);
    background-size: 18px 18px;
}

.audio-graph-canvas {
    width: 100%;
    min-height: 100%;
    height: 100%;
}

.audio-graph-connections {
    overflow: visible;
}

.audio-graph-connections marker path {
    fill: #8d7bff;
}

.audio-graph-connection {
    stroke: #8d7bff;
    stroke-width: 2.5;
    opacity: .8;
}

.audio-graph-node {
    min-height: 126px;
    overflow: visible;
    border: 1px solid #3a4150;
    border-radius: 10px;
    background: linear-gradient(160deg, #242936, #1a1e27 68%);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .26);
    color: #e6eaf2;
}

.audio-graph-node-source {
    border-color: rgba(91, 177, 255, .56);
}

.audio-graph-node-effect {
    border-color: rgba(141, 123, 255, .56);
}

.audio-graph-node-destination {
    border-color: rgba(86, 207, 159, .56);
}

.audio-graph-node-header {
    height: 32px;
    padding: 0 9px;
    border-bottom-color: #343a47;
}

.audio-graph-node-title {
    overflow: hidden;
    font-size: 10px;
    letter-spacing: .04em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.audio-graph-node-lock {
    color: #777f91;
    font-size: 8px;
}

.audio-graph-node-body {
    gap: 8px;
    padding: 8px 11px 10px;
}

.audio-graph-node-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.audio-graph-node-type {
    color: #9da6b6;
    font-size: 8px;
}

.audio-graph-node-body strong {
    color: #a99cff;
    font-size: 9px;
    font-weight: 600;
}

.audio-graph-node-header button {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: transparent;
    color: #aeb5c2;
}

.audio-graph-node-header button:hover {
    background: #3a2a35;
    color: #ff8291;
}

.audio-graph-port {
    width: 13px;
    height: 13px;
    padding: 0;
    border: 2px solid #12151c;
    background: #b7adff;
    cursor: crosshair;
    z-index: 2;
}

.audio-graph-port:hover,
.audio-graph-port.is-connecting {
    background: #fff;
    box-shadow: 0 0 0 4px rgba(141, 123, 255, .24);
}

.audio-node-control {
    display: grid;
    gap: 4px;
    color: #9fa8b8;
    font-size: 9px;
}

.audio-node-control > span {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.audio-node-control b {
    color: #e4e8f1;
    font-weight: 600;
}

.audio-node-control input[type="range"] {
    width: 100%;
    height: 4px;
    accent-color: var(--audio-primary);
}

.audio-node-control select {
    height: 24px;
    border: 1px solid #3b4352;
    border-radius: 5px;
    background: #20242e;
    color: #e6eaf2;
    font-size: 9px;
}

.audio-timeline-container {
    flex: 1 1 0;
    min-height: 120px;
    background: #11141b;
}

.audio-ruler-area,
.audio-ruler {
    background: #191d26;
    border-color: var(--audio-border);
}

.audio-ruler span {
    color: #929bad;
}

.audio-ruler span.audio-ruler-end {
    transform: translateX(-100%);
}

.audio-ruler span::before {
    background: #4a5260;
}

.audio-tracks {
    background: #11141b;
}

.audio-row {
    position: relative;
    min-height: 72px;
    background: #171a22;
    border-color: #292e39;
}

.track-name {
    gap: 6px;
    justify-content: space-between;
    border-color: var(--audio-border);
    color: #c8ceda;
}

.track-name > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-remove {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    border-radius: 5px;
    background: transparent;
    color: #8f98a9;
    cursor: pointer;
    opacity: 0;
}

.audio-row:hover .track-remove,
.audio-row.selected .track-remove {
    opacity: 1;
}

.track-remove:hover {
    background: #3a252d;
    color: #ff8795;
}

.audio-track-content {
    position: relative;
    min-width: 0;
    overflow: hidden;
    background:
        repeating-linear-gradient(
            to right,
            transparent 0,
            transparent 99px,
            rgba(182, 194, 216, .055) 100px
        );
}

.audio-clip {
    top: 8px;
    height: calc(100% - 16px);
    min-width: 34px;
    display: block;
    padding: 0;
    border: 1px solid #5b65aa;
    border-radius: 7px;
    background: linear-gradient(135deg, #333764, #282d50);
    color: #e2e5ff;
}

.audio-clip.selected {
    border-color: #a99cff;
    box-shadow: 0 0 0 2px rgba(141, 123, 255, .2);
}

.audio-waveform {
    position: absolute;
    inset: 3px 4px;
    width: calc(100% - 8px);
    height: calc(100% - 6px);
    pointer-events: none;
    opacity: .82;
}

.audio-clip-label {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 8px;
    pointer-events: none;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .5);
}

.audio-clip-label b {
    font-size: 8px;
    color: #d3d8ff;
}

.audio-clip-label span {
    margin-top: 1px;
    overflow: hidden;
    color: #fff;
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.audio-empty-state {
    min-height: 160px;
    color: var(--audio-muted);
}

.audio-empty-state h3 {
    color: #dce1ea;
}

.empty-state-icon {
    border: 1px solid #2e3440;
    background: #1c2029;
    color: #b6aaff;
}

.audio-empty-state p {
    color: #939bac;
}

.inspector-empty {
    color: var(--audio-muted);
}

.inspector-empty strong,
.inspector-section-title {
    color: #d9deea;
}

.inspector-field input {
    border-color: #323846;
    background: #20242e;
    color: #e8ebf2;
}

.inspector-field input:focus {
    border-color: var(--audio-primary);
    background: #252a35;
}

.inspector-range span,
.status-left strong,
.status-right strong {
    color: #d2d7e2;
}

.audio-statusbar {
    color: #9aa2b2;
}

.audio-footer {
    color: #777f8f;
}

.audio-graph::-webkit-scrollbar,
.audio-tracks::-webkit-scrollbar,
.audio-library::-webkit-scrollbar,
.audio-inspector::-webkit-scrollbar {
    background: #151821;
}

.audio-graph::-webkit-scrollbar-thumb,
.audio-tracks::-webkit-scrollbar-thumb,
.audio-library::-webkit-scrollbar-thumb,
.audio-inspector::-webkit-scrollbar-thumb {
    border: 2px solid #151821;
    border-radius: 8px;
    background: #3a4150;
}

.audio-graph::-webkit-scrollbar-thumb:hover,
.audio-tracks::-webkit-scrollbar-thumb:hover,
.audio-library::-webkit-scrollbar-thumb:hover,
.audio-inspector::-webkit-scrollbar-thumb:hover {
    background: #515a6c;
}

@media (max-width: 900px) {
    .audio-graph-panel {
        flex-basis: 230px;
    }

    .graph-connection-hint {
        display: none;
    }
}

@media (max-width: 650px) {
    .audio-graph-header {
        padding: 8px 10px;
    }

    .audio-graph-actions {
        gap: 5px;
    }

    .audio-graph-actions select {
        max-width: 100px;
    }

    .audio-graph-panel {
        flex-basis: 220px;
    }
}