:root {
    color-scheme: light;
}

.lf-shell {
    min-height: 100vh;
    padding: 24px;
    background: linear-gradient(135deg, #fff8ee 0%, #f2f7ff 48%, #f7f1ff 100%);
    color: #172033;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.lf-top,
.lf-hero,
.lf-deck-meta,
.lf-board,
.lf-progress,
.lf-actions,
.lf-strip {
    max-width: 1180px;
    margin-left: auto;
    margin-right: auto;
}

.lf-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.lf-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #172033;
    text-decoration: none;
    font-weight: 800;
    font-size: 20px;
}

.lf-brand img {
    width: 48px;
    height: 48px;
}

.lf-scorebar,
.lf-deck-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.lf-scorebar div,
.lf-deck-meta div {
    min-width: 104px;
    padding: 10px 14px;
    border: 1px solid rgba(23, 32, 51, 0.12);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 12px 28px rgba(23, 32, 51, 0.08);
}

.lf-scorebar span,
.lf-label {
    display: block;
    margin-bottom: 3px;
    color: #637083;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.lf-scorebar strong,
.lf-deck-meta strong {
    font-size: 20px;
}

.lf-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    align-items: end;
    gap: 24px;
    margin-bottom: 18px;
}

.lf-kicker {
    margin: 0 0 8px;
    color: #0f766e;
    font-weight: 800;
    text-transform: uppercase;
}

.lf-hero h1 {
    margin: 0;
    max-width: 780px;
    font-size: clamp(34px, 6vw, 72px);
    line-height: 0.95;
}

.lf-copy {
    max-width: 760px;
    margin: 18px 0 0;
    color: #435063;
    font-size: 18px;
    line-height: 1.55;
}

.lf-language-picker {
    display: grid;
    gap: 8px;
    padding: 16px;
    border: 1px solid rgba(23, 32, 51, 0.12);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.74);
}

.lf-language-picker span {
    color: #637083;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.lf-language-picker select {
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid #b8c0cc;
    border-radius: 6px;
    background: white;
    color: #172033;
    font: inherit;
    font-weight: 700;
}

.lf-deck-meta {
    margin-bottom: 20px;
}

.lf-progress {
    margin-bottom: 20px;
    padding: 14px 16px;
    border: 1px solid rgba(23, 32, 51, 0.12);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.76);
    box-shadow: 0 12px 28px rgba(23, 32, 51, 0.08);
}

.lf-progress-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 10px;
    color: #172033;
}

.lf-progress-head span {
    color: #637083;
    font-size: 13px;
    font-weight: 800;
}

.lf-progress-track {
    height: 12px;
    border-radius: 999px;
    background: #dbe3ee;
    overflow: hidden;
}

.lf-progress-track span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #0f766e, #f59f00);
    transition: width 180ms ease;
}

.lf-board {
    display: grid;
    grid-template-columns: 58px minmax(0, 760px) 58px;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.lf-nav {
    width: 58px;
    height: 58px;
    border: 0;
    border-radius: 50%;
    background: #172033;
    color: white;
    font-size: 42px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 16px 30px rgba(23, 32, 51, 0.18);
}

.lf-card {
    min-height: 620px;
    border: 1px solid rgba(23, 32, 51, 0.14);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 24px 70px rgba(23, 32, 51, 0.18);
    overflow: hidden;
}

.lf-card-face {
    display: grid;
    min-height: 620px;
    grid-template-rows: minmax(0, 1fr) auto;
}

.lf-image-wrap {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 470px;
    background: #f6f8fb;
    overflow: hidden;
}

.lf-image-wrap img {
    width: 100%;
    height: 100%;
    max-height: 508px;
    object-fit: cover;
    object-position: center 62%;
    transform: scale(1.32);
    display: block;
}

.lf-loading {
    position: absolute;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(23, 32, 51, 0.78);
    color: white;
    font-size: 13px;
    font-weight: 800;
}

.lf-loading.is-hidden {
    display: none;
}

.lf-word-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 24px;
    border-top: 1px solid rgba(23, 32, 51, 0.1);
}

#lf-english,
.lf-card-level {
    display: block;
}

.lf-card-level {
    margin-bottom: 4px;
    color: #637083;
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
}

#lf-english {
    font-size: 42px;
    font-weight: 900;
    text-transform: capitalize;
}

.lf-word-row button,
.lf-card-back button,
.lf-actions button {
    min-height: 46px;
    border: 0;
    border-radius: 8px;
    padding: 0 18px;
    font: inherit;
    font-weight: 850;
    cursor: pointer;
}

.lf-word-row button,
.lf-card-back button {
    background: #0f766e;
    color: white;
}

.lf-card-back {
    place-items: center;
    align-content: center;
    gap: 16px;
    padding: 42px;
    text-align: center;
    background:
        linear-gradient(150deg, rgba(255, 255, 255, 0.95), rgba(250, 245, 255, 0.92)),
        repeating-linear-gradient(0deg, transparent 0, transparent 42px, rgba(23, 32, 51, 0.05) 43px);
}

.lf-target {
    margin: 0;
    font-size: clamp(54px, 10vw, 108px);
    line-height: 1;
    font-weight: 950;
}

.lf-pronunciation {
    margin: 0;
    color: #0f766e;
    font-size: 28px;
    font-weight: 850;
}

.lf-example {
    max-width: 620px;
    margin: 0;
    color: #435063;
    font-size: 24px;
    line-height: 1.4;
}

.lf-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.lf-secondary {
    background: white;
    color: #172033;
    border: 1px solid rgba(23, 32, 51, 0.14) !important;
}

.lf-review {
    background: #f59f00;
    color: #172033;
}

.lf-known {
    background: #2f9e44;
    color: white;
}

.lf-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 22px;
}

.lf-chip {
    min-height: 44px;
    border: 1px solid rgba(23, 32, 51, 0.12);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.74);
    color: #172033;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.lf-chip.is-active {
    background: #172033;
    color: white;
}

.lf-chip.is-known {
    border-color: rgba(47, 158, 68, 0.42);
    box-shadow: inset 0 -4px 0 rgba(47, 158, 68, 0.35);
}

.lf-chip.is-review {
    border-color: rgba(245, 159, 0, 0.48);
    box-shadow: inset 0 -4px 0 rgba(245, 159, 0, 0.35);
}

@media (max-width: 780px) {
    .lf-shell {
        padding: 14px;
    }

    .lf-top,
    .lf-hero {
        grid-template-columns: 1fr;
        display: grid;
    }

    .lf-top {
        justify-items: start;
    }

    .lf-board {
        grid-template-columns: 44px minmax(0, 1fr) 44px;
        gap: 8px;
    }

    .lf-nav {
        width: 44px;
        height: 44px;
        font-size: 32px;
    }

    .lf-card,
    .lf-card-face {
        min-height: 520px;
    }

    .lf-image-wrap {
        min-height: 360px;
    }

    .lf-image-wrap img {
        object-position: center bottom;
        transform: scale(1.9);
        transform-origin: center bottom;
    }

    #lf-english {
        font-size: 30px;
    }

    .lf-word-row {
        align-items: stretch;
        flex-direction: column;
    }
}
