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

body {
    font-family: sans-serif;
    background: #f4f4f4;
    margin: 0;
    padding: 20px;

    /* WICHTIG: kein flex, kein center */
    width: 100%;
    box-sizing: border-box;

    /* verhindert horizontales Scrollen */
    overflow-x: hidden;
}

.layout {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;          /* zentriert jetzt korrekt */
    display: flex;
    flex-direction: column;
    gap: 32px;
    align-items: stretch;    /* statt center */
    box-sizing: border-box;
}


h5 {
    text-transform: uppercase;
}

/* -----------------------------------------
   Karten
----------------------------------------- */

.card {
    background: white;
    padding: 24px;
    border-radius: 16px;
    width: 100%;
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
    text-align: center;

    /* iPhone Fix: verhindert Überbreite durch Padding */
    box-sizing: border-box;
}

/* -----------------------------------------
   Werteanzeige
----------------------------------------- */

.val {
    font-size: 2.5em;
    font-weight: bold;
    margin: 10px 0;
    color: #007bff;
}

.total {
    font-size: 1.1em;
    color: #666;
    margin-bottom: 20px;
}

.device-id {
    font-size: 0.9em;
    color: #888;
}

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

.btn {
    padding: 14px 20px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    width: 45%;

    /* iPhone Fix: verhindert Safari-Autozoom */
    font-size: 16px;
}

.btn-on { background: #28a745; color: white; }
.btn-off { background: #dc3545; color: white; }

.small-link {
    color: #888;
    text-decoration: none;
    font-size: 0.8em;
}

/* -----------------------------------------
   Anleitung
----------------------------------------- */

.manual-card {
    text-align: left;
    width: 100%;              /* wichtig für iPhone */
    box-sizing: border-box;   /* verhindert Überbreite */
}

.manual-card ul {
    margin-left: 20px;
    padding-left: 0;
}

.manual-card li {
    margin-bottom: 6px;
}

.smaller-paragraph {
    font-size: 0.85em;
}

/* -----------------------------------------
   Druckmodus
----------------------------------------- */

.no-print { }

.print-only {
    display: none;
}

@media print {
    body {
        background: white;
        padding: 0;
    }

    .no-print {
        display: none !important;
    }

    .print-only {
        display: block !important;
    }

    .card {
        box-shadow: none;
        border-radius: 0;
    }

    .layout {
        max-width: 100%;
        gap: 16px;
    }
}

