html.pv-dark-boot body { background: #121212; }
.pv-page [hidden] { display: none !important; }

.pv-page {
    --pv-gold: #F5B301;
    --pv-green: #1FA463;
    --pv-red: #E5484D;
    --pv-blue: #2F6FEB;
    --pv-locked: #C9C9C9;
    background: var(--background);
    color: var(--text-main);
    font-family: 'Sarabun', 'Plus Jakarta Sans', sans-serif;
}
body.dark-mode.pv-page { --pv-locked: #4A4A4A; }
body.pv-noscroll { overflow: hidden; }

.pv-nav-right { display: flex; gap: 10px; align-items: center; }
.pv-nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.pv-nav-link:hover { color: var(--primary); background: var(--primary-light); }
body.dark-mode .pv-nav-link:hover { background: rgba(222, 17, 83, 0.12); }
.pv-icon-btn { padding: 10px; background: transparent; border: 1px solid var(--border); color: var(--text-main); }

.pv-user-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 4px 4px 4px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
}
.pv-user-name { font-weight: 600; font-size: 14px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    overflow: hidden;
    flex-shrink: 0;
}
.pv-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pv-avatar-lg { width: 52px; height: 52px; font-size: 22px; }
.pv-role {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .3px;
    color: var(--primary);
    background: var(--primary-light);
    padding: 2px 8px;
    border-radius: 999px;
    vertical-align: middle;
}
body.dark-mode .pv-role { background: rgba(222, 17, 83, 0.16); }
.pv-logout {
    border: none;
    background: transparent;
    color: var(--text-muted);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 999px;
}
.pv-logout:hover { color: var(--primary); background: var(--primary-light); }

.pv-main { max-width: 860px; margin: 0 auto; padding: 28px 18px 80px; min-height: 70vh; }

.pv-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    font: inherit;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    color: var(--text-main);
    background: var(--surface);
}
.pv-btn:disabled { opacity: .45; cursor: not-allowed; }
.pv-btn-primary { background: var(--primary); color: #fff; box-shadow: 0 4px 0 var(--primary-hover); }
.pv-btn-primary:hover:not(:disabled) { background: var(--primary-hover); }
.pv-btn-primary:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 2px 0 var(--primary-hover); }
.pv-btn-ghost { border-color: var(--border); }
.pv-btn-ghost:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.pv-btn-google { border-color: var(--border); box-shadow: 0 2px 10px var(--shadow); }
.pv-btn-google:hover { border-color: var(--primary); }
.pv-btn-small { padding: 8px 14px; font-size: 13px; border-color: var(--border); }
.pv-btn-small:hover { border-color: var(--primary); color: var(--primary); }
.pv-full { width: 100%; }
.pv-icon-round { width: 46px; height: 46px; padding: 0; border-radius: 50%; border-color: var(--border); }
.pv-icon-round:hover { color: var(--primary); border-color: var(--primary); }

.pv-gate { text-align: center; padding: 50px 10px 30px; }
.pv-gate-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: .5px;
    font-family: 'Plus Jakarta Sans', sans-serif;
}
body.dark-mode .pv-gate-badge { background: rgba(222, 17, 83, 0.15); }
.pv-gate h1 { font-size: clamp(30px, 5vw, 44px); margin: 16px 0 12px; line-height: 1.25; }
.pv-gate h1 span { color: var(--primary); font-family: 'Plus Jakarta Sans', sans-serif; }
.pv-gate p { color: var(--text-muted); max-width: 560px; margin: 0 auto 28px; font-size: 17px; line-height: 1.7; }
.pv-gate-parts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 0 auto 30px; max-width: 720px; }
.pv-gate-parts div {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.pv-gate-parts b { font-family: 'Plus Jakarta Sans', sans-serif; color: var(--primary); }
.pv-gate-parts span { font-size: 13px; color: var(--text-muted); }
.pv-gate-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.pv-loading { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 80px 0; color: var(--text-muted); text-align: center; }
.pv-spinner { width: 38px; height: 38px; border: 4px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: pv-spin .8s linear infinite; }
@keyframes pv-spin { to { transform: rotate(360deg); } }

.pv-bar { height: 8px; background: var(--border); border-radius: 999px; overflow: hidden; margin: 6px 0 4px; }
.pv-bar span { display: block; height: 100%; background: var(--primary); border-radius: 999px; transition: width .5s ease; }

.pv-stats { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 12px; margin-bottom: 14px; }
.pv-hello, .pv-stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
}
.pv-hello { display: flex; align-items: center; gap: 14px; }
.pv-hello > div { flex: 1; min-width: 0; }
.pv-hello-name { font-weight: 700; font-size: 18px; }
.pv-hello-sub { font-size: 13px; color: var(--text-muted); }
.pv-stat { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 2px; }
.pv-stat b { font-size: 22px; font-family: 'Plus Jakarta Sans', sans-serif; }
.pv-stat small { font-size: 12px; color: var(--text-muted); }
.pv-stat-ic { display: inline-flex; }
.pv-stat-ic.is-fire { color: #FF7A1A; }
.pv-stat-ic.is-xp { color: var(--pv-blue); }
.pv-stat-ic.is-star { color: var(--pv-gold); }

.pv-quests { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; margin-bottom: 18px; }
.pv-quests-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; color: var(--primary); }
.pv-quests-head b { color: var(--text-main); }
.pv-quests-head small { margin-left: auto; color: var(--text-muted); font-size: 12px; }
.pv-quest-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pv-quest { border: 1px dashed var(--border); border-radius: var(--radius-md); padding: 10px 12px; }
.pv-quest-top { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; font-weight: 600; }
.pv-quest-top small { color: var(--pv-blue); white-space: nowrap; }
.pv-quest-count { font-size: 12px; color: var(--text-muted); }
.pv-quest.is-done { border-style: solid; border-color: var(--pv-green); }
.pv-quest.is-done .pv-bar span { background: var(--pv-green); }
.pv-quest.is-done .pv-quest-top small { color: var(--pv-green); }

.pv-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 18px; position: sticky; top: 64px; z-index: 20; background: var(--background); padding: 6px 0; }
.pv-tab {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-main);
    border-radius: var(--radius-md);
    padding: 10px 6px;
    cursor: pointer;
    font: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    transition: var(--transition);
}
.pv-tab b { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 15px; }
.pv-tab small { font-size: 12px; color: var(--text-muted); }
.pv-tab:hover { border-color: var(--primary); }
.pv-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.pv-tab.active small { color: rgba(255, 255, 255, .85); }

.pv-hint { font-size: 14px; color: var(--text-muted); background: var(--surface); border-left: 4px solid var(--primary); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 16px; line-height: 1.6; }

.pv-admin {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    border: 1px solid var(--primary);
    background: var(--primary-light);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    margin-bottom: 14px;
}
body.dark-mode .pv-admin { background: rgba(222, 17, 83, 0.1); }
.pv-admin small { display: block; color: var(--text-muted); font-size: 13px; margin-top: 2px; }
.pv-admin-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pv-admin-note { margin-top: 14px; font-size: 13px; color: var(--primary); background: var(--primary-light); border-radius: var(--radius-sm); padding: 10px 12px; }
body.dark-mode .pv-admin-note { background: rgba(222, 17, 83, 0.1); }

.pv-section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); margin-bottom: 14px; overflow: hidden; }
.pv-sec-head { display: flex; align-items: center; gap: 14px; padding: 16px; cursor: pointer; user-select: none; }
.pv-sec-head:hover { background: rgba(0, 0, 0, .015); }
.pv-sec-info { flex: 1; min-width: 0; }
.pv-sec-info h3 { margin: 0; font-size: 17px; font-family: 'Plus Jakarta Sans', 'Sarabun', sans-serif; }
.pv-sec-info h3 small { font-weight: 500; color: var(--text-muted); font-size: 13px; font-family: 'Sarabun', sans-serif; }
.pv-sec-info > small { font-size: 12px; color: var(--text-muted); }
.pv-lv-badge {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
    color: #fff;
    font-family: 'Plus Jakarta Sans', sans-serif;
    flex-shrink: 0;
}
.lv-A1 { background: #1FA463; }
.lv-A2 { background: #2F6FEB; }
.lv-B1 { background: #8B5CF6; }
.lv-B2 { background: var(--primary); }
.lv-EX { background: #F59E0B; }
.pv-section.is-locked .pv-lv-badge { filter: grayscale(.8); opacity: .6; }
.pv-sec-actions { display: flex; align-items: center; gap: 8px; }
.pv-sec-done { color: var(--pv-green); display: inline-flex; }
.pv-chev { color: var(--text-muted); display: inline-flex; transition: transform .25s; }
.pv-section.is-open .pv-chev { transform: rotate(180deg); }

.pv-road { padding: 18px 0 30px; display: flex; flex-direction: column; align-items: center; gap: 6px; border-top: 1px solid var(--border); --k: 1; }
.pv-node-row { display: flex; flex-direction: column; align-items: center; transform: translateX(calc(var(--x) * var(--k))); }
.pv-node {
    position: relative;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    color: #fff;
    font: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .15s ease;
    background: var(--primary);
    box-shadow: 0 6px 0 var(--primary-hover);
}
.pv-node:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--primary-hover); }
.pv-node-ic { display: inline-flex; }
.pv-node-ic b { font-size: 24px; font-family: 'Plus Jakarta Sans', sans-serif; }
.pv-node.type-review { background: var(--pv-blue); box-shadow: 0 6px 0 #1E4FB8; border-radius: 22px; }
.pv-node.is-done { background: var(--pv-gold); box-shadow: 0 6px 0 #C48C00; }
.pv-node.is-locked { background: var(--pv-locked); box-shadow: 0 6px 0 rgba(0, 0, 0, .15); color: rgba(255, 255, 255, .9); cursor: not-allowed; }
.pv-node.is-empty { opacity: .45; }
.pv-node.is-current { animation: pv-pulse 1.8s ease-in-out infinite; }
@keyframes pv-pulse {
    0%, 100% { outline: 0 solid rgba(222, 17, 83, .35); outline-offset: 4px; }
    50% { outline: 8px solid rgba(222, 17, 83, 0); outline-offset: 10px; }
}
.pv-bubble {
    position: absolute;
    top: -38px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--surface);
    color: var(--primary);
    border: 2px solid var(--primary);
    font-weight: 700;
    font-size: 13px;
    padding: 4px 10px;
    border-radius: 10px;
    white-space: nowrap;
    animation: pv-bob 1.4s ease-in-out infinite;
}
.pv-bubble::after {
    content: '';
    position: absolute;
    bottom: -7px;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--primary);
    border-bottom: 0;
}
@keyframes pv-bob { 50% { transform: translate(-50%, -4px); } }
.pv-stars { position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%); display: flex; gap: 1px; font-size: 14px; background: var(--surface); padding: 0 5px; border-radius: 999px; border: 1px solid var(--border); }
.pv-stars i { font-style: normal; color: var(--pv-locked); }
.pv-stars i.on { color: var(--pv-gold); }
.pv-node-label { margin: 16px 0 14px; display: flex; flex-direction: column; align-items: center; line-height: 1.2; }
.pv-node-label b { font-size: 13px; font-family: 'Plus Jakarta Sans', sans-serif; }
.pv-node-label small { font-size: 11px; color: var(--text-muted); }

.pv-coming { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 30px 24px; text-align: center; }
.pv-coming h2 { margin: 10px 0; font-family: 'Plus Jakarta Sans', sans-serif; }
.pv-coming p { color: var(--text-muted); max-width: 560px; margin: 0 auto 18px; line-height: 1.7; }
.pv-phase { display: inline-block; font-size: 12px; font-weight: 700; color: var(--pv-blue); border: 1px solid var(--pv-blue); padding: 3px 10px; border-radius: 999px; }
.pv-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 20px; }
.pv-chips span { border: 1px solid var(--border); border-radius: 999px; padding: 6px 12px; font-size: 13px; }

.pv-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 3000;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s;
}
.pv-overlay.open { opacity: 1; pointer-events: auto; }
.pv-dialog {
    background: var(--surface);
    color: var(--text-main);
    border-radius: var(--radius-lg);
    width: 100%;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
    transform: translateY(12px);
    transition: transform .2s;
}
.pv-overlay.open .pv-dialog { transform: none; }
.pv-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}
.pv-close:hover { color: var(--primary); border-color: var(--primary); }

.pv-auth { max-width: 400px; padding: 28px 24px 22px; }
.pv-auth h2 { margin: 0 0 18px; text-align: center; }
.pv-or { display: flex; align-items: center; gap: 10px; color: var(--text-muted); font-size: 13px; margin: 18px 0; }
.pv-or::before, .pv-or::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.pv-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; font-size: 14px; font-weight: 600; }
.pv-field[hidden] { display: none; }
.pv-auth-err { color: var(--pv-red); font-size: 13px; min-height: 18px; margin-bottom: 8px; }
.pv-auth-foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 14px; font-size: 13px; color: var(--text-muted); }
.pv-auth-foot a { color: var(--primary); font-weight: 600; text-decoration: none; }

.pv-lesson { max-width: 620px; min-height: 420px; display: flex; flex-direction: column; }
.pv-lesson-head { padding: 18px 60px 10px 22px; }
.pv-lesson-head .pv-close { top: 14px; }
.pv-lesson-title { font-weight: 700; font-size: 17px; font-family: 'Plus Jakarta Sans', 'Sarabun', sans-serif; }
.pv-progress { height: 6px; background: var(--border); margin: 0 22px; border-radius: 999px; overflow: hidden; }
.pv-progress span { display: block; height: 100%; width: 0; background: var(--pv-green); transition: width .35s ease; }
.pv-lesson-body { padding: 20px 22px 26px; flex: 1; }

.pv-hub-meta { font-size: 13px; color: var(--text-muted); margin-bottom: 14px; }
.pv-step {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    text-align: left;
    padding: 14px;
    margin-bottom: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    color: var(--text-main);
    font: inherit;
    cursor: pointer;
    transition: var(--transition);
}
.pv-step:hover:not(:disabled) { border-color: var(--primary); transform: translateY(-1px); }
.pv-step:disabled { opacity: .55; cursor: not-allowed; }
.pv-step-ic { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--primary-light); color: var(--primary); flex-shrink: 0; }
body.dark-mode .pv-step-ic { background: rgba(222, 17, 83, 0.14); }
.pv-step.is-passed .pv-step-ic { background: rgba(31, 164, 99, .14); color: var(--pv-green); }
.pv-step-txt { flex: 1; display: flex; flex-direction: column; }
.pv-step-txt small { color: var(--text-muted); font-size: 13px; }
.pv-step-status { font-size: 13px; color: var(--text-muted); white-space: nowrap; display: inline-flex; }
.pv-wordlist { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.pv-wordlist span { font-size: 13px; padding: 4px 10px; border-radius: 999px; background: var(--background); border: 1px solid var(--border); }
.pv-wordlist span.is-missing { border-style: dashed; color: var(--text-muted); }
.pv-hub-center { text-align: center; padding-top: 10px; }
.pv-hub-center p { color: var(--text-muted); line-height: 1.7; }
.pv-big-ic { width: 70px; height: 70px; margin: 0 auto; border-radius: 22px; background: var(--pv-blue); color: #fff; display: flex; align-items: center; justify-content: center; }
.pv-big-ic svg { width: 34px; height: 34px; }

.pv-learn { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.pv-learn-count { font-size: 13px; color: var(--text-muted); font-weight: 600; }
.pv-flash { width: 100%; max-width: 440px; height: 250px; perspective: 1000px; cursor: pointer; position: relative; }
.pv-flash-face {
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    text-align: center;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transition: transform .45s ease;
    background: var(--surface);
    box-shadow: 0 8px 24px var(--shadow);
}
.pv-flash-front small, .pv-flash-back small { color: var(--text-muted); font-size: 12px; }
.pv-flash-back { transform: rotateY(180deg); background: var(--primary-light); }
body.dark-mode .pv-flash-back { background: #2A1A20; }
.pv-flash.is-flipped .pv-flash-front { transform: rotateY(-180deg); }
.pv-flash.is-flipped .pv-flash-back { transform: rotateY(0); }
.pv-flash-word { font-size: 38px; font-weight: 800; font-family: 'Plus Jakarta Sans', sans-serif; color: var(--primary); word-break: break-word; }
.pv-flash-sub { color: var(--text-muted); }
.pv-flash-meaning { font-size: 22px; font-weight: 700; line-height: 1.5; }
.pv-flash-ex { font-size: 15px; font-style: italic; color: var(--text-muted); line-height: 1.5; }
.pv-learn-nav { display: flex; gap: 12px; align-items: center; }
.pv-kbd { color: var(--text-muted); font-size: 12px; }

.pv-q-top { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-muted); font-weight: 600; margin-bottom: 14px; }
.pv-q-score { color: var(--pv-green); }
.pv-q-kind { font-size: 14px; color: var(--text-muted); margin-bottom: 8px; }
.pv-q-prompt { font-size: 32px; font-weight: 800; font-family: 'Plus Jakarta Sans', sans-serif; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; word-break: break-word; }
.pv-q-prompt.pv-q-meaning { font-size: 22px; font-family: 'Sarabun', sans-serif; font-weight: 700; line-height: 1.5; }
.pv-q-sub { color: var(--text-muted); font-size: 14px; margin: 4px 0 18px; }
.pv-say { border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.pv-say:hover { color: var(--primary); border-color: var(--primary); }
.pv-choices { display: grid; gap: 10px; }
.pv-choice {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    padding: 13px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    color: var(--text-main);
    font: inherit;
    font-size: 16px;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.pv-choice:hover:not(:disabled) { border-color: var(--primary); }
.pv-choice kbd { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 12px; min-width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--border); display: inline-flex; align-items: center; justify-content: center; color: var(--text-muted); }
.pv-choice.is-right { border-color: var(--pv-green); background: rgba(31, 164, 99, .1); }
.pv-choice.is-wrong { border-color: var(--pv-red); background: rgba(229, 72, 77, .1); }
.pv-choice:disabled { cursor: default; }
.pv-q-hint { font-family: 'Plus Jakarta Sans', monospace; font-size: 22px; letter-spacing: 2px; margin-bottom: 14px; color: var(--primary); }
.pv-spell { display: flex; gap: 10px; flex-wrap: wrap; }
.pv-spell .form-control { flex: 1; min-width: 180px; font-size: 18px; }
.pv-spell .form-control.is-right { border-color: var(--pv-green); }
.pv-spell .form-control.is-wrong { border-color: var(--pv-red); }

.pv-feedback { display: none; margin-top: 18px; padding: 14px 16px; border-radius: var(--radius-md); }
.pv-feedback.show { display: block; animation: pv-up .2s ease; }
@keyframes pv-up { from { opacity: 0; transform: translateY(6px); } }
.pv-feedback.is-ok { background: rgba(31, 164, 99, .1); border: 1px solid rgba(31, 164, 99, .4); }
.pv-feedback.is-bad { background: rgba(229, 72, 77, .08); border: 1px solid rgba(229, 72, 77, .4); }
.pv-fb-title { font-weight: 800; margin-bottom: 4px; }
.is-ok .pv-fb-title { color: var(--pv-green); }
.is-bad .pv-fb-title { color: var(--pv-red); }
.pv-fb-ans span { color: var(--text-muted); font-size: 14px; }
.pv-fb-ex { font-style: italic; color: var(--text-muted); font-size: 14px; margin-top: 4px; }
.pv-feedback .pv-btn { margin-top: 12px; width: 100%; }

.pv-result { text-align: center; }
.pv-result-score { font-size: 64px; font-weight: 800; font-family: 'Plus Jakarta Sans', sans-serif; line-height: 1; }
.pv-result-score small { font-size: 28px; }
.pv-result.is-pass .pv-result-score { color: var(--pv-green); }
.pv-result.is-fail .pv-result-score { color: var(--pv-red); }
.pv-result h3 { margin: 10px 0 4px; }
.pv-result p { color: var(--text-muted); }
.pv-result-stars { font-size: 34px; margin: 4px 0 8px; }
.pv-result-stars i { font-style: normal; color: var(--pv-locked); }
.pv-result-stars i.on { color: var(--pv-gold); }
.pv-missed { text-align: left; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 12px 14px; margin: 14px 0; max-height: 220px; overflow-y: auto; }
.pv-missed > b { display: block; margin-bottom: 6px; font-size: 14px; }
.pv-missed div { display: flex; gap: 10px; padding: 5px 0; border-top: 1px dashed var(--border); font-size: 14px; }
.pv-missed div span { font-weight: 700; min-width: 110px; }
.pv-missed div small { color: var(--text-muted); font-size: 14px; }
.pv-result-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }

.pv-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translate(-50%, 20px);
    background: #222;
    color: #fff;
    padding: 12px 18px;
    border-radius: 12px;
    font-size: 14px;
    max-width: calc(100% - 32px);
    opacity: 0;
    pointer-events: none;
    transition: all .25s;
    z-index: 4000;
    text-align: center;
}
.pv-toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 720px) {
    .pv-nav-link { display: none; }
    .pv-user-name { display: none; }
    .pv-stats { grid-template-columns: repeat(3, 1fr); }
    .pv-hello { grid-column: 1 / -1; }
    .pv-quest-list { grid-template-columns: 1fr; }
    .pv-gate-parts { grid-template-columns: repeat(2, 1fr); }
    .pv-tab small { display: none; }
    .pv-tab b { font-size: 13px; }
    .pv-road { --k: .6; }
    .pv-sec-head { flex-wrap: wrap; }
    .pv-sec-actions { width: 100%; justify-content: flex-end; }
    .pv-flash-word { font-size: 30px; }
    .pv-q-prompt { font-size: 26px; }
    .pv-tabs { top: 56px; }
}

.pv-tile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    color: #fff;
    flex-shrink: 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 6px 14px -6px rgba(0, 0, 0, .35);
}
.pv-tile-vocab { background: linear-gradient(135deg, #FF4D85 0%, #DE1153 55%, #A30A3C 100%); }
.pv-tile-grammar { background: linear-gradient(135deg, #A78BFA 0%, #7C3AED 55%, #5B21B6 100%); }
.pv-tile-speaking { background: linear-gradient(135deg, #60A5FA 0%, #2F6FEB 55%, #1D4ED8 100%); }
.pv-tile-reading { background: linear-gradient(135deg, #34D399 0%, #10B981 55%, #047857 100%); }
.pv-tile-quest { width: 32px; height: 32px; border-radius: 10px; background: linear-gradient(135deg, #FDBA74 0%, #F97316 60%, #C2410C 100%); }
.pv-tile-quest svg { width: 16px; height: 16px; }
.pv-tile-xl { width: 64px; height: 64px; border-radius: 20px; margin-bottom: 12px; }

.pv-nav-link { display: inline-flex; align-items: center; gap: 6px; }
.pv-gate-badge { display: inline-flex; align-items: center; gap: 6px; }
.pv-gate-parts div { align-items: center; padding: 18px 10px; }
.pv-gate-parts .pv-tile { margin-bottom: 6px; width: 46px; height: 46px; border-radius: 14px; }
.pv-gate-parts div > span:not(.pv-tile) { font-size: 13px; color: var(--text-muted); }

.pv-tab { flex-direction: row; justify-content: flex-start; gap: 10px; padding: 10px 12px; text-align: left; }
.pv-tab-txt { display: flex; flex-direction: column; line-height: 1.25; }
.pv-tab.active { background: var(--surface); color: var(--text-main); border-color: var(--primary); box-shadow: 0 0 0 3px rgba(222, 17, 83, .12), 0 8px 20px -10px rgba(222, 17, 83, .45); }
.pv-tab.active small { color: var(--primary); }
.pv-tab:not(.active) .pv-tile { filter: saturate(.55) brightness(1.05); opacity: .85; }

.pv-logout { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; }
.pv-quests-head .pv-tile { color: #fff; }
.pv-quest { display: flex; gap: 12px; align-items: flex-start; }
.pv-quest-main { flex: 1; min-width: 0; }
.pv-quest-ic { width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pv-quest-ic svg { width: 18px; height: 18px; }
.pv-quest-ic.is-xp { background: rgba(47, 111, 235, .12); color: var(--pv-blue); }
.pv-quest-ic.is-nodes { background: rgba(245, 179, 1, .15); color: #C48C00; }
.pv-quest-ic.is-spell { background: rgba(222, 17, 83, .1); color: var(--primary); }
.pv-quest.is-done .pv-quest-ic { background: rgba(31, 164, 99, .14); color: var(--pv-green); }
.pv-btn-small svg { flex-shrink: 0; }
.pv-admin-title { display: inline-flex; align-items: center; gap: 8px; color: var(--primary); }
.pv-admin-title span { color: var(--text-main); }

@media (max-width: 720px) {
    .pv-tab { flex-direction: column; justify-content: center; text-align: center; gap: 6px; padding: 10px 4px; }
    .pv-tab .pv-tile { width: 34px; height: 34px; border-radius: 10px; }
    .pv-tab .pv-tile svg { width: 17px; height: 17px; }
    .pv-tab-txt { align-items: center; }
}
.pv-gate-parts .pv-tile { color: #fff; }
.pv-coming .pv-tile-xl { display: flex; margin: 0 auto 12px; }
@media (max-width: 720px) {
    .pv-nav-link { display: none; }
}

.lv-GR { background: linear-gradient(135deg, #A78BFA 0%, #7C3AED 55%, #5B21B6 100%); }
.pv-sec-static { cursor: default; }
.pv-sec-static:hover { background: transparent; }
.pv-big-gram { background: linear-gradient(135deg, #A78BFA 0%, #7C3AED 55%, #5B21B6 100%); }
.pv-mt { margin-top: 12px; }

.pv-summary h3 { margin: 0 0 12px; font-family: 'Plus Jakarta Sans', 'Sarabun', sans-serif; }
.pv-summary h3 small { font-weight: 500; color: var(--text-muted); font-size: 14px; font-family: 'Sarabun', sans-serif; }
.pv-summary ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.pv-summary li { position: relative; padding: 12px 14px 12px 40px; background: var(--background); border: 1px solid var(--border); border-radius: var(--radius-md); line-height: 1.65; font-size: 15px; }
.pv-summary li::before { content: ''; position: absolute; left: 15px; top: 19px; width: 10px; height: 10px; border-radius: 3px; background: linear-gradient(135deg, #A78BFA, #7C3AED); }
.pv-summary li b { color: #7C3AED; }
body.dark-mode .pv-summary li b { color: #B79CFF; }
.pv-tip { margin-top: 14px; display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: var(--radius-md); background: rgba(245, 179, 1, .12); border: 1px solid rgba(245, 179, 1, .45); line-height: 1.6; font-size: 14px; }
.pv-tip b { color: #B07D00; }
body.dark-mode .pv-tip b { color: #F5C542; }

.pv-q-sentence { font-size: 21px; line-height: 1.9; font-weight: 600; margin: 4px 0 18px; font-family: 'Plus Jakarta Sans', 'Sarabun', sans-serif; }
.pv-blank { display: inline-block; min-width: 70px; border-bottom: 3px solid var(--primary); color: transparent; line-height: 1.1; margin: 0 2px; }
.pv-seg { text-decoration: none; border-bottom: 2px solid #7C3AED; padding: 0 2px; position: relative; margin: 0 1px; }
.pv-seg sup { font-size: 11px; font-weight: 800; color: #fff; background: #7C3AED; border-radius: 5px; padding: 1px 4px; margin-right: 3px; vertical-align: super; }
.pv-fb-plain { font-style: normal; }
.pv-missed.is-gram div { flex-direction: column; gap: 2px; }

.pv-gq { margin-top: 18px; border: 1px dashed var(--primary); border-radius: var(--radius-md); padding: 14px; }
.pv-gq-head { display: flex; align-items: center; gap: 8px; color: var(--primary); margin-bottom: 10px; }
.pv-gq-head b { color: var(--text-main); }
.pv-gq-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.pv-gq-item { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; padding: 8px 10px; background: var(--background); border-radius: var(--radius-sm); }
.pv-gq-type { font-size: 11px; font-weight: 700; color: #7C3AED; background: rgba(124, 58, 237, .1); padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.pv-gq-text { flex: 1; line-height: 1.6; }
.pv-gq-del { border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); width: 30px; height: 30px; border-radius: 8px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pv-gq-del:hover { color: var(--pv-red); border-color: var(--pv-red); }
.pv-gq-form { display: flex; flex-direction: column; gap: 4px; }
.pv-gq-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pv-gq-mc { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.pv-gq-mc[hidden] { display: none; }
.pv-gq-help { color: var(--text-muted); font-size: 12px; margin: -4px 0 10px; }
.pv-gq-form textarea { resize: vertical; font-family: inherit; }

.pv-tabs { grid-template-columns: repeat(5, 1fr); }
.pv-tile-exam { background: linear-gradient(135deg, #FCD34D 0%, #F59E0B 55%, #B45309 100%); }
.pv-hint a { color: var(--primary); font-weight: 600; }

.pv-exam-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px; margin-bottom: 14px; }
.pv-exam-head { display: flex; align-items: center; gap: 14px; }
.pv-exam-head .pv-tile { width: 52px; height: 52px; border-radius: 16px; }
.pv-exam-info { flex: 1; min-width: 0; }
.pv-exam-info h3 { margin: 0; font-size: 18px; }
.pv-exam-info small { color: var(--text-muted); }
.pv-exam-best { text-align: right; display: flex; flex-direction: column; }
.pv-exam-best b { font-size: 26px; font-family: 'Plus Jakarta Sans', sans-serif; color: var(--pv-green); line-height: 1; }
.pv-exam-best small { color: var(--text-muted); font-size: 12px; }
.pv-exam-hist { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.pv-exam-hist span { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--background); border: 1px solid var(--border); }
.pv-exam-hist small { color: var(--text-muted); font-size: 12px; }
.pv-exam-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

.pv-exam-ov { padding: 0; }
.pv-exam { background: var(--background); width: 100%; height: 100%; display: flex; flex-direction: column; position: relative; }
.ex-top { display: flex; align-items: center; gap: 12px; padding: 12px 18px; background: var(--surface); border-bottom: 1px solid var(--border); }
.ex-title { flex: 1; min-width: 0; font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ex-title small { font-weight: 500; color: var(--text-muted); margin-left: 6px; }
.ex-timer { font-family: 'Plus Jakarta Sans', monospace; font-weight: 800; font-size: 18px; padding: 6px 12px; border-radius: 10px; background: var(--primary-light); color: var(--primary); }
.ex-timer.is-low { background: var(--pv-red); color: #fff; animation: pv-pulse 1.2s infinite; }
.ex-close { position: static; }
.ex-body { flex: 1; overflow-y: auto; padding: 18px; }
.ex-crumb { display: flex; flex-wrap: wrap; gap: 6px; max-width: 1200px; margin: 0 auto 14px; }
.ex-crumb span { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--text-muted); }
.ex-crumb span:first-child { color: var(--primary); border-color: var(--primary); }
.ex-layout { max-width: 820px; margin: 0 auto; }
.ex-layout.has-stim { max-width: 1200px; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.ex-stim { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px; position: sticky; top: 0; max-height: calc(100vh - 170px); overflow-y: auto; }
.ex-stim-title { font-weight: 700; margin-bottom: 10px; color: var(--primary); }
.ex-stim img { width: 100%; height: auto; border-radius: 10px; background: #fff; margin-bottom: 10px; }
.ex-stim p { margin: 0 0 12px; line-height: 1.75; font-size: 15.5px; }
.ex-conv { display: flex; flex-direction: column; gap: 8px; }
.ex-line { display: grid; grid-template-columns: 92px 1fr; gap: 10px; line-height: 1.7; font-size: 15.5px; }
.ex-line b { color: var(--text-muted); font-weight: 700; }
.ex-blank { display: inline-block; min-width: 64px; text-align: center; font-weight: 800; color: var(--primary); border-bottom: 2px solid var(--primary); margin: 0 4px; padding: 0 4px; }
.ex-items { display: flex; flex-direction: column; gap: 12px; }
.ex-item { display: flex; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 14px; scroll-margin-top: 10px; }
.ex-qn { flex-shrink: 0; width: 34px; height: 34px; border-radius: 10px; background: var(--primary-light); color: var(--primary); font-weight: 800; display: flex; align-items: center; justify-content: center; font-family: 'Plus Jakarta Sans', sans-serif; }
body.dark-mode .ex-qn { background: rgba(222, 17, 83, .15); }
.ex-qbody { flex: 1; min-width: 0; }
.ex-stem { font-weight: 600; line-height: 1.6; margin-bottom: 10px; }
.ex-stem-blank { color: var(--text-muted); font-weight: 500; font-size: 14px; }
.ex-opts { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.ex-opts div { font-size: 14.5px; line-height: 1.6; padding: 8px 10px; background: var(--background); border-radius: 8px; }
.ex-choices { display: flex; flex-direction: column; gap: 6px; }
.ex-choice { display: flex; align-items: flex-start; gap: 10px; text-align: left; padding: 9px 12px; border: 1.5px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text-main); font: inherit; font-size: 15px; line-height: 1.5; cursor: pointer; }
.ex-choice:hover:not(:disabled) { border-color: var(--primary); }
.ex-choice kbd { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 12px; min-width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--border); display: inline-flex; align-items: center; justify-content: center; color: var(--text-muted); flex-shrink: 0; margin-top: 1px; }
.ex-choice.is-picked { border-color: var(--primary); background: var(--primary-light); }
body.dark-mode .ex-choice.is-picked { background: rgba(222, 17, 83, .14); }
.ex-choice.is-picked kbd { background: var(--primary); color: #fff; border-color: var(--primary); }
.ex-choice.is-right { border-color: var(--pv-green); background: rgba(31, 164, 99, .1); }
.ex-choice.is-right kbd { background: var(--pv-green); color: #fff; border-color: var(--pv-green); }
.ex-choice.is-wrong { border-color: var(--pv-red); background: rgba(229, 72, 77, .08); }
.ex-choice.is-wrong kbd { background: var(--pv-red); color: #fff; border-color: var(--pv-red); }
.ex-choice:disabled { cursor: default; }
.ex-note { margin-top: 8px; font-size: 13px; font-weight: 600; color: var(--text-muted); }
.ex-note.is-ok { color: var(--pv-green); }
.ex-note.is-bad { color: var(--pv-red); }
.ex-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 18px; background: var(--surface); border-top: 1px solid var(--border); }
.ex-nav:empty { display: none; }
.ex-progress-btn { border: 1px solid var(--border); background: var(--background); color: var(--text-main); border-radius: 12px; padding: 6px 14px; cursor: pointer; display: flex; flex-direction: column; align-items: center; line-height: 1.2; font: inherit; }
.ex-progress-btn small { font-size: 11px; color: var(--text-muted); }
.ex-palette { position: absolute; left: 50%; bottom: 70px; transform: translate(-50%, 10px); width: min(560px, calc(100% - 24px)); max-height: 60vh; overflow-y: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: 0 20px 50px rgba(0, 0, 0, .25); padding: 14px; opacity: 0; pointer-events: none; transition: all .2s; z-index: 5; }
.ex-palette.open { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
.ex-pal-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; margin-bottom: 12px; }
.ex-pal-grid button { aspect-ratio: 1; border: 1px solid var(--border); background: var(--background); color: var(--text-main); border-radius: 8px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.ex-pal-grid button.is-done { background: var(--primary); color: #fff; border-color: var(--primary); }
.ex-pal-grid button.is-right { background: var(--pv-green); color: #fff; border-color: var(--pv-green); }
.ex-pal-grid button.is-wrong { background: var(--pv-red); color: #fff; border-color: var(--pv-red); }
.ex-pal-grid button.is-void { opacity: .45; }
.ex-pal-grid button.is-cur { outline: 2px solid var(--text-main); outline-offset: 1px; }
.ex-result { max-width: 560px; margin: 20px auto; text-align: center; }
.ex-score { font-size: 72px; font-weight: 800; font-family: 'Plus Jakarta Sans', sans-serif; color: var(--pv-green); line-height: 1; }
.ex-score small { font-size: 24px; color: var(--text-muted); }
.ex-result p { color: var(--text-muted); }
.ex-secs { text-align: left; display: flex; flex-direction: column; gap: 12px; margin: 18px 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; }
.ex-sec-row small { display: block; color: var(--text-muted); font-size: 13px; }

@media (max-width: 900px) {
    .ex-layout.has-stim { grid-template-columns: 1fr; }
    .ex-stim { position: static; max-height: none; }
}
@media (max-width: 720px) {
    .pv-tabs { gap: 5px; }
    .pv-tab b { font-size: 11.5px; }
    .ex-body { padding: 12px; }
    .ex-line { grid-template-columns: 1fr; gap: 0; }
    .ex-pal-grid { grid-template-columns: repeat(8, 1fr); }
    .pv-exam-actions .pv-btn { flex: 1 1 100%; }
    .ex-title small { display: none; }
}

.lv-SP { background: linear-gradient(135deg, #60A5FA 0%, #2F6FEB 55%, #1D4ED8 100%); }
.lv-RD { background: linear-gradient(135deg, #34D399 0%, #10B981 55%, #047857 100%); }
.pv-big-ic.lv-SP, .pv-big-ic.lv-RD { background-size: cover; }
.pv-big-ic.lv-SP { background: linear-gradient(135deg, #60A5FA 0%, #2F6FEB 55%, #1D4ED8 100%); }
.pv-big-ic.lv-RD { background: linear-gradient(135deg, #34D399 0%, #10B981 55%, #047857 100%); }
.pv-lv-badge svg { width: 24px; height: 24px; }

.pv-q-ctx { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--pv-blue); background: rgba(47, 111, 235, .1); padding: 4px 10px; border-radius: 999px; margin-bottom: 10px; }
.pv-q-ctx svg { width: 14px; height: 14px; }
.pv-dlg { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; padding: 14px; background: var(--background); border: 1px solid var(--border); border-radius: var(--radius-md); }
.pv-dlg-line { display: grid; grid-template-columns: 96px 1fr; gap: 10px; font-size: 17px; line-height: 1.6; }
.pv-dlg-line b { color: var(--text-muted); font-size: 14px; padding-top: 2px; }

.pv-passage { border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--background); margin-bottom: 14px; }
.pv-passage summary { cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 10px 14px; font-weight: 700; color: #047857; list-style: none; }
body.dark-mode .pv-passage summary { color: #34D399; }
.pv-passage summary::-webkit-details-marker { display: none; }
.pv-passage summary svg { width: 16px; height: 16px; }
.pv-passage-body { padding: 0 14px 12px; max-height: 320px; overflow-y: auto; font-size: 15px; line-height: 1.75; }
.pv-passage-body p { margin: 0 0 10px; }
.pv-q-rq { font-size: 17px; line-height: 1.6; }

.rd-ad { border: 2px dashed #F59E0B; border-radius: 14px; padding: 14px 16px; background: var(--surface); }
.rd-ad h4 { margin: 0 0 4px; font-size: 18px; color: #B45309; }
body.dark-mode .rd-ad h4 { color: #FBBF24; }
.rd-ad ul { margin: 8px 0; padding-left: 20px; }
.rd-ad li { margin: 3px 0; }
.rd-table h4 { margin: 0 0 10px; font-size: 15px; }
.rd-table table { width: 100%; border-collapse: collapse; background: var(--surface); font-size: 14px; }
.rd-table th, .rd-table td { border: 1px solid var(--border); padding: 7px 10px; text-align: left; }
.rd-table th { background: rgba(16, 185, 129, .12); }
.rd-table td:not(:first-child), .rd-table th:not(:first-child) { text-align: center; }
.rd-note { font-size: 12px; color: var(--text-muted); margin-top: 8px; }

@media (max-width: 720px) {
    .pv-dlg-line { grid-template-columns: 1fr; gap: 0; font-size: 16px; }
    .pv-passage-body { max-height: 260px; }
}

.pv-exam-note { margin-top: 6px; font-size: 12px; line-height: 1.5; color: #B45309; background: rgba(245, 158, 11, .12); border-radius: 8px; padding: 4px 8px; display: inline-block; }
body.dark-mode .pv-exam-note { color: #FBBF24; }
.ex-poem { line-height: 1.9; font-style: italic; }

.pv-tabs { grid-template-columns: repeat(6, 1fr); }
.pv-tile-listening { background: linear-gradient(135deg, #FDBA74 0%, #F97316 55%, #C2410C 100%); }
.pv-tab .pv-tab-txt b { white-space: nowrap; }
@media (max-width: 1000px) {
    .pv-tabs { display: flex; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
    .pv-tabs::-webkit-scrollbar { display: none; }
    .pv-tab { flex: 0 0 auto; min-width: 128px; }
}
@media (max-width: 720px) {
    .pv-tab { min-width: 78px; }
}

.pv-tabs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; overflow: visible; }
.pv-tab { flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6px; padding: 12px 6px 10px; min-width: 0; }
.pv-tab .pv-tile { width: 42px; height: 42px; }
.pv-tab-txt { align-items: center; min-width: 0; }
.pv-tab .pv-tab-txt b { font-size: 14px; white-space: nowrap; }
.pv-tab small { white-space: nowrap; }
.pv-tab.active .pv-tile { transform: translateY(-2px); }
@media (max-width: 1000px) {
    .pv-tabs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); overflow: visible; }
    .pv-tab { flex: initial; min-width: 0; }
}
@media (max-width: 720px) {
    .pv-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; position: static; }
    .pv-tab { padding: 10px 4px 8px; }
    .pv-tab .pv-tile { width: 34px; height: 34px; }
    .pv-tab .pv-tab-txt b { font-size: 12.5px; }
}

.lv-LS { background: linear-gradient(135deg, #FDBA74 0%, #F97316 55%, #C2410C 100%); }
.pv-big-ic.lv-LS { background: linear-gradient(135deg, #FDBA74 0%, #F97316 55%, #C2410C 100%); }
.pv-lesson:has(.lx) { max-width: 760px; }
.lx-bar { position: sticky; top: -20px; z-index: 3; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 12px; border-radius: 16px; background: var(--background); border: 1px solid var(--border); margin-bottom: 12px; }
.lx-play { width: 52px; height: 52px; border-radius: 50%; border: none; cursor: pointer; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 5px 0 var(--primary-hover); flex-shrink: 0; }
.lx-play:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--primary-hover); }
.lx-info { flex: 1; min-width: 140px; }
.lx-now { font-size: 14px; font-weight: 700; }
.lx-sub { font-size: 12px; color: var(--text-muted); }
.lx-wave { display: flex; gap: 3px; align-items: center; height: 16px; margin-top: 3px; }
.lx-wave span { width: 4px; height: 5px; border-radius: 2px; background: var(--border); }
.lx-bar.playing .lx-wave span { background: var(--primary); animation: lx-w 1s ease-in-out infinite; }
.lx-bar.playing .lx-wave span:nth-child(2n) { animation-delay: .15s; }
.lx-bar.playing .lx-wave span:nth-child(3n) { animation-delay: .3s; }
@keyframes lx-w { 50% { height: 16px; } }
.lx-chips { display: flex; gap: 6px; }
.lx-chip { border: 1px solid var(--border); background: var(--surface); color: var(--text-main); padding: 6px 10px; border-radius: 999px; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.lx-chip.on { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
body.dark-mode .lx-chip.on { background: rgba(222, 17, 83, .14); }
.lx-ctx { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: #C2410C; background: rgba(249, 115, 22, .12); padding: 4px 10px; border-radius: 999px; margin-bottom: 10px; }
.lx-ctx svg { width: 14px; height: 14px; }
.lx-script { display: flex; flex-direction: column; gap: 6px; }
.lx-line { display: grid; grid-template-columns: 34px 84px 1fr; gap: 8px; align-items: start; padding: 8px; border-radius: 14px; border: 1px solid transparent; transition: background .2s, border-color .2s; }
.lx-line.speaking { background: var(--primary-light); border-color: rgba(222, 17, 83, .35); }
body.dark-mode .lx-line.speaking { background: rgba(222, 17, 83, .12); }
.lx-rep { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; margin-top: 3px; padding: 0; }
.lx-rep svg { width: 14px; height: 14px; }
.lx-rep:hover { color: var(--primary); border-color: var(--primary); }
.lx-who { font-weight: 700; font-size: 14px; padding-top: 6px; overflow: hidden; text-overflow: ellipsis; }
.lx-who.g-w, .lx-who.g-w2 { color: #DB2777; }
.lx-who.g-m { color: #2563EB; }
.lx-who.g-m2 { color: #0D9488; }
.lx-txt { font-size: 16.5px; line-height: 2.3; }
.lx-gap { display: inline-block; }
.lx-in { font: inherit; font-size: 16px; font-weight: 600; color: var(--text-main); background: transparent; border: none; border-bottom: 2px solid var(--primary); padding: 0 4px; text-align: center; outline: none; border-radius: 0; }
.lx-in:focus { background: var(--primary-light); border-radius: 6px 6px 0 0; }
body.dark-mode .lx-in:focus { background: rgba(222, 17, 83, .14); }
.lx-in.ok { border-color: var(--pv-green); color: var(--pv-green); }
.lx-in.bad { border-color: var(--pv-red); color: var(--pv-red); text-decoration: line-through; }
.lx-fix { font-size: 14px; font-weight: 700; color: var(--pv-green); margin-left: 4px; }
.lx-num { font-size: 10px; font-weight: 800; color: var(--primary); vertical-align: super; margin-right: 1px; }
.lx-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.lx-result { margin-top: 14px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--border); background: var(--background); text-align: center; line-height: 1.7; }
.lx-score { font-size: 28px; font-weight: 800; font-family: 'Plus Jakarta Sans', sans-serif; }
.lx-result.is-pass .lx-score { color: var(--pv-green); }
.lx-result.is-fail .lx-score { color: var(--pv-red); }
.lx-tips { font-size: 14px; color: var(--text-muted); margin-top: 4px; }
@media (max-width: 560px) {
    .lx-line { grid-template-columns: 30px 1fr; }
    .lx-txt { grid-column: 1 / -1; font-size: 16px; }
    .lx-bar { top: -20px; }
}
