:root {
    --bg: #e8dfc6;
    --panel: #fffaf0;
    --ink: #20252a;
    --muted: #6c706f;
    --yellow: #e6be2e;
    --orange: #c96832;
    --blue: #2c6f9d;
    --line: #c6bda7;
}


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

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-width: 320px;
    min-height: 100vh;

    font-family: Arial, Helvetica, sans-serif;
    color: var(--ink);

    background: var(--bg);
}

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

.shell {
    width: min(1120px, 94%);
    margin: 28px auto 64px;
}


/* --------------------------------------------------
   Header
-------------------------------------------------- */

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 190px;
    gap: 28px;

    align-items: center;

    padding: 26px 30px;

    background: var(--panel);

    border: 1px solid var(--line);
    border-top: 7px solid var(--blue);
    border-radius: 18px;

    overflow: hidden;
}

.hero-copy {
    min-width: 0;
}

.kicker {
    margin: 0;

    text-transform: uppercase;
    letter-spacing: 0.16em;

    font-weight: 800;
    font-size: 0.74rem;

    color: var(--muted);
}

.hero h1 {
    margin: 0.08em 0;

    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.8rem, 7vw, 5.2rem);
    line-height: 0.9;
    letter-spacing: -0.045em;

    color: var(--blue);
}

.hero p:last-child {
    max-width: 760px;
    margin-bottom: 0;

    font-size: 1.05rem;
}

.hero-logo {
    display: block;

    width: 190px;
    max-height: 185px;

    object-fit: contain;

    justify-self: end;
    align-self: center;
}


/* --------------------------------------------------
   Altes Symbol / Clock
-------------------------------------------------- */

.clock {
    display: grid;
    place-items: center;

    width: 78px;
    height: 78px;

    background: var(--yellow);
    color: var(--ink);

    border-radius: 50%;

    font: bold 2.8rem Georgia, serif;
}


/* --------------------------------------------------
   Panels
-------------------------------------------------- */

.panel,
.mode {
    background: var(--panel);

    border: 1px solid var(--line);
    border-radius: 16px;

    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
}

.panel {
    margin-top: 20px;
    padding: 23px 26px;
}

.panel h2,
.mode h2 {
    margin: 0 0 16px;

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


/* --------------------------------------------------
   Raster / Controls
-------------------------------------------------- */

.grid3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.controlrow {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

label {
    display: grid;
    gap: 8px;

    font-weight: 700;
    font-size: 0.91rem;
}

small {
    font-weight: 400;
    color: var(--muted);
}

output {
    font-weight: 500;
    color: var(--muted);
}


/* --------------------------------------------------
   Eingabefelder
-------------------------------------------------- */

input[type="file"] {
    width: 100%;
    padding: 10px;

    background: #fff;

    border: 1px solid var(--line);
    border-radius: 8px;
}

input[type="range"] {
    width: 100%;
    accent-color: var(--blue);
}


/* --------------------------------------------------
   Statusanzeige
-------------------------------------------------- */

.status,
#now {
    margin-top: 14px;

    font-size: 0.94rem;
    color: var(--muted);
}


/* --------------------------------------------------
   Modi
-------------------------------------------------- */

.modes {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;

    margin-top: 20px;
}

.mode {
    min-height: 215px;
    padding: 24px;

    border-top-width: 6px;
}

.mode.original {
    border-top-color: var(--blue);
}

.mode.sample {
    border-top-color: var(--orange);
}

.mode.franken {
    border-top-color: var(--yellow);
}

.mode.chaos {
    border-top-color: var(--ink);
}

.mode p {
    min-height: 44px;
    max-width: 520px;

    line-height: 1.45;
}

.mode label {
    margin: 14px 0;
}


/* --------------------------------------------------
   Buttons
-------------------------------------------------- */

button {
    margin: 5px 7px 5px 0;
    padding: 10px 15px;

    background: var(--yellow);
    color: var(--ink);

    border: 1px solid #8f7a31;
    border-radius: 8px;

    font-weight: 800;

    cursor: pointer;
}

button:hover {
    filter: brightness(1.04);
}

button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.ghost {
    background: #fff;
    border-color: var(--line);
}

.stop {
    background: var(--orange);
    color: #fff;

    border-color: #9a4925;
}


/* --------------------------------------------------
   Sample aktiv / inaktiv
-------------------------------------------------- */

.sample-toggle {
    display: flex;
    align-items: center;
    gap: 8px;

    font-weight: 600;
    color: var(--muted);

    cursor: pointer;
}

.sample-toggle input {
    width: 18px;
    height: 18px;

    accent-color: var(--blue);
}

.sample-toggle input:disabled {
    cursor: not-allowed;
}


/* --------------------------------------------------
   Transport / Timeline
-------------------------------------------------- */

.transport-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;

    margin-bottom: 12px;
}

.seekrow {
    margin: 8px 0 2px;
}

.seekrow label {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
}

.seekrow input {
    min-width: 0;
}

.transport canvas {
    display: block;

    width: 100%;
    height: 170px;

    margin-top: 16px;

    background: #17232c;

    border-radius: 10px;

    cursor: crosshair;
}


/* --------------------------------------------------
   Hinweise
-------------------------------------------------- */

.note p {
    max-width: 930px;

    line-height: 1.55;
}


/* --------------------------------------------------
   Lexikon
-------------------------------------------------- */

.glossary-intro {
    margin: -6px 0 18px;

    color: var(--muted);

    line-height: 1.5;
}

.glossary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.glossary-grid article {
    padding: 15px 16px;

    background: #fff;

    border: 1px solid var(--line);
    border-radius: 10px;
}

.glossary-grid h3 {
    margin: 0 0 7px;

    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.05rem;

    color: var(--blue);
}

.glossary-grid p {
    margin: 0;

    font-size: 0.92rem;
    line-height: 1.5;

    color: #444b50;
}


/* --------------------------------------------------
   Responsive bis 850 px
-------------------------------------------------- */

@media (max-width: 850px) {

    .glossary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}


/* --------------------------------------------------
   Responsive bis 760 px
-------------------------------------------------- */

@media (max-width: 760px) {

    .shell {
        width: 96%;
        margin-top: 12px;
    }

    .hero {
        grid-template-columns: minmax(0, 1fr) 110px;
        gap: 12px;

        padding: 20px 18px;
    }

    .hero-logo {
        width: 110px;
        max-height: 105px;
    }

    .clock {
        width: 58px;
        height: 58px;

        font-size: 2rem;
    }

    .grid3,
    .controlrow,
    .modes {
        grid-template-columns: 1fr;
    }

    .mode p {
        min-height: 0;
    }

    .panel,
    .mode {
        padding: 20px 18px;
    }

    .hero h1 {
        font-size: 3.2rem;
    }

}


/* --------------------------------------------------
   Responsive bis 600 px
-------------------------------------------------- */

@media (max-width: 600px) {

    .seekrow label {
        grid-template-columns: 1fr;
    }

    .seekrow output {
        text-align: right;
    }

}


/* --------------------------------------------------
   Responsive bis 520 px
-------------------------------------------------- */

@media (max-width: 520px) {

    .hero {
        grid-template-columns: 1fr;
    }

    .hero-logo {
        width: 125px;
        justify-self: start;
    }

    .glossary-grid {
        grid-template-columns: 1fr;
    }

}