
/* ═══════════════════════════════════════════════════════
   LISTENING — shared engine styles
   3-round listening practice (Repeat / Type / Translate),
   contextual hints, gamification bar, TTS voice handling.
   Design tokens match site-wide --lg-* system (Sora font).
   ═══════════════════════════════════════════════════════ */

:root {
    --lg-green:     #22c55e;
    --lg-green-dk:  #16a34a;
    --lg-green-lt:  #f0fdf4;
    --lg-indigo:    #4f46e5;
    --lg-indigo-dk: #4338ca;
    --lg-indigo-lt: #e0e7ff;
    --lg-amber:     #f59e0b;
    --lg-amber-lt:  #fef3c7;
    --lg-red:       #ef4444;
    --lg-red-lt:    #fef2f2;
    --lg-bg:        #f8fafc;
    --lg-surface:   #ffffff;
    --lg-border:    #e2e8f0;
    --lg-border-hi: #cbd5e1;
    --lg-ink:       #0f172a;
    --lg-ink-2:     #475569;
    --lg-ink-3:     #94a3b8;
    --lg-radius:    12px;
    --lg-font:      'Sora', sans-serif;
    --lg-mono:      'JetBrains Mono', monospace;
}

.lejp-activity-wrap { font-family: var(--lg-font); color: var(--lg-ink); }
.lejp-activity-wrap * { box-sizing: border-box; }

/* ── Completed banner (shown on reload if already finished) ──── */
.li-completed-banner {
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
    background: var(--lg-green-lt); border: 2px solid var(--lg-green);
    border-radius: var(--lg-radius); padding: 16px 18px; margin-bottom: 1.25rem;
}
.li-completed-banner__icon { font-size: 1.6rem; line-height: 1; }
.li-completed-banner__body { flex: 1; min-width: 200px; }
.li-completed-banner__title {
    font-family: var(--lg-font); font-weight: 700;
    color: var(--lg-green-dk); margin-bottom: 2px;
}
.li-completed-banner__sub {
    font-size: .85rem; color: var(--lg-ink-2); margin: 0;
}
.li-completed-banner__actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── Live Gamification Bar ─────────────────────────────── */
.li-live-bar {
    display: flex; justify-content: space-between; align-items: center;
    min-height: 26px; margin-bottom: 1.25rem; padding: 0 4px;
}
.li-streak  { font-size: .95rem; font-weight: 800; color: #ea580c; min-width: 90px; }
.li-xp-live { font-size: .95rem; font-weight: 800; color: var(--lg-indigo); text-align: right; min-width: 90px; }

/* ── Keyboard Hints ────────────────────────────────────── */
kbd {
    display: inline-block; padding: 2px 6px; margin: 0 1px;
    border: 1px solid var(--lg-border); border-radius: 4px;
    background: #f1f5f9; font-size: .7rem; font-family: monospace; color: var(--lg-ink-2);
}

/* ── Round header ─────────────────────────────────────────────── */
.li-round-header {
    display: flex; align-items: center; gap: 14px;
    padding: 16px 20px; background: var(--lg-indigo-lt);
    border: 2px solid var(--lg-indigo); border-radius: var(--lg-radius);
    margin-bottom: 1.5rem;
}
.li-round-badge {
    width: 42px; height: 42px; border-radius: 50%;
    background: var(--lg-indigo); color: #fff; font-size: 18px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.li-round-title { font-size: 1rem; font-weight: 700; color: var(--lg-ink); margin: 0; font-family: var(--lg-font); }
.li-round-sub   { font-size: .82rem; color: var(--lg-ink-2); margin: 3px 0 0; line-height: 1.45; }

/* ── Progress dots ────────────────────────────────────────────── */
.li-dots { display: flex; gap: 5px; align-items: center; margin-bottom: 1rem; flex-wrap: wrap; }
.li-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--lg-border); transition: all .2s ease; }
.li-dot.done    { background: var(--lg-green); }
.li-dot.current { background: var(--lg-indigo); width: 22px; border-radius: 5px; }

/* ── Speaker card ─────────────────────────────────────────────── */
.li-speaker-card {
    background: var(--lg-indigo); border-radius: var(--lg-radius);
    padding: 28px 24px; text-align: center; margin-bottom: 1.25rem;
    position: relative; overflow: hidden;
}
.li-speaker-card::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(ellipse at 30% 50%, rgba(255,255,255,.12) 0%, transparent 70%);
    pointer-events: none;
}
.li-speaker-label {
    font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
    color: rgba(255,255,255,.6); margin-bottom: 14px; font-family: var(--lg-font);
}

/* Waveform animation */
.li-waveform { display: flex; align-items: center; justify-content: center; gap: 4px; height: 40px; margin: 0 auto 18px; }
.li-wave-bar { width: 4px; border-radius: 2px; background: rgba(255,255,255,.3); height: 8px; transition: height .1s ease; }
.li-waveform.playing .li-wave-bar { animation: li-wave .8s ease-in-out infinite; }
.li-wave-bar:nth-child(1) { animation-delay: 0s; }
.li-wave-bar:nth-child(2) { animation-delay: .1s; }
.li-wave-bar:nth-child(3) { animation-delay: .2s; }
.li-wave-bar:nth-child(4) { animation-delay: .3s; }
.li-wave-bar:nth-child(5) { animation-delay: .15s; }
.li-wave-bar:nth-child(6) { animation-delay: .05s; }
.li-wave-bar:nth-child(7) { animation-delay: .25s; }
@keyframes li-wave {
    0%,100% { height: 6px;  background: rgba(255,255,255,.3); }
    50%      { height: 32px; background: #a5b4fc; }
}

/* Play buttons */
.li-play-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.li-play-btn {
    display: inline-flex; align-items: center; gap: 7px; padding: 10px 20px;
    border-radius: 100px; border: 2px solid rgba(255,255,255,.35);
    background: rgba(255,255,255,.12); color: #fff; font-family: var(--lg-font);
    font-size: .88rem; font-weight: 700; cursor: pointer; transition: all .18s ease;
    backdrop-filter: blur(4px);
}
.li-play-btn:hover   { background: rgba(255,255,255,.24); border-color: rgba(255,255,255,.65); }
.li-play-btn.playing { background: var(--lg-amber); border-color: var(--lg-amber); }
.li-play-btn.playing { background: var(--lg-amber); border-color: var(--lg-amber); color: #000; }
.li-play-btn--slow   { font-size: .8rem; opacity: .85; }
.li-accent-label {
    font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
    color: rgba(255,255,255,.5); margin-bottom: 8px; font-family: var(--lg-font);
}

.li-phrase-reveal {
    font-size: 1.05rem; font-weight: 600; color: rgba(255,255,255,.9);
    text-align: center; margin-top: 14px; min-height: 1.4em;
    line-height: 1.5;
}

/* ── ★ Contextual Study Tip (hint) ───────────────────────────── */
.li-hint-wrap {
    margin-bottom: 1.25rem;
}
.li-hint-toggle {
    display: flex; align-items: center; gap: 8px; width: 100%;
    padding: 10px 14px; border-radius: var(--lg-radius);
    border: 2px solid var(--lg-border); border-bottom: 3px solid var(--lg-border-hi);
    background: var(--lg-bg); cursor: pointer; font-family: var(--lg-font);
    font-size: .82rem; font-weight: 700; color: var(--lg-ink-2);
    text-align: left; transition: all .15s ease; user-select: none;
}
.li-hint-toggle:hover {
    border-color: var(--lg-amber); border-bottom-color: #d97706;
    background: var(--lg-amber-lt); color: #92400e;
}
.li-hint-toggle[aria-expanded="true"] {
    border-color: var(--lg-amber); border-bottom-color: #d97706;
    background: var(--lg-amber-lt); color: #92400e;
    border-radius: var(--lg-radius) var(--lg-radius) 0 0; border-bottom-width: 2px;
}
.li-hint-toggle__icon {
    font-size: .95rem; flex-shrink: 0;
}
.li-hint-toggle__label {
    flex: 1;
}
.li-hint-toggle__chevron {
    font-size: .7rem; transition: transform .2s ease; flex-shrink: 0; opacity: .6;
}
.li-hint-toggle[aria-expanded="true"] .li-hint-toggle__chevron {
    transform: rotate(180deg);
}
.li-hint-body {
    display: none; padding: 14px 16px;
    border: 2px solid var(--lg-amber); border-top: none;
    border-radius: 0 0 var(--lg-radius) var(--lg-radius);
    background: #fffbeb;
}
.li-hint-body.is-open { display: block; }
.li-hint-body__en {
    font-size: .9rem; color: #78350f; line-height: 1.65; margin-bottom: 10px;
    font-family: var(--lg-font);
}
.li-hint-body__en strong { color: #92400e; }
.li-hint-body__divider {
    border: none; border-top: 1px dashed #f6c87a; margin: 10px 0;
}
.li-hint-body__jp {
    font-size: .88rem; color: #b45309; line-height: 1.75;
    font-family: var(--lg-font);
}

/* ── Repeat phase controls ────────────────────────────────────── */
.li-repeat-instruction {
    text-align: center; padding: 14px; background: var(--lg-bg);
    border: 2px solid var(--lg-border); border-radius: var(--lg-radius);
    margin-bottom: 1.25rem;
}
.li-repeat-instruction__title { font-size: 1rem; font-weight: 700; color: var(--lg-ink); margin: 0 0 4px; font-family: var(--lg-font); }
.li-repeat-instruction__sub   { font-size: .85rem; color: var(--lg-ink-2); margin: 0; line-height: 1.5; }

.li-jp-reveal {
    background: var(--lg-amber-lt); border: 2px solid var(--lg-amber);
    border-radius: var(--lg-radius); padding: 14px 18px; margin-bottom: 1rem; display: none;
}
.li-jp-reveal.visible { display: block; }
.li-jp-reveal__label { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #b45309; margin-bottom: 6px; font-family: var(--lg-font); }
.li-jp-reveal__text  { font-size: 1.05rem; font-weight: 700; color: var(--lg-ink); }

.li-self-rate { display: flex; gap: 8px; margin-bottom: 1rem; }
.li-rate-btn {
    flex: 1; padding: .75rem .5rem; border-radius: var(--lg-radius); border: 2px solid;
    font-family: var(--lg-font); font-size: .85rem; font-weight: 700; cursor: pointer;
    text-align: center; transition: all .18s ease;
}
.li-rate-btn--good { border-color: var(--lg-green); color: var(--lg-green-dk); background: var(--lg-surface); border-bottom: 4px solid var(--lg-green-dk); }
.li-rate-btn--good:hover { background: var(--lg-green-lt); transform: translateY(-1px); }
.li-rate-btn--good:active { transform: translateY(2px); border-bottom-width: 2px; }
.li-rate-btn--ok   { border-color: var(--lg-amber); color: #b45309; background: var(--lg-surface); border-bottom: 4px solid #92400e; }
.li-rate-btn--ok:hover   { background: var(--lg-amber-lt); transform: translateY(-1px); }
.li-rate-btn--ok:active { transform: translateY(2px); border-bottom-width: 2px; }

/* ── Type input ───────────────────────────────────────────────── */
.li-type-area { margin-bottom: 1rem; }
.li-type-label {
    font-size: .78rem; font-weight: 700; color: var(--lg-ink-2); letter-spacing: .06em;
    text-transform: uppercase; margin-bottom: 8px; display: block; font-family: var(--lg-font);
}
.li-type-input {
    width: 100%; padding: .9rem 1rem; border: 2px solid var(--lg-border);
    border-bottom: 4px solid var(--lg-border-hi); border-radius: var(--lg-radius);
    font-family: var(--lg-font); font-size: 1rem; font-weight: 600; color: var(--lg-ink);
    background: var(--lg-bg); outline: none; transition: border-color .15s, box-shadow .15s;
}
.li-type-input:focus { border-color: var(--lg-indigo); background: #fff; box-shadow: 0 0 0 3px rgba(79,70,229,.1); }
.li-type-input.is-correct { border-color: var(--lg-green);  border-bottom-color: var(--lg-green-dk); background: var(--lg-green-lt); }
.li-type-input.is-wrong   { border-color: var(--lg-red);    border-bottom-color: var(--lg-red);      background: var(--lg-red-lt); }

.li-check-btn {
    display: block; width: 100%; padding: .85rem; border-radius: var(--lg-radius); border: none;
    border-bottom: 4px solid var(--lg-green-dk); background: var(--lg-green); color: #fff;
    font-family: var(--lg-font); font-size: .95rem; font-weight: 700; cursor: pointer;
    transition: all .18s ease; margin-top: .75rem;
}
.li-check-btn:hover:not(:disabled) { background: var(--lg-green-dk); transform: translateY(-1px); }
.li-check-btn:active:not(:disabled){ transform: translateY(3px); border-bottom-width: 1px; }
.li-check-btn:disabled { opacity: .4; cursor: default; transform: none; border-bottom-color: var(--lg-border-hi); background: var(--lg-border); color: var(--lg-ink-3); }

/* ── Translate area ───────────────────────────────────────────── */
.li-trans-textarea {
    width: 100%; padding: .9rem 1rem; border: 2px solid var(--lg-border);
    border-bottom: 4px solid var(--lg-border-hi); border-radius: var(--lg-radius);
    font-family: var(--lg-font); font-size: 1rem; font-weight: 600; color: var(--lg-ink);
    background: var(--lg-bg); outline: none; resize: vertical; min-height: 80px;
    transition: border-color .15s;
}
.li-trans-textarea:focus { border-color: var(--lg-indigo); background: #fff; box-shadow: 0 0 0 3px rgba(79,70,229,.1); }

.li-model-jp {
    display: none; margin-top: .75rem; padding: 12px 16px; background: var(--lg-green-lt);
    border: 2px solid var(--lg-green); border-radius: var(--lg-radius);
    font-size: .95rem; font-weight: 700; color: var(--lg-green-dk); line-height: 1.55;
}
.li-model-jp.visible { display: block; }
.li-model-jp__label  { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--lg-green-dk); margin-bottom: 6px; font-family: var(--lg-font); }

/* ── Feedback ─────────────────────────────────────────────────── */
.lejp-feedback {
    display: none; padding: 14px; border-radius: var(--lg-radius); margin: 1rem 0;
    font-size: .95rem; font-weight: 600; line-height: 1.5; font-family: var(--lg-font);
}
.lejp-feedback.is-visible { display: block; }
.lejp-feedback--correct { background: var(--lg-green-lt); color: var(--lg-green-dk); border: 2px solid var(--lg-green); }
.lejp-feedback--wrong   { background: var(--lg-red-lt);   color: #b91c1c;            border: 2px solid var(--lg-red); }

/* ── Nav buttons ──────────────────────────────────────────────── */
.lejp-nav { display: flex; gap: 10px; margin-top: 1rem; }
.lejp-nav button { flex: 1; }
.lejp-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 24px; border-radius: var(--lg-radius); font-family: var(--lg-font);
    font-size: 1rem; font-weight: 700; cursor: pointer; transition: all .18s ease; border: none;
}
.lejp-btn--primary { background: var(--lg-indigo); color: #fff; border-bottom: 4px solid var(--lg-indigo-dk); }
.lejp-btn--primary:hover { background: var(--lg-indigo-dk); transform: translateY(-1px); }
.lejp-btn--primary:active { transform: translateY(2px); border-bottom-width: 2px; }
.lejp-btn--ghost {
    background: transparent; color: var(--lg-ink-2);
    border: 2px solid var(--lg-border); border-bottom: 4px solid var(--lg-border-hi);
}
.lejp-btn--ghost:hover { border-color: var(--lg-indigo); color: var(--lg-indigo); background: var(--lg-indigo-lt); transform: translateY(-1px); }
.lejp-btn--ghost:active { transform: translateY(2px); border-bottom-width: 2px; }
.lejp-btn:disabled { opacity: .4; cursor: default; transform: none !important; }

/* ── Progress bar ─────────────────────────────────────────────── */
.lejp-progress { margin-bottom: 1.5rem; }
.lejp-progress__track { height: 8px; background: var(--lg-border); border-radius: 4px; overflow: hidden; margin-bottom: 8px; }
.lejp-progress__fill  { height: 100%; background: var(--lg-indigo); border-radius: 4px; transition: width .3s ease; }
.lejp-progress__label { display: flex; justify-content: space-between; font-size: .85rem; font-weight: 700; color: var(--lg-ink-2); }

/* ── Card ─────────────────────────────────────────────────────── */
.lejp-card {
    background: var(--lg-surface); border: 2px solid var(--lg-border);
    border-radius: var(--lg-radius); padding: 24px; margin-bottom: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

/* ── Score screen ─────────────────────────────────────────────── */
.lejp-score-screen { text-align: center; }
.lejp-score-screen__emoji    { font-size: 4rem; margin-bottom: 10px; }
.lejp-score-screen__title    { font-size: 1.5rem; font-weight: 800; color: var(--lg-ink); font-family: var(--lg-font); margin-bottom: 5px; }
.lejp-score-screen__xp       { display: inline-block; padding: 6px 16px; background: var(--lg-indigo-lt); color: var(--lg-indigo-dk); font-weight: 800; border-radius: 100px; margin-bottom: 20px; border: 2px solid var(--lg-indigo); }
.lejp-score-screen__actions  { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 1rem; }
.li-score-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 1rem 0 1.5rem; }
.li-score-tile { background: var(--lg-bg); border: 2px solid var(--lg-border); border-radius: var(--lg-radius); padding: 16px 8px; text-align: center; }
.li-score-tile__num   { font-size: 1.75rem; font-weight: 900; display: block; margin-bottom: 4px; font-family: var(--lg-font); }
.li-score-tile__label { font-size: .75rem; color: var(--lg-ink-3); font-weight: 700; line-height: 1.3; display: block; font-family: var(--lg-font); text-transform: uppercase; letter-spacing: .05em; }

/* ── Related links ────────────────────────────────────────────── */
.li-related { display: flex; flex-direction: column; gap: 9px; margin-top: 2rem; text-align: left; }
.li-related-link {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px; border-radius: var(--lg-radius); text-decoration: none;
    border: 2px solid var(--lg-border); border-bottom: 4px solid var(--lg-border-hi);
    transition: all .15s ease; background: var(--lg-surface);
}
.li-related-link:hover { border-color: var(--lg-indigo); border-bottom-color: var(--lg-indigo-dk); background: var(--lg-indigo-lt); transform: translateY(-1px); }
.li-related-link:active { transform: translateY(2px); border-bottom-width: 2px; }
.li-related-link__text { font-size: 1rem; font-weight: 700; color: var(--lg-ink); font-family: var(--lg-font); }
.li-related-link__sub  { font-size: .85rem; color: var(--lg-ink-2); display: block; margin-top: 4px; }

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 480px) {
    .li-self-rate   { flex-direction: column; }
    .li-score-grid  { grid-template-columns: 1fr; }
    .li-play-btns   { flex-direction: column; align-items: stretch; }
    .li-play-btn    { justify-content: center; }
    .lejp-nav       { flex-direction: column; }
    .lejp-score-screen__actions { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
    .li-waveform.playing .li-wave-bar { animation: none; height: 20px; background: #a5b4fc; }
    .li-hint-toggle__chevron { transition: none; }
}

/* ── Pre-activity article banner ──────────────────────── */
.lejp-article-banner {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 14px; padding: 16px 18px;
    background: var(--lg-indigo-lt, #e0e7ff); border: 2px solid var(--lg-indigo, #4f46e5);
    border-radius: 14px; margin-bottom: 20px; position: relative; z-index: 2;
}
.lejp-article-banner__icon { font-size: 1.4rem; flex-shrink: 0; line-height: 1; margin-top: 2px; }
.lejp-article-banner__body { flex: 1; }
.lejp-article-banner__title {
    font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
    color: var(--lg-indigo, #4f46e5); margin-bottom: 3px;
}
.lejp-article-banner__text {
    font-size: .88rem; font-weight: 700; color: var(--lg-ink, #0f172a); line-height: 1.4; margin-bottom: 8px;
}
.lejp-article-banner__link {
    display: inline-flex; align-items: center; gap: 5px;
    background: var(--lg-indigo, #4f46e5); color: #fff;
    font-size: .78rem; font-weight: 800; padding: 6px 14px;
    border-radius: 100px; text-decoration: none; transition: opacity .15s;
}
.lejp-article-banner__link:hover { opacity: .85; }
.lejp-article-banner__dismiss {
    background: none; border: none; cursor: pointer; padding: 4px;
    color: var(--lg-ink-3, #94a3b8); font-size: 1.1rem; line-height: 1;
    border-radius: 50%; width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    transition: color .15s, background .15s; flex-shrink: 0;
}
.lejp-article-banner__dismiss:hover { color: var(--lg-ink, #0f172a); background: rgba(0,0,0,.06); }
.lejp-article-banner__restore {
    display: none; align-items: center; gap: 6px; background: none;
    border: 1.5px dashed rgba(79,70,229,.4); border-radius: 8px;
    padding: 5px 10px; cursor: pointer; font-size: .72rem; font-weight: 700;
    color: var(--lg-indigo, #4f46e5); margin-bottom: 12px;
    transition: border-color .15s, background .15s;
}
.lejp-article-banner__restore:hover { border-color: var(--lg-indigo, #4f46e5); background: var(--lg-indigo-lt, #e0e7ff); }
.lejp-article-banner__restore.visible { display: flex; }

/* ── Tabbed Study Guide variant (ported from quiz-engine.css) ──────── */
.lejp-activity-wrap.li-tabbed {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

/* Dashboard navigation tabs */
.li-view-switcher {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
}
.li-switch-btn {
    flex: 1;
    padding: 14px;
    font-size: .95rem;
    font-weight: 700;
    border-radius: var(--lg-radius);
    cursor: pointer;
    font-family: var(--lg-font);
    border: 2px solid var(--lg-border);
    background: var(--lg-surface);
    color: var(--lg-ink-2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}
.li-switch-btn.active {
    background: var(--lg-indigo);
    color: #fff;
    border-color: var(--lg-indigo-dk);
    box-shadow: 0 4px 12px rgba(79,70,229,0.2);
}

/* View panels */
.li-panel { display: none; }
.li-panel.active { display: block; animation: liPanelFade 0.3s ease forwards; }
@keyframes liPanelFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* Study guide card */
.li-guide-card {
    background: var(--lg-surface);
    border: 2px solid var(--lg-border);
    border-radius: var(--lg-radius);
    padding: 24px;
    margin-bottom: 24px;
}
.li-guide-card h2 { font-size: 1.4rem; color: var(--lg-indigo); margin-top: 0; border-bottom: 2px solid var(--lg-indigo-lt); padding-bottom: 8px; }
.li-guide-card h3 { font-size: 1.1rem; color: var(--lg-ink); margin: 18px 0 10px; }
.li-guide-card h4 { font-size: 1rem; color: var(--lg-ink-2); margin: 16px 0 8px; text-transform: uppercase; letter-spacing: 0.02em; }

/* Vocabulary grid block */
.li-vocab-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-bottom: 16px; }
.li-vocab-item { background: var(--lg-bg); border: 1px solid var(--lg-border); padding: 12px 14px; border-radius: 8px; display: flex; flex-direction: column; gap: 4px; }
.li-vocab-en { font-family: var(--lg-mono); font-weight: 700; color: var(--lg-indigo); font-size: .95rem; }
.li-vocab-jp { font-size: .82rem; color: var(--lg-ink-2); font-weight: 600; }

/* Functional phrase items */
.li-phrase-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.li-phrase-item { background: var(--lg-bg); border-left: 4px solid var(--lg-indigo); padding: 12px 16px; border-radius: 0 8px 8px 0; }
.li-phrase-en { font-weight: 700; color: var(--lg-ink); font-size: .95rem; margin-bottom: 4px; }
.li-phrase-jp { font-size: .85rem; color: var(--lg-ink-2); }

/* Comparative styling cards (naturalness blocks) */
.li-compare-grid { display: grid; grid-template-columns: 1fr; gap: 12px; margin-bottom: 16px; }
@media (min-width: 640px) { .li-compare-grid { grid-template-columns: 1fr 1fr; } }
.li-compare-card { padding: 14px 16px; border-radius: var(--lg-radius); border: 2px solid var(--lg-border); position: relative; }
.li-compare-card--bad { background: var(--lg-red-lt); border-color: var(--lg-red); color: #991b1b; }
.li-compare-card--good { background: var(--lg-green-lt); border-color: var(--lg-green); color: #166534; }
.li-compare-badge { font-family: var(--lg-mono); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; margin-bottom: 6px; display: block; }

/* Common error containers */
.li-mistake-block { background: var(--lg-bg); border: 2px solid var(--lg-border); border-left: 4px solid var(--lg-red); border-radius: var(--lg-radius); padding: 16px; margin-bottom: 16px; }
.li-mistake-title { font-weight: 700; color: var(--lg-ink); margin-bottom: 8px; font-size: 1.05rem; }

/* Dialogue flow container (guide content — distinct from #li-live #li-round markup) */
.li-guide-card .li-dialogue-wrap { background: var(--lg-bg); border: 1px solid var(--lg-border); border-radius: var(--lg-radius); padding: 16px; margin-bottom: 16px; display: flex; flex-direction: column; gap: 12px; }
.li-guide-card .li-line { display: flex; flex-direction: column; gap: 2px; padding-bottom: 8px; border-bottom: 1px dashed var(--lg-border); }
.li-guide-card .li-line:last-child { border-bottom: none; padding-bottom: 0; }
.li-guide-card .li-speaker { font-family: var(--lg-mono); font-weight: 700; color: var(--lg-indigo); font-size: 0.85rem; text-transform: uppercase; }
.li-guide-card .li-text-en { font-weight: 600; color: var(--lg-ink); font-size: .95rem; }

/* Practice template rendering box */
.li-template-box { background: linear-gradient(135deg, var(--lg-indigo-lt), #f3e8ff); border: 2px dashed var(--lg-indigo); border-radius: var(--lg-radius); padding: 18px; font-size: .95rem; line-height: 1.6; color: var(--lg-ink); font-weight: 600; margin-bottom: 16px; }
