/* Main Stylesheet */
/* css/styles.css */
@font-face {
    font-family: 'LCD5x7_Regular';
    src: url('./fonts/LCD5x7_Regular.woff2') format('woff2'),
        url('./fonts/LCD5x7_Regular.otf') format('opentype');
}

/* CSS Variables - Design Tokens */
:root {
    /* Colors */
    --color-primary: #FFD700;
    --color-primary-hover: #FFC000;
    --color-secondary: #87CEEB;
    --color-secondary-light: #ADD8E6;
    --color-background-brown: #0b1b28;
    --color-background-gray: #555555;
    --color-text: #ffffff;
    --color-text-muted: #cccccc;
    --color-border: #222222;
}

/* Base Styles */
body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background-color: var(--color-background-brown);
    display: flex;
    justify-content: center;
    align-items: center;
}

.overlay {

    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;


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

    color: white;
    background: rgba(0, 0, 0, 0.8);

    user-select: contain;
    cursor: pointer;
    z-index: 200000;

}

.overlay.hidden {
    display: none;
}

/* App Panel */
#app {
    width: 100%;
    max-width: 1200px;
    margin: 20px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    background-color: var(--color-background-gray);
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.08'/%3E%3C/svg%3E");
}

/* Panel Header */
.panel-header {
    background-color: #1f1f1f;
    padding: 14px 18px;
    border-bottom: 1px solid #222;
    justify-content: space-between;
    display: flex;
}

.panel-logo {
    display: flex;
    align-items: center;
    gap: 20px;
    cursor: pointer;
}

.panel-logo svg {
    width: 180px;
    height: auto;
    display: block;
}

.header-appearance {
    display: flex;
    align-items: center;
    margin-left: 20px;
}

.header-control {
    display: flex;
}

.header-global {
    flex: 1;
    display: flex;


    gap:
        20px;
    margin-right: 20px;
}

.header-global-section {
    display: flex;
    flex-direction: column;
    height: 100%;
    flex:1;
    margin-top:12px;
}

.header-global-section-header {
    flex: 1;
    display: flex;
    align-items: center;justify-content: center;

 color: var(--color-text);
    font-family: Helvetica, Arial, sans-serif;
    font-size: 9px;

    width: 100%;
height: 4px;

padding-bottom: 4px;
    
}

.header-global-section-header::before,
.header-global-section-header::after {
    content: " ";
    border-top: solid 1px var(--color-text);
height: 4px;     flex: 1;

width: 10px;

}



.header-global-section-header::before {
    margin-right: 6px;
    border-left: solid 1px var(--color-text);
}
.header-global-section-header::after {
    margin-left: 6px;
    border-right: solid 1px var(--color-text);
}


.header-global-section-contents {
height: 100%;
    display: flex;
    align-items: center;  gap:
        6px;
        justify-content: center;
}

.header-preset-nav {
    display: flex;
    gap:
        16px;
}

.header-preset-nav-tools {
    display: flex;
    align-items: center;
    gap:
        16px;
}

/* Panel Body */

.panel-body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 1px;
    background-color: transparent;
}

.panel-section {
    display: grid;

}

.top-section {
    /* grid-template-columns: 2fr 1fr 1fr 1fr;
    grid-template-rows: 140px;
    gap: 1px; */

    display: flex;
}

.bottom-section {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: 380px 380px;
    gap: 1px;
}

.panel-cell {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 12px 16px;
    border: 1px solid #9db2c5;
    background-color: transparent;
    flex-grow: 1;

}

.panel-cell-header {
    position: relative;
    display: inline-block;
    margin: 0 0 18px 0;
    padding: 3px 28px;
    color: #383c3e;
    font-family: Helvetica, Arial, sans-serif;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 0.15em;
    line-height: 1.2;
    text-transform: uppercase;
    text-align: center;
    text-shadow: 0 0.5px 0.5px rgba(255, 255, 255, 0.15);
    background-color: #9db2c5;
    clip-path: polygon(12px 0%, 100% 0%, calc(100% - 12px) 100%, 0% 100%);
}

.top-section .panel-cell-header {
    margin: 0 -8px 18px -8px;
}

.panel-fader-bank {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 7px;
    align-items: end;
    justify-items: center;
    min-width: 0;
    padding-top: 0;
    position: relative;
}


.panel-fader-bank-header-rate,
.panel-fader-bank-header-level {
    color: var(--color-text);
    font-family: Helvetica, Arial, sans-serif;
    font-size: 9px;
    display: flex;
    align-items: center;
    text-align: center;
    width: 100%;
    position: absolute
}

.panel-fader-bank-header-rate {
    bottom: -18px;
    left: 0;
    right: 0;
}

.panel-fader-bank-header-level {
    top: -18px;
    left: 0;
    right: 0;
}

.panel-fader-bank-header-rate::before,
.panel-fader-bank-header-rate::after,
.panel-fader-bank-header-level::before,
.panel-fader-bank-header-level::after {
    content: "";
    flex-grow: 1;
    height: 4px;




}

.panel-fader-bank-header-rate::before,
.panel-fader-bank-header-rate::after {
    border-bottom: solid 1px var(--color-text);

}

.panel-fader-bank-header-level::before,
.panel-fader-bank-header-level::after {
    border-top: solid 1px var(--color-text);
}


.panel-fader-bank-header-rate::before,
.panel-fader-bank-header-level::before {
    margin-right: 15px;
    border-left: solid 1px var(--color-text);
}

.panel-fader-bank-header-rate::after,
.panel-fader-bank-header-level::after {
    margin-left: 15px;
    border-right: solid 1px var(--color-text);
}


.panel-horizontal-bank {
    display: grid;
    grid-template-columns: 32px 32px minmax(0, 1fr) minmax(0, 135px);
    gap: 7px;
    align-items: start;
    justify-items: start;
    margin: 0 0 18px;
    width: 100%;
}

.panel-horizontal-bank .fader-container.is-horizontal {
    align-self: center;
    justify-content: center;
}

.eg-canvas-wrap {
    width: calc(100% - 10px);
    min-width: 0;
}

.eg-canvas {
    display: block;
    width: 100%;
    height: 60px;
    background-color: rgba(176, 210, 181, 0.48);
    border: 1px solid rgba(0, 0, 0, 0.24);
    border-radius: 2px;
    box-shadow:
        inset 0 1px 2px rgba(0, 0, 0, 0.28),
        0 1px 0 rgba(255, 255, 255, 0.08);
}

.waveform-selector {
    display: grid;
    grid-template-columns: repeat(2, 60px);
    gap: 6px;
    width: 126px;
}

.waveform-window,
.waveform-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 0, 0, 0.45);
    border-radius: 2px;
    background: #08090a;
    box-shadow:
        inset 0 1px 2px rgba(0, 0, 0, 0.28),
        0 1px 0 rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

.waveform-selector .waveform-window {
    width: 60px;
    height: 60px;
}

.waveform-window:hover,
.waveform-card:hover {
    background: #111315;
}

.waveform-card.is-hidden-wave {
    border-color: rgba(255, 215, 0, 0.56);
    box-shadow:
        inset 0 0 0 1px rgba(255, 215, 0, 0.16),
        inset 0 1px 2px rgba(0, 0, 0, 0.28),
        0 1px 0 rgba(255, 255, 255, 0.08);
}

.waveform-card.is-hidden-wave::after {
    content: "S";
    position: absolute;
    right: 4px;
    bottom: 3px;
    color: rgba(255, 215, 0, 0.82);
    font-family: Helvetica, Arial, sans-serif;
    font-size: 8px;
    font-weight: 900;
    line-height: 1;
}

.wave-number {
    position: absolute;
    top: 3px;
    left: 4px;
    color: rgba(255, 215, 0, 0.82);
    font-family: Helvetica, Arial, sans-serif;
    font-size: 8px;
    font-weight: 900;
    line-height: 1;
}

.wave-svg {
    width: 46px;
    height: 36px;
    overflow: visible;
}

.wave-path {
    fill: none;
    stroke: var(--color-primary);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

.waveform-catalog {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1100;
    display: none;
    grid-template-columns: repeat(4, 58px);
    gap: 6px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 3px;
    background: rgba(12, 13, 14, 0.94);
    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.48),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
    transform: translate(-999px, -999px);
}

.waveform-catalog.is-visible {
    display: grid;
}

.waveform-catalog .waveform-card {
    width: 58px;
}

.preset-menu {
    position: fixed;
    z-index: 1200;
    display: none;
    min-width: 470px;
    max-width: min(90vw, 620px);
    grid-template-columns: 160px minmax(260px, 1fr);
    gap: 8px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 3px;
    background: rgba(12, 13, 14, 0.96);
    box-shadow:
        0 10px 24px rgba(0, 0, 0, 0.52),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.preset-menu.is-visible {
    display: grid;
}

.preset-bank-list,
.preset-panel-list {
    display: grid;
    gap: 5px;
}

.preset-bank-btn,
.preset-menu-item,
.preset-menu-empty {
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 3px;
    background: linear-gradient(180deg, #2d3034, #17191c);
    color: var(--color-text);
    font-family: Helvetica, Arial, sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1;
    text-align: left;
    text-transform: uppercase;
    cursor: pointer;
}

.preset-bank-btn {
    min-height: 25px;
    padding: 0 9px;
}

.preset-bank-btn.is-active,
.preset-bank-btn:hover,
.preset-menu-item:hover {
    border-color: rgba(255, 241, 0, 0.58);
    color: #fff100;
}

.preset-bank-panel {
    display: none;
    grid-template-columns: repeat(2, minmax(120px, 1fr));
    gap: 5px;
}

.preset-bank-panel.is-active {
    display: grid;
}

.preset-menu-item {
    min-height: 25px;
    padding: 0 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.preset-menu-empty {
    min-height: 25px;
    padding: 7px 8px 0;
    color: rgba(232, 232, 224, 0.56);
    cursor: default;
}

.waveform-selector-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.waveform-selector-label {
    color: var(--color-text);
    font-family: Helvetica, Arial, sans-serif;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
    text-align: center;
}

.top-panel-subsection {
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 0 auto;
    height: 100%;
}

.vibrato-waveforms {
    display: grid;
    grid-template-columns: 60px;
    width: 60px;
    min-width: 0;
}

.vibrato-wave-label {
    color: var(--color-text);
    font-family: Helvetica, Arial, sans-serif;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
    text-align: center;
}

.vibrato-waveforms .waveform-window {
    width: 60px;
    height: 60px;
    margin-bottom: 5px
}

.top-sub-faders {
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: center;
}

.simple-fader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.simple-fader .fader-container {
    --fader-container-width: 32px;
}

.simple-fader .fader-container.is-horizontal {
    --fader-container-width: 88px;
    --fader-well-width: 88px;
}

.simple-fader-label {
    color: var(--color-text);
    font-family: Helvetica, Arial, sans-serif;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
    text-align: center;
    text-transform: uppercase;
}

.routing-panel {



    display: flex;

    gap: 16px;
}

.routing-section {

    display: flex;
    flex-direction: column;

    gap: 6px;
}

/* Dropdown */
.dropdown-container {
    position: relative;

}

.dropdown-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 60px;
    padding: 6px 10px;
    border: 1px solid rgba(0, 0, 0, 0.45);
    border-radius: 2px;
    background: #08090a;
    box-shadow:
        inset 0 1px 2px rgba(0, 0, 0, 0.28),
        0 1px 0 rgba(255, 255, 255, 0.08);
    cursor: pointer;
    font-family: Helvetica, Arial, sans-serif;
    font-size: 9px;
    font-weight: 700;
    color: var(--color-text);
    text-transform: uppercase;
    letter-spacing: 0;
    transition: background 0.1s;
}

.dropdown-button:hover {
    background: #111315;
}

.dropdown-button.is-active {
    background: #1a1c1e;
    border-color: rgba(255, 215, 0, 0.5);
}

.dropdown-value {
    flex: 1;
    text-align: left;
}

.dropdown-arrow {
    font-size: 8px;
    color: rgba(255, 255, 255, 0.6);
    transition: transform 0.2s;
}

.dropdown-button.is-active .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    width: 60px;
    display: none;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.45);
    border-radius: 2px;
    background: #08090a;
    box-shadow:
        inset 0 1px 2px rgba(0, 0, 0, 0.28),
        0 1px 0 rgba(255, 255, 255, 0.08);
    z-index: 100;
    overflow: hidden;
}

.dropdown-menu.is-visible {
    display: flex;
}

.dropdown-item {
    padding: 6px 10px;
    font-family: Helvetica, Arial, sans-serif;
    font-size: 9px;
    font-weight: 700;
    color: var(--color-text);
    text-transform: uppercase;
    letter-spacing: 0;
    cursor: pointer;
    transition: background 0.1s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background: rgba(255, 215, 0, 0.15);
}

.dropdown-item.is-selected {
    background: rgba(255, 215, 0, 0.25);
    color: rgba(255, 215, 0, 0.9);
}

.routing-section-title {
    color: var(--color-text);
    font-family: Helvetica, Arial, sans-serif;
    font-size: 9px;
    font-weight: 700;
    line-height: 0.5;
    margin-bottom: 0;
    padding-bottom: 0;
    letter-spacing: 0;
    text-transform: uppercase;
    margin-top: -18px;
    padding-top: 8px;
}

.routing-switch-grid {
    display: grid;
    gap: 6px;
}

.routing-switch-grid.is-four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.routing-switch-grid.is-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.routing-detune-grid {
    display: grid;
    grid-template-columns: 36px 36px 1fr 1fr;
    gap: 6px;
}

.detune-bank {
    display: flex;
}

.routing-field {
    display: grid;
    gap: 4px;
}

.routing-field-label {
    color: var(--color-text);
    font-family: Helvetica, Arial, sans-serif;
    font-size: 8px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
    text-transform: uppercase;
}

.routing-input {
    width: 100%;
    height: 24px;
    border: 1px solid rgba(0, 0, 0, 0.45);
    border-radius: 2px;
    background: #111315;
    color: var(--color-text);
    font-family: Helvetica, Arial, sans-serif;
    font-size: 9px;
    font-weight: 700;
    text-align: center;
}

.routing-input:focus {
    outline: 1px solid rgba(255, 255, 255, 0.5);
}


.lcd-viewer {
    position: relative;
    width: 320px;
    height: 74px;
    background-color: rgba(176, 210, 181, 0.48);



    border-radius: 4px;
    padding: 8px 14px;
    box-sizing: border-box;

    box-shadow:

        0 0 0 6px #141517,
        inset 3px 3px 6px rgba(0, 0, 0, 0.7),
        inset -2px -2px 3px rgba(255, 255, 255, 0.15),
        0 1px 1px rgba(255, 255, 255, 0.1);



    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    cursor: pointer;
}

.lcd-viewer:focus-visible {
    outline: 2px solid rgba(255, 241, 0, 0.72);
    outline-offset: 9px;
}


.lcd-viewer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        linear-gradient(rgba(0, 0, 0, 0.02) 50%, transparent 50%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0) 50%);
    background-size: 100% 3px, 100% 100%;
    pointer-events: none;
}


.lcd-line-container {
    position: relative;
    height: 22px;
    line-height: 22px;
}


.lcd-text {
    font-family: 'LCD5x7_Regular', 'Courier New', Courier, monospace;
    font-size: 19px;
    letter-spacing: 2.8px;

    text-transform: uppercase;
    white-space: pre;
}


.lcd-line-bg {
    position: absolute;
    top: 0;
    left: 0;
    color: rgba(0, 0, 0, 0.05);

    z-index: 1;
}


.lcd-line-fg {
    position: relative;
    color: rgba(0, 0, 0, 0.85);


    text-shadow: 1px 1.5px 1px rgba(0, 0, 0, 0.15);
    z-index: 2;
}


.ui-switch .btn-socket {
    width: 100%;
    height: 28px;
}

.ui-switch .btn-socket.on-header {
    height: 37px;
}

.ui-switch .synth-btn {
    font-size: 18px;
    letter-spacing: 0.02em;
}

.ui-switch .label {
    margin-top: 4px;
    font-size: 8px;
}

.master-panel {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
    align-items: start;
    justify-items: center;
}

.detune-panel {
    display: grid;
    grid-template-columns: auto auto auto auto repeat(2, 1fr);
    gap: 6px;
    align-items: center;
}

.simple-fader.is-red .fader-knob {
    --fader-cap-color: #d32f2f;
    --fader-cap-stripe: #b71c1c;
}

.simple-fader.is-red .fader-knob::before {
    background: linear-gradient(180deg,
            #f44336 0%,
            #d32f2f 30%,
            #b71c1c 100%);
}

.octave-label {
    color: var(--color-text);
    font-family: Helvetica, Arial, sans-serif;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
    text-transform: uppercase;
}

.master-panel .simple-fader {
    width: 100%;
}

.detune-faders .simple-fader {
    width: 100%;
}

.eg-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.eg-stage-label {
    color: var(--color-text);
    font-family: Helvetica, Arial, sans-serif;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
    text-align: center;
}



.eg-stage.is-disabled {
    opacity: 0.42;
}

.eg-stage.is-disabled .fader-knob {
    cursor: not-allowed;
}

.eg-stage.is-disabled .eg-stage-label {
    color: rgba(255, 255, 255, 0.42);
}

.eg-stage.is-disabled .fader-well {
    background-color: #191b1d;
    box-shadow:
        inset 2px 2px 4px rgba(0, 0, 0, 0.78),
        inset -1px -1px 1px rgba(255, 255, 255, 0.03);
}

.eg-stage.is-disabled .fader-knob {
    background: linear-gradient(to bottom, #3a3d40 0%, #272a2d 100%);
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.fader-well.is-disabled {
    pointer-events: none;
    opacity: 0.45;    cursor: not-allowed;
}
.eg-stage.is-theme-stage .fader-well {}

.eg-stage.is-theme-stage .fader-slot {}

.eg-stage.is-theme-stage .fader-knob {
    background: linear-gradient(to bottom, #f4f6f7 0%, #d9dddf 45%, #aeb4b8 100%);
    box-shadow:
        0 2px 5px rgba(0, 0, 0, 0.5),
        0 0 9px rgba(235, 238, 240, 0.22),
        inset 0 1px 1px rgba(255, 255, 255, 0.72),
        inset 0 -1px 1px rgba(57, 61, 64, 0.38);
}

.eg-stage.is-theme-stage .fader-knob:active {
    background: linear-gradient(to bottom, #e7eaec 0%, #bcc2c6 100%);
}

.eg-stage.is-theme-stage .fader-knob::before {
    background: repeating-linear-gradient(to bottom,
            #8f969a 0px,
            #8f969a 1px,
            #c5cbce 2px,
            #f4f6f7 3px,
            #9fa6aa 4px);
}

/* Synth Buttons Container */
.synth-buttons {
    display: grid;
    grid-template-columns: repeat(3, 80px);
    grid-template-rows: repeat(3, 150px);
    column-gap: 30px;
    row-gap: 24px;
    justify-content: center;
    justify-items: center;
    align-items: start;
}

/* Button Container */
.btn-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 50px;
}

.label {
    width: 100%;
    margin-top: 8px;
    color: var(--color-text);
    font-family: Helvetica, Arial, sans-serif;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    letter-spacing: 0;
    text-transform: uppercase;
}

/* Indicator Lamp */
.lamp {
    width: 14px;
    height: 5px;
    background-color: #221a1a;
    border-radius: 1px;
    margin-bottom: 8px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.6);
    /* transition: background-color 0.1s, box-shadow 0.1s; */
}

.lamp.is-active {
    background-color: #ff99b3;
    box-shadow:
        0 0 4px #ff3366,
        0 0 10px #ff3366,
        inset 0 1px 1px rgba(255, 255, 255, 0.8);
}

/* Button Socket */
.btn-socket {
    width: 60px;
    height: 38px;
    background-color: #1a1c1e;
    padding: 2px;
    border-radius: 2px;
    box-shadow:
        inset 0 2px 5px rgba(0, 0, 0, 0.8),
        0 1px 1px rgba(255, 255, 255, 0.1);
}

/* Synth Button */
.synth-btn {
    width: 100%;
    height: 100%;
    border: none;
    cursor: pointer;
    border-radius: 1px;
    outline: none;
    background: linear-gradient(to bottom, #d2d4d1 0%, #b8bab7 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        0 3px 4px rgba(0, 0, 0, 0.4);
    transition: transform 0.05s, box-shadow 0.05s;
    line-height: 1;

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

}

.synth-btn:active {
    transform: translateY(1px);
    background: #b8bab7;
    box-shadow:
        inset 0 2px 3px rgba(0, 0, 0, 0.4),
        0 1px 1px rgba(0, 0, 0, 0.2);
}

.synth-btn.is-black {
    background: linear-gradient(to bottom, #2d2e30 0%, #1f2022 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        0 3px 4px rgba(0, 0, 0, 0.5);
    color: #ffffff;

}

.synth-btn.is-black:active {
    background: #1f2022;
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.6),
        0 1px 1px rgba(0, 0, 0, 0.2);
}

/* Fader Component */
.fader-container {
    --fader-container-width: 60px;
    --fader-well-width: 24px;
    --fader-well-height: 120px;
    --fader-slot-width: 4px;
    --fader-margin: 8px;
    --fader-knob-width: 20px;
    --fader-knob-height: 32px;
    --fader-knob-left: 2px;
    --fader-knob-ridge-height: 14px;
    --fader-ticks-height: 104px;
    --fader-ticks-width: 12px;
    --fader-tick-width: 6px;
    --fader-tick-gap: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: var(--fader-container-width);
}

.fader-container.is-half {
    --fader-well-height: 60px;
    --fader-margin: 4px;
    --fader-knob-height: 16px;
    --fader-knob-ridge-height: 7px;
    --fader-ticks-height: 52px;
}


.fader-container.is-mid {
    --fader-well-height: 90px;
    --fader-margin: 4px;
    --fader-knob-height: 16px;
    --fader-knob-ridge-height: 7px;
    --fader-ticks-height: 52px;
}

.fader-container.is-top-control {
    --fader-container-width: 32px;
}

.fader-container.is-horizontal {
    --fader-container-width: 120px;
    --fader-well-width: 120px;
    --fader-well-height: 24px;
    --fader-slot-width: 4px;
    --fader-margin: 8px;
    --fader-knob-width: 32px;
    --fader-knob-height: 20px;
    --fader-knob-left: 8px;
    --fader-knob-ridge-height: 14px;
}

.fader-container.is-horizontal.is-half {
    --fader-container-width: 60px;
    --fader-well-width: 60px;
    --fader-well-height: 24px;
    --fader-margin: 4px;
    --fader-knob-width: 16px;
    --fader-knob-height: 20px;
    --fader-knob-ridge-height: 14px;
}

.top-control-label {
    margin-top: 6px;
    color: var(--color-text);
    font-family: Helvetica, Arial, sans-serif;
    font-size: 9px;
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: 0;
    text-align: center;
    text-transform: uppercase;
    white-space: pre-line;
}

.fader-layout {
    display: flex;
    align-items: center;
    position: relative;
}

/* Fader Well (Outer Pocket) */
.fader-well {
    position: relative;
    width: var(--fader-well-width);
    height: var(--fader-well-height);
    background-color: #121415;
    border-radius: 2px;
    box-shadow:
        inset 2px 2px 4px rgba(0, 0, 0, 0.9),
        inset -1px -1px 1px rgba(255, 255, 255, 0.05),
        0 1px 1px rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: center;
    overflow: hidden;
}

/* Inner Slot */
.fader-slot {
    position: absolute;
    top: var(--fader-margin);
    bottom: var(--fader-margin);
    width: var(--fader-slot-width);
    background-color: #08090a;
    border-radius: 1px;
    box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.8);
}

.fader-container.is-horizontal .fader-slot {
    top: 50%;
    right: var(--fader-margin);
    bottom: auto;
    left: var(--fader-margin);
    width: auto;
    height: var(--fader-slot-width);
    transform: translateY(-50%);
}

/* Fader Knob */
.fader-knob {
    position: absolute;
    bottom: var(--fader-margin);
    left: var(--fader-knob-left);
    width: var(--fader-knob-width);
    height: var(--fader-knob-height);
    background-color: #2a2c2e;
    cursor: grab;
    border-radius: 1px;
    touch-action: none;
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.5),
        inset 0 1px 1px rgba(255, 255, 255, 0.2),
        inset 0 -1px 1px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.fader-container.is-horizontal .fader-knob {
    top: 2px;
    bottom: auto;
    left: var(--fader-knob-left);
}

.fader-container.is-horizontal .fader-knob::before {
    width: var(--fader-knob-ridge-height);
    height: 100%;
    background: repeating-linear-gradient(to right,
            #111 0px,
            #111 1px,
            #2a2c2e 2px,
            #3e4042 3px,
            #111 4px);
}

.fader-knob:active {
    cursor: grabbing;
    background-color: #353739;
}

.fader-knob::before {
    content: '';
    width: 100%;
    height: var(--fader-knob-ridge-height);
    background: repeating-linear-gradient(to bottom,
            #111 0px,
            #111 1px,
            #2a2c2e 2px,
            #3e4042 3px,
            #111 4px);
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.8);
}

/* Fader Ticks */
.fader-ticks {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: var(--fader-ticks-height);
    width: var(--fader-ticks-width);
    position: absolute;
}

.fader-ticks.left {
    right: 100%;
    margin-right: var(--fader-tick-gap);
    align-items: flex-end;
}

.fader-ticks.right {
    left: 100%;
    margin-left: var(--fader-tick-gap);
    align-items: flex-start;
}

.fader-tick {
    width: var(--fader-tick-width);
    height: 1px;
    background-color: rgba(220, 225, 230, 0.3);
}

.value-popover {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    min-width: 58px;
    padding: 5px 8px 4px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 3px;
    background: rgba(12, 13, 14, 0.94);
    box-shadow:
        0 6px 16px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
    color: var(--color-text);
    font-family: Helvetica, Arial, sans-serif;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: 0;
    opacity: 0;
    pointer-events: none;
    text-align: center;
    text-transform: uppercase;
    transform: translate(-999px, -999px);
    transition: opacity 0.08s ease;
    white-space: pre-line;
}

.value-popover.is-visible {
    opacity: 1;

    white-space: pre-line;
}

.value-popover.is-visible {
    opacity: 1;
}

/* Dark Mode */
body.is-dark,
#app.is-dark {
    /* --color-primary: #B8860B; */
    /* --color-primary-hover: #9A7209; */
    --color-secondary: #5C9AA6;
    --color-secondary-light: #7AB3C0;
    --color-background-brown: #2A1F1A;
    --color-background-gray: #1A1A1A;
    --color-text: #E0E0E0;
    --color-text-muted: #A0A0A0;
    --color-border: #0A0A0A;
}

body.is-dark {
    background-color: #1A1A1A;
}

body.is-dark .panel-header {
    background-color: #0A0A0A;
    border-bottom-color: #1A1A1A;
}

body.is-dark .panel-cell-header {
    color: #141414;
    background-color: #697a89;
}

body.is-dark .panel-cell {
    background-color: #1A1A1A;
    border-color: #2a4a5a;
}

body.is-dark .fader-well {
    background-color: #0A0A0A;
}

body.is-dark .lcd-viewer {

    background-color: rgba(209, 242, 214, 0.889);
    box-shadow: 0 0 6px 3px rgba(176, 210, 181, 0.5);
}

body.is-dark .eg-canvas {
    background-color: rgba(209, 242, 214, 0.889);
    box-shadow: 0 0 6px 3px rgba(176, 210, 181, 0.5);
}

/* Appearance Button Active State */
.appearance-btn.is-active,
body.is-dark .appearance-btn {
    background: linear-gradient(180deg,
            rgba(40, 40, 40, 1) 0%,
            rgba(20, 20, 20, 1) 50%,
            rgba(10, 10, 10, 1) 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset 0 -1px 0 rgba(0, 0, 0, 0.8),
        0 2px 4px rgba(0, 0, 0, 0.6);
}

body.is-dark .lamp::after {
    background-color: rgba(255, 200, 100, 0.9);
    box-shadow: 0 0 8px rgba(255, 200, 100, 0.7);
}

body.is-dark .synth-btn {
    background: linear-gradient(to bottom, #5a5c59 0%, #484a47 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        0 3px 4px rgba(0, 0, 0, 0.5);
}

body.is-dark .synth-btn:active {
    background: #484a47;
}


body.is-dark .synth-btn.is-black {
    background: linear-gradient(to bottom, #2d2e30 0%, #1f2022 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        0 3px 4px rgba(0, 0, 0, 0.5);
    color: #ffffff;

}

body.is-dark .synth-btn.is-black:active {
    background: #1f2022;
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.6),
        0 1px 1px rgba(0, 0, 0, 0.2);
}

body.is-dark .fader-knob {
    background-color: #1a1c1e;
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 -1px 0 rgba(0, 0, 0, 0.8);
}

body.is-dark .fader-knob:active {
    background-color: #252729;
}

body.is-dark .fader-knob::before {
    background: repeating-linear-gradient(to bottom,
            #0a0a0a 0px,
            #0a0a0a 1px,
            #1a1c1e 2px,
            #2a2c2e 3px,
            #0a0a0a 4px);
}

body.is-dark .fader-container.is-horizontal .fader-knob::before {
    background: repeating-linear-gradient(to right,
            #0a0a0a 0px,
            #0a0a0a 1px,
            #1a1c1e 2px,
            #2a2c2e 3px,
            #0a0a0a 4px);
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.62);
}

.modal-backdrop.is-visible {
    display: flex;
}

.Modal-content {
    position: relative;
    width: min(420px, 92vw);
    padding: 28px 30px 24px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 4px;
    background: rgba(18, 19, 21, 0.98);
    box-shadow:
        0 18px 38px rgba(0, 0, 0, 0.58),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
    color: var(--color-text);
    font-family: Helvetica, Arial, sans-serif;
}

.modal-close {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 28px;
    height: 28px;
    border: 0;
    background: transparent;
    color: rgba(232, 232, 224, 0.72);
    font-size: 22px;
    line-height: 28px;
    cursor: pointer;
}

.modal-close:hover {
    color: #fff100;
}

.about-modal-content {
    display: grid;
    gap: 10px;
    text-align: center;
}

.about-modal-name {
    color: #fff100;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.about-modal-version,
.about-modal-credit,
.about-modal-copy,
.about-modal-ack {
    font-size: 12px;
    line-height: 1.45;
}

.about-modal-link {
    color: #fff100;
    font-size: 12px;
    text-decoration: none;
}

.about-modal-link:hover {
    text-decoration: underline;
}
