@font-face {
    font-family: 'Druckschrift_BY_WOK';
    src: url('../fonts/Druckschrift_BY_WOK.woff') format('woff');
    font-display: swap;
}

@font-face {
    font-family: 'Dr_hh_1';
    src: url('../fonts/Dr_hh_1.woff') format('woff');
    font-display: swap;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    color: #111111;
}

#simpel-app {
    width: 100%;
    height: 100dvh;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 45fr 45fr 10fr;
    background: #ffffff;
}

#simpel-aufgabe-bereich,
#simpel-antwort-bereich {
    padding: 3vh 2.4vw;
    box-sizing: border-box;
}

#simpel-aufgabe-bereich {
    border-right: 1px solid #e4e4e4;
    height: 100dvh;
    min-height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#simpel-antwort-bereich {
    border-right: 1px solid #e4e4e4;
    height: 100dvh;
    min-height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#simpel-status-bereich {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 12px;
    padding: 3vh 0.6vw;
    box-sizing: border-box;
}

.simpel-frage-titel {
    margin: 0 0 1.6vh 0;
    font-size: clamp(18px, 2.2vw, 34px);
    font-weight: 700;
}

.simpel-frage-inhalt {
    min-height: 24vh;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    font-size: clamp(20px, 2.8vw, 44px);
    line-height: 1.15;
    overflow: hidden;
}

.simpel-frage-inhalt-bildmodus {
    justify-content: center;
}

.simpel-frage-inhalt-bildmodus img,
.simpel-frage-inhalt-bildmodus .bild {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Geld-Darstellung im Aufgabenfeld: gleiches Muster wie in dalli.css */
.simpel-frage-inhalt .geld-render {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 1fr;
    overflow: hidden;
    gap: 0.6vh 0.6vw;
    padding: 0.6vh 0.6vw;
}

.simpel-frage-inhalt .geld-render .geldteil-wrap {
    position: relative;
    display: block;
    overflow: hidden;
}

.simpel-frage-inhalt .geld-render .geldteil-img {
    display: block;
    border: none;
    box-shadow: none;
    margin: 0;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transform-origin: center center;
    max-width: 92%;
    max-height: 92%;
    object-fit: contain;
}

.simpel-frage-inhalt .geld-render .geldteil-img.geld-rot {
    transform: translate(-50%, -50%) rotate(90deg);
}

.simpel-frage-inhalt .geldrechnen-zeichen > span {
    display: block;
    font-size: 1.9rem;
    line-height: 1;
    font-weight: 700;
}

.simpel-frage-inhalt .geldrechnen-summand > span {
    display: block;
    font-size: clamp(1.4rem, 2.4vw, 3rem);
    line-height: 1.1;
    font-weight: 700;
}

.simpel-frage-inhalt .geldrechnen-aufgabe,
.simpel-frage-inhalt .geldrechnen-summand {
    min-width: 0;
    overflow: hidden;
}

.simpel-antwort-liste {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.simpel-antwort-liste-bildmodus {
    display: grid;
    gap: 12px;
    height: 100%;
    overflow: hidden;
    justify-content: stretch;
    align-content: stretch;
    align-items: stretch;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 1fr;
}

.simpel-antwort {
    position: relative;
    width: 100%;
    flex: 1 1 0;
    min-height: clamp(44px, 7vh, 80px);
    border: 2px solid #d8d8d8;
    background: #eeeeee;
    color: #161616;
    border-radius: 10px;
    text-align: left;
    padding: 10px 52px 10px 14px;
    cursor: pointer;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    line-height: 1.2;
    overflow: hidden;
    font-family: inherit;
}

.simpel-antwort * {
    font-family: inherit;
}

.simpel-antwort:disabled {
    cursor: default;
    opacity: 1;
}

.simpel-antwort:hover:not(:disabled) {
    border-color: #8f8f8f;
}

.simpel-antwort-bildmodus {
    width: 100%;
    height: 100%;
    min-height: 0;
    aspect-ratio: 1 / 1;
    text-align: center;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.simpel-antwort-bildmodus img,
.simpel-antwort-bildmodus .bild,
.simpel-antwort-bildmodus .geld-render {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.simpel-antwort-bildmodus .geld-render {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 1fr;
    overflow: hidden;
    gap: 0.6vh 0.6vw;
    padding: 0.6vh 0.6vw;
}

.simpel-antwort-bildmodus .geld-render .geldteil-wrap {
    position: relative;
    display: block;
    overflow: hidden;
}

.simpel-antwort-bildmodus .geld-render .geldteil-img {
    display: block;
    border: none;
    box-shadow: none;
    margin: 0;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transform-origin: center center;
    max-width: 94%;
    max-height: 94%;
    object-fit: contain;
}

.simpel-antwort-bildmodus .geld-render .geldteil-img.geld-rot {
    transform: translate(-50%, -50%) rotate(90deg);
}

.simpel-antwort.ist-falsch {
    text-decoration: none;
}

.simpel-antwort.ist-falsch::after {
    content: '';
    position: absolute;
    left: 8px;
    right: 52px;
    top: 50%;
    transform: translateY(-50%);
    height: 3px;
    background: #c10f0f;
    border-radius: 2px;
    pointer-events: none;
}

.simpel-antwort-markierung {
    position: absolute;
    pointer-events: none;
}

.simpel-antwort-markierung-richtig {
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: clamp(32px, 7vh, 70px);
    height: clamp(32px, 7vh, 70px);
}

.simpel-antwort-markierung-falsch {
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: clamp(44px, 10vh, 100px);
    height: clamp(44px, 10vh, 100px);
    opacity: 0.95;
}

.simpel-antwort-bildmodus .simpel-antwort-markierung-richtig {
    right: 6px;
    top: 6px;
    transform: none;
    width: 30%;
    height: auto;
    max-width: 42px;
}

.simpel-antwort-bildmodus .simpel-antwort-markierung-falsch {
    width: 44%;
    height: auto;
    max-width: 80px;
}

.simpel-punkt {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #bdbdbd;
    flex: 0 0 auto;
}

.simpel-punkt.ist-richtig {
    background: #1e9b28;
}

.simpel-punkt.ist-falsch {
    background: #d81e1e;
}

.simpel-ende {
    margin-top: 2vh;
    font-size: clamp(20px, 2.4vw, 34px);
    font-weight: 700;
}

.simpel-neustart {
    margin-top: 14px;
    border: 0;
    border-radius: 8px;
    background: #111111;
    color: #ffffff;
    padding: 10px 16px;
    font-size: 18px;
    cursor: pointer;
}

@media (max-width: 900px) {
    #simpel-app {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        height: auto;
        min-height: 100vh;
    }

    #simpel-aufgabe-bereich,
    #simpel-antwort-bereich {
        border-right: 0;
        border-bottom: 1px solid #e4e4e4;
        height: auto;
        min-height: 0;
        overflow: visible;
        display: block;
    }

    #simpel-status-bereich {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        padding-bottom: 24px;
    }
}

/* Hochformat: 45/45/10 vertikal */
/* =============================================================
   Tippen-Modus
   ============================================================= */

.simpel-tippen-bereich {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    gap: 1.2vh;
    padding: 2vh 2.5vw;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
}

.simpel-eingabe-kachel {
    display: flex;
    flex-direction: column;
    gap: 1.2vh;
    width: 100%;
    max-width: min(96%, 62vh);
    margin: 0 auto;
}

.simpel-eingabe-zeile {
    display: flex;
    align-items: center;
    gap: 0.8vw;
    width: 100%;
}

.simpel-eingabe-zeile-doppelt {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: 0.8vw;
}

.simpel-eingabe-gruppe {
    display: flex;
    align-items: center;
    gap: 0.5vw;
    flex: 3;
    min-width: 0;
}

/* Cent-Gruppe schmaler als Euro-Gruppe */
.simpel-eingabe-zeile-doppelt .simpel-eingabe-gruppe:last-child {
    flex: 2;
}

.simpel-eingabe-zeile-doppelt .simpel-eingabe-feld {
    font-size: clamp(13px, 2.8vh, 24px);
}

.simpel-eingabe-zeile-doppelt .simpel-eingabe-label {
    font-size: clamp(10px, 2vh, 16px);
}

.simpel-eingabe-feld {
    flex: 1;
    height: clamp(36px, 7.5vh, 60px);
    border: 2px solid #555;
    border-radius: 0.4em;
    text-align: center;
    font-size: clamp(14px, 3.5vh, 30px);
    font-family: inherit;
    padding: 0 0.3em;
    box-sizing: border-box;
    min-width: 0;
}

.simpel-eingabe-label {
    font-size: clamp(12px, 2.5vh, 22px);
    white-space: nowrap;
    color: #444;
}

.simpel-eingabe-waehrung {
    font-size: clamp(12px, 2.5vh, 22px);
    white-space: nowrap;
    color: #444;
    flex-shrink: 0;
}

.simpel-pruefen-btn {
    width: 100%;
    height: clamp(36px, 7vh, 58px);
    border: 2px solid #555;
    border-radius: 0.4em;
    font-size: clamp(14px, 3vh, 26px);
    font-family: inherit;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.92);
    transition: background 0.15s;
    position: relative;
}

.simpel-pruefen-btn:hover {
    background: rgba(240, 240, 240, 0.98);
}

.simpel-pruefen-btn.ist-falsch {
    background: rgba(220, 50, 50, 0.15);
    border-color: #c10f0f;
}

/* =============================================================
   Portrait-Modus
   ============================================================= */

@media (max-aspect-ratio: 4/3) {
    #simpel-app {
        grid-template-columns: 1fr;
        grid-template-rows: 45fr 45fr 10fr;
        height: 100dvh;
        min-height: 100vh;
    }

    #simpel-aufgabe-bereich {
        border-right: 0;
        border-bottom: 1px solid #e4e4e4;
        height: 100%;
        min-height: 0;
        overflow: hidden;
        display: flex;
    }

    #simpel-antwort-bereich {
        border-right: 0;
        border-bottom: 1px solid #e4e4e4;
        height: 100%;
        min-height: 0;
        overflow: hidden;
        justify-content: flex-start;
        display: flex;
        flex-direction: column;
    }

    #simpel-status-bereich {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-content: center;
        padding: 1vh 0.6vw;
    }

    .simpel-antwort {
        flex: 1 1 0;
        min-height: clamp(36px, 6vh, 70px);
        max-height: clamp(48px, 12vh, 100px);
    }
}
