@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --paper-base: #dfbe86;
    --paper-light: #e8ca94;
    --paper-dark: #d4ad6c;

    --text: #111111;
    --muted: #342817;
    --soft: #5a4324;
    --accent: #6d4310;

    --soft-panel: rgba(248, 232, 196, 0.50);
    --soft-panel-strong: rgba(248, 232, 196, 0.68);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Open Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background-color: var(--paper-base);
    background-image:
        radial-gradient(circle at 12% 14%, rgba(255, 244, 218, 0.10) 0, rgba(255, 244, 218, 0.10) 9%, transparent 28%),
        radial-gradient(circle at 82% 18%, rgba(145, 95, 30, 0.055) 0, rgba(145, 95, 30, 0.055) 8%, transparent 24%),
        radial-gradient(circle at 24% 76%, rgba(132, 92, 34, 0.04) 0, rgba(132, 92, 34, 0.04) 11%, transparent 28%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='340' height='180' viewBox='0 0 340 180'%3E%3Cg fill='none'%3E%3Cpath d='M-10 25 C 20 6, 42 48, 78 27 S 138 0, 177 29 S 237 54, 281 24 S 320 2, 350 20' stroke='rgba(122,74,18,0.075)' stroke-width='1.1'/%3E%3Cpath d='M-8 60 C 22 40, 52 84, 94 58 S 154 36, 190 64 S 246 86, 290 56 S 327 40, 352 60' stroke='rgba(255,243,214,0.105)' stroke-width='0.9'/%3E%3Cpath d='M-12 98 C 18 76, 54 121, 88 96 S 149 75, 192 101 S 252 126, 299 95 S 327 73, 352 90' stroke='rgba(122,74,18,0.06)' stroke-width='1.0'/%3E%3Cpath d='M-15 138 C 30 110, 66 157, 105 132 S 167 108, 210 138 S 271 166, 318 131 S 340 111, 358 126' stroke='rgba(255,247,226,0.09)' stroke-width='0.85'/%3E%3C/g%3E%3C/svg%3E"),
        linear-gradient(180deg, var(--paper-light) 0%, var(--paper-base) 45%, var(--paper-dark) 100%);
    background-repeat: no-repeat, no-repeat, no-repeat, repeat, no-repeat;
    background-size: auto, auto, auto, 340px 180px, auto;
    background-attachment: fixed;
}

a {
    color: inherit;
    text-decoration: none;
}

.page {
    width: min(1160px, calc(100% - 30px));
    margin: 0 auto;
    padding: 18px 0 38px;
}

/* TOP BAR */

.topbar {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
}

.brand-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--soft-panel);
    color: var(--text);
    font-weight: 800;
    letter-spacing: 0.02em;
}

.topbar-title {
    font-weight: 700;
    color: var(--muted);
}

/* ZAJEDNIČKI PAPIR ZA SVE PROZORE */

.home-hero,
.module-shell,
.module-card,
.sentence-stage {
    background-color: var(--paper-base);
    background-image:
        radial-gradient(circle at 18% 16%, rgba(255, 244, 220, 0.085), transparent 28%),
        radial-gradient(circle at 78% 74%, rgba(145, 99, 35, 0.045), transparent 25%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='340' height='180' viewBox='0 0 340 180'%3E%3Cg fill='none'%3E%3Cpath d='M-10 25 C 20 6, 42 48, 78 27 S 138 0, 177 29 S 237 54, 281 24 S 320 2, 350 20' stroke='rgba(122,74,18,0.065)' stroke-width='1.05'/%3E%3Cpath d='M-8 60 C 22 40, 52 84, 94 58 S 154 36, 190 64 S 246 86, 290 56 S 327 40, 352 60' stroke='rgba(255,243,214,0.095)' stroke-width='0.85'/%3E%3Cpath d='M-12 98 C 18 76, 54 121, 88 96 S 149 75, 192 101 S 252 126, 299 95 S 327 73, 352 90' stroke='rgba(122,74,18,0.052)' stroke-width='0.95'/%3E%3Cpath d='M-15 138 C 30 110, 66 157, 105 132 S 167 108, 210 138 S 271 166, 318 131 S 340 111, 358 126' stroke='rgba(255,247,226,0.08)' stroke-width='0.8'/%3E%3C/g%3E%3C/svg%3E"),
        linear-gradient(180deg, var(--paper-light) 0%, var(--paper-base) 48%, var(--paper-dark) 100%);
    background-repeat: no-repeat, no-repeat, repeat, no-repeat;
    background-size: auto, auto, 340px 180px, auto;
    border: none;
    box-shadow: none;
}

/* HOME */

.home-hero {
    padding: clamp(24px, 5vw, 52px);
    border-radius: 30px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 13px;
    border-radius: 999px;
    background: var(--soft-panel);
    color: var(--text);
    font-weight: 800;
    margin-bottom: 22px;
}

.home-hero h1 {
    margin: 0;
    max-width: 850px;
    font-size: clamp(2.6rem, 8vw, 6.5rem);
    line-height: 0.94;
    letter-spacing: -0.05em;
    color: var(--text);
    font-weight: 800;
}

.home-hero p {
    margin: 22px 0 0;
    max-width: 740px;
    color: var(--muted);
    font-size: clamp(1rem, 2vw, 1.28rem);
    line-height: 1.55;
}

.module-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 18px;
}

.module-card {
    min-height: 210px;
    position: relative;
    padding: 22px;
    border-radius: 26px;
    color: var(--text);
    transition: filter 120ms ease;
}

.module-card.active:hover {
    filter: brightness(0.985);
}

.module-card.locked {
    opacity: 0.75;
}

.module-no {
    color: var(--accent);
    font-size: 0.92rem;
    font-weight: 800;
    margin-bottom: 24px;
}

.module-card h2 {
    margin: 0;
    font-size: 1.32rem;
    letter-spacing: -0.02em;
    color: var(--text);
    font-weight: 800;
}

.module-card p {
    margin: 12px 0 0;
    color: var(--muted);
    line-height: 1.45;
}

.module-card span {
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 20px;
    color: var(--accent);
    font-weight: 800;
}

/* MODULE 1 */

.module-shell {
    min-height: calc(100vh - 96px);
    padding: clamp(16px, 3vw, 26px);
    border-radius: 30px;
    display: grid;
    grid-template-rows: auto 1fr auto auto;
    gap: 16px;
}

.compact-module-head {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 12px !important;
    margin: 0 auto !important;
}

.compact-lesson-select {
    width: 78px !important;
    min-width: 78px !important;
    max-width: 78px !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 10px !important;
    border-radius: 13px !important;
    text-align: center !important;
    font-weight: 800 !important;
    font-size: 1rem !important;
    font-family: "Open Sans", sans-serif !important;
    color: var(--text) !important;
    background: var(--soft-panel) !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.compact-counter {
    width: 94px !important;
    min-width: 94px !important;
    height: 40px !important;
    border-radius: 13px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: var(--soft-panel) !important;
    color: var(--accent) !important;
    font-weight: 800 !important;
    font-size: 1rem !important;
}

.hidden-info,
.hidden-speaker,
.speaker {
    display: none !important;
}

.sentence-stage {
    display: grid;
    place-items: center;
    text-align: center;
    min-height: 410px;
    padding: clamp(20px, 5vw, 48px) 16px;
    border-radius: 28px;
}

.sentence-text {
    max-width: 980px;
    color: #111111;
    font-family: "Open Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: clamp(2.35rem, 6.6vw, 5.8rem);
    line-height: 1.08;
    letter-spacing: -0.035em;
    font-weight: 800;
    text-wrap: balance;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    min-height: 84px;
}

.control-btn {
    width: 74px;
    height: 74px;
    border-radius: 999px;
    border: none;
    background: var(--soft-panel);
    color: var(--text);
    font-size: 2rem;
    cursor: pointer;
    font-family: "Open Sans", sans-serif;
    font-weight: 800;
    box-shadow: none;
    transition: filter 120ms ease;
}

.control-btn.primary {
    width: 82px;
    height: 82px;
    background: var(--soft-panel-strong);
    color: #111111;
}

.control-btn:hover,
.control-btn.primary:hover {
    filter: brightness(0.98);
}

.status {
    min-height: 24px;
    text-align: center;
    color: var(--muted);
    font-weight: 650;
}

/* RESPONSIVE */

@media (max-width: 900px) {
    .module-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sentence-stage {
        min-height: 380px;
    }
}

@media (max-width: 640px) {
    .page {
        width: min(100% - 18px, 1160px);
        padding-top: 10px;
    }

    .topbar {
        min-height: 52px;
        font-size: 0.92rem;
    }

    .brand-link {
        min-height: 36px;
        padding: 0 12px;
    }

    .home-hero,
    .module-shell,
    .module-card,
    .sentence-stage {
        border-radius: 22px;
    }

    .module-grid {
        grid-template-columns: 1fr;
    }

    .module-card {
        min-height: 185px;
    }

    .sentence-stage {
        min-height: 390px;
        padding: 24px 14px;
    }

    .sentence-text {
        font-size: clamp(2.05rem, 10.4vw, 4.4rem);
        line-height: 1.1;
    }

    .compact-lesson-select {
        width: 72px !important;
        min-width: 72px !important;
        max-width: 72px !important;
        height: 38px !important;
        min-height: 38px !important;
        font-size: 0.92rem !important;
    }

    .compact-counter {
        width: 82px !important;
        min-width: 82px !important;
        height: 38px !important;
        font-size: 0.92rem !important;
    }

    .control-btn {
        width: 66px;
        height: 66px;
    }

    .control-btn.primary {
        width: 76px;
        height: 76px;
    }
}

/* === NO VISIBLE WINDOWS — ONLY BACKGROUND, TEXT AND BUTTONS === */

.home-hero,
.module-shell,
.module-card,
.sentence-stage,
.select-card,
.listen-card,
.lesson-meta,
.card,
.hero {
    background: transparent !important;
    background-image: none !important;
    border: none !important;
    box-shadow: none !important;
}

.module-shell {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.sentence-stage {
    background: transparent !important;
    background-image: none !important;
    border: none !important;
    box-shadow: none !important;
}

.home-hero {
    background: transparent !important;
    background-image: none !important;
    border: none !important;
    box-shadow: none !important;
}

.module-card {
    background: transparent !important;
    background-image: none !important;
    border: none !important;
    box-shadow: none !important;
}

.module-card.active:hover {
    filter: none !important;
}

.compact-lesson-select,
.compact-counter,
.brand-link {
    background: rgba(248, 232, 196, 0.42) !important;
    border: none !important;
    box-shadow: none !important;
}

.control-btn {
    background: rgba(248, 232, 196, 0.46) !important;
    border: none !important;
    box-shadow: none !important;
}

.control-btn.primary {
    background: rgba(248, 232, 196, 0.68) !important;
    border: none !important;
    box-shadow: none !important;
}

.sentence-text {
    color: #111111 !important;
    text-shadow: none !important;
}

.status {
    color: #342817 !important;
}


/* === TOPBAR LESSON/SENTENCE CONTROLS === */

.module-topbar-clean {
    position: relative !important;
    display: grid !important;
    grid-template-columns: 1fr auto 1fr !important;
    align-items: center !important;
    min-height: 56px !important;
    padding: 0 !important;
}

.module-topbar-clean .brand-link {
    justify-self: start !important;
}

.topbar-lesson-controls {
    justify-self: center !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
}

.topbar-spacer {
    justify-self: end !important;
    width: 1px !important;
    height: 1px !important;
}

.topbar-title {
    display: none !important;
}

.module-shell {
    min-height: calc(100vh - 80px) !important;
}

.compact-module-head {
    display: none !important;
}

.compact-lesson-select {
    width: 76px !important;
    min-width: 76px !important;
    max-width: 76px !important;
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 8px !important;
    border-radius: 13px !important;
    text-align: center !important;
    text-align-last: center !important;
    font-weight: 800 !important;
    font-size: 1rem !important;
}

.compact-counter {
    width: 88px !important;
    min-width: 88px !important;
    height: 38px !important;
    border-radius: 13px !important;
    font-weight: 800 !important;
    font-size: 1rem !important;
}

@media (max-width: 640px) {
    .module-topbar-clean {
        grid-template-columns: auto 1fr !important;
        gap: 10px !important;
    }

    .topbar-lesson-controls {
        justify-self: end !important;
        gap: 8px !important;
    }

    .topbar-spacer {
        display: none !important;
    }

    .compact-lesson-select {
        width: 66px !important;
        min-width: 66px !important;
        max-width: 66px !important;
        height: 36px !important;
        min-height: 36px !important;
        font-size: 0.9rem !important;
    }

    .compact-counter {
        width: 76px !important;
        min-width: 76px !important;
        height: 36px !important;
        font-size: 0.9rem !important;
    }
}

/* === MOVE L/S CONTROLS TO RIGHT === */

.module-topbar-clean {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    min-height: 56px !important;
    padding: 0 !important;
}

.module-topbar-clean .brand-link {
    flex: 0 0 auto !important;
}

.topbar-lesson-controls {
    margin-left: auto !important;
    justify-self: end !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 10px !important;
}

.topbar-spacer {
    display: none !important;
}

.compact-lesson-select {
    width: 76px !important;
    min-width: 76px !important;
    max-width: 76px !important;
}

.compact-counter {
    width: 88px !important;
    min-width: 88px !important;
}

@media (max-width: 640px) {
    .module-topbar-clean {
        display: flex !important;
        justify-content: space-between !important;
        gap: 8px !important;
    }

    .topbar-lesson-controls {
        margin-left: auto !important;
        gap: 8px !important;
    }

    .compact-lesson-select {
        width: 66px !important;
        min-width: 66px !important;
        max-width: 66px !important;
    }

    .compact-counter {
        width: 76px !important;
        min-width: 76px !important;
    }
}

/* === HIDE EMPTY STATUS LINE === */
.status:empty {
    display: none !important;
}

/* === SENTENCE TEXT 40% SMALLER === */

.sentence-text {
    font-size: clamp(1.41rem, 3.96vw, 3.48rem) !important;
    line-height: 1.14 !important;
}

@media (max-width: 640px) {
    .sentence-text {
        font-size: clamp(1.23rem, 6.24vw, 2.64rem) !important;
        line-height: 1.16 !important;
    }
}

/* === SIMPLE HOME PAGE === */

.simple-home-page {
    min-height: 100vh !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    gap: 34px !important;
    padding-top: 34px !important;
}

.simple-home-top {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 16px !important;
}

.simple-logo {
    font-weight: 800 !important;
    font-size: 1.05rem !important;
    background: rgba(248, 232, 196, 0.42) !important;
    border-radius: 999px !important;
    padding: 9px 15px !important;
    color: #111111 !important;
}

.simple-pair {
    font-weight: 700 !important;
    color: #342817 !important;
}

.simple-home-title {
    text-align: center !important;
    margin-top: 20px !important;
}

.simple-home-title h1 {
    margin: 0 !important;
    font-size: clamp(2.1rem, 5.5vw, 4.4rem) !important;
    line-height: 1.02 !important;
    letter-spacing: -0.045em !important;
    font-weight: 800 !important;
    color: #111111 !important;
}

.simple-module-list {
    width: min(720px, 100%) !important;
    margin: 0 auto !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
}

.simple-module {
    min-height: 58px !important;
    display: grid !important;
    grid-template-columns: 46px 1fr auto !important;
    align-items: center !important;
    gap: 14px !important;
    padding: 0 16px !important;
    border-radius: 18px !important;
    background: rgba(248, 232, 196, 0.38) !important;
    color: #111111 !important;
    text-decoration: none !important;
}

.simple-module.active {
    background: rgba(248, 232, 196, 0.62) !important;
}

.simple-module.disabled {
    opacity: 0.58 !important;
}

.simple-module-no {
    width: 34px !important;
    height: 34px !important;
    border-radius: 999px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(248, 232, 196, 0.52) !important;
    font-weight: 800 !important;
}

.simple-module-name {
    font-weight: 800 !important;
    font-size: 1.03rem !important;
}

.simple-module-status {
    font-weight: 700 !important;
    font-size: 0.92rem !important;
    color: #6d4310 !important;
    white-space: nowrap !important;
}

.simple-module.active:hover {
    filter: brightness(0.98) !important;
}

@media (max-width: 640px) {
    .simple-home-page {
        gap: 26px !important;
        padding-top: 18px !important;
    }

    .simple-home-top {
        align-items: flex-start !important;
    }

    .simple-home-title {
        margin-top: 8px !important;
    }

    .simple-module {
        grid-template-columns: 40px 1fr !important;
        grid-template-rows: auto auto !important;
        min-height: 66px !important;
        padding: 10px 13px !important;
        gap: 6px 10px !important;
    }

    .simple-module-status {
        grid-column: 2 !important;
        font-size: 0.86rem !important;
    }
}

/* === MODULE 1 ARROW BUTTONS === */

.nav-btn {
    font-size: 1.9rem !important;
    font-weight: 800 !important;
}

.controls {
    gap: 14px !important;
}

@media (max-width: 640px) {
    .controls {
        gap: 9px !important;
    }

    .nav-btn {
        font-size: 1.55rem !important;
    }
}

/* === MODULE 2 === */

.module2-stage {
    position: relative !important;
}

.phase-label {
    position: absolute !important;
    top: 8px !important;
    right: 12px !important;
    min-width: 42px !important;
    height: 30px !important;
    border-radius: 999px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(248, 232, 196, 0.42) !important;
    color: #6d4310 !important;
    font-weight: 800 !important;
    font-size: 0.86rem !important;
}

.module2-translation {
    margin-top: 22px !important;
    max-width: 920px !important;
    color: #342817 !important;
    font-family: "Open Sans", system-ui, sans-serif !important;
    font-size: clamp(1.15rem, 3vw, 2.2rem) !important;
    line-height: 1.22 !important;
    font-weight: 700 !important;
    text-align: center !important;
    opacity: 0.9 !important;
    text-wrap: balance !important;
}

.hidden-module2-translation {
    display: none !important;
}

.module2-controls {
    gap: 14px !important;
}

@media (max-width: 640px) {
    .phase-label {
        top: 4px !important;
        right: 8px !important;
        height: 26px !important;
        min-width: 38px !important;
        font-size: 0.78rem !important;
    }

    .module2-translation {
        font-size: clamp(1rem, 4.8vw, 1.75rem) !important;
        line-height: 1.22 !important;
    }

    .module2-controls {
        gap: 9px !important;
    }
}

/* === MODULE 5 DICTATION === */

.module5-stage {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 28px !important;
}

.module5-display {
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.module5-answer-row {
    width: min(920px, 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.module5-input {
    width: min(760px, 100%);
    height: 68px;
    border: none;
    outline: none;
    border-radius: 999px;
    background: var(--soft-panel-strong);
    color: var(--text);
    padding: 0 26px;
    font-family: "Open Sans", sans-serif;
    font-size: clamp(1.2rem, 3vw, 2rem);
    font-weight: 700;
    text-align: center;
}

.module5-check-btn {
    width: 68px;
    height: 68px;
    border: none;
    border-radius: 999px;
    background: var(--soft-panel-strong);
    color: var(--text);
    font-family: "Open Sans", sans-serif;
    font-size: 2rem;
    font-weight: 800;
    cursor: pointer;
}

@media (max-width: 640px) {
    .module5-answer-row {
        gap: 10px;
    }

    .module5-input {
        height: 58px;
        padding: 0 18px;
    }

    .module5-check-btn {
        width: 58px;
        height: 58px;
        font-size: 1.7rem;
    }

    .module5-display {
        min-height: 120px;
    }
}

/* === MODULE 6 === */

.module6-meaning {
    min-height: 34px;
    color: var(--muted);
    font-size: clamp(1rem, 2vw, 1.5rem);
    font-weight: 750;
    text-align: center;
}

/* === HOME TITLE REAL 20% SMALLER === */
.simple-home-title h1 {
    transform: scale(0.8) !important;
    transform-origin: center center !important;
    display: inline-block !important;
}

/* === HOME TITLE MOVE UP ONE ROW === */
.simple-home-title {
    margin-top: -28px !important;
}

/* === HOME MODULE BUTTONS MOVE DOWN === */
.simple-module-list {
    margin-top: 32px !important;
}


/* === MODULE 4 WORD MEANING === */
.module4-meaning {
    min-height: 34px;
    margin-top: -10px;
    color: var(--muted, rgba(255,255,255,0.62));
    opacity: 0.78;
    font-size: clamp(0.95rem, 2vw, 1.45rem);
    font-weight: 650;
    line-height: 1.25;
    text-align: center;
}

/* DE/IT Diktat u stilu sr-en module/5 */

.hidden {
    display: none !important;
}

.dictation-shell {
    grid-template-rows: 1fr auto auto;
}

.dictation-stage {
    min-height: 470px;
}

.dictation-start,
.dictation-result,
.word-drill,
.dictation-final {
    width: min(980px, 100%);
    display: grid;
    place-items: center;
    gap: 18px;
}

.dictation-main-input {
    width: min(900px, 100%);
    min-height: 150px;
    border: none;
    outline: none;
    resize: vertical;
    border-radius: 26px;
    background: var(--soft-panel);
    color: var(--text);
    padding: 24px 28px;
    font-family: "Open Sans", sans-serif;
    font-size: clamp(1.8rem, 5vw, 4.4rem);
    line-height: 1.12;
    font-weight: 800;
    text-align: center;
    letter-spacing: -0.04em;
}

.dictation-main-input:focus,
.dictation-word-input:focus,
.dictation-word-missing:focus {
    background: var(--soft-panel-strong);
}

.dictation-check-btn,
.dictation-word-play {
    width: 64px;
    height: 64px;
    border-radius: 999px;
    border: none;
    background: var(--soft-panel);
    color: var(--accent);
    font-family: "Open Sans", sans-serif;
    font-weight: 900;
    font-size: 1.8rem;
    cursor: pointer;
}

.dictation-check-btn:hover,
.dictation-word-play:hover {
    filter: brightness(0.985);
}

.dictation-slots {
    width: min(960px, 100%);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px 14px;
}

.dictation-word-ok {
    color: var(--text);
    font-size: clamp(1.6rem, 4vw, 3.4rem);
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.035em;
}

.dictation-word-missing {
    width: 150px;
    min-width: 110px;
    border: none;
    border-bottom: 4px solid rgba(109, 67, 16, 0.56);
    border-radius: 14px 14px 0 0;
    background: var(--soft-panel);
    color: var(--text);
    padding: 8px 10px;
    font-family: "Open Sans", sans-serif;
    font-size: clamp(1.3rem, 3vw, 2.3rem);
    line-height: 1.1;
    font-weight: 800;
    text-align: center;
    outline: none;
}

.dictation-extra {
    color: #7c2d15;
    font-weight: 800;
    font-size: 1rem;
    min-height: 20px;
}

.dictation-hint {
    color: var(--muted);
    font-weight: 800;
    font-size: 1.1rem;
}

.dictation-word-input {
    width: min(440px, 100%);
    border: none;
    border-radius: 22px;
    background: var(--soft-panel);
    color: var(--text);
    padding: 16px 20px;
    font-family: "Open Sans", sans-serif;
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 1.1;
    font-weight: 800;
    text-align: center;
    outline: none;
}

.dictation-shown-word {
    color: var(--text);
    font-size: clamp(2rem, 5vw, 4.4rem);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.04em;
}

@media (max-width: 640px) {
    .dictation-stage {
        min-height: 410px;
    }

    .dictation-word-missing {
        width: 120px;
    }
}

/* DE/IT Slušanje dodatak preko sr-en module/1 izgleda */

.hidden {
    display: none !important;
}

.lmt-listening-stack {
    width: min(980px, 100%);
    display: grid;
    gap: 16px;
    place-items: center;
}

.lmt-translation-text {
    max-width: 920px;
    color: #111111;
    font-size: clamp(1.55rem, 4vw, 3.4rem);
    line-height: 1.18;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.lmt-pronunciation-text {
    max-width: 920px;
    color: rgba(17, 17, 17, 0.78);
    font-size: clamp(1.2rem, 3.2vw, 2.35rem);
    line-height: 1.25;
    font-weight: 700;
    font-style: italic;
}

.lmt-toggle-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: -4px;
}

.lmt-toggle-btn {
    min-height: 38px;
    padding: 0 16px;
    border: none;
    border-radius: 999px;
    background: var(--soft-panel);
    color: var(--text);
    font-family: "Open Sans", sans-serif;
    font-weight: 800;
    font-size: 0.95rem;
    cursor: pointer;
}

.lmt-toggle-btn.active {
    background: var(--soft-panel-strong);
    color: var(--accent);
}

.lmt-toggle-btn:hover {
    filter: brightness(0.985);
}

/* MOBILE FIX — podigni tekst i dugmad na DE/IT modulima */
@media (max-width: 760px) {
    .page.module-page {
        padding-top: 8px !important;
        padding-bottom: 10px !important;
        width: min(100%, calc(100% - 16px)) !important;
    }

    .module-topbar-clean {
        min-height: 44px !important;
        margin-bottom: 4px !important;
    }

    .module-topbar-clean .brand-link {
        min-height: 32px !important;
        padding: 0 10px !important;
        font-size: 0.88rem !important;
    }

    .topbar-lesson-controls {
        gap: 6px !important;
    }

    .compact-lesson-select,
    .compact-counter {
        height: 34px !important;
        min-height: 34px !important;
        border-radius: 11px !important;
        font-size: 0.9rem !important;
    }

    .module-shell {
        min-height: calc(100vh - 58px) !important;
        padding: 10px 10px 8px !important;
        gap: 8px !important;
        grid-template-rows: 1fr auto auto !important;
    }

    .sentence-stage {
        min-height: 250px !important;
        padding: 8px 6px !important;
        align-content: start !important;
        place-items: start center !important;
    }

    .sentence-text {
        font-size: clamp(1.85rem, 9vw, 3.25rem) !important;
        line-height: 1.04 !important;
    }

    .lmt-listening-stack {
        gap: 8px !important;
        margin-top: 4px !important;
    }

    .lmt-translation-text {
        font-size: clamp(1.2rem, 6vw, 2.2rem) !important;
        line-height: 1.12 !important;
    }

    .lmt-pronunciation-text {
        font-size: clamp(1rem, 5vw, 1.75rem) !important;
        line-height: 1.14 !important;
    }

    .controls {
        margin-top: 0 !important;
        padding-top: 0 !important;
        gap: 10px !important;
    }

    .control-btn {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        min-height: 44px !important;
        font-size: 1.35rem !important;
    }

    .control-btn.primary {
        width: 58px !important;
        height: 58px !important;
        min-width: 58px !important;
        min-height: 58px !important;
        font-size: 1.55rem !important;
    }

    .lmt-toggle-controls {
        gap: 7px !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }

    .lmt-toggle-btn {
        min-height: 34px !important;
        padding: 0 12px !important;
        font-size: 0.86rem !important;
    }

    .status {
        min-height: 14px !important;
        font-size: 0.82rem !important;
    }

    .dictation-stage {
        min-height: 250px !important;
        padding: 8px 6px !important;
        align-content: start !important;
        place-items: start center !important;
    }

    .dictation-main-input {
        min-height: 100px !important;
        padding: 14px 16px !important;
        font-size: clamp(1.45rem, 7vw, 2.8rem) !important;
    }

    .dictation-check-btn,
    .dictation-word-play {
        width: 48px !important;
        height: 48px !important;
        font-size: 1.35rem !important;
    }

    .dictation-word-ok {
        font-size: clamp(1.25rem, 6vw, 2.4rem) !important;
    }

    .dictation-word-missing {
        width: 105px !important;
        min-width: 90px !important;
        font-size: 1.2rem !important;
    }
}

/* MOBILE FIX 2 — podigni dugmad na DE/IT modulima */
@media (max-width: 760px) {
    .module-shell {
        min-height: auto !important;
        height: calc(100vh - 58px) !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        gap: 6px !important;
        overflow: hidden !important;
    }

    .sentence-stage {
        flex: 0 0 auto !important;
        min-height: 210px !important;
        height: auto !important;
        padding-top: 4px !important;
        padding-bottom: 4px !important;
    }

    .controls {
        flex: 0 0 auto !important;
        transform: translateY(-18px) !important;
        margin-bottom: -18px !important;
    }

    .lmt-toggle-controls {
        flex: 0 0 auto !important;
        transform: translateY(-14px) !important;
        margin-bottom: -12px !important;
    }

    .status {
        display: none !important;
    }

    .dictation-stage {
        flex: 0 0 auto !important;
        min-height: 220px !important;
        height: auto !important;
        padding-top: 4px !important;
        padding-bottom: 4px !important;
    }

    .dictation-shell .controls {
        transform: translateY(-16px) !important;
        margin-bottom: -16px !important;
    }
}
