:root {
    --cream: #F7F4EF;
    --card: #FDFCFA;
    --text: #2C2A24;
    --mid: #4A463F;
    --rose: #9C6B7A;
    --navy: #1E2A3F;
    --blue: #3D526B;
    --soft: #C9A9A6;
    --warm: #F5F1E9;
    --line: #e8e2d8;
    --font: "EB Garamond", Georgia, serif;
    --display: "Playfair Display", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    min-height: 100%;
    background: var(--cream);
    color: var(--text);
    font-family: var(--font);
    -webkit-font-smoothing: antialiased;
}

body.deck-page {
    overflow: hidden;
    height: 100dvh;
}

a { color: var(--rose); text-decoration: none; }
a:hover { color: var(--navy); }

button:not(:disabled), [role="button"]:not(:disabled) { cursor: pointer; }

/* ——— Bühne ——— */
.shell {
    height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 12px 56px;
    gap: 12px;
}

.stage {
    width: min(96vw, calc((100dvh - 80px) * 16 / 9));
    aspect-ratio: 16 / 9;
    position: relative;
    container-type: size;
    container-name: slide;
}

.slide {
    position: absolute;
    inset: 0;
    background: var(--card);
    border-radius: 18px;
    box-shadow: 0 18px 50px rgba(30, 42, 63, 0.08);
    border: 1px solid var(--line);
    padding: 6.5cqi 8cqi 12cqi;
    display: none;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.slide--dense {
    justify-content: flex-start;
    padding-top: 5.2cqi;
}
.slide--dense h2 { margin-bottom: 1.3cqi; }
.slide--dense .lead { font-size: 1.75cqi; margin-bottom: 1.1cqi; }
.slide--dense .list { gap: 0.65cqi; font-size: 1.7cqi; }
.slide--dense .note { margin-top: 1cqi; font-size: 1.35cqi; }
.slide--dense .btn { margin-top: 1.2cqi; }
.slide--dense .closing { margin-top: 1.3cqi; font-size: 1.65cqi; }
.slide--dense .formula { font-size: 2.2cqi; padding: 1.3cqi 2cqi; margin: 1cqi 0 1.2cqi; }

.slide.is-on { display: flex; }

.slide-inner { position: relative; z-index: 1; }

.ornament {
    position: absolute;
    width: 10cqi;
    height: 10cqi;
    border: 1px solid var(--soft);
    border-radius: 50%;
    opacity: 0.35;
    pointer-events: none;
}
.ornament::after {
    content: "";
    position: absolute;
    inset: 22%;
    border: 1px solid var(--rose);
    border-radius: 50%;
    opacity: 0.5;
}
.ornament--tl { top: 3cqi; left: 3cqi; }
.ornament--br { bottom: 5.5cqi; right: 3cqi; }

.kicker {
    font-size: 1.55cqi;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--rose);
    font-weight: 600;
    margin-bottom: 1.4cqi;
}

h1, h2 {
    font-family: var(--display);
    font-weight: 400;
    color: var(--navy);
    line-height: 1.18;
}

.slide h1 {
    font-size: 5.4cqi;
    margin-bottom: 1.6cqi;
}

.slide h2 {
    font-size: 3.5cqi;
    margin-bottom: 2.2cqi;
}

.lead {
    font-size: 2.05cqi;
    line-height: 1.45;
    color: var(--mid);
    max-width: 78cqi;
    margin-bottom: 2cqi;
}

.closing {
    font-size: 1.85cqi;
    line-height: 1.5;
    color: var(--navy);
    font-style: italic;
    margin-top: 2.2cqi;
    max-width: 78cqi;
}

.note {
    font-size: 1.45cqi;
    color: var(--mid);
    margin-top: 1.6cqi;
}

.meta {
    font-size: 1.7cqi;
    color: var(--mid);
    line-height: 1.55;
}

.meta .oder {
    display: block;
    font-size: 1.25cqi;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--rose);
    margin: 0.6cqi 0;
}

.byline {
    margin-top: 2.4cqi;
    font-size: 1.55cqi;
    color: var(--rose);
}

.list {
    list-style: none;
    display: grid;
    gap: 1.1cqi;
    font-size: 1.95cqi;
    line-height: 1.4;
    color: var(--text);
}
.list li {
    padding-left: 2.2cqi;
    position: relative;
}
.list li::before {
    content: "";
    position: absolute;
    left: 0.2cqi;
    top: 0.78cqi;
    width: 0.7cqi;
    height: 0.7cqi;
    border-radius: 50%;
    background: var(--soft);
}

.formula {
    font-family: var(--display);
    font-size: 2.6cqi;
    color: var(--navy);
    background: var(--warm);
    border: 1px solid var(--line);
    border-radius: 1.2cqi;
    padding: 1.8cqi 2.2cqi;
    margin: 1.4cqi 0 1.8cqi;
    text-align: center;
    letter-spacing: 0.02em;
}

.formula--alert {
    border-left: 0.45cqi solid var(--rose);
    text-align: left;
}

.two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.2cqi;
    margin-top: 0.4cqi;
}

.cardish {
    background: var(--warm);
    border: 1px solid var(--line);
    border-radius: 1.2cqi;
    padding: 2cqi 2.2cqi 2.2cqi;
}

.cardish h3 {
    font-family: var(--display);
    font-size: 2.1cqi;
    font-weight: 400;
    color: var(--navy);
    margin-bottom: 0.8cqi;
}

.cardish p, .cardish li {
    font-size: 1.7cqi;
    line-height: 1.45;
    color: var(--mid);
}

.steps {
    list-style: none;
    display: grid;
    gap: 0.85cqi;
    font-size: 1.8cqi;
}
.steps li {
    display: grid;
    grid-template-columns: 2.6cqi 1fr;
    gap: 1.2cqi;
    align-items: baseline;
}
.num {
    font-family: var(--display);
    color: var(--rose);
    font-size: 1.9cqi;
}

.oils {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.7cqi 2.4cqi;
    font-size: 1.7cqi;
    line-height: 1.35;
}
.oils strong {
    color: var(--navy);
    font-weight: 600;
}

.btn {
    display: inline-flex;
    align-items: center;
    margin-top: 1.8cqi;
    background: var(--rose);
    color: #fff;
    font-family: var(--font);
    font-size: 1.7cqi;
    padding: 1cqi 2.2cqi;
    border-radius: 999px;
    border: 0;
    font-weight: 600;
}
.btn:hover { background: #8a5a6a; color: #fff; }

.slide-foot {
    position: absolute;
    left: 8cqi;
    right: 8cqi;
    bottom: 2.4cqi;
    display: flex;
    justify-content: space-between;
    font-size: 1.25cqi;
    letter-spacing: 0.08em;
    color: var(--soft);
    z-index: 2;
}

.align-center {
    text-align: center;
    align-items: center;
}
.align-center .lead,
.align-center .closing,
.align-center .meta { margin-left: auto; margin-right: auto; }

.bigline {
    font-family: var(--display);
    font-size: 2.6cqi;
    color: var(--navy);
    margin-top: 2.4cqi;
    line-height: 1.35;
}

.last-line {
    margin-top: 2.6cqi;
    font-size: 1.85cqi;
    color: var(--rose);
}

/* ——— Steuerung ——— */
.chrome {
    display: flex;
    align-items: center;
    gap: 16px;
    justify-content: center;
    min-height: 40px;
}

.dots {
    display: flex;
    gap: 8px;
    align-items: center;
}

.dots button {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    border: 0;
    background: #d5cfc4;
    padding: 0;
}
.dots button.is-on { background: var(--rose); transform: scale(1.15); }
.dots button:focus-visible { outline: 2px solid var(--rose); outline-offset: 3px; }

.chrome .ghost {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--mid);
    font-family: var(--font);
    font-size: 0.95rem;
    padding: 6px 14px;
    border-radius: 999px;
}
.chrome .ghost:hover { border-color: var(--rose); color: var(--navy); }

.hint {
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.78rem;
    color: #9a9488;
    letter-spacing: 0.04em;
    pointer-events: none;
}

/* ——— Rechner ——— */
.calc-page {
    min-height: 100dvh;
    padding: 28px 18px 60px;
}

.calc-wrap {
    max-width: 560px;
    margin: 0 auto;
}

.calc-top {
    margin-bottom: 22px;
}
.calc-top .back {
    display: inline-block;
    font-size: 1rem;
    color: var(--rose);
    margin-bottom: 18px;
    font-weight: 600;
}
.calc-top .kicker { font-size: 0.78rem; margin-bottom: 6px; }
.calc-top h1 {
    font-family: var(--display);
    font-size: 2rem;
    color: var(--navy);
    font-weight: 400;
    margin-bottom: 8px;
}
.calc-top p { color: var(--mid); font-size: 1.15rem; line-height: 1.55; }

.panel {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 22px 20px 24px;
    margin-bottom: 16px;
    box-shadow: 0 10px 32px rgba(30, 42, 63, 0.05);
}
.panel h2 {
    font-family: var(--display);
    font-size: 1.35rem;
    font-weight: 400;
    color: var(--navy);
    margin-bottom: 6px;
}
.panel .help { color: var(--mid); font-size: 1.02rem; margin-bottom: 16px; line-height: 1.5; }

.oil-row {
    display: grid;
    grid-template-columns: 1fr 7.5rem 3.4rem 2.2rem;
    gap: 8px;
    align-items: center;
    margin-bottom: 10px;
}
.oil-row select,
.oil-row input {
    font-family: var(--font);
    font-size: 1.15rem;
    padding: 12px 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: var(--text);
    width: 100%;
    min-height: 48px;
}
.oil-row .pct {
    font-size: 0.95rem;
    color: var(--mid);
    text-align: right;
}
.oil-row .kill {
    border: 0;
    background: transparent;
    color: var(--rose);
    font-size: 1.3rem;
    min-height: 44px;
}
.oil-row .kill[hidden] { display: none; }

.add-oil {
    margin-top: 6px;
    background: transparent;
    border: 1px dashed var(--soft);
    color: var(--blue);
    font-family: var(--font);
    font-size: 1.05rem;
    padding: 10px 14px;
    border-radius: 10px;
    width: 100%;
}

.sf-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
}
.sf-row label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: center;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px 6px;
    background: #fff;
    cursor: pointer;
    font-size: 0.88rem;
    line-height: 1.3;
    color: var(--mid);
    min-height: 76px;
    justify-content: center;
}
.sf-row label strong { color: var(--navy); font-size: 1.15rem; font-weight: 600; }
.sf-row input { position: absolute; opacity: 0; pointer-events: none; }
.sf-row label:has(input:checked) {
    border-color: var(--rose);
    background: var(--warm);
    color: var(--navy);
}

.result {
    background: var(--navy);
    color: #f7f4ef;
    border-radius: 18px;
    padding: 26px 22px 22px;
    margin-bottom: 16px;
}
.result .label { font-size: 0.95rem; color: var(--soft); margin-bottom: 4px; }
.result .big {
    font-family: var(--display);
    font-size: 2.4rem;
    line-height: 1.1;
    margin-bottom: 16px;
}
.result .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.result .sub { font-size: 0.95rem; color: #c9a9a6; margin-top: 14px; line-height: 1.5; }
.result .err { color: #f3d6c8; font-size: 1.05rem; }

.warn {
    background: var(--warm);
    border-left: 4px solid var(--rose);
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 1.05rem;
    line-height: 1.5;
    color: var(--navy);
    margin-bottom: 16px;
}

.calc-foot {
    font-size: 0.95rem;
    color: var(--mid);
    line-height: 1.55;
}

@media (max-width: 420px) {
    .oil-row {
        grid-template-columns: 1fr 80px 52px 32px;
    }
}

/* ——— Druck ——— */
body.is-print {
    overflow: auto;
    height: auto;
    background: #fff;
}
body.is-print .shell {
    height: auto;
    display: block;
    padding: 0;
}
body.is-print .stage {
    width: auto;
    aspect-ratio: auto;
    height: auto;
}
body.is-print .slide {
    position: relative;
    display: flex !important;
    width: 280mm;
    height: 158mm;
    margin: 12mm auto;
    page-break-after: always;
    break-after: page;
    box-shadow: none;
}
body.is-print .chrome,
body.is-print .hint { display: none; }

@media print {
    body { background: #fff; }
    .chrome, .hint { display: none !important; }
    .slide {
        display: flex !important;
        position: relative;
        box-shadow: none;
        width: 100%;
        height: 100vh;
        border-radius: 0;
        page-break-after: always;
        break-after: page;
    }
    .stage { width: 100%; aspect-ratio: auto; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}
