#twp-lesekoch.twp-exercise {
    display:inline-block;
}

#twp-lesekoch .twp-base-font-preview {
    font-size: 16px;
    color: #1f2937;
}

@font-face {
    font-family: "Playwrite_DE_Grund";
    src: url("../Playwrite_DE_Grund/PlaywriteDEGrund-VariableFont_wght.ttf") format("truetype");
    font-display: swap;
}

body.twp-base-font-enabled {
    font-family: "Playwrite_DE_Grund", "Helvetica Neue", Arial, sans-serif;
}

#twp-lesekoch.twp-exercise + .twp-exercise {
    margin-top: 24px;
}

#twp-lesekoch .twp-exercise-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    align-items: center;
    margin-bottom: 16px;
}

#twp-lesekoch button {
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #c7d2e7;
    background: #f5f7fb;
    color: #1f2937;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 120ms ease, border-color 120ms ease, transform 80ms ease;
}
#twp-lesekoch button.twp-help-button {
    border: 2px solid #61aed7;
    border-radius: 50%;
    font-size: 20px;
    color: #61aed7;
    font-weight: bold;
}
#twp-lesekoch button:hover {
    background: #e9edf6;
    border-color: #b9c7e3;
}

#twp-lesekoch button:active {
    transform: translateY(1px);
}

#twp-lesekoch .twp-exercise-controls input[type="number"],
#twp-lesekoch .twp-exercise-controls input[type="text"] {
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #ccd2e4;
    background: #fff;
    color: #1f2933;
    min-width: 120px;
    height: 36px ;
    margin-bottom: 0px;
    width: 130px;
}

#twp-lesekoch .twp-exercise-controls label {
    font-size: 20px;
    display: flex;
    gap: 10px;
}
#twp-lesekoch .twp-exercise-stage {
    border: 1px dashed #ccd2e4;
    border-radius: 6px;
    padding: 18px;
    background: #f6f8fb;
    min-height: 80px;
    margin-bottom: 18px;
    font-size: 28px;
    line-height: 1.6;
}

/* Letter Reader adjustments */
#twp-lesekoch .twp-letter-reader-output-wrapper {
    display: block;
}

#twp-lesekoch .twp-help-button {
    width: 28px;
    height: 28px;
    padding: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#twp-lesekoch .twp-help-overlay {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.1);
    opacity: 0;
    pointer-events: none;
    transition: opacity 120ms ease;
    z-index: 9998;
}

#twp-lesekoch .twp-help-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

#twp-lesekoch .twp-help-popover {
    position: fixed;
    max-width: 320px;
    background: #fff;
    border: 1px solid #cdd5e6;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    padding: 10px 12px 12px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 120ms ease;
    z-index: 9999;
}

#twp-lesekoch .twp-help-popover.open {
    opacity: 1;
    pointer-events: auto;
}

#twp-lesekoch .twp-help-close {
    display: none;
    float: right;
    border: none;
    background: transparent;
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
}

#twp-lesekoch .twp-help-body {
    color: #1f2933;
    font-size: 14px;
    line-height: 1.4;
    white-space: pre-line;
}

/* Blitzlesen specific */
#twp-lesekoch .twp-blitzlesen .twp-exercise-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #222;
    margin-bottom: 18px;
    font-size: 32px;
}

#twp-lesekoch .twp-blitzlesen-display {
    transition: opacity 120ms ease;
    min-height: 1em;
    text-align: center;
}

#twp-lesekoch .twp-blitzlesen-finish-image {
    max-width: 120px;
    height: auto;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.18));
}

#twp-lesekoch .twp-blitzlesen-list {
    border-top: 1px solid #e1e6f0;
    padding-top: 16px;
}

#twp-lesekoch .twp-blitzlesen-list-headline {
    margin-bottom: 10px;
}

#twp-lesekoch .twp-blitzlesen-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

#twp-lesekoch .twp-blitzlesen-tag {
    border: 1px solid #9fb4e6;
    padding: 6px 12px;
    cursor: pointer;
    transition: all 120ms ease;
    background: #eef3ff;
}

#twp-lesekoch .twp-blitzlesen-tag.inactive {
    opacity: 0.45;
    background: #f2f4f8;
    border-color: #cfd5e5;
}

#twp-lesekoch .twp-wordlist {
    border-top: 1px solid #e1e6f0;
    padding-top: 16px;
    margin-top: 12px;
}

#twp-lesekoch .twp-wordlist-headline {
    margin-bottom: 10px;
    font-weight: 600;
}

#twp-lesekoch .twp-wordlist-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

#twp-lesekoch .twp-wordlist-tag {
    border: 1px solid #9fb4e6;
    padding: 6px 12px;
    cursor: pointer;
    transition: all 120ms ease;
    background: #eef3ff;
}

#twp-lesekoch .twp-wordlist-tag.inactive {
    opacity: 0.45;
    background: #f2f4f8;
    border-color: #cfd5e5;
}

#twp-lesekoch .twp-wordlist-add {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

#twp-lesekoch .twp-wordlist-add-input {
    flex: 1 1 220px;
}

/* Fehlersuche */
#twp-lesekoch.twp-fehlersuche .twp-exercise-stage {
    cursor: default;
    display: block;
}
#twp-lesekoch.twp-fehlersuche .twp-word {
    display: inline;
    cursor: pointer;
    transition: color 160ms ease, background-color 160ms ease;
    border-radius: 4px;
}
#twp-lesekoch.twp-fehlersuche .twp-space {
    display: inline;
    white-space: pre-wrap;
}
#twp-lesekoch.twp-fehlersuche .twp-word:hover {
    background: rgba(3, 102, 233, 0.08);
}
#twp-lesekoch.twp-fehlersuche .twp-word-answer {
    pointer-events: auto;
}
#twp-lesekoch.twp-fehlersuche .twp-choice {
    display: inline-block;
    cursor: pointer;
}
#twp-lesekoch.twp-fehlersuche .twp-choice-wrong {
    color: #E23721;
}
#twp-lesekoch.twp-fehlersuche .twp-word-correct {
    color: #0366e9;
}
#twp-lesekoch.twp-fehlersuche .twp-word-wrong {
    color: #E23721;
}
#twp-lesekoch.twp-fehlersuche .twp-word-transition {
    opacity: 0.4;
}
#twp-lesekoch.twp-fehlersuche .twp-word-wrapper {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}
#twp-lesekoch.twp-fehlersuche .twp-word-hint {
    font-size: 12px;
    color: #6b7280;
    line-height: 0;
    margin-bottom: 0;
    white-space: nowrap;
    position: absolute;
}

/* Letter Reader */
#twp-lesekoch .twp-letter-reader-output {
    font-size: 1.2em;
    margin-top: 10px;
    line-height: 1.6;
    white-space: normal;
    overflow-wrap: anywhere;
    visibility: visible;
    display: block;
}
#twp-lesekoch .twp-letter-reader-output .lr-word { font-size: 24px !important; display: inline-block; }
#twp-lesekoch .twp-letter-reader-output .lr-preview { color: #c5cad3; }
#twp-lesekoch .twp-letter-reader-output .lr-revealed { color: inherit; }
#twp-lesekoch .twp-letter-reader-output .syllable { visibility: hidden; }
#twp-lesekoch .twp-letter-reader-output .syllable.visible { visibility: visible; }
#twp-lesekoch .twp-letter-reader-output .twp-unit { visibility: hidden; }
#twp-lesekoch .twp-letter-reader-output .twp-unit.visible { visibility: visible; }
#twp-lesekoch .twp-letter-reader-output .syllable-color-0 { color: black; }
#twp-lesekoch .twp-letter-reader-output .syllable-color-1 { color: #0366e9; }
#twp-lesekoch .twp-letter-reader-controls { margin-bottom: 10px; }
#twp-lesekoch .twp-letter-reader-controls button { margin-right: 5px; }
#twp-lesekoch .twp-letter-reader-controls input[type=number].speed-input {
    width: 80px !important;
    display: inline !important;
}
#twp-lesekoch .twp-letter-reader-controls .info-text { color: grey; font-size: 13px; }
#twp-lesekoch .twp-letter-reader-output-wrapper {
    display: block;
    border: 1px dashed #ccd2e4;
    border-radius: 6px;
    background: #f6f8fb;
    cursor: pointer;
    min-height: 80px;
}
#twp-lesekoch .twp-letter-reader-mode-group {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}
#twp-lesekoch .twp-letter-reader-mode-label {
    color: #4b5563;
    font-size: 14px;
    margin-right: 2px;
}
#twp-lesekoch .twp-letter-reader-mode {
    padding: 6px 10px;
    border: 1px solid #ccd2e4;
    border-radius: 6px;
    background: #fff;
    color: #1f2933;
}
#twp-lesekoch .twp-letter-reader-mode.is-active {
    background: #0366e9;
    color: #fff;
    border-color: #0366e9;
}
#twp-lesekoch .twp-letter-reader-mode.twp-letter-reader-mode-disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
#twp-lesekoch .twp-letter-reader-editor {
    border: 1px dashed #ccd2e4;
    border-radius: 6px;
    padding: 12px;
    margin-top: 12px;
    background: #f9fafb;
}
#twp-lesekoch .twp-letter-reader-editor-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 8px;
}

/* Silbenhammer */
#twp-lesekoch .twp-silbenhammer-stage {
    outline: none;
    cursor: pointer;
    font-size: 24px;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
}
#twp-lesekoch .twp-silbenhammer-stage:focus {
    box-shadow: 0 0 0 3px rgba(3, 102, 233, 0.35);
}
#twp-lesekoch .twp-silbenhammer-instruction {
    color: #61aed7;
    font-style: italic;
    margin-bottom: 18px;
}
#twp-lesekoch .twp-silbenhammer-area {
    display: grid;
    flex-direction: column;
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    max-width: 100%;
    margin-top: 12px;
}
#twp-lesekoch .twp-silbenhammer-word-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 4px;
}
#twp-lesekoch .twp-silbenhammer-word-row {
    font-size: 26px;
    color: #6b7280;
    display: flex;
    gap: 4px;
}
#twp-lesekoch .twp-silbenhammer-syllable {
    padding: 2px 4px;
    border-radius: 4px;
    background: rgba(99, 102, 241, 0.08);
    transition: color 150ms ease, background-color 150ms ease, opacity 150ms ease;
    opacity: 0.35;
}
#twp-lesekoch .twp-silbenhammer-syllable.visible {
    opacity: 1;
}
#twp-lesekoch .twp-silbenhammer-syllable.color-0.visible {
    color: #0366e9;
    background: rgba(3, 102, 233, 0.12);
}
#twp-lesekoch .twp-silbenhammer-syllable.color-1.visible {
    color: #000000ff;
    background: rgb(151 151 151 / 12%);
}
#twp-lesekoch .twp-silbenhammer-progress {
    color: #5d6470;
}

#twp-lesekoch .twp-blitzlesen-add {
    gap: 10px;
    flex-wrap: wrap;
}

#twp-lesekoch input[type=text].twp-blitzlesen-add-input {
    flex: 1 1 220px;
    padding: 6px 8px;
    border: 1px solid #ccd2e4;
    border-radius: 4px;
    color: rgb(0, 0, 0) !important;
    margin-bottom: 0px;
}
