/* ═══════════════════════════════════════════════════════════
   LISTEN & CHOOSE — Ink & Cream (matches design system)
   Palette: #241a08 ink · #FFEDE1 cream · #ffffff paper
            #8f4e00 primary · #d7f9ff sky
   ═══════════════════════════════════════════════════════════ */

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

/* ── Page ─────────────────────────────────────────── */
.lac-page {
    min-height: 100vh;
    background: var(--bg, #fff8f3);
    font-family: var(--font-body, 'Plus Jakarta Sans', sans-serif);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.75rem 1rem 3rem;
    gap: 1.25rem;
    width: 100%;
    box-sizing: border-box;
}

/* ── Header ──────────────────────────────────────── */
.lac-header {
    width: 100%;
    max-width: 700px;
    text-align: center;
}

.lac-title {
    font-family: var(--font-display, 'Plus Jakarta Sans', sans-serif);
    font-size: clamp(1.8rem, 5vw, 2.4rem);
    font-weight: 800;
    color: var(--ink, #241a08) !important;
    -webkit-text-fill-color: var(--ink, #241a08) !important;
    margin: 0 0 .2rem;
    letter-spacing: -.02em;
}

.lac-subtitle {
    color: var(--ink-muted, #887364);
    font-size: .88rem;
    margin: 0 0 .9rem;
}

/* ── Stats row ───────────────────────────────────── */
.lac-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .45rem;
    align-items: center;
}

.lac-stat {
    font-size: .83rem;
    font-weight: 700;
    border-radius: 999px;
    padding: .25rem .9rem;
    background: #ffffff;
    border: 1.5px solid rgba(143, 78, 0, .15);
    color: var(--ink-secondary, #544336);
    -webkit-text-fill-color: var(--ink-secondary, #544336);
}

.lac-stat-score {
    background: var(--primary-light, #ffebcf);
    border-color: rgba(143, 78, 0, .3);
    color: var(--primary-dark, #693700);
    -webkit-text-fill-color: var(--primary-dark, #693700);
}

.lac-stat-streak {
    background: var(--yellow-light, #fff2e1);
    border-color: rgba(253, 153, 55, .4);
    color: var(--yellow-dark, #AE5600);
    -webkit-text-fill-color: var(--yellow-dark, #AE5600);
}

.lac-stat-q {
    background: var(--surface-alt, #fff2e1);
    border-color: rgba(143, 78, 0, .2);
    color: var(--ink-secondary, #544336);
    -webkit-text-fill-color: var(--ink-secondary, #544336);
}

.lac-mode-btn {
    font-size: .8rem;
    font-weight: 700;
    border-radius: 999px;
    padding: .32rem 1rem;
    background: #ffffff;
    border: 1.5px solid rgba(143, 78, 0, .2);
    color: var(--ink-secondary, #544336);
    -webkit-text-fill-color: var(--ink-secondary, #544336);
    cursor: pointer;
    transition: all .2s;
    font-family: var(--font-body, 'Plus Jakarta Sans', sans-serif);
}

.lac-mode-btn:hover {
    background: var(--primary-light, #ffebcf);
    border-color: var(--primary, #8f4e00);
    color: var(--primary-dark, #693700);
    -webkit-text-fill-color: var(--primary-dark, #693700);
}

.lac-mode-hard {
    background: rgba(186, 26, 26, .07) !important;
    color: #ba1a1a !important;
    -webkit-text-fill-color: #ba1a1a !important;
    border-color: rgba(186, 26, 26, .25) !important;
}

/* ── Feedback strip ─────────────────────────────── */
.lac-feedback {
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    min-height: 1.5rem;
    transition: all .2s;
}

.lac-fb-correct {
    color: var(--primary, #8f4e00) !important;
    -webkit-text-fill-color: var(--primary, #8f4e00) !important;
    animation: lacFeedIn .3s ease;
}

.lac-fb-wrong {
    color: #ba1a1a !important;
    -webkit-text-fill-color: #ba1a1a !important;
    animation: lacFeedIn .3s ease;
}

.lac-sentence-ctx {
    color: var(--ink-muted, #887364);
    -webkit-text-fill-color: var(--ink-muted, #887364);
    font-style: italic;
    font-weight: 500;
}

@keyframes lacFeedIn {
    from {
        opacity: 0;
        transform: scale(.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ── Section ────────────────────────────────────── */
.lac-section {
    width: 100%;
    max-width: 700px;
}

/* ── Listening state ─────────────────────────────── */
.lac-listening {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .65rem;
    padding: 2rem 1rem;
}

.lac-mic-pulse {
    font-size: 5rem;
    animation: lacPulse 1.1s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(215, 249, 255, .35));
}

@keyframes lacPulse {

    0%,
    100% {
        transform: scale(1);
        filter: brightness(1);
    }

    50% {
        transform: scale(1.18);
        filter: brightness(1.4);
    }
}

.lac-listen-label {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ink-muted, #887364);
    -webkit-text-fill-color: var(--ink-muted, #887364);
}

/* ── Buttons grid ────────────────────────────────── */
.lac-buttons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(115px, 1fr));
    gap: 1rem;
    max-width: 620px;
    margin: 0 auto;
}

.lac-btn {
    background: #ffffff;
    border: 1.5px solid rgba(143, 78, 0, .12);
    border-radius: 28px;
    padding: 1.1rem .65rem .9rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .45rem;
    transition: all .22s cubic-bezier(.34, 1.56, .64, 1);
    box-shadow: var(--shadow-sm, 0 2px 10px rgba(143,78,0,.08));
}

.lac-btn:hover:not(:disabled) {
    border-color: rgba(143, 78, 0, .5);
    background: var(--primary-light, #ffebcf);
    transform: translateY(-5px);
    box-shadow: 0 10px 28px rgba(143, 78, 0, .18);
}

.lac-btn:disabled {
    opacity: .35;
    cursor: not-allowed;
    transform: none;
}

.lac-btn-emoji {
    font-size: 3.5rem;
    line-height: 1;
    display: block;
    transition: transform .22s cubic-bezier(.34, 1.56, .64, 1);
}

.lac-btn:hover:not(:disabled) .lac-btn-emoji {
    transform: scale(1.12);
}

.lac-btn-word {
    font-size: .82rem;
    font-weight: 700;
    color: var(--ink-muted, #887364);
    -webkit-text-fill-color: var(--ink-muted, #887364);
    visibility: visible;
    height: 1rem;
    transition: all .2s;
}

.lac-word-hidden {
    visibility: hidden !important;
}

/* ── Correct / Wrong ─────────────────────────────── */
.lac-correct {
    border-color: rgba(71, 184, 161, .5) !important;
    background: rgba(71, 184, 161, .08) !important;
    transform: scale(1.06) !important;
    box-shadow: 0 6px 24px rgba(71, 184, 161, .15) !important;
}

.lac-correct .lac-btn-word {
    color: #47b8a1 !important;
    -webkit-text-fill-color: #47b8a1 !important;
    visibility: visible !important;
}

.lac-wrong {
    border-color: rgba(186, 26, 26, .45) !important;
    background: rgba(186, 26, 26, .07) !important;
    animation: lacShake .35s ease;
}

@keyframes lacShake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-7px);
    }

    75% {
        transform: translateX(7px);
    }
}

/* ── Controls ─────────────────────────────────────── */
.lac-controls {
    display: flex;
    justify-content: center;
    margin-top: 1.1rem;
}

.lac-ctrl-btn {
    background: var(--surface-alt, #fff2e1);
    border: 1.5px solid rgba(143, 78, 0, .2);
    border-radius: 999px;
    padding: .5rem 1.6rem;
    font-size: .88rem;
    font-weight: 700;
    font-family: var(--font-body, 'Plus Jakarta Sans', sans-serif);
    color: var(--ink-secondary, #544336);
    -webkit-text-fill-color: var(--ink-secondary, #544336);
    cursor: pointer;
    transition: all .18s;
}

.lac-ctrl-btn:hover {
    background: var(--primary-light, #ffebcf);
    border-color: var(--primary, #8f4e00);
    color: var(--primary-dark, #693700);
    -webkit-text-fill-color: var(--primary-dark, #693700);
}

/* ── Grammar Note card ───────────────────────────────────── */
.lac-grammar-card,
.lac-say-card {
    background: var(--paper, #ffffff);
    border: 1.5px solid rgba(143, 78, 0, .17);
    border-radius: 22px;
    padding: 2rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .8rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(36, 26, 8, .07);
    animation: lacFadeCard .3s ease;
}

@keyframes lacFadeCard {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lac-grammar-icon,
.lac-say-icon {
    font-size: 2.5rem;
    line-height: 1;
}

.lac-grammar-label,
.lac-say-label {
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--ink-muted, #887364);
}

.lac-grammar-rule {
    font-size: .97rem;
    font-weight: 700;
    color: var(--ink, #241a08);
    -webkit-text-fill-color: var(--ink, #241a08);
    max-width: 520px;
}

.lac-grammar-example,
.lac-say-sentence {
    font-family: var(--font-display, 'Playfair Display', serif);
    font-size: 1.1rem;
    font-weight: 600;
    font-style: italic;
    color: var(--ink-muted, #887364);
    -webkit-text-fill-color: var(--ink-muted, #887364);
}

/* ── Say It mic button ───────────────────────────────────── */
.lac-say-btn,
.lac-mic-start-btn {
    background: var(--primary, #8f4e00);
    border: none;
    border-radius: 999px;
    padding: .7rem 2rem;
    font-family: var(--font-body, 'Plus Jakarta Sans', sans-serif);
    font-size: .95rem;
    font-weight: 800;
    color: #ffffff;
    -webkit-text-fill-color: #ffffff;
    cursor: pointer;
    transition: transform .18s cubic-bezier(.34, 1.56, .64, 1), box-shadow .18s;
    box-shadow: 0 4px 14px rgba(143, 78, 0, .30);
}

.lac-say-btn:hover,
.lac-mic-start-btn:hover:not(:disabled) {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 22px rgba(143, 78, 0, .42);
}

.lac-mic-start-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
    transform: none;
}

/* ── Say It feedback ─────────────────────────────────────── */
.lac-say-feedback {
    min-height: 1.3rem;
    font-size: .9rem;
    font-weight: 700;
    color: var(--ink-muted, #887364);
    -webkit-text-fill-color: var(--ink-muted, #887364);
}

.lac-fb-ok {
    color: #47b8a1 !important;
    -webkit-text-fill-color: #47b8a1 !important;
}

.lac-fb-err {
    color: #ba1a1a !important;
    -webkit-text-fill-color: #ba1a1a !important;
}

/* ── Skip button ─────────────────────────────────────────── */
.lac-skip-btn {
    background: none;
    border: 1px solid rgba(36, 26, 8, .12);
    border-radius: 10px;
    padding: .35rem .9rem;
    font-size: .8rem;
    font-weight: 600;
    color: var(--ink-muted, #887364);
    -webkit-text-fill-color: var(--ink-muted, #887364);
    cursor: pointer;
    font-family: var(--font-body, 'Nunito', sans-serif);
    transition: background .15s, color .15s;
}

.lac-skip-btn:hover {
    background: rgba(36, 26, 8, .05);
    color: var(--ink, #241a08);
    -webkit-text-fill-color: var(--ink, #241a08);
}
