:root {
    --lr-blue: #2563eb;
    --lr-blue-dark: #1d4ed8;
    --lr-page: #edf4ff;
    --lr-card: #ffffff;
    --lr-text: #14213d;
    --lr-muted: #6b7280;
    --lr-line: #d8e2f1;
    --lr-shadow: 0 22px 60px rgba(52, 78, 124, .16);
}

.lr-page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 20px;
}

.lr-page-head h2 {
    margin: 4px 0 0;
}

.lr-page-head p {
    margin: 7px 0 0;
    color: var(--muted);
}

.lr-toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
}

.lr-toolbar input {
    width: min(460px, 100%);
    padding: 11px 13px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
}

.lr-grid {
    display: grid;
    gap: 14px;
}

.lr-set-card {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
}

.lr-set-icon {
    display: grid;
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    place-items: center;
    border-radius: 15px;
    background: #eef4ff;
    font-size: 25px;
}

.lr-set-content {
    min-width: 0;
    flex: 1;
}

.lr-set-topline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.lr-set-topline h3 {
    margin: 0;
}

.lr-set-topline span {
    color: var(--lr-blue);
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.lr-set-content p {
    margin: 7px 0 15px;
    color: var(--muted);
}

.lr-set-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.lr-set-actions > a:not(.button) {
    color: var(--lr-blue);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.lr-empty {
    padding: 54px 24px;
    border: 1px dashed var(--border);
    border-radius: 16px;
    background: var(--surface);
    text-align: center;
}

.lr-empty-icon {
    margin-bottom: 10px;
    font-size: 46px;
}

.lr-empty p {
    color: var(--muted);
}

.lr-player-body {
    min-height: 100vh;
    margin: 0;
    color: var(--lr-text);
    background: var(--lr-page);
    font-family: Arial, sans-serif;
}

.lr-player-shell {
    width: min(100%, 580px);
    min-height: 100dvh;
    margin: 0 auto;
    padding: 14px 16px 20px;
    box-sizing: border-box;
}

.lr-player-header {
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    align-items: center;
    gap: 8px;
    margin-bottom: 13px;
    text-align: center;
}

.lr-player-header span {
    color: #475569;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.lr-player-header h1 {
    margin: 3px 0 0;
    font-size: 24px;
}

.lr-player-back {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 12px;
    color: var(--lr-text);
    background: #fff;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(52, 78, 124, .10);
}

.lr-player-header-space {
    width: 40px;
}

.lr-progress-row {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
    font-size: 12px;
    font-weight: 700;
}

.lr-progress-track {
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: #d6e2f2;
}

.lr-progress-track i {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: var(--lr-blue);
    transition: width .22s ease;
}

.lr-practice-card {
    position: relative;
    width: 100%;
    height: clamp(300px, 58dvh, 560px);
    min-height: 0;
    overflow: hidden;
    border-radius: 25px;
    background: var(--lr-card);
    box-shadow: var(--lr-shadow);
}

.lr-image-button {
    display: grid;
    width: 100%;
    height: 100%;
    padding: 12px;
    place-items: center;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.lr-image-button img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.lr-answer {
    position: absolute;
    inset: auto 0 0;
    padding: 22px 18px 20px;
    background: linear-gradient(180deg, rgba(255,255,255,.20), rgba(255,255,255,.97) 28%);
    text-align: center;
}

.lr-answer h2 {
    margin: 18px 0 4px;
    font-size: 40px;
}

.lr-answer div {
    color: var(--lr-blue);
    font-size: 20px;
    font-weight: 700;
}

.lr-answer p {
    margin: 8px 0 0;
    color: #334155;
    font-size: 24px;
    font-weight: 700;
}

.lr-listen-button,
.lr-show-button {
    display: flex;
    width: 100%;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 11px;
    border-radius: 14px;
    font-weight: 800;
    cursor: pointer;
}

.lr-listen-button {
    border: 0;
    color: #fff;
    background: var(--lr-blue);
}

.lr-listen-button:hover {
    background: var(--lr-blue-dark);
}

.lr-show-button {
    border: 1px solid var(--lr-line);
    color: var(--lr-text);
    background: #fff;
}

.lr-player-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 10px;
}

.lr-player-controls button {
    min-height: 48px;
    border: 1px solid var(--lr-line);
    border-radius: 13px;
    color: var(--lr-text);
    background: #fff;
    font-weight: 800;
    cursor: pointer;
}

.lr-player-controls button:disabled {
    cursor: not-allowed;
    opacity: .45;
}

.lr-player-empty {
    padding: 50px 24px;
    border-radius: 20px;
    background: #fff;
    text-align: center;
}

.lr-player-empty > div {
    font-size: 48px;
}

@media (max-width: 650px) {
    .lr-page-head {
        flex-direction: column;
    }

    .lr-set-card {
        padding: 14px;
    }

    .lr-player-shell {
        width: 100%;
        padding: 10px 10px 15px;
    }

    .lr-player-header {
        margin-bottom: 9px;
    }

    .lr-player-header h1 {
        font-size: 21px;
    }

    .lr-practice-card {
        height: clamp(280px, calc(100dvh - 287px), 520px);
        min-height: 0;
        max-height: none;
        border-radius: 21px;
    }

    .lr-image-button {
        padding: 5px;
    }

    .lr-answer h2 {
        font-size: 34px;
    }

    .lr-answer p {
        font-size: 21px;
    }
}

@media (max-width: 380px), (max-height: 700px) {
    .lr-player-shell {
        padding: 8px 8px 12px;
    }

    .lr-player-header {
        margin-bottom: 6px;
    }

    .lr-player-header h1 {
        font-size: 19px;
    }

    .lr-progress-row {
        margin-bottom: 7px;
    }

    .lr-practice-card {
        height: clamp(240px, calc(100dvh - 270px), 430px);
        border-radius: 18px;
    }

    .lr-image-button {
        padding: 4px;
    }

    .lr-listen-button,
    .lr-show-button {
        min-height: 44px;
        margin-top: 8px;
    }

    .lr-player-controls {
        gap: 8px;
        margin-top: 8px;
    }

    .lr-player-controls button {
        min-height: 44px;
    }

    .lr-answer {
        padding: 18px 14px 16px;
    }

    .lr-answer h2 {
        margin-top: 14px;
        font-size: 30px;
    }

    .lr-answer div {
        font-size: 17px;
    }

    .lr-answer p {
        font-size: 19px;
    }
}

