/* ======= STILLE MOMENTE — app_v2.css — DARK ======= */
@import url('https://fonts.googleapis.com/css2?family=Lora:wght@400;500&display=swap');

/* ── Variables ──────────────────────────────── */
:root {
    --s1: 8px;
    --s2: 8px;
    --s3: 24px;
    --s4: 32px;
    --s5: 40px;
    --r-btn: 14px;
    --r-action-btn: 999px;
    --r-card: 16px;
    --h-field: 52px;
    --h-btn: 48px;
    --font: 'Lora', -apple-system, 'Helvetica Neue', Georgia, serif;
    --font-display: 'Lora', -apple-system, 'Helvetica Neue', Georgia, serif;
    --t-fast: 120ms ease;
    --t-base: 240ms ease;
    --t-slow: 400ms ease;
    --t-xslow: 600ms cubic-bezier(0.22, 1, 0.36, 1);
    --field-btn-si: 15px;
    --action-btn-si: 16px;
    --footer-h: calc(36px + env(safe-area-inset-bottom, 0px));
}

/* ── Reset ──────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html {
    height: 100%;
    overscroll-behavior: none;
}

body {
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: radial-gradient(ellipse at 40% 30%, #4A5C6A 0%, #354452 35%, #263040 65%, #18222E 100%);
    background-attachment: fixed;
    height: 100%;
}

/* ── App Shell ──────────────────────────────── */
#app {
    height: calc(100dvh - var(--footer-h));
    max-width: 430px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

/* ── Screens ────────────────────────────────── */
.screen {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: var(--s3) var(--s3) var(--s2);
    padding-top: calc(var(--s3) + env(safe-area-inset-top, 0px));
    position: absolute;
    inset: 0;
    overflow-y: auto;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--t-slow);
}

.screen.active {
    opacity: 1;
    pointer-events: all;
}

#screen1,
#screen2 {
    justify-content: flex-start;
}

.spacer {
    flex: 1;
    min-height: var(--s2);
    max-height: var(--s5);
}

/* ── Header ─────────────────────────────────── */
.s1-header,
.s2-header {
    min-height: 60px;
    padding-top: 0;
}

.s2-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    margin-bottom: 0;
}

.s1-eyebrow {
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 500;
    margin-bottom: 4px;
}

.s1-title {
    font-family: var(--font-display);
    font-size: clamp(20px, 5vw, 26px);
    font-weight: 400;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.3;
    letter-spacing: -0.3px;
}

.s2-label {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.08em;
}

/* ── Karte ──────────────────────────────────── */
.s1-card {
    border-radius: var(--r-card);
    background: radial-gradient(ellipse at 80% 5%, #4E5F6E 0%, #3A4D5C 45%, #2A3A48 80%, #1E2D3C 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 24px rgba(0, 0, 0, .35), 0 1px 6px rgba(0, 0, 0, .2), 0 12px 32px rgba(0, 0, 0, .25);
    padding: var(--s2);
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    margin-top: 5vh;
}

/* ── Grid ───────────────────────────────────── */
.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    row-gap: var(--s3);
    column-gap: var(--s2);
    flex: 1;
    padding: 0.75em;
    align-content: center;
}

.grid-item:last-child {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    padding-top: var(--s2);
}

.grid-item:last-child .field-btn {
    width: calc(50% - var(--s1));
}

/* ── Zustandsfeld Button ────────────────────── */
.field-btn {
    height: var(--h-field);
    width: 100%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--r-btn);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 var(--s2);
    font-family: var(--font);
    font-size: var(--field-btn-si);
    font-weight: 400;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0.01em;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .25), 0 1px 3px rgba(0, 0, 0, .15), inset 0 1px 0 rgba(255, 255, 255, .07);
    transition: background 0.3s ease, transform var(--t-fast);
    -webkit-user-select: none;
    user-select: none;
}

.field-btn:active {
    background: rgba(255, 255, 255, 0.18);
    transform: scale(0.985);
}

.field-btn.glimmer {
    background: rgba(255, 255, 255, 0.18);
}

/* ── Satz-Container ─────────────────────────── */
.satz-container {
    padding: var(--s3);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.satz-text {
    font-family: var(--font-display);
    font-size: clamp(17px, 6vw, 22px);
    font-weight: 400;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.55;
    letter-spacing: -0.1px;
    transition: opacity var(--t-base), transform var(--t-base);
}

.satz-text.fade-out {
    opacity: 0;
    transform: translateY(-6px);
}

.satz-text.fade-in {
    opacity: 0;
    transform: translateY(8px);
}

/* ── Dots ───────────────────────────────────── */
.dots {
    display: flex;
    gap: 5px;
    margin-top: var(--s2);
}

.dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: background var(--t-base), width var(--t-base);
}

.dot.active {
    background: rgba(255, 255, 255, 0.65);
    width: 16px;
    border-radius: 3px;
}

/* ── Action Buttons ─────────────────────────── */
.btn-row {
    flex-shrink: 0;
    display: flex;
    gap: var(--s2);
    padding: calc(var(--s2) * 5) var(--s2) var(--s2);
}

.action-btn {
    flex: 1;
    min-height: var(--h-btn);
    max-height: var(--h-btn);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--s1);
    font-family: var(--font);
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.01em;
    padding: 8px 20px;
    width: auto;
    min-width: fit-content;
    box-shadow: none;
    transition: background var(--t-fast), transform var(--t-fast);
    -webkit-user-select: none;
    user-select: none;
}

.action-btn:active {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(0.985);
}

.action-btn.btn-fertig {
    opacity: 0.85;
    max-width: 60vw;
    margin: 5vh auto;
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: rgba(255, 255, 255, 0.85);
    font-size: 16px;
    padding: 14px 40px;
    border-radius: 30px;
    box-shadow: none;
    white-space: nowrap;
    width: auto;
    min-width: fit-content;
}

.action-btn.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.btn-icon {
    width: 16px;
    height: 16px;
    opacity: 0.6;
}

/* ── Danke Overlay ──────────────────────────── */
#danke-overlay {
    position: fixed;
    inset: 0;
    background: rgba(24, 34, 46, 0.92);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: var(--s4);
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--t-slow);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

#danke-overlay.visible {
    opacity: 1;
    pointer-events: all;
}

.danke-inner {
    transform: translateY(12px);
    transition: transform var(--t-xslow);
}

#danke-overlay.visible .danke-inner {
    transform: translateY(0);
}

.danke-title {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.5;
    letter-spacing: -0.2px;
}

.danke-line {
    width: 32px;
    height: 1px;
    background: rgba(255, 255, 255, 0.18);
    margin: var(--s3) auto;
}

/* ── Info Overlays ──────────────────────────── */
#crightOverlay,
#datenschutzOverlay,
#haftungOverlay {
    position: fixed;
    inset: 0;
    background: rgba(24, 34, 46, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: var(--s4);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--t-slow);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

#crightOverlay.visible,
#datenschutzOverlay.visible,
#haftungOverlay.visible {
    opacity: 1;
    pointer-events: all;
}

.info-inner {
    width: 100%;
    max-width: 340px;
    display: flex;
    flex-direction: column;
    max-height: calc(100dvh - var(--s4) * 2);
    transform: translateY(12px);
    transition: transform var(--t-xslow);
}

#crightOverlay.visible .info-inner,
#datenschutzOverlay.visible .info-inner,
#haftungOverlay.visible .info-inner {
    transform: translateY(0);
}

.info-title {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.88);
    margin-bottom: var(--s1);
    letter-spacing: -0.1px;
    text-align: center;
    flex-shrink: 0;
}

.info-scroll {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: var(--s2) 0;
    mask-image: linear-gradient(to bottom, transparent 0%, black 8%, black 92%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 8%, black 92%, transparent 100%);
}

.info-body {
    font-size: 14px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.75;
}

.info-body strong {
    color: rgba(255, 255, 255, 0.75);
    font-weight: 500;
}

.overlay-actions {
    display: flex;
    gap: var(--s2);
    margin-top: var(--s2);
    flex-shrink: 0;
}

.overlay-actions .action-btn {
    font-size: 14px;
}

/* ── Footer ─────────────────────────────────── */
.app-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--footer-h);
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: var(--s3);
}

.footer-links button {
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font);
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.04em;
    padding: var(--s1);
    color: rgba(255, 255, 255, 0.35);
    transition: color var(--t-fast);
    -webkit-user-select: none;
    user-select: none;
}

.footer-links button:active {
    color: rgba(255, 255, 255, 0.7);
}

/* ── Unterwegs Toggle ───────────────────────── */
.unterwegs-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 0 24px;
    margin-top: 0;
}

.unterwegs-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.unterwegs-toggle input {
    display: none;
}

.toggle-label {
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.88);
    opacity: 0.6;
    transition: opacity 0.25s;
}

.unterwegs-toggle input:checked~.toggle-label {
    opacity: 1;
}

.toggle-track {
    width: 36px;
    height: 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    position: relative;
    transition: background 0.25s;
}

.toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    transition: transform 0.25s;
}

.unterwegs-toggle input:checked+.toggle-track {
    background: rgba(255, 255, 255, 0.55);
}

.unterwegs-toggle input:checked+.toggle-track .toggle-thumb {
    transform: translateX(16px);
}

.unterwegs-hint {
    font-size: 11px;
    opacity: 0.45;
    margin: 0;
    padding-left: 2px;
    color: rgba(255, 255, 255, 0.88);
}

/* ── Splash Screen ──────────────────────────── */
#splash-screen {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at 40% 30%, #4A5C6A 0%, #354452 35%, #263040 65%, #18222E 100%);
    padding: var(--s4);
    opacity: 1;
    transition: opacity 0.4s ease;
}

#splash-screen.fading {
    opacity: 0;
}

.splash-inner {
    width: 100%;
    max-width: 320px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--s3);
}

.splash-eyebrow {
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 500;
}

.splash-title {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.25;
    letter-spacing: -0.5px;
}

.splash-line,
.splash-sub {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.7;
}

.splash-link {
    background: none;
    border: none;
    padding: 0;
    font-family: var(--font);
    font-size: inherit;
    color: rgba(255, 255, 255, 0.45);
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    transition: color var(--t-fast);
    -webkit-user-select: none;
    user-select: none;
}

.splash-link:active {
    color: rgba(255, 255, 255, 0.88);
}

#splash-weiter-btn {
    width: 60%;
    margin-top: var(--s2);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: rgba(255, 255, 255, 0.85);
    font-size: 16px;
    padding: 14px 40px;
    border-radius: 30px;
    box-shadow: none;
}

/* ── Splash Haftung Overlay ─────────────────── */
#splashHaftungOverlay {
    position: fixed;
    inset: 0;
    background: rgba(24, 34, 46, 0.97);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 600;
    padding: var(--s4);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--t-slow);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

#splashHaftungOverlay.visible {
    opacity: 1;
    pointer-events: all;
}

/* ── Responsive ─────────────────────────────── */
@media (max-height: 680px) {
    :root {
        --h-field: 46px;
        --h-btn: 44px;
        --s4: 20px;
        --s3: 16px;
    }

    .s1-title {
        font-size: 20px;
    }

    .grid {
        gap: var(--s1);
        padding: 0.5em;
    }

    .spacer {
        max-height: var(--s2);
    }
}

@media (max-height: 580px) {
    :root {
        --h-field: 40px;
        --h-btn: 40px;
    }

    .satz-text {
        font-size: 16px;
    }
}

.hidden {
    display: none !important;
}