/* 学习页外壳（不依赖仪表盘那份 200KB+ CSS） */

html:has(.ld-page),
html:has(.ld-page) body {
    background: #f5f5f7;
}

.dark html:has(.ld-page),
.dark html:has(.ld-page) body {
    background: #0a0a0a;
}

.ld-page {
    --ld-font-sans: "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    background: #f5f5f7;
    font-family: var(--ld-font-sans);
    -webkit-font-smoothing: antialiased;
}

.ld-page-glow {
    display: none;
}

.dark .ld-page {
    background: #0a0a0a;
}

.dark .ld-page-glow {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.dark .ld-page-glow::before,
.dark .ld-page-glow::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(72px);
    opacity: 0.45;
}

.dark .ld-page-glow::before {
    top: -10%;
    right: -8%;
    width: min(40vw, 20rem);
    height: min(40vw, 20rem);
    background: rgba(0, 113, 227, 0.22);
}

.dark .ld-page-glow::after {
    bottom: -12%;
    left: -10%;
    width: min(36vw, 18rem);
    height: min(36vw, 18rem);
    background: rgba(56, 158, 227, 0.12);
}

@keyframes scaleIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes pulse-slow {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.animate-pulse-slow {
    animation: pulse-slow 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

html {
    margin: 0;
    padding: 0;
    min-height: 100%;
    overflow-x: hidden;
}

html:has(body.is-learning-page) {
    overflow-y: hidden;
    height: 100%;
}

body.is-learning-page {
    margin: 0;
    height: 100%;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

body.is-learning-page::-webkit-scrollbar {
    display: none;
}

.main-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.content-scrollable {
    flex: 1;
    min-height: 0;

}

.main-scroll-container {
    display: block;
    min-height: 0;
}

#study-screen {
    display: block;
}

#study-content {
    overflow-y: hidden;
    overflow-x: hidden;
    overflow-anchor: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-top: 2vh;
    padding-bottom: 0.5rem;
}

#study-content:has(.quiz-container) {
    padding-top: 2vh;
}

#study-content::-webkit-scrollbar {
    display: none;
}

.content-container {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

@media (max-width: 768px) {
    .content-container {
        padding: 0.5rem;
    }
}

@media (max-width: 480px) {
    .content-container {
        padding: 0.25rem;
    }
}

.footer-container {
    flex-shrink: 0;

    margin-top: auto;

}

#study-screen .footer-container {
    position: relative;
    z-index: 1;
}

#vipCouponInput {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    min-height: 0 !important;
    max-height: 2rem !important;
    height: 2rem !important;
    line-height: 1.5 !important;
    box-sizing: border-box !important;
    padding-top: 0.375rem !important;
    padding-bottom: 0.375rem !important;
    vertical-align: middle !important;
}

#study-content .max-w-4xl,
#study-message {
    max-width: min(72rem, calc(100vw - 2rem));
}

#wordCard,
.quiz-container {
    width: 100%;
    max-width: min(56rem, calc(100vw - 2rem));
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 640px) {

    #study-content .max-w-4xl,
    #study-message,
    #wordCard,
    .quiz-container {
        max-width: 100%;
    }

    #study-content .max-w-4xl {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

@media (min-width: 641px) and (max-width: 768px) {

    #study-content .max-w-4xl,
    #study-message,
    #wordCard,
    .quiz-container {
        max-width: calc(100vw - 2rem);
    }

    #study-content .max-w-4xl {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 769px) {

    #study-content .max-w-4xl,
    #study-message {
        max-width: min(72rem, calc(100vw - 3rem));
    }

    #wordCard,
    .quiz-container {
        max-width: min(56rem, calc(100vw - 3rem));
    }
}

.phonetic-row {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    flex-shrink: 0;
    margin-bottom: 0.5rem;
    flex-wrap: nowrap;
    max-width: 100%;
}

.phonetic-row .phonetic-display {
    margin: 0;
    line-height: 1.75rem;
}

.phonetic-row__controls {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.125rem;
    flex-shrink: 0;
}

.phonetic-accent-text,
.phonetic-accent-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.02em;
    user-select: none;
}

.phonetic-accent-btn {
    margin: 0;
    padding: 0 0.625rem;
    min-width: 1.75rem;
    height: 1.75rem;
    border: 0;
    border-radius: 9999px;
    background: #f3f4f6;
    cursor: pointer;
    transition: color 0.15s ease, background-color 0.15s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.phonetic-accent-btn:hover {
    color: #374151;
    background: #e5e7eb;
}

.phonetic-accent-btn:focus-visible {
    outline: 2px solid #f9671e;
    outline-offset: 1px;
}

.dark .phonetic-accent-text,
.dark .phonetic-accent-btn {
    color: #9ca3af;
}

.dark .phonetic-accent-btn {
    background: #222224;
}

.dark .phonetic-accent-btn:hover {
    color: #e5e7eb;
    background: #2a2a2c;
}

.quiz-container .phonetic-accent-text,
.quiz-container .phonetic-accent-btn {
    font-size: 0.6875rem;
}

.quiz-container .phonetic-accent-btn {
    height: 1.5rem;
    padding: 0 0.5rem;
}

.pronunciation-play-btn,
.pronunciation-mute-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    border: 0;
    border-radius: 9999px;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    flex-shrink: 0;
    transition: color 0.15s ease, background-color 0.15s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.dark .pronunciation-play-btn {
    color: #9ca3af;
}

.dark .pronunciation-mute-btn {
    color: #9ca3af;
}

.pronunciation-play-btn:hover {
    color: #374151;
    background: #f3f4f6;
}

.pronunciation-mute-btn:hover {
    color: #374151;
    background: #f3f4f6;
}

.dark .pronunciation-play-btn:hover {
    color: #e5e7eb;
    background: #222224;
}

.dark .pronunciation-mute-btn:hover {
    color: #e5e7eb;
    background: #222224;
}

.pronunciation-mute-btn.is-muted {
    color: #f9671e;
}

.dark .pronunciation-mute-btn.is-muted {
    color: #fb923c;
}

.pronunciation-play-btn:focus-visible,
.pronunciation-mute-btn:focus-visible {
    outline: 2px solid #f9671e;
    outline-offset: 1px;
}

.vk-audio-icon {
    display: inline-block;
    width: 1em;
    height: 1em;
    vertical-align: -0.125em;
    flex-shrink: 0;
    fill: currentColor;
    line-height: 1;
}

@media (max-width: 640px) {

    body {
        -webkit-text-size-adjust: 100%;
        -webkit-tap-highlight-color: transparent;
    }

    .flex-1.flex.items-center.justify-center {
        -webkit-box-align: center;
        -webkit-box-pack: center;
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
    }

    .text-center {
        text-align: center !important;
    }

    .mx-auto {
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .top-nav button {
        min-width: 36px;
        min-height: 36px;
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }

    .logo-btn {
        width: 2.5rem !important;
        height: 2.5rem !important;
    }

    .logo-btn img {
        width: 2rem !important;
        height: 2rem !important;
    }

    .pronunciation-play-btn,
    .pronunciation-mute-btn {
        width: 2rem;
        height: 2rem;
    }

}

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.animate-shake {
    animation: shake 0.5s ease-in-out;
}

.word-highlight,
.vk-word-highlight {
    font-weight: 600;
    font-style: normal;
}

#wordCard {
    position: relative;
    z-index: 3;
}

#context-example-area .flex-1.text-base,
#context-example-area p.text-base,
#wordCard .text-base.leading-relaxed {
    font-size: clamp(1.0625rem, 2.2vw, 1.1875rem);
    line-height: 1.5;
}

#wordCard .trans-text {
    font-size: clamp(1.0625rem, 2.4vw, 1.25rem);
    line-height: 1.55;
    color: #4b5563;
}

.dark #wordCard .trans-text {
    color: #9ca3af;
}

.quiz-sentence-block .quiz-sentence {
    font-size: clamp(1.2rem, 2.6vw, 1.4375rem);
    line-height: 1.5;
    color: #1f2937;
}

.quiz-sentence-block .quiz-translation {
    font-size: clamp(1.0625rem, 2.4vw, 1.25rem);
    line-height: 1.55;
    color: #6b7280;
    max-height: 0;
    margin: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: max-height 0.42s ease, opacity 0.32s ease, margin-top 0.32s ease;
}

.quiz-sentence-block .quiz-translation.is-revealed {
    max-height: 32rem;
    margin-top: 0.5rem;
    opacity: 1;
    pointer-events: auto;
}

.dark .quiz-sentence-block .quiz-translation {
    color: #9ca3af;
}

[data-word-title] {
    position: relative;
    z-index: 2;
}

[data-word-title] h1,
[data-word-title] .quiz-word-title,
[data-word-title] .learning-word-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    line-height: 1.2;
}

[data-word-title] h1.ld-word-title-toggle {
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

[data-word-title] h1.ld-word-title-toggle:hover {
    opacity: 0.88;
}

[data-word-title] h1.ld-word-title-toggle:active {
    opacity: 0.75;
}

.quiz-word-row,
.learning-word-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    flex-wrap: nowrap;
    max-width: 100%;
    min-width: 0;
}

.quiz-container .quiz-word-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    flex-wrap: nowrap;
}

.quiz-container .quiz-word-title,
.learning-word-row .learning-word-title,
.learning-word-row .quiz-word-title {
    margin: 0;
    flex: 0 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.quiz-container .quiz-word-title {
    font-size: clamp(3rem, 9vw, 4.25rem);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: rgb(17 24 39);
}

.dark .quiz-container .quiz-word-title {
    color: rgb(255 255 255);
}

.learning-word-actions {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-shrink: 0;
    height: 2rem;
}

.quiz-container .quiz-word-actions {
    align-self: center;
}

.learning-word-actions #favoriteButtonContainer {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
}

.learning-word-actions #favoriteBtn,
.learning-word-actions .learning-word-action-btn,
.learning-word-actions .word-note-pen-btn {
    width: 2rem;
    height: 2rem;
    min-width: 2rem;
    max-width: 2rem;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    line-height: 1;
}

.learning-word-actions #favoriteIcon {
    display: block;
    font-size: 1.0625rem;
    line-height: 1;
    width: 1em;
    height: 1em;
}

.learning-word-actions #favoriteIcon::before {
    display: block;
    line-height: 1;
}

.learning-word-actions .word-note-pen-btn {
    font-size: 0.8125rem;
    font-weight: 600;
}

.quiz-container [data-word-title] {
    text-align: center;
}

.quiz-container .quiz-word-header {
    margin-bottom: 0.5rem;
}

.quiz-container .quiz-source {
    margin-bottom: 0.375rem;
}

.quiz-container .phonetic-row {
    display: inline-flex;
    margin-left: auto;
    margin-right: auto;
}

.quiz-container [data-word-title] [data-phonetic],
.quiz-container [data-word-title] .flex.justify-center {
    margin-top: 0.25rem;
}

.quiz-container .quiz-options {
    margin-bottom: 0.5rem;
}

.quiz-container .quiz-bottom {
    min-height: 2.5rem;
    margin-top: 1.5rem;
}

#favoriteButtonContainer {
    position: relative;
    z-index: 4;
}

#favoriteDropdown {
    z-index: 5;
    overflow-y: auto;
}

#favoriteDropdown .favorite-lib-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    min-width: 0;
}

#favoriteDropdown .favorite-lib-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    text-align: left;
}

#favoriteDropdown .favorite-lib-item--grow {
    flex: 1 1 auto;
}

#favoriteDropdown .favorite-lib-item .vk-icon {
    display: inline-block;
    flex-shrink: 0;
    width: 1em;
    height: 1em;
}

#favoriteDropdown .favorite-lib-item__name {
    display: inline-block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.875rem;
    line-height: 1.25rem;
    color: inherit;
}

#favoriteDropdown .favorite-lib-remove {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
    white-space: nowrap;
}

#favoriteDropdown .favorite-lib-remove .vk-icon {
    display: inline-block;
    flex-shrink: 0;
    width: 1em;
    height: 1em;
}

#favoriteIcon.is-favorited {
    color: var(--site-theme-color, #0071e3);
}

.dark #favoriteIcon.is-favorited {
    color: var(--site-theme-color, #0071e3);
}

#context-example-area,
[data-examples],
[data-quiz-sentence],
.quiz-sentence-block {
    position: relative;
    z-index: 1;
}

.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.setting-item-left {
    display: flex;
    align-items: center;
    flex: 1;
}

.setting-item-right {
    display: flex;
    align-items: center;
}

.sidebar-setting-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}

.sidebar-setting-row .sidebar-setting-left {
    display: flex;
    align-items: center;
    min-width: 0;
    flex: 1;
    gap: 6px;
}

.sidebar-setting-row .sidebar-setting-label-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-width: 0;
}

.sidebar-setting-row .sidebar-setting-right {
    flex-shrink: 0;
}

body.is-learning-page {
    overflow-x: hidden;
    overflow-y: hidden;
}

body:not(.is-learning-page) {
    overflow-x: hidden;
    overflow-y: auto;
}

.top-nav {
    flex-shrink: 0;
}

@media (max-width: 768px) {
    header>div {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
        gap: 0.25rem;
        min-height: 2.75rem;
        flex-wrap: nowrap;
    }

    #list-progress-container {
        min-width: 0;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        justify-content: flex-start;
    }

    #list-progress-container::-webkit-scrollbar {
        display: none;
    }

    #list-progress-container>div {
        flex-shrink: 0;
        padding-left: 0.25rem;
        padding-right: 0.25rem;
        padding-top: 0.375rem;
        padding-bottom: 0.375rem;
        gap: 0.125rem;
    }

    #list-display-name-wrapper {
        max-width: 5.5rem;
        font-size: 0.6rem;
    }

    #list-select-button-text {
        display: none;
    }

    #list-select-button,
    #librarySettingsBtn,
    #list-progress-container button {
        padding-left: 0.25rem;
        padding-right: 0.25rem;
        min-height: 1.75rem;
        font-size: 0.65rem;
    }

    header [class*="border-l"] {
        padding-left: 0.25rem;
        gap: 0;
    }

    header [class*="border-l"] a,
    header [class*="border-l"] #settings-button {
        min-width: 2rem;
        min-height: 2rem;
        padding: 0.25rem;
    }

    header #settings-button {
        width: 2rem;
        height: 2rem;
    }

    #list-dropdown-menu .list-dropdown-item,
    #list-dropdown-menu .list-dropdown-item span {
        color: inherit;
        font-size: 0.875rem;
    }

    .dark #list-dropdown-menu .list-dropdown-item,
    .dark #list-dropdown-menu .list-dropdown-item span {
        color: #f3f4f6;
    }
}

.fsrs-rating-buttons {
    display: flex;
    gap: 0.25rem;
    align-items: center;
    flex-shrink: 0;
}

.fsrs-btn[data-rating="1"] {
    background: #fee2e2;
    color: #dc2626;
    border-color: #fca5a5;
}

.fsrs-btn[data-rating="1"]:hover {
    background: #fca5a5;
}

.fsrs-btn[data-rating="2"] {
    background: #fef3c7;
    color: #d97706;
    border-color: #fcd34d;
}

.fsrs-btn[data-rating="2"]:hover {
    background: #fcd34d;
}

.fsrs-btn[data-rating="3"] {
    background: #d1fae5;
    color: #059669;
    border-color: #6ee7b7;
}

.fsrs-btn[data-rating="3"]:hover {
    background: #6ee7b7;
}

.fsrs-btn[data-rating="4"] {
    background: #dbeafe;
    color: #2563eb;
    border-color: #93c5fd;
}

.fsrs-btn[data-rating="4"]:hover {
    background: #93c5fd;
}

.fsrs-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.fsrs-state-badge {
    font-size: 0.6rem;
    padding: 0.1rem 0.35rem;
    border-radius: 9999px;
    font-weight: 600;
    flex-shrink: 0;
}

.fsrs-state-badge.new {
    background: #ede9fe;
    color: #7c3aed;
}

.fsrs-state-badge.review {
    background: #e0f2fe;
    color: #0369a1;
}

.fsrs-word-done {
    opacity: 0.45;
}

.vk-fsrs-meta {
    line-height: 1.2;
}

.vk-wrong-review-banner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    margin: 0 auto 1rem;
    max-width: 42rem;
    padding: 0.625rem 0.875rem;
    border-radius: 0.75rem;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.18);
    font-size: 0.8125rem;
    color: #b91c1c;
}

.dark .vk-wrong-review-banner {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(248, 113, 113, 0.25);
    color: #fca5a5;
}

.vk-wrong-review-banner__sub {
    color: #6b7280;
    font-weight: 400;
}

.dark .vk-wrong-review-banner__sub {
    color: #9ca3af;
}

.vk-wrong-review-banner__exit {
    margin-left: auto;
    padding: 0.25rem 0.625rem;
    border: 0;
    border-radius: 9999px;
    background: rgba(0, 0, 0, 0.06);
    color: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
}

.dark .vk-wrong-review-banner__exit {
    background: rgba(255, 255, 255, 0.08);
}

.quiz-wrong-confirm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    margin: 0;
    padding: 0.625rem 1.125rem;
    border: 0;
    border-radius: 9999px;
    background: rgba(239, 68, 68, 0.1);
    color: #b91c1c;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.15s ease;
}

.quiz-wrong-confirm-btn:hover {
    background: rgba(239, 68, 68, 0.16);
}

.quiz-wrong-confirm-btn:active {
    transform: scale(0.97);
}

.quiz-wrong-confirm-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.dark .quiz-wrong-confirm-btn {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
}

.dark .quiz-wrong-confirm-btn:hover {
    background: rgba(239, 68, 68, 0.22);
}

.quiz-wrong-confirm-btn i {
    font-size: 1rem;
    line-height: 1;
}

.vk-fsrs-chip {
    display: inline-flex;
    align-items: center;
    font-size: 0.65rem;
    padding: 0.15rem 0.45rem;
    border-radius: 9999px;
    font-weight: 500;
    background: #f3f4f6;
    color: #4b5563;
    border: 1px solid #e5e7eb;
}

.dark .vk-fsrs-chip {
    background: #222224;
    color: #9ca3af;
    border-color: #374151;
}

.vk-fsrs-chip-overdue {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #fca5a5;
    font-weight: 600;
}

.dark .vk-fsrs-chip-overdue {
    background: #450a0a;
    color: #fca5a5;
    border-color: #7f1d1d;
}

.vk-fsrs-chip-new {
    background: #ede9fe;
    color: #6d28d9;
    border-color: #c4b5fd;
    font-weight: 600;
}

.dark .vk-fsrs-chip-new {
    background: #2e1065;
    color: #c4b5fd;
    border-color: #5b21b6;
}

.quiz-sentence-block {
    padding: 0;
    margin-bottom: 0.375rem;
}

.dark .quiz-sentence-block .quiz-sentence {
    color: #f3f4f6;
}

.quiz-blank {
    display: inline-block;
    min-width: 4.5em;
    padding: 0 0.15em;
    border-bottom: 2px solid currentColor;
    color: #9ca3af;
    font-weight: 600;
    letter-spacing: 0.08em;
    line-height: 1.2;
    vertical-align: baseline;
}

.dark .quiz-blank {
    color: #6b7280;
}

.quiz-options-label-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-top: 0.75rem;
    margin-bottom: 0.625rem;
}

.quiz-options-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #6b7280;
    letter-spacing: 0.02em;
}

.dark .quiz-options-label {
    color: #9ca3af;
}

.quiz-options-label::before {
    content: '';
    width: 0.375rem;
    height: 0.375rem;
    border-radius: 9999px;
    background: #f9671e;
    flex-shrink: 0;
}

.quiz-spell-fallback {
    display: flex;
    justify-content: center;
    padding: 1.25rem 0 0.5rem;
}

.quiz-spell-fallback-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 7.5rem;
    padding: 0.7rem 1.5rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #fff;
    background: var(--site-theme-color, #0071e3);
    transition: background 0.15s ease, transform 0.15s ease;
}

.quiz-spell-fallback-btn:hover {
    background: var(--site-theme-color-hover, #0b52c8);
}

.quiz-spell-fallback-btn:active {
    transform: scale(0.97);
}

.quiz-hint-btn {
    flex-shrink: 0;
    margin: 0;
    padding: 0.125rem 0.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 9999px;
    background: transparent;
    color: #6b7280;
    font-size: 0.6875rem;
    font-weight: 500;
    line-height: 1.25;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.quiz-hint-btn:hover {
    color: #374151;
    border-color: #d1d5db;
    background: #f9fafb;
}

.quiz-hint-btn:active {
    transform: scale(0.97);
}

.dark .quiz-hint-btn {
    border-color: #333;
    color: #9ca3af;
}

.dark .quiz-hint-btn:hover {
    color: #e5e7eb;
    border-color: #444;
    background: #1a1a1a;
}

.quiz-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.625rem;
}

@media (max-width: 640px) {
    .quiz-container .quiz-word-title {
        font-size: clamp(2.25rem, 8vw, 3.25rem);
    }

    .spell-blank {
        font-size: clamp(2rem, 7.5vw, 3rem);
    }

    .quiz-container .quiz-word-header {
        margin-bottom: 0.25rem;
    }

    .quiz-container .quiz-source {
        margin-bottom: 0.25rem;
    }

    .quiz-sentence-block {
        margin-bottom: 0;
    }

    .quiz-sentence-block .quiz-sentence {
        font-size: 18px;
        line-height: 1.45;
    }

    .quiz-sentence-block .quiz-translation.is-revealed {
        font-size: 15px;
        line-height: 1.45;
        margin-top: 0.375rem;
    }

    .quiz-options-label-row {
        margin-top: 1rem;
        margin-bottom: 0.5rem;
    }

    .quiz-options {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }

    .quiz-option {
        gap: 0.5rem;
        padding: 0.625rem 0.75rem;
    }

    .quiz-option-letter {
        width: auto;
        height: auto;
        font-size: 12px;
    }

    .quiz-option-text {
        font-size: 12px;
        line-height: 1.45;
    }

    .quiz-option-word {
        font-size: 0.9375rem;
    }

    .quiz-option-meaning {
        font-size: 14px;
        line-height: 1.45;
    }

    .quiz-option-audio {
        width: 1.75rem;
        height: 1.75rem;
    }

    .quiz-sentence .vk-exam-count-btn {
        font-size: 12px;
        line-height: 1;
    }

    .quiz-container .quiz-bottom {
        min-height: 2rem;
        margin-top: 1.25rem;
    }
}

.quiz-option {
    width: 100%;
    text-align: left;
    padding: 0.75rem 0.875rem;
    border: none;
    border-radius: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.875rem;
    cursor: pointer;
    background: rgba(17, 24, 39, 0.06);
    box-shadow: none;
    transition: background-color 0.16s ease, color 0.16s ease;
}

.dark .quiz-option {
    background: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

.quiz-option:hover:not(:disabled):not(.is-locked) {
    transform: translateY(-1px);
    background: rgba(249, 103, 30, 0.12);
}

.dark .quiz-option:hover:not(:disabled):not(.is-locked) {
    background: rgba(249, 103, 30, 0.18);
}

.quiz-option--loading {
    cursor: default;
    pointer-events: none;
}

.quiz-option-skeleton-bar {
    display: block;
    width: 72%;
    max-width: 12rem;
    height: 0.875rem;
    border-radius: 0.375rem;
    background: linear-gradient(90deg, #e5e7eb 25%, #f3f4f6 50%, #e5e7eb 75%);
    background-size: 200% 100%;
    animation: quiz-option-skeleton 1.1s ease-in-out infinite;
}

.dark .quiz-option-skeleton-bar {
    background: linear-gradient(90deg, #2a2a2c 25%, #3a3a3c 50%, #2a2a2c 75%);
    background-size: 200% 100%;
}

@keyframes quiz-option-skeleton {
    0% {
        background-position: 100% 0;
    }

    100% {
        background-position: -100% 0;
    }
}

.quiz-option-letter {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.375rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.0625rem;
    font-weight: 400;
    line-height: 1;
    flex-shrink: 0;
    background: transparent;
    color: #111;
    box-shadow: none;
    transition: color 0.16s ease;
}

.dark .quiz-option-letter {
    background: transparent;
    color: #f5f5f5;
    box-shadow: none;
}

.quiz-option-text {
    flex: 1;
    min-width: 0;
    color: #1f2937;
}

.dark .quiz-option-text {
    color: #e5e7eb;
}

.quiz-option-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
}

.quiz-option-word-row {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    max-width: 100%;
    min-width: 0;
}

.quiz-option-word {
    font-size: clamp(1rem, 2.4vw, 1.125rem);
    font-weight: 400;
    line-height: 1.3;
    color: #111827;
}

.quiz-option-word.is-hidden {
    display: none;
}

.dark .quiz-option-word {
    color: #f3f4f6;
}

.quiz-option-meaning {
    font-size: clamp(0.9375rem, 2.1vw, 1.125rem);
    line-height: 1.45;
    color: #6b7280;
    font-weight: 400;
}

.dark .quiz-option-meaning {
    color: #9ca3af;
}

.quiz-option-audio {
    flex-shrink: 0;
    display: none;
    align-items: center;
    justify-content: center;
    width: 1.15rem;
    height: 1.15rem;
    margin: 0;
    padding: 0;
    border-radius: 0;
    color: inherit;
    pointer-events: none;
}

.quiz-option-audio.is-speaking {
    display: inline-flex;
}

.quiz-audio-icon {
    width: 1em;
    height: 1em;
}

.quiz-audio-wave {
    transform-origin: 12px 12px;
    opacity: 0.35;
}

.quiz-option-audio.is-speaking .quiz-audio-wave--1 {
    animation: quiz-audio-wave-pulse 0.7s ease-in-out infinite;
}

.quiz-option-audio.is-speaking .quiz-audio-wave--2 {
    animation: quiz-audio-wave-pulse 0.7s ease-in-out 0.18s infinite;
}

@keyframes quiz-audio-wave-pulse {
    0%, 100% {
        opacity: 0.25;
        transform: scale(0.92);
    }
    50% {
        opacity: 1;
        transform: scale(1.06);
    }
}

.quiz-option-skeleton-bar--sm {
    width: 48%;
    max-width: 8rem;
    height: 0.625rem;
    margin-top: 0.35rem;
}

@media (min-width: 641px) {
    .quiz-option-text {
        font-size: clamp(1.0625rem, 2.6vw, 1.1875rem);
        line-height: 1.5;
    }
}

.quiz-option-feedback {
    margin-left: auto;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
}

.quiz-options.is-answered .quiz-option:not(.is-correct):not(.is-wrong) {
    opacity: 0.42;
}

.quiz-option.is-correct {
    background: #22c55e;
}

.quiz-option.is-wrong {
    background: #ef4444;
}

.quiz-option.is-correct .quiz-option-letter,
.quiz-option.is-wrong .quiz-option-letter,
.quiz-option.is-correct .quiz-option-text,
.quiz-option.is-wrong .quiz-option-text,
.quiz-option.is-correct .quiz-option-word,
.quiz-option.is-wrong .quiz-option-word,
.quiz-option.is-correct .quiz-option-meaning,
.quiz-option.is-wrong .quiz-option-meaning,
.quiz-option.is-correct .quiz-option-audio,
.quiz-option.is-wrong .quiz-option-audio {
    color: #fff;
}

.quiz-option.is-correct .quiz-option-letter,
.quiz-option.is-wrong .quiz-option-letter {
    background: transparent;
    box-shadow: none;
    border-radius: 0;
}

.quiz-option.is-correct .quiz-option-audio:hover,
.quiz-option.is-wrong .quiz-option-audio:hover {
    background: transparent;
    color: #fff;
}

.quiz-option.is-locked {
    cursor: pointer;
}

.quiz-go-spell-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    margin: 0;
    min-width: 0;
    padding: 0.625rem 1.125rem;
    border: none;
    border-radius: 9999px !important;
    background: #0071e3;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
}

.quiz-go-spell-btn:hover {
    background: #0077ed;
}

.quiz-go-spell-btn:active {
    transform: scale(0.97);
}

.dark .quiz-go-spell-btn {
    background: #0a84ff;
}

.dark .quiz-go-spell-btn:hover {
    background: #409cff;
}

/* 学 / 拼 步骤切换（更扁的分段控件） */
.study-step-nav-wrap {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 0 0 0.75rem;
}

.study-step-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.1rem;
    margin: 0;
    padding: 0.1rem;
    width: fit-content;
    max-width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 9999px;
    background: #f3f4f6;
    box-shadow: none;
}

.dark .study-step-nav {
    background: #1a1a1c;
    border-color: #333;
    box-shadow: none;
}

.study-step-pill {
    position: relative;
    width: auto;
    min-width: 1.55rem;
    height: 1.2rem;
    padding: 0 0.5rem;
    border: none;
    border-radius: 9999px;
    background: transparent;
    color: #6b7280;
    font-size: 0.625rem;
    font-weight: 650;
    letter-spacing: 0.02em;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.15s ease, background-color 0.15s ease, transform 0.12s ease;
}

.study-step-pill:hover:not(.is-active):not(.is-locked) {
    color: #374151;
    background: rgba(255, 255, 255, 0.72);
}

.study-step-pill.is-active {
    background: #0071e3;
    color: #fff;
    box-shadow: none;
}

.dark .study-step-pill {
    color: #9ca3af;
}

.dark .study-step-pill:hover:not(.is-active):not(.is-locked) {
    color: #e5e7eb;
    background: rgba(255, 255, 255, 0.06);
}

.dark .study-step-pill.is-active {
    background: #0071e3;
    color: #fff;
}

.study-step-pill.is-locked {
    opacity: 0.42;
    cursor: not-allowed;
}

.study-step-pill:active:not(.is-locked) {
    transform: scale(0.96);
}

.study-step-pill:focus-visible {
    outline: 2px solid #0071e3;
    outline-offset: 2px;
}

.study-fsrs-bar {
    margin-top: 1rem;
    min-height: 2.75rem;
}

.spell-fsrs-wrap {
    width: 100%;
}

.spell-actions {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
    min-height: 2.75rem;
}

.study-step-sep {
    display: none;
}

.dark .study-step-sep {
    display: none;
}

/* 拼写步骤 */
.spell-container {
    width: 100%;
    max-width: 36rem;
    margin: 0 auto;
    padding: 0.5rem 0 1.5rem;
}

.spell-header {
    text-align: center;
    margin-bottom: 1rem;
}

.spell-meaning {
    margin: 0;
    font-size: clamp(1.0625rem, 2.4vw, 1.25rem);
    font-weight: 400;
    letter-spacing: -0.01em;
    color: #6b7280;
    line-height: 1.45;
}

.dark .spell-meaning {
    color: #9ca3af;
}

.spell-board {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-bottom: 0.5rem;
}

.spell-blank {
    position: relative;
    box-sizing: border-box;
    display: inline-grid;
    grid-template: "stack" auto / auto;
    justify-items: center;
    align-items: end;
    max-width: 100%;
    margin: 0 auto 1.25rem;
    /* 底边给下行部（g/y/p/q/j）留空，避免贴着下划线被裁 */
    padding: 0.08em 0 0.32em;
    border: none;
    border-bottom: 2px solid #d1d5db;
    border-radius: 0;
    background: transparent;
    color: rgb(17 24 39);
    /* 与学习页单词标题同阶，长词由 JS 自适应缩小 */
    font-size: clamp(2.5rem, 7.5vw, 3.75rem);
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 1.25;
    text-align: center;
    white-space: nowrap;
    overflow: visible;
    cursor: text;
    user-select: none;
    transition: border-color 0.12s ease, color 0.12s ease;
}

/* 用完整单词撑开空格宽度，保证长度与目标词一致 */
.spell-blank__sizer {
    grid-area: stack;
    visibility: hidden;
    display: inline-block;
    white-space: nowrap;
    line-height: 1.25;
    pointer-events: none;
}

.spell-blank__content {
    grid-area: stack;
    position: relative;
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    max-width: 100%;
    height: auto;
    min-height: 1.15em;
    line-height: 1.25;
    white-space: nowrap;
    overflow: visible;
    padding: 0;
    margin: 0;
}

.spell-blank__text {
    display: inline-block;
    white-space: pre;
    line-height: 1.25;
    overflow: visible;
}

.spell-blank__caret {
    display: inline-block;
    width: 1px;
    height: 0.78em;
    margin-left: 0.03em;
    flex-shrink: 0;
    align-self: center;
    background: currentColor;
    opacity: 0.4;
    animation: spell-caret-blink 1s steps(1) infinite;
}

.spell-blank.is-filled .spell-blank__caret {
    opacity: 0.5;
}

@keyframes spell-caret-blink {
    0%, 50% { opacity: 0.4; }
    50.01%, 100% { opacity: 0; }
}

.spell-feedback {
    margin: 0 0 0.75rem;
    min-height: 1.35rem;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-align: center;
    line-height: 1.3;
}

.spell-feedback.is-hidden {
    display: none;
}

.spell-feedback.is-correct {
    color: #16a34a;
}

.spell-feedback.is-wrong {
    color: #dc2626;
}

.spell-word-reveal {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 3rem;
    margin: 0.25rem 0 1rem;
    text-align: center;
}

.spell-word-title {
    margin: 0;
    max-width: 100%;
    font-size: clamp(3rem, 9vw, 4.25rem);
    font-weight: 400;
    letter-spacing: -0.02em;
    color: rgb(17 24 39);
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
}

.dark .spell-word-title {
    color: rgb(255 255 255);
}

.spell-pool.is-hidden {
    display: none;
}

.spell-blank.is-correct {
    border-bottom-color: #22c55e;
    color: #15803d;
}

.spell-blank.is-wrong {
    border-bottom-color: #ef4444;
    color: #b91c1c;
    animation: spell-slots-shake 0.42s ease;
}

.spell-blank.is-shaking {
    animation: spell-slots-shake 0.42s ease;
}

@keyframes spell-slots-shake {
    0%, 100% { transform: translateX(0); }
    15% { transform: translateX(-6px); }
    30% { transform: translateX(6px); }
    45% { transform: translateX(-4px); }
    60% { transform: translateX(4px); }
    75% { transform: translateX(-2px); }
    90% { transform: translateX(2px); }
}

.spell-blank.is-reveal {
    color: rgb(17 24 39);
    border-bottom-color: #d1d5db;
}

.spell-blank.is-reveal.is-correct {
    color: rgb(17 24 39);
    border-bottom-color: #111827;
}

.spell-blank.is-toggleable {
    cursor: pointer;
}

.spell-blank.is-toggleable:hover {
    opacity: 0.88;
}

.dark .spell-blank {
    border-bottom-color: #4b5563;
    color: rgb(255 255 255);
}

.dark .spell-blank.is-correct {
    border-bottom-color: #22c55e;
    color: #86efac;
}

.dark .spell-blank.is-wrong {
    border-bottom-color: #ef4444;
    color: #fca5a5;
}

.dark .spell-blank.is-reveal,
.dark .spell-blank.is-reveal.is-correct {
    color: rgb(255 255 255);
    border-bottom-color: #e5e7eb;
}

.dark .spell-feedback.is-correct {
    color: #4ade80;
}

.dark .spell-feedback.is-wrong {
    color: #f87171;
}

/* 拼写虚拟键盘：仅手机端；桌面用物理键盘 */
@media (min-width: 769px) {
    .spell-vkb-sheet,
    .spell-vkb-preview {
        display: none !important;
    }
    html.spell-vkb-open .spell-container {
        padding-bottom: 0;
    }
}

/* 拼写虚拟键盘：底部浮层 + iOS 英文键盘布局/样式 */
.spell-vkb-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9;
    pointer-events: none;
}

.spell-vkb-sheet[hidden] {
    display: none !important;
}

.spell-vkb-sheet.is-open {
    pointer-events: auto;
}

.spell-vkb-sheet__panel {
    width: 100%;
    margin: 0 auto;
    padding: 16px 8px calc(16px + env(safe-area-inset-bottom, 0px));
    background: #e0e1e6;
    border-radius: 28px 28px 0 0;
    box-shadow: none;
    overflow: visible;
    transform: translate3d(0, 100%, 0);
    transition: transform 0.28s cubic-bezier(0.2, 0.85, 0.25, 1);
    will-change: transform;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}

.spell-vkb-sheet.is-open .spell-vkb-sheet__panel {
    transform: translate3d(0, 0, 0);
}

.dark .spell-vkb-sheet__panel {
    background: #2c2c2e;
    box-shadow: none;
}

html.spell-vkb-open .spell-container {
    padding-bottom: calc(var(--spell-vkb-inset, 16rem) + 1.25rem);
}

.spell-vkb-sheet .spell-ios-keyboard.hg-theme-default {
    background: transparent;
    border-radius: 0;
    padding: 0 4px;
    width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.spell-vkb-sheet .spell-ios-keyboard .hg-row {
    display: flex;
    justify-content: center;
}

.spell-vkb-sheet .spell-ios-keyboard.hg-theme-default .hg-row:not(:last-child) {
    margin-bottom: 14px;
}

.spell-vkb-sheet .spell-ios-keyboard.hg-theme-default .hg-row .hg-button-container,
.spell-vkb-sheet .spell-ios-keyboard.hg-theme-default .hg-row .hg-button:not(:last-child) {
    margin-right: 6px;
}

/* 第二排居中（iOS：比第一排少一键，两侧留白） */
.spell-vkb-sheet .spell-ios-keyboard .hg-row:nth-child(2) {
    padding: 0 4.8%;
}

.spell-vkb-sheet .spell-ios-keyboard .hg-button {
    height: 42px;
    min-width: 0;
    max-width: none;
    flex: 1 1 0;
    border: 0;
    border-bottom: none;
    border-radius: 8.5px;
    background: #ffffff;
    color: #000000;
    box-shadow: none;
    font-size: 22px;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1;
    text-transform: lowercase;
    -webkit-tap-highlight-color: transparent;
}

.spell-vkb-sheet .spell-ios-keyboard .hg-button span {
    pointer-events: none;
}

.spell-vkb-sheet .spell-ios-keyboard .hg-button:active,
.spell-vkb-sheet .spell-ios-keyboard .hg-button.hg-activeButton {
    background: #e5e5ea;
    box-shadow: none;
}

.spell-vkb-sheet .spell-ios-keyboard .hg-button.is-previewing {
    background: #ffffff;
    color: transparent;
    z-index: 2;
}

.spell-vkb-sheet .spell-ios-keyboard .hg-button.hg-ios-mod,
.spell-vkb-sheet .spell-ios-keyboard .hg-button[data-skbtn="{bksp}"] {
    flex: 1.55 1 0;
    min-width: 42px;
    max-width: 72px;
    /* 与字母键同色 */
    background: #ffffff;
    color: #000000;
    text-transform: none;
}

.spell-vkb-sheet .spell-ios-keyboard .hg-button.hg-ios-mod:active,
.spell-vkb-sheet .spell-ios-keyboard .hg-button[data-skbtn="{bksp}"]:active,
.spell-vkb-sheet .spell-ios-keyboard .hg-button.hg-ios-mod.hg-activeButton {
    background: #e5e5ea;
}

.spell-vkb-sheet .spell-ios-keyboard .hg-button.hg-ios-spacer,
.spell-vkb-sheet .spell-ios-keyboard .hg-button[data-skbtn="{spacer}"] {
    flex: 1.55 1 0;
    min-width: 42px;
    max-width: 72px;
    background: transparent !important;
    box-shadow: none !important;
    border: 0 !important;
    pointer-events: none;
    opacity: 0;
}

.spell-vkb-sheet .spell-ios-keyboard .hg-button.hg-ios-enter,
.spell-vkb-sheet .spell-ios-keyboard .hg-button[data-skbtn="{enter}"] {
    flex: 1 1 auto;
    width: 100%;
    max-width: none;
    height: 44px;
    background: #d1d1d6;
    color: #8e8e93;
    text-transform: none;
    font-size: 17px;
    font-weight: 500;
    border-radius: 10px;
    letter-spacing: 0.02em;
    pointer-events: none;
    cursor: default;
}

.spell-vkb-sheet .spell-ios-keyboard .hg-button.hg-ios-enter.is-ready,
.spell-vkb-sheet .spell-ios-keyboard .hg-button[data-skbtn="{enter}"].is-ready {
    background: var(--site-theme-color, #0071e3);
    color: #ffffff;
    pointer-events: auto;
    cursor: pointer;
}

.spell-vkb-sheet .spell-ios-keyboard .hg-button.hg-ios-enter.is-ready:active,
.spell-vkb-sheet .spell-ios-keyboard .hg-button[data-skbtn="{enter}"].is-ready:active,
.spell-vkb-sheet .spell-ios-keyboard .hg-button.hg-ios-enter.is-ready.hg-activeButton {
    background: var(--site-theme-color-hover, #0b52c8);
}


.dark .spell-vkb-sheet .spell-ios-keyboard .hg-button {
    background: #636366;
    color: #ffffff;
    box-shadow: none;
}

.dark .spell-vkb-sheet .spell-ios-keyboard .hg-button:active,
.dark .spell-vkb-sheet .spell-ios-keyboard .hg-button.hg-activeButton {
    background: #8e8e93;
    box-shadow: none;
}

.dark .spell-vkb-sheet .spell-ios-keyboard .hg-button.hg-ios-mod,
.dark .spell-vkb-sheet .spell-ios-keyboard .hg-button[data-skbtn="{bksp}"] {
    background: #636366;
    color: #ffffff;
}

.dark .spell-vkb-sheet .spell-ios-keyboard .hg-button.hg-ios-mod:active,
.dark .spell-vkb-sheet .spell-ios-keyboard .hg-button[data-skbtn="{bksp}"]:active {
    background: #8e8e93;
}

.dark .spell-vkb-sheet .spell-ios-keyboard .hg-button.hg-ios-enter,
.dark .spell-vkb-sheet .spell-ios-keyboard .hg-button[data-skbtn="{enter}"] {
    background: #3a3a3c;
    color: #8e8e93;
}

.dark .spell-vkb-sheet .spell-ios-keyboard .hg-button.hg-ios-enter.is-ready,
.dark .spell-vkb-sheet .spell-ios-keyboard .hg-button[data-skbtn="{enter}"].is-ready {
    background: var(--site-theme-color, #0071e3);
    color: #ffffff;
}

.dark .spell-vkb-sheet .spell-ios-keyboard .hg-button.hg-ios-enter.is-ready:active,
.dark .spell-vkb-sheet .spell-ios-keyboard .hg-button[data-skbtn="{enter}"].is-ready:active {
    background: var(--site-theme-color-hover, #0b52c8);
}

/* 回退简易键盘：同样按 iOS 布局 */
.spell-vkb-lite {
    width: 100%;
    padding: 0 4px;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.spell-vkb-row {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 0 0 14px;
}

.spell-vkb-row:last-child {
    margin-bottom: 0;
}

.spell-vkb-row--mid {
    padding: 0 4.8%;
}

.spell-vkb-key {
    box-sizing: border-box;
    flex: 1 1 0;
    min-width: 0;
    height: 42px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 8.5px;
    background: #ffffff;
    color: #000000;
    box-shadow: none;
    font-size: 22px;
    font-weight: 400;
    line-height: 1;
    text-transform: lowercase;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}

.spell-vkb-key:active {
    background: #e5e5ea;
    box-shadow: none;
}

.spell-vkb-key--wide,
.spell-vkb-key--bksp {
    flex: 1.55 1 0;
    min-width: 42px;
    max-width: 72px;
    text-transform: none;
}

/* iOS 删除键：浅灰修饰键，按下变白 */
.spell-vkb-key--bksp {
    background: #aeb3be;
    color: #000000;
    touch-action: manipulation;
}

.spell-vkb-key--bksp:active,
.spell-vkb-key--bksp.is-active {
    background: #ffffff;
}

.spell-vkb-key--wide:active {
    background: #e5e5ea;
}

.spell-ios-bksp {
    display: block;
    width: 23px;
    height: 17px;
}

.spell-vkb-key--bksp .spell-ios-bksp__x {
    stroke: #aeb3be;
}

.spell-vkb-key--bksp:active .spell-ios-bksp__x,
.spell-vkb-key--bksp.is-active .spell-ios-bksp__x {
    stroke: #ffffff;
}

.spell-vkb-key.is-previewing {
    background: #ffffff;
    color: transparent;
    z-index: 2;
}

.spell-vkb-key--spacer {
    flex: 1.55 1 0;
    min-width: 42px;
    max-width: 72px;
    background: transparent;
    box-shadow: none;
    pointer-events: none;
}

.spell-vkb-key--enter {
    flex: 1 1 auto;
    width: 100%;
    max-width: none;
    height: 44px;
    background: #d1d1d6;
    color: #8e8e93;
    text-transform: none;
    font-size: 17px;
    font-weight: 500;
    border-radius: 10px;
    letter-spacing: 0.02em;
    pointer-events: none;
    cursor: default;
}

.spell-vkb-key--enter.is-ready {
    background: var(--site-theme-color, #0071e3);
    color: #ffffff;
    pointer-events: auto;
    cursor: pointer;
}

.spell-vkb-key--enter.is-ready:active {
    background: var(--site-theme-color-hover, #0b52c8);
}

.dark .spell-vkb-key {
    background: #636366;
    color: #ffffff;
    box-shadow: none;
}

.dark .spell-vkb-key:active {
    background: #8e8e93;
    box-shadow: none;
}

.dark .spell-vkb-key--wide {
    background: #636366;
}

.dark .spell-vkb-key--wide:active {
    background: #8e8e93;
}

.dark .spell-vkb-key--bksp {
    background: #4a4a4c;
    color: #ffffff;
}

.dark .spell-vkb-key--bksp:active,
.dark .spell-vkb-key--bksp.is-active {
    background: #8e8e93;
}

.dark .spell-vkb-key--bksp .spell-ios-bksp__x {
    stroke: #4a4a4c;
}

.dark .spell-vkb-key--bksp:active .spell-ios-bksp__x,
.dark .spell-vkb-key--bksp.is-active .spell-ios-bksp__x {
    stroke: #8e8e93;
}

.dark .spell-vkb-key--enter {
    background: #3a3a3c;
    color: #8e8e93;
}

.dark .spell-vkb-key--enter.is-ready {
    background: var(--site-theme-color, #0071e3);
    color: #ffffff;
}

.dark .spell-vkb-key--enter.is-ready:active {
    background: var(--site-theme-color-hover, #0b52c8);
}

@media (min-width: 480px) {
    .spell-vkb-sheet__panel {
        padding-left: 12px;
        padding-right: 12px;
        padding-top: 18px;
        border-radius: 32px 32px 0 0;
    }

    .spell-vkb-sheet .spell-ios-keyboard .hg-button,
    .spell-vkb-key {
        height: 46px;
        font-size: 24px;
        border-radius: 9px;
    }

    .spell-vkb-sheet .spell-ios-keyboard .hg-button.hg-ios-mod,
    .spell-vkb-sheet .spell-ios-keyboard .hg-button[data-skbtn="{bksp}"],
    .spell-vkb-sheet .spell-ios-keyboard .hg-button.hg-ios-spacer,
    .spell-vkb-key--wide,
    .spell-vkb-key--bksp,
    .spell-vkb-key--spacer {
        max-width: 84px;
    }

    .spell-vkb-sheet .spell-ios-keyboard .hg-button.hg-ios-enter,
    .spell-vkb-sheet .spell-ios-keyboard .hg-button[data-skbtn="{enter}"],
    .spell-vkb-key--enter {
        height: 48px;
        font-size: 18px;
    }
}


/* iOS 按键预览气泡 */
.spell-vkb-preview {
    position: fixed;
    z-index: 10;
    display: none;
    pointer-events: none;
    box-sizing: border-box;
    padding: 0 0 10px;
    background: #ffffff;
    color: #000000;
    border-radius: 10px 10px 12px 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.spell-vkb-preview.is-visible {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.spell-vkb-preview__letter {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 52px;
    font-size: 34px;
    font-weight: 400;
    line-height: 1;
    text-transform: lowercase;
}

.spell-vkb-preview[data-edge="left"] {
    border-radius: 10px 14px 14px 4px;
}

.spell-vkb-preview[data-edge="right"] {
    border-radius: 14px 10px 4px 14px;
}

.dark .spell-vkb-preview {
    background: #636366;
    color: #ffffff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

.dark .spell-vkb-sheet .spell-ios-keyboard .hg-button.is-previewing,
.dark .spell-vkb-key.is-previewing {
    background: #636366;
}

.spell-clear-wrap {
    display: flex;
    justify-content: center;
    min-height: 2.75rem;
    margin: 0.15rem 0 0.85rem;
}

.spell-clear-wrap:empty,
.spell-clear-wrap.is-hidden {
    display: none;
    min-height: 0;
    margin: 0;
}

.spell-clear-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin: 0;
    min-width: 5.25rem;
    height: 2.75rem;
    padding: 0 0.85rem;
    border: none;
    border-radius: 0.625rem;
    background: #f3f4f6;
    box-shadow: none;
    color: #9ca3af;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    line-height: 1;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.12s ease, color 0.12s ease, transform 0.08s ease;
}

.spell-clear-btn__glyph {
    font-size: 1.05rem;
    font-weight: 400;
    line-height: 1;
    transform: translateY(-0.5px);
}

.spell-clear-btn__label {
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    text-transform: lowercase;
}

.spell-clear-btn:hover {
    background: #e5e7eb;
    color: #6b7280;
}

.spell-clear-btn:active {
    transform: scale(0.98);
    background: #e5e7eb;
}

.dark .spell-clear-btn {
    background: #222224;
    box-shadow: none;
    color: #6b7280;
}

.dark .spell-clear-btn:hover {
    background: #2a2a2c;
    color: #9ca3af;
}

.dark .spell-clear-btn:active {
    background: #1a1a1c;
}

.spell-check-btn,
.spell-next-btn {
    min-width: 7.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 9999px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.12s ease, opacity 0.12s ease;
}

.spell-check-btn {
    background: #111827;
    color: #fff;
}

.dark .spell-check-btn {
    background: #f3f4f6;
    color: #111827;
}

.spell-next-btn {
    background: #f9671e;
    color: #fff;
}

.spell-check-btn:active,
.spell-next-btn:active {
    transform: scale(0.97);
}

.slider {
    -webkit-appearance: none;
    appearance: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #9ca3af;
    cursor: pointer;
    transition: all 0.2s;
}

.slider::-webkit-slider-thumb:hover {
    background: #6b7280;
    transform: scale(1.15);
}

.slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #9ca3af;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.slider::-moz-range-thumb:hover {
    background: #6b7280;
    transform: scale(1.15);
}

.dark .slider::-webkit-slider-thumb {
    background: #6b7280;
}

.dark .slider::-webkit-slider-thumb:hover {
    background: #9ca3af;
}

.dark .slider::-moz-range-thumb {
    background: #6b7280;
}

.dark .slider::-moz-range-thumb:hover {
    background: #9ca3af;
}

.dark .nav-btn:hover {
    background-color: #565656 !important;
}

/* 音节入场：纵向 mis / . / cel … → 收拢合并为整词 */
.ld-syl-title {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    white-space: nowrap;
    transform-origin: center center;
    will-change: transform;
}

.ld-syl-title.is-stacked {
    flex-direction: column;
    flex-wrap: nowrap;
    white-space: normal;
    line-height: 1.05;
    gap: 0;
}

.ld-syl {
    display: inline-block;
    padding: 0 0.04em;
}

.ld-syl-title.is-stacked .ld-syl {
    padding: 0.02em 0;
}

.ld-syl-dot {
    display: inline-block;
    opacity: 0.55;
    width: 0.35em;
    text-align: center;
    overflow: hidden;
    color: inherit;
}

.ld-syl-title.is-stacked .ld-syl-dot {
    width: auto;
    height: 0.55em;
    line-height: 0.55em;
    font-size: 0.62em;
    opacity: 0.45;
    margin: 0.02em 0;
}

/* —— 英文自动取词 —— */
.vk-wp-picked {
    color: var(--site-theme-color, #0071e3);
}

.vk-word-picker {
    position: fixed;
    z-index: 6;
    width: min(16.5rem, calc(100vw - 1rem));
    pointer-events: auto;
}

.vk-word-picker.hidden {
    display: none !important;
}

.vk-wp-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
    overflow: hidden;
}

.dark .vk-wp-card {
    background: #000;
    border-color: #333;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
}

.vk-wp-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.75rem 0.75rem 0.5rem;
}

.vk-wp-label {
    display: block;
    font-size: 0.65rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #9ca3af;
    margin-bottom: 0.15rem;
}

.vk-wp-word {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    word-break: break-word;
    line-height: 1.3;
}

.dark .vk-wp-word {
    color: #f9fafb;
}

.vk-wp-close {
    flex-shrink: 0;
    width: 1.75rem;
    height: 1.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    color: #9ca3af;
    background: transparent;
}

.vk-wp-close:hover {
    color: #111827;
    background: #f3f4f6;
}

.dark .vk-wp-close:hover {
    color: #fff;
    background: #222;
}

.vk-wp-dict {
    padding: 0 0.75rem 0.55rem;
    border-bottom: 1px solid #f3f4f6;
}

.dark .vk-wp-dict {
    border-bottom-color: #222;
}

.vk-wp-dict-loading,
.vk-wp-dict-empty {
    font-size: 0.75rem;
    color: #9ca3af;
    padding: 0.15rem 0 0.25rem;
}

.vk-wp-prons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.45rem;
}

.vk-wp-pron {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    max-width: 100%;
    padding: 0.2rem 0.45rem;
    border-radius: 9999px;
    font-size: 0.72rem;
    color: #374151;
    background: #f3f4f6;
    line-height: 1.2;
}

.vk-wp-pron:hover {
    background: #e5e7eb;
}

.dark .vk-wp-pron {
    color: #d1d5db;
    background: #181818;
}

.dark .vk-wp-pron:hover {
    background: #222;
}

.vk-wp-accent {
    flex-shrink: 0;
    font-weight: 700;
    color: #2563eb;
}

.dark .vk-wp-accent {
    color: #93c5fd;
}

.vk-wp-phon {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.vk-wp-speak {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--site-theme-color, #0071e3);
    opacity: 0.85;
    line-height: 0;
}

.vk-wp-speak .vk-wp-speak-icon,
.vk-wp-speak .vk-audio-icon {
    width: 0.95em;
    height: 0.95em;
    font-size: 0.95rem;
}

.vk-wp-senses {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.vk-wp-sense {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    font-size: 0.78rem;
    line-height: 1.4;
    color: #374151;
}

.dark .vk-wp-sense {
    color: #d1d5db;
}

.vk-wp-pos {
    flex-shrink: 0;
    font-weight: 700;
    color: #6b7280;
    font-style: italic;
}

.dark .vk-wp-pos {
    color: #9ca3af;
}

.vk-wp-meaning {
    min-width: 0;
    word-break: break-word;
}

.vk-wp-body {
    padding: 0.5rem 0.35rem 0.55rem;
}

.vk-wp-hint {
    padding: 0.15rem 0.55rem 0.4rem;
    font-size: 0.7rem;
    color: #6b7280;
}

.dark .vk-wp-hint {
    color: #9ca3af;
}

.vk-wp-libs {
    max-height: 12rem;
    overflow-y: auto;
}

.vk-wp-empty {
    padding: 0.75rem 0.7rem;
    font-size: 0.8rem;
    color: #6b7280;
    text-align: center;
}

.vk-wp-lib-btn,
.vk-wp-lib-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
    padding: 0.55rem 0.7rem;
    border-radius: 0;
    text-align: left;
    font-size: 0.8125rem;
    color: #374151;
    background: transparent;
}

.vk-wp-lib-btn + .vk-wp-lib-btn,
.vk-wp-lib-btn + .vk-wp-lib-row,
.vk-wp-lib-row + .vk-wp-lib-btn,
.vk-wp-lib-row + .vk-wp-lib-row {
    border-top: 1px solid #f3f4f6;
}

.dark .vk-wp-lib-btn,
.dark .vk-wp-lib-row {
    color: #d1d5db;
}

.dark .vk-wp-lib-btn + .vk-wp-lib-btn,
.dark .vk-wp-lib-btn + .vk-wp-lib-row,
.dark .vk-wp-lib-row + .vk-wp-lib-btn,
.dark .vk-wp-lib-row + .vk-wp-lib-row {
    border-top-color: #222;
}

.vk-wp-lib-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}

.vk-wp-lib-cta {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    color: #6b7280;
    background: #f3f4f6;
    line-height: 0;
}

.dark .vk-wp-lib-cta {
    color: #9ca3af;
    background: #222224;
}

.vk-wp-lib-action,
.vk-wp-lib-action.is-in:hover,
.dark .vk-wp-lib-action,
.dark .vk-wp-lib-action.is-in:hover {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    color: var(--site-theme-color, #0071e3);
    background: #f3f4f6;
    line-height: 0;
}

.dark .vk-wp-lib-action,
.dark .vk-wp-lib-action.is-in:hover {
    background: #222224;
    color: var(--site-theme-color, #0071e3);
}

.vk-wp-fav-icon {
    width: 1em;
    height: 1em;
    font-size: 1.0625rem;
    display: block;
}

/* ── 词根拆解 / 配对 / 鼓励 ── */
.root-analysis-card {
    margin: 0 auto 1rem;
    max-width: 36rem;
    padding: 0.85rem 1rem;
    border-radius: 0.85rem;
    background: rgba(37, 99, 235, 0.06);
    border: 1px solid rgba(37, 99, 235, 0.14);
    text-align: left;
}
.dark .root-analysis-card {
    background: rgba(147, 197, 253, 0.08);
    border-color: rgba(147, 197, 253, 0.18);
}
.root-analysis-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.75rem;
    margin-bottom: 0.5rem;
}
.root-analysis-key {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.root-analysis-gloss {
    font-size: 0.85rem;
    color: #64748b;
}
.dark .root-analysis-gloss { color: #94a3b8; }
.root-analysis-parts {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
}
.root-analysis-formula {
    margin: 0.35rem 0 0;
    font-size: 0.9rem;
    line-height: 1.55;
    word-break: break-word;
    color: #334155;
}
.dark .root-analysis-formula { color: #cbd5e1; }
.root-analysis-formula .root-form {
    font-weight: 700;
}
.root-part {
    display: inline-flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.35rem 0.55rem;
    border-radius: 0.5rem;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
}
.dark .root-part {
    background: #18181b;
    border-color: rgba(255, 255, 255, 0.08);
}
.root-part-form { font-weight: 700; font-size: 0.95rem; }
.root-part-gloss { font-size: 0.7rem; color: #64748b; }
.root-part--prefix .root-part-form { color: #d97706; }
.root-part--root .root-part-form { color: #2563eb; }
.root-part--suffix .root-part-form { color: #059669; }
.root-part-plus {
    align-self: center;
    color: #94a3b8;
    font-weight: 600;
}
.root-part-eq {
    align-self: center;
    color: #94a3b8;
    font-weight: 700;
    margin: 0 0.1rem;
}
.root-part-story {
    align-self: center;
    font-size: 0.85rem;
    line-height: 1.45;
    max-width: min(100%, 28rem);
}
.root-analysis-story {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.45;
    color: #334155;
}
.dark .root-analysis-story { color: #cbd5e1; }
.root-analysis-exception {
    margin: 0.35rem 0 0;
    font-size: 0.75rem;
    color: #b45309;
}

.root-match {
    position: relative;
    max-width: 42rem;
    margin: 0 auto;
    padding: 0.35rem 0 1.25rem;
    text-align: center;
}
.root-match-head {
    margin-bottom: 1.1rem;
}
.root-match-title {
    margin: 0 0 0.3rem;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #111827;
}
.dark .root-match-title {
    color: #f4f4f5;
}
.root-match-sub {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.45;
    color: #64748b;
}
.dark .root-match-sub {
    color: #94a3b8;
}
.root-match-board {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
    padding: 0.15rem 0.1rem;
}
.root-match-col {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    min-width: 0;
}
.root-match-col-label {
    margin: 0 0 0.15rem;
    padding: 0 0.15rem;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94a3b8;
    text-align: left;
}
.dark .root-match-col-label {
    color: #71717a;
}
.root-match-item {
    appearance: none;
    box-sizing: border-box;
    width: 100%;
    min-height: 3rem;
    margin: 0;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #f8fafc;
    border-radius: 0.85rem;
    padding: 0.75rem 0.9rem;
    font-size: 0.9375rem;
    line-height: 1.35;
    text-align: left;
    cursor: pointer;
    color: #0f172a;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease, opacity 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}
.root-match-item__text {
    display: block;
    overflow-wrap: anywhere;
}
.root-match-item--en {
    font-family: "SF Pro Text", "PingFang SC", "Helvetica Neue", system-ui, sans-serif;
    font-weight: 600;
    letter-spacing: -0.01em;
    background: #ffffff;
}
.root-match-item--zh {
    font-weight: 450;
    color: #334155;
    background: #f1f5f9;
}
.dark .root-match-item {
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: none;
    color: #f4f4f5;
}
.dark .root-match-item--en {
    background: #27272a;
}
.dark .root-match-item--zh {
    background: #1f1f22;
    color: #d4d4d8;
}
.root-match-item:hover:not(:disabled) {
    border-color: rgba(37, 99, 235, 0.35);
    transform: translateY(-1px);
}
.root-match-item.is-selected {
    border-color: var(--site-theme-color, #2563eb);
    background: #eff6ff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}
.dark .root-match-item.is-selected {
    background: #1e3a5f;
}
.root-match-item.is-matched {
    opacity: 1;
    cursor: default;
    border-color: rgba(34, 197, 94, 0.45);
    background: #ecfdf5;
    color: #166534;
    box-shadow: none;
}
.dark .root-match-item.is-matched {
    background: #14532d;
    color: #86efac;
    border-color: rgba(34, 197, 94, 0.35);
}
.root-match-item.is-wrong {
    border-color: #ef4444;
    background: #fef2f2;
    animation: root-match-shake 0.42s ease;
}
.dark .root-match-item.is-wrong {
    background: #450a0a;
}
.root-match-item.is-hint {
    animation: root-match-shake 0.35s ease;
    border-color: #f59e0b;
}
.root-match-item.is-answer {
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.22);
}
@keyframes root-match-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-5px); }
    40% { transform: translateX(5px); }
    60% { transform: translateX(-3px); }
    80% { transform: translateX(3px); }
}
.root-match-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: visible;
}
.root-match-line {
    fill: none;
    stroke: #22c55e;
    stroke-width: 2.25;
    stroke-linecap: round;
    opacity: 0.85;
}
.root-match-feedback {
    min-height: 1.35rem;
    margin: 0.85rem 0 0;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.35;
}
.root-match-feedback.is-hidden {
    visibility: hidden;
}
.root-match-feedback.is-ok {
    color: #16a34a;
}
.root-match-feedback.is-bad {
    color: #dc2626;
}
.dark .root-match-feedback.is-ok {
    color: #4ade80;
}
.dark .root-match-feedback.is-bad {
    color: #f87171;
}
.root-match-foot {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 0.65rem;
}
.root-match-progress {
    margin: 0;
    display: inline-flex;
    align-items: baseline;
    gap: 0.2rem;
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    background: #f1f5f9;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #475569;
    font-variant-numeric: tabular-nums;
}
.dark .root-match-progress {
    background: #27272a;
    color: #a1a1aa;
}
.root-match-progress__sep {
    opacity: 0.55;
    font-weight: 500;
}

.root-match-reveal[hidden] {
    display: none !important;
}
.root-match-reveal {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.55);
    border-radius: 0.85rem;
}
.root-match-reveal__card {
    position: relative;
    width: min(22rem, 100%);
    padding: 1.15rem 2.6rem 1rem 1.1rem;
    border-radius: 0.75rem;
    background: #fff;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.28);
    text-align: left;
}
.dark .root-match-reveal__card {
    background: #27272a;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}
.root-match-reveal__kicker {
    margin: 0 0 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #dc2626;
}
.dark .root-match-reveal__kicker {
    color: #f87171;
}
.root-match-reveal__word {
    margin: 0 0 0.75rem;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0f172a;
    text-align: left;
}
.dark .root-match-reveal__word {
    color: #f4f4f5;
}
.root-match-reveal__etym {
    margin: 0 0 1rem;
    padding: 0.7rem 0.8rem;
    border-radius: 0.55rem;
    background: #f1f5f9;
    text-align: left;
    font-size: 0.92rem;
    line-height: 1.65;
    color: #1e293b;
}
.dark .root-match-reveal__etym {
    background: #3f3f46;
    color: #e4e4e7;
}
.root-match-reveal__etym-label {
    display: block;
    margin-bottom: 0.28rem;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
}
.dark .root-match-reveal__etym-label {
    color: #a1a1aa;
}
.root-match-reveal__etym-text {
    display: block;
    word-break: break-word;
}
.root-match-reveal__close {
    appearance: none;
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.85rem;
    height: 1.85rem;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
    color: #475569;
    font-size: 1.15rem;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
}
.root-match-reveal__close:hover {
    background: rgba(15, 23, 42, 0.14);
    color: #0f172a;
    filter: none;
}
.dark .root-match-reveal__close {
    background: rgba(255, 255, 255, 0.12);
    color: #d4d4d8;
}
.dark .root-match-reveal__close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fafafa;
}

@media (max-width: 480px) {
    .root-match-board {
        gap: 0.85rem;
    }
    .root-match-item {
        min-height: 2.75rem;
        padding: 0.65rem 0.75rem;
        font-size: 0.875rem;
        border-radius: 0.75rem;
    }
}

/* 单选练习（看英文选中文） */
.root-match--quiz {
    max-width: 28rem;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-top: 0.5rem;
}
.root-match-prompt {
    margin: 0.35rem 0 1.15rem;
    padding: 1.1rem 1rem;
    border-radius: 1rem;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
}
.dark .root-match-prompt {
    background: #27272a;
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}
.root-match-prompt__word {
    margin: 0;
    font-size: clamp(1.55rem, 5vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
    color: var(--fg, #0f172a);
    word-break: break-word;
}
.root-match-prompt__sentence {
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.55;
    color: var(--fg, #0f172a);
}
.root-match-prompt__src {
    margin: 0.45rem 0 0;
    font-size: 0.75rem;
    color: var(--muted, #6e6e73);
}
.root-match-prompt__hl {
    color: var(--site-theme-color, #0071e3);
    font-weight: 700;
}
.dark .root-match-prompt__word {
    color: #f4f4f5;
}
.root-match-choices {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}
.root-match-choice {
    appearance: none;
    box-sizing: border-box;
    width: 100%;
    min-height: 3rem;
    margin: 0;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #f8fafc;
    border-radius: 0.85rem;
    padding: 0.8rem 1rem;
    font-size: 0.975rem;
    line-height: 1.4;
    text-align: left;
    cursor: pointer;
    color: #0f172a;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}
.root-match-choice__text {
    display: block;
    overflow-wrap: anywhere;
}
.dark .root-match-choice {
    border-color: rgba(255, 255, 255, 0.08);
    background: #1f1f22;
    color: #e4e4e7;
}
.root-match-choice:hover:not(:disabled) {
    border-color: rgba(37, 99, 235, 0.35);
    transform: translateY(-1px);
}
.root-match-choice:disabled {
    cursor: default;
}
.root-match-choice.is-answer {
    border-color: rgba(34, 197, 94, 0.55);
    background: #ecfdf5;
    color: #166534;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.16);
}
.root-match-choice.is-picked-ok {
    border-color: rgba(34, 197, 94, 0.55);
    background: #ecfdf5;
    color: #166534;
}
.root-match-choice.is-wrong {
    border-color: #ef4444;
    background: #fef2f2;
    color: #991b1b;
    animation: root-match-shake 0.42s ease;
}
.dark .root-match-choice.is-answer,
.dark .root-match-choice.is-picked-ok {
    background: #14532d;
    color: #86efac;
    border-color: rgba(34, 197, 94, 0.4);
    box-shadow: none;
}
.dark .root-match-choice.is-wrong {
    background: #450a0a;
    color: #fecaca;
}
.root-match-answer {
    margin-top: 0.95rem;
    padding: 0.95rem 1rem 1.05rem;
    border-radius: 0.9rem;
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.07);
    text-align: left;
}
.dark .root-match-answer {
    background: #1f1f22;
    border-color: rgba(255, 255, 255, 0.08);
}
.root-match-answer__label {
    margin: 0 0 0.35rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #64748b;
}
.root-match-answer__label:not(:first-child) {
    margin-top: 0.75rem;
}
.dark .root-match-answer__label {
    color: #a1a1aa;
}
.root-match-answer__zh {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 650;
    line-height: 1.45;
    color: #0f172a;
}
.dark .root-match-answer__zh {
    color: #f4f4f5;
}
.root-match-answer__story {
    margin: 0.55rem 0 0;
    font-size: 0.875rem;
    line-height: 1.55;
    color: #475569;
}
.dark .root-match-answer__story {
    color: #a1a1aa;
}
.root-match-next {
    appearance: none;
    display: block;
    width: 100%;
    margin: 0.95rem 0 0;
    padding: 0.78rem 1rem;
    border: 0;
    border-radius: 0.75rem;
    background: var(--site-theme-color, #2563eb);
    color: #fff;
    font-size: 0.975rem;
    font-weight: 650;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.root-match-next:hover {
    filter: brightness(1.05);
}
.root-match-progress__hint {
    margin-left: 0.35rem;
    font-size: 0.75rem;
    font-weight: 500;
    opacity: 0.72;
}
@media (max-width: 480px) {
    .root-match-choice {
        min-height: 2.85rem;
        padding: 0.7rem 0.85rem;
        font-size: 0.9rem;
        border-radius: 0.75rem;
    }
    .root-match-prompt {
        padding: 0.95rem 0.85rem;
    }
}

.root-spell .spell-actions {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

.root-cheer {
    max-width: 24rem;
    margin: 2rem auto;
    text-align: center;
    padding: 1.5rem 1rem;
}
.root-cheer-eyebrow {
    margin: 0;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
}
.root-cheer-title {
    margin: 0.35rem 0 0.5rem;
    font-size: 2rem;
    font-weight: 800;
}
.root-cheer-msg {
    margin: 0 0 0.5rem;
    font-size: 1rem;
}
.root-cheer-meta {
    margin: 0 0 1.25rem;
    font-size: 0.85rem;
    color: #64748b;
}
.root-cheer-btn {
    border: 0;
    border-radius: 999px;
    padding: 0.65rem 1.4rem;
    background: #0a0a0a;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
}
.dark .root-cheer-btn {
    background: #fafafa;
    color: #0a0a0a;
}

/* ── 词根学习页：今日目标进度 ── */
.root-daily-progress {
    width: 100%;
    max-width: 28rem;
    margin: 0 auto 1rem;
    padding: 0.75rem 1rem;
    border-radius: 0.85rem;
    background: rgba(0, 113, 227, 0.06);
}
.dark .root-daily-progress {
    background: rgba(10, 132, 255, 0.12);
}
.root-daily-progress-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 0.45rem;
}
.root-daily-progress-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
}
.root-daily-progress-count {
    font-size: 1.125rem;
    font-weight: 750;
    letter-spacing: -0.02em;
    color: #0f172a;
}
.dark .root-daily-progress-count {
    color: #f8fafc;
}
.root-daily-progress-bar {
    height: 0.4rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.08);
    overflow: hidden;
}
.dark .root-daily-progress-bar {
    background: rgba(255, 255, 255, 0.12);
}
.root-daily-progress-bar > span {
    display: block;
    height: 100%;
    background: #0071e3;
    border-radius: inherit;
}
.root-daily-progress-root {
    margin: 0.45rem 0 0;
    font-size: 0.75rem;
    color: #64748b;
}
.root-cheer-back {
    display: inline-block;
    margin-top: 0.85rem;
    font-size: 0.8125rem;
    color: #64748b;
    text-decoration: none;
}
.root-cheer-back:hover {
    color: #0071e3;
    text-decoration: underline;
}

/* ── 词根学习页 rootlearning ── */
body.is-immersive-learning.no-topnav {
    padding-top: 0;
    background: #f5f5f7;
}
body.is-immersive-learning.no-topnav #appContent {
    min-height: 100dvh;
}
.rl-page.ld-page {
    box-sizing: border-box;
    height: calc(100dvh - var(--topnav-height, 3.5rem));
    max-height: calc(100dvh - var(--topnav-height, 3.5rem));
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.rl-page--immersive.ld-page {
    height: 100dvh;
    max-height: 100dvh;
    background: #f5f5f7;
    display: flex;
    flex-direction: column;
    padding: 0;
}
.rl-page--immersive .ld-page-glow {
    display: none;
}
.rl-page .rl-inner {
    width: 100%;
    max-width: none;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-bottom: 1rem;
}
.rl-shell {
    --rl-accent: var(--site-theme-color);
    --rl-accent-soft: var(--accent-soft);
    --rl-text: var(--fg);
    --rl-muted: var(--muted-2);
    --rl-line: var(--border);
    --rl-surface: var(--bg);
    --rl-surface-2: var(--surface);
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    height: 100%;
    color: var(--rl-text);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC", "Hiragino Sans GB", sans-serif;
}
.dark .rl-shell {
    --rl-surface: var(--surface);
    --rl-surface-2: var(--bg);
}
.rl-sidebar {
    display: none !important;
}
.rl-guest-banner {
    flex: 0 0 auto;
    margin: 0;
    padding: 0.55rem 1rem;
    font-size: 0.75rem;
    text-align: center;
    color: #86868b;
    background: rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.dark .rl-guest-banner {
    background: rgba(255, 255, 255, 0.04);
    border-bottom-color: rgba(255, 255, 255, 0.08);
}
.rl-close {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.05);
    color: var(--rl-text);
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
    flex: 0 0 auto;
    align-self: flex-start;
    margin-top: 0.15rem;
    font-size: 1.35rem;
    line-height: 1;
    font-weight: 400;
}
.rl-close:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #1d1d1f;
}
.dark .rl-close {
    background: rgba(255, 255, 255, 0.08);
    color: var(--rl-text);
}
.dark .rl-close:hover {
    background: rgba(255, 255, 255, 0.14);
}
.rl-dock-head-center {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.rl-lang-switch {
    display: inline-flex;
    flex: 0 0 auto;
    margin-left: auto;
    padding: 0.06rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.05);
    gap: 0.04rem;
}
.dark .rl-lang-switch {
    background: rgba(255, 255, 255, 0.08);
}
.rl-lang-pill {
    margin: 0;
    border: 0;
    border-radius: 999px;
    padding: 0.12rem 0.38rem;
    font: inherit;
    font-size: 0.625rem;
    font-weight: 600;
    line-height: 1.1;
    color: var(--rl-muted, #86868b);
    background: transparent;
    cursor: pointer;
    white-space: nowrap;
}
.rl-lang-pill.is-on {
    color: #fff;
    background: var(--rl-accent, #0071e3);
}
.rl-lang-pill:focus-visible {
    outline: 2px solid var(--rl-accent, #0071e3);
    outline-offset: 1px;
}
.rl-day-pills {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.28rem;
    min-width: 0;
}
.rl-day-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.18rem;
    margin: 0;
    padding: 0.22rem 0.5rem;
    border: 0;
    border-radius: 0.45rem;
    font: inherit;
    font-size: 0.6875rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.01em;
    line-height: 1.2;
    cursor: pointer;
    white-space: nowrap;
    color: #1d1d1f;
    background: rgba(0, 0, 0, 0.06);
    box-shadow: none;
    transition: background 0.12s ease, color 0.12s ease;
}
.rl-day-pill--learn,
.rl-day-pill--review {
    color: #1d1d1f;
    background: rgba(0, 0, 0, 0.06);
}
.rl-day-pill:hover {
    background: rgba(0, 0, 0, 0.1);
}
.rl-day-pill.is-active {
    box-shadow: none;
    transform: none;
}
.rl-day-pill--learn.is-active {
    color: #fff;
    background: #0071e3;
    box-shadow: none;
}
.rl-day-pill--review.is-active {
    color: #0071e3;
    background: rgba(0, 113, 227, 0.12);
    box-shadow: none;
}
.rl-day-pill.is-done:not(.is-active) {
    color: #1d1d1f;
    background: rgba(0, 0, 0, 0.06);
    box-shadow: none;
    opacity: 0.72;
}
.rl-day-pill--learn.is-active.is-done {
    color: #fff;
    background: #16a34a;
    box-shadow: none;
}
.rl-day-pill--review.is-active.is-done {
    color: #15803d;
    background: rgba(22, 163, 74, 0.14);
    box-shadow: none;
}
.rl-day-pill-check {
    font-size: 0.625rem;
    font-weight: 800;
    line-height: 1;
}
.dark .rl-day-pill,
.dark .rl-day-pill--learn,
.dark .rl-day-pill--review {
    color: #f5f5f7;
    background: rgba(255, 255, 255, 0.1);
}
.dark .rl-day-pill:hover {
    background: rgba(255, 255, 255, 0.14);
}
.dark .rl-day-pill--learn.is-active {
    color: #fff;
    background: #0071e3;
}
.dark .rl-day-pill--review.is-active {
    color: #93c5fd;
    background: rgba(0, 113, 227, 0.22);
}
.dark .rl-day-pill.is-done:not(.is-active) {
    color: #f5f5f7;
    background: rgba(255, 255, 255, 0.1);
}
.dark .rl-day-pill--learn.is-active.is-done {
    color: #fff;
    background: #22c55e;
}
.dark .rl-day-pill--review.is-active.is-done {
    color: #86efac;
    background: rgba(34, 197, 94, 0.22);
}
.rl-group-switch {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.4rem;
    padding-top: 0.35rem;
    border-top: 1px solid var(--rl-line);
}
.rl-group-switch[hidden] {
    display: none !important;
}
.rl-group-btn {
    margin: 0;
    padding: 0.28rem 0.55rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--rl-accent);
    font: inherit;
    font-size: 0.72rem;
    font-weight: 550;
    line-height: 1.2;
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    transition: background 0.12s ease, opacity 0.12s ease;
}
.rl-group-btn .vk-icon {
    width: 0.95em;
    height: 0.95em;
    flex: 0 0 auto;
}
.rl-group-btn:hover:not(:disabled) {
    background: var(--rl-accent-soft);
}
.rl-group-btn:disabled {
    opacity: 0.28;
    cursor: not-allowed;
    color: var(--rl-muted);
}
.rl-dock-group-pair {
    display: none;
}
.rl-group-nav--sm {
    width: 1.7rem;
    height: 1.7rem;
    font-size: 1rem;
}
.rl-back--icon {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.05);
    color: var(--rl-text);
    text-decoration: none;
    transition: background 0.15s ease;
    flex: 0 0 auto;
}
.rl-back--icon:hover {
    background: var(--rl-accent-soft);
    color: var(--rl-accent);
}
.dark .rl-back--icon {
    background: rgba(255, 255, 255, 0.08);
    color: var(--rl-text);
}
.rl-main {
    position: relative;
    min-width: 0;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 7fr);
    overflow: hidden;
    background: var(--rl-surface);
}
.rl-main > .rl-tree-pane {
    min-width: 0;
    min-height: 0;
    height: 100%;
    overflow-x: hidden;
    border-right: 1px solid var(--rl-line);
}
.rl-main > .rl-pane--detail {
    position: relative;
    z-index: 1;
    min-width: 0;
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 0;
    border-radius: 0;
    background: var(--rl-surface);
    overflow: hidden;
}
.dark .rl-main > .rl-pane--detail {
    background: var(--rl-surface);
}

@media (max-width: 768px) {
    .rl-main {
        grid-template-columns: minmax(0, 1fr);
    }
    .rl-main > .rl-tree-pane {
        grid-column: 1;
        grid-row: 1;
        width: 100%;
        height: 100%;
        border-right: 0;
    }
    .rl-main > .rl-pane--detail {
        display: none !important;
    }
    .rl-dock-body {
        padding-bottom: 1.35rem;
    }
    .rl-day-pill {
        font-size: 0.65rem;
        padding: 0.2rem 0.42rem;
    }
    .rl-group-btn {
        padding: 0.26rem 0.4rem;
        font-size: 0.68rem;
    }
}

/* 常驻结构图栏（与右侧学习区并排） */
.rl-tree-pane {
    position: relative;
    z-index: 1;
    min-width: 0;
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #f5f5f7;
    border-right: 0;
    overflow-x: hidden;
}
.dark .rl-tree-pane {
    background: #111113;
}
.rl-dock-head {
    flex: 0 0 auto;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0.55rem;
    padding: 0.75rem 0.85rem 0.65rem;
    border-bottom: 1px solid var(--rl-line);
}
.rl-dock-head-main {
    flex: 1 1 auto;
    min-width: 0;
    text-align: center;
}
.rl-dock-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--rl-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rl-dock-sub {
    margin: 0;
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--rl-muted);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rl-group-nav {
    flex: 0 0 auto;
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.04);
    color: var(--rl-text);
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease, opacity 0.15s ease;
}
.rl-group-nav:hover:not(:disabled) {
    background: var(--rl-accent-soft);
    color: var(--rl-accent);
}
.rl-group-nav:disabled {
    opacity: 0.28;
    cursor: not-allowed;
}
.dark .rl-group-nav {
    background: rgba(255, 255, 255, 0.08);
}
.rl-dock-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    scrollbar-width: thin;
}
.rl-dock-body > .rl-empty {
    margin: auto;
    padding: 1.5rem;
}

/* 左词根 ↔ SVG 连线 ↔ 右派生词 */
.rl-map {
    position: relative;
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
    min-height: 100%;
    height: max-content;
    display: grid;
    grid-template-columns: minmax(0, max-content) minmax(0, 1fr);
    column-gap: 1.25rem;
    align-items: start;
    overflow-x: hidden;
    overflow-y: visible;
}
.rl-map-svg {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: visible;
}
.rl-map-svg-line {
    fill: none;
    stroke: rgba(0, 113, 227, 0.55);
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.dark .rl-map-svg-line {
    stroke: rgba(41, 151, 255, 0.6);
}
.rl-map-roots,
.rl-map-words {
    position: relative;
    z-index: 1;
    min-width: 0;
    min-height: 0;
    overflow: visible;
    scrollbar-width: thin;
}
.rl-map-roots {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-self: start;
    gap: 0.45rem;
    padding: 0.85rem 0.15rem 1.1rem 0.85rem;
}
.rl-map.is-unparsed .rl-map-svg {
    display: none;
}
.rl-map-root {
    position: relative;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 0.45rem;
    width: auto;
    max-width: 100%;
    margin: 0;
    padding: 0.55rem 0.55rem 0.55rem 0.85rem;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 999px;
    background: #fff;
    color: inherit;
    text-align: left;
    cursor: pointer;
    font: inherit;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
    transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease, box-shadow 0.12s ease;
}
.dark .rl-map-root {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}
.rl-map-root:hover {
    border-color: rgba(0, 113, 227, 0.28);
    background: rgba(0, 113, 227, 0.05);
}
.dark .rl-map-root:hover {
    background: rgba(41, 151, 255, 0.1);
}
.rl-map-root.is-active {
    background: #0071e3;
    border-color: #0071e3;
    color: #fff;
    box-shadow: 0 6px 18px rgba(0, 113, 227, 0.22);
}
.dark .rl-map-root.is-active {
    background: #0071e3;
    border-color: #0071e3;
    color: #fff;
}
.rl-map-root-form {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.2;
    color: inherit;
    word-break: break-word;
    min-width: 0;
}
.rl-map-root-gloss {
    display: none;
}
.rl-map-root-count {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.7rem;
    padding: 0.18rem 0.42rem;
    border-radius: 999px;
    font-variant-numeric: tabular-nums;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.01em;
    color: #0071e3;
    background: rgba(0, 113, 227, 0.1);
}
.rl-map-root.is-active .rl-map-root-count {
    color: #0071e3;
    background: rgba(255, 255, 255, 0.95);
}
.dark .rl-map-root-count {
    color: #2997ff;
    background: rgba(41, 151, 255, 0.16);
}
.dark .rl-map-root.is-active .rl-map-root-count {
    color: #0071e3;
    background: rgba(255, 255, 255, 0.95);
}

.rl-map-words {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    padding: 0.85rem 0.85rem 1.1rem 0.2rem;
}
.rl-map-words-head {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    padding: 0.1rem 0.4rem 0.4rem;
}
.rl-map-words-kicker {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--rl-muted);
}
.rl-map-words-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--rl-text);
}
.rl-map-words-list {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    width: max-content;
    max-width: none;
}
.rl-map-word-row {
    position: relative;
    display: flex;
    align-items: stretch;
    width: max-content;
    max-width: none;
    padding-left: calc(var(--rl-map-depth, 0) * 0.85rem);
}
.rl-map-word {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.45rem;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0.5rem 0.75rem;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 999px;
    background: #fff;
    color: inherit;
    text-align: left;
    cursor: pointer;
    font: inherit;
    transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}
.dark .rl-map-word {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
}
.rl-map-word:hover {
    border-color: rgba(0, 113, 227, 0.28);
    background: rgba(0, 113, 227, 0.05);
}
.dark .rl-map-word:hover {
    background: rgba(41, 151, 255, 0.1);
}
.rl-map-word.is-active {
    background: rgba(0, 113, 227, 0.12);
    border-color: rgba(0, 113, 227, 0.35);
    color: #0071e3;
}
.dark .rl-map-word.is-active {
    background: rgba(41, 151, 255, 0.16);
    color: #2997ff;
}
.rl-map-word.is-mastered .rl-tree-word {
    text-decoration: line-through;
    opacity: 0.42;
}
.rl-map-word.is-virtual,
.rl-map-word-row.is-virtual .rl-map-word,
.rl-map-word-row.is-ghost .rl-map-word {
    cursor: default;
    opacity: 0.5;
}
.rl-map-word-main {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}
.rl-map-word .rl-tree-word {
    overflow: visible;
    text-overflow: unset;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* 右侧：词根解释页（与单词页一致：全宽、左对齐） */
.rl-root-detail {
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 0 0 1.25rem;
    text-align: left;
}
.rl-root-detail-kicker {
    margin: 0 0 0.35rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--rl-muted);
}
.rl-root-detail-form {
    margin: 0;
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 720;
    letter-spacing: -0.04em;
    line-height: 1.1;
    color: var(--rl-text);
}
.rl-root-detail-gloss {
    margin: 0.55rem 0 0;
    font-size: 1.05rem;
    line-height: 1.45;
    color: var(--rl-accent, #0071e3);
    font-weight: 600;
}
.rl-root-detail-gloss.is-empty {
    color: var(--rl-muted, #71717a);
    font-weight: 500;
}
.rl-root-detail-meta {
    margin-top: 0.85rem;
    font-size: 0.78rem;
    color: var(--rl-muted);
    font-variant-numeric: tabular-nums;
}
.rl-root-detail-section {
    margin-top: 1.5rem;
}
.rl-root-detail-h {
    margin: 0 0 0.55rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--rl-muted);
}
.rl-root-detail-note {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--rl-text);
    white-space: pre-wrap;
}
.rl-root-detail-note.is-empty {
    color: var(--rl-muted);
}
.rl-root-detail-chips {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.rl-root-detail-chip {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    width: 100%;
    margin: 0;
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--rl-line);
    border-radius: 0.85rem;
    background: var(--rl-surface-2, #f5f5f7);
    color: inherit;
    text-align: left;
    cursor: pointer;
    font: inherit;
    transition: border-color 0.12s ease, background 0.12s ease;
}
.rl-root-detail-chip:hover {
    border-color: rgba(0, 113, 227, 0.35);
    background: rgba(0, 113, 227, 0.06);
}
.rl-root-detail-chip.is-mastered .rl-tree-word {
    text-decoration: line-through;
    opacity: 0.45;
}
.rl-root-detail-chip-gloss {
    font-size: 0.75rem;
    color: var(--rl-muted);
}
.rl-root-detail-actions {
    margin-top: 1.75rem;
}
.rl-root-detail-start {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 10rem;
    padding: 0.7rem 1.2rem;
    border: 0;
    border-radius: 999px;
    background: #0071e3;
    color: #fff;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 650;
    cursor: pointer;
}
.rl-root-detail-start:hover {
    background: #0077ed;
}

/* 手机/平板：左词根、右单词列 + 实线连接 */
@media (max-width: 900px) {
    .rl-map {
        grid-template-columns: minmax(0, max-content) minmax(0, 1fr);
        column-gap: 1rem;
    }
    .rl-map-svg {
        display: block;
    }
    .rl-map-roots {
        justify-content: flex-start;
        align-items: flex-start;
        padding: 0.75rem 0.1rem 1rem 0.6rem;
    }
    .rl-map-root {
        width: auto;
        max-width: 10rem;
        min-width: 0;
        padding: 0.48rem 0.45rem 0.48rem 0.7rem;
        border-radius: 999px;
        align-items: center;
        text-align: left;
    }
    .rl-map-root-form {
        font-size: 0.95rem;
        width: auto;
        text-align: left;
    }
    .rl-map-root-count {
        font-size: 0.62rem;
        min-width: 1.55rem;
        padding: 0.16rem 0.36rem;
    }
    .rl-map-words {
        width: auto;
        padding: 0.75rem 0.65rem 1rem 0.1rem;
        align-items: flex-start;
    }
    .rl-map-words-list {
        width: max-content;
        max-width: none;
        margin: 0;
        gap: 0.4rem;
    }
    .rl-map-word {
        max-width: none;
        padding: 0.45rem 0.65rem;
        border-radius: 0.85rem;
    }
    .rl-map-word-main {
        align-items: flex-start;
    }
}

.rl-dock-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.rl-dock-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0 0.15rem;
}
.rl-dock-section-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--rl-muted);
}
.rl-dock-section--rooted .rl-dock-section-label { color: var(--rl-accent); }
.rl-dock-section--unparsed .rl-dock-section-label { color: var(--rl-muted); }
.dark .rl-dock-section--rooted .rl-dock-section-label { color: var(--rl-accent); }
.dark .rl-dock-section--unparsed .rl-dock-section-label { color: var(--rl-muted); }
.rl-dock-section-meta {
    font-variant-numeric: tabular-nums;
    font-size: 0.68rem;
    color: var(--rl-muted);
}
.rl-rooted-stack {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}
.rl-dock-divider {
    display: none;
}
.rl-dock-divider-line {
    flex: 1;
    height: 1px;
    background: var(--rl-line);
}
.rl-dock-divider-text {
    flex: 0 0 auto;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.rl-unparsed-panel {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    padding: 0.15rem 0;
}
.rl-unparsed-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.2rem 0.15rem 0.55rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    margin-bottom: 0.35rem;
}
.dark .rl-unparsed-head {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}
.rl-unparsed-kicker {
    font-size: 1.05rem;
    font-weight: 650;
    letter-spacing: -0.025em;
    text-transform: none;
    color: #1d1d1f;
}
.dark .rl-unparsed-kicker { color: #f5f5f7; }
.rl-unparsed-hint { display: none; }
.rl-unparsed-count {
    font-variant-numeric: tabular-nums;
    font-size: 0.72rem;
    font-weight: 500;
    color: #86868b;
}
.rl-unparsed-grid {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
}
.rl-unparsed-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
    margin: 0;
    padding: 0.48rem 0.55rem;
    border: 0;
    border-radius: 0.55rem;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font: inherit;
    text-align: left;
    transition: background 0.12s ease, color 0.12s ease;
}
.dark .rl-unparsed-chip {
    background: transparent;
    border: 0;
}
.rl-unparsed-chip:hover {
    background: rgba(0, 0, 0, 0.04);
    border: 0;
}
.dark .rl-unparsed-chip:hover {
    background: rgba(255, 255, 255, 0.06);
}
.rl-unparsed-chip.is-active {
    background: rgba(0, 113, 227, 0.1);
    color: #0071e3;
    border: 0;
    box-shadow: none;
}
.dark .rl-unparsed-chip.is-active {
    background: rgba(41, 151, 255, 0.16);
    color: #2997ff;
}
.rl-unparsed-chip.is-mastered .rl-tree-word {
    text-decoration: line-through;
    opacity: 0.4;
}
.rl-unparsed-chip .rl-tree-word {
    font-size: 0.9375rem;
    font-weight: 500;
    letter-spacing: -0.015em;
}

.rl-head {
    flex: 0 0 auto;
}
.rl-head-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.rl-back {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    color: var(--ld-muted, #71717a);
    text-decoration: none;
    font-size: 0.875rem;
}
.rl-back:hover { color: #111; }
.dark .rl-back:hover { color: #fafafa; }
.rl-lib-meta {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--ld-muted, #71717a);
}
.rl-lib-name {
    font-weight: 700;
    color: #111;
    font-size: 0.875rem;
}
.dark .rl-lib-name { color: #fafafa; }

.rl-split {
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(17rem, 24rem) minmax(0, 1fr);
    gap: 0.85rem;
}

.rl-pane {
    min-height: 0;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
}
.dark .rl-pane {
    background: #111113;
    border-color: #27272a;
}

.rl-pane--list {
    overflow: hidden;
    background:
        radial-gradient(120% 80% at 0% 0%, rgba(56, 158, 227, 0.10), transparent 55%),
        radial-gradient(90% 60% at 100% 100%, rgba(15, 23, 42, 0.04), transparent 50%),
        #fff;
}
.dark .rl-pane--list {
    background:
        radial-gradient(120% 80% at 0% 0%, rgba(96, 165, 250, 0.12), transparent 55%),
        radial-gradient(90% 60% at 100% 100%, rgba(255, 255, 255, 0.03), transparent 50%),
        #111113;
}
.rl-list-box {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    padding: 0.85rem 0.75rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}
.rl-list-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding-right: 0.15rem;
    scrollbar-width: thin;
}
.rl-root-block {
    flex: 0 0 auto;
}
.rl-root-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    flex-wrap: wrap;
}
.rl-root-card--day {
    width: 100%;
}
.rl-day-progress {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 0.7rem 0.8rem;
    border-radius: 0.85rem;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset;
}
.dark .rl-day-progress {
    background: rgba(24, 24, 27, 0.72);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}
.rl-day-progress-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
}
.rl-day-progress-label {
    font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Songti SC", Georgia, serif;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0f172a;
}
.dark .rl-day-progress-label { color: #f8fafc; }
.rl-day-progress-count {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--ld-muted, #71717a);
}
.rl-day-progress-track {
    height: 0.35rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
    overflow: hidden;
}
.dark .rl-day-progress-track { background: rgba(255, 255, 255, 0.1); }
.rl-day-progress-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #389ee3, #0ea5e9);
    transition: width 0.35s ease;
}
.rl-day-progress-split {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}
.rl-day-chip {
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.18rem 0.5rem;
    border-radius: 999px;
    letter-spacing: 0.01em;
}
.rl-day-chip--review {
    color: #475569;
    background: rgba(71, 85, 105, 0.12);
}
.rl-day-chip--learn {
    color: #0369a1;
    background: rgba(56, 158, 227, 0.14);
}
.dark .rl-day-chip--review {
    color: #cbd5e1;
    background: rgba(148, 163, 184, 0.16);
}
.dark .rl-day-chip--learn {
    color: #7dd3fc;
    background: rgba(56, 158, 227, 0.2);
}
.rl-root-chip {
    display: inline-flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.55rem 0.8rem;
    border-radius: 0.75rem;
    background: rgba(0, 113, 227, 0.08);
    border: 1px solid rgba(0, 113, 227, 0.2);
}
.dark .rl-root-chip {
    background: rgba(96, 165, 250, 0.12);
    border-color: rgba(96, 165, 250, 0.28);
}
.rl-root-key {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.rl-root-gloss {
    font-size: 0.75rem;
    color: var(--ld-muted, #71717a);
}
.rl-next-group-btn {
    flex: 0 0 auto;
    margin: 0;
    border: 0;
    border-radius: 999px;
    padding: 0.45rem 0.95rem;
    background: #0a0a0a;
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: opacity 0.15s ease, transform 0.15s ease;
}
.rl-next-group-btn:hover {
    opacity: 0.88;
}
.rl-next-group-btn:active {
    transform: scale(0.97);
}
.dark .rl-next-group-btn {
    background: #fafafa;
    color: #0a0a0a;
}

.rl-word-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}
.rl-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin: 0.35rem 0 0.1rem;
    padding: 0.45rem 0.65rem;
    border-radius: 0.65rem;
    list-style: none;
    border: 1px solid transparent;
}
.rl-section-head:first-child {
    margin-top: 0;
}
.rl-section-head--review {
    background: rgba(71, 85, 105, 0.1);
    border-color: rgba(71, 85, 105, 0.14);
}
.rl-section-head--learn {
    background: rgba(56, 158, 227, 0.1);
    border-color: rgba(56, 158, 227, 0.16);
}
.rl-section-head.is-current {
    box-shadow: inset 3px 0 0 currentColor;
}
.rl-section-head--review.is-current { color: #475569; }
.rl-section-head--learn.is-current { color: #0284c7; }
.dark .rl-section-head--review {
    background: rgba(148, 163, 184, 0.12);
    border-color: rgba(148, 163, 184, 0.16);
}
.dark .rl-section-head--learn {
    background: rgba(56, 158, 227, 0.14);
    border-color: rgba(56, 158, 227, 0.2);
}
.rl-section-title {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}
.rl-section-meta {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.68rem;
    color: var(--ld-muted, #71717a);
}
.rl-group-head {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.35rem 0.55rem;
    margin: 0.55rem 0 0.15rem;
    padding: 0.4rem 0.55rem;
    border-radius: 0.5rem;
    background: rgba(0, 113, 227, 0.08);
    border: 1px solid rgba(0, 113, 227, 0.14);
    list-style: none;
}
.rl-track-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.65rem 0 0.15rem;
    padding: 0.1rem 0.2rem;
    list-style: none;
}
.rl-track-head:first-child {
    margin-top: 0.1rem;
}
.rl-track-head-label {
    flex-shrink: 0;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--ld-ink-secondary, #64748b);
}
.rl-track-head::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(15, 23, 42, 0.12);
}
.dark .rl-track-head::after {
    background: rgba(255, 255, 255, 0.14);
}
.rl-group-head:first-child {
    margin-top: 0.15rem;
}
.dark .rl-group-head {
    background: rgba(96, 165, 250, 0.1);
    border-color: rgba(96, 165, 250, 0.18);
}
.rl-group-head.is-current {
    border-color: #0071e3;
    box-shadow: inset 3px 0 0 #0071e3;
}
.dark .rl-group-head.is-current {
    border-color: #60a5fa;
    box-shadow: inset 3px 0 0 #60a5fa;
}
.rl-group-head.is-unparsed {
    background: rgba(113, 113, 122, 0.1);
    border-color: rgba(113, 113, 122, 0.18);
}
.rl-group-head-index {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--ld-muted, #71717a);
    letter-spacing: 0.02em;
}
.rl-group-head-key {
    font-size: 0.875rem;
    font-weight: 800;
    color: var(--ld-accent, #0071e3);
}
.dark .rl-group-head-key {
    color: #93c5fd;
}
.rl-group-head-gloss {
    font-size: 0.72rem;
    color: var(--ld-muted, #71717a);
}
.rl-group-head-count {
    margin-left: auto;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.68rem;
    color: var(--ld-muted, #71717a);
}
.rl-day-current-group {
    display: none;
}
.rl-day-group-label,
.rl-day-group-key,
.rl-day-group-gloss,
.rl-day-group-count {
    display: none;
}

/* 词根结构图 —— 简洁纵向列表 */
.rl-tree-pane {
    background: #f5f5f7;
}
.dark .rl-tree-pane {
    background: #111113;
}
.rl-tree-block {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}
.rl-tree-block--ltr,
.rl-tree-block--stack {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    overflow: visible;
    min-height: 0;
}
.dark .rl-tree-block {
    background: transparent;
    border: 0;
}
.rl-tree-block.is-current .rl-tree-root-form {
    color: #0071e3;
}
.dark .rl-tree-block.is-current .rl-tree-root-form {
    color: #2997ff;
}
.rl-tree-hub { display: contents; }
.rl-tree-root {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    padding: 0.35rem 0.15rem 0.55rem;
    border: 0;
    border-radius: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    text-align: left;
    background: transparent;
    box-shadow: none;
}
.dark .rl-tree-root {
    background: transparent;
    border-bottom-color: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}
.rl-tree-root-text {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    min-width: 0;
}
.rl-tree-root-kicker { display: none; }
.rl-tree-root-form {
    font-size: 1.05rem;
    font-weight: 650;
    letter-spacing: -0.025em;
    line-height: 1.2;
    color: #1d1d1f;
    word-break: break-word;
}
.dark .rl-tree-root-form { color: #f5f5f7; }
.rl-tree-root-gloss {
    font-size: 0.75rem;
    line-height: 1.35;
    font-weight: 400;
    color: #86868b;
    max-width: 100%;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.dark .rl-tree-root-gloss { color: #a1a1a6; }
.rl-tree-root-count {
    margin: 0;
    flex: 0 0 auto;
    font-variant-numeric: tabular-nums;
    font-size: 0.72rem;
    font-weight: 500;
    color: #86868b;
}
.dark .rl-tree-root-count { color: #a1a1a6; }
.rl-tree-trunk { display: none; }
.rl-tree-branches {
    margin: 0;
    padding: 0.35rem 0 0;
}

.rl-tree-level {
    --rl-tree-line: rgba(0, 0, 0, 0.1);
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    position: relative;
}
.dark .rl-tree-level {
    --rl-tree-line: rgba(255, 255, 255, 0.12);
}
.rl-tree-level--l1 { padding-left: 0; }
.rl-tree-level:not(.rl-tree-level--l1)::before,
.rl-tree-level--l1::before { display: none; }

.rl-tree-li {
    position: relative;
    list-style: none;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.12rem;
    padding-left: 0;
    min-width: 0;
}
.rl-tree-li::before { display: none; }
.rl-tree-level--l1 > .rl-tree-li:only-child { padding-left: 0; }
.rl-tree-level--l1 > .rl-tree-li:only-child::before { display: none; }
.rl-tree-li > .rl-tree-level {
    margin: 0.08rem 0 0.12rem;
    padding-left: 0.9rem;
    margin-left: 0.5rem;
    border-left: 1px solid var(--rl-tree-line);
}
.rl-tree-li.has-kids > .rl-tree-node::after { display: none; }

.rl-tree-node {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    width: 100%;
    max-width: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin: 0;
    padding: 0.48rem 0.55rem;
    border: 0;
    border-radius: 0.55rem;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
    box-shadow: none;
    transition: background 0.12s ease, color 0.12s ease;
}
.dark .rl-tree-node {
    background: transparent;
    border: 0;
    box-shadow: none;
}
.rl-tree-node:hover {
    background: rgba(0, 0, 0, 0.04);
    border: 0;
}
.dark .rl-tree-node:hover {
    background: rgba(255, 255, 255, 0.06);
}
.rl-tree-node.is-active {
    background: rgba(0, 113, 227, 0.1);
    color: #0071e3;
    border: 0;
    box-shadow: none;
}
.dark .rl-tree-node.is-active {
    background: rgba(41, 151, 255, 0.16);
    color: #2997ff;
}
.rl-tree-node.has-kids { border: 0; }
.rl-tree-node.is-mastered .rl-tree-word {
    text-decoration: line-through;
    opacity: 0.4;
}
.rl-tree-node.is-virtual,
.rl-tree-node.is-ghost {
    cursor: default;
    opacity: 0.5;
    background: transparent;
    border: 0;
}
.dark .rl-tree-node.is-virtual,
.dark .rl-tree-node.is-ghost {
    background: transparent;
}

.rl-tree-depth,
.rl-tree-step,
.rl-tree-morph,
.rl-tree-tag {
    display: none !important;
}

.rl-tree-word {
    font-size: 0.9375rem;
    font-weight: 500;
    letter-spacing: -0.015em;
    min-width: 0;
    overflow: visible;
    text-overflow: unset;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.35;
}
.rl-tree-node.is-active .rl-tree-word { font-weight: 600; }
.rl-tree-mark {
    flex: 0 0 auto;
    font-size: 0.75rem;
    font-weight: 600;
    color: #86868b;
}
.rl-tree-node.is-active .rl-tree-mark { color: inherit; }

.rl-root-hl {
    color: #0071e3;
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    line-height: inherit;
    text-decoration: none;
    box-shadow: none;
}
.dark .rl-root-hl {
    color: #2997ff;
    box-shadow: none;
}

.rl-unparsed-panel { padding: 0.15rem 0; }
.rl-unparsed-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.2rem 0.15rem 0.55rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    margin-bottom: 0.35rem;
}
.dark .rl-unparsed-head {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}
.rl-unparsed-kicker {
    font-size: 1.05rem;
    font-weight: 650;
    letter-spacing: -0.025em;
    text-transform: none;
    color: #1d1d1f;
}
.dark .rl-unparsed-kicker { color: #f5f5f7; }
.rl-unparsed-hint { display: none; }
.rl-unparsed-count {
    font-size: 0.72rem;
    font-weight: 500;
    color: #86868b;
}
.rl-unparsed-grid {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
}
.rl-unparsed-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
    margin: 0;
    padding: 0.48rem 0.55rem;
    border: 0;
    border-radius: 0.55rem;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font: inherit;
    text-align: left;
}
.dark .rl-unparsed-chip {
    background: transparent;
    border: 0;
}
.rl-unparsed-chip:hover {
    background: rgba(0, 0, 0, 0.04);
    border: 0;
}
.rl-unparsed-chip.is-active {
    background: rgba(0, 113, 227, 0.1);
    color: #0071e3;
    border: 0;
    box-shadow: none;
}
.rl-unparsed-chip .rl-tree-word { font-weight: 500; }


.rl-word-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0;
    padding: 0.48rem 0.55rem;
    border: 1px solid transparent;
    border-radius: 0.55rem;
    background: rgba(248, 250, 252, 0.9);
    color: inherit;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.dark .rl-word-item {
    background: rgba(39, 39, 42, 0.7);
}
.rl-word-item:hover {
    border-color: rgba(56, 158, 227, 0.28);
    background: rgba(56, 158, 227, 0.08);
}
.rl-word-item.is-active {
    border-color: rgba(56, 158, 227, 0.55);
    background: rgba(56, 158, 227, 0.14);
}
.rl-word-item.is-mastered .rl-word-text {
    text-decoration: line-through;
    opacity: 0.55;
}
.rl-word-check {
    margin-left: auto;
    color: #0ea5e9;
    font-size: 0.75rem;
}
.rl-word-phase {
    flex: 0 0 auto;
    font-size: 0.62rem;
    font-weight: 700;
    padding: 0.1rem 0.35rem;
    border-radius: 999px;
}
.rl-word-phase--review {
    color: #475569;
    background: rgba(71, 85, 105, 0.12);
}
.rl-word-num {
    flex: 0 0 auto;
    width: 1.25rem;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.68rem;
    color: var(--ld-muted, #71717a);
}
.rl-word-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.875rem;
    font-weight: 600;
}
.rl-map-word .rl-root-hl,
.rl-tree-word .rl-root-hl {
    color: #0071e3;
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    line-height: inherit;
}
.dark .rl-map-word .rl-root-hl,
.dark .rl-tree-word .rl-root-hl {
    color: #2997ff;
}
.rl-word-meaning {
    display: none;
}
.rl-empty,
.rl-empty-item {
    margin: 0;
    padding: 1rem 0.5rem;
    text-align: center;
    color: var(--ld-muted, #71717a);
    font-size: 0.8125rem;
    list-style: none;
}
.rl-boot-skeleton {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 0.85rem 0.65rem;
}
.rl-boot-skeleton-bar {
    display: block;
    height: 0.7rem;
    width: 88%;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(15,23,42,0.06), rgba(15,23,42,0.12), rgba(15,23,42,0.06));
    background-size: 200% 100%;
    animation: rl-exam-skeleton-shine 1.2s ease-in-out infinite;
}
.rl-boot-skeleton-bar--short { width: 56%; }
.dark .rl-boot-skeleton-bar {
    background: linear-gradient(90deg, rgba(255,255,255,0.06), rgba(255,255,255,0.14), rgba(255,255,255,0.06));
    background-size: 200% 100%;
}

.rl-pane--detail {
    overflow: hidden;
}
.rl-detail-toolbar {
    display: none;
}
.rl-detail-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding: 1rem 1.35rem 1.1rem;
}
.rl-detail-footer {
    flex: 0 0 auto;
    position: sticky;
    bottom: 0;
    z-index: 5;
    padding: 0.45rem 0.85rem calc(0.55rem + env(safe-area-inset-bottom, 0px));
    background: var(--rl-surface, #fff);
    border-top: 1px solid var(--rl-line, rgba(0, 0, 0, 0.08));
}
.dark .rl-detail-footer {
    background: var(--rl-surface, #161618);
    border-top-color: rgba(255, 255, 255, 0.1);
}
.rl-master-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
    min-width: 0;
    width: 100%;
}
.rl-detail-top {
    display: block;
}
.rl-detail-main {
    min-width: 0;
}
.rl-detail-word-wrap .learning-word-row {
    justify-content: flex-start;
    margin-bottom: 0.25rem;
}
.rl-detail-word {
    margin: 0;
    font-size: 1.85rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--fg);
}
.rl-detail-word.rl-word-visual {
    display: flex;
    flex-wrap: nowrap;
    align-items: baseline;
    gap: 0;
    font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Songti SC", Georgia, serif;
    font-size: clamp(1.65rem, 3.6vw, 2.35rem);
    letter-spacing: -0.03em;
    line-height: 1.08;
    font-weight: 700;
    white-space: nowrap;
    overflow-x: auto;
}
.rl-detail-word-wrap .phonetic-row.rl-detail-phonetic-row {
    display: flex;
    width: 100%;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
    margin-bottom: 0.75rem;
}
.rl-detail-phonetic {
    font-size: 0.875rem;
    color: var(--ld-muted, #71717a);
}

/* 词根着色：挂到页面与手机弹层（modal 在 .rl-page 外） */
.rl-page,
.rl-modal,
.rl-drill {
    --rl-pre: var(--part-pre);
    --rl-root: var(--part-root);
    --rl-suf: var(--part-suf);
    --rl-base: var(--part-base);
    --rl-glue: var(--part-glue);
    --rl-ink: var(--fg);
    --rl-muted: var(--muted);
    --rl-line: var(--border);
    --rl-accent: var(--site-theme-color);
    --rl-accent-soft: var(--accent-soft);
}
.rl-etym {
    margin: 0.75rem 0 0.35rem;
    padding: 0.7rem 0.8rem;
    border-radius: 0.55rem;
    background: var(--surface);
}
.rl-parts {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.45rem;
}
.rl-part-story {
    flex: 1 1 100%;
    margin: 0.35rem 0 0;
}
.rl-word-visual {
    display: flex;
    flex-wrap: nowrap;
    align-items: baseline;
    gap: 0;
}
.rl-seg {
    position: relative;
    padding: 0;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
}
.rl-seg.pre { color: var(--rl-pre); border-color: color-mix(in srgb, var(--rl-pre) 45%, transparent); }
.rl-seg.root { color: var(--rl-root); border-color: color-mix(in srgb, var(--rl-root) 55%, transparent); }
.rl-seg.base { color: var(--rl-base); border-color: color-mix(in srgb, var(--rl-base) 45%, transparent); }
.rl-seg.suf { color: var(--rl-suf); border-color: color-mix(in srgb, var(--rl-suf) 45%, transparent); }
.rl-seg.glue { color: inherit; border-color: transparent; opacity: 1; font-weight: 700; }

.rl-derive-line {
    font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", system-ui, sans-serif;
    font-size: 0.98rem;
    line-height: 1.75;
    color: var(--rl-ink);
}
.rl-derive-line--story {
    display: block;
}
.rl-derive-line--story .rl-derive-label {
    display: inline;
    margin-right: 0.5em;
}
.rl-derive-line--story .rl-derive-text {
    display: inline;
    font-weight: 500;
    word-break: break-word;
}
.rl-derive-end {
    display: inline;
    padding: 0 0.28em;
    border: 1px solid #1d1d1f;
    border-radius: 0.28rem;
}
.dark .rl-derive-end {
    border-color: #f5f5f7;
}
.rl-derive-recall,
.root-match-recall {
    display: inline;
    margin: 0;
    padding: 0 0.2em;
    border: 0;
    border-radius: 0.28rem;
    background: var(--surface, #f5f5f7);
    color: transparent;
    font: inherit;
    line-height: inherit;
    cursor: pointer;
    filter: blur(6px);
    user-select: none;
    -webkit-user-select: none;
}
.rl-derive-recall.is-open,
.root-match-recall.is-open {
    color: inherit;
    background: transparent;
    filter: none;
    cursor: default;
}
.rl-derive-line--formula {
    display: block;
}
.rl-derive-line--formula .rl-derive-label {
    display: inline;
    margin-right: 0.5em;
}
.rl-derive-line--formula .rl-derive-pair,
.rl-derive-line--formula .rl-derive-op,
.rl-derive-line--formula .rl-derive-tip {
    display: inline;
    max-width: none;
}
.rl-derive-line--formula .rl-derive-pair .form,
.rl-derive-line--formula .rl-derive-pair .lab {
    display: inline;
    font-size: inherit;
}
.rl-derive-line--formula .rl-derive-pair .form {
    font-weight: 700;
}
.rl-derive-line--formula .rl-derive-pair .lab {
    margin-left: 0.15em;
    opacity: 0.92;
}
.rl-derive-line--formula .rl-derive-tip {
    font-weight: 600;
}
.rl-derive-line--formula .rl-derive-op {
    padding: 0 0.28em;
}
.rl-derive-label {
    flex: 0 0 auto;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--rl-muted);
    margin-right: 2px;
}
.rl-derive-op {
    color: var(--rl-muted);
    font-weight: 600;
    font-size: 1.05rem;
    user-select: none;
}
.rl-derive-pair {
    display: inline-flex;
    flex-direction: row;
    align-items: baseline;
    gap: 0.2em;
}
.rl-derive-pair .form {
    font-weight: 700;
    font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}
.rl-derive-pair .lab {
    color: var(--rl-muted);
    font-size: 0.88rem;
}
.rl-derive-pair.pre .form,
.rl-derive-pair.pre .lab { color: var(--rl-pre); }
.rl-derive-pair.root .form,
.rl-derive-pair.root .lab { color: var(--rl-root); }
.rl-derive-pair.base .form,
.rl-derive-pair.base .lab { color: var(--rl-base); }
.rl-derive-pair.suf .form,
.rl-derive-pair.suf .lab { color: var(--rl-suf); }
.rl-derive-pair.glue .form,
.rl-derive-pair.glue .lab { color: var(--rl-glue); }
.rl-derive-tip {
    color: var(--rl-ink);
    font-weight: 500;
    max-width: 28em;
}
.rl-derive-tip--sense {
    font-weight: 650;
}
.dark .rl-derive-tip { color: #e7eeec; }
.rl-detail-defs {
    margin: 0.55rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}
.rl-def-group {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}
.rl-def-pos {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.3;
}
.dark .rl-def-pos {
    background: transparent;
    color: #94a3b8;
}
.rl-def-chip {
    display: inline-flex;
    align-items: baseline;
    gap: 0.28rem;
    max-width: 100%;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: #1e293b;
    font-size: 0.875rem;
    line-height: 1.45;
}
.dark .rl-def-chip {
    background: transparent;
    color: #f1f5f9;
}
.rl-def-num {
    color: #94a3b8;
    font-weight: 600;
    flex: 0 0 auto;
}
.dark .rl-def-num {
    color: #64748b;
}
.rl-def-text {
    font-weight: 600;
    color: inherit;
}
.rl-part {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    padding: 0.4rem 0.55rem;
    border-radius: 0.55rem;
    background: rgba(0,0,0,0.04);
    min-width: 3rem;
}
.dark .rl-part { background: rgba(255,255,255,0.06); }
.rl-part-form { font-weight: 700; font-size: 0.875rem; }
.rl-part-gloss { font-size: 0.625rem; color: var(--ld-muted, #71717a); text-align: center; }
.rl-part-plus { align-self: center; color: var(--ld-muted, #71717a); font-weight: 600; }
.rl-part-eq {
    align-self: center;
    color: var(--ld-muted, #71717a);
    font-weight: 700;
    margin: 0 0.1rem;
}
.rl-part-story {
    align-self: center;
    font-size: 0.875rem;
    line-height: 1.45;
    max-width: min(100%, 28rem);
}
.rl-part--prefix { background: rgba(59, 130, 246, 0.1); }
.rl-part--root { background: rgba(0, 113, 227, 0.12); }
.rl-part--suffix { background: rgba(34, 197, 94, 0.1); }
.rl-detail-story {
    margin: 1rem 0 0;
    padding: 0.65rem 0.75rem;
    border-radius: 0.65rem;
    background: rgba(245, 158, 11, 0.1);
    font-size: 0.8125rem;
    line-height: 1.45;
}
.rl-detail-story span {
    display: inline-block;
    margin-right: 0.35rem;
    font-weight: 700;
    color: #d97706;
    font-size: 0.75rem;
}
.rl-detail-note {
    margin: 1rem 0 0;
    padding: 0.65rem 0.75rem;
    border-radius: 0.65rem;
    background: rgba(0, 113, 227, 0.08);
    font-size: 0.8125rem;
    line-height: 1.45;
}
.rl-detail-note span {
    display: inline-block;
    margin-right: 0.35rem;
    font-weight: 700;
    color: var(--ld-accent, #0071e3);
    font-size: 0.75rem;
}

.rl-exam {
    margin-top: 1.15rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(0,0,0,0.06);
}
.dark .rl-exam {
    border-top-color: #27272a;
}
.rl-exam-title {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.4;
}
.rl-exam-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 0 0 0.65rem;
}
.rl-exam-head .rl-lang-switch {
    margin-left: 0;
}
.rl-exam-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.7rem;
}
.rl-exam-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    max-width: 100%;
    padding: 0.3rem 0.55rem;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 999px;
    background: transparent;
    font-size: 0.75rem;
    line-height: 1.3;
    cursor: pointer;
    color: inherit;
    text-align: left;
}
.dark .rl-exam-tab {
    border-color: #3f3f46;
}
.rl-exam-tab.is-active {
    border-color: #0071e3;
    background: rgba(0, 113, 227, 0.1);
    color: #0071e3;
}
.rl-exam-tab-count {
    flex-shrink: 0;
    min-width: 1.1rem;
    padding: 0.05rem 0.35rem;
    border-radius: 999px;
    background: rgba(0,0,0,0.06);
    font-variant-numeric: tabular-nums;
    font-size: 0.6875rem;
}
.rl-exam-tab.is-active .rl-exam-tab-count {
    background: rgba(0, 113, 227, 0.18);
}
.dark .rl-exam-tab-count {
    background: rgba(255,255,255,0.08);
}
.rl-exam-list {
    min-height: 2rem;
}
.rl-exam-skeleton {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.rl-exam-skeleton-item {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 0.7rem 0.8rem;
    border-radius: 0.7rem;
    background: rgba(0, 0, 0, 0.03);
}
.dark .rl-exam-skeleton-item {
    background: rgba(255, 255, 255, 0.04);
}
.rl-exam-skeleton-bar {
    display: block;
    height: 0.7rem;
    border-radius: 999px;
    background: linear-gradient(
        90deg,
        rgba(15, 23, 42, 0.06) 0%,
        rgba(15, 23, 42, 0.12) 45%,
        rgba(15, 23, 42, 0.06) 100%
    );
    background-size: 200% 100%;
    animation: rl-exam-skeleton-shine 1.2s ease-in-out infinite;
}
.dark .rl-exam-skeleton-bar {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.06) 0%,
        rgba(255, 255, 255, 0.14) 45%,
        rgba(255, 255, 255, 0.06) 100%
    );
    background-size: 200% 100%;
}
.rl-exam-skeleton-bar--src { width: 28%; height: 0.55rem; }
.rl-exam-skeleton-bar--en { width: 92%; }
.rl-exam-skeleton-bar--en2 { width: 74%; }
.rl-exam-skeleton-bar--zh { width: 64%; height: 0.6rem; }
@keyframes rl-exam-skeleton-shine {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}
.rl-exam-item {
    margin: 0 0 0.75rem;
    padding: 0.7rem 0.8rem;
    border-radius: 0.7rem;
    background: rgba(0,0,0,0.03);
}
.dark .rl-exam-item {
    background: rgba(255,255,255,0.04);
}
.rl-exam-en {
    margin: 0.25rem 0 0;
    font-size: 0.9375rem;
    line-height: 1.55;
}
.rl-exam-zh {
    margin: 0.35rem 0 0;
    font-size: 0.8125rem;
    color: var(--ld-muted, #71717a);
    line-height: 1.45;
}

/* 真题评论区：隐藏英文 / 隐藏中文，点哪句显示哪句 */
body.rl-mask-zh .rl-exam.is-exam .rl-exam-zh:not(.is-revealed),
body.rl-mask-zh .rl-exam.is-exam .rl-exam-tab-zh:not(.is-revealed),
body.rl-mask-en .rl-exam.is-exam .rl-exam-en:not(.is-revealed) {
    cursor: pointer;
}
body.rl-mask-zh .rl-exam.is-exam .rl-exam-zh:not(.is-revealed),
body.rl-mask-zh .rl-exam.is-exam .rl-exam-tab-zh:not(.is-revealed) {
    color: transparent;
    text-shadow: 0 0 8px rgba(29, 29, 31, 0.55);
    filter: blur(5px);
    user-select: none;
    -webkit-user-select: none;
}
.dark body.rl-mask-zh .rl-exam.is-exam .rl-exam-zh:not(.is-revealed),
.dark body.rl-mask-zh .rl-exam.is-exam .rl-exam-tab-zh:not(.is-revealed) {
    text-shadow: 0 0 8px rgba(245, 245, 247, 0.45);
}
body.rl-mask-en .rl-exam.is-exam .rl-exam-en:not(.is-revealed) {
    color: transparent;
    text-shadow: 0 0 10px rgba(29, 29, 31, 0.55);
    filter: blur(6px);
    user-select: none;
    -webkit-user-select: none;
}
.dark body.rl-mask-en .rl-exam.is-exam .rl-exam-en:not(.is-revealed) {
    text-shadow: 0 0 10px rgba(245, 245, 247, 0.45);
}
.rl-exam-src {
    display: block;
    font-size: 0.6875rem;
    color: var(--ld-muted, #71717a);
}
.rl-ex-hl {
    color: var(--ld-accent, #0071e3);
    font-weight: 700;
}
.rl-exam-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 0.35rem;
}
.rl-exam-page-btn {
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 999px;
    background: rgba(0,0,0,0.06);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    color: inherit;
}
.dark .rl-exam-page-btn {
    background: rgba(255,255,255,0.08);
}
.rl-exam-page-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}
.rl-exam-page-info {
    font-size: 0.75rem;
    color: var(--ld-muted, #71717a);
    font-variant-numeric: tabular-nums;
    min-width: 3rem;
    text-align: center;
}
@media (max-width: 768px) {
    .rl-detail-top {
        display: block;
    }
}

/* 模态框：默认隐藏结构；仅手机端使用 */
.rl-modal[hidden] { display: none !important; }
.rl-modal {
    position: fixed;
    inset: 0;
    z-index: 7;
    display: none;
    align-items: stretch;
    justify-content: stretch;
    padding: 0;
}
.rl-modal-backdrop {
    position: absolute;
    inset: 0;
    background: #fff;
}
.dark .rl-modal-backdrop {
    background: #161618;
}
.rl-modal-panel {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    max-height: none;
    min-height: 100%;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    touch-action: pan-y;
}
.dark .rl-modal-panel {
    background: #161618;
    color: #f4f4f5;
}
.rl-modal-close {
    position: absolute;
    top: 0.65rem;
    right: 0.7rem;
    z-index: 2;
    border: 0;
    background: transparent;
    color: var(--ld-muted, #71717a);
    font-size: 1.1rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.35rem;
}
.rl-modal-nav {
    display: none;
}
.rl-modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-x: none;
    touch-action: pan-y;
    padding: 1.35rem 1.25rem 1rem;
}
.rl-modal-footer.rl-detail-footer {
    flex: 0 0 auto;
    padding: 0.55rem 0.85rem 0.35rem;
}
.rl-swipe-hint {
    display: none;
}
.rl-swipe-block-hint {
    display: none;
}
.rl-modal-index {
    font-size: 0.75rem;
    color: var(--ld-muted, #71717a);
    font-variant-numeric: tabular-nums;
}
.rl-modal-body .rl-detail-word {
    text-align: center;
}
.rl-modal-body .rl-detail-word.rl-word-visual {
    justify-content: center;
    flex-wrap: wrap;
}
.rl-modal-body .learning-word-row {
    justify-content: center;
}
.rl-modal-body .phonetic-row.rl-detail-phonetic-row,
.rl-modal-body .rl-detail-phonetic-row {
    justify-content: flex-start;
}
.rl-modal-body .rl-lang-switch {
    margin-left: auto;
}
.rl-modal-body .rl-detail-parts {
    justify-content: center;
}
.rl-modal-body .rl-derive-line {
    justify-content: center;
}
.rl-modal-body .rl-seg.pre { color: var(--rl-pre); border-color: color-mix(in srgb, var(--rl-pre) 45%, transparent); }
.rl-modal-body .rl-seg.root { color: var(--rl-root); border-color: color-mix(in srgb, var(--rl-root) 55%, transparent); }
.rl-modal-body .rl-seg.base { color: var(--rl-base); border-color: color-mix(in srgb, var(--rl-base) 45%, transparent); }
.rl-modal-body .rl-seg.suf { color: var(--rl-suf); border-color: color-mix(in srgb, var(--rl-suf) 45%, transparent); }
.rl-modal-body .rl-seg.glue { color: var(--rl-glue); }

@media (max-width: 768px) {
    .rl-page.ld-page,
    .rl-page--immersive.ld-page {
        height: 100dvh;
        max-height: 100dvh;
        overflow: hidden;
    }
    .rl-shell {
        grid-template-columns: minmax(0, 1fr);
    }
    .rl-main {
        grid-template-columns: minmax(0, 1fr);
    }
    .rl-split {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr;
    }
    .rl-pane--list {
        min-height: 0;
    }
    .rl-main > .rl-pane--detail {
        display: none !important;
    }
    .rl-modal:not([hidden]) {
        display: flex;
        align-items: stretch;
    }
    .rl-modal-panel {
        height: 100%;
        min-height: 100dvh;
        max-height: none;
        border-radius: 0;
        box-shadow: none;
    }
    .rl-swipe-hint {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.4rem;
        flex: 0 0 auto;
        margin: 0;
        padding: 0.2rem 0.75rem calc(0.5rem + env(safe-area-inset-bottom, 0px));
        font-size: 0.72rem;
        font-weight: 500;
        letter-spacing: 0.01em;
        line-height: 1.3;
        text-align: center;
        color: #86868b;
        background: #fff;
    }
    .dark .rl-swipe-hint {
        color: #8e8e93;
        background: #161618;
    }
    .rl-swipe-hint-arrow {
        font-size: 0.95rem;
        font-weight: 400;
        opacity: 0.75;
        line-height: 1;
    }
    .rl-swipe-block-hint {
        position: absolute;
        left: 50%;
        bottom: calc(5.75rem + env(safe-area-inset-bottom, 0px));
        z-index: 4;
        display: block;
        width: max-content;
        max-width: calc(100% - 2rem);
        margin: 0;
        padding: 0.55rem 0.85rem;
        border-radius: 0.75rem;
        background: rgba(29, 29, 31, 0.92);
        color: #fff;
        font-size: 0.8125rem;
        font-weight: 500;
        line-height: 1.4;
        text-align: center;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
        transform: translateX(-50%) translateY(8px);
        opacity: 0;
        pointer-events: none;
        visibility: hidden;
        transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    }
    .rl-swipe-block-hint.is-on {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(0);
    }
    .rl-modal-footer.is-nudge .rl-master-btn,
    .rl-modal-footer.is-nudge .rl-graduate-btn {
        animation: rl-master-nudge 0.55s ease;
    }
    @keyframes rl-master-nudge {
        0%, 100% { transform: scale(1); }
        35% { transform: scale(1.04); }
        70% { transform: scale(0.98); }
    }
    .rl-word-meaning { max-width: 40%; }
}

@media (min-width: 769px) {
    .rl-modal {
        display: none !important;
    }
}


.rl-master-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}
.dark .rl-master-bar {
    background: transparent;
    border: 0;
}
.rl-master-bar.is-done {
    background: transparent;
    border: 0;
}
.dark .rl-master-bar.is-done {
    background: transparent;
    border: 0;
}
.rl-master-bar--guest .rl-master-side {
    align-items: flex-start;
}
.rl-master-progress,
.rl-master-status,
.rl-master-hint {
    margin: 0;
    font-size: 0.75rem;
    color: var(--ld-muted, #71717a);
    line-height: 1.4;
}
.dark .rl-master-progress,
.dark .rl-master-status,
.dark .rl-master-hint {
    color: #a1a1aa;
}
.rl-master-status {
    color: var(--ld-muted, #71717a);
    font-weight: 500;
}
.dark .rl-master-status {
    color: #a1a1aa;
}
.rl-master-btn {
    flex-shrink: 0;
    border: 1px solid rgba(15, 23, 42, 0.16);
    border-radius: 0.4rem;
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ld-ink, #18181b);
    background: transparent;
    cursor: pointer;
}
.rl-master-btn:hover {
    background: rgba(0, 0, 0, 0.04);
}
.rl-master-btn:disabled {
    opacity: 0.55;
    cursor: wait;
}
.dark .rl-master-btn {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.2);
    color: #f4f4f5;
}
.dark .rl-master-btn:hover {
    background: rgba(255, 255, 255, 0.06);
}

.rl-master-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
    flex-shrink: 0;
}

.rl-graduate-btn {
    flex-shrink: 0;
    border: 1px solid rgba(15, 23, 42, 0.16);
    border-radius: 0.4rem;
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--ld-ink, #18181b);
    background: transparent;
    cursor: pointer;
}
.rl-graduate-btn:hover {
    background: rgba(0, 0, 0, 0.04);
}
.rl-graduate-btn:disabled {
    opacity: 0.55;
    cursor: wait;
}
.dark .rl-graduate-btn {
    border-color: rgba(255, 255, 255, 0.2);
    color: #f4f4f5;
}
.dark .rl-graduate-btn:hover {
    background: rgba(255, 255, 255, 0.06);
}
.rl-rejoin-btn {
    flex-shrink: 0;
    border: 1px solid rgba(15, 23, 42, 0.16);
    border-radius: 0.4rem;
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--ld-ink, #18181b);
    background: transparent;
    cursor: pointer;
}
.rl-rejoin-btn:hover {
    background: rgba(0, 0, 0, 0.04);
}
.rl-rejoin-btn:disabled {
    opacity: 0.55;
    cursor: wait;
}
.dark .rl-rejoin-btn {
    border-color: rgba(255, 255, 255, 0.2);
    color: #f4f4f5;
    background: transparent;
}
.dark .rl-rejoin-btn:hover {
    background: rgba(255, 255, 255, 0.06);
}
.rl-master-prior {
    margin: 0;
    width: 100%;
    font-size: 0.7rem;
    font-weight: 400;
    color: #86868b;
    text-align: right;
}
.dark .rl-master-prior {
    color: #a1a1a6;
}

/* 配对 / 拼写练习覆盖层 */
.rl-drill[hidden] {
    display: none !important;
}
.rl-drill {
    position: fixed;
    inset: 0;
    z-index: 8;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.rl-drill-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.48);
}
.rl-drill-panel {
    position: relative;
    z-index: 1;
    width: min(36rem, 100%);
    max-height: min(88vh, 40rem);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-radius: 1rem;
    background: var(--ld-panel, #fff);
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.22);
    padding: 0.85rem 1.1rem 1.15rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.rl-drill-panel::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}
.dark .rl-drill-panel {
    background: #1c1c1e;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
}
.rl-drill-host {
    flex: 1 1 auto;
    min-height: 0;
}
html.rl-drill-open,
html.rl-drill-open body {
    overflow: hidden;
}
/* 配对 / 单选：更深遮罩，尽量无滚动条 */
html.rl-match-lock .rl-drill-backdrop {
    background: rgba(8, 12, 24, 0.72);
    pointer-events: auto;
    cursor: default;
}
html.rl-match-lock .rl-drill {
    padding: 0.5rem;
}
html.rl-match-lock .rl-drill-panel {
    width: min(42rem, 100%);
    max-height: min(92dvh, 44rem);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 0.85rem 0.9rem 0.95rem;
}
html.rl-match-lock .rl-drill-host {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    display: flex;
    flex-direction: column;
}
html.rl-match-lock .root-match {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding-bottom: 0.35rem;
    margin: 0;
}
html.rl-match-lock .root-match--quiz {
    width: min(28rem, 100%);
    max-width: 28rem;
    margin-left: auto;
    margin-right: auto;
    align-self: center;
    overflow: auto;
}
html.rl-match-lock .root-match-head {
    margin-bottom: 0.55rem;
    flex: 0 0 auto;
}
html.rl-match-lock .root-match-title {
    font-size: 1.05rem;
}
html.rl-match-lock .root-match-sub {
    font-size: 0.8rem;
}
html.rl-match-lock .root-match-board {
    flex: 1 1 auto;
    min-height: 0;
    gap: 0.85rem;
    align-content: start;
}
html.rl-match-lock .root-match-col {
    gap: 0.4rem;
}
html.rl-match-lock .root-match-item {
    min-height: 2.55rem;
    padding: 0.55rem 0.7rem;
    font-size: 0.875rem;
    border-radius: 0.7rem;
}
html.rl-match-lock .root-match-foot {
    margin-top: 0.4rem;
    flex: 0 0 auto;
}
html.rl-match-lock .root-match-feedback {
    margin-top: 0.45rem;
    min-height: 1.15rem;
    font-size: 0.8125rem;
}
html.rl-match-lock .root-match--quiz .root-match-prompt {
    margin: 0.15rem 0 0.7rem;
    padding: 0.75rem 0.85rem;
}
html.rl-match-lock .root-match-prompt__word {
    font-size: clamp(1.35rem, 4.5vw, 1.75rem);
}
html.rl-match-lock .root-match-choices {
    gap: 0.4rem;
    flex: 1 1 auto;
    min-height: 0;
}
html.rl-match-lock .root-match-choice {
    min-height: 2.55rem;
    padding: 0.6rem 0.85rem;
    font-size: 0.9rem;
    border-radius: 0.7rem;
}
html.rl-match-lock .root-match-answer {
    margin-top: 0.55rem;
    padding: 0.7rem 0.85rem 0.8rem;
    flex: 0 0 auto;
}
html.rl-match-lock .root-match-answer__zh {
    font-size: 1rem;
}
html.rl-match-lock .root-match-answer__story {
    margin-top: 0.35rem;
    font-size: 0.8125rem;
    display: block;
    overflow: visible;
    -webkit-line-clamp: unset;
}
html.rl-match-lock .root-match-next {
    margin-top: 0.65rem;
    padding: 0.65rem 1rem;
}
@media (max-width: 768px) {
    .rl-drill-panel {
        width: 100%;
        max-height: 92vh;
        border-radius: 0.85rem;
    }
    html.rl-match-lock .rl-drill {
        padding: 0.35rem;
        align-items: stretch;
    }
    html.rl-match-lock .rl-drill-panel {
        width: 100%;
        max-height: none;
        height: calc(100dvh - 0.7rem);
        border-radius: 0.75rem;
    }
}

/* 拼写虚拟键盘升起时：练习卡片上移，避免被键盘挡住（仅手机） */
@media (max-width: 768px) {
    html.spell-vkb-open .rl-drill {
        align-items: flex-start;
        padding-top: 0.5rem;
        padding-bottom: calc(var(--spell-vkb-inset, 16rem) + 0.5rem);
    }
    html.spell-vkb-open .rl-drill-panel {
        max-height: calc(100vh - var(--spell-vkb-inset, 16rem) - 1.25rem);
        overflow: auto;
    }
}

.rl-day-cheer {
    position: fixed;
    left: 50%;
    top: 4.25rem;
    z-index: 8;
    max-width: calc(100% - 2rem);
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    background: var(--site-theme-color);
    color: var(--on-accent);
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    pointer-events: none;
    opacity: 0;
    transform: translateX(-50%) translateY(-0.35rem);
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.rl-day-cheer.is-show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.rl-drill-mode {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    align-self: flex-start;
    max-width: 100%;
}
.rl-drill-mode-label {
    flex: 0 0 auto;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--muted);
}
.rl-drill-mode-select {
    margin: 0;
    max-width: 8.5rem;
    padding: 0.2rem 1.4rem 0.2rem 0.45rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg);
    color: var(--fg);
    font: inherit;
    font-size: 0.75rem;
    line-height: 1.3;
}
.rl-drill-mode--panel {
    align-self: flex-end;
    margin: 0 0 0.45rem;
    position: relative;
    z-index: 2;
    flex: 0 0 auto;
}
.rl-root-cheer {
    position: fixed;
    inset: 0;
    z-index: 9;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(0, 0, 0, 0.45);
}
.rl-root-cheer[hidden] {
    display: none;
}
.rl-root-cheer-card {
    width: min(22rem, 100%);
    padding: 1.35rem 1.2rem 1.15rem;
    border-radius: 1rem;
    background: var(--bg);
    color: var(--fg);
    text-align: center;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
}
.rl-root-cheer-kicker {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--site-theme-color);
}
.rl-root-cheer-title {
    margin: 0.35rem 0 0;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.3;
}
.rl-root-cheer-text {
    margin: 0.55rem 0 0;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--muted);
}
.rl-root-cheer-btn {
    margin-top: 1rem;
    padding: 0.55rem 1.25rem;
    border: 0;
    border-radius: 999px;
    background: var(--site-theme-color);
    color: var(--on-accent);
    font: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
}

