/* ========== RESET & BASE ========== */
:root {
    color-scheme: light;
    --color-brand: #b94742;
    --color-brand-strong: #9f3837;
    --color-brand-soft: #fff1ed;
    --color-ink: #252a32;
    --color-muted: #707a87;
    --color-line: #e8ebef;
    --color-canvas: #f6f7f8;
    --color-teal: #438d82;
    --color-teal-soft: #e9f5f2;
    --color-violet: #806bb1;
    --color-violet-soft: #f1eef9;
    --color-amber: #bf8744;
    --color-amber-soft: #fbf2e7;
    --color-blue: #5d7fa9;
    --color-blue-soft: #edf3fa;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background:
        radial-gradient(ellipse at 8% 0%, rgba(185, 71, 66, .05), transparent 34rem),
        radial-gradient(ellipse at 94% 18%, rgba(67, 141, 130, .07), transparent 31rem),
        radial-gradient(ellipse at 72% 88%, rgba(128, 107, 177, .035), transparent 34rem),
        var(--color-canvas);
    color: var(--color-ink);
    line-height: 1.6;
    min-height: 100vh;
}
.landing-page {
    -webkit-user-select: none;
    user-select: none;
}
a { color: var(--color-brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ========== LMS LANDING PAGE ========== */
.site-header {
    position: sticky;
    z-index: 100;
    top: 0;
    width: 100%;
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 14px max(28px, calc((100% - 1104px) / 2));
    border-bottom: 1px solid rgba(37, 42, 50, .07);
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 4px 18px rgba(37, 42, 50, .045);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.site-brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: #1a1a1a;
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
}
.site-brand:hover { text-decoration: none; }
.site-brand strong { font-weight: 700; }
.site-brand-icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 12px;
    background: #fff0ef;
    color: #c43b3b;
    font-size: 17px;
}
.site-brand-icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.site-nav {
    display: flex;
    align-items: center;
    gap: 30px;
}
.site-nav > a {
    color: #555e6d;
    font-size: 14px;
    font-weight: 500;
}
.site-nav > a:hover { color: var(--color-brand); text-decoration: none; }
.site-nav > a.button-primary { color: #fff; }
.site-nav > a.is-active:not(.button-primary) { color: var(--color-brand); }
.site-nav-dropdowns { gap: 18px; }
.nav-dropdown { position: relative; }
.nav-dropdown > summary {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    list-style: none;
    color: #555e6d;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}
.nav-dropdown > summary::-webkit-details-marker { display: none; }
.nav-dropdown > summary::marker { content: ''; }
.nav-dropdown > summary:hover,
.nav-dropdown.is-active > summary { color: var(--color-brand); }
.nav-dropdown > summary i { font-size: 10px; transition: transform .18s ease; }
.nav-dropdown[open] > summary i { transform: rotate(180deg); }
.nav-dropdown-menu {
    position: absolute;
    z-index: 120;
    top: calc(100% + 17px);
    left: 50%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--color-line);
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 16px 42px rgba(37, 42, 50, .14);
    transform: translateX(-50%);
}
.nav-hsk-menu { width: 300px; }
.nav-dropdown-column { display: grid; align-content: start; gap: 3px; }
.nav-dropdown-column + .nav-dropdown-column { padding-left: 10px; border-left: 1px solid #eef0f3; }
.nav-dropdown-column h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 2px 8px 8px;
    color: var(--color-ink);
    font-size: 12px;
    font-weight: 700;
}
.nav-dropdown-column h2 i { color: var(--color-brand); font-size: 12px; }
.nav-dropdown-column > a {
    min-height: 31px;
    display: flex;
    align-items: center;
    padding: 5px 8px;
    border-radius: 7px;
    color: #5e6671;
    font-size: 11px;
    font-weight: 500;
}
.nav-dropdown-column > a:hover,
.nav-dropdown-column > a[aria-current="page"] { background: var(--color-brand-soft); color: var(--color-brand-strong); }
.nav-dropdown summary:focus-visible,
.nav-dropdown-column a:focus-visible {
    outline: 3px solid rgba(185, 71, 66, .32);
    outline-offset: 2px;
}
.button {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 18px;
    border: 0;
    border-radius: 9px;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, transform .2s, box-shadow .2s;
}
.button-primary {
    background: var(--color-brand);
    color: #fff;
}
.button-primary:hover {
    background: var(--color-brand-strong);
    box-shadow: 0 5px 14px rgba(196, 59, 59, .2);
    text-decoration: none;
    transform: translateY(-1px);
}
.button:focus-visible,
.site-nav a:focus-visible,
.text-link:focus-visible,
.site-brand:focus-visible,
.modal-close:focus-visible {
    outline: 3px solid rgba(185, 71, 66, .32);
    outline-offset: 3px;
}
.hero {
    max-width: 1160px;
    min-height: 550px;
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    align-items: center;
    gap: 42px;
    margin: 0 auto;
    padding: 62px 28px 80px;
}
.hero-content { max-width: 590px; }
.hero-eyebrow,
.section-eyebrow {
    color: var(--color-brand);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.35px;
}
.hero-eyebrow {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 20px;
}
.hero-eyebrow span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #c43b3b;
}
.hero h1 {
    font-size: clamp(38px, 5vw, 58px);
    font-weight: 700;
    line-height: 1.13;
    letter-spacing: -2.1px;
}
.hero h1 span { color: var(--color-brand); }
.hero-description {
    max-width: 490px;
    margin-top: 20px;
    color: #6b7280;
    font-size: 16px;
    line-height: 1.8;
}
.hero-actions {
    display: flex;
    align-items: center;
    gap: 26px;
    margin-top: 30px;
}
.button-large { min-height: 50px; padding: 0 22px; }
.text-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #424b5a;
    font-size: 14px;
    font-weight: 600;
}
.text-link:hover { color: var(--color-brand); text-decoration: none; }
.hero-note {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 28px;
    color: #737b89;
    font-size: 12px;
}
.hero-note i { color: #16a36a; }
.hero-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 21px;
}
.hero-highlights span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    border: 1px solid #ece9e6;
    border-radius: 999px;
    background: rgba(255,255,255,.72);
    color: #656b73;
    font-size: 10px;
    font-weight: 600;
}
.hero-highlights i { color: #bd4d49; }
.hero-visual {
    min-height: 370px;
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 28px;
    background:
        radial-gradient(circle at 48% 46%, rgba(255,255,255,.96) 0 17%, transparent 17.5%),
        radial-gradient(ellipse at 80% 18%, rgba(255,255,255,.7), transparent 35%),
        linear-gradient(145deg, #f8e9e5 0%, #fff8f4 52%, #eaf3ed 100%);
}
.hero-orbit {
    position: absolute;
    width: 260px;
    height: 260px;
    border: 1px solid rgba(196, 59, 59, .13);
    border-radius: 50%;
}
.orbit-two { width: 340px; height: 340px; }
.hero-level-pill {
    position: absolute;
    top: 28px;
    right: 24px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 12px;
    border: 1px solid rgba(255,255,255,.9);
    border-radius: 999px;
    background: rgba(255,255,255,.82);
    box-shadow: 0 8px 24px rgba(67,66,59,.08);
    color: #7a6158;
    font-size: 10px;
    font-weight: 700;
}
.hero-level-pill i { color: #c78752; }
.hero-character {
    width: 164px;
    height: 164px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .9);
    border-radius: 40px;
    background: rgba(255, 255, 255, .78);
    box-shadow: 0 20px 60px rgba(153, 51, 51, .13);
    color: #c43b3b;
    font-family: serif;
    font-size: 94px;
    transform: rotate(-5deg);
    animation: hero-float 5s ease-in-out infinite;
}
@keyframes hero-float { 0%, 100% { transform: translateY(0) rotate(-5deg); } 50% { transform: translateY(-9px) rotate(-2deg); } }
.floating-card {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 13px 15px;
    border: 1px solid #f0f1f5;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .08);
    animation: card-float 6s ease-in-out infinite;
}
.floating-card-top { top: 54px; left: 18px; }
.floating-card-bottom { right: 16px; bottom: 48px; animation-delay: -2.7s; }
@keyframes card-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.floating-card strong,
.floating-card small { display: block; }
.floating-card strong { color: #242a35; font-size: 12px; }
.floating-card small { margin-top: 2px; color: #818896; font-size: 10px; }
.floating-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #fff0ef;
    color: #c43b3b;
    font-size: 14px;
}
.floating-icon-green { background: #e8f8ef; color: #15945e; }
.features-section {
    padding: 72px 28px 82px;
    background: #fff;
}
.section-heading {
    max-width: 620px;
    margin: 0 auto 34px;
    text-align: center;
}
.section-heading h2 {
    margin-top: 10px;
    font-size: clamp(24px, 3vw, 32px);
    line-height: 1.3;
    letter-spacing: -.7px;
}
.section-heading > p:last-child {
    margin-top: 10px;
    color: #737b89;
    font-size: 14px;
}
.feature-grid {
    max-width: 1104px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin: 0 auto;
}
.feature-card {
    padding: 25px 24px;
    border: 1px solid var(--color-line);
    border-top: 3px solid rgba(185, 71, 66, .35);
    border-radius: 14px;
    background: linear-gradient(145deg, #fff 55%, #fff9f6);
    box-shadow: 0 8px 25px rgba(31, 39, 50, .035);
    transition: transform .2s, border-color .2s, box-shadow .2s;
}
.feature-card:hover { transform: translateY(-4px); border-color: #efdbd6; box-shadow: 0 14px 32px rgba(60, 42, 38, .08); }
.feature-card:nth-child(2) { border-top-color: rgba(67, 141, 130, .45); background: linear-gradient(145deg, #fff 55%, #f4faf8); }
.feature-card:nth-child(3) { border-top-color: rgba(128, 107, 177, .4); background: linear-gradient(145deg, #fff 55%, #f6f4fb); }
.feature-card:nth-child(2):hover { border-top-color: rgba(67, 141, 130, .65); }
.feature-card:nth-child(3):hover { border-top-color: rgba(128, 107, 177, .6); }
.feature-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    margin-bottom: 18px;
    border-radius: 12px;
    background: #fff0ef;
    color: #c43b3b;
    font-size: 17px;
}
.feature-icon-purple { background: var(--color-violet-soft); color: var(--color-violet); }
.feature-icon-green { background: var(--color-teal-soft); color: var(--color-teal); }
.feature-card h3 { font-size: 15px; }
.feature-card p {
    margin-top: 8px;
    color: #737b89;
    font-size: 13px;
    line-height: 1.7;
}
.landing-cta {
    max-width: 1104px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 34px 38px;
    margin: 0 auto 66px;
    border: 1px solid #eadbd6;
    border-radius: 20px;
    background: linear-gradient(110deg, #fff2ed, #fff 58%, #edf6f0);
    box-shadow: 0 14px 36px rgba(72, 50, 44, .06);
}
.landing-cta h2 { max-width: 580px; margin-top: 7px; color: #292b2d; font-size: clamp(20px, 3vw, 29px); line-height: 1.3; letter-spacing: -.5px; }
.landing-cta p:last-child { margin-top: 7px; color: #757b80; font-size: 13px; }
.landing-cta .button { flex: 0 0 auto; }
.site-footer {
    max-width: 1160px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 0 auto;
    padding: 26px 28px;
    border-top: 1px solid #ece9e6;
}
.site-footer .site-brand-icon { width: 34px; height: 34px; font-size: 14px; }
.site-footer .site-brand { font-size: 13px; }
.site-footer p { color: #858b96; font-size: 12px; }
/* ========== COMBINED LOGIN / REGISTER PAGE ========== */
.auth-page {
    min-height: calc(100vh - 69px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px 20px 44px;
    background:
        radial-gradient(ellipse at 36% 22%, rgba(185, 71, 66, .065), transparent 48%),
        radial-gradient(ellipse at 80% 75%, rgba(67, 141, 130, .07), transparent 42%),
        var(--color-canvas);
}
.auth-back-link {
    width: min(100%, 440px);
    margin-bottom: 16px;
    color: #697180;
    font-size: 13px;
    font-weight: 500;
}
.auth-back-link:hover { color: #c43b3b; text-decoration: none; }
.auth-back-link i { margin-right: 6px; }
.auth-card {
    width: min(100%, 440px);
    padding: 34px 38px 28px;
    border: 1px solid #eceff3;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 16px 48px rgba(15, 23, 42, .07);
}
.auth-brand-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    margin: 0 auto 14px;
    border-radius: 14px;
    background: #fff0ef;
    color: #c43b3b;
    font-size: 20px;
}
.auth-eyebrow {
    color: #c43b3b;
    text-align: center;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.3px;
}
.auth-card h1 {
    margin-top: 5px;
    color: #1a1a1a;
    text-align: center;
    font-size: 23px;
    letter-spacing: -.5px;
}
.auth-description {
    margin: 7px 0 22px;
    color: #737b89;
    text-align: center;
    font-size: 13px;
}
.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 4px;
    margin-bottom: 22px;
    border-radius: 10px;
    background: #f3f4f6;
}
.auth-tab {
    min-height: 38px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #727987;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: color .18s, background .18s, box-shadow .18s;
}
.auth-tab.is-active {
    background: #fff;
    color: #b83236;
    box-shadow: 0 1px 4px rgba(15, 23, 42, .1);
}
.auth-tab:focus-visible,
.auth-switch-hint button:focus-visible {
    outline: 3px solid rgba(196, 59, 59, .25);
    outline-offset: 2px;
}
.auth-panel[hidden] { display: none; }
.auth-field { margin-bottom: 15px; }
.auth-field label {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
    color: #343a46;
    font-size: 12px;
    font-weight: 600;
}
.auth-field label span {
    color: #8a909a;
    font-size: 11px;
    font-weight: 400;
}
.auth-field input {
    width: 100%;
    min-height: 44px;
    padding: 11px 13px;
    border: 1px solid #e2e6ec;
    border-radius: 8px;
    background: #fff;
    color: #1a1a1a;
    font: inherit;
    font-size: 13px;
    transition: border-color .18s, box-shadow .18s;
}
.auth-field input::placeholder { color: #a0a7b2; }
.auth-field input:focus {
    outline: none;
    border-color: #c43b3b;
    box-shadow: 0 0 0 3px rgba(196, 59, 59, .11);
}
.auth-submit { width: 100%; margin-top: 4px; }
.auth-switch-hint {
    margin-top: 18px;
    color: #737b89;
    text-align: center;
    font-size: 12px;
}
.auth-switch-hint button {
    padding: 0;
    border: 0;
    background: none;
    color: #b83236;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}
.auth-message {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
    margin: -8px 0 16px;
    border-radius: 8px;
    font-size: 12px;
}
.auth-error { background: #fee2e2; color: #b91c1c; }
.auth-success { background: #dcfce7; color: #166534; }

@media (max-width: 760px) {
    .site-header { min-height: 72px; align-items: flex-start; flex-direction: column; padding: 14px 22px; }
    .site-nav { width: 100%; justify-content: flex-start; gap: 18px; overflow-x: auto; padding-bottom: 4px; }
    .site-nav > a { flex: 0 0 auto; }
    .site-nav-dropdowns { align-items: center; flex-wrap: wrap; gap: 16px; overflow: visible; }
    .site-nav-dropdowns .nav-dropdown { flex: 0 0 auto; }
    .site-nav-dropdowns > .button { margin-left: auto; }
    .nav-dropdown-menu { top: calc(100% + 12px); left: 0; transform: none; }
    .nav-dropdown > summary { font-size: 13px; }
    .hero {
        min-height: 0;
        grid-template-columns: 1fr;
        gap: 38px;
        padding: 58px 22px 62px;
    }
    .hero-content { max-width: 620px; }
    .hero-visual { min-height: 330px; }
    .feature-grid { grid-template-columns: 1fr; max-width: 540px; }
    .features-section { padding: 60px 22px; }
    .site-footer { padding: 22px; }
    .landing-cta { align-items: flex-start; flex-direction: column; margin: 0 22px 46px; padding: 26px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media (max-width: 480px) {
    .site-header { padding: 12px 16px; }
    .hero-highlights { gap: 7px; }
    .hero-highlights span { font-size: 9px; }
    .hero-level-pill { top: 18px; right: 14px; padding: 7px 10px; font-size: 9px; }
    .landing-cta { margin-right: 18px; margin-left: 18px; padding: 22px; }
    .landing-cta .button { width: 100%; }
    .site-brand { gap: 8px; font-size: 13px; }
    .site-brand-icon { width: 36px; height: 36px; }
    .site-nav { gap: 13px; }
    .site-nav-dropdowns { gap: 14px; }
    .site-nav > a { font-size: 12px; }
    .site-nav-dropdowns > .button { margin-left: 0; }
    .nav-dropdown-menu { left: 0; width: min(300px, calc(100vw - 32px)); padding: 12px; gap: 8px; }
    .nav-dropdown-column + .nav-dropdown-column { padding-left: 7px; }
    .nav-dropdown-column h2 { gap: 5px; padding-right: 3px; padding-left: 3px; font-size: 10px; }
    .nav-dropdown-column > a { min-height: 34px; padding-right: 4px; padding-left: 5px; font-size: 10px; }
    .site-nav .button { min-height: 38px; padding: 0 12px; font-size: 12px; }
    .hero { padding: 46px 18px 52px; }
    .hero h1 { font-size: 39px; letter-spacing: -1.5px; }
    .hero-description { font-size: 14px; }
    .hero-actions { align-items: flex-start; flex-direction: column; gap: 18px; }
    .hero-visual { min-height: 285px; border-radius: 20px; }
    .hero-character { width: 138px; height: 138px; font-size: 78px; }
    .hero-orbit { width: 210px; height: 210px; }
    .orbit-two { width: 280px; height: 280px; }
    .floating-card { gap: 8px; padding: 10px; }
    .floating-card-top { top: 28px; left: 10px; }
    .floating-card-bottom { right: 9px; bottom: 26px; }
    .floating-card small { font-size: 9px; }
    .features-section { padding: 52px 18px; }
    .feature-card { padding: 21px; }
    .site-footer { align-items: flex-start; flex-direction: column; padding: 22px 18px; }
    .auth-page { min-height: calc(100vh - 60px); padding: 24px 16px 34px; }
    .auth-card { padding: 30px 24px 24px; }
}

/* ========== ROLE DASHBOARDS ========== */
.dashboard-shell {
    min-height: 100vh;
    display: block;
    background: #f7f8fa;
}
.dashboard-main {
    width: 100%;
    max-width: 1480px;
    min-width: 0;
    margin: 0 auto;
    padding: 28px clamp(22px, 4vw, 52px) 48px;
}
.role-navbar {
    position: sticky;
    z-index: 100;
    top: 0;
    min-height: 68px;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 10px clamp(16px, 3vw, 40px);
    border-bottom: 1px solid #eceef2;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 3px 14px rgba(15, 23, 42, .035);
    backdrop-filter: blur(12px);
    -webkit-user-select: none;
    user-select: none;
}
.role-nav-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    flex: 0 0 auto;
    color: #1a1a1a;
    font-size: 12px;
    line-height: 1.2;
}
.role-nav-brand:hover { text-decoration: none; }
.role-nav-brand strong { font-weight: 700; }
.role-nav-brand small {
    display: block;
    margin-top: 4px;
    color: #9096a1;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .9px;
}
.role-nav-brand-icon {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    flex: 0 0 36px;
    overflow: hidden;
    border-radius: 11px;
    background: #fff;
}
.role-nav-brand-icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.role-nav-links {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 3px;
    overflow-x: auto;
    scrollbar-width: none;
}
.role-nav-links-grouped {
    align-items: stretch;
    gap: 12px;
}
.role-nav-group {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 0 0 auto;
}
.role-nav-group-label {
    padding: 0 8px 2px;
    color: #9298a2;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .8px;
    line-height: 1;
    text-transform: uppercase;
}
.role-nav-group-links {
    display: flex;
    align-items: center;
    gap: 2px;
}
.role-nav-links-grouped .role-nav-group + .role-nav-group {
    padding-left: 10px;
    border-left: 1px solid #eceef2;
}
.role-nav-links:not(.role-nav-links-grouped) .role-nav-group {
    flex-direction: row;
    align-items: center;
}
.role-nav-links:not(.role-nav-links-grouped) .role-nav-group-links { gap: 3px; }
.role-nav-links::-webkit-scrollbar { display: none; }
.role-nav-link {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    flex: 0 0 auto;
    padding: 0 10px;
    border-radius: 8px;
    color: #626b78;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    transition: color .16s, background .16s;
}
.role-nav-link i { font-size: 12px; }
.role-nav-link:hover,
.role-nav-link.is-active {
    background: var(--color-brand-soft);
    color: var(--color-brand-strong);
    text-decoration: none;
}
.role-nav-link.is-active { font-weight: 600; }
.role-nav-logout {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    flex: 0 0 auto;
    padding: 0 11px;
    margin-left: auto;
    border: 1px solid #eceef2;
    border-radius: 8px;
    color: #6a727f;
    font-size: 11px;
}
.role-nav-logout:hover {
    border-color: #f0c5c1;
    background: #fff8f7;
    color: #b83236;
    text-decoration: none;
}
.logout-dialog {
    position: fixed;
    inset: 0;
    margin: auto;
    width: min(420px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    overflow: auto;
    padding: 28px;
    border: 1px solid #eef0f3;
    border-radius: 18px;
    color: #252a34;
    text-align: center;
    box-shadow: 0 24px 70px rgba(21, 28, 40, .2);
}
.logout-dialog::backdrop {
    background: rgba(25, 30, 40, .42);
    backdrop-filter: blur(3px);
}
.logout-dialog-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    margin: 0 auto 15px;
    border-radius: 15px;
    background: #fff0ef;
    color: #b83236;
    font-size: 19px;
}
.logout-dialog h2 { font-size: 18px; }
.logout-dialog p {
    margin: 8px 0 21px;
    color: #777f8c;
    font-size: 12px;
    line-height: 1.6;
}
.logout-dialog-actions {
    display: flex;
    justify-content: center;
    gap: 9px;
}
.logout-dialog-actions .button {
    min-height: 40px;
    padding: 0 16px;
    font-size: 11px;
}
.role-nav-link:focus-visible,
.role-nav-logout:focus-visible,
.role-nav-brand:focus-visible {
    outline: 3px solid rgba(196, 59, 59, .25);
    outline-offset: 2px;
}
.logout-dialog-actions .button:focus-visible {
    outline: 3px solid rgba(196, 59, 59, .25);
    outline-offset: 2px;
}
.dashboard-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}
.dashboard-date {
    color: var(--color-muted);
    font-size: 11px;
}
.dashboard-topbar h1 {
    margin-top: 3px;
    font-size: 23px;
    letter-spacing: -.5px;
}
.dashboard-user {
    display: flex;
    align-items: center;
    gap: 10px;
}
.dashboard-user > span:last-child strong,
.dashboard-user > span:last-child small {
    display: block;
}
.dashboard-user strong { font-size: 12px; }
.dashboard-user small { margin-top: 2px; color: #858b96; font-size: 10px; }
.dashboard-avatar {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #fff0ef;
    color: #b83236;
    font-size: 14px;
    font-weight: 700;
}
.dashboard-welcome {
    min-height: 192px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
    padding: 28px 34px;
    border-radius: 16px;
    background:
        radial-gradient(ellipse at 92% 18%, rgba(67, 141, 130, .11), transparent 35%),
        linear-gradient(110deg, #fff1ed 0%, #fffaf7 54%, #f0f7f4 100%);
}
.dashboard-welcome > div:first-child { position: relative; z-index: 1; }
.dashboard-welcome-label {
    color: var(--color-brand-strong);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
}
.dashboard-welcome h2 {
    margin-top: 7px;
    font-size: 22px;
    letter-spacing: -.4px;
}
.dashboard-welcome > div > p:not(.dashboard-welcome-label) {
    max-width: 490px;
    margin: 6px 0 16px;
    color: #707783;
    font-size: 12px;
}
.dashboard-welcome .button { min-height: 38px; font-size: 12px; }
.dashboard-welcome-art {
    width: 130px;
    height: 130px;
    display: grid;
    place-items: center;
    flex: 0 0 130px;
    margin-right: 18px;
    border: 1px solid rgba(196, 59, 59, .12);
    border-radius: 38px;
    background: rgba(255, 255, 255, .55);
    color: #c43b3b;
    font-family: serif;
    font-size: 76px;
    transform: rotate(5deg);
}
.teacher-welcome .dashboard-welcome-art { font-family: inherit; font-size: 50px; }
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: 19px 0;
}
.dashboard-stat {
    min-height: 82px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    border: 1px solid #eef0f3;
    border-top: 2px solid rgba(185, 71, 66, .32);
    border-radius: 12px;
    background: #fff;
}
.dashboard-stat:nth-child(2) { border-top-color: rgba(128, 107, 177, .42); }
.dashboard-stat:nth-child(3) { border-top-color: rgba(191, 135, 68, .45); }
.dashboard-stat:nth-child(4) { border-top-color: rgba(67, 141, 130, .45); }
.dashboard-stat-icon,
.shortcut-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    flex: 0 0 38px;
    border-radius: 11px;
    background: var(--color-brand-soft);
    color: var(--color-brand);
    font-size: 15px;
}
.dashboard-stat > span:last-child small,
.dashboard-stat > span:last-child strong { display: block; }
.dashboard-stat small { color: var(--color-muted); font-size: 10px; }
.dashboard-stat strong { margin-top: 3px; font-size: 20px; line-height: 1.1; }
.icon-purple { background: var(--color-violet-soft); color: var(--color-violet); }
.icon-orange { background: var(--color-amber-soft); color: var(--color-amber); }
.icon-green { background: var(--color-teal-soft); color: var(--color-teal); }
.dashboard-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    gap: 16px;
}
.teacher-content-grid { grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); }
.dashboard-panel {
    min-width: 0;
    padding: 20px;
    border: 1px solid #eef0f3;
    border-radius: 13px;
    background: #fff;
}
.dashboard-panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}
.dashboard-section-kicker {
    color: #b83236;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
}
.dashboard-panel-heading h2 {
    margin-top: 3px;
    font-size: 15px;
}
.dashboard-heading-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--color-brand-soft);
    color: var(--color-brand);
    font-size: 14px;
}
.dashboard-content-grid > .dashboard-panel:nth-child(2) .dashboard-heading-icon {
    background: var(--color-teal-soft);
    color: var(--color-teal);
}
.dashboard-content-grid > .dashboard-panel:nth-child(2) .dashboard-section-kicker,
.dashboard-content-grid > .dashboard-panel:nth-child(2) .dashboard-view-all { color: var(--color-teal); }
.dashboard-view-all {
    color: var(--color-brand-strong);
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
}
.dashboard-view-all:hover { text-decoration: none; }
.dashboard-view-all i { margin-left: 3px; }
.dashboard-shortcuts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}
.dashboard-shortcuts > a {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 8px;
    border: 1px solid #f0f1f3;
    border-radius: 10px;
    color: #1a1a1a;
    transition: border-color .16s, background .16s;
}
.dashboard-shortcuts > a:hover {
    border-color: #f0c5c1;
    background: #fffafa;
    text-decoration: none;
}
.dashboard-shortcuts .shortcut-icon { width: 33px; height: 33px; flex-basis: 33px; font-size: 13px; }
.dashboard-shortcuts > a > span:nth-child(2) { min-width: 0; }
.dashboard-shortcuts strong,
.dashboard-shortcuts small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-shortcuts strong { font-size: 10px; }
.dashboard-shortcuts small { margin-top: 3px; color: #858b96; font-size: 9px; }
.shortcut-arrow { margin-left: auto; color: #a4a9b2; font-size: 9px; }
.dashboard-assignment-list { display: flex; flex-direction: column; }
.dashboard-assignment {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 0;
    border-bottom: 1px solid #f0f1f3;
    color: #1a1a1a;
}
.dashboard-assignment:last-child { border-bottom: 0; }
.dashboard-assignment:hover { text-decoration: none; }
.dashboard-assignment:hover .assignment-info strong { color: #b83236; }
.assignment-calendar {
    width: 38px;
    height: 42px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 0 0 38px;
    border-radius: 9px;
    background: #fff0ef;
    color: #b83236;
}
.assignment-calendar strong { font-size: 15px; line-height: 1; }
.assignment-calendar small { margin-top: 3px; font-size: 9px; text-transform: uppercase; }
.assignment-calendar-wide { height: 38px; font-size: 14px; }
.assignment-info { min-width: 0; flex: 1; }
.assignment-info strong,
.assignment-info small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.assignment-info strong { font-size: 11px; }
.assignment-info small { margin-top: 4px; color: #858b96; font-size: 9px; }
.assignment-arrow { color: #a4a9b2; font-size: 10px; }
.dashboard-empty {
    min-height: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #969ca6;
    text-align: center;
}
.dashboard-empty i { margin-bottom: 9px; color: #bdc2ca; font-size: 23px; }
.dashboard-empty p { max-width: 220px; font-size: 11px; }
@media (max-width: 1080px) {
    .dashboard-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-content-grid,
    .teacher-content-grid { grid-template-columns: 1fr; }
    .role-navbar { gap: 10px; }
    .role-nav-link { padding: 0 8px; }
}
@media (max-width: 720px) {
    .role-navbar {
        position: sticky;
        top: 0;
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 6px 12px;
        padding: 9px 14px 0;
    }
    .role-nav-brand { padding-bottom: 3px; }
    .role-nav-links {
        grid-column: 1 / -1;
        grid-row: 2;
        width: calc(100vw - 28px);
        margin: 0 -14px;
        padding: 0 10px 8px;
        border-top: 1px solid #f0f1f3;
    }
    .role-nav-link { min-height: 38px; padding: 0 11px; }
    .role-nav-logout { grid-column: 2; grid-row: 1; min-height: 32px; }
    .teacher-activity-panel { scroll-margin-top: 112px; }
    .dashboard-main { padding: 22px 16px 34px; }
    .dashboard-topbar { margin-bottom: 18px; }
    .dashboard-welcome { min-height: 170px; padding: 22px; }
    .dashboard-welcome h2 { max-width: 360px; font-size: 19px; }
    .dashboard-welcome-art { width: 92px; height: 92px; flex-basis: 92px; margin-right: 0; border-radius: 28px; font-size: 56px; }
}
@media (max-width: 480px) {
    .dashboard-main { padding-right: 12px; padding-left: 12px; }
    .role-navbar { padding-right: 10px; padding-left: 10px; }
    .role-nav-links { width: calc(100vw - 20px); margin-right: -10px; margin-left: -10px; }
    .role-nav-link { gap: 6px; padding: 0 9px; font-size: 10px; }
    .role-nav-link i { font-size: 11px; }
    .role-nav-logout { padding: 0 9px; font-size: 10px; }
    .dashboard-topbar h1 { font-size: 20px; }
    .dashboard-user { gap: 7px; }
    .dashboard-user > span:last-child { display: none; }
    .dashboard-welcome { align-items: flex-start; min-height: 0; padding: 20px; }
    .dashboard-welcome h2 { max-width: 260px; font-size: 17px; }
    .dashboard-welcome > div > p:not(.dashboard-welcome-label) { max-width: 240px; font-size: 11px; }
    .dashboard-welcome-art { position: absolute; right: 6px; bottom: 8px; width: 68px; height: 68px; border-radius: 20px; font-size: 42px; opacity: .7; }
    .dashboard-stats { gap: 9px; margin: 13px 0; }
    .dashboard-stat { min-height: 72px; gap: 9px; padding: 11px 9px; }
    .dashboard-stat-icon { width: 32px; height: 32px; flex-basis: 32px; font-size: 13px; }
    .dashboard-stat small { font-size: 9px; }
    .dashboard-stat strong { font-size: 17px; }
    .dashboard-panel { padding: 15px 12px; }
    .dashboard-shortcuts { grid-template-columns: 1fr; }
    .dashboard-shortcuts > a { padding: 9px; }
}

/* ========== LMS FEATURE PAGES ========== */
.feature-page { max-width: 1120px; }
.feature-page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
}
.feature-page-header h1 { margin-top: 8px; }
.feature-back {
    color: var(--color-muted);
    font-size: 12px;
}
.feature-back:hover { color: #b83236; text-decoration: none; }
.feature-back i { margin-right: 5px; }
.feature-user {
    color: #737b89;
    font-size: 12px;
}
.feature-user i { margin-right: 5px; color: #c43b3b; }
.feature-empty {
    padding: 36px 22px;
    border: 1px dashed #dfe3e8;
    border-radius: 12px;
    background: #fff;
    color: #858b96;
    text-align: center;
    font-size: 13px;
}
.learning-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 15px;
    margin-top: 18px;
}
.learning-card {
    min-width: 0;
    padding: 22px;
    border: 1px solid var(--color-line);
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 5px 18px rgba(32, 38, 48, .035);
}
.learning-card h2 {
    margin: 11px 0 8px;
    font-size: 17px;
}
.learning-card > p {
    color: #656d79;
    font-size: 13px;
    line-height: 1.75;
}
.learning-card .learning-mandarin {
    margin: 14px 0;
    color: #252a32;
    font-size: 16px;
}
.learning-example {
    padding: 12px 14px;
    margin-top: 14px;
    border-left: 3px solid var(--color-teal);
    border-radius: 0 8px 8px 0;
    background: var(--color-teal-soft);
    color: #555d68;
    font-size: 12px;
}
.learning-card-link { display: block; color: inherit; }
.learning-card-link:hover {
    border-color: #efc9c5;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
    text-decoration: none;
    transform: translateY(-2px);
}
.learning-read-more {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 13px;
    color: #b83236;
    font-size: 12px;
    font-weight: 600;
}
.reading-content { max-width: 850px; margin: 18px auto 0; }
.reading-content h3 { margin: 25px 0 10px; font-size: 15px; }
.reading-listening-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 16px 0 8px; }
.reading-listening-controls .button { display: inline-flex; align-items: center; gap: 8px; }
.reading-listening-status { color: #777f8b; font-size: 12px; }
.reading-content details {
    padding: 12px 0;
    border-top: 1px solid #eceff3;
    border-bottom: 1px solid #eceff3;
    color: #555d68;
    font-size: 13px;
}
.reading-content details summary { cursor: pointer; font-weight: 600; }
.reading-content details p { margin-top: 10px; }
.reading-question,
.practice-question {
    min-width: 0;
    padding: 16px;
    margin: 12px 0;
    border: 1px solid #eceff3;
    border-radius: 10px;
}
.reading-question legend,
.practice-question legend {
    padding: 0 5px;
    font-size: 13px;
    font-weight: 600;
}
.reading-question label,
.practice-question label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 7px 3px;
    color: #565e6a;
    font-size: 12px;
    cursor: pointer;
}
.reading-question input,
.practice-question input { margin-top: 3px; accent-color: var(--color-brand); }
.practice-question small { color: #858b96; font-size: 10px; }
.practice-form > button { margin: 12px 0; }
.hsk-practice-intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 24px 28px;
    margin: 18px 0;
    border: 1px solid #f0dfda;
    border-radius: 18px;
    background: linear-gradient(115deg, #fff5f1 0%, #fff 58%, #f0f8f5 100%);
    box-shadow: 0 9px 26px rgba(80, 52, 48, .055);
}
.hsk-kicker {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #b83236;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .12em;
}
.hsk-practice-intro h2 { margin: 7px 0 3px; color: #302b2a; font-size: 21px; }
.hsk-practice-intro p { color: #74716f; font-size: 12px; }
.hsk-level-picker { display: grid; gap: 5px; min-width: 150px; }
.hsk-level-picker label { color: #6d6663; font-size: 11px; font-weight: 700; }
.hsk-level-picker select {
    min-height: 42px;
    padding: 0 34px 0 12px;
    border: 1px solid #e8d8d3;
    border-radius: 10px;
    background: #fff;
    color: #383230;
    font: inherit;
    font-size: 13px;
}
.hsk-progress-panel {
    padding: 17px 19px;
    margin: 0 0 16px;
    border: 1px solid #e7ece9;
    border-radius: 15px;
    background: linear-gradient(120deg, #fff 0%, #f4faf7 100%);
}
.hsk-progress-copy { display: flex; justify-content: space-between; gap: 12px; color: #4a514f; font-size: 12px; }
.hsk-progress-copy strong { color: #353c39; }
.hsk-progress-copy strong span { color: #b8c2bd; }
.hsk-progress-copy > span { color: #727d77; }
.hsk-progress-copy b { color: #3b8f79; }
.hsk-progress-panel progress {
    width: 100%;
    height: 8px;
    display: block;
    margin: 11px 0 14px;
    overflow: hidden;
    border: 0;
    border-radius: 99px;
    background: #e7eeea;
    accent-color: #3b9a7d;
}
.hsk-progress-panel progress::-webkit-progress-bar { border-radius: 99px; background: #e7eeea; }
.hsk-progress-panel progress::-webkit-progress-value { border-radius: 99px; background: linear-gradient(90deg, #c43b3b, #e59b65, #45a184); transition: width .25s ease; }
.hsk-progress-panel progress::-moz-progress-bar { border-radius: 99px; background: linear-gradient(90deg, #c43b3b, #e59b65, #45a184); }
.hsk-question-nav { display: flex; flex-wrap: wrap; gap: 7px; }
.hsk-question-jump {
    width: 31px;
    height: 31px;
    display: grid;
    place-items: center;
    border: 1px solid #e4e9e6;
    border-radius: 9px;
    background: #fff;
    color: #707873;
    font-size: 11px;
    font-weight: 700;
    transition: color .18s, background .18s, border-color .18s, transform .18s;
}
.hsk-question-jump:hover { border-color: #d7a09a; background: #fff5f2; color: #b83236; text-decoration: none; transform: translateY(-1px); }
.hsk-question-jump.is-answered { border-color: #c8e5d8; background: #eaf6ef; color: #28775e; }
.hsk-practice-form { width: 100%; max-width: 920px; margin: 0 auto; }
.hsk-question { scroll-margin-top: 20px; transition: border-color .2s, box-shadow .2s; }
.hsk-question[hidden] { display: none !important; }
.hsk-question:hover { border-color: #e8d5d0; box-shadow: 0 8px 24px rgba(76, 51, 47, .07); }
.hsk-question.is-answered { border-color: #cfe5da; }
.hsk-question-stage { min-height: 0; }
.hsk-question-stage .hsk-question { min-height: 0; padding: clamp(18px, 3vw, 25px); margin: 0; }
.container .hsk-question-heading {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 12px;
    padding: 0;
    margin: 0 0 8px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}
.hsk-question-heading h2 { min-width: 0; margin: 2px 0 0; color: #302b2a; font-size: 17px; font-weight: 650; line-height: 1.55; overflow-wrap: anywhere; }
.hsk-question-number { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border-radius: 11px; background: #fff0ed; color: #b83236; font-size: 11px; font-weight: 800; }
.hsk-question-category { display: inline-flex; margin: 10px 0 13px 46px; padding: 4px 9px; border-radius: 20px; background: #f5f6f5; color: #727a75; font-size: 10px; }
.hsk-step-navigation { display: flex; justify-content: space-between; gap: 10px; margin: 12px 0; }
.hsk-step-navigation .button { min-height: 38px; padding: 0 13px; font-size: 11px; }
.hsk-step-navigation .button:disabled { opacity: .48; cursor: not-allowed; }
.hsk-question-jump[aria-current="step"] { outline: 2px solid rgba(196, 59, 59, .25); outline-offset: 2px; }
.hsk-answer-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.practice-question .hsk-answer-option {
    min-width: 0;
    min-height: 54px;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid #eceeeb;
    border-radius: 10px;
    background: #fafbfa;
    color: #505753;
    font-size: 13px;
    line-height: 1.45;
    transition: border-color .18s, background .18s, box-shadow .18s;
}
.practice-question .hsk-answer-option:hover { border-color: #e8c1ba; background: #fff8f6; }
.hsk-answer-option input { width: 16px; height: 16px; flex: 0 0 16px; margin: 0; accent-color: #c43b3b; }
.hsk-answer-letter { width: 24px; height: 24px; flex: 0 0 24px; display: grid; place-items: center; border-radius: 8px; background: #f0f1ef; color: #707671; font-size: 10px; font-weight: 800; }
.practice-question .hsk-answer-option:has(input:checked) { border-color: #d99187; background: #fff2ef; box-shadow: 0 0 0 2px rgba(196, 59, 59, .06); color: #393331; }
.hsk-answer-option:has(input:checked) .hsk-answer-letter { background: #c43b3b; color: #fff; }
.hsk-submit-bar {
    position: sticky;
    z-index: 5;
    bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 15px;
    margin: 18px 0;
    border: 1px solid rgba(230, 226, 220, .92);
    border-radius: 14px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 10px 30px rgba(38, 40, 42, .12);
    backdrop-filter: blur(12px);
}
.hsk-submit-bar > span { color: #777d79; font-size: 11px; }
.hsk-submit-bar > span i { margin-right: 5px; color: #d18d52; }
.hsk-submit-bar .button { flex: 0 0 auto; }
.hsk-result {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 16px 19px;
    margin: 16px 0;
    border: 1px solid #d5e9dd;
    border-radius: 15px;
    background: linear-gradient(105deg, #edf8f1, #fff 75%);
}
.hsk-result-icon { width: 40px; height: 40px; flex: 0 0 40px; display: grid; place-items: center; border-radius: 13px; background: #d8f0e2; color: #348263; }
.hsk-result strong { color: #315746; font-size: 13px; }
.hsk-result p { color: #718078; font-size: 11px; }
.hsk-result-score { margin-left: auto; color: #328263; font-size: 25px; font-weight: 800; }
.hsk-result-score small { color: #829087; font-size: 11px; font-weight: 600; }
.hsk-empty { padding: 38px 22px; border: 1px solid #ede7e3; border-radius: 16px; background: linear-gradient(120deg, #fff8f5, #fff 70%, #f4faf7); text-align: center; }
.hsk-empty > span { width: 52px; height: 52px; display: grid; place-items: center; margin: 0 auto 13px; border-radius: 17px; background: #fff0e8; color: #c56e52; font-size: 20px; }
.hsk-empty h2 { color: #3c3734; font-size: 17px; }
.hsk-empty p { max-width: 430px; margin: 5px auto 0; color: #797572; font-size: 12px; }
.level-filter {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 16px 0;
    color: #4a515c;
    font-size: 12px;
    font-weight: 600;
}
.level-filter select,
.level-filter input {
    min-height: 38px;
    padding: 7px 10px;
    border: 1px solid #e2e6ec;
    border-radius: 8px;
    background: #fff;
    color: #343a46;
    font: inherit;
}
.muted-text { color: var(--color-muted) !important; font-size: 11px !important; }
.feature-history { margin-top: 22px; }
.feature-history h2 { margin-bottom: 10px; font-size: 16px; }
.assignment-page-list { display: grid; gap: 14px; margin-top: 18px; }
.assignment-card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 10px;
}
.assignment-card-heading h2 { margin-bottom: 0; }
.assignment-deadline {
    flex: 0 0 auto;
    color: #777f8b;
    font-size: 11px;
}
.assignment-deadline i { margin-right: 4px; color: #c43b3b; }
.submission-form,
.grading-form {
    display: grid;
    gap: 12px;
    margin-top: 16px;
    padding-top: 15px;
    border-top: 1px solid #eceff3;
}
.submission-form label,
.grading-form label {
    display: grid;
    gap: 6px;
    color: #414854;
    font-size: 11px;
    font-weight: 600;
}
.submission-form input[type="file"],
.submission-form textarea,
.grading-form input,
.grading-form textarea {
    width: 100%;
    padding: 9px 10px;
    border: 1px solid #e2e6ec;
    border-radius: 7px;
    background: #fff;
    font: inherit;
    font-size: 12px;
}
.submission-form textarea,
.grading-form textarea { resize: vertical; }
.graded-score { margin-top: 12px; color: #23885b !important; }
.table-wrap { overflow-x: auto; margin-top: 14px; }
.table-wrap .table { min-width: 490px; margin-top: 0; }
.management-form-card,
.management-list-card { margin-top: 18px; }
.account-password-card { max-width: 760px; }
.teacher-account-card { max-width: 800px; }
.teacher-account-note { grid-column: 1 / -1; margin: 0; color: #777f8b; font-size: 11px; }
.teacher-account-note i { margin-right: 5px; color: #348263; }
.management-form-card h2,
.management-list-card h2 { margin: 0 0 15px; font-size: 16px; }
.management-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;
}
.management-form label {
    display: grid;
    gap: 6px;
    color: #414854;
    font-size: 11px;
    font-weight: 600;
}
.management-form label:has(textarea),
.management-actions { grid-column: 1 / -1; }
.management-form input,
.management-form textarea,
.management-form select {
    width: 100%;
    padding: 10px 11px;
    border: 1px solid #e2e6ec;
    border-radius: 8px;
    background: #fff;
    color: #252a32;
    font: inherit;
    font-size: 12px;
}
.management-form textarea { resize: vertical; }
.management-form input:focus,
.management-form textarea:focus,
.management-form select:focus,
.submission-form input:focus,
.submission-form textarea:focus,
.grading-form input:focus,
.grading-form textarea:focus {
    outline: none;
    border-color: var(--color-teal);
    box-shadow: 0 0 0 3px rgba(67, 141, 130, .14);
}
.management-actions { display: flex; gap: 9px; margin-top: 3px; }
.button-secondary {
    border: 1px solid #e2e6ec;
    background: #fff;
    color: #535b68;
}
.button-secondary:hover { background: #f7f8fa; text-decoration: none; }
.management-list-card .dashboard-panel-heading { margin-bottom: 0; }
.management-list-card .dashboard-panel-heading .badge { margin-left: auto; }
.management-row-actions { white-space: nowrap; }
.management-row-actions > a,
.management-row-actions button {
    padding: 0;
    border: 0;
    background: none;
    color: #b83236;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}
.management-row-actions form { display: inline; margin-left: 10px; }
.management-delete {
    padding: 0;
    border: 0;
    background: none;
    color: #b83236;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}
.attendance-form { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end; }
.attendance-form .button { min-height: 39px; }
.management-actions .button:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }
.assignment-list-tools {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}
.assignment-list-tools .button { min-height: 36px; padding: 0 12px; font-size: 11px; }
.assignment-management-table { min-width: 760px !important; }
.assignment-class-filter {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    margin: 14px 0;
}
.assignment-class-filter label {
    display: grid;
    gap: 5px;
    color: #414854;
    font-size: 11px;
    font-weight: 600;
}
.assignment-class-filter select {
    min-width: 220px;
    min-height: 36px;
    padding: 7px 10px;
    border: 1px solid #e2e6ec;
    border-radius: 8px;
    background: #fff;
    color: #343a46;
    font: inherit;
    font-size: 12px;
}
.assignment-class-filter .button { min-height: 36px; padding: 0 12px; font-size: 11px; }
.assignment-class-filter > a { padding-bottom: 10px; color: #b83236; font-size: 11px; }
.assignment-actions { white-space: normal; }
.assignment-actions > a { display: inline-block; margin-right: 10px; }
.assignment-actions form { display: inline-block; margin: 0 10px 0 0; }
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 18px;
    color: #68707d;
    font-size: 12px;
}
.pagination a { color: #b83236; font-weight: 600; }
.pagination a:hover { text-decoration: underline; }
.grading-overview {
    display: flex;
    align-items: baseline;
    gap: 9px;
    margin: 18px 0 14px;
    padding: 14px 18px;
    border: 1px solid #f1dfdf;
    border-radius: 11px;
    background: #fff8f8;
    color: #626a76;
    font-size: 12px;
}
.grading-overview strong { color: #b83236; font-size: 22px; }
.grading-result-count { margin-left: auto; }
.grading-filters {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) minmax(150px, .7fr) minmax(220px, 1.4fr) auto;
    align-items: end;
    gap: 12px;
    margin-bottom: 16px;
    padding: 15px;
    border: 1px solid #eceff3;
    border-radius: 12px;
    background: #fff;
}
.grading-filters label {
    display: grid;
    gap: 6px;
    color: #414854;
    font-size: 11px;
    font-weight: 600;
}
.grading-filters select,
.grading-filters input {
    width: 100%;
    min-width: 0;
    min-height: 39px;
    padding: 8px 10px;
    border: 1px solid #e2e6ec;
    border-radius: 8px;
    background: #fff;
    color: #343a46;
    font: inherit;
    font-size: 12px;
}
.grading-table-wrap { overflow-x: auto; border: 1px solid #eceff3; border-radius: 12px; }
.grading-table { min-width: 850px; margin: 0; }
.grading-table th,
.grading-table td { padding: 12px; vertical-align: top; font-size: 12px; }
.grading-table td:first-child { min-width: 190px; }
.grading-table td:first-child strong,
.grading-assignment-title { display: block; margin-bottom: 7px; }
.grading-assignment-title { color: #777f8b; }
.grading-table .badge { margin-top: 3px; font-size: 10px; }
.grading-pdf-link { min-height: 34px; padding: 0 10px; white-space: nowrap; font-size: 11px; }
.grading-inline-form { display: grid; grid-template-columns: 90px minmax(130px, 1fr) auto; align-items: start; gap: 7px; }
.grading-inline-form input,
.grading-inline-form textarea {
    width: 100%;
    min-width: 0;
    padding: 8px;
    border: 1px solid #e2e6ec;
    border-radius: 7px;
    font: inherit;
    font-size: 11px;
}
.grading-inline-form textarea { resize: vertical; }
.grading-inline-form .button { min-height: 34px; padding: 0 10px; white-space: nowrap; font-size: 10px; }
.grading-note { margin-top: 7px; color: #747c88; font-size: 11px; }
.grading-note summary { cursor: pointer; color: #b83236; }
.grading-note p { max-width: 230px; margin-top: 6px; white-space: normal; overflow-wrap: anywhere; }
.teacher-management-page { padding-top: 25px; padding-bottom: 36px; }
.teacher-management-page > .feature-page-header { margin-bottom: 16px; }
.teacher-management-page .learning-card { padding: clamp(16px, 2vw, 22px); }
.teacher-management-page .management-list-card { margin-top: 14px; }
.teacher-management-page .management-form { gap: 11px; }
.teacher-management-page .management-form label { font-size: 12px; }
.teacher-management-page .management-form input,
.teacher-management-page .management-form select,
.teacher-management-page .management-form textarea { min-height: 40px; padding: 9px 11px; }
.teacher-management-page .management-form textarea { min-height: 76px; }
.management-disclosure { margin-top: 14px; padding: 0 !important; overflow: hidden; }
.management-disclosure > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 62px;
    padding: 13px 18px;
    color: #333944;
    cursor: pointer;
    list-style: none;
}
.management-disclosure > summary::-webkit-details-marker { display: none; }
.management-disclosure > summary > span { display: grid; gap: 4px; }
.management-disclosure > summary strong { font-size: 14px; }
.management-disclosure > summary small { color: #858b96; font-size: 11px; font-weight: 400; }
.management-disclosure > summary > i { color: #858b96; font-size: 12px; transition: transform .18s ease; }
.management-disclosure[open] > summary { border-bottom: 1px solid #eef0f3; }
.management-disclosure[open] > summary > i { transform: rotate(180deg); }
.management-disclosure > summary:focus-visible { outline: 2px solid #c43b3b; outline-offset: -3px; }
.management-disclosure-body { padding: 17px 18px 18px; }
.management-disclosure-body > .muted-text { margin: 0 0 12px; }
.teacher-management-page .table { margin-top: 12px; }
.teacher-management-page .table th,
.teacher-management-page .table td { padding: 11px 13px; font-size: 12px; }
.teacher-management-page .management-row-actions { white-space: normal; }
.teacher-management-page .management-row-actions > a,
.teacher-management-page .management-row-actions button { display: inline-block; margin: 3px 8px 3px 0; }
.teacher-management-page .management-row-actions form { display: inline-block; margin: 3px 8px 3px 0; }
.teacher-management-page .level-filter { flex-wrap: wrap; }
.teacher-management-page .level-filter input,
.teacher-management-page .level-filter select { min-width: min(230px, 100%); }
.teacher-management-page .grading-overview { margin: 12px 0; }
.teacher-management-page .grading-filters { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 13px; }
.teacher-management-page .grading-filters .grading-search { grid-column: span 2; }
.teacher-management-page .grading-filters > .button { min-height: 39px; }
.teacher-management-page .grading-table th,
.teacher-management-page .grading-table td { padding: 10px; }
.teacher-management-page .grading-inline-form { grid-template-columns: 72px minmax(120px, 1fr); }
.teacher-management-page .grading-inline-form .button { grid-column: 1 / -1; justify-self: start; }
.teacher-management-page .assignment-class-filter { flex-wrap: wrap; }
.teacher-management-page .assignment-list-tools { flex-wrap: wrap; }
.teacher-management-page .attendance-form .button { align-self: end; }
.teacher-management-page .question-filters {
    display: grid;
    grid-template-columns: minmax(210px, 2fr) repeat(3, minmax(125px, 1fr)) auto;
    align-items: end;
    gap: 10px;
    padding: 13px;
    margin: 14px 0 8px;
    border: 1px solid #eceff3;
    border-radius: 11px;
    background: #fafbfc;
}
.teacher-management-page .question-filters label {
    display: grid;
    gap: 5px;
    color: #414854;
    font-size: 11px;
    font-weight: 600;
}
.teacher-management-page .question-filters input,
.teacher-management-page .question-filters select {
    width: 100%;
    min-width: 0;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid #e2e6ec;
    border-radius: 8px;
    background: #fff;
    color: #343a46;
    font: inherit;
    font-size: 12px;
}
.teacher-management-page .question-filter-actions { display: flex; gap: 7px; }
.teacher-management-page .question-filter-actions .button { min-height: 38px; padding: 0 11px; font-size: 11px; }
.teacher-management-page .question-result-count { margin: 8px 2px; }
.teacher-management-page .question-bank-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 10px 0 12px;
}
.question-bank-summary > span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 9px;
    border: 1px solid #e8ebef;
    border-radius: 999px;
    background: #f7f8fa;
    color: #68717e;
    font-size: 10px;
}
.question-bank-summary strong { color: #343a46; font-size: 11px; }
.question-bank-summary .question-count-active { border-color: #d7eee3; background: #eef8f3; color: #28775e; }
.question-bank-summary .question-count-active strong { color: #28775e; }
.question-bank-summary .question-count-archived { border-color: #f0e2ca; background: #fbf5eb; color: #936a35; }
.question-bank-summary .question-count-archived strong { color: #936a35; }
.teacher-management-page .question-pagination-top {
    justify-content: flex-start;
    margin: 8px 0 12px;
}
.teacher-management-page .question-pagination-top .button { min-height: 34px; font-size: 10px; }
.teacher-management-page .question-bank-table { min-width: 760px !important; }
.teacher-management-page .question-bank-prompt { min-width: 260px; max-width: 540px; white-space: normal; }
.teacher-management-page .question-bank-table td { vertical-align: middle; }
.question-answer-key {
    width: 25px;
    height: 25px;
    display: inline-grid;
    place-items: center;
    border-radius: 8px;
    background: var(--color-teal-soft);
    color: #286d64;
    font-size: 10px;
    font-weight: 700;
}
.dashboard-shell .teacher-welcome { margin-bottom: 16px; }
.dashboard-shell .dashboard-stats { gap: 11px; margin-bottom: 16px; }
.dashboard-shell .teacher-content-grid { gap: 14px; }
.dashboard-shell .dashboard-panel { padding: 17px; }
.teacher-activity-panel { scroll-margin-top: 84px; }
.teacher-dashboard-subsection {
    margin-top: 17px;
    padding-top: 15px;
    border-top: 1px solid #eef0f3;
}
.teacher-dashboard-subsection .dashboard-panel-heading { margin-bottom: 7px; }
.teacher-dashboard-subsection .dashboard-panel-heading h3 {
    margin-top: 3px;
    font-size: 13px;
}
.teacher-activity-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 22px; }
.teacher-activity-item {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 0;
    border-bottom: 1px solid #f0f1f3;
    color: #333944;
}
.teacher-activity-item:nth-last-child(-n + 2) { border-bottom: 0; }
.teacher-activity-item:hover { color: #b83236; text-decoration: none; }
.teacher-activity-icon {
    width: 34px;
    height: 34px;
    display: grid;
    flex: 0 0 34px;
    place-items: center;
    border-radius: 10px;
    font-size: 13px;
}
.teacher-activity-icon.activity-submission { background: #fff0ef; color: #b83236; }
.teacher-activity-icon.activity-practice { background: #f2edfc; color: #7956bd; }
.teacher-activity-copy { min-width: 0; display: grid; gap: 3px; }
.teacher-activity-copy strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.teacher-activity-copy > span { overflow: hidden; color: #858b96; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.teacher-activity-item time { flex: 0 0 auto; margin-left: auto; color: #9096a1; font-size: 9px; white-space: nowrap; }
@media (max-width: 780px) {
    .teacher-management-page { padding-top: 18px; }
    .teacher-management-page .management-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .teacher-management-page .grading-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .teacher-management-page .grading-filters .grading-search { grid-column: 1 / -1; }
    .teacher-management-page .grading-filters > .button { justify-self: start; }
    .teacher-management-page .grading-overview { flex-wrap: wrap; }
    .teacher-management-page .grading-result-count { margin-left: 0; }
    .teacher-activity-list { grid-template-columns: minmax(0, 1fr); }
    .teacher-activity-item:nth-last-child(2) { border-bottom: 1px solid #f0f1f3; }
    .teacher-activity-item:last-child { border-bottom: 0; }
    .teacher-management-page .question-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .teacher-management-page .question-search { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
    .teacher-management-page { padding-right: 12px; padding-left: 12px; }
    .teacher-management-page .feature-page-header { align-items: flex-start; }
    .teacher-management-page .feature-user { padding-top: 22px; white-space: nowrap; }
    .teacher-management-page .management-form { grid-template-columns: minmax(0, 1fr); }
    .teacher-management-page .management-form label:has(textarea),
    .teacher-management-page .management-actions { grid-column: 1; }
    .management-disclosure > summary { padding-right: 14px; padding-left: 14px; }
    .management-disclosure-body { padding: 14px; }
    .teacher-management-page .grading-filters { grid-template-columns: minmax(0, 1fr); }
    .teacher-management-page .grading-filters .grading-search { grid-column: 1; }
    .teacher-management-page .grading-filters > .button { width: 100%; justify-content: center; }
    .teacher-management-page .question-filters { grid-template-columns: minmax(0, 1fr); }
    .teacher-management-page .question-search { grid-column: 1; }
    .teacher-management-page .question-filter-actions .button { flex: 1; justify-content: center; }
    .teacher-management-page .grading-inline-form { grid-template-columns: minmax(0, 1fr); }
    .teacher-management-page .grading-inline-form .button { grid-column: 1; }
    .teacher-management-page .feature-user { font-size: 10px; }
    .teacher-management-page .dashboard-panel-heading { align-items: flex-start; flex-wrap: wrap; }
    .teacher-management-page .assignment-list-tools { width: 100%; margin-left: 0; }
    .teacher-management-page .assignment-class-filter,
    .teacher-management-page .assignment-class-filter label,
    .teacher-management-page .assignment-class-filter select { width: 100%; min-width: 0; }
    .teacher-management-page .assignment-class-filter .button { justify-content: center; }
}
.selected-class-banner,
.current-class-card {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0 14px;
    padding: 14px 18px;
    border: 1px solid #f1dfdf;
    border-radius: 11px;
    background: #fff8f8;
}
.selected-class-banner { color: #626a76; font-size: 12px; }
.selected-class-banner > span i { margin-right: 5px; color: #b83236; }
.selected-class-banner > strong { color: #252a32; }
.selected-class-banner > a { margin-left: auto; color: #b83236; font-weight: 600; }
.current-class-card {
    align-items: flex-start;
    flex-direction: column;
    background: #fff;
}
.current-class-card h2 { font-size: 19px; }
.current-class-card > p:not(.dashboard-section-kicker) { color: #68707d; font-size: 12px; line-height: 1.6; }
.current-class-card .button { margin-top: 4px; }
.class-choice-section { margin-top: 22px; }
.class-choice-card { display: flex; flex-direction: column; align-items: flex-start; }
.class-choice-card h2 { margin: 12px 0 6px; }
.class-choice-card > p { flex: 1; margin-bottom: 16px; }
.class-choice-card form { margin-top: auto; }
.class-choice-card .button { min-height: 37px; }
.dashboard-selected-class { margin-top: 11px; font-size: 12px !important; }
.dashboard-selected-class i { color: #b83236; }
.dashboard-selected-class a { color: #b83236; font-weight: 600; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
@media (max-width: 680px) {
    .feature-page-header { align-items: flex-start; }
    .feature-user { display: none; }
    .learning-grid { grid-template-columns: 1fr; }
    .management-form,
    .attendance-form { grid-template-columns: 1fr; }
    .management-form label:has(textarea),
    .management-actions { grid-column: auto; }
    .assignment-list-tools { align-items: flex-end; flex-direction: column-reverse; gap: 7px; }
    .assignment-class-filter { align-items: stretch; flex-wrap: wrap; }
    .assignment-class-filter label { flex: 1 1 100%; }
    .assignment-class-filter select { width: 100%; min-width: 0; }
    .selected-class-banner { align-items: flex-start; flex-wrap: wrap; }
    .selected-class-banner > a { width: 100%; margin-left: 0; }
    .grading-filters { grid-template-columns: 1fr 1fr; }
    .grading-filters .grading-search { grid-column: 1 / -1; }
    .grading-filters > .button { grid-column: 1 / -1; justify-content: center; }
    .grading-result-count { margin-left: auto; text-align: right; }
    .hsk-practice-intro { align-items: stretch; flex-direction: column; gap: 15px; padding: 20px; }
    .hsk-practice-intro h2 { font-size: 18px; }
    .hsk-level-picker { min-width: 0; }
    .hsk-level-picker select { width: 100%; }
    .hsk-progress-panel { padding: 14px; }
    .hsk-answer-options { grid-template-columns: 1fr; }
    .hsk-question-stage .hsk-question { padding: 17px; }
    .hsk-question-heading { gap: 9px; }
    .hsk-question-heading h2 { font-size: 15px; }
    .hsk-question-category { margin: 8px 0 11px 43px; }
    .hsk-submit-bar { align-items: stretch; flex-direction: column; bottom: 7px; }
    .hsk-submit-bar .button { width: 100%; }
}
@media (max-width: 420px) {
    .grading-filters { grid-template-columns: 1fr; }
    .grading-filters .grading-search,
    .grading-filters > .button { grid-column: auto; }
    .grading-overview { align-items: flex-start; flex-wrap: wrap; }
    .grading-result-count { width: 100%; margin-left: 0; text-align: left; }
    .assignment-list-tools .button { font-size: 10px; }
    .hsk-progress-copy { align-items: flex-start; flex-direction: column; gap: 2px; }
    .hsk-question-nav { gap: 6px; }
    .hsk-question-jump { width: 29px; height: 29px; }
    .hsk-result { align-items: flex-start; flex-wrap: wrap; }
    .hsk-result-score { margin-left: auto; }
}

/* ========== CONTAINER ========== */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px;
}
.container header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    padding: 20px 28px;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,.04);
    margin-bottom: 24px;
}
.container header h1 {
    font-size: 20px;
    font-weight: 600;
}
.container header h1 i { margin-right: 8px; color: #c43b3b; }
.container header a { font-size: 14px; }

/* ========== STATS ========== */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.stat {
    background: #fff;
    padding: 22px;
    border-radius: 12px;
    font-weight: 600;
    color: #1a1a1a;
    box-shadow: 0 2px 10px rgba(0,0,0,.04);
    display: flex;
    align-items: center;
    gap: 12px;
}
.stat i {
    font-size: 22px;
    color: #c43b3b;
    background: #fff0ef;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========== CARD GRID (Menu) ========== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}
.card-link {
    background: #fff;
    padding: 22px 20px;
    border-radius: 12px;
    color: #1a1a1a;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid #eee;
    transition: all .2s;
}
.card-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(0,0,0,.08);
    border-color: #c43b3b;
    text-decoration: none;
    color: #c43b3b;
}
.card-link i {
    font-size: 18px;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c43b3b;
}

/* ========== TABLE ========== */
.table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,.04);
    margin-top: 16px;
}
.table th, .table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid #f1f1f1;
    font-size: 14px;
}
.table th {
    background: #f2f6f7;
    font-weight: 600;
    color: #52646a;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: #fafbff; }

/* ========== FORMS ========== */
.form-box {
    background: #fff;
    padding: 28px;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,.04);
    max-width: 600px;
}
.form-box label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #555;
}
.form-box input,
.form-box textarea,
.form-box select {
    width: 100%;
    padding: 12px 14px;
    margin-bottom: 16px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color .2s;
}
.form-box input:focus,
.form-box textarea:focus,
.form-box select:focus {
    outline: none;
    border-color: #c43b3b;
}
.form-box textarea { resize: vertical; min-height: 90px; }
.form-box button {
    background: #1a1a1a;
    color: #fff;
    padding: 12px 26px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
}
.form-box button:hover { background: #000; }

/* ========== ALERTS ========== */
.alert {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.alert i { font-size: 16px; }
.alert-success { background: #dcfce7; color: #166534; }
.alert-error   { background: #fee2e2; color: #b91c1c; }
.alert-info    { background: var(--color-teal-soft); color: #286d64; }

/* ========== BADGE ========== */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.badge-success { background: #dcfce7; color: #166534; }
.badge-warn    { background: #fef3c7; color: #92400e; }
.badge-info    { background: var(--color-blue-soft); color: var(--color-blue); }

/* ========== FLASHCARD MANAGEMENT ========== */
.flashcard-filter {
    display: grid;
    grid-template-columns: minmax(220px, 2fr) minmax(130px, .8fr) minmax(150px, 1fr) auto;
    align-items: end;
    gap: 12px;
    margin: 18px 0 8px;
}
.flashcard-filter label {
    display: grid;
    gap: 6px;
    color: #414854;
    font-size: 12px;
    font-weight: 600;
}
.flashcard-filter input,
.flashcard-filter select {
    width: 100%;
    min-width: 0;
    min-height: 40px;
    padding: 8px 11px;
    border: 1px solid #e2e6ec;
    border-radius: 9px;
    background: #fff;
    color: #343a46;
    font: inherit;
}
.flashcard-filter-actions {
    display: flex;
    gap: 8px;
}
.flashcard-result-count { margin: 8px 0; }
.flashcard-table { min-width: 900px !important; }
.flashcard-table th,
.flashcard-table td { vertical-align: middle; }
.flashcard-mandarin { font-size: 17px !important; font-weight: 700; }
.flashcard-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 16px;
    color: #666;
    font-size: 12px;
}
.flashcard-pagination .button { text-decoration: none; }
#content-list,
#student-list,
#class-list,
#assignment-list,
#grading-list { scroll-margin-top: 86px; }
@media (max-width: 760px) {
    .flashcard-filter { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .flashcard-search { grid-column: 1 / -1; }
}
@media (max-width: 460px) {
    .flashcard-filter { grid-template-columns: 1fr; }
    .flashcard-search { grid-column: auto; }
    .flashcard-filter-actions .button { flex: 1; justify-content: center; }
    .flashcard-pagination { flex-wrap: wrap; }
}

/* ========== PUBLIC LEARNING PAGES ========== */
.public-learning-page {
    -webkit-user-select: none;
    user-select: none;
    background:
        radial-gradient(ellipse at 8% 0%, rgba(185, 71, 66, .05), transparent 34rem),
        radial-gradient(ellipse at 94% 18%, rgba(67, 141, 130, .07), transparent 31rem),
        radial-gradient(ellipse at 72% 88%, rgba(128, 107, 177, .035), transparent 34rem),
        var(--color-canvas);
    color: var(--color-ink);
}
.public-learning-page input,
.public-learning-page textarea,
.public-learning-page [contenteditable="true"] {
    -webkit-user-select: text;
    user-select: text;
}
.public-learning-page a { color: inherit; }
.public-learning-page a:hover { text-decoration: none; }
.learning-header {
    max-width: none;
}
.learning-footer-brand:hover { text-decoration: none; }
.learning-main { width: min(1120px, calc(100% - 48px)); margin: 0 auto; }
.learning-breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 25px 0 17px;
    color: var(--color-muted);
    font-size: 11px;
}
.learning-breadcrumb a:hover { color: var(--color-brand); }
.learning-breadcrumb i { font-size: 8px; }
.learning-hero {
    position: relative;
    min-height: 330px;
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    align-items: center;
    overflow: hidden;
    padding: 38px 58px;
    border: 1px solid rgba(185, 71, 66, .12);
    border-radius: 28px;
    background: linear-gradient(112deg, #f8e9e5 0%, #fff8f4 56%, #eaf3ed 100%);
}
.learning-hero-copy { position: relative; z-index: 1; max-width: 610px; }
.learning-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--color-brand);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.45px;
}
.learning-hero h1,
.flashcards-intro h1,
.practice-hero h1 {
    margin-top: 15px;
    color: var(--color-ink);
    font-size: clamp(36px, 5vw, 55px);
    font-weight: 750;
    line-height: 1.12;
    letter-spacing: -1.9px;
}
.learning-hero h1 span,
.flashcards-intro h1 span,
.practice-hero h1 span { color: var(--color-brand); }
.learning-hero-copy > p,
.flashcards-intro > p,
.practice-hero-copy > p {
    max-width: 510px;
    margin-top: 15px;
    color: var(--color-muted);
    font-size: 14px;
    line-height: 1.8;
}
.learning-hero-link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-top: 21px;
    color: var(--color-brand) !important;
    font-size: 13px;
    font-weight: 700;
}
.learning-hero-link:hover { gap: 13px; }
.learning-hero-art {
    position: relative;
    width: 280px;
    height: 245px;
    justify-self: center;
    display: grid;
    place-items: center;
}
.hero-art-sun {
    position: absolute;
    width: 218px;
    height: 218px;
    border-radius: 50%;
    background: #f2d9d6;
}
.hero-art-character {
    position: relative;
    z-index: 1;
    color: var(--color-brand-strong);
    font-family: serif;
    font-size: 134px;
    font-weight: 700;
    line-height: 1;
    transform: rotate(-7deg);
    text-shadow: 0 9px 0 rgba(255, 249, 238, .8);
}
.hero-art-label {
    position: absolute;
    right: -3px;
    bottom: 13px;
    z-index: 2;
    padding: 8px 12px;
    border: 1px solid rgba(255,255,255,.9);
    border-radius: 999px;
    background: #fff;
    color: #7a6158;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .8px;
    box-shadow: 0 8px 18px rgba(104, 71, 46, .09);
}
.hero-art-sparkle { position: absolute; color: var(--color-brand); }
.sparkle-one { top: 18px; right: 20px; font-size: 25px; }
.sparkle-two { bottom: 35px; left: 10px; font-size: 19px; }
.vocabulary-page-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    padding: 27px 0 5px;
}
.vocabulary-page-heading .learning-kicker { font-size: 9px; }
.vocabulary-page-heading h1 {
    margin-top: 5px;
    color: var(--color-ink);
    font-size: clamp(29px, 4vw, 37px);
    font-weight: 750;
    line-height: 1.15;
    letter-spacing: -1.1px;
}
.vocabulary-page-heading h1 span { color: var(--color-brand); }
.vocabulary-page-heading > p {
    max-width: 390px;
    margin-bottom: 3px;
    color: var(--color-muted);
    font-size: 12px;
    line-height: 1.65;
}
.vocabulary-library { padding: 23px 0 54px; }
.library-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
}
.library-heading h2 {
    margin-top: 0;
    color: var(--color-ink);
    font-size: 21px;
    letter-spacing: -.6px;
}
.library-heading .learning-kicker { font-size: 9px; }
.library-count { margin-top: 5px; color: var(--color-muted); font-size: 12px; }
.library-flashcard-link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 11px 15px;
    border: 1px solid var(--color-line);
    border-radius: 11px;
    background: #fff;
    color: var(--color-brand) !important;
    font-size: 12px;
    font-weight: 700;
}
.library-flashcard-link:hover { background: var(--color-brand-soft); }
.vocabulary-filters {
    display: flex;
    gap: 11px;
    margin: 21px 0 17px;
}
.vocabulary-search,
.vocabulary-level-filter {
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    border: 1px solid var(--color-line);
    border-radius: 12px;
    background: #fff;
    color: var(--color-muted);
}
.vocabulary-search { flex: 1; }
.vocabulary-search input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--color-ink);
    font: inherit;
    font-size: 12px;
}
.vocabulary-search input::placeholder { color: #aaa19a; }
.vocabulary-level-filter { min-width: 176px; }
.vocabulary-level-filter select {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: #625a56;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    clip-path: inset(50%);
}
.vocabulary-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; }
.vocabulary-entry {
    position: relative;
    min-width: 0;
    min-height: 88px;
    display: grid;
    place-items: center;
    padding: 12px 8px;
    overflow: hidden;
    border: 1px solid #e8e4de;
    border-radius: 11px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 4px 13px rgba(75, 58, 44, .035);
    color: var(--color-ink);
    font: inherit;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}
.vocabulary-entry:hover {
    transform: translateY(-2px);
    border-color: rgba(185, 71, 66, .45);
    background: #fffdfb;
    box-shadow: 0 10px 22px rgba(60, 42, 38, .08);
}
.vocabulary-entry:focus-visible { outline: 3px solid rgba(185, 71, 66, .28); outline-offset: 2px; }
.vocabulary-entry[hidden] { display: none; }
.vocabulary-hanzi {
    color: var(--color-ink);
    font-family: serif;
    font-size: clamp(27px, 2.4vw, 32px);
    line-height: 1;
    white-space: nowrap;
}
.flashcard-level-chip {
    padding: 5px 9px;
    border-radius: 999px;
    background: var(--color-brand-soft);
    color: var(--color-brand-strong);
    font-size: 9px;
    font-weight: 800;
}
.vocabulary-empty { padding: 36px 0; color: var(--color-muted); text-align: center; font-size: 13px; }
.vocabulary-popup {
    position: fixed;
    z-index: 1200;
    width: min(320px, calc(100vw - 24px));
    max-width: none;
    max-height: calc(100dvh - 24px);
    padding: 19px 18px 14px;
    overflow: auto;
    border: 1px solid rgba(121, 98, 83, .14);
    border-radius: 15px;
    background: #fff;
    color: var(--color-ink);
    box-shadow: 0 12px 36px rgba(43, 35, 29, .2);
}
.vocabulary-popup[hidden] { display: none; }
.vocabulary-popup:not([hidden]) { animation: vocabulary-popup-in .14s ease-out; }
@keyframes vocabulary-popup-in {
    from { opacity: 0; transform: translateY(4px) scale(.99); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.vocabulary-dialog-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 29px;
    height: 29px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: #f6f3ef;
    color: #766d66;
    cursor: pointer;
}
.vocabulary-dialog-close:hover { background: #eee8e2; }
.vocabulary-dialog-heading { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 0; }
.vocabulary-dialog-heading h2 { color: #73594c; font-size: clamp(24px, 5vw, 31px); font-weight: 650; letter-spacing: .3px; }
.vocabulary-audio-button {
    width: 33px;
    height: 33px;
    flex: 0 0 auto;
    border: 1px solid #eadbd2;
    border-radius: 50%;
    background: #fff9f5;
    color: var(--color-brand);
    cursor: pointer;
}
.vocabulary-audio-button:hover { background: var(--color-brand-soft); }
.vocabulary-dialog-english { margin-top: 8px; color: #504943; text-align: center; font-size: 15px; font-weight: 650; }
.vocabulary-dialog-meaning { margin-top: 5px; color: #7b716a; text-align: center; font-size: 13px; }
.vocabulary-speaking { display: flex; justify-content: center; padding: 14px 0 2px; }
.vocabulary-speaking-button {
    width: 43px;
    height: 43px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: var(--color-brand);
    color: #fff;
    font-size: 17px;
    box-shadow: 0 4px 12px rgba(185, 71, 66, .18);
    cursor: pointer;
    transition: transform .18s, background .18s, box-shadow .18s;
}
.vocabulary-speaking-button:hover { transform: translateY(-2px); background: var(--color-brand-strong); }
.vocabulary-speaking-button:disabled { opacity: .6; cursor: wait; }
.vocabulary-speaking-button.is-listening { background: #477a70; }
.vocabulary-speaking-status { min-height: 0; margin: 4px 0 0; color: #7b716a; text-align: center; font-size: 11px; line-height: 1.5; }
.vocabulary-speaking-result { margin: 5px 0 0; color: #477a70; text-align: center; font-size: 11px; font-weight: 750; line-height: 1.5; }
.vocabulary-speaking-result.is-incorrect { color: var(--color-brand); }
.vocabulary-speaking-result[hidden] { display: none; }
.flashcards-main { max-width: 850px; }
.flashcards-intro { padding: 19px 0 17px; text-align: center; }
.flashcards-intro h1 { margin-top: 8px; font-size: clamp(29px, 4vw, 39px); line-height: 1.12; letter-spacing: -1.2px; }
.flashcards-intro > p { max-width: 570px; margin: 7px auto 0; font-size: 12px; }
.flashcard-practice {
    max-width: 680px;
    padding: 0;
    margin: 0 auto;
}
.flashcard-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.flashcard-level-select { display: grid; gap: 6px; color: #626b76; font-size: 10px; font-weight: 700; }
.flashcard-level-select select {
    min-width: 150px;
    min-height: 39px;
    padding: 0 11px;
    border: 1px solid var(--color-line);
    border-radius: 10px;
    background: #fff;
    color: #4a4140;
    font: inherit;
    font-size: 12px;
}
.shuffle-button {
    min-height: 39px;
    padding: 0 12px;
    border: 1px solid var(--color-line);
    border-radius: 10px;
    background: #fff;
    color: #596371;
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}
.shuffle-button:hover { border-color: rgba(185, 71, 66, .4); color: var(--color-brand); }
.flashcard-stage {
    position: relative;
    min-height: 0;
    display: grid;
    place-items: center;
    margin-top: 12px;
}
.study-flashcard {
    position: relative;
    z-index: 1;
    width: 100%;
    min-height: 340px;
    display: flex;
    flex-direction: column;
    padding: 20px 25px 17px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    text-align: center;
}
.study-flashcard[hidden] { display: none; }
.study-flashcard-heading { display: flex; align-items: center; justify-content: space-between; }
.flashcard-counter { color: #858b96; font-size: 10px; font-weight: 700; }
.flashcard-flip-area {
    position: relative;
    flex: 1;
    min-height: 220px;
    margin: 10px 0 13px;
    perspective: 1000px;
    cursor: pointer;
}
.flashcard-flip-area:focus-visible { outline: 3px solid rgba(185, 71, 66, .25); outline-offset: 4px; border-radius: 13px; }
.flashcard-flip-inner {
    position: absolute;
    inset: 0;
    transform-style: preserve-3d;
    transition: transform .48s cubic-bezier(.2, .7, .25, 1);
}
.study-flashcard.is-flipped .flashcard-flip-inner { transform: rotateY(180deg); }
.flashcard-side {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 18px;
    overflow: hidden;
    border: 1px solid var(--color-line);
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(37, 42, 50, .055);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}
.flashcard-back { transform: rotateY(180deg); background: #fffaf7; }
.flashcard-hint { color: #858b96; font-size: 11px; }
.flashcard-front > strong {
    margin-top: 0;
    color: var(--color-brand-strong);
    font-family: serif;
    font-size: clamp(72px, 13vw, 100px);
    line-height: 1.1;
}
.flashcard-pinyin { color: #87786f; font-size: 15px; font-weight: 700; }
.flashcard-meaning { margin-top: 5px; color: #453e3b; font-size: 18px; font-weight: 700; }
.flashcard-back-hanzi { position: absolute; right: 13px; bottom: 10px; color: #d3c8c0; font-family: serif; font-size: 16px; }
.flashcard-progress-track {
    height: 4px;
    overflow: hidden;
    border-radius: 99px;
    background: var(--color-line);
}
.flashcard-progress-track > span {
    width: 0;
    height: 100%;
    display: block;
    border-radius: inherit;
    background: var(--color-brand);
    transition: width .2s ease;
}
.flashcard-controls { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 13px; }
.flashcard-arrow {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    border: 1px solid var(--color-line);
    border-radius: 50%;
    background: #fff;
    color: #596371;
    cursor: pointer;
}
.flashcard-arrow:hover { border-color: rgba(185, 71, 66, .4); background: var(--color-brand-soft); color: var(--color-brand); }
.flashcard-reveal {
    min-height: 39px;
    min-width: 170px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 0 15px;
    border: 0;
    border-radius: 10px;
    background: var(--color-brand);
    color: #fff;
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}
.flashcard-reveal:hover { background: var(--color-brand-strong); }
.flashcard-empty { padding: 30px; color: var(--color-muted); font-size: 13px; }
.flashcard-keyboard-hint { margin-top: 12px; color: #858b96; font-size: 10px; text-align: center; }
.flashcard-keyboard-hint i { margin-right: 4px; color: var(--color-brand); }
.flashcards-vocabulary-link { display: flex; justify-content: center; gap: 7px; padding: 18px 0 35px; color: var(--color-brand) !important; font-size: 11px; font-weight: 700; }
.flashcards-vocabulary-link:hover { gap: 11px; }
.flashcards-next-step { display: flex; align-items: center; gap: 14px; padding: 19px 22px; margin: 24px auto 58px; border: 1px solid var(--color-line); border-radius: 15px; background: rgba(255,255,255,.78); }
.next-step-icon {
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--color-brand-soft);
    color: var(--color-brand);
}
.flashcards-next-step > div { flex: 1; }
.flashcards-next-step strong { color: var(--color-ink); font-size: 12px; }
.flashcards-next-step p { margin-top: 3px; color: var(--color-muted); font-size: 11px; }
.flashcards-next-step > a { color: var(--color-brand) !important; font-size: 11px; font-weight: 700; white-space: nowrap; }
.practice-main { padding-bottom: 48px; }
.practice-page-heading { padding: 30px 0 18px; }
.practice-page-heading h1 {
    color: var(--color-ink);
    font-size: clamp(30px, 3.6vw, 40px);
    font-weight: 750;
    line-height: 1.15;
    letter-spacing: -1.2px;
}
.practice-type-switch { display: flex; width: fit-content; gap: 3px; padding: 4px; margin-top: 12px; border-radius: 10px; background: #eef0f2; }
.practice-type-switch a { display: inline-flex; min-height: 36px; align-items: center; gap: 8px; padding: 0 12px; border-radius: 7px; color: var(--color-muted) !important; font-size: 11px; font-weight: 700; }
.practice-type-switch a[aria-current="page"] { background: #fff; color: var(--color-brand-strong) !important; box-shadow: 0 1px 3px rgba(37,42,50,.1); }
.practice-type-switch a:focus-visible, .practice-question-link:focus-visible { outline: 3px solid rgba(185, 71, 66, .32); outline-offset: 2px; }
.practice-level-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.practice-level-card { padding: 15px; border: 1px solid var(--color-line); border-radius: 13px; background: #fff; }
.practice-level-card > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 11px; }
.practice-level-chip { padding: 4px 9px; border-radius: 20px; background: var(--color-brand-soft); color: var(--color-brand-strong); font-size: 10px; font-weight: 800; }
.practice-level-count { color: var(--color-muted); font-size: 10px; font-weight: 600; }
.practice-question-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.practice-question-link { display: flex; min-height: 39px; align-items: center; justify-content: space-between; gap: 6px; padding: 6px 9px; border: 1px solid #eceef0; border-radius: 8px; background: #fff; color: var(--color-brand-strong) !important; font-size: 10px; font-weight: 650; transition: background .18s, border-color .18s; }
.practice-question-link > i { font-size: 10px; }
a.practice-question-link:hover { border-color: #e6c6bd; background: #fff8f5; text-decoration: none; }
.practice-question-link.is-unconfigured { border-style: dashed; background: #fafafa; color: #9aa1aa !important; cursor: not-allowed; }
.practice-link-note { margin-top: 14px; color: var(--color-muted); font-size: 10px; }
.practice-link-note i { margin-right: 5px; color: var(--color-brand); }
.practice-link-note code { color: var(--color-brand-strong); font-size: 10px; }
.practice-hero {
    min-height: 390px;
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    align-items: center;
    gap: 26px;
    padding: 42px 58px;
    overflow: hidden;
    border: 1px solid rgba(185, 71, 66, .12);
    border-radius: 27px;
    background: linear-gradient(115deg, #f8e9e5, #fff8f4 60%, #eaf3ed);
}
.practice-hero-copy { position: relative; z-index: 1; }
.practice-open-button {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    gap: 11px;
    padding: 0 19px;
    margin-top: 22px;
    border-radius: 11px;
    background: var(--color-brand);
    color: #fff !important;
    font-size: 12px;
    font-weight: 700;
}
.practice-open-button:hover { background: var(--color-brand-strong); }
.practice-link-note { margin-top: 9px !important; color: var(--color-muted) !important; font-size: 10px !important; }
.practice-illustration { position: relative; height: 250px; display: grid; place-items: center; }
.practice-paper {
    position: relative;
    width: 162px;
    height: 205px;
    border: 1px solid #eadfd1;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 16px 34px rgba(37, 42, 50, .1);
    transform: rotate(-6deg);
}
.paper-lines {
    position: absolute;
    top: 50px;
    right: 22px;
    left: 22px;
    height: 85px;
    background: repeating-linear-gradient(to bottom, transparent 0 20px, #eee4da 20px 21px);
}
.paper-check {
    position: absolute;
    top: 31px;
    right: 27px;
    width: 35px;
    height: 35px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #e7f2df;
    color: #6d9a5d;
    font-size: 13px;
}
.paper-answer { position: absolute; bottom: 26px; left: 19px; color: var(--color-brand); font-size: 10px; font-weight: 800; }
.practice-illustration-character {
    position: absolute;
    right: 7%;
    bottom: 11%;
    color: var(--color-brand-strong);
    font-family: serif;
    font-size: 78px;
    font-weight: 700;
}
.practice-illustration-star { position: absolute; top: 10%; right: 13%; color: #d79557; font-size: 35px; }
.practice-details { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 23px; }
.practice-details article { padding: 20px; border: 1px solid #efe7df; border-radius: 15px; background: rgba(255,255,255,.85); }
.practice-details article > span {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: var(--color-brand-soft);
    color: var(--color-brand);
    font-size: 13px;
}
.practice-details h2 { margin-top: 14px; color: var(--color-ink); font-size: 13px; }
.practice-details p { margin-top: 6px; color: var(--color-muted); font-size: 11px; line-height: 1.7; }
.practice-details code { color: var(--color-brand); font-size: 10px; }
.practice-back-link { display: inline-flex; gap: 8px; margin-top: 24px; color: var(--color-brand) !important; font-size: 11px; font-weight: 700; }
.learning-footer {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px max(28px, calc((100% - 1120px) / 2));
    border-top: 1px solid var(--color-line);
    background: rgba(255,255,255,.72);
    color: var(--color-muted);
    font-size: 10px;
}
.learning-footer-brand { color: var(--color-ink) !important; font-size: 12px; }
.learning-footer > a:last-child { color: var(--color-brand) !important; font-weight: 700; }
.learning-footer > a:last-child i { margin-left: 5px; }
@media (max-width: 820px) {
    .learning-main { width: min(100% - 36px, 700px); }
    .learning-hero { min-height: 305px; padding: 34px; }
    .learning-hero-art { width: 220px; transform: scale(.85); }
    .vocabulary-grid { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 9px; }
    .practice-hero { padding: 34px; }
    .practice-level-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    .learning-main { width: calc(100% - 30px); }
    .learning-hero { grid-template-columns: 1fr; gap: 0; padding: 29px 24px 14px; border-radius: 21px; }
    .learning-hero h1,
    .practice-hero h1 { font-size: 38px; letter-spacing: -1.3px; }
    .learning-hero-art { width: 205px; height: 170px; justify-self: end; margin-top: -3px; transform: scale(.72); transform-origin: center top; }
    .vocabulary-page-heading { align-items: flex-start; flex-direction: column; gap: 7px; padding-top: 23px; }
    .vocabulary-page-heading > p { max-width: 100%; }
    .vocabulary-library { padding: 19px 0 45px; }
    .library-heading h2 { font-size: 19px; }
    .vocabulary-filters { flex-direction: column; }
    .vocabulary-level-filter { min-height: 44px; }
    .vocabulary-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
    .vocabulary-entry { min-height: 82px; padding: 10px 6px; }
    .vocabulary-hanzi { font-size: 31px; }
    .vocabulary-popup { padding: 19px 18px 14px; }
    .flashcards-intro { padding: 15px 2px 14px; }
    .flashcards-intro h1 { font-size: clamp(27px, 7.5vw, 33px); line-height: 1.08; letter-spacing: -1px; }
    .flashcards-intro > p { margin-top: 6px; font-size: 11px; line-height: 1.5; }
    .flashcard-practice { padding: 0; }
    .flashcard-toolbar { align-items: center; gap: 8px; }
    .flashcard-level-select { min-width: 0; flex: 1; }
    .flashcard-level-select select { width: 100%; min-width: 0; min-height: 36px; padding: 0 8px; }
    .shuffle-button { min-height: 36px; flex: 0 0 auto; padding: 0 9px; white-space: nowrap; }
    .flashcard-stage { min-height: 0; margin-top: 9px; }
    .study-flashcard { width: 100%; min-height: 278px; padding: 14px 0 0; border-radius: 0; }
    .flashcard-flip-area { min-height: 175px; margin: 8px 0 10px; }
    .flashcard-side { padding: 12px; border-radius: 13px; }
    .flashcard-front > strong { margin-top: 0; font-size: clamp(58px, 16vw, 72px); }
    .flashcard-meaning { font-size: 16px; }
    .flashcard-controls { width: 100%; gap: 6px; margin-top: 10px; }
    .flashcard-reveal { min-width: 0; min-height: 36px; flex: 1; gap: 6px; padding: 0 7px; font-size: 10px; white-space: nowrap; }
    .flashcard-arrow { width: 33px; height: 33px; }
    .flashcards-vocabulary-link { padding: 14px 0 25px; }
    .practice-page-heading { padding: 20px 0 14px; }
    .practice-page-heading h1 { font-size: 29px; letter-spacing: -.8px; }
    .practice-type-switch { margin-top: 10px; }
    .practice-type-switch { width: 100%; }
    .practice-type-switch a { flex: 1; justify-content: center; padding: 0 8px; font-size: 10px; }
    .practice-level-grid { grid-template-columns: 1fr; gap: 10px; }
    .practice-level-card { padding: 13px; }
    .practice-question-list { gap: 7px; }
    .practice-question-link { min-height: 40px; font-size: 10px; }
    .practice-hero { grid-template-columns: 1fr; gap: 0; padding: 30px 24px 12px; border-radius: 21px; }
    .practice-illustration { height: 200px; margin-top: 8px; }
    .practice-details { grid-template-columns: 1fr; gap: 9px; }
    .practice-details article { padding: 16px; }
    .practice-details h2 { margin-top: 10px; }
    .learning-footer { align-items: flex-start; flex-direction: column; padding: 19px 17px; }
}
@media (max-width: 380px) {
    .vocabulary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .vocabulary-entry { min-height: 78px; }
    .flashcard-level-select select { min-width: 0; font-size: 11px; }
    .shuffle-button { padding: 0 7px; font-size: 9px; }
    .study-flashcard { min-height: 260px; }
    .flashcard-reveal { font-size: 9px; }
}