/* Общие пользовательские настройки Sirius RPG. Файл подключается последним. */
html {
    color-scheme: dark;
}

html[data-theme='light'] {
    color-scheme: light;
    --bg-color: #f4f5f8;
    --bg-main: #f4f5f8;
    --bg-secondary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.82);
    --text-main: #17181d;
    --text-muted: #60636d;
    --glass-border: rgba(22, 24, 31, 0.12);
    --glass-shadow: 0 16px 44px rgba(38, 42, 55, 0.11);
    --store-bg: #f4f5f8;
    --store-panel: rgba(255, 255, 255, 0.88);
    --store-line: rgba(22, 24, 31, 0.12);
    --store-text: #17181d;
    --store-muted: #666a75;
}

html[data-theme='light'] body {
    color: #17181d;
    background-color: #f4f5f8;
    background-image:
        radial-gradient(circle at 10% 0%, rgba(255, 107, 87, 0.12), transparent 32rem),
        linear-gradient(180deg, #fafbfc, #eef0f5) !important;
}

html[data-theme='light']
    :is(
        .nav-container,
        .sidebar-user-header,
        .premium-stats-widget,
        .property-widget,
        .profile-nav-menu,
        .profile-tab-content,
        .wide-bio-box,
        .account-setting-card,
        .admin-search-box,
        .admin-edit-form,
        .category-block,
        .sidebar-widget,
        .topic-list,
        .topic-item,
        .post-block,
        .reply-section,
        .create-topic-box,
        .store-hero,
        .store-panel,
        .store-content,
        .document-card,
        .auth-card,
        .main-card
    ) {
    color: #17181d;
    background-color: rgba(255, 255, 255, 0.88) !important;
    background-image: none;
    border-color: rgba(22, 24, 31, 0.12) !important;
    box-shadow: 0 16px 44px rgba(38, 42, 55, 0.1);
}

html[data-theme='light'] .nav-container {
    background: rgba(255, 255, 255, 0.88) !important;
}

html[data-theme='light'] :is(.hero-section, .about-section, .play-section, .footer) {
    background-color: #f4f5f8 !important;
    background-image: none !important;
}

html[data-theme='light']
    :is(
        .profile-nickname,
        .widget-header-small,
        .wide-bio-header h3,
        .wall-header h2,
        .content-title,
        .account-settings-heading h3,
        .admin-edit-form h3,
        .form-group label,
        .settings-section label,
        .section-title,
        .forum-details h3,
        .topic-title,
        .footer-heading,
        .nav-logo,
        .nav-links a,
        .btn-login
    ) {
    color: #17181d !important;
}

html[data-theme='light']
    :is(
        .sc-val,
        .prop-right,
        .ppb-content,
        .wide-bio-content,
        .wall-header p,
        .section-subtitle,
        .forum-details p,
        .widget-content,
        .topic-meta,
        .breadcrumb,
        .account-settings-heading p
    ) {
    color: #5d616c !important;
}

html[data-theme='light']
    :is(
        .stat-card,
        .prop-item,
        .activity-stat-box,
        .gh-card,
        .wall-input-area,
        .pinned-image-preview,
        .settings-section textarea,
        .form-group input,
        .form-group select,
        .account-setting-card input,
        .header-search-input,
        .reply-form textarea,
        .topic-title-input,
        .prefix-select,
        .sort-select
    ) {
    color: #17181d !important;
    background-color: rgba(238, 240, 245, 0.95) !important;
    border-color: rgba(22, 24, 31, 0.12) !important;
}

html[data-theme='light'] :is(input, textarea, select)::placeholder {
    color: #777b86 !important;
}

html[data-theme='light'] .sort-select option,
html[data-theme='light'] .form-group select option {
    color: #17181d;
    background: #fff;
}

html[data-theme='light'] .profile-banner-header {
    background-color: #e8eaf0;
}

html[data-theme='light'] .char-img {
    mix-blend-mode: multiply;
    filter: none;
    opacity: 0.3;
}

html[data-theme='light'] .faction-val {
    color: #14783d !important;
}

html[data-theme='light'] .mobile-menu-toggle {
    color: #17181d;
    background: rgba(22, 24, 31, 0.05);
}

/* Игры сохраняют контрастный стол, но светлая тема делает оболочку и панели мягче. */
html[data-theme='light']
    body:has(
        :is(
            .bj-fullscreen,
            .poker-fullscreen,
            .crash-fullscreen,
            .roulette-fullscreen,
            .slot-fullscreen,
            .mines-page
        )
    ) {
    background: #e9ebf1 !important;
}

html[data-theme='light']
    :is(
        .bj-fullscreen,
        .poker-fullscreen,
        .crash-fullscreen,
        .roulette-fullscreen,
        .slot-fullscreen
    ) {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

html[data-motion='reduced'] *,
html[data-motion='reduced'] *::before,
html[data-motion='reduced'] *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
}

html[data-transparency='reduced']
    :is(
        .nav-container,
        .sidebar-user-header,
        .premium-stats-widget,
        .property-widget,
        .profile-nav-menu,
        .profile-tab-content,
        .wide-bio-box,
        .tablet-hardware,
        .app-window
    ) {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

html[data-density='compact']
    :is(
        .forum-item,
        .topic-item,
        .post-block,
        .profile-tab-content,
        .wide-bio-box,
        .premium-stats-widget,
        .property-widget,
        .store-panel
    ) {
    padding-top: 14px !important;
    padding-bottom: 14px !important;
}

@media (prefers-contrast: more) {
    :root {
        --text-muted: #c2c4cb;
        --glass-border: rgba(255, 255, 255, 0.22);
    }

    html[data-theme='light'] {
        --text-muted: #454851;
        --glass-border: rgba(22, 24, 31, 0.28);
    }
}

/* Светлая тема v2: единая жемчужно-серая оболочка без белых слепящих полотен. */
html[data-theme='light'] {
    --primary: #d94f3b;
    --primary-hover: #c43d2b;
    --accent-color: #d94f3b;
    --accent-hover: #c43d2b;
    --accent-glow: rgba(217, 79, 59, 0.2);
}

html[data-theme='light'] body {
    color: #20222a;
    background: #eef0f5 !important;
}

html[data-theme='light'] .navbar {
    background: linear-gradient(
        180deg,
        rgba(248, 249, 252, 0.9),
        rgba(242, 244, 248, 0.82)
    ) !important;
    border-color: rgba(34, 38, 48, 0.09) !important;
    box-shadow: 0 10px 35px rgba(44, 48, 60, 0.08);
}

html[data-theme='light'] .nav-container {
    background: rgba(255, 255, 255, 0.58) !important;
    border-color: rgba(34, 38, 48, 0.1) !important;
    box-shadow: 0 8px 28px rgba(44, 48, 60, 0.08);
}

html[data-theme='light'] :is(.nav-logo, .nav-links a, .nav-auth .btn-login) {
    color: #24262e !important;
}

html[data-theme='light'] .nav-links a.active,
html[data-theme='light'] .nav-links a:hover {
    color: #c84432 !important;
}

html[data-theme='light'] .status-badge {
    color: #69707c !important;
    background: rgba(34, 38, 48, 0.045) !important;
    border-color: rgba(34, 38, 48, 0.08) !important;
}

html[data-theme='light'] .mobile-nav-panel {
    background: rgba(248, 249, 252, 0.98) !important;
    border-color: rgba(34, 38, 48, 0.1) !important;
    box-shadow: 0 24px 60px rgba(35, 39, 50, 0.18) !important;
}

html[data-theme='light'] .mobile-nav-panel .nav-links a:hover,
html[data-theme='light'] .mobile-nav-panel .nav-links a.active {
    color: #c84432 !important;
    background: rgba(217, 79, 59, 0.08) !important;
}

html[data-theme='light'] .forum-flower {
    color: rgba(44, 48, 58, 0.09) !important;
    filter: grayscale(1);
}

html[data-theme='light']
    :is(
        .forum-item,
        .topic-item,
        .sidebar-widget,
        .reply-section,
        .create-topic-box,
        .thread-header-modern,
        .post-block,
        .forum-admin-manager,
        .nested-section-card,
        .forum-empty-card,
        .forum-error
    ) {
    color: #22242c;
    background: rgba(255, 255, 255, 0.74) !important;
    border-color: rgba(32, 36, 46, 0.1) !important;
    box-shadow: 0 14px 38px rgba(45, 49, 61, 0.075);
}

html[data-theme='light'] :is(.forum-item, .topic-item, .nested-section-card):hover {
    background: rgba(255, 255, 255, 0.94) !important;
    border-color: rgba(217, 79, 59, 0.25) !important;
}

html[data-theme='light']
    :is(
        .category-header,
        .section-header h1,
        .thread-header-modern h1,
        .forum-details h3 a,
        .topic-text h4,
        .post-author-link,
        .post-header > strong,
        .reply-section h3,
        .create-topic-box h3
    ) {
    color: #20222a !important;
    text-shadow: none;
}

html[data-theme='light']
    :is(
        .forum-details p,
        .topic-meta,
        .breadcrumb,
        .widget-content,
        .stat-label,
        .online-empty,
        .sidebar-empty,
        .thread-kicker,
        .post-header,
        .file-picker-status
    ) {
    color: #686c77 !important;
}

html[data-theme='light'] :is(.stat-value, .topic-stats strong, .sidebar-post-title) {
    color: #30333b !important;
}

html[data-theme='light'] .forum-stats-box {
    border-color: rgba(32, 36, 46, 0.08) !important;
}

html[data-theme='light'] .pinned-list {
    background: rgba(255, 255, 255, 0.52) !important;
    border-color: rgba(32, 36, 46, 0.1);
}

html[data-theme='light'] .pinned-header {
    color: #676b76 !important;
}

html[data-theme='light'] .nested-section-icon {
    background: color-mix(in srgb, var(--section-accent), transparent 89%);
}

html[data-theme='light'] .nested-section-card strong {
    color: #252730;
}

html[data-theme='light'] .forum-admin-manager > summary,
html[data-theme='light'] :is(.admin-manager-heading, .forum-section-delete) strong {
    color: #272a32;
}

html[data-theme='light'] :is(.forum-section-form, .forum-section-delete, .forum-file-field) {
    background: rgba(235, 237, 243, 0.7);
    border-color: rgba(32, 36, 46, 0.1);
}

html[data-theme='light']
    :is(
        .forum-section-form input,
        .forum-section-form select,
        .forum-section-delete select,
        .forum-field-select,
        .forum-field-input,
        .create-topic-box input,
        .create-topic-box textarea,
        .reply-form textarea,
        #edit-post-content
    ) {
    color: #252730 !important;
    background: rgba(255, 255, 255, 0.86) !important;
    border-color: rgba(32, 36, 46, 0.13) !important;
}

html[data-theme='light']
    :is(.forum-section-form option, .forum-field-select option, .sort-select option) {
    color: #252730;
    background: #fff;
}

html[data-theme='light'] .sort-select {
    color: #30323a !important;
    background-color: rgba(255, 255, 255, 0.82) !important;
    color-scheme: light;
}

html[data-theme='light'] .layout-picker span {
    background: rgba(255, 255, 255, 0.56);
    border-color: rgba(32, 36, 46, 0.1);
}

html[data-theme='light'] .layout-picker b {
    color: #2b2e36;
}

html[data-theme='light'] .layout-picker small {
    color: #747883;
}

html[data-theme='light'] .layout-picker input:checked + span {
    background: rgba(217, 79, 59, 0.075);
    border-color: rgba(217, 79, 59, 0.42);
}

html[data-theme='light'] .post-block.main-post {
    background: linear-gradient(
        135deg,
        rgba(82, 190, 128, 0.055),
        rgba(255, 255, 255, 0.8)
    ) !important;
}

html[data-theme='light'] .post-user-info {
    background: rgba(230, 233, 240, 0.48);
    border-color: rgba(32, 36, 46, 0.08);
}

html[data-theme='light'] .post-text {
    color: #30323a;
}

html[data-theme='light'] .post-header,
html[data-theme='light'] .post-footer {
    border-color: rgba(32, 36, 46, 0.08);
}

html[data-theme='light'] .post-role-badge {
    color: #676b75;
    background: rgba(32, 36, 46, 0.05);
}

html[data-theme='light'] .post-action {
    background: rgba(32, 36, 46, 0.045);
    border-color: rgba(32, 36, 46, 0.08);
}

html[data-theme='light'] .reply-locked {
    color: #666a75;
    background: rgba(32, 36, 46, 0.04);
}

html[data-theme='light']
    :is(
        .sidebar-user-header,
        .premium-stats-widget,
        .property-widget,
        .profile-nav-menu,
        .profile-tab-content,
        .wide-bio-box,
        .account-setting-card,
        .admin-search-box,
        .admin-edit-form
    ) {
    background: rgba(255, 255, 255, 0.76) !important;
    border-color: rgba(32, 36, 46, 0.1) !important;
    box-shadow: 0 14px 38px rgba(45, 49, 61, 0.075);
}

html[data-theme='light'] .wide-bio-content {
    color: #555a66 !important;
}

html[data-theme='light'] .wide-bio-content.is-empty {
    color: #8a8e98 !important;
    font-style: italic;
}

html[data-theme='light'] .pinned-post-box {
    background: linear-gradient(
        135deg,
        rgba(88, 166, 255, 0.08),
        rgba(255, 255, 255, 0.7)
    ) !important;
}

html[data-theme='light']
    :is(.ppb-header, .wall-header h2, .wide-bio-header h3, .profile-nickname, .content-title) {
    color: #24262e !important;
}

html[data-theme='light'] :is(.profile-nav-menu button, .profile-nav-menu a) {
    color: #575b66 !important;
}

html[data-theme='light'] .tablet-hardware {
    background: #d8dbe2;
    border-color: #c8cbd2;
    box-shadow:
        inset 0 0 0 2px #f9fafb,
        0 0 0 2px #aeb2bb,
        0 22px 65px rgba(35, 39, 50, 0.22) !important;
}

html[data-theme='light'] :is(.app-window, .settings-app-body) {
    color: #252730;
    background: #f1f3f7 !important;
}

html[data-theme='light'] .app-ui-header {
    background: rgba(250, 251, 253, 0.9);
    border-color: rgba(32, 36, 46, 0.09);
}

html[data-theme='light'] .app-ui-title {
    color: #24262e;
}

html[data-theme='light'] .app-ui-footer {
    background: #e9ebf0;
    border-color: rgba(32, 36, 46, 0.08);
}

html[data-theme='light'] .app-ui-footer input {
    color: #24262e;
    background: rgba(255, 255, 255, 0.78);
    border-color: rgba(32, 36, 46, 0.1);
}

html[data-theme='light'] :is(.game-card, .settings-app-intro, .settings-row, .developer-contact) {
    background: rgba(255, 255, 255, 0.72);
    border-color: rgba(32, 36, 46, 0.09);
    box-shadow: 0 9px 25px rgba(45, 49, 61, 0.07);
}

html[data-theme='light']
    :is(
        .game-card-info h4,
        .settings-app-intro strong,
        .settings-row > span,
        .developer-contact strong,
        .contacts-easter-egg h3
    ) {
    color: #24262e;
}

html[data-theme='light']
    :is(
        .game-card-info p,
        .settings-app-intro,
        .developer-contact small,
        .featured-contact p,
        .contacts-easter-egg > p
    ) {
    color: #666b76;
}

html[data-theme='light'] .settings-row select {
    color: #262830;
    background: #fff;
    border-color: rgba(32, 36, 46, 0.12);
}

html[data-theme='light'] .settings-row option {
    color: #262830;
    background: #fff;
}

html[data-theme='light'] .contacts-easter-egg {
    background:
        radial-gradient(circle at 85% 10%, rgba(217, 79, 59, 0.09), transparent 34%),
        radial-gradient(circle at 12% 92%, rgba(59, 130, 246, 0.1), transparent 34%), #eef0f5;
}

html[data-theme='light'] .developer-contact.featured-contact {
    background: linear-gradient(145deg, rgba(59, 130, 246, 0.1), rgba(255, 255, 255, 0.75));
}

html[data-theme='light'] .quick-questions-bar {
    background: rgba(32, 36, 46, 0.035);
    border-color: rgba(32, 36, 46, 0.08);
}

html[data-theme='light'] .quick-questions-bar button {
    color: #343740;
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(32, 36, 46, 0.1);
}

html[data-theme='light'] .chat-bubble {
    color: #333640;
    background: rgba(32, 36, 46, 0.055);
}

html[data-theme='light']
    :is(
        .auth-card,
        .document-card,
        .store-panel,
        .store-content,
        .store-hero,
        .main-card,
        .info-card,
        .shop-item,
        .server-status,
        .feature-card,
        .step-card
    ) {
    color: #24262e;
    background-color: rgba(255, 255, 255, 0.78) !important;
    border-color: rgba(32, 36, 46, 0.1) !important;
    box-shadow: 0 15px 42px rgba(45, 49, 61, 0.08);
}

html[data-theme='light']
    :is(
        .auth-card,
        .document-card,
        .store-panel,
        .store-content,
        .main-card,
        .info-card,
        .shop-item,
        .server-status,
        .feature-card,
        .step-card
    )
    :is(h1, h2, h3, h4, strong) {
    color: #24262e !important;
}

html[data-theme='light']
    :is(.auth-card, .store-panel, .store-content, .main-card, .document-card)
    :is(input, textarea, select) {
    color: #24262e !important;
    background: rgba(241, 243, 247, 0.94) !important;
    border-color: rgba(32, 36, 46, 0.12) !important;
}

@media (max-width: 680px) {
    html[data-theme='light'] .post-user-info {
        border-bottom-color: rgba(32, 36, 46, 0.08);
    }
}

/* Светлая тема v3: контраст всех основных страниц и интерактивных состояний. */
html[data-theme='light'] .char-img,
html[data-theme='light'] .hero-section:hover .char-img {
    opacity: 0.88 !important;
    filter: none !important;
    mix-blend-mode: normal !important;
}

html[data-theme='light'] .hero-section {
    background:
        radial-gradient(circle at 15% 48%, rgba(217, 79, 59, 0.11), transparent 39%),
        linear-gradient(180deg, #f8f9fb, #eef0f5) !important;
}

html[data-theme='light'] .about-bg-layer {
    background: radial-gradient(
        circle at center,
        transparent 35%,
        rgba(64, 69, 82, 0.12) 100%
    ) !important;
}

html[data-theme='light'] .features-accordion .feat-card {
    background: #17181d;
    border: 1px solid rgba(32, 36, 46, 0.13);
    box-shadow: 0 14px 34px rgba(41, 45, 56, 0.16);
}

html[data-theme='light'] .features-accordion .feat-img-wrap img {
    opacity: 1;
    filter: none;
}

html[data-theme='light'] .features-accordion .feat-img-wrap::after {
    background: linear-gradient(
        to top,
        rgba(8, 9, 12, 0.93) 0%,
        rgba(8, 9, 12, 0.18) 72%,
        transparent 100%
    );
}

html[data-theme='light'] .features-accordion .feat-card:hover .feat-img-wrap::after {
    background: linear-gradient(to top, rgba(8, 9, 12, 0.92), rgba(8, 9, 12, 0.04));
}

html[data-theme='light'] .features-accordion .feat-content h3 {
    color: #fff !important;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.75);
}

html[data-theme='light'] .features-accordion .feat-content p {
    color: #f1f3f6 !important;
    text-shadow: 0 2px 9px rgba(0, 0, 0, 0.75);
}

html[data-theme='light'] .main-card {
    background: rgba(255, 255, 255, 0.82) !important;
}

html[data-theme='light'] .main-card:hover {
    background: rgba(255, 255, 255, 0.96) !important;
    border-color: rgba(217, 79, 59, 0.24) !important;
    box-shadow: 0 16px 44px rgba(45, 49, 61, 0.12);
}

html[data-theme='light'] .main-card::after {
    -webkit-text-stroke-color: rgba(32, 36, 46, 0.055);
}

html[data-theme='light'] :is(.status-indicator, .online-micro, .stroke-title, .ip-copy-btn) {
    color: #24262e !important;
}

html[data-theme='light'] :is(.online-micro span, .main-desc, .alt-text, .soc-item, .soc-label) {
    color: #5d626e !important;
}

html[data-theme='light'] .online-micro {
    background: rgba(32, 36, 46, 0.055);
    border: 1px solid rgba(32, 36, 46, 0.08);
}

html[data-theme='light'] .card-status-bar,
html[data-theme='light'] .alt-connection {
    border-color: rgba(32, 36, 46, 0.1);
}

html[data-theme='light'] .soc-square {
    color: #343741;
    background: rgba(255, 255, 255, 0.78);
    border-color: rgba(32, 36, 46, 0.16);
    box-shadow: 0 8px 20px rgba(45, 49, 61, 0.08);
}

html[data-theme='light'] .soc-item:hover {
    color: #c84432 !important;
}

html[data-theme='light'] .soc-item:hover .soc-square {
    color: #c84432;
    background: #fff;
    border-color: rgba(217, 79, 59, 0.35);
}

html[data-theme='light'] .footer {
    color: #5f6470 !important;
    background: #e8eaf0 !important;
    border-color: rgba(32, 36, 46, 0.1) !important;
}

html[data-theme='light'] :is(.brand-col .logo, .footer-left .logo, .footer-heading, .support-mail) {
    color: #22252d !important;
}

html[data-theme='light']
    :is(
        .brand-col p,
        .footer-left p,
        .links-col a,
        .footer-links a,
        .footer-contacts p,
        .footer-contacts a
    ) {
    color: #5e636f !important;
    opacity: 1;
}

html[data-theme='light'] .footer-copyright {
    color: #7a7f89 !important;
}

html[data-theme='light'] :is(.btn-support, .footer-contacts .btn-secondary) {
    color: #30333c !important;
    background: rgba(255, 255, 255, 0.62) !important;
    border-color: rgba(32, 36, 46, 0.15) !important;
}

html[data-theme='light'] .category-block {
    color: inherit;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

html[data-theme='light'] .categories-container {
    background: transparent !important;
    box-shadow: none !important;
}

html[data-theme='light'] .sub-forums a {
    color: #424650 !important;
    background: rgba(245, 246, 249, 0.92) !important;
    border-color: rgba(32, 36, 46, 0.14) !important;
}

html[data-theme='light'] .sub-forums a:hover {
    color: #b83e2d !important;
    background: #fff !important;
    border-color: rgba(217, 79, 59, 0.36) !important;
}

html[data-theme='light'] .nested-section-card small {
    color: #646976 !important;
}

html[data-theme='light'] .nested-section-card > i {
    color: #676c77 !important;
}

html[data-theme='light'] .pinned-list {
    background: rgba(225, 228, 235, 0.66) !important;
    border-color: rgba(32, 36, 46, 0.1) !important;
}

html[data-theme='light'] .pinned-list .topic-item {
    background: rgba(255, 255, 255, 0.82) !important;
    border-color: rgba(32, 36, 46, 0.1) !important;
    box-shadow: 0 10px 28px rgba(45, 49, 61, 0.065);
}

html[data-theme='light'] .pinned-header {
    color: #424650 !important;
    background: linear-gradient(
        90deg,
        rgba(226, 229, 236, 0.96),
        rgba(240, 242, 246, 0.9)
    ) !important;
    border-color: rgba(32, 36, 46, 0.1) !important;
}

html[data-theme='light'] .breadcrumb-section-link {
    color: #343740 !important;
}

html[data-theme='light'] .edit-post-dialog {
    color: #24262e;
    background: linear-gradient(145deg, #fafbfc, #eef0f5);
    border-color: rgba(32, 36, 46, 0.12);
    box-shadow: 0 28px 80px rgba(45, 49, 61, 0.24);
}

html[data-theme='light'] .edit-post-dialog h3,
html[data-theme='light'] .edit-meta-heading strong {
    color: #24262e !important;
}

html[data-theme='light'] :is(.edit-topic-meta-panel, .edit-admin-meta-panel, .edit-media-panel) {
    background: rgba(255, 255, 255, 0.66);
    border-color: rgba(32, 36, 46, 0.1);
}

html[data-theme='light']
    :is(.edit-field-label, .edit-meta-heading small, .edit-remove-row label, .edit-layout-group) {
    color: #666b76;
}

html[data-theme='light'] .leaders-page-title h1 {
    color: #20222a !important;
}

html[data-theme='light'] .leaders-page-title p {
    color: #626773 !important;
}

html[data-theme='light'] .widescreen-wrapper {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(32, 36, 46, 0.11);
    box-shadow: 0 20px 48px rgba(45, 49, 61, 0.12);
}

html[data-theme='light'] .top-categories-grid {
    background: rgba(238, 240, 245, 0.58);
    border-color: rgba(32, 36, 46, 0.09);
}

html[data-theme='light'] .top-category-card {
    border-color: rgba(32, 36, 46, 0.09);
}

html[data-theme='light'] :is(.tc-header, .tc-name) {
    color: #262932 !important;
}

html[data-theme='light'] .tc-item {
    color: #2b2e37;
    background: rgba(255, 255, 255, 0.58);
    border-color: rgba(32, 36, 46, 0.07);
}

html[data-theme='light'] .tc-item:not(:nth-child(1)):hover {
    background: #fff;
    border-color: rgba(32, 36, 46, 0.13);
}

html[data-theme='light'] .tc-item:nth-child(1) {
    background: rgba(218, 170, 0, 0.1);
    border-color: rgba(181, 139, 0, 0.34);
}

html[data-theme='light'] .tc-item:nth-child(1) .tc-name {
    color: #252730 !important;
}

html[data-theme='light'] .tc-val {
    color: #5f6470;
}

html[data-theme='light'] .leaders-table-wrapper {
    background: rgba(255, 255, 255, 0.54);
}

html[data-theme='light'] .leaders-table th {
    color: #5e636f;
    background: rgba(226, 229, 235, 0.76);
    border-color: rgba(32, 36, 46, 0.1);
}

html[data-theme='light'] .leaders-table td {
    color: #292c34;
    border-color: rgba(32, 36, 46, 0.075);
}

html[data-theme='light'] .leaders-table tr:hover td {
    background: rgba(255, 255, 255, 0.75);
}

html[data-theme='light'] .pagination-container {
    background: rgba(225, 228, 235, 0.7);
}

html[data-theme='light'] .page-btn {
    color: #30333c;
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(32, 36, 46, 0.14);
}

html[data-theme='light'] .page-input-wrap {
    color: #5e636f;
}

html[data-theme='light'] .page-input-wrap input {
    color: #292c34;
    background: #fff;
    border-color: rgba(32, 36, 46, 0.14);
}

html[data-theme='light']
    :is(.stat-card, .prop-item, .activity-stat-box, .gh-card, .wall-input-area, .wall-comment) {
    background: rgba(244, 245, 248, 0.9) !important;
    border-color: rgba(32, 36, 46, 0.1) !important;
}

html[data-theme='light']
    :is(
        .sc-label,
        .prop-left,
        .astat-title,
        .gh-card-footer,
        .wall-comment-head time,
        .wall-empty-state
    ) {
    color: #5a5f6a !important;
}

html[data-theme='light'] :is(.sc-val, .prop-right, .astat-num, .gh-card-text, .wall-comment-text) {
    color: #292c34 !important;
}

html[data-theme='light'] .balance-card {
    background: linear-gradient(
        135deg,
        rgba(82, 190, 128, 0.12),
        rgba(255, 255, 255, 0.76)
    ) !important;
}

html[data-theme='light'] .sc-wallet-card {
    background: linear-gradient(
        135deg,
        rgba(255, 179, 71, 0.14),
        rgba(255, 255, 255, 0.76)
    ) !important;
}

html[data-theme='light'] .balance-card .sc-label {
    color: #286641 !important;
}

html[data-theme='light'] .sc-wallet-card .sc-label {
    color: #8b5c13 !important;
}

html[data-theme='light'] .wall-input-area textarea {
    color: #292c34 !important;
}

html[data-theme='light'] .wall-comment-head a {
    color: #1769aa;
}

html[data-theme='light'] .nav-tab-btn:hover {
    color: #252830 !important;
    background: rgba(32, 36, 46, 0.055);
}

/* Светлая тема v5: финальный слой контраста для всех основных экранов. */
html[data-theme='light'] {
    --light-canvas: #eef1f6;
    --light-surface: rgba(255, 255, 255, 0.86);
    --light-surface-strong: #fafbfc;
    --light-surface-soft: #e3e7ee;
    --light-line: rgba(31, 36, 48, 0.13);
    --light-text: #20242d;
    --light-muted: #596170;
    --light-subtle: #717987;
}

html[data-theme='light'] body {
    color: var(--light-text) !important;
    background-color: var(--light-canvas) !important;
}

/* Главная: персонаж остаётся ярким без наведения; тёмная тема не затрагивается. */
html[data-theme='light'] :is(.hero-section .char-img, .hero-section:hover .char-img) {
    opacity: 0.92 !important;
    filter: none !important;
    mix-blend-mode: normal !important;
}

html[data-theme='light'] :is(.hero-h1, .section-title, .stroke-title) {
    color: var(--light-text) !important;
}

html[data-theme='light']
    :is(.hero-p, .section-subtitle, .main-desc, .alt-text, .online-micro span, .soc-label) {
    color: var(--light-muted) !important;
    opacity: 1 !important;
}

html[data-theme='light'] .hero-text-col > .badge {
    color: #ae3828 !important;
    background: rgba(217, 79, 59, 0.1) !important;
    border-color: rgba(217, 79, 59, 0.26) !important;
}

html[data-theme='light'] .btn-secondary {
    color: #2b303a !important;
    background: rgba(255, 255, 255, 0.72) !important;
    border-color: rgba(31, 36, 48, 0.16) !important;
}

html[data-theme='light'] .btn-secondary:hover {
    color: #b73d2c !important;
    background: #fff !important;
    border-color: rgba(217, 79, 59, 0.36) !important;
}

html[data-theme='light'] .features-accordion .feat-card {
    background-color: #111319 !important;
}

html[data-theme='light'] .features-accordion .feat-img-wrap img {
    opacity: 1 !important;
    filter: brightness(1.04) contrast(1.02) !important;
}

html[data-theme='light'] .features-accordion .feat-content :is(h3, p) {
    color: #fff !important;
    opacity: 1 !important;
}

html[data-theme='light'] .main-card {
    color: var(--light-text) !important;
    background: var(--light-surface) !important;
    border-color: var(--light-line) !important;
}

html[data-theme='light'] :is(.status-indicator, .online-micro, .ip-copy-btn, .soc-item) {
    color: #303642 !important;
}

html[data-theme='light'] .online-micro {
    background: rgba(31, 36, 48, 0.06) !important;
    border-color: rgba(31, 36, 48, 0.12) !important;
}

html[data-theme='light'] .soc-square {
    color: #303642 !important;
    background: rgba(255, 255, 255, 0.82) !important;
    border-color: rgba(31, 36, 48, 0.17) !important;
}

/* Форум: без серых прямоугольников под группами и без цветных emoji. */
html[data-theme='light'] :is(.forum-main, .forum-layout, .categories-container, .category-block) {
    background: transparent !important;
    box-shadow: none !important;
}

html[data-theme='light'] .category-block {
    border: 0 !important;
}

html[data-theme='light'] .category-header {
    color: #252a34 !important;
    text-shadow: none !important;
}

html[data-theme='light']
    :is(
        .forum-item,
        .sidebar-widget,
        .nested-section-card,
        .reply-section,
        .create-topic-box,
        .thread-header-modern,
        .post-block,
        .forum-admin-manager
    ) {
    color: var(--light-text) !important;
    background: var(--light-surface) !important;
    border-color: var(--light-line) !important;
}

html[data-theme='light']
    :is(
        .forum-details h3 a,
        .topic-text h4,
        .widget-header,
        .post-author-link,
        .post-header strong,
        .reply-section h3,
        .create-topic-box h3,
        .section-header h1
    ) {
    color: #242933 !important;
}

html[data-theme='light']
    :is(
        .forum-details p,
        .forum-details small,
        .topic-meta,
        .topic-stats,
        .widget-content,
        .online-users-counter,
        .sidebar-post-meta,
        .post-header,
        .post-role-badge,
        .post-footer,
        .breadcrumb
    ) {
    color: var(--light-muted) !important;
}

html[data-theme='light']
    :is(.forum-stats-box .stat-value, .topic-stats strong, .sidebar-post-title, .post-text) {
    color: #2c323d !important;
}

html[data-theme='light'] .sub-forums a {
    color: #363d49 !important;
    background: #f6f7f9 !important;
    border-color: rgba(31, 36, 48, 0.14) !important;
}

html[data-theme='light'] .sub-forums a:hover {
    color: #ad3929 !important;
    background: #fff !important;
}

html[data-theme='light'] .pinned-header {
    color: #343b47 !important;
    background: linear-gradient(90deg, #dfe3ea, #eef0f4) !important;
    border-color: var(--light-line) !important;
}

html[data-theme='light'] .pinned-list {
    background: #dfe3ea !important;
    border-color: var(--light-line) !important;
}

html[data-theme='light'] .pinned-list .topic-item {
    color: var(--light-text) !important;
    background: rgba(255, 255, 255, 0.9) !important;
    border-color: var(--light-line) !important;
}

html[data-theme='light'] .pinned-list .topic-item:hover {
    background: #fff !important;
    border-color: rgba(217, 79, 59, 0.3) !important;
}

html[data-theme='light'] .post-user-info {
    background: rgba(226, 230, 237, 0.68) !important;
    border-color: rgba(31, 36, 48, 0.1) !important;
}

html[data-theme='light'] :is(.post-text, .wall-comment-text, .gh-card-text, .wide-bio-content) {
    color: #303641 !important;
}

html[data-theme='light']
    :is(
        .reply-form textarea,
        .create-topic-box input,
        .create-topic-box textarea,
        .forum-field-input,
        .forum-field-select,
        #edit-post-content,
        .sort-select
    ) {
    color: #252b35 !important;
    background-color: #fff !important;
    border-color: rgba(31, 36, 48, 0.17) !important;
    color-scheme: light !important;
}

/* Зал славы: светлая оболочка и таблица вместо чёрного блока. */
html[data-theme='light'] :is(.leaders-main, .leaders-page-title, .leaders-page-title h1) {
    color: var(--light-text) !important;
}

html[data-theme='light'] .widescreen-wrapper {
    color: var(--light-text) !important;
    background: var(--light-surface) !important;
    border-color: var(--light-line) !important;
}

html[data-theme='light'] .top-categories-grid {
    background: #e6e9ef !important;
    border-color: var(--light-line) !important;
}

html[data-theme='light'] .top-category-card {
    background: transparent !important;
    border-color: rgba(31, 36, 48, 0.1) !important;
}

html[data-theme='light'] :is(.tc-header, .tc-name, .table-player-name) {
    color: #262c36 !important;
}

html[data-theme='light'] :is(.tc-val, .tc-rank, .tbl-rank) {
    color: #616a78 !important;
}

html[data-theme='light'] .leaders-table-wrapper {
    background: #f8f9fb !important;
}

html[data-theme='light'] .leaders-table th {
    color: #545d6b !important;
    background: #e3e7ed !important;
    border-color: var(--light-line) !important;
}

html[data-theme='light'] .leaders-table td {
    color: #29303a !important;
    background: transparent !important;
    border-color: rgba(31, 36, 48, 0.09) !important;
}

html[data-theme='light'] .leaders-table tbody tr:hover td {
    background: #eef1f5 !important;
}

html[data-theme='light'] .pagination-container {
    color: var(--light-muted) !important;
    background: #e3e7ed !important;
}

/* Профиль: баланс, Sirius Coins, активность и комментарии остаются читаемыми. */
html[data-theme='light']
    :is(
        .sidebar-user-header,
        .premium-stats-widget,
        .property-widget,
        .profile-nav-menu,
        .profile-tab-content,
        .wide-bio-box,
        .account-setting-card,
        .admin-search-box,
        .admin-edit-form
    ) {
    color: var(--light-text) !important;
    background: var(--light-surface) !important;
    border-color: var(--light-line) !important;
}

html[data-theme='light']
    :is(
        .profile-nickname,
        .widget-header-small,
        .wide-bio-header h3,
        .wall-header h2,
        .content-title,
        .pinned-title,
        .account-settings-heading h3,
        .admin-edit-form h3
    ) {
    color: #242a34 !important;
}

html[data-theme='light']
    :is(
        .sc-label,
        .prop-left,
        .astat-title,
        .wall-header p,
        .gh-card-footer,
        .wall-comment-head time,
        .field-help,
        .settings-hint
    ) {
    color: var(--light-muted) !important;
}

html[data-theme='light']
    :is(.sc-val, .prop-right, .astat-num, .wall-comment-text, .gh-card-text, .ppb-content) {
    color: #2b323d !important;
}

html[data-theme='light'] .balance-val {
    color: #17703d !important;
    text-shadow: none !important;
}

html[data-theme='light'] .sc-wallet-val {
    color: #8d5b0a !important;
    text-shadow: none !important;
}

html[data-theme='light']
    :is(.stat-card, .prop-item, .activity-stat-box, .gh-card, .wall-input-area, .wall-comment) {
    background: #f3f5f8 !important;
    border-color: rgba(31, 36, 48, 0.11) !important;
}

html[data-theme='light'] .wall-input-area textarea {
    color: #29303a !important;
}

html[data-theme='light'] .gh-badge {
    color: #5f6876 !important;
    background: #e7eaf0 !important;
    border-color: rgba(31, 36, 48, 0.12) !important;
}

html[data-theme='light'] .nav-tab-btn {
    color: #4f5866 !important;
}

html[data-theme='light'] .nav-tab-btn.active {
    color: #b33a2a !important;
    background: rgba(217, 79, 59, 0.1) !important;
}

/* Футеры на главной и в зале славы. */
html[data-theme='light'] .footer {
    color: var(--light-muted) !important;
    background: #e1e5eb !important;
    border-color: var(--light-line) !important;
}

html[data-theme='light'] :is(.brand-col .logo, .footer-left .logo, .footer-heading, .support-mail) {
    color: #222832 !important;
}

html[data-theme='light']
    :is(
        .brand-col p,
        .footer-left p,
        .links-col a,
        .footer-links a,
        .footer-contacts p,
        .footer-contacts a
    ) {
    color: #555f6d !important;
    opacity: 1 !important;
}

html[data-theme='light'] :is(.btn-support, .footer-contacts .btn-secondary) {
    color: #29313b !important;
    background: rgba(255, 255, 255, 0.76) !important;
    border-color: rgba(31, 36, 48, 0.16) !important;
}

@media (max-width: 680px) {
    html[data-theme='light'] .pinned-list {
        background: rgba(223, 227, 234, 0.82) !important;
    }

    html[data-theme='light'] .post-user-info {
        border-right: 0 !important;
        border-bottom-color: rgba(31, 36, 48, 0.1) !important;
    }
}
