:root {
    --wood-dark: #3a1f10;
    --wood: #75431f;
    --wood-light: #a36b36;

    --panel: #161411;
    --panel-2: #26221d;

    --ivory: #f4eedc;
    --key-white: #f8f5ea;
    --key-black: #121212;

    --text: #eee8d7;
    --gold: #c6a96b;
    --red: #9b2a21;
    --beige: #a8744f;
    --shadow: #0a0705;
}


/* --------------------------------------------------
   Grundlayout
-------------------------------------------------- */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 18px;

    background: #21150e;
    color: var(--gold);

    font-family: Georgia, "Times New Roman", serif;
}

a:link, a:visited {color: var(--text);}

button,
input,
select {
    font: inherit;
}


/* --------------------------------------------------
   Slider und Checkboxen
-------------------------------------------------- */

input[type="range"],
input[type="checkbox"],
input[type="radio"] {
    accent-color: var(--beige);
}


/* --------------------------------------------------
   Orgelgehäuse
-------------------------------------------------- */

.cabinet {
    max-width: 1480px;
    margin: auto;
    padding: 14px;

    border: 10px solid var(--wood-dark);
    border-radius: 18px;

    background: linear-gradient(
        90deg,
        var(--wood-dark),
        var(--wood-light) 12%,
        var(--wood) 48%,
        var(--wood-light) 88%,
        var(--wood-dark)
    );

    box-shadow: 0 20px 50px #000;
}


/* --------------------------------------------------
   Oberer Holzdeckel
-------------------------------------------------- */

.lid {
    padding: 16px 24px;

    background: linear-gradient(
        #9b6737,
        #70401f
    );

    border: 4px solid #2f190d;
    border-radius: 16px 16px 8px 8px;

    color: #201309;
    font-weight: bold;
    letter-spacing: 0.12em;

    text-shadow: 0 1px #d9b07b;
}

.lid span {
    float: right;

    font-size: 0.8em;
    letter-spacing: 0.06em;
}


/* --------------------------------------------------
   Bedienfeld
-------------------------------------------------- */

.control-deck {
    display: grid;
    grid-template-columns: 250px 1fr 1fr 230px;
    gap: 12px;

    margin-top: 10px;
    padding: 14px;

    background: var(--panel);

    border: 5px solid #27140b;
    border-radius: 8px;
}

.controls-left,
.fx-block,
.drawbar-block {
    padding: 10px;

    background: linear-gradient(
        #211e19,
        #12110f
    );

    border: 1px solid #4b4338;
    border-radius: 5px;
}


/* --------------------------------------------------
   Schalter
-------------------------------------------------- */

.switch {
    margin-right: 6px;
    padding: 8px 16px;

    background: var(--ivory);
    color: #1e1a14;

    border: 2px solid #8f8774;

    font-weight: bold;

    box-shadow: inset 0 -3px #c8c0ad;
}

.switch-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;

    margin-top: 12px;

    font-size: 0.86rem;
}


/* --------------------------------------------------
   Drawbars
-------------------------------------------------- */

.drawbar-block h2 {
    margin: 0 0 8px;

    color: var(--gold);

    font-size: 0.9rem;
    text-align: center;
    letter-spacing: 0.08em;
}

.drawbars {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 5px;
    align-items: end;

    height: 180px;
}

.drawbar-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;

    height: 100%;
}

.drawbar-wrap input {
    width: 24px;
    height: 135px;

    writing-mode: vertical-lr;
    direction: rtl;

    accent-color: #ddd;
}

.drawbar-wrap span {
    color: #d8cfb9;
    font-size: 0.7rem;
}


/* Rote Drawbars */

.drawbar-wrap:nth-child(1) input,
.drawbar-wrap:nth-child(2) input {
    accent-color: var(--red);
}


/* Weißer Drawbar */

.drawbar-wrap:nth-child(3) input {
    accent-color: #ddd;
}


/* Schwarze Drawbars */

.drawbar-wrap:nth-child(n + 4) input {
    accent-color: #2d2b28;
}


/* --------------------------------------------------
   Registrierung
-------------------------------------------------- */

.registration {
    margin-top: 6px;

    color: #f0d596;

    font-family: Consolas, monospace;
    font-size: 1.05rem;
    text-align: center;
    letter-spacing: 0.14em;
}


/* --------------------------------------------------
   Effekte
-------------------------------------------------- */

.fx-block label {
    display: block;

    margin: 7px 0;

    font-size: 0.85rem;
}

.fx-block input[type="range"] {
    width: 100%;
}


/* --------------------------------------------------
   Manuale
-------------------------------------------------- */

.manual-panel {
    position: relative;

    margin-top: 10px;
    padding: 10px 10px 14px;

    background: #111;

    border: 4px solid #2d170d;

    box-shadow: inset 0 0 18px #000;
}

.manual-panel.lower {
    margin-top: 2px;
}

.nameplate {
    position: absolute;
    top: 8px;
    left: 8px;

    color: var(--gold);

    font-size: 0.7rem;
    letter-spacing: 0.2em;
}


/* --------------------------------------------------
   Klaviatur
-------------------------------------------------- */

.keyboard {
    position: relative;

    display: flex;

    height: 190px;
    margin-left: 55px;

    overflow: hidden;

    user-select: none;
    touch-action: none;
}

.key {
    position: relative;

    border: 1px solid #2f2a22;

    cursor: pointer;
}

.white {
    flex: 1;

    height: 100%;

    background: linear-gradient(
        90deg,
        #d8d4c7,
        #fff 36%,
        #eee9dc
    );

    border-radius: 0 0 4px 4px;
}

.black {
    position: absolute;
    z-index: 3;
    top: 0;

    width: 2.15%;
    height: 62%;

    background: linear-gradient(
        90deg,
        #080808,
        #282828,
        #050505
    );

    border: 1px solid #000;
    border-radius: 0 0 3px 3px;

    box-shadow: 0 5px 5px #0008;
}

.key.active {
    filter: brightness(0.75);
}


/* --------------------------------------------------
   Pedal
-------------------------------------------------- */

.pedal-panel {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 12px;

    margin-top: 10px;
    padding: 12px;

    background: #26160c;

    border: 4px solid #1c0f08;
}

.pedal-panel label {
    display: block;

    margin-top: 8px;
}

.pedals {
    display: flex;
    align-items: flex-start;
    gap: 2px;

    height: 95px;
}

.pedal {
    flex: 1;

    height: 80px;

    background: linear-gradient(
        #68411f,
        #9b6b35
    );

    border: 1px solid #241308;
    border-radius: 0 0 5px 5px;

    cursor: pointer;
}

.pedal:nth-child(2n) {
    height: 67px;

    background: linear-gradient(
        #24170e,
        #4b301d
    );
}

.pedal.active {
    filter: brightness(1.35);
}


/* --------------------------------------------------
   Unteres Bedienfeld
-------------------------------------------------- */

.footer-panel {
    margin-top: 10px;
    padding: 12px;

    background: #160f0b;

    border: 4px solid #2b160c;

    font-family: Arial, sans-serif;
    font-size: 0.9rem;
}

.preset-block {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.footer-panel button,
.filelabel {
    padding: 7px 10px;

    background: #ddd3ba;
    color: #20180f;

    border: 1px solid #8b806b;
    border-radius: 3px;

    cursor: pointer;
}

.filelabel input {
    display: none;
}


/* --------------------------------------------------
   Tablet
-------------------------------------------------- */

@media (max-width: 1050px) {

    .control-deck {
        grid-template-columns: 1fr 1fr;
    }

    .controls-left,
    .fx-block {
        grid-column: auto;
    }

    .keyboard {
        height: 150px;
        margin-left: 0;
    }

    .nameplate {
        display: none;
    }

    .pedal-panel {
        grid-template-columns: 1fr;
    }

    .lid span {
        float: none;

        display: block;

        margin-top: 5px;
    }
}


/* --------------------------------------------------
   Smartphone
-------------------------------------------------- */

@media (max-width: 650px) {

    body {
        padding: 4px;
    }

    .cabinet {
        padding: 6px;

        border-width: 5px;
    }

    .control-deck {
        grid-template-columns: 1fr;
    }

    .drawbars {
        height: 155px;
    }

    .drawbar-wrap input {
        height: 110px;
    }

    .keyboard {
        min-width: 700px;
        height: 120px;
    }

    .manual-panel {
        overflow-x: auto;
    }

    .pedals {
        min-width: 650px;
    }

    .pedal-panel {
        overflow-x: auto;
    }
}
