.ll-vocab-lesson-page {
    --ll-vlp-bg: #f8f5ee;
    --ll-vlp-bg-accent: #eef6f1;
    --ll-vlp-card: #ffffff;
    --ll-vlp-border: #e6ded1;
    --ll-vlp-text: #2e2a24;
    --ll-vlp-muted: #6b6256;
    --ll-vlp-accent: #1f6b5c;
    background: radial-gradient(1000px 360px at 20% 0%, var(--ll-vlp-bg-accent), transparent 65%),
        linear-gradient(180deg, var(--ll-vlp-bg), #fbfaf7 70%);
    color: var(--ll-vlp-text);
    padding: clamp(24px, 4vw, 48px) clamp(18px, 5vw, 60px) clamp(40px, 6vw, 70px);
    min-height: 70vh;
}

.ll-vocab-lesson-page * {
    box-sizing: border-box;
}

.ll-vocab-lesson-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    max-width: 1100px;
    margin: 0 auto 24px;
}

.ll-vocab-lesson-top-row,
.ll-vocab-lesson-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.ll-vocab-lesson-title-row {
    justify-content: space-between;
}

.ll-vocab-lesson-title {
    margin: 0;
    font-size: clamp(26px, 3.5vw, 38px);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.ll-vocab-lesson-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--ll-vlp-border);
    background: var(--ll-vlp-card);
    background-image: none;
    color: var(--ll-vlp-accent) !important;
    text-decoration: none !important;
    font-weight: 600;
    font-family: inherit;
    font-size: 0.9rem;
    box-shadow: 0 6px 14px rgba(46, 42, 36, 0.08);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    text-transform: none;
    -webkit-appearance: none;
    appearance: none;
}

.ll-vocab-lesson-back:focus-visible,
.ll-vocab-lesson-back:hover {
    border-color: rgba(31, 107, 92, 0.4);
    box-shadow: 0 10px 20px rgba(46, 42, 36, 0.12);
    transform: translateY(-2px);
    outline: none;
}

.ll-vocab-lesson-back__icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(31, 107, 92, 0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ll-vocab-lesson-back__icon svg {
    width: 14px;
    height: 14px;
}

.ll-vocab-lesson-star-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.ll-vocab-lesson-transcribe {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ll-vocab-lesson-transcribe-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.ll-vocab-lesson-transcribe-icons {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.ll-vocab-lesson-transcribe-btn {
    border-color: #cbd5e1 !important;
    background: #ffffff !important;
    color: #0f172a !important;
}

.ll-vocab-lesson-transcribe-btn:hover {
    border-color: #94a3b8 !important;
    background: #f8fafc !important;
}

.ll-vocab-lesson-transcribe-btn--replace {
    border-color: #bfdbfe !important;
    background: #eff6ff !important;
    color: #1d4ed8 !important;
}

.ll-vocab-lesson-transcribe-btn--replace:hover {
    border-color: #93c5fd !important;
    background: #dbeafe !important;
}

.ll-vocab-lesson-transcribe-btn--clear {
    border-color: #fecaca !important;
    background: #fef2f2 !important;
    color: #b91c1c !important;
}

.ll-vocab-lesson-transcribe-btn--clear:hover {
    border-color: #fca5a5 !important;
    background: #fee2e2 !important;
}

.ll-vocab-lesson-transcribe-btn--cancel {
    border-color: #e2e8f0 !important;
    background: transparent !important;
    color: #475569 !important;
}

.ll-vocab-lesson-transcribe-btn--cancel:hover {
    border-color: #cbd5e1 !important;
    background: #f8fafc !important;
}

.ll-vocab-lesson-transcribe-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.ll-vocab-lesson-transcribe-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    color: inherit;
}

.ll-vocab-lesson-transcribe-icon svg {
    width: 100%;
    height: 100%;
}

.ll-vocab-lesson-transcribe-status {
    font-size: 12px;
    color: var(--ll-vlp-muted);
    min-height: 1em;
}

.ll-vocab-lesson-transcribe-status.is-error {
    color: #b91c1c;
}

.ll-vocab-lesson-star-toggle {
    margin: 0;
}

.ll-vocab-lesson-page .ll-study-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid #cbd5e1 !important;
    background: #fff !important;
    background-image: none !important;
    color: #0f172a !important;
    cursor: pointer;
    font-weight: 600 !important;
    font-family: inherit !important;
    font-size: inherit;
    line-height: 1;
    margin: 0;
    text-decoration: none !important;
    text-transform: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
    white-space: nowrap;
    -webkit-appearance: none !important;
    appearance: none !important;
    transition: all 0.15s ease;
}

.ll-vocab-lesson-page .ll-study-btn.tiny {
    padding: 6px 10px;
    font-size: 13px;
    line-height: 1.2;
    white-space: nowrap;
}

.ll-vocab-lesson-page .ll-study-btn.ghost {
    padding: 6px 10px;
    font-weight: 500 !important;
    background: transparent !important;
}

.ll-vocab-lesson-page .ll-study-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.1) !important;
}

.ll-vocab-lesson-page .ll-group-star {
    min-width: 120px;
    justify-content: center;
    border-color: #e2e8f0 !important;
}

.ll-vocab-lesson-page .ll-group-star.active {
    background: #fff7ed !important;
    border-color: #f59e0b !important;
    color: #b45309 !important;
}

.ll-vocab-lesson-settings {
    position: relative;
    display: inline-flex;
    align-items: center;
    --ll-tools-fab-size: 36px;
}

.ll-vocab-lesson-settings-button.ll-tools-settings-button {
    background: #6b7280 !important;
    background-color: #6b7280 !important;
    background-image: none !important;
    color: #ffffff !important;
    border: none !important;
    text-shadow: none !important;
    box-shadow: 0 6px 14px rgba(46, 42, 36, 0.08);
}

.ll-vocab-lesson-settings-button.ll-tools-settings-button:hover {
    background: #4b5563 !important;
    background-color: #4b5563 !important;
    box-shadow: 0 10px 20px rgba(46, 42, 36, 0.12);
}

.ll-vocab-lesson-settings-panel.ll-tools-settings-panel {
    top: calc(100% + 10px) !important;
    bottom: auto !important;
    right: 0 !important;
    width: max-content !important;
    max-width: 90vw !important;
    overflow-x: auto;
}

.ll-vocab-lesson-settings-panel .ll-tools-settings-options {
    grid-template-columns: 1fr;
}

.ll-vocab-lesson-settings-panel .ll-tools-settings-option {
    white-space: nowrap;
}

.ll-vocab-lesson-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.ll-vocab-lesson-modes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.ll-vocab-lesson-mode-button {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 8px 14px !important;
    border-radius: 12px !important;
    border: 1px solid var(--ll-vlp-border) !important;
    background: var(--ll-vlp-card) !important;
    background-image: none !important;
    color: var(--ll-vlp-text) !important;
    font-weight: 600 !important;
    font-family: inherit !important;
    font-size: 0.9rem !important;
    line-height: 1 !important;
    cursor: pointer !important;
    box-shadow: 0 6px 14px rgba(46, 42, 36, 0.08) !important;
    text-decoration: none !important;
    text-transform: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.ll-vocab-lesson-mode-button:hover,
.ll-vocab-lesson-mode-button:focus-visible {
    border-color: rgba(31, 107, 92, 0.4) !important;
    box-shadow: 0 10px 20px rgba(46, 42, 36, 0.12) !important;
    transform: translateY(-2px);
    outline: none;
}

.ll-vocab-lesson-mode-button:focus-visible {
    outline: 3px solid rgba(31, 107, 92, 0.35);
    outline-offset: 2px;
}

.ll-vocab-lesson-mode-icon {
    width: 28px;
    height: 28px;
    border-radius: 9px;
    background: rgba(31, 107, 92, 0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    line-height: 1;
    font-family: "Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji", system-ui, sans-serif;
    -webkit-text-size-adjust: none;
}

.ll-vocab-lesson-mode-icon::before {
    content: attr(data-emoji);
}

.ll-vocab-lesson-content {
    max-width: 1100px;
    margin: 0 auto;
}

.ll-vocab-lesson-content .word-grid {
    margin-top: 12px;
}

@media (max-width: 600px) {
    .ll-vocab-lesson-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .ll-vocab-lesson-star-controls {
        margin-left: 0;
    }

    .ll-vocab-lesson-title-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .ll-vocab-lesson-actions {
        width: 100%;
    }

    .ll-vocab-lesson-settings {
        margin-left: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ll-vocab-lesson-back {
        transition: none;
    }

    .ll-vocab-lesson-mode-button,
    .ll-vocab-lesson-page .ll-study-btn {
        transition: none;
    }
}
