:root {
    --bg: #fff7e8;
    --bg-alt: #edf6ff;
    --surface: #ffffff;
    --text: #223047;
    --muted: #62708a;
    --primary: #ffb347;
    --secondary: #4a90e2;
    --success: #7ed321;
    --danger: #ff6b6b;
    --reward: #ffd700;
    --radius-card: 5px;
    --radius-btn: 40px;
    --radius-modal: 32px;
    --shadow-soft: 0 12px 30px rgba(44, 71, 107, 0.16);
    --shadow-float: 0 20px 40px rgba(44, 71, 107, 0.24);
    --ui-density: 1;
    --ui-scale: 1;
    --page-max-width: 1280px;
}

body[data-theme="dark"] {
    --bg: #111a2e;
    --bg-alt: #1c2945;
    --surface: #1c2740;
    --text: #e9efff;
    --muted: #b6c2e0;
    --shadow-soft: 0 12px 30px rgba(0, 0, 0, 0.35);
    --shadow-float: 0 20px 40px rgba(0, 0, 0, 0.48);
}

html,
body {
    min-height: 100%;
    max-width: 100%;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    color: var(--text);
    font-family: "Comic Neue", "Microsoft YaHei", "PingFang SC", sans-serif;
    background: linear-gradient(180deg, var(--bg-alt) 0%, var(--bg) 45%, var(--bg) 100%);
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}

.container-soft {
    max-width: var(--page-max-width);
    width: 100%;
}

@media (min-width: 1200px) {
    :root {
        --ui-density: 0.88;
        --ui-scale: 0.88;
        --page-max-width: 1120px;
    }

    html {
        font-size: calc(16px * var(--ui-density));
    }
}

main {
    width: 100%;
    max-width: 100%;
    flex: 1 0 auto;
}

.readable-font {
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}

.hanzi-font {
    font-family: "STKaiti", "KaiTi", "Songti SC", serif;
}

.app-navbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.75);
    border-bottom: 1px solid rgba(74, 144, 226, 0.2);
}

body[data-theme="dark"] .app-navbar {
    background: rgba(17, 26, 46, 0.82);
    border-bottom-color: rgba(255, 255, 255, 0.12);
}

.brand-title {
    font-size: 1.45rem;
    line-height: 1;
    font-weight: 700;
}

.brand {
    color: var(--text);
    font-weight: 800;
    font-size: 1.45rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.brand:hover,
.brand:focus {
    color: var(--secondary);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.score-badge-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 36px;
    padding: 0.35rem 0.85rem 0.35rem 0.6rem;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(255, 218, 121, 0.95), rgba(255, 179, 71, 0.94));
    color: #7a4a00;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 10px 22px rgba(255, 179, 71, 0.22);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.score-badge-link:hover,
.score-badge-link:focus {
    color: #7a4a00;
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(255, 179, 71, 0.28);
}

.score-badge-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.62);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
}

.score-badge-text {
    white-space: nowrap;
}

.score-badge-value {
    min-width: 1.5rem;
    text-align: center;
}

.page-top-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    min-width: 0;
}

.home-user-menu {
    position: relative;
    min-width: min(100%, 15.5rem);
}

.home-user-trigger {
    width: 100%;
    min-height: 56px;
    padding: 0.55rem 0.8rem;
    border: 0;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 14px 28px rgba(44, 71, 107, 0.12);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    text-align: left;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.home-user-trigger:hover,
.home-user-trigger:focus {
    background: #fff;
    transform: translateY(-1px);
    box-shadow: 0 18px 32px rgba(44, 71, 107, 0.15);
}

.home-user-trigger-info {
    min-width: 0;
    flex: 1 1 auto;
}

.home-user-trigger-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
}

.home-user-trigger-label {
    font-weight: 800;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.home-user-trigger-tip {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.home-user-trigger-caret {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 157, 88, 0.14);
    color: var(--secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    transition: transform 0.18s ease, background 0.18s ease;
}

.home-user-trigger[aria-expanded="true"] .home-user-trigger-caret {
    transform: rotate(180deg);
    background: rgba(255, 157, 88, 0.2);
}

.home-user-panel-wrap {
    position: absolute;
    top: calc(100% + 0.6rem);
    right: 0;
    width: min(320px, calc(100vw - 2rem));
    z-index: 20;
}

.home-user-panel {
    display: grid;
    gap: 0.55rem;
    padding: 0.7rem;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 20px 38px rgba(44, 71, 107, 0.16);
    backdrop-filter: blur(10px);
}

.home-user-link {
    min-height: 54px;
    padding: 0.78rem 0.9rem;
    border-radius: 20px;
    background: rgba(255, 247, 239, 0.9);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.9rem;
    text-decoration: none;
    transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.home-user-link-button {
    width: 100%;
    border: 0;
    text-align: left;
    font: inherit;
}

.home-user-link:hover,
.home-user-link:focus {
    color: var(--text-main);
    background: #fff5ec;
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(255, 157, 88, 0.12);
}

.home-user-link.is-current {
    background: linear-gradient(135deg, rgba(255, 224, 196, 0.92), rgba(255, 244, 227, 0.96));
    box-shadow: 0 12px 24px rgba(255, 157, 88, 0.16);
}

.home-user-link.is-current .home-user-link-title,
.home-user-link.is-current .home-user-link-arrow {
    color: #b7661d;
}

.home-user-link-main {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1 1 auto;
}

.home-user-link-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.14rem;
}

.home-user-link-title {
    font-weight: 800;
    color: var(--text-main);
}

.home-user-link-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.home-user-panel-avatar {
    width: 42px;
    height: 42px;
}

.home-user-link-icon {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    background: rgba(255, 157, 88, 0.16);
    color: var(--secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex: 0 0 auto;
}

.home-user-link-icon.score {
    background: rgba(255, 210, 76, 0.22);
    color: #9a6500;
}

.home-user-link-icon.favorite {
    background: rgba(255, 107, 107, 0.16);
    color: #df4c4c;
}

.home-user-link-icon.logout {
    background: rgba(148, 163, 184, 0.16);
    color: #5b6473;
}

.home-user-link-arrow {
    color: rgba(44, 71, 107, 0.48);
    font-size: 1.05rem;
    flex: 0 0 auto;
}

.home-user-link-badge {
    flex: 0 0 auto;
    min-width: 2.2rem;
    padding: 0.38rem 0.62rem;
    border-radius: 999px;
    font-weight: 800;
}

.home-user-link-logout {
    background: rgba(244, 247, 251, 0.95);
}

.home-user-link-logout:hover,
.home-user-link-logout:focus {
    background: #eef3f8;
}

.profile-page .page-top-actions .user-info {
    display: none;
}

.top-home-btn {
    white-space: nowrap;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    overflow: hidden;
    flex: 0 0 auto;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-avatar-link {
    display: inline-flex;
    text-decoration: none;
    border-radius: 50%;
}

.user-avatar-link:hover .user-avatar,
.user-avatar-link:focus .user-avatar {
    box-shadow: 0 10px 22px rgba(44, 71, 107, 0.18);
    transform: translateY(-1px);
}

.nav-pill,
.theme-toggle,
.favorite-fab {
    border-radius: var(--radius-btn);
    min-height: 44px;
    min-width: 44px;
}

.theme-toggle {
    border: 0;
    background: linear-gradient(120deg, var(--secondary), #6fb6ff);
    color: #fff;
    padding: 0.55rem 1rem;
    font-weight: 700;
}

.favorite-fab {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 1040;
    border: 0;
    color: #fff;
    background: linear-gradient(125deg, var(--danger), #ff8a8a);
    box-shadow: var(--shadow-soft);
    padding: 0.75rem 1.15rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.favorite-fab:hover,
.favorite-fab:focus {
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--shadow-float);
    color: #fff;
}

.badge-soft {
    background: #fff;
    color: var(--danger);
    border-radius: 999px;
    padding: 0.1rem 0.5rem;
    font-size: 0.85rem;
}

.hero {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: linear-gradient(125deg, #ffd58b, #89c9ff 52%, #a9f0cb);
    box-shadow: var(--shadow-soft);
    padding: 2rem 1.25rem;
}

.hero::before,
.hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    opacity: 0.2;
    pointer-events: none;
}

.hero::before {
    width: 260px;
    height: 260px;
    top: -120px;
    left: -60px;
    background: #fff;
}

.hero::after {
    width: 260px;
    height: 260px;
    right: -80px;
    bottom: -120px;
    background: #fff4be;
}

.hero-title {
    position: relative;
    margin: 0;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
}

.hero-subtitle {
    position: relative;
    margin-top: 0.75rem;
    color: #18335c;
    font-size: 1.05rem;
}

.grade-bubbles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 1rem;
}

.grade-bubble {
    text-decoration: none;
    background: var(--surface);
    border-radius: 999px;
    min-height: 130px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-soft);
    color: var(--text);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.grade-bubble:hover,
.grade-bubble:focus {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-float);
    color: var(--text);
}

.grade-bubble .num {
    font-size: 2rem;
    font-weight: 800;
    color: var(--secondary);
}

.grade-bubble .name {
    font-size: 1rem;
    font-weight: 700;
}

.progress-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--success), #9be558);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 800;
    box-shadow: var(--shadow-soft);
}

.rounded-card {
    border-radius: var(--radius-card);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    border: 0;
}

.grade-page-top-panel-toggle {
    white-space: nowrap;
}

.grade-page-top-panel-body {
    overflow: hidden;
    max-height: 240px;
    opacity: 1;
    transition: max-height 0.24s ease, opacity 0.18s ease;
}

.grade-page-top-panel.is-collapsed .grade-page-top-panel-body {
    max-height: 0;
    opacity: 0;
    pointer-events: none;
}

.grade-tabs {
    display: flex;
    flex-wrap: nowrap;
    overflow: auto;
    gap: 0.5rem;
    scrollbar-width: thin;
}

.grade-tab {
    white-space: nowrap;
    text-decoration: none;
    color: var(--text);
    padding: 0.6rem 1.15rem;
    border-radius: 999px;
    background: #fff;
    font-weight: 700;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    position: relative;
}

.grade-tab.active {
    color: #fff;
    background: linear-gradient(120deg, var(--primary), #ffcc80);
}

.stat-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 40px;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    background: rgba(74, 144, 226, 0.12);
    color: var(--text);
    font-weight: 700;
}

.tools-row {
    display: grid;
    gap: 0.8rem;
    grid-template-columns: 1fr auto;
}

.search-input {
    border-radius: 999px;
    border: 1px solid rgba(74, 144, 226, 0.25);
    min-height: 44px;
    padding: 0.65rem 1rem;
    color: var(--text);
    background: #fff;
}

.hanzi-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hanzi-grid > .back-ground-list-loading,
.poetry-grid > .back-ground-list-loading {
    grid-column: 1 / -1;
}

.car-logo-grid > .back-ground-list-loading {
    grid-column: 1 / -1;
}

@media (min-width: 768px) {
    .hanzi-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {
    .hanzi-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

.hanzi-card {
    width: 100%;
    min-height: 160px;
    border-radius: var(--radius-card);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    border: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hanzi-card:hover,
.hanzi-card:focus {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-float);
}

.hanzi-card .big-char {
    font-size: 3rem;
    line-height: 1;
    color: var(--secondary);
}

#charListSection .hanzi-card,
#charFavoriteGrid .hanzi-card {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    min-height: 120px;
}

#charListSection .hanzi-card .big-char,
#charFavoriteGrid .hanzi-card .big-char {
    font-size: 2.25rem;
}

#charListSection .study-state-badge,
#charFavoriteGrid .study-state-badge {
    position: absolute;
    top: calc(9px * var(--ui-scale, 1));
    left: calc(12px * var(--ui-scale, 1));
    display: inline-flex;
    align-items: center;
    gap: calc(6px * var(--ui-scale, 1));
    padding: calc(3px * var(--ui-scale, 1)) calc(6px * var(--ui-scale, 1));
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    box-shadow: var(--shadow-soft);
    z-index: 3;
}

#charListSection .study-state-badge.learned,
#charFavoriteGrid .study-state-badge.learned {
    background: rgba(56, 178, 121, 0.16);
    color: #1f8a55;
}

#charListSection .study-state-badge.pending,
#charFavoriteGrid .study-state-badge.pending {
    background: rgba(148, 163, 184, 0.18);
    color: #6b7280;
}

.hanzi-card .hint {
    color: var(--muted);
    font-size: 0.95rem;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.favorite-icon-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 4;
    border: 2px solid rgba(225, 74, 74, 0.18);
    border-radius: 16px;
    width: 44px;
    height: 44px;
    background: rgba(255, 107, 107, 0.28);
    color: #d94b4b;
    box-shadow: 0 10px 20px rgba(255, 107, 107, 0.18);
    transition: transform 0.2s ease, color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

#charListSection .favorite-icon-btn,
#charFavoriteGrid .favorite-icon-btn {
    top: 9px;
    right: 9px;
    border-width: 1px;
    border-radius: 12px;
    width: 33px;
    height: 33px;
}

#charListSection .favorite-icon-btn i,
#charFavoriteGrid .favorite-icon-btn i {
    font-size: 0.82rem;
}

.favorite-icon-btn:hover,
.favorite-icon-btn:focus {
    transform: translateY(-2px) scale(1.03);
    background: rgba(255, 107, 107, 0.38);
    color: #c83d3d;
    box-shadow: 0 14px 26px rgba(255, 107, 107, 0.26);
}

.favorite-icon-btn.active {
    color: #fff;
    background: linear-gradient(135deg, #ff6b6b, #ff8756);
    border-color: rgba(255, 107, 107, 0.5);
    animation: heart-pop 0.35s ease;
}

@keyframes heart-pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.skeleton {
    border-radius: 14px;
    background: linear-gradient(90deg, rgba(200, 210, 226, 0.45), rgba(240, 245, 255, 0.9), rgba(200, 210, 226, 0.45));
    background-size: 240px 100%;
    animation: shimmer 1.2s infinite linear;
}

@keyframes shimmer {
    from { background-position: -240px 0; }
    to { background-position: calc(100% + 240px) 0; }
}

.modal-content {
    border: 0;
    border-radius: var(--radius-modal);
    overflow: hidden;
}

.modal-panel {
    background: var(--surface);
}

.detail-modal-dialog {
    max-width: min(640px, calc(100vw - 1.5rem));
    margin: 0.9rem auto;
}

.car-logo-detail-modal-dialog {
    max-width: min(704px, calc(100vw - 1.5rem));
}

.detail-modal-dialog .modal-content {
    max-height: calc(100vh - 1.8rem);
}

.detail-modal-compact .modal-header {
    padding: 1.2rem 1.2rem 0;
}

.detail-modal-compact .modal-body {
    padding: 0.85rem 1.2rem 1rem;
    overflow-y: auto;
}

.detail-modal-compact .modal-footer {
    padding: 0.85rem 1.2rem 1.1rem;
}

.detail-modal-compact .modal-action {
    min-height: 40px;
    font-size: 0.92rem;
}

.detail-modal-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 0.9rem;
}

.detail-modal-title {
    min-width: 0;
}

.detail-modal-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.35rem;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.detail-modal-compact .detail-modal-kicker {
    margin-bottom: 0.28rem;
    font-size: 0.66rem;
}

.detail-nav-strip {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.55rem;
    border-radius: 999px;
    background: linear-gradient(120deg, rgba(74, 144, 226, 0.1), rgba(255, 179, 71, 0.14));
    box-shadow: var(--shadow-soft);
}

.detail-modal-compact .detail-nav-strip {
    gap: 0.35rem;
    padding: 0.32rem 0.46rem;
}

.detail-nav-bottom {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

.detail-modal-compact .detail-nav-bottom {
    margin-top: 0.8rem;
}

.detail-nav-bottom .detail-nav-strip {
    justify-content: center;
}

.detail-modal-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.detail-footer-nav {
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-modal-footer .detail-nav-strip {
    margin: 0;
}

.detail-modal-footer-with-action {
    position: relative;
    justify-content: center;
    min-height: 44px;
}

.detail-modal-footer-with-action .detail-favorite-btn {
    position: absolute;
    left: 20px;
    top: 40%;
    transform: translateY(-50%);
}

.detail-nav-btn {
    width: 44px;
    height: 44px;
    border: 0;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--text);
    background: rgba(255, 255, 255, 0.94);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.detail-nav-btn:hover,
.detail-nav-btn:focus {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(44, 71, 107, 0.18);
    color: var(--secondary);
}

.detail-nav-btn:disabled {
    opacity: 0.45;
    box-shadow: none;
    transform: none;
}

.detail-modal-compact .detail-nav-btn {
    width: 38px;
    height: 38px;
}

.detail-nav-status {
    min-width: 120px;
    padding: 0 0.35rem;
    text-align: center;
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.detail-modal-compact .detail-nav-status {
    min-width: 104px;
    font-size: 0.78rem;
}

.modal-char {
    font-size: 6rem;
    line-height: 1;
    color: var(--secondary);
}

.detail-modal-compact .modal-char {
    font-size: 4.8rem;
}

.detail-char-pinyin {
    margin-bottom: 0.55rem;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #5f6f8f;
}

.detail-modal-compact .detail-char-pinyin {
    margin-bottom: 0.42rem;
    font-size: 1.02rem;
}

.detail-character-stage {
    position: relative;
    overflow: hidden;
    padding: 1.4rem 1.2rem 1.2rem;
    border-radius: var(--radius-card);
    background:
        radial-gradient(circle at top right, rgba(255, 236, 139, 0.72), transparent 36%),
        linear-gradient(135deg, rgba(255, 249, 235, 0.96), rgba(240, 247, 255, 0.96));
    border: 1px solid rgba(74, 144, 226, 0.12);
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.detail-modal-compact .detail-character-stage {
    padding: 1.1rem 0.96rem 0.96rem;
}

.detail-replay-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    border: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff;
    color: var(--text);
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.detail-replay-btn:hover,
.detail-replay-btn:focus {
    transform: translateY(-1px);
    box-shadow: var(--shadow-float);
    color: var(--text);
}

.detail-modal-compact .detail-replay-btn {
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
}

.detail-replay-btn:disabled {
    opacity: 0.55;
    box-shadow: none;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.detail-modal-compact .tag-list {
    gap: 0.38rem;
}

.tag-item {
    background: #eef6ff;
    border-radius: 999px;
    padding: 0.35rem 0.8rem;
}

.detail-modal-compact .tag-item {
    padding: 0.28rem 0.64rem;
}

.sentence-item {
    border-radius: 14px;
    background: #f4f8ff;
    padding: 0.6rem 0.8rem;
    margin-bottom: 0.5rem;
}

.detail-modal-compact .sentence-item {
    padding: 0.48rem 0.64rem;
    margin-bottom: 0.4rem;
}

.detail-section {
    border: 1px solid rgba(74, 144, 226, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.detail-modal-compact #detailContent .detail-section,
.detail-modal-compact #charDetailContent .detail-section {
    font-size: 1rem;
    line-height: 1.52;
}

.detail-section-title {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.75rem;
    font-weight: 800;
}

.detail-section-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.detail-section-title-row .detail-section-title {
    margin-bottom: 0;
}

.detail-replay-btn-inline {
    position: static;
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
}

.detail-modal-compact #detailContent .detail-section-title,
.detail-modal-compact #charDetailContent .detail-section-title {
    margin-bottom: 0.6rem;
    font-size: 1rem;
}

.detail-modal-compact #detailContent .tag-item,
.detail-modal-compact #detailContent .sentence-item,
.detail-modal-compact #detailContent .detail-section .text-muted,
.detail-modal-compact #charDetailContent .tag-item,
.detail-modal-compact #charDetailContent .sentence-item,
.detail-modal-compact #charDetailContent .detail-section .text-muted {
    font-size: 1rem;
}

.detail-character-stage.is-reading,
.poetry-detail-stage.is-reading,
.poetry-detail-title-wrap.is-reading,
.poetry-detail-title.is-reading,
.car-logo-detail-title.is-reading,
.detail-section.is-reading {
    transform: translateY(-2px);
    border-color: rgba(255, 159, 67, 0.36);
    box-shadow: 0 0 0 3px rgba(255, 159, 67, 0.15), var(--shadow-soft);
}

.highlight {
    color: #ff9a3d;
    font-weight: 800;
}

.modal-action {
    border-radius: var(--radius-btn);
    min-height: 44px;
    font-weight: 700;
}

.btn-action-primary {
    border: 0;
    color: #fff;
    background: linear-gradient(120deg, #ff5f57, #ff7f32);
    box-shadow: 0 12px 26px rgba(255, 95, 87, 0.26);
}

.btn-action-primary:hover,
.btn-action-primary:focus {
    color: #fff;
    transform: translateY(-1px);
}

.btn-action-success {
    border: 0;
    color: #fff;
    background: linear-gradient(120deg, var(--success), #97e34a);
}

@media (max-width: 767.98px) {
    .site-header .container-soft {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .site-header .brand {
        min-width: 0;
    }

    .grade-module-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .grade-module-view-switch {
        width: 100%;
        justify-content: flex-end;
    }

    .grade-module-actions-inline {
        width: auto;
        max-width: 100%;
        flex-wrap: nowrap;
        gap: 0.5rem;
    }

    .grade-module-actions-inline .grade-module-view-switch,
    .grade-module-actions-inline .quiz-submode-switch {
        width: auto;
        max-width: 100%;
        gap: 0.45rem;
        padding: 0.35rem;
    }

    .grade-module-actions-inline .quiz-switch-pill {
        min-height: 36px;
        padding: 0.42rem 0.45rem;
        font-size: 0.78rem;
        white-space: nowrap;
    }

    .page-top-actions {
        justify-content: flex-start;
        width: 100%;
        gap: 0.65rem;
    }

    .page-top-actions > * {
        max-width: 100%;
    }

    .page-top-actions > .user-info {
        width: 100%;
        min-width: 0;
        flex-wrap: wrap;
    }

    .page-top-actions > .btn,
    .page-top-actions > a.btn,
    .page-top-actions > button.btn {
        flex: 1 1 calc(50% - 0.325rem);
        justify-content: center;
        min-width: min(100%, 9.5rem);
    }

    .page-top-actions .score-badge-link {
        max-width: 100%;
    }

    .home-user-menu {
        width: 100%;
        min-width: 0;
    }

    .home-user-trigger {
        min-height: 52px;
        padding: 0.55rem 0.75rem;
    }

    .home-user-trigger-tip {
        font-size: 0.74rem;
    }

    .home-user-panel-wrap {
        position: static;
        width: 100%;
        margin-top: 0.65rem;
    }

    .home-user-panel {
        padding: 0.6rem;
        border-radius: 22px;
    }

    .home-user-link {
        min-height: 50px;
        padding: 0.72rem 0.8rem;
    }

    .home-user-link-title {
        font-size: 0.95rem;
    }

    .detail-modal-dialog {
        max-width: calc(100vw - 1rem);
        margin: 0.5rem auto;
    }

    .car-logo-detail-modal-dialog {
        max-width: calc(100vw - 1rem);
    }

    .detail-modal-dialog .modal-content {
        max-height: calc(100vh - 1rem);
    }

    .detail-modal-compact .modal-header {
        padding: 1rem 1rem 0;
    }

    .detail-modal-compact .modal-body {
        padding: 0.75rem 1rem 0.9rem;
    }

    .detail-modal-compact .modal-footer {
        padding: 0.75rem 1rem 1rem;
        gap: 0.55rem;
    }

    .detail-modal-header {
        grid-template-columns: 1fr auto;
    }

    .detail-nav-strip {
        grid-column: 1 / -1;
        justify-self: stretch;
        justify-content: center;
    }

    .detail-nav-status {
        flex: 1;
        min-width: 0;
    }

    .detail-modal-footer {
        justify-content: center;
    }

    .detail-modal-footer-with-action .detail-favorite-btn {
        position: static;
        transform: none;
    }

    .detail-footer-nav {
        width: 100%;
        order: 3;
    }

    .modal-char {
        font-size: 4.8rem;
    }

    .detail-char-pinyin {
        font-size: 1.02rem;
    }

    .detail-modal-compact .modal-char {
        font-size: 3.8rem;
    }
}

@media (max-width: 575.98px) {
    .page-top-actions > .btn,
    .page-top-actions > a.btn,
    .page-top-actions > button.btn {
        flex-basis: 100%;
    }
}

.load-more-btn {
    min-height: 44px;
    border-radius: var(--radius-btn);
    border: 0;
    color: #fff;
    background: linear-gradient(120deg, var(--secondary), #73b8ff);
    font-weight: 700;
}

.reward-toast {
    position: fixed;
    top: 84px;
    right: 18px;
    z-index: 1060;
    border-radius: 14px;
    background: linear-gradient(120deg, var(--reward), #ffec8b);
    color: #5c4600;
    padding: 0.65rem 0.9rem;
    box-shadow: var(--shadow-soft);
    display: none;
    font-weight: 700;
}

.empty-state {
    text-align: center;
    color: var(--muted);
    padding: 2rem 1rem;
}

.favorite-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.favorite-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.favorite-filter-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 1rem;
    border: 0;
    border-radius: 999px;
    background: rgba(74, 144, 226, 0.1);
    color: var(--text);
    font-weight: 700;
    box-shadow: none;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.favorite-filter-tab:hover,
.favorite-filter-tab:focus {
    transform: translateY(-1px);
    background: rgba(74, 144, 226, 0.16);
    color: var(--secondary);
}

.favorite-filter-tab.active {
    background: linear-gradient(120deg, var(--secondary), #73b8ff);
    color: #fff;
    box-shadow: var(--shadow-soft);
}

.favorite-filter-count {
    min-width: 30px;
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 800;
}

.favorite-pane-container {
    display: grid;
    gap: 1rem;
}

.favorite-pane {
    display: none;
    gap: 1rem;
}

.favorite-pane.active {
    display: grid;
}

.favorite-pane-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.favorite-list-grid {
    align-items: stretch;
}

.favorite-list-grid .hanzi-card {
    min-height: 190px;
}

.favorite-groups {
    display: grid;
    gap: 1.25rem;
}

.favorite-section {
    background: rgba(255, 255, 255, 0.6);
    border-radius: 28px;
    padding: 1.25rem;
    box-shadow: var(--shadow-soft);
    scroll-margin-top: 96px;
}

.favorite-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.favorite-section-eyebrow {
    color: var(--secondary);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.favorite-section-title {
    margin: 0.25rem 0 0.35rem;
    font-size: 1.55rem;
    font-weight: 800;
}

.favorite-section-desc {
    margin: 0;
    color: var(--muted);
}

.favorite-section-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
}

.favorite-section-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    min-height: 48px;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    background: linear-gradient(120deg, var(--primary), #ffd37e);
    color: #6a4300;
    font-weight: 800;
    box-shadow: var(--shadow-soft);
}

.favorite-jump-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.favorite-jump-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 1rem;
    border-radius: 999px;
    background: rgba(74, 144, 226, 0.12);
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
}

.favorite-jump-pill:hover,
.favorite-jump-pill:focus {
    color: var(--secondary);
}

.favorite-jump-count {
    min-width: 30px;
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #fff;
    box-shadow: var(--shadow-soft);
    font-size: 0.9rem;
}

.favorite-card {
    position: relative;
    min-height: 250px;
    padding: 1.5rem;
    border-radius: var(--radius-card);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.favorite-card:hover,
.favorite-card:focus {
    transform: translateY(-6px);
    box-shadow: var(--shadow-float);
}

.favorite-grade-badge {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    background: rgba(255, 179, 71, 0.2);
    color: #b86d00;
    font-weight: 700;
}

.favorite-char {
    font-size: 4rem;
    line-height: 1;
    color: var(--secondary);
    text-align: center;
}

.favorite-summary {
    color: var(--muted);
    min-height: 3rem;
}

.favorite-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pager-wrap {
    display: grid;
    gap: 1rem;
}

.pager-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 1rem;
    align-items: center;
}

.pager-side {
    display: flex;
    align-items: center;
    min-width: 0;
}

.pager-side-left {
    justify-content: flex-end;
}

.pager-side-right {
    justify-content: flex-start;
}

.pager-center {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: center;
    align-items: center;
    justify-self: center;
}

.pager-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-width: 46px;
    min-height: 46px;
    padding: 0.6rem 0.9rem;
    border-radius: 16px;
    border: 0;
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    box-shadow: var(--shadow-soft);
    font-weight: 700;
    font: inherit;
    line-height: inherit;
    cursor: pointer;
    appearance: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.pager-nav-btn {
    min-width: 110px;
}

.pager-btn:hover,
.pager-btn:focus {
    transform: translateY(-2px);
    box-shadow: var(--shadow-float);
    color: var(--secondary);
}

.pager-btn.current {
    color: #fff;
    background: linear-gradient(120deg, var(--secondary), #7ab9ff);
}

.pager-btn.ghost {
    box-shadow: none;
    background: transparent;
    color: var(--muted);
}

.pager-btn.disabled {
    pointer-events: none;
    color: rgba(98, 112, 138, 0.55);
    box-shadow: none;
    background: rgba(98, 112, 138, 0.08);
}

.app-footer {
    margin-top: auto !important;
    color: var(--muted);
    text-align: center;
    padding-bottom: 1rem;
    width: 100%;
    flex-shrink: 0;
}

.app-footer .container {
    display: flex;
    justify-content: center;
    max-width: 100%;
}

.app-footer-records {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    width: min(100%, 48rem);
}

.app-footer-record {
    display: block;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.9rem;
    line-height: 1.6;
}

.app-footer-link {
    color: inherit;
    text-decoration: none;
}

.app-footer-link:hover,
.app-footer-link:focus {
    color: var(--primary);
    text-decoration: underline;
}

.app-footer-text {
    color: inherit;
}

@media (max-width: 767.98px) {
    .app-footer {
        padding-bottom: 0.75rem;
    }

    .app-footer-record {
        font-size: 0.84rem;
    }

    .favorite-section {
        padding: 1rem;
    }

    .favorite-pane-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .favorite-section-header {
        flex-direction: column;
    }

    .favorite-section-tools {
        justify-content: flex-start;
    }

    .pager-layout {
        grid-template-columns: 1fr;
    }

    .pager-side,
    .pager-side-left,
    .pager-side-right {
        justify-content: center;
    }
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.section-eyebrow {
    color: var(--secondary);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.78rem;
}

.section-title {
    margin: 0.35rem 0 0;
    font-size: clamp(1.45rem, 2vw, 1.9rem);
    font-weight: 800;
}

.member-status-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1.3rem 1.5rem;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: var(--shadow-soft);
}

.member-status-banner.expired {
    background: rgba(255, 107, 107, 0.08);
}

.membership-entry-btn {
    background: #fff3bf;
    border-color: #fff3bf;
    color: #6b4b00;
}

.membership-entry-btn:hover,
.membership-entry-btn:focus,
.membership-entry-btn:active {
    background: #ffe69c;
    border-color: #ffe69c;
    color: #5a3f00;
}

.membership-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 44px;
    padding: 0.65rem 1rem;
    border: 0;
    border-radius: 999px;
    font-weight: 800;
    color: #fff;
    box-shadow: var(--shadow-soft);
}

.membership-badge.trial {
    background: linear-gradient(120deg, #ff8c42, #ffb347);
}

.membership-badge.vip {
    background: linear-gradient(120deg, #f2b400, #ffd700);
    color: #6b4b00;
}

.membership-badge.expired {
    background: linear-gradient(120deg, #9ea7b3, #737b85);
}

.membership-badge.warning {
    animation: pulse-badge 1.8s infinite;
}

.membership-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ff4f4f;
    box-shadow: 0 0 0 6px rgba(255, 79, 79, 0.15);
}

@keyframes pulse-badge {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-1px) scale(1.02); }
}

.membership-dropdown {
    min-width: 320px;
    border-radius: 22px;
}

.membership-dropdown-title {
    font-size: 1rem;
    font-weight: 800;
}

.membership-dropdown-subtitle {
    color: var(--muted);
    margin-top: 0.35rem;
    line-height: 1.5;
}

.membership-dropdown-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.member-hero-card {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 1fr);
    gap: 1rem;
    padding: 1.5rem;
    border-radius: 32px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.16), rgba(255, 140, 66, 0.18), rgba(74, 144, 226, 0.12));
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(14px);
}

.member-card-eyebrow {
    color: #b86d00;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.member-card-title {
    margin: 0.4rem 0 0.2rem;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 800;
}

.member-card-subtitle {
    font-size: 1.15rem;
    font-weight: 700;
}

.member-card-helper {
    color: var(--muted);
    max-width: 38rem;
}

.member-hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.member-hero-stat {
    padding: 1rem;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.76);
    box-shadow: var(--shadow-soft);
}

.member-hero-stat span {
    display: block;
    color: var(--muted);
    font-size: 0.88rem;
}

.member-hero-stat strong {
    display: block;
    margin-top: 0.35rem;
    font-size: 1.12rem;
    line-height: 1.5;
}

.member-hero-stat.highlight {
    background: linear-gradient(120deg, #ffefc2, #fff9e7);
}

.plan-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.plan-card {
    position: relative;
    border-radius: 28px;
    background: #fff;
    padding: 1.5rem;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.plan-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-float);
}

.plan-card.recommended {
    border: 2px solid rgba(255, 107, 53, 0.16);
}

.plan-card.compact {
    min-width: 250px;
    flex: 0 0 250px;
}

.plan-ribbon {
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    background: linear-gradient(120deg, #ff6b35, #ff8c42);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 800;
}

.plan-name {
    font-size: 1.3rem;
    font-weight: 800;
}

.plan-price {
    margin-top: 0.55rem;
    font-size: 3rem;
    line-height: 1;
    font-weight: 800;
}

.plan-price .currency {
    font-size: 1.4rem;
    vertical-align: top;
}

.plan-origin {
    margin-top: 0.45rem;
    color: var(--muted);
    text-decoration: line-through;
}

.plan-discount,
.plan-daily {
    margin-top: 0.55rem;
    color: #ff6b35;
    font-weight: 700;
}

.plan-feature-list {
    display: grid;
    gap: 0.55rem;
    margin-top: 1rem;
    color: var(--muted);
}

.support-grid {
    display: grid;
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.support-card {
    padding: 1.25rem;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: var(--shadow-soft);
    text-align: center;
}

.support-main-qr,
.support-mini-qr {
    width: 180px;
    max-width: 100%;
    border-radius: 22px;
    display: block;
    margin: 0 auto;
    background: #f7f7f7;
    padding: 0.5rem;
}

.support-mini-qr {
    width: 110px;
}

.support-title {
    font-size: 1.05rem;
    font-weight: 800;
}

.support-id,
.support-wechat-number {
    margin-top: 0.5rem;
    font-weight: 700;
}

.copy-text-trigger {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    user-select: all;
    transition: color 0.18s ease, opacity 0.18s ease;
}

.copy-text-trigger:hover,
.copy-text-trigger:focus {
    color: var(--secondary);
}

.copy-text-trigger:focus-visible {
    outline: 2px solid rgba(74, 144, 226, 0.28);
    outline-offset: 4px;
    border-radius: 12px;
}

.copy-success-bubble {
    position: fixed;
    z-index: 1080;
    display: none;
    padding: 0.42rem 0.72rem;
    border-radius: 999px;
    background: rgba(34, 48, 71, 0.94);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    pointer-events: none;
    box-shadow: var(--shadow-soft);
    opacity: 0;
    transform: translate(calc(-100% + 12px), calc(-100% - 4px)) scale(0.92);
    transition: opacity 0.16s ease, transform 0.16s ease;
}

.copy-success-bubble::after {
    content: "";
    position: absolute;
    right: 16px;
    bottom: -5px;
    width: 10px;
    height: 10px;
    background: rgba(34, 48, 71, 0.94);
    transform: rotate(45deg);
    border-radius: 2px;
}

.copy-success-bubble.is-visible {
    opacity: 1;
    transform: translate(calc(-100% + 12px), calc(-100% - 10px)) scale(1);
}

.support-worktime {
    color: var(--muted);
}

.faq-panel {
    display: grid;
    gap: 0.75rem;
}

.faq-panel details {
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.84);
    padding: 1rem 1.1rem;
    box-shadow: var(--shadow-soft);
}

.faq-panel summary {
    cursor: pointer;
    font-weight: 800;
}

.faq-panel p {
    margin: 0.8rem 0 0;
    color: var(--muted);
}

.membership-table thead th {
    color: var(--muted);
    font-weight: 700;
    border-bottom-width: 1px;
}

.membership-table tbody td {
    border-color: rgba(98, 112, 138, 0.12);
    vertical-align: middle;
}

.order-status {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-weight: 700;
}

.order-status.pending {
    background: rgba(255, 179, 71, 0.18);
    color: #b86d00;
}

.order-status.paid {
    background: rgba(126, 211, 33, 0.18);
    color: #548d00;
}

.order-status.closed {
    background: rgba(158, 158, 158, 0.18);
    color: #5d6772;
}

.payment-modal-panel {
    border: 0;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
}

.payment-layout {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(0, 1fr);
    gap: 1rem;
}

.payment-qr-panel,
.payment-support-panel {
    border-radius: 24px;
    background: rgba(244, 248, 255, 0.9);
    padding: 1.2rem;
}

.payment-method-switch {
    display: inline-flex;
    gap: 0.6rem;
    padding: 0.4rem;
    border-radius: 999px;
    background: rgba(74, 144, 226, 0.08);
}

.payment-method-btn {
    border: 0;
    border-radius: 999px;
    padding: 0.6rem 1rem;
    font-weight: 700;
    background: transparent;
    color: var(--muted);
}

.payment-method-btn.active {
    background: #fff;
    color: var(--text);
    box-shadow: var(--shadow-soft);
}

.payment-qr-skeleton {
    height: 240px;
    border-radius: 22px;
    background: linear-gradient(90deg, rgba(200, 210, 226, 0.45), rgba(240, 245, 255, 0.9), rgba(200, 210, 226, 0.45));
    background-size: 240px 100%;
    animation: shimmer 1.2s infinite linear;
}

.payment-qr-image {
    width: 100%;
    max-width: 240px;
    border-radius: 22px;
    display: block;
    margin: 0 auto;
    background: #fff;
    padding: 0.5rem;
    box-shadow: var(--shadow-soft);
}

.payment-plan-name {
    color: var(--muted);
}

.payment-plan-price {
    font-size: 2.4rem;
    line-height: 1;
    font-weight: 800;
    margin-top: 0.35rem;
}

.payment-order-no {
    margin-top: 0.75rem;
    color: var(--muted);
}

.paywall-hero {
    display: grid;
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    gap: 1rem;
    align-items: stretch;
}

.paywall-illustration,
.paywall-copy {
    border-radius: 30px;
    padding: 1.5rem;
    box-shadow: var(--shadow-soft);
    background: rgba(255, 255, 255, 0.88);
}

.paywall-illustration {
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, rgba(255, 140, 66, 0.2), rgba(255, 215, 0, 0.12), rgba(255, 255, 255, 0.85));
}

.floating-lock {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: linear-gradient(120deg, #ff8c42, #ffb347);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    box-shadow: var(--shadow-float);
    animation: floating-lock 4s ease-in-out infinite;
}

@keyframes floating-lock {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.paywall-title {
    margin: 0.35rem 0;
    font-size: clamp(1.9rem, 3vw, 2.6rem);
    font-weight: 800;
}

.paywall-subtitle {
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.7;
}

.paywall-benefits {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.benefit-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 20px;
    background: rgba(74, 144, 226, 0.08);
    font-weight: 700;
}

.benefit-card i {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: var(--secondary);
}

.plan-carousel {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.35rem;
    scroll-snap-type: x proximity;
}

.plan-carousel .plan-card {
    scroll-snap-align: start;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.admin-stat-card {
    padding: 1.2rem 1.3rem;
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.admin-stat-card span {
    display: block;
    color: var(--muted);
}

.admin-stat-card strong {
    display: block;
    margin-top: 0.45rem;
    font-size: 2rem;
}

.back-ground-entry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.1rem;
}

.back-ground-entry-card {
    --entry-bg:
        radial-gradient(circle at 15% 16%, rgba(255, 255, 255, 0.95), transparent 30%),
        linear-gradient(135deg, #eef6ff 0%, #f7fbff 52%, #fdf6ef 100%);
    --entry-illustration: none;
    --entry-accent: #5f8fd4;
    --entry-accent-soft: rgba(95, 143, 212, 0.12);
    --entry-accent-border: rgba(95, 143, 212, 0.24);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 236px;
    padding: 1.25rem;
    overflow: hidden;
    border-radius: 30px;
    border: 1px solid rgba(166, 191, 221, 0.34);
    background: rgba(255, 255, 255, 0.92);
    color: #223047;
    box-shadow: 0 16px 28px rgba(61, 93, 137, 0.14);
    isolation: isolate;
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.back-ground-entry-card::before,
.back-ground-entry-card::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.back-ground-entry-card::before {
    z-index: -3;
    background-image: var(--entry-illustration), var(--entry-bg);
    background-repeat: no-repeat, no-repeat;
    background-size: 60% auto, cover;
    background-position: right -12px top -6px, center;
    transform: scale(1.02);
    transition: transform 0.45s ease, filter 0.45s ease, opacity 0.24s ease;
}

.back-ground-entry-card::after {
    z-index: -2;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.82) 42%, rgba(255, 255, 255, 0.3) 100%),
        radial-gradient(circle at 84% 20%, rgba(255, 255, 255, 0.4), transparent 26%);
}

.back-ground-entry-card:hover,
.back-ground-entry-card:focus {
    transform: translateY(-5px);
    box-shadow: 0 20px 34px rgba(61, 93, 137, 0.18);
    border-color: rgba(120, 156, 201, 0.42);
    color: #223047;
}

.back-ground-entry-card:hover::before,
.back-ground-entry-card:focus::before {
    transform: scale(1.05);
    filter: saturate(1.03);
}

.back-ground-entry-card:focus-visible {
    outline: 0;
    box-shadow:
        0 0 0 3px rgba(126, 165, 213, 0.22),
        0 22px 36px rgba(61, 93, 137, 0.18);
}

.back-ground-entry-icon {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.74);
    color: var(--entry-accent);
    font-size: 1.45rem;
    border: 1px solid var(--entry-accent-border);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.back-ground-entry-top,
.back-ground-entry-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
}

.back-ground-entry-body {
    max-width: 15rem;
}

.back-ground-entry-chip {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid var(--entry-accent-border);
    color: var(--entry-accent);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.back-ground-entry-title {
    font-size: 1.28rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    color: #233047;
    text-shadow: none;
}

.back-ground-entry-desc {
    margin-top: 0.55rem;
    color: #61718a;
    line-height: 1.6;
}

.back-ground-entry-hint {
    color: #5e6f86;
    font-size: 0.88rem;
    font-weight: 700;
}

.back-ground-entry-arrow {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid var(--entry-accent-border);
    color: var(--entry-accent);
    transition: transform 0.24s ease, background 0.24s ease;
}

.back-ground-entry-card:hover .back-ground-entry-arrow,
.back-ground-entry-card:focus .back-ground-entry-arrow {
    transform: translateX(3px);
    background: rgba(255, 255, 255, 0.92);
}

.entry-theme-car {
    --entry-accent: #c7725e;
    --entry-accent-soft: rgba(199, 114, 94, 0.12);
    --entry-accent-border: rgba(199, 114, 94, 0.22);
    --entry-illustration: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 240'%3E%3Cg fill='none' stroke='%23d58a72' stroke-linecap='round' stroke-linejoin='round' opacity='.72'%3E%3Cpath d='M82 86h124c26 0 48 22 48 48s-22 48-48 48H82c-26 0-48-22-48-48s22-48 48-48z' stroke-width='10'/%3E%3Cpath d='M114 110h60c13 0 24 11 24 24s-11 24-24 24h-60c-13 0-24-11-24-24s11-24 24-24z' stroke-width='8'/%3E%3Cpath d='M70 134h36M214 134h36' stroke-width='8'/%3E%3Cpath d='M78 82l-18-18M238 82l18-18M78 186l-18 18M238 186l18 18' stroke-width='8' opacity='.55'/%3E%3C/g%3E%3C/svg%3E");
    --entry-bg:
        radial-gradient(circle at 18% 16%, rgba(255, 255, 255, 0.95), transparent 28%),
        radial-gradient(circle at 88% 26%, rgba(255, 212, 194, 0.65), transparent 24%),
        linear-gradient(135deg, #fff5ef 0%, #ffe9de 54%, #fff7f2 100%);
}

.entry-theme-game {
    --entry-accent: #6a7ed6;
    --entry-accent-soft: rgba(106, 126, 214, 0.12);
    --entry-accent-border: rgba(106, 126, 214, 0.22);
    --entry-illustration: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 240'%3E%3Cg opacity='.7'%3E%3Cpath d='M108 84h46c8 0 14 6 14 14v15c0 4 4 7 8 7h12c8 0 14 6 14 14v44c0 8-6 14-14 14h-44c-8 0-14-6-14-14v-11c0-5-4-8-8-8h-14c-8 0-14-6-14-14V98c0-8 6-14 14-14z' fill='none' stroke='%238395e7' stroke-width='10' stroke-linejoin='round'/%3E%3Cpath d='M206 92h48v48h-48z' fill='none' stroke='%23a2b0f4' stroke-width='10' rx='12'/%3E%3Cpath d='M72 148l38-24m0 0l38 24m-38-24v80' stroke='%236f83d8' stroke-width='10' stroke-linecap='round'/%3E%3C/g%3E%3C/svg%3E");
    --entry-bg:
        radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.96), transparent 28%),
        radial-gradient(circle at 86% 20%, rgba(208, 234, 255, 0.68), transparent 24%),
        linear-gradient(135deg, #f3f5ff 0%, #eaf1ff 52%, #f4fbff 100%);
}

.entry-theme-world {
    --entry-accent: #4b8ab5;
    --entry-accent-soft: rgba(75, 138, 181, 0.12);
    --entry-accent-border: rgba(75, 138, 181, 0.22);
    --entry-illustration: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 240'%3E%3Cg fill='none' stroke='%2362a5c8' stroke-width='8' opacity='.7'%3E%3Ccircle cx='210' cy='112' r='64'/%3E%3Cpath d='M146 112h128M210 48c22 17 35 39 35 64s-13 47-35 64M210 48c-22 17-35 39-35 64s13 47 35 64M170 74c12 7 26 10 40 10s28-3 40-10M170 150c12-7 26-10 40-10s28 3 40 10'/%3E%3Cpath d='M72 176c26-22 48-32 66-32 20 0 40 7 58 22' stroke='%238cc7dd' stroke-dasharray='10 12'/%3E%3Cpath d='M184 164l18 1-7 16' stroke='%238cc7dd' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/g%3E%3C/svg%3E");
    --entry-bg:
        radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.95), transparent 28%),
        radial-gradient(circle at 84% 24%, rgba(208, 241, 247, 0.78), transparent 22%),
        linear-gradient(135deg, #eefaff 0%, #e8f6ff 54%, #f5fbff 100%);
}

.entry-theme-china {
    --entry-accent: #4a9c8b;
    --entry-accent-soft: rgba(74, 156, 139, 0.12);
    --entry-accent-border: rgba(74, 156, 139, 0.22);
    --entry-illustration: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 240'%3E%3Cg fill='none' stroke='%2357a697' stroke-linecap='round' stroke-linejoin='round' opacity='.72'%3E%3Cpath d='M82 74l56-16 48 18 54-14 26 30-22 92-64 14-54-20-52 18-22-28 18-80z' stroke-width='8'/%3E%3Cpath d='M138 58l-12 120M186 76l-6 122M240 62l-12 122' stroke-width='6' opacity='.5'/%3E%3Cpath d='M170 96c16 0 28 12 28 27 0 18-21 38-28 45-7-7-28-27-28-45 0-15 12-27 28-27z' stroke-width='8'/%3E%3Ccircle cx='170' cy='123' r='10' stroke-width='6'/%3E%3C/g%3E%3C/svg%3E");
    --entry-bg:
        radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.95), transparent 30%),
        radial-gradient(circle at 88% 18%, rgba(225, 243, 214, 0.82), transparent 22%),
        linear-gradient(135deg, #f2fff8 0%, #e9f9f2 56%, #f9fff2 100%);
}

.entry-theme-community {
    --entry-accent: #ca7896;
    --entry-accent-soft: rgba(202, 120, 150, 0.12);
    --entry-accent-border: rgba(202, 120, 150, 0.22);
    --entry-illustration: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 240'%3E%3Cg fill='none' stroke='%23d48aa8' stroke-width='8' stroke-linejoin='round' opacity='.68'%3E%3Cpath d='M78 84h108c12 0 22 10 22 22v34c0 12-10 22-22 22h-46l-26 22v-22H78c-12 0-22-10-22-22v-34c0-12 10-22 22-22z'/%3E%3Cpath d='M188 64h76c10 0 18 8 18 18v24c0 10-8 18-18 18h-18l-18 16v-16h-40c-10 0-18-8-18-18' opacity='.78'/%3E%3C/g%3E%3C/svg%3E");
    --entry-bg:
        radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.96), transparent 28%),
        radial-gradient(circle at 88% 24%, rgba(255, 221, 232, 0.82), transparent 22%),
        linear-gradient(135deg, #fff5f9 0%, #ffeef5 52%, #f8f4ff 100%);
}

.entry-theme-feedback {
    --entry-accent: #6d98d6;
    --entry-accent-soft: rgba(109, 152, 214, 0.12);
    --entry-accent-border: rgba(109, 152, 214, 0.22);
    --entry-illustration: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 240'%3E%3Cg fill='none' stroke='%237ba8dc' stroke-width='8' stroke-linecap='round' stroke-linejoin='round' opacity='.72'%3E%3Cpath d='M78 72h150c24 0 44 20 44 44v20c0 24-20 44-44 44H158l-36 30v-30H78c-24 0-44-20-44-44v-20c0-24 20-44 44-44z'/%3E%3Cpath d='M98 116h98M98 142h72'/%3E%3Ccircle cx='238' cy='94' r='26' stroke='%2399bee8'/%3E%3Cpath d='M238 82v24M226 94h24' stroke='%2399bee8'/%3E%3C/g%3E%3C/svg%3E");
    --entry-bg:
        radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.96), transparent 28%),
        radial-gradient(circle at 88% 18%, rgba(216, 235, 255, 0.82), transparent 24%),
        linear-gradient(135deg, #f4f9ff 0%, #eef6ff 54%, #fff9f0 100%);
}

.entry-theme-admin {
    --entry-accent: #6e8db0;
    --entry-accent-soft: rgba(110, 141, 176, 0.12);
    --entry-accent-border: rgba(110, 141, 176, 0.22);
    --entry-illustration: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 240'%3E%3Cg fill='none' stroke='%237b96b6' stroke-width='8' stroke-linecap='round' stroke-linejoin='round' opacity='.7'%3E%3Cpath d='M84 170V98M136 170v-48M188 170V80M240 170v-66'/%3E%3Cpath d='M70 178h186'/%3E%3Cpath d='M92 66l54-18 46 12 44-16'/%3E%3Cpath d='M222 60l14-16 14 14'/%3E%3Crect x='58' y='48' width='214' height='144' rx='20' opacity='.45'/%3E%3C/g%3E%3C/svg%3E");
    --entry-bg:
        radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.95), transparent 28%),
        radial-gradient(circle at 86% 24%, rgba(223, 235, 246, 0.8), transparent 24%),
        linear-gradient(135deg, #f4f9ff 0%, #edf4fb 52%, #f7fbff 100%);
}

body[data-theme="dark"] .back-ground-entry-card {
    border-color: rgba(171, 191, 220, 0.18);
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.22);
}

@media (max-width: 640px) {
    .back-ground-entry-grid {
        grid-template-columns: 1fr;
    }

    .back-ground-entry-card {
        min-height: 214px;
        padding: 1.05rem;
        border-radius: 24px;
    }

    .back-ground-entry-card::before {
        background-size: 52% auto, cover;
        background-position: right -4px top 2px, center;
    }

    .back-ground-entry-body {
        max-width: none;
        padding-top: 0.5rem;
    }

    .back-ground-entry-title {
        font-size: 1.18rem;
    }

    .back-ground-entry-desc {
        font-size: 0.95rem;
    }
}

.back-ground-system-layout {
    display: grid;
    gap: 0;
    grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
    align-items: stretch;
    min-height: calc(100vh - 2rem);
}

.back-ground-sidebar {
    position: relative;
    top: auto;
    padding: 1.1rem;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
}

.back-ground-sidebar-title {
    font-size: 1.08rem;
    font-weight: 800;
    margin-bottom: 0.3rem;
}

.back-ground-sidebar-desc {
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.back-ground-menu {
    display: grid;
    gap: 1rem;
}

.back-ground-menu-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.9rem 1rem;
    border-radius: 20px;
    background: rgba(248, 250, 252, 0.9);
    color: var(--text);
    text-decoration: none;
    font-weight: 800;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.back-ground-menu-link:hover,
.back-ground-menu-link:focus {
    transform: translateY(-1px);
    box-shadow: var(--shadow-soft);
    color: var(--text);
}

.back-ground-menu-link.active {
    background: linear-gradient(120deg, rgba(255, 179, 71, 0.22), rgba(74, 144, 226, 0.18));
    box-shadow: var(--shadow-soft);
}

.back-ground-menu-link i {
    width: 22px;
    text-align: center;
    color: var(--secondary);
}

.back-ground-menu-group {
    display: grid;
    gap: 0.55rem;
}

.back-ground-menu-group-title {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 0 0.25rem;
}

.back-ground-menu-sublink {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.85rem 1rem;
    border-radius: 18px;
    background: rgba(248, 250, 252, 0.92);
    color: var(--text);
    text-decoration: none;
    font-weight: 800;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.back-ground-menu-sublink:hover,
.back-ground-menu-sublink:focus {
    transform: translateY(-1px);
    box-shadow: var(--shadow-soft);
    color: var(--text);
}

.back-ground-menu-sublink.active {
    background: linear-gradient(120deg, rgba(255, 179, 71, 0.22), rgba(74, 144, 226, 0.18));
    box-shadow: var(--shadow-soft);
}

.back-ground-menu-sublink i {
    width: 20px;
    text-align: center;
    color: var(--secondary);
}

.back-ground-main {
    min-width: 0;
    min-height: 100%;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 0;
}

.back-ground-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--shadow-soft);
}

.back-ground-topbar-title {
    margin: 0.2rem 0 0;
    font-size: 1.75rem;
    font-weight: 800;
}

.back-ground-topbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-left: auto;
}

.back-ground-sidebar-mobile-head {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0.85rem;
}

.back-ground-sidebar-backdrop {
    display: none;
}

.back-ground-user-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 54px;
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
    background: rgba(248, 250, 252, 0.94);
    box-shadow: var(--shadow-soft);
}

.back-ground-user-chip-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex: 0 0 auto;
}

.back-ground-user-chip-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.back-ground-user-chip-meta {
    display: grid;
    gap: 0.05rem;
}

.back-ground-user-chip-meta strong {
    font-size: 0.98rem;
}

.back-ground-user-chip-meta span {
    color: var(--muted);
    font-size: 0.86rem;
}

.back-ground-workspace {
    min-width: 0;
    min-height: 0;
    display: grid;
}

.back-ground-workspace-card {
    min-height: 100%;
    background: rgba(255, 255, 255, 0.88);
    border-radius: 30px;
    box-shadow: var(--shadow-soft);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
}

.back-ground-workspace-top {
    padding: 1.4rem 1.5rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.back-ground-workspace-bottom {
    min-height: 0;
    padding: 1.4rem 1.5rem;
    overflow: auto;
}

.back-ground-workspace-nav {
    padding: 1rem 1.5rem 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.back-ground-workspace-nav .grade-tab {
    min-height: 42px;
}

.back-ground-workspace-nav .grade-tab:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.back-ground-tab-pane {
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
}

.back-ground-edit-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.admin-filter-row {
    --bs-gutter-x: 0;
    --bs-gutter-y: 0;
}

.admin-filter-row > [class^="col-"],
.admin-filter-row > [class*=" col-"] {
    padding-left: 0;
    padding-right: 0;
}

.admin-filter-control,
.admin-action-btn {
    min-height: 44px;
    height: 44px;
    font-size: 1rem;
    font-weight: 700;
}

.admin-filter-control::placeholder {
    font-size: 1rem;
    font-weight: 700;
}

.admin-filter-row .form-label {
    margin-bottom: 0.45rem;
}

.admin-query-btn-wrap {
    display: flex;
    align-items: stretch;
    justify-content: flex-end;
}

.admin-query-btn {
    width: 60%;
}

.admin-question-op-btn {
    min-height: 34px;
    font-weight: 700;
}

.admin-edit-form .form-label {
    margin-bottom: 0.45rem;
}

.admin-edit-form .form-control,
.admin-edit-form .form-select {
    font-size: 0.95rem;
}

.back-ground-list-loading {
    min-height: 240px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    color: var(--muted);
}

.back-ground-content {
    min-width: 0;
    display: grid;
    gap: 1rem;
}

.back-ground-dashboard-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.back-ground-dashboard-card {
    padding: 1.2rem;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: var(--shadow-soft);
}

.back-ground-dashboard-card h3 {
    font-size: 1.05rem;
    font-weight: 800;
    margin-bottom: 0.45rem;
}

.back-ground-dashboard-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

body[data-theme="dark"] .back-ground-sidebar,
body[data-theme="dark"] .back-ground-dashboard-card,
body[data-theme="dark"] .back-ground-topbar,
body[data-theme="dark"] .back-ground-workspace-card {
    background: rgba(28, 39, 64, 0.92);
}

body[data-theme="dark"] .back-ground-menu-link {
    background: rgba(17, 29, 50, 0.86);
}

body[data-theme="dark"] .back-ground-menu-link.active {
    background: linear-gradient(120deg, rgba(255, 179, 71, 0.18), rgba(74, 144, 226, 0.18));
}

body[data-theme="dark"] .back-ground-menu-group-title,
body[data-theme="dark"] .back-ground-user-chip-meta span {
    color: rgba(220, 228, 241, 0.72);
}

body[data-theme="dark"] .back-ground-menu-sublink,
body[data-theme="dark"] .back-ground-user-chip {
    background: rgba(17, 29, 50, 0.86);
}

body[data-theme="dark"] .back-ground-menu-sublink.active {
    background: linear-gradient(120deg, rgba(255, 179, 71, 0.18), rgba(74, 144, 226, 0.18));
}

.back-ground-user-table th,
.back-ground-user-table td {
    vertical-align: middle;
}

.back-ground-user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    overflow: hidden;
}

.back-ground-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.back-ground-sidebar,
.back-ground-topbar,
.back-ground-workspace-card,
.back-ground-dashboard-card,
.back-ground-user-chip,
.back-ground-menu-link,
.back-ground-menu-sublink,
.admin-filter-control,
.admin-action-btn,
.admin-question-op-btn {
    border-radius: 0 !important;
}

.back-ground-sidebar,
.back-ground-topbar,
.back-ground-workspace-card,
.back-ground-dashboard-card {
    box-shadow: none;
}

.back-ground-sidebar {
    border-right: 1px solid rgba(148, 163, 184, 0.32);
}

.back-ground-topbar {
    border-bottom: 1px solid rgba(148, 163, 184, 0.28);
}

.back-ground-workspace-card {
    border: 1px solid rgba(148, 163, 184, 0.28);
}

.back-ground-workspace-top,
.back-ground-workspace-nav {
    border-bottom: 1px solid rgba(148, 163, 184, 0.28);
}

.back-ground-workspace-bottom {
    border-top: 0;
}

.back-ground-menu-link,
.back-ground-menu-sublink {
    border: 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.28);
    background: transparent;
    box-shadow: none;
}

.back-ground-menu-link:hover,
.back-ground-menu-link:focus,
.back-ground-menu-sublink:hover,
.back-ground-menu-sublink:focus {
    transform: none;
    box-shadow: none;
}

.back-ground-main .rounded-pill {
    border-radius: 0 !important;
}

.admin-user-query-form {
    max-width: 50%;
}

.search-result-card {
    padding: 1rem 1.1rem;
    border-radius: 20px;
    background: rgba(74, 144, 226, 0.08);
}

.quiz-view-switch-board {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.quiz-view-switch,
.quiz-submode-switch {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    padding: 0.45rem;
    border-radius: 999px;
    background: rgba(74, 144, 226, 0.09);
}

#poetryLearningViewSwitch,
#poetryPracticeModeSwitch {
    border-radius: 5px;
}

.quiz-switch-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border: 0;
    min-height: 44px;
    padding: 0.65rem 1.15rem;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.quiz-pill-status-icon {
    color: #1f8a55;
}

.quiz-switch-pill.active {
    background: #fff;
    color: var(--text);
    box-shadow: var(--shadow-soft);
}

.quiz-view-hint {
    color: var(--muted);
}

#poetryLearningSection .rounded-card,
#poetryLearningSection .poetry-card,
#poetryLearningSection .quiz-question-card,
#poetryLearningSection .poetry-reading-panel,
#poetryLearningSection .poetry-recorder-card,
#poetryLearningSection .poetry-reading-sidebar-item,
#poetryLearningSection .poetry-reading-sidebar-pager-btn,
#poetryDetailContent .rounded-card,
#poetryReadingDetailContent .rounded-card {
    border-radius: 5px;
}

.poetry-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 768px) {
    .poetry-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {
    .poetry-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.poetry-card {
    min-height: 200px;
    padding: 1.25rem;
    position: relative;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#poetryGrid .poetry-card,
#poetryFavoriteGrid .poetry-card {
    width: 100%;
    margin-left: 0;
    margin-right: auto;
    min-height: 110px;
    padding: 0.95rem;
}

#poetryGrid .poetry-favorite-icon-btn,
#poetryFavoriteGrid .poetry-favorite-icon-btn {
    top: 9px;
    right: 9px;
    border-width: 1px;
    border-radius: 12px;
    width: 33px;
    height: 33px;
    opacity: 1;
}

#poetryGrid .poetry-favorite-icon-btn i,
#poetryFavoriteGrid .poetry-favorite-icon-btn i {
    font-size: 0.82rem;
}

.poetry-card:hover,
.poetry-card:focus {
    transform: translateY(-8px) scale(1.01);
    box-shadow: var(--shadow-float);
}

.poetry-card-body {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding-top: 3.1rem;
}

#poetryGrid .poetry-card-body,
#poetryFavoriteGrid .poetry-card-body {
    padding-top: 2rem;
}

.poetry-card-pinyin {
    display: block;
    max-width: 100%;
    color: var(--muted);
    line-height: 1.35;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.poetry-card-title {
    display: block;
    font-size: clamp(1.7rem, 4vw, 2.4rem);
    line-height: 1.08;
    color: var(--secondary);
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

#poetryGrid .poetry-card-title,
#poetryFavoriteGrid .poetry-card-title {
    font-size: clamp(1.28rem, 3vw, 1.8rem);
}

.poetry-card-meta {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    color: var(--muted);
}

.poetry-card-meta-single {
    display: block;
}

.poetry-card-meta-text {
    display: block;
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.poetry-question-title {
    margin-top: 0.75rem;
    text-align: center;
    color: var(--muted);
    font-weight: 700;
}

.poetry-stem {
    font-size: clamp(1.45rem, 2.4vw, 2rem);
}

.poetry-stem.is-translation-question {
    font-size: clamp(1.45rem, 2.4vw, 2rem);
    line-height: 1.6;
    text-align: left;
    color: var(--text);
}

.poetry-detail-stage {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.poetry-detail-title-wrap {
    position: relative;
    display: inline-block;
    width: fit-content;
    max-width: 100%;
}

.poetry-detail-title {
    margin: 0;
    font-size: clamp(1.45rem, 2.4vw, 2rem);
    line-height: 1.2;
    text-align: center;
    display: block;
    max-width: 100%;
}

.poetry-detail-meta {
    position: absolute;
    left: calc(100% + 0.55rem);
    bottom: 0.12rem;
    white-space: nowrap;
    color: var(--muted);
    font-size: 1rem;
    text-align: right;
}

.poetry-section-stack {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.poetry-line-block {
    border-radius: 20px;
    padding: 0.1rem 0.72rem;
    background: rgba(255, 255, 255, 0.7);
}

body[data-theme="dark"] .poetry-line-block {
    background: rgba(17, 29, 50, 0.68);
}

.poetry-line-pinyin {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.35;
}

.poetry-line-text {
    margin-top: 0.18rem;
    color: var(--text);
    font-size: 1.08rem;
    line-height: 1.55;
}

.poetry-option-text {
    display: block;
    padding: 0 0.35rem;
    font-size: 1.05rem;
    line-height: 1.75;
}

.poetry-detail-modal-dialog {
    max-width: min(860px, calc(100vw - 1.5rem));
}

.poetry-reading-layout {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
    align-items: stretch;
}

@media (min-width: 992px) {
    .poetry-reading-layout {
        grid-template-columns: minmax(220px, 280px) minmax(0, 1.35fr) minmax(240px, 320px);
    }
}

.poetry-reading-panel {
    min-height: 420px;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    border-radius: var(--radius-card);
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(74, 144, 226, 0.12);
    box-shadow: var(--shadow-soft);
}

body[data-theme="dark"] .poetry-reading-panel {
    background: rgba(17, 29, 50, 0.74);
    border-color: rgba(129, 184, 255, 0.16);
}

.poetry-reading-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.poetry-reading-panel-title {
    font-size: 1.05rem;
    font-weight: 800;
}

.poetry-reading-panel-subtitle {
    color: var(--muted);
    line-height: 1.55;
}

.poetry-reading-panel-empty {
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--muted);
    padding: 1rem;
    border-radius: 18px;
    border: 1px dashed rgba(74, 144, 226, 0.22);
    background: rgba(74, 144, 226, 0.04);
}

body[data-theme="dark"] .poetry-reading-panel-empty {
    background: rgba(129, 184, 255, 0.05);
    border-color: rgba(129, 184, 255, 0.18);
}

.poetry-reading-sidebar-list,
.poetry-reading-record-list {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    gap: 0.75rem;
    min-height: 0;
    overflow-y: auto;
    padding-right: 0.2rem;
}

.poetry-reading-sidebar-list {
    max-height: none;
}

.poetry-reading-record-list {
    max-height: none;
}

.poetry-reading-sidebar-item {
    width: 100%;
    border: 1px solid rgba(74, 144, 226, 0.12);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.9);
    text-align: left;
    padding: 0.9rem 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.poetry-reading-sidebar-item:hover,
.poetry-reading-sidebar-item:focus {
    transform: translateY(-1px);
    box-shadow: var(--shadow-soft);
    border-color: rgba(74, 144, 226, 0.24);
}

.poetry-reading-sidebar-item.active {
    border-color: rgba(255, 122, 0, 0.28);
    background: linear-gradient(135deg, rgba(255, 248, 236, 0.98), rgba(240, 247, 255, 0.98));
    box-shadow: 0 14px 30px rgba(255, 122, 0, 0.12);
}

body[data-theme="dark"] .poetry-reading-sidebar-item {
    background: rgba(10, 20, 38, 0.88);
    border-color: rgba(129, 184, 255, 0.14);
}

body[data-theme="dark"] .poetry-reading-sidebar-item.active {
    background: linear-gradient(135deg, rgba(72, 48, 18, 0.9), rgba(17, 29, 50, 0.95));
}

.poetry-reading-sidebar-name {
    color: var(--text);
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.4;
}

.poetry-reading-sidebar-meta-row {
    margin-top: 0.38rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.poetry-reading-sidebar-meta {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.5;
    flex: 1 1 auto;
    min-width: 0;
}

.poetry-reading-uploaded-flag {
    margin-top: 0;
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    width: fit-content;
    padding: 0.22rem 0.58rem;
    border-radius: 999px;
    line-height: 1;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.poetry-reading-uploaded-flag::before {
    content: "";
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: currentColor;
    flex: 0 0 auto;
}

.poetry-reading-uploaded-flag.uploaded {
    color: #1f8a55;
    background: rgba(31, 138, 85, 0.12);
}

.poetry-reading-uploaded-flag.pending {
    color: #7e8798;
    background: rgba(126, 135, 152, 0.12);
}

.poetry-reading-sidebar-pager {
    margin-top: 0.9rem;
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.poetry-reading-sidebar-pager-btn {
    border: 1px solid rgba(74, 144, 226, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--text);
    padding: 0.42rem 0.9rem;
    font-size: 0.88rem;
    font-weight: 700;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.poetry-reading-sidebar-pager-btn:hover,
.poetry-reading-sidebar-pager-btn:focus {
    background: rgba(240, 247, 255, 0.96);
    border-color: rgba(74, 144, 226, 0.26);
    transform: translateY(-1px);
}

.poetry-reading-sidebar-pager-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

body[data-theme="dark"] .poetry-reading-uploaded-flag.uploaded {
    background: rgba(77, 198, 132, 0.16);
}

body[data-theme="dark"] .poetry-reading-uploaded-flag.pending {
    background: rgba(126, 135, 152, 0.16);
}

body[data-theme="dark"] .poetry-reading-sidebar-pager-btn {
    background: rgba(10, 20, 38, 0.88);
    border-color: rgba(129, 184, 255, 0.16);
}

body[data-theme="dark"] .poetry-reading-sidebar-pager-btn:hover,
body[data-theme="dark"] .poetry-reading-sidebar-pager-btn:focus {
    background: rgba(17, 29, 50, 0.96);
    border-color: rgba(129, 184, 255, 0.3);
}

#poetryReadingMainContent {
    flex: 1 1 auto;
}

.poetry-reading-main,
.poetry-reading-history {
    min-height: 580px;
}

#poetryReadingDetailContent .detail-section {
    font-size: 1rem;
    line-height: 1.72;
}

#poetryReadingDetailContent .detail-section-title {
    font-size: 0.9rem;
}

.poetry-reading-detail-head {
    display: flex;
    justify-content: center;
    padding: 0.1rem 0 1rem;
}

.poetry-reading-detail-title-wrap {
    position: relative;
    display: inline-block;
    width: fit-content;
    max-width: 100%;
}

.poetry-reading-detail-title {
    margin: 0;
    text-align: center;
    display: block;
    max-width: 100%;
}

.poetry-reading-detail-meta {
    position: absolute;
    left: calc(100% + 0.55rem);
    bottom: 0.12rem;
    white-space: nowrap;
    color: var(--muted);
    font-size: 0.96rem;
    line-height: 1.55;
}

#poetryDetailContent,
#poetryReadingDetailContent {
    overflow-x: hidden;
}

.poetry-title-marquee-text {
    display: inline-block;
    max-width: 100%;
}

@keyframes poetryTitleMarqueeShift {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(calc(-1 * var(--poetry-marquee-distance, 0px)));
    }
}

.poetry-recorder-card {
    border: 1px solid rgba(74, 144, 226, 0.12);
    background:
        radial-gradient(circle at top right, rgba(255, 236, 139, 0.32), transparent 36%),
        linear-gradient(135deg, rgba(255, 249, 235, 0.96), rgba(244, 249, 255, 0.96));
}

body[data-theme="dark"] .poetry-recorder-card {
    background:
        radial-gradient(circle at top right, rgba(255, 195, 93, 0.18), transparent 34%),
        linear-gradient(135deg, rgba(34, 40, 58, 0.95), rgba(17, 29, 50, 0.95));
    border-color: rgba(129, 184, 255, 0.16);
}

.poetry-recorder-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: nowrap;
}

.poetry-recording-timer {
    min-width: 94px;
    padding: 0.58rem 0.85rem;
    border-radius: 999px;
    border: 0;
    background: rgba(255, 255, 255, 0.95);
    color: var(--text);
    text-align: center;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    box-shadow: var(--shadow-soft);
}

.poetry-recording-timer.is-playback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    letter-spacing: normal;
}

.poetry-recording-timer:disabled {
    opacity: 0.6;
}

body[data-theme="dark"] .poetry-recording-timer {
    background: rgba(8, 16, 30, 0.92);
}

.poetry-recording-warning {
    margin-top: 1rem;
    padding: 0.9rem 1rem;
    border-radius: 16px;
    background: rgba(255, 159, 67, 0.12);
    color: #a45a12;
}

body[data-theme="dark"] .poetry-recording-warning {
    color: #ffcc8a;
    background: rgba(255, 159, 67, 0.14);
}

.poetry-recording-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.poetry-recording-preview {
    display: none !important;
}

body[data-theme="dark"] .poetry-recording-preview {
    display: none !important;
}

.poetry-recording-preview-label {
    margin-bottom: 0.5rem;
    color: var(--muted);
    font-weight: 700;
}

.poetry-recording-status.success {
    color: #1f8a55;
}

.poetry-recording-status.error {
    color: #d9534f;
}

.poetry-reading-record-item {
    border: 1px solid rgba(74, 144, 226, 0.12);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.95rem 1rem;
}

body[data-theme="dark"] .poetry-reading-record-item {
    background: rgba(10, 20, 38, 0.88);
    border-color: rgba(129, 184, 255, 0.14);
}

.poetry-reading-record-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.poetry-reading-record-user-wrap {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    min-width: 0;
}

.poetry-reading-record-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex: 0 0 auto;
}

.poetry-reading-record-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.poetry-reading-record-user {
    color: var(--text);
    font-size: 1rem;
    font-weight: 800;
}

.poetry-reading-record-meta {
    margin-top: 0.38rem;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.48;
}

.poetry-reading-record-audio {
    display: none;
}

.profile-preview-card {
    background:
        radial-gradient(circle at top right, rgba(255, 236, 139, 0.36), transparent 36%),
        linear-gradient(135deg, rgba(255, 249, 235, 0.96), rgba(244, 249, 255, 0.96));
}

@media (min-width: 992px) {
    .profile-form-col {
        width: 53.333333%;
        max-width: 53.333333%;
        flex: 0 0 auto;
    }
}

@media (min-width: 1200px) {
    .profile-form-col {
        width: 46.666667%;
        max-width: 46.666667%;
    }
}

body[data-theme="dark"] .profile-preview-card {
    background:
        radial-gradient(circle at top right, rgba(255, 195, 93, 0.18), transparent 34%),
        linear-gradient(135deg, rgba(34, 40, 58, 0.95), rgba(17, 29, 50, 0.95));
}

.profile-avatar-trigger {
    border: 0;
    padding: 0;
    background: transparent;
    border-radius: 50%;
}

.profile-avatar-trigger:hover .profile-avatar-preview,
.profile-avatar-trigger:focus .profile-avatar-preview {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 14px 28px rgba(44, 71, 107, 0.18);
}

.profile-avatar-preview {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.profile-avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#profileForm input[readonly] {
    background: rgba(255, 255, 255, 0.86);
    color: var(--muted);
}

.poetry-record-play-btn {
    border: 0;
    min-width: 94px;
    min-height: 42px;
    padding: 0.6rem 0.9rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    background: rgba(74, 144, 226, 0.12);
    color: var(--text);
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.poetry-record-play-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    align-self: center;
    flex-shrink: 0;
}

.poetry-record-duration {
    min-width: 48px;
    color: var(--muted);
    font-size: 0.95rem;
    font-weight: 700;
    text-align: right;
}

.poetry-record-play-btn:hover,
.poetry-record-play-btn:focus {
    transform: translateY(-1px);
    box-shadow: var(--shadow-soft);
}

.poetry-record-play-btn.is-playing {
    color: #fff;
    background: linear-gradient(120deg, var(--secondary), #73b8ff);
    box-shadow: var(--shadow-soft);
}

.poetry-record-play-btn:disabled {
    opacity: 0.55;
    box-shadow: none;
    transform: none;
}

.quiz-shell {
    min-height: 430px;
}

.quiz-topbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.grade-module-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-left: auto;
}

.grade-module-actions .quiz-submode-switch {
    margin-top: 0;
}

.grade-module-actions-inline {
    flex-wrap: nowrap;
}

.grade-module-actions-inline .grade-module-view-switch,
.grade-module-actions-inline .quiz-submode-switch {
    flex-wrap: nowrap;
    white-space: nowrap;
}

.grade-module-view-switch {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.65rem;
}

.grade-module-return-card {
    min-height: 88px;
    padding: 1rem 1.15rem;
}

.grade-module-return-card .back-ground-entry-body {
    display: grid;
    gap: 0.35rem;
}

.grade-module-return-card .back-ground-entry-top {
    margin-bottom: 0.75rem;
}

.grade-module-return-card .back-ground-entry-title {
    font-size: 1.05rem;
}

.grade-module-return-card .back-ground-entry-desc {
    line-height: 1.6;
}

.grade-module-return-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.8rem;
}

.grade-module-grid-return {
    grid-column: 1 / -1;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    min-height: 100%;
}

.grade-module-return-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 40px;
    padding: 0.5rem 0.95rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(124, 153, 198, 0.34);
    box-shadow: 0 10px 18px rgba(61, 93, 137, 0.12);
    color: #35567c;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
}

.grade-module-return-btn:hover,
.grade-module-return-btn:focus {
    color: #223047;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 12px 20px rgba(61, 93, 137, 0.16);
}

.feedback-shared-return-btn {
    min-height: 54px;
    padding: 0.8rem 2rem;
    font-size: 1.05rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    line-height: 1;
    white-space: nowrap;
    box-shadow: 0 16px 28px rgba(74, 144, 226, 0.2);
}

.feedback-shared-return-btn i {
    line-height: 1;
}

.feedback-shared-return-btn:hover,
.feedback-shared-return-btn:focus {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 18px 30px rgba(74, 144, 226, 0.24);
}

.quiz-kicker {
    color: var(--secondary);
    font-weight: 800;
    letter-spacing: 0.02em;
}

.quiz-title {
    font-size: clamp(1.45rem, 2.4vw, 2rem);
    font-weight: 800;
}

#gradeQuizSection .quiz-title,
#poetryLearningSection .quiz-title,
#gradePkSection .quiz-title {
    font-size: 1.45rem;
    line-height: 1.2;
}

.quiz-stat-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.quiz-submode-switch {
    margin-top: 1rem;
}

.quiz-panel-state {
    min-height: 270px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    text-align: center;
    color: var(--muted);
}

.quiz-loading-dot {
    width: 66px;
    height: 66px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #fff, rgba(255, 255, 255, 0.3)), linear-gradient(130deg, var(--primary), var(--secondary));
    box-shadow: var(--shadow-soft);
    animation: quizBounce 1s ease-in-out infinite;
}

@keyframes quizBounce {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.quiz-empty-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #fff;
    background: linear-gradient(130deg, var(--primary), #ffcf7a);
    box-shadow: var(--shadow-soft);
}

.quiz-question-card {
    margin-top: 1.25rem;
    padding: 1.5rem;
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(255, 243, 221, 0.95), rgba(237, 246, 255, 0.95));
}

body[data-theme="dark"] .quiz-question-card {
    background: linear-gradient(180deg, rgba(42, 54, 86, 0.95), rgba(24, 39, 67, 0.95));
}

.quiz-question-label {
    color: var(--muted);
    font-weight: 700;
}

.quiz-stem {
    margin-top: 0.85rem;
    font-size: clamp(2.25rem, 2.4vw, 2rem);
    line-height: 1.6;
    text-align: center;
    color: var(--secondary);
    font-weight:800;
}

.quiz-feedback {
    margin-top: 1rem;
    padding: 0.9rem 1rem;
    border-radius: 20px;
    font-size: 1rem;
    line-height: 1.7;
    font-weight: 700;
}

.quiz-feedback.success {
    background: rgba(126, 211, 33, 0.16);
    color: #2d7c10;
}

.quiz-feedback.error {
    background: rgba(255, 107, 107, 0.14);
    color: #c93d3d;
}

.quiz-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
    margin-top: 1.2rem;
}

.quiz-option-btn {
    border: 0;
    border-radius: 24px;
    min-height: 88px;
    background: #fff;
    box-shadow: var(--shadow-soft);
    color: var(--text);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.quiz-option-btn:hover,
.quiz-option-btn:focus {
    transform: translateY(-3px);
    box-shadow: var(--shadow-float);
}

.quiz-option-btn:disabled {
    cursor: default;
    opacity: 1;
}

.quiz-option-btn.is-correct {
    background: linear-gradient(140deg, rgba(126, 211, 33, 0.28), rgba(190, 242, 100, 0.48));
}

.quiz-option-btn.is-wrong {
    background: linear-gradient(140deg, rgba(255, 107, 107, 0.22), rgba(255, 193, 193, 0.44));
}

.quiz-option-char {
    font-size: 2.25rem;
    line-height: 1;
}

.quiz-action-btn {
    min-height: 42px;
    font-weight: 700;
    border: 1px solid #4a90e2;
    color: #2d6cbc;
    background: #fff;
    transition: color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.quiz-action-btn:hover,
.quiz-action-btn:focus {
    color: #2d6cbc;
    border-color: #3f7fd0;
    background: rgba(74, 144, 226, 0.06);
    box-shadow: 0 6px 14px rgba(74, 144, 226, 0.14);
}

.quiz-clear-btn:disabled {
    border-color: #c3cad4;
    color: #9aa4b2;
    background: #fff;
    opacity: 1;
    box-shadow: none;
    cursor: not-allowed;
}

body[data-theme="dark"] .quiz-action-btn {
    background: rgba(17, 29, 50, 0.74);
}

body[data-theme="dark"] .quiz-action-btn:hover,
body[data-theme="dark"] .quiz-action-btn:focus {
    background: rgba(74, 144, 226, 0.14);
}

body[data-theme="dark"] .quiz-clear-btn:disabled {
    border-color: rgba(148, 163, 184, 0.4);
    color: rgba(148, 163, 184, 0.85);
    background: rgba(17, 29, 50, 0.56);
}

.quiz-actions {
    margin-top: 1.25rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.9rem;
    flex-wrap: wrap;
}

@media (max-width: 991.98px) {
    .member-hero-card,
    .paywall-hero,
    .support-grid,
    .payment-layout,
    .back-ground-system-layout {
        grid-template-columns: 1fr;
    }

    .member-status-banner,
    .section-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .back-ground-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(86vw, 320px);
        max-width: 320px;
        border-radius: 0;
        overflow-y: auto;
        z-index: 1050;
        transform: translateX(-110%);
        transition: transform 0.22s ease;
    }

    .back-ground-system-layout.sidebar-open .back-ground-sidebar {
        transform: translateX(0);
    }

    .back-ground-sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.24);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.22s ease;
        z-index: 1040;
    }

    .back-ground-system-layout.sidebar-open .back-ground-sidebar-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .back-ground-main {
        grid-template-rows: auto auto;
    }

    .back-ground-topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-user-query-form {
        max-width: 100%;
    }
}

@media (max-width: 767.98px) {
    .plan-grid,
    .admin-stats,
    .member-hero-stats,
    .paywall-benefits {
        grid-template-columns: 1fr;
    }

    .poetry-detail-stage,
    .poetry-reading-detail-head {
        overflow: hidden;
    }

    .poetry-detail-title-wrap,
    .poetry-reading-detail-title-wrap {
        display: block;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }

    .poetry-detail-title,
    .poetry-reading-detail-title {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
        white-space: nowrap;
        text-align: left;
    }

    .poetry-detail-title-wrap .detail-char-pinyin {
        text-align: center;
    }

    .poetry-detail-title.is-marquee-active,
    .poetry-reading-detail-title.is-marquee-active {
        justify-content: flex-start;
    }

    .poetry-detail-title.is-marquee-active .poetry-title-marquee-text,
    .poetry-reading-detail-title.is-marquee-active .poetry-title-marquee-text {
        animation: poetryTitleMarqueeShift var(--poetry-marquee-duration, 8s) ease-in-out infinite alternate;
        will-change: transform;
    }

    .poetry-detail-meta,
    .poetry-reading-detail-meta {
        display: none !important;
    }

    .poetry-reading-panel {
        padding: 0.9rem;
    }

    .poetry-recording-actions .btn {
        width: 100%;
    }

    .poetry-recording-timer {
        min-width: 0;
    }

    .poetry-reading-record-row {
        flex-direction: column;
        align-items: stretch;
    }

    .poetry-record-play-btn {
        width: 100%;
    }

    .back-ground-workspace-top,
    .back-ground-workspace-bottom {
        padding: 1rem;
    }

    .back-ground-workspace-nav {
        padding: 1rem 1rem 0;
    }

    .admin-query-btn-wrap {
        justify-content: flex-start;
    }

    .admin-query-btn {
        width: 100%;
    }

    .back-ground-topbar-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .back-ground-user-chip {
        width: 100%;
        justify-content: flex-start;
    }

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

    .quiz-question-card {
        padding: 1.2rem;
    }

    .quiz-actions {
        justify-content: flex-start;
    }

    .quiz-actions .btn {
        width: 100%;
    }

    .membership-dropdown {
        min-width: min(92vw, 320px);
    }

    .plan-card.compact {
        min-width: 85vw;
    }
}

.car-logo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
    gap: 14px;
}

.car-logo-card {
    position: relative;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 5px;
    box-shadow: var(--shadow-soft);
    padding: 14px;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.car-logo-card:hover,
.car-logo-card:focus {
    transform: translateY(-2px);
    box-shadow: 0 20px 32px rgba(15, 23, 42, 0.12);
}

.car-logo-image-stage {
    height: 118px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    background: rgba(248, 250, 252, 0.95);
    padding: 12px;
}

.car-logo-image-stage img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.car-logo-card-pinyin {
    margin-top: 10px;
    min-height: 18px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.84rem;
}

.car-logo-card-title {
    margin-top: 4px;
    font-weight: 700;
    text-align: center;
    line-height: 1.45;
}

.car-logo-card-meta {
    margin-top: 8px;
    display: flex;
    justify-content: center;
}

.car-logo-card-level {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.12);
    color: #0f77b7;
    font-size: 0.78rem;
    font-weight: 700;
}

.car-logo-card-intro {
    margin-top: 10px;
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.6;
    min-height: 44px;
    text-align: center;
}

#carLogoGrid .car-logo-favorite-icon-btn,
#favoriteCarLogoGrid .car-logo-favorite-icon-btn {
    position: absolute;
    top: 9px;
    right: 9px;
    z-index: 8;
}

#carLogoGrid .car-logo-favorite-icon-btn i,
#favoriteCarLogoGrid .car-logo-favorite-icon-btn i {
    font-size: 0.95rem;
}

.car-logo-detail-stage {
    text-align: center;
    margin-bottom: 1rem;
}

.car-logo-detail-image {
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: rgba(248, 250, 252, 0.95);
    padding: 16px;
    margin-bottom: 14px;
}

.car-logo-detail-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.car-logo-detail-meta {
    margin-top: 10px;
    display: flex;
    justify-content: center;
}

.car-logo-detail-pinyin {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 0.35rem;
}

.car-logo-detail-title {
    font-size: clamp(1.35rem, 2vw, 1.7rem);
    border-radius: 5px;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.car-logo-detail-line {
    margin-top: 8px;
    color: var(--text-muted);
    line-height: 1.7;
}

.car-logo-detail-intro,
.car-logo-detail-story {
    border: 1px solid transparent;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.car-logo-detail-story {
    text-align: left;
}

@media (max-width: 767.98px) {
    .car-logo-grid {
        grid-template-columns: 1fr 1fr;
    }

    .car-logo-detail-image {
        height: 126px;
    }
}

@media (max-width: 575.98px) {
    .car-logo-grid {
        grid-template-columns: 1fr;
    }
}

.global-bgm-toggle {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 1200;
    border: 0;
    border-radius: 999px;
    padding: 0.65rem 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(255, 255, 255, 0.94);
    color: #35567c;
    box-shadow: 0 14px 28px rgba(44, 71, 107, 0.16);
    font-weight: 800;
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.global-bgm-toggle:hover,
.global-bgm-toggle:focus {
    transform: translateY(-1px);
    box-shadow: 0 18px 30px rgba(44, 71, 107, 0.2);
}

.global-bgm-toggle.is-muted {
    opacity: 0.76;
}

body[data-theme="dark"] .global-bgm-toggle {
    background: rgba(17, 29, 50, 0.92);
    color: #dbe7ff;
}

@media (max-width: 767.98px) {
    .global-bgm-toggle {
        right: 14px;
        bottom: 14px;
        padding: 0.62rem 0.88rem;
        font-size: 0.9rem;
    }
}
