/* Gobrix dark mode.
   Loaded after classic2010.css on every page. Everything here is scoped to
   html[data-theme="dark"], which /scripts/theme.js sets from the player's choice
   (Account Settings > Appearance, or the account menu). Light mode is untouched.
   The 2010 look stays: same layout, square boxes and gradient bars, just in dark greys. */

html[data-theme="dark"] {
    color-scheme: dark;
    --ink: #e4e9ef;
    --text: #dbe1e8;
    --muted: #9ba7b4;
    --brand: #6fb0ff;
    --brand-2: #4f8be0;
    --brand-3: #35506f;
    --wash: #1d2530;
    --card: #1f242b;
    --line: #3a434f;
    --line-strong: #4a5563;
    --box-head: transparent;
    --dk-bg: #14171c;
    --dk-surface: #1f242b;
    --dk-surface-2: #262c35;
    --dk-surface-3: #2e3540;
    --dk-line: #3a434f;
    --dk-line-strong: #4a5563;
    --dk-text: #dbe1e8;
    --dk-strong: #f1f4f7;
    --dk-muted: #a3aebb;
    --dk-link: #6fb0ff;
    --dk-link-hover: #9cc9ff;
    background: var(--dk-bg) !important;
}

/* ── Page and text ─────────────────────────────────────── */
html[data-theme="dark"] body { background: var(--dk-bg) !important; color: var(--dk-text) !important; }
html[data-theme="dark"] a { color: var(--dk-link); }
html[data-theme="dark"] a:hover { color: var(--dk-link-hover); }
html[data-theme="dark"] ::selection { background: #2f5d9e; color: #fff; }
html[data-theme="dark"] h1, html[data-theme="dark"] h2, html[data-theme="dark"] h3, html[data-theme="dark"] h4,
html[data-theme="dark"] .page-title, html[data-theme="dark"] .hero-title, html[data-theme="dark"] .section-title,
html[data-theme="dark"] .card-title, html[data-theme="dark"] .login-title, html[data-theme="dark"] .signup-title,
html[data-theme="dark"] .message-title, html[data-theme="dark"] main h1:not(.hero-title), html[data-theme="dark"] main h2,
html[data-theme="dark"] .forums-header h2, html[data-theme="dark"] strong, html[data-theme="dark"] dt {
    color: var(--dk-strong) !important;
}
html[data-theme="dark"] p, html[data-theme="dark"] li, html[data-theme="dark"] dd, html[data-theme="dark"] td,
html[data-theme="dark"] label, html[data-theme="dark"] .welcome-text, html[data-theme="dark"] .message-text {
    color: inherit;
}
html[data-theme="dark"] .page-subtitle, html[data-theme="dark"] .status-text, html[data-theme="dark"] .hero-kicker,
html[data-theme="dark"] .section-count, html[data-theme="dark"] .game-tile-meta, html[data-theme="dark"] .game-tile-stats,
html[data-theme="dark"] .release-hint, html[data-theme="dark"] .field-count, html[data-theme="dark"] .muted,
html[data-theme="dark"] small, html[data-theme="dark"] time {
    color: var(--dk-muted) !important;
}
html[data-theme="dark"] .section-link, html[data-theme="dark"] .link-button, html[data-theme="dark"] .board-title,
html[data-theme="dark"] .game-tile-name, html[data-theme="dark"] .site-footer a, html[data-theme="dark"] .sub-bar a {
    color: var(--dk-link) !important;
}
html[data-theme="dark"] code, html[data-theme="dark"] kbd, html[data-theme="dark"] pre {
    background: var(--dk-surface-3) !important; border-color: var(--dk-line) !important; color: var(--dk-strong) !important;
}
html[data-theme="dark"] hr { border-color: var(--dk-line); }

/* ── Text colours from the other stylesheets (generated from every rule that set a dark
   text colour; buttons, pills and notice boxes are handled by hand further down). ── */
html[data-theme="dark"] #gift-zone,
html[data-theme="dark"] .asset-howto,
html[data-theme="dark"] .bio-editor label,
html[data-theme="dark"] .bio-heading,
html[data-theme="dark"] .breadcrumb,
html[data-theme="dark"] .card-title,
html[data-theme="dark"] .choice strong,
html[data-theme="dark"] .confirm-dialog h2,
html[data-theme="dark"] .confirm-item strong,
html[data-theme="dark"] .connection-count strong,
html[data-theme="dark"] .custom-color,
html[data-theme="dark"] .decal-box p,
html[data-theme="dark"] .docs-chips span,
html[data-theme="dark"] .docs-defs dt,
html[data-theme="dark"] .docs-section code,
html[data-theme="dark"] .docs-section dd,
html[data-theme="dark"] .docs-section h2,
html[data-theme="dark"] .docs-section h3,
html[data-theme="dark"] .docs-section li,
html[data-theme="dark"] .docs-section p,
html[data-theme="dark"] .docs-table td,
html[data-theme="dark"] .docs-table th,
html[data-theme="dark"] .error-code,
html[data-theme="dark"] .face-option,
html[data-theme="dark"] .field-label,
html[data-theme="dark"] .forum-category th,
html[data-theme="dark"] .forum-page-header h2,
html[data-theme="dark"] .forums-header h2,
html[data-theme="dark"] .forums-wrapper > h1,
html[data-theme="dark"] .friend-card,
html[data-theme="dark"] .game-playing.live,
html[data-theme="dark"] .game-title,
html[data-theme="dark"] .gift-admin-info h3,
html[data-theme="dark"] .gift-admin-info p,
html[data-theme="dark"] .gift-card h2,
html[data-theme="dark"] .gift-reveal-card h2,
html[data-theme="dark"] .group-card,
html[data-theme="dark"] .hat-fit span,
html[data-theme="dark"] .hero-title,
html[data-theme="dark"] .home-notification-item span,
html[data-theme="dark"] .home-social-card h3,
html[data-theme="dark"] .home-social-heading h2,
html[data-theme="dark"] .home-social-list li,
html[data-theme="dark"] .item-title,
html[data-theme="dark"] .legal-doc,
html[data-theme="dark"] .login-label,
html[data-theme="dark"] .login-title,
html[data-theme="dark"] .manage-head h2,
html[data-theme="dark"] .manage-section h3,
html[data-theme="dark"] .manage-section h4,
html[data-theme="dark"] .message-text,
html[data-theme="dark"] .message-title,
html[data-theme="dark"] .no-topics-msg,
html[data-theme="dark"] .not-found-card h1,
html[data-theme="dark"] .page-title,
html[data-theme="dark"] .player-report-details,
html[data-theme="dark"] .post-author,
html[data-theme="dark"] .post-body,
html[data-theme="dark"] .preset,
html[data-theme="dark"] .price,
html[data-theme="dark"] .price.decal-id,
html[data-theme="dark"] .profile-about .user-bio,
html[data-theme="dark"] .profile-count strong,
html[data-theme="dark"] .release-current,
html[data-theme="dark"] .release-form h3,
html[data-theme="dark"] .release-form label,
html[data-theme="dark"] .release-history-title,
html[data-theme="dark"] .reply-box h3,
html[data-theme="dark"] .report-form label,
html[data-theme="dark"] .report-post-preview,
html[data-theme="dark"] .report-submitted,
html[data-theme="dark"] .section-link,
html[data-theme="dark"] .section-title,
html[data-theme="dark"] .selected-part strong,
html[data-theme="dark"] .server-old,
html[data-theme="dark"] .signup-label,
html[data-theme="dark"] .signup-title,
html[data-theme="dark"] .site-footer,
html[data-theme="dark"] .social-state,
html[data-theme="dark"] .stamp-balance,
html[data-theme="dark"] .stamp-balance strong,
html[data-theme="dark"] .stat-num,
html[data-theme="dark"] .stat-number,
html[data-theme="dark"] .tab-btn,
html[data-theme="dark"] .tab-btn.active,
html[data-theme="dark"] .tab-btn[aria-selected="true"],
html[data-theme="dark"] .topic-notice,
html[data-theme="dark"] .topic-title-link,
html[data-theme="dark"] .topic-title-link:hover,
html[data-theme="dark"] .tshirt-option,
html[data-theme="dark"] .user-bio,
html[data-theme="dark"] .user-chip,
html[data-theme="dark"] .user-id,
html[data-theme="dark"] .users-intro,
html[data-theme="dark"] .users-title,
html[data-theme="dark"] .welcome-text,
html[data-theme="dark"] ::selection,
html[data-theme="dark"] a,
html[data-theme="dark"] a:hover,
html[data-theme="dark"] kbd,
html[data-theme="dark"] main h1:not(.hero-title),
html[data-theme="dark"] main h2,
html[data-theme="dark"] select,
html[data-theme="dark"] table th { color: var(--dk-text) !important; }
html[data-theme="dark"] .account-details dd,
html[data-theme="dark"] .account-dropdown-head strong,
html[data-theme="dark"] .admin-status-msg,
html[data-theme="dark"] .audio-length,
html[data-theme="dark"] .bio-save-status,
html[data-theme="dark"] .board-desc,
html[data-theme="dark"] .client-help,
html[data-theme="dark"] .connection-count,
html[data-theme="dark"] .connections-back,
html[data-theme="dark"] .editor-hint,
html[data-theme="dark"] .empty-state strong,
html[data-theme="dark"] .error-description,
html[data-theme="dark"] .friend-playing,
html[data-theme="dark"] .game-description,
html[data-theme="dark"] .game-meta,
html[data-theme="dark"] .game-playing,
html[data-theme="dark"] .game-stats dd,
html[data-theme="dark"] .game-tile-meta,
html[data-theme="dark"] .game-tile-stats,
html[data-theme="dark"] .gift-description,
html[data-theme="dark"] .gift-reveal-items small,
html[data-theme="dark"] .gift-when,
html[data-theme="dark"] .hat-help,
html[data-theme="dark"] .hero-kicker,
html[data-theme="dark"] .home-count,
html[data-theme="dark"] .home-social-directory,
html[data-theme="dark"] .home-social-list .home-list-empty,
html[data-theme="dark"] .home-social-status,
html[data-theme="dark"] .image-upload-status,
html[data-theme="dark"] .item-description,
html[data-theme="dark"] .item-stats dd,
html[data-theme="dark"] .legal-updated,
html[data-theme="dark"] .manage-summary,
html[data-theme="dark"] .my-game-description,
html[data-theme="dark"] .page-subtitle,
html[data-theme="dark"] .play-status,
html[data-theme="dark"] .relationship-status,
html[data-theme="dark"] .release-help,
html[data-theme="dark"] .release-hint,
html[data-theme="dark"] .reply-status,
html[data-theme="dark"] .report-status,
html[data-theme="dark"] .section-count,
html[data-theme="dark"] .status-text,
html[data-theme="dark"] .topic-meta,
html[data-theme="dark"] .users-status { color: var(--dk-muted) !important; }
html[data-theme="dark"] .account-dropdown a,
html[data-theme="dark"] .board-title,
html[data-theme="dark"] .breadcrumb a,
html[data-theme="dark"] .creation-name a,
html[data-theme="dark"] .docs-nav a,
html[data-theme="dark"] .game-meta a,
html[data-theme="dark"] .game-tile-name,
html[data-theme="dark"] .home-social-list a,
html[data-theme="dark"] .item-tile-name,
html[data-theme="dark"] .legal-doc a,
html[data-theme="dark"] .menu-list a,
html[data-theme="dark"] .my-game-name a,
html[data-theme="dark"] .server-players a,
html[data-theme="dark"] .site-footer a,
html[data-theme="dark"] .site-nav a + a::before,
html[data-theme="dark"] .sub-bar a,
html[data-theme="dark"] .sub-bar a:hover,
html[data-theme="dark"] .topic-notice a,
html[data-theme="dark"] .users-list a { color: var(--dk-link) !important; }

html[data-theme="dark"] .account-details dd, html[data-theme="dark"] .account-dropdown-head strong,
html[data-theme="dark"] .empty-state strong, html[data-theme="dark"] .game-description, html[data-theme="dark"] .item-description,
html[data-theme="dark"] .my-game-description, html[data-theme="dark"] .game-stats dd, html[data-theme="dark"] .item-stats dd,
html[data-theme="dark"] .account-dropdown a { color: var(--dk-text) !important; }
html[data-theme="dark"] .site-nav a + a::before { color: #4c6a9c !important; }
html[data-theme="dark"] .account-details dd.ok { color: #7fd88d !important; }

/* ── Header: a dark bar (same shape as the light one) ─── */
html[data-theme="dark"] .site-header {
    background: rgba(20, 24, 30, 0.96) !important;
    border-bottom-color: #2A303A !important;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.35) !important;
}
html[data-theme="dark"] .site-nav a { color: #D5DAE2 !important; }
html[data-theme="dark"] .site-nav a:hover { background: #262C36 !important; color: #fff !important; }
html[data-theme="dark"] .site-nav a[aria-current="page"] { background: var(--red) !important; color: #fff !important; box-shadow: 0 3px 0 #7E1215; }
html[data-theme="dark"] .header-pill, html[data-theme="dark"] .header-button, html[data-theme="dark"] .account-button {
    background: #222831 !important;
    border-color: #39404C !important;
    box-shadow: 0 2px 0 #12151A !important;
    color: #E6EAF0 !important;
}
html[data-theme="dark"] .header-button.primary { background: var(--red) !important; border-color: #7E1215 !important; box-shadow: 0 3px 0 #7E1215 !important; color: #fff !important; }
html[data-theme="dark"] .header-icon-button { background: #222831 !important; }
html[data-theme="dark"] .header-pill strong, html[data-theme="dark"] .account-name { color: #E6EAF0 !important; }
html[data-theme="dark"] .account-button .caret { border-top-color: #9BA7B4 !important; }
html[data-theme="dark"] .account-dropdown {
    background: var(--dk-surface) !important; border-color: #39404C !important; color: var(--dk-text) !important;
}
html[data-theme="dark"] .account-dropdown a { color: var(--dk-text) !important; }
html[data-theme="dark"] .account-dropdown a:hover, html[data-theme="dark"] .account-dropdown a:focus-visible { background: #2A313B !important; }
html[data-theme="dark"] .account-dropdown a.danger { color: #FF8A80 !important; }
html[data-theme="dark"] .account-dropdown-head { border-color: var(--dk-line) !important; }
html[data-theme="dark"] .account-dropdown-head span { color: var(--dk-muted) !important; }
html[data-theme="dark"] .menu-separator { background: var(--dk-line) !important; border-color: var(--dk-line) !important; }
html[data-theme="dark"] .top-bar, html[data-theme="dark"] .sub-bar { background: #14181E !important; border-bottom-color: #2A303A !important; }

/* ── Boxes, cards and panels ──────────────────────────── */
html[data-theme="dark"] .card, html[data-theme="dark"] .home-social-card, html[data-theme="dark"] .forum-category,
html[data-theme="dark"] .login-box, html[data-theme="dark"] .signup-box, html[data-theme="dark"] .message-box,
html[data-theme="dark"] .empty-state, html[data-theme="dark"] .home-hero-new, html[data-theme="dark"] .home-hero,
html[data-theme="dark"] .friend-card, html[data-theme="dark"] .game-tile, html[data-theme="dark"] .topic-table,
html[data-theme="dark"] .topic-post-card, html[data-theme="dark"] .reply-box, html[data-theme="dark"] .rich-text-editor,
html[data-theme="dark"] .games-list li, html[data-theme="dark"] .users-list li, html[data-theme="dark"] .user-profile-card,
html[data-theme="dark"] .badge-card, html[data-theme="dark"] .group-card, html[data-theme="dark"] .legal-doc,
html[data-theme="dark"] .not-found-card, html[data-theme="dark"] .admin-table, html[data-theme="dark"] .release-form,
html[data-theme="dark"] .hat-maker, html[data-theme="dark"] .player-report, html[data-theme="dark"] .catalog-categories,
html[data-theme="dark"] .menu-list, html[data-theme="dark"] .preset, html[data-theme="dark"] .face-option,
html[data-theme="dark"] .tshirt-option, html[data-theme="dark"] .model-thumb, html[data-theme="dark"] .decal-thumb,
html[data-theme="dark"] .gift-reveal-card, html[data-theme="dark"] .item-tile, html[data-theme="dark"] .card.studio-download {
    background: var(--dk-surface) !important;
    border-color: var(--dk-line) !important;
    color: var(--dk-text) !important;
}
html[data-theme="dark"] .card.studio-download { border-left-color: #4f8be0 !important; }
html[data-theme="dark"] .studio-download-text h2 { color: var(--dk-link) !important; }
html[data-theme="dark"] .studio-download-text p { color: var(--dk-text) !important; }
html[data-theme="dark"] .studio-download-soon { background: var(--dk-surface-3) !important; border-color: var(--dk-line) !important; color: var(--dk-muted) !important; }
html[data-theme="dark"] .section-head, html[data-theme="dark"] .card-title, html[data-theme="dark"] .card-title-row {
    background: none !important; border-color: transparent !important;
}
html[data-theme="dark"] .post-header { background: #222831 !important; border-color: var(--dk-line) !important; }
html[data-theme="dark"] .home-list li { border-bottom-color: var(--dk-line); }
html[data-theme="dark"] .home-notification-item.unread, html[data-theme="dark"] .badge-card.owned { background: #1c2a3d !important; }
html[data-theme="dark"] .client-help, html[data-theme="dark"] .release-current, html[data-theme="dark"] .connection-count,
html[data-theme="dark"] .topic-notice, html[data-theme="dark"] .report-form, html[data-theme="dark"] .review-compare figure,
html[data-theme="dark"] .player-report-log, html[data-theme="dark"] .vote-button, html[data-theme="dark"] .image-upload-button,
html[data-theme="dark"] .hat-swatch, html[data-theme="dark"] .stage-toggle, html[data-theme="dark"] .legal-tabs a {
    background: var(--dk-surface-2) !important; border-color: var(--dk-line) !important; color: var(--dk-text) !important;
}
html[data-theme="dark"] .legal-tabs a[aria-current="page"], html[data-theme="dark"] .stage-toggle button[aria-pressed="true"] {
    background: var(--dk-surface) !important; color: var(--dk-link) !important;
}
html[data-theme="dark"] .vote-button:hover:not(:disabled), html[data-theme="dark"] .vote-button.selected,
html[data-theme="dark"] .connection-count:hover, html[data-theme="dark"] .profile-count:hover {
    background: #263a55 !important;
}

/* Warm/notice boxes keep their meaning in a darker shade. */
html[data-theme="dark"] .private-note, html[data-theme="dark"] .server-old, html[data-theme="dark"] .model-warning,
html[data-theme="dark"] .docs-tip, html[data-theme="dark"] .review-note.pending, html[data-theme="dark"] .item-gift,
html[data-theme="dark"] .player-report-log .by-reported {
    background: #3a321a !important; border-color: #6b5a24 !important; color: #f3e3b0 !important;
}
html[data-theme="dark"] .review-note { background: #3d2220 !important; color: #f5c6c1 !important; }

/* Status pills */
html[data-theme="dark"] .status-badge.active, html[data-theme="dark"] .status-badge.approved, html[data-theme="dark"] .review-badge.approved,
html[data-theme="dark"] .visibility-badge.public, html[data-theme="dark"] .role-pill.moderator { background: #1e3a24 !important; color: #9be3a6 !important; }
html[data-theme="dark"] .status-badge.banned, html[data-theme="dark"] .status-badge.denied, html[data-theme="dark"] .review-badge.rejected { background: #3d2220 !important; color: #f5a59d !important; }
html[data-theme="dark"] .status-badge.pending, html[data-theme="dark"] .review-badge.pending, html[data-theme="dark"] .visibility-badge.private { background: #3a321a !important; color: #f3d98a !important; }
html[data-theme="dark"] .review-badge.off, html[data-theme="dark"] .locked-badge { background: var(--dk-surface-3) !important; color: var(--dk-muted) !important; }
html[data-theme="dark"] .role-pill.admin { background: #1d2f4a !important; color: #9cc9ff !important; }
html[data-theme="dark"] .ok, html[data-theme="dark"] .form-message.success { color: #7fd88d !important; }

/* ── 3D stages and thumbnails: a dark backdrop so models still pop ── */
html[data-theme="dark"] .avatar-stage, html[data-theme="dark"] .item-stage, html[data-theme="dark"] .profile-stage {
    background: radial-gradient(ellipse at 50% 85%, rgba(94, 145, 204, 0.22), transparent 60%),
                linear-gradient(180deg, #2a3240 0%, #1c222b 100%) !important;
    border-color: var(--dk-line) !important;
}
html[data-theme="dark"] .headshot { background: radial-gradient(circle at 50% 35%, #3b4554 0%, #2a313c 70%, #222831 100%) !important; border-color: var(--dk-line) !important; }
html[data-theme="dark"] .item-tile-art, html[data-theme="dark"] .hat-thumb, html[data-theme="dark"] .mesh-thumb,
html[data-theme="dark"] .mesh-viewer, html[data-theme="dark"] .item-spin, html[data-theme="dark"] .audio-thumb,
html[data-theme="dark"] .hat-preview, html[data-theme="dark"] .gift-card .gift-box-view {
    background: radial-gradient(circle at 50% 40%, #3a4452 0%, #2a313c 70%, #222831 100%) !important;
}
html[data-theme="dark"] .review-card .review-art { background: repeating-conic-gradient(#2a313c 0 25%, #333b47 0 50%) 0 0 / 16px 16px !important; }
html[data-theme="dark"] .game-thumb { border-color: var(--dk-line) !important; }

/* ── Buttons: dark pills; red stays red ─────────────── */
html[data-theme="dark"] .btn, html[data-theme="dark"] button.btn, html[data-theme="dark"] a.btn,
html[data-theme="dark"] .return-button, html[data-theme="dark"] .logout-button, html[data-theme="dark"] .text-action-button,
html[data-theme="dark"] .mini-action-button.secondary, html[data-theme="dark"] .social-button, html[data-theme="dark"] .dots-button,
html[data-theme="dark"] .creation-filters button, html[data-theme="dark"] .btn-reject, html[data-theme="dark"] .btn-manage,
html[data-theme="dark"] .admin-btn {
    background: #262C36 !important;
    border-color: #3A414D !important;
    box-shadow: 0 2px 0 #12151A !important;
    color: #E8ECF0 !important;
}
html[data-theme="dark"] .btn:hover, html[data-theme="dark"] .return-button:hover, html[data-theme="dark"] .text-action-button:hover,
html[data-theme="dark"] .social-button:hover, html[data-theme="dark"] .admin-btn:hover { background: #2E3541 !important; border-color: #4A5260 !important; }
html[data-theme="dark"] .social-button[aria-pressed="true"] { background: #3A1E21 !important; border-color: var(--red) !important; }
html[data-theme="dark"] .btn.danger, html[data-theme="dark"] .btn-reject { color: #FF8A80 !important; }
html[data-theme="dark"] .btn.go, html[data-theme="dark"] .signup-button, html[data-theme="dark"] .signup-submit-button,
html[data-theme="dark"] .btn.primary, html[data-theme="dark"] .submit-button, html[data-theme="dark"] .login-button,
html[data-theme="dark"] .btn.danger.solid {
    background: var(--red) !important;
    border-color: #7E1215 !important;
    box-shadow: 0 3px 0 #7E1215 !important;
    color: #fff !important;
}
html[data-theme="dark"] .btn.go:hover, html[data-theme="dark"] .btn.primary:hover, html[data-theme="dark"] .submit-button:hover,
html[data-theme="dark"] .login-button:hover, html[data-theme="dark"] .signup-button:hover { background: #EA3438 !important; }
html[data-theme="dark"] .btn img, html[data-theme="dark"] .account-dropdown a img { filter: none; }

/* ── Forms ──────────────────────────────────────────── */
html[data-theme="dark"] input[type="text"], html[data-theme="dark"] input[type="password"], html[data-theme="dark"] input[type="email"],
html[data-theme="dark"] input[type="search"], html[data-theme="dark"] input[type="number"], html[data-theme="dark"] input[type="url"],
html[data-theme="dark"] input:not([type]), html[data-theme="dark"] textarea, html[data-theme="dark"] select,
html[data-theme="dark"] .login-input, html[data-theme="dark"] .signup-input, html[data-theme="dark"] .price-input,
html[data-theme="dark"] .search-box, html[data-theme="dark"] [contenteditable="true"] {
    background: #171b21 !important;
    border-color: #4f5c6d !important;
    color: var(--dk-strong) !important;
}
html[data-theme="dark"] .search-box input { background: transparent !important; }
html[data-theme="dark"] input::placeholder, html[data-theme="dark"] textarea::placeholder { color: #7d8896 !important; }
html[data-theme="dark"] input:focus, html[data-theme="dark"] textarea:focus, html[data-theme="dark"] select:focus { outline-color: #6fa0e6 !important; }

/* ── Tabs: the pill switch, dark ─────────────────────── */
html[data-theme="dark"] .sort-tabs, html[data-theme="dark"] .create-tabs, html[data-theme="dark"] .admin-tabs,
html[data-theme="dark"] #tab-catalog .sort-tabs { background: #1B2028 !important; border: 0 !important; }
html[data-theme="dark"] .sort-tabs button, html[data-theme="dark"] .create-tabs button, html[data-theme="dark"] .create-tabs a,
html[data-theme="dark"] .admin-tabs button, html[data-theme="dark"] .tab-btn {
    background: transparent !important; border: 0 !important; box-shadow: none !important; color: #9BA7B4 !important;
}
html[data-theme="dark"] .sort-tabs button[aria-selected="true"], html[data-theme="dark"] .create-tabs [aria-selected="true"],
html[data-theme="dark"] .create-tabs .active, html[data-theme="dark"] .admin-tabs [aria-selected="true"],
html[data-theme="dark"] .admin-tabs .active, html[data-theme="dark"] .tab-btn.active, html[data-theme="dark"] .tab-btn[aria-selected="true"],
html[data-theme="dark"] #tab-catalog .sort-tabs button[aria-selected="true"] {
    background: #2B313B !important; color: #FF6B6B !important; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4) !important;
}

/* ── Tables ─────────────────────────────────────────── */
html[data-theme="dark"] table th, html[data-theme="dark"] .forum-category th, html[data-theme="dark"] .legal-doc th {
    background: #1F242C !important; border-bottom-color: var(--dk-line) !important; color: var(--dk-muted) !important;
}
html[data-theme="dark"] table td { border-color: var(--dk-line) !important; }
html[data-theme="dark"] .forum-category tbody tr:nth-child(even), html[data-theme="dark"] .topic-table tbody tr:nth-child(even),
html[data-theme="dark"] .admin-table tbody tr:nth-child(even) { background: #232931 !important; }
html[data-theme="dark"] .topic-table tbody tr:hover, html[data-theme="dark"] .admin-table tbody tr:hover { background: #1f2e42 !important; }

/* ── Footer ─────────────────────────────────────────── */
html[data-theme="dark"] .site-footer { border-top-color: var(--dk-line) !important; color: var(--dk-muted) !important; }

/* ── Pop-ups built with inline styles (Terms prompt and similar) ── */
html[data-theme="dark"] #terms-popup > div { background: var(--dk-surface) !important; color: var(--dk-text) !important; border-color: #555f6d !important; }
html[data-theme="dark"] #terms-popup a { color: var(--dk-link) !important; }
html[data-theme="dark"] [style*="background:#fff"], html[data-theme="dark"] [style*="background: #fff"],
html[data-theme="dark"] [style*="background:white"], html[data-theme="dark"] [style*="background: white"] {
    background: var(--dk-surface) !important; color: var(--dk-text) !important;
}
html[data-theme="dark"] [style*="color: #2e7d32"], html[data-theme="dark"] [style*="color:#2e7d32"] { color: #7fd88d !important; }

/* ── Appearance picker (Account Settings) ──────────── */
.theme-choice { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 0; }
.theme-choice label {
    align-items: center; border: 1px solid var(--line-strong, #a5a5a5); cursor: pointer;
    display: inline-flex; gap: 6px; padding: 5px 10px;
}
.theme-choice input { margin: 0; }
.theme-choice label:has(input:checked) { border-color: #316ac5; outline: 1px solid #316ac5; }
html[data-theme="dark"] .theme-choice label { border-color: var(--dk-line-strong); }
html[data-theme="dark"] .theme-choice label:has(input:checked) { border-color: #6fa0e6; outline-color: #6fa0e6; }

/* Email status line in Account Settings */
.email-status { align-items: center; display: inline-flex; flex-wrap: wrap; gap: 8px; }
.email-pill { border: 1px solid; font: bold 10px/1 Verdana, sans-serif; padding: 3px 5px; text-transform: uppercase; }
.email-pill.verified { background: #e3f5e6; border-color: #8fcf9a; color: #23702f; }
.email-pill.unverified { background: #fff3cf; border-color: #e0c060; color: #7a5b00; }
html[data-theme="dark"] .email-pill.verified { background: #1e3a24; border-color: #3c7a48; color: #9be3a6; }
html[data-theme="dark"] .email-pill.unverified { background: #3a321a; border-color: #6b5a24; color: #f3d98a; }

/* Account Settings: space between the boxes (same gap as the Bio box). */
#email-card, #appearance-card { margin-top: 22px; }
html[data-theme="dark"] { --green-dark: #6fd17d; }
html[data-theme="dark"] .game-playing.live, html[data-theme="dark"] .game-tile-stats .live, html[data-theme="dark"] .my-game-meta .live,
html[data-theme="dark"] .game-stats dd.live { color: #6fd17d !important; }
html[data-theme="dark"] .not-found-card { box-shadow: none !important; }
html[data-theme="dark"] .form-alert.error { background: #3d2220 !important; border-color: #7a3a33 !important; color: #f5c6c1 !important; }
html[data-theme="dark"] .form-alert.notice { background: #1e3a24 !important; border-color: #3c7a48 !important; color: #b9ecc1 !important; }

/* ── New theme bits (2026-11-09) ───────────────────────── */
html[data-theme="dark"] { --red: #E0282C; --line: #343B47; --line-strong: #434B58; --wash: #1A1F27; --link: #6FB0FF; }
html[data-theme="dark"] .headshot.ring { box-shadow: 0 0 0 3px #14171C, 0 0 0 5px var(--red) !important; }
html[data-theme="dark"] .hero-kicker { color: #FF6B6B !important; }
html[data-theme="dark"] .home-hero-new {
    background: radial-gradient(circle at 85% 20%, rgba(255, 201, 60, 0.12), transparent 40%),
                radial-gradient(circle at 10% 90%, rgba(224, 40, 44, 0.16), transparent 45%),
                linear-gradient(135deg, #1F242B 0%, #251D20 100%) !important;
}
html[data-theme="dark"] .card.studio-download { background: linear-gradient(135deg, #1F242B 0%, #2A1D20 100%) !important; border-color: #4A2A2D !important; }
html[data-theme="dark"] .section-count { background: #262C36 !important; }
html[data-theme="dark"] .site-footer a { color: var(--dk-muted) !important; }
html[data-theme="dark"] .site-footer .footer-fine, html[data-theme="dark"] .site-footer .footer-fine a { color: #7D8794 !important; }
html[data-theme="dark"] .game-tile-name { color: var(--dk-strong) !important; }
html[data-theme="dark"] .board-title { color: var(--dk-strong) !important; }
html[data-theme="dark"] input:focus, html[data-theme="dark"] textarea:focus, html[data-theme="dark"] select:focus { border-color: var(--red) !important; box-shadow: 0 0 0 3px rgba(224, 40, 44, 0.25) !important; }
html[data-theme="dark"] .forum-category tbody tr:nth-child(even) { background: #1D2229 !important; }
html[data-theme="dark"] .legal-tabs { background: #1B2028 !important; }
html[data-theme="dark"] .legal-tabs a { background: transparent !important; color: #9BA7B4 !important; }
html[data-theme="dark"] .legal-tabs a[aria-current="page"] { background: #2B313B !important; color: #FF6B6B !important; }
