/* Active DEV frontend dark-color counterparts.
 * Layout, spacing, type, radius and interaction remain owned by the white-mode CSS.
 */
body.theme-dark {
    --rb-main-bg: #121212;
    --theme-bg: var(--rb-main-bg);
    --theme-surface: var(--rb-main-bg);
    --theme-surface-subtle: #202020;
    --theme-surface-muted: #191919;
    --theme-border: #303030;
    --theme-border-strong: #444;
    --theme-text: #f2f2f2;
    --theme-text-soft: #b5b5b5;
    --theme-text-muted: #858585;
    --theme-overlay: rgba(0,0,0,.35);
    --theme-shadow: 0 16px 40px rgba(0,0,0,.12);
    --theme-input-bg: #191919;
    --theme-input-border: #3a3a3a;
    --portal-ink: var(--theme-text);
    --portal-soft: rgba(255,255,255,.05);
    --portal-active: rgba(242,97,184,.12);
    --portal-muted: var(--theme-text-soft);
    --portal-dim: var(--theme-text-muted);
    --portal-border: var(--theme-border);
    --portal-border-strong: var(--theme-border-strong);
    --portal-panel: var(--rb-main-bg);
    --portal-subtle: var(--theme-surface-subtle);
    --portal-row: var(--theme-surface-muted);
    --portal-shadow: var(--theme-shadow);
    --portal-success-bg: rgba(53,201,138,.15);
    --portal-success-border: transparent;
    --portal-success-text: #92dfb4;
    --portal-success-hover: #a7e7c2;
    background-color: var(--rb-main-bg);
    color: var(--theme-text);
    color-scheme: dark;
}

html:has(body.theme-dark) {
    background-color: #121212;
    color-scheme: dark;
    scrollbar-color: #444 #121212;
}

html:has(body.theme-dark)::-webkit-scrollbar {
    background: #121212;
}

html:has(body.theme-dark)::-webkit-scrollbar-track {
    background: #121212;
}

html:has(body.theme-dark)::-webkit-scrollbar-thumb {
    border: 2px solid #121212;
    border-radius: 999px;
    background: #444;
}

html.theme-switching,
html.theme-switching::before,
html.theme-switching::after,
html.theme-switching *,
html.theme-switching *::before,
html.theme-switching *::after {
    transition-property: transform, opacity, left, right, top, bottom, width, height, max-width, max-height !important;
}

/* Site shell: all three white source surfaces resolve to the same dark background. */
body.theme-dark #main,
body.theme-dark #contents_wrap,
body.theme-dark .sub,
body.theme-dark .index {
    background-color: var(--rb-main-bg) !important;
    color: var(--theme-text);
}

body.theme-dark #header.p-portal {
    background-color: var(--rb-main-bg);
}

body.theme-dark .nv-panel {
    background-color: var(--rb-main-bg);
}

body.theme-dark .portal_search_suggest,
body.theme-dark .quest-panel,
body.theme-dark .header-account-panel {
    border-color: var(--theme-border);
}

body.theme-dark #board_event_pop .rb-event-popup-actions button {
    color: var(--theme-text);
}

body.theme-dark .rb_bbs_wrap .point_info_btns svg [fill]:not([fill="none"]) {
    fill: #fff !important;
}

body.theme-dark .rb_bbs_wrap .point_info_btns svg {
    color: #fff;
}

body.theme-dark .level-header,
body.theme-dark .level-row {
    border-color: var(--theme-border);
}

body.theme-dark .level-cell:last-child,
body.theme-dark .level-number {
    color: var(--theme-text);
}

body.theme-dark .level-header,
body.theme-dark .level-header .level-cell:last-child {
    color: var(--theme-text-muted);
}

body.theme-dark .level-row.is-current {
    background-color: var(--theme-surface-subtle) !important;
}

body.theme-dark .rb_bbs_wrap .rb-board-table svg,
body.theme-dark .profile-content .rb-board-table svg {
    color: #fff;
    stroke: #fff;
}

body.theme-dark .rb_bbs_wrap .fl_btns:not(.main_color_bg) img,
body.theme-dark .rb_bbs_wrap .rb-board-media-icon,
body.theme-dark .profile-content .rb-board-media-icon {
    filter: brightness(0) invert(1);
}

body.theme-dark .rb_bbs_wrap .point_info_btns {
    border-color: var(--theme-border);
}

body.theme-dark .rb_bbs_wrap .point_info_btns:hover,
body.theme-dark .rb_bbs_wrap .point_info_btns.act {
    border-color: var(--theme-border-strong);
}

body.theme-dark .rb_bbs_wrap .point_info_opens,
body.theme-dark .rb_bbs_wrap .rb_bbs_set_opens {
    background-color: #121212;
    border-color: var(--theme-border);
}

body.theme-dark .rb_bbs_wrap .point_info_btns_wrap ul {
    background-color: var(--theme-surface-muted);
}

body.theme-dark .search_top_wrap input::placeholder {
    color: var(--theme-text-muted) !important;
}

body.theme-dark .p-chip,
body.theme-dark .search_top_wrap_inner > button,
body.theme-dark .snb_wrap .qm_wrap > a,
body.theme-dark .snb_wrap .qm_wrap > button.quest-menu,
body.theme-dark .snb_wrap .shop_wrap > .shop-toggle,
body.theme-dark .snb_wrap .guest-menu-toggle,
body.theme-dark .snb_wrap .search_mobile_wrap button,
body.theme-dark .nv-section-title,
body.theme-dark .header-login {
    color: var(--theme-text);
}

body.theme-dark .nv-link:not(.is-active):not(:hover) {
    color: var(--theme-text);
}

body.theme-dark .quest-panel-title span,
body.theme-dark .quest-section-head > span,
body.theme-dark .quest-copy em,
body.theme-dark .quest-copy small,
body.theme-dark .quest-reward > span,
body.theme-dark .quest-empty,
body.theme-dark .rb-member-name span,
body.theme-dark .rb-member-exp-head > span,
body.theme-dark .rb-member-exp-meta,
body.theme-dark .rb-member-status-row > span {
    color: var(--theme-text-soft);
}

body.theme-dark .quest-progress,
body.theme-dark .quest-row,
body.theme-dark .quest-claim-button.is-claiming,
body.theme-dark .rb-member-exp-progress {
    background-color: var(--theme-surface-subtle) !important;
    border-color: var(--theme-border);
    color: var(--theme-text);
}

body.theme-dark .quest-panel-header,
body.theme-dark .nv-divider {
    border-color: var(--theme-border);
}

body.theme-dark .quest-reward .quest-reward-exp {
    border: 0;
    background: #252e4c;
    color: #b9c5fb;
}

body.theme-dark .quest-reward .quest-reward-point {
    border: 0;
    background: #3a2a19;
    color: #efc987;
}


body.theme-dark .quest-panel-title [data-quest-claim-summary] {
    color: var(--rb-main-color);
}

body.theme-dark .quest-panel .rb-window-close img,
body.theme-dark .shop-panel .rb-window-close img,
body.theme-dark .point-panel .rb-window-close img {
    filter: brightness(0) invert(1);
    opacity: .75;
}

body.theme-dark .shop-panel-row:hover,
body.theme-dark .shop-panel-row:focus-within {
    background: var(--theme-surface-subtle);
}

body.theme-dark .shop-panel-scroll {
    scrollbar-color: var(--theme-border-strong) transparent;
}

body.theme-dark .shop-panel-scroll::-webkit-scrollbar-thumb {
    border-color: var(--theme-surface);
    background: var(--theme-border-strong);
}

body.theme-dark .shop-panel-status,
body.theme-dark .shop-panel-side .shop-history-state.is-paid {
    color: #92dfb4;
}

body.theme-dark .shop-panel-side .shop-history-state {
    background: var(--theme-border);
    color: var(--theme-text-soft);
}

body.theme-dark .shop-panel-side .shop-history-state.is-paid {
    border: 0;
    background: rgba(53,201,138,.15);
}

body.theme-dark .shop-panel-side .shop-history-state.is-reward {
    background: #3a2a19;
    color: #efc987;
}

body.theme-dark .shop-panel-side > .shop-panel-price {
    color: #efc987;
}

body.theme-dark .rb_bbs_wrap .lb_ico_noti {
    background-color: var(--theme-text);
    color: #121212;
}

body.theme-dark .portal_search_suggest,
body.theme-dark .header-account-panel,
body.theme-dark .nv-body {
    scrollbar-color: #666 transparent;
}

body.theme-dark .portal_search_suggest::-webkit-scrollbar-thumb,
body.theme-dark .nv-body:hover::-webkit-scrollbar-thumb {
    background-color: #666;
}

body.theme-dark .header-account-panel::-webkit-scrollbar-thumb {
    background-color: #666;
    border-color: #121212;
}

/* Footer */
body.theme-dark footer,
body.theme-dark footer .footer_gnb,
body.theme-dark footer .footer_copy {
    background-color: #121212;
    border-color: var(--theme-border);
}

body.theme-dark footer .footer_gnb a,
body.theme-dark footer .footer_copy a,
body.theme-dark footer .footer_copy dd,
body.theme-dark footer .footer_copy_ul1_li3 {
    color: var(--theme-text-soft);
}

body.theme-dark footer .footer_btn {
    border-color: var(--theme-border-strong);
    color: var(--theme-text-soft);
}

/* Shared form and table colors from the active GNUBoard frontend styles. */
body.theme-dark input[type=text],
body.theme-dark input[type=tel],
body.theme-dark input[type=password],
body.theme-dark input[type=email],
body.theme-dark input[type=number],
body.theme-dark input[type=date],
body.theme-dark input[type=datetime-local],
body.theme-dark input[type=time],
body.theme-dark input[type=file],
body.theme-dark select,
body.theme-dark textarea,
body.theme-dark .frm_input {
    background-color: var(--theme-input-bg) !important;
    border-color: var(--theme-input-border) !important;
    color: var(--theme-text) !important;
}

body.theme-dark input:focus,
body.theme-dark select:focus,
body.theme-dark textarea:focus,
body.theme-dark .frm_input:focus {
    border-color: var(--theme-text-soft) !important;
}

body.theme-dark .search_top_wrap input {
    background-color: #212121 !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    color: var(--theme-text) !important;
}

body.theme-dark .search_top_wrap input:focus,
body.theme-dark .search_top_wrap input:focus-visible {
    outline-color: var(--theme-text-soft) !important;
}

body.theme-dark .rb_btm_search_pn,
body.theme-dark .fixed_rb_btm_s {
    background-color: var(--rb-main-bg);
    color: var(--theme-text);
}

body.theme-dark .rb_btm_search_pn_li1 button,
body.theme-dark .rb_btm_search_pn_li3 button {
    background: transparent;
    color: var(--theme-text);
}

body.theme-dark .rb_btm_search_pn_li2 {
    border-color: var(--theme-border);
}

body.theme-dark .rb_btm_search_pn_li2 input {
    background-color: #212121 !important;
    color: var(--theme-text) !important;
}

body.theme-dark .rb_btm_search_pn_li2 input::placeholder {
    color: var(--theme-text-muted);
}

body.theme-dark .rb_btm_search_pn_li2 input:focus {
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
}

body.theme-dark .rb_btm_search_pn .rb_live_suggest_btn,
body.theme-dark .rb_btm_search_pn .rb_recent_search_btn,
body.theme-dark .rb_btm_search_pn .rb_btm_heading,
body.theme-dark .rb_btm_search_pn .rb_swiper_hub_1_wrap_t a {
    color: var(--theme-text);
}

body.theme-dark .rb_btm_search_pn .rb_live_suggest_sub,
body.theme-dark .rb_btm_search_pn .rb_recent_search_delete,
body.theme-dark .rb_btm_search_pn .rb_recent_search_empty,
body.theme-dark .rb_btm_search_pn .content-more-btn,
body.theme-dark .rb_btm_search_pn .rb_swiper_hub_1_wrap_i {
    color: var(--theme-text-muted);
}

body.theme-dark .rb_btm_search_pn .rb_live_suggest_btn::before,
body.theme-dark .rb_btm_search_pn .rb_recent_search_icon,
body.theme-dark .rb_btm_search_pn .ser_label,
body.theme-dark .rb_btm_search_pn .content-more-btn:hover,
body.theme-dark .rb_btm_search_pn .content-more-btn:focus {
    background-color: var(--theme-surface-subtle);
}

body.theme-dark .rb_btm_search_pn .ser_label {
    color: var(--theme-text);
}

body.theme-dark .rb_btm_search_pn .content-divider::before,
body.theme-dark .rb_btm_search_pn .content-divider::after {
    background-color: var(--theme-border);
}

body.theme-dark .rb_btm_search_pn svg path[fill="#09244B"] {
    fill: var(--theme-text);
}

body.theme-dark .portal_search_suggest .rb_live_suggest_btn,
body.theme-dark .portal_search_suggest .rb_recent_search_btn,
body.theme-dark .portal_search_suggest .rb_btm_heading,
body.theme-dark .portal_search_suggest .rb_swiper_hub_1_wrap_t a {
    color: var(--theme-text);
}

body.theme-dark .portal_search_suggest .rb_live_suggest_sub,
body.theme-dark .portal_search_suggest .rb_recent_search_delete,
body.theme-dark .portal_search_suggest .rb_recent_search_empty,
body.theme-dark .portal_search_suggest .content-more-btn,
body.theme-dark .portal_search_suggest .rb_swiper_hub_1_wrap_i {
    color: var(--theme-text-muted);
}

body.theme-dark .portal_search_suggest .rb_live_suggest_btn::before,
body.theme-dark .portal_search_suggest .rb_recent_search_icon,
body.theme-dark .portal_search_suggest .ser_label,
body.theme-dark .portal_search_suggest .content-more-btn:hover,
body.theme-dark .portal_search_suggest .content-more-btn:focus {
    background-color: var(--theme-surface-subtle);
}

body.theme-dark .portal_search_suggest .ser_label,
body.theme-dark input::placeholder,
body.theme-dark textarea::placeholder {
    color: var(--theme-text-muted);
}

body.theme-dark .portal_search_suggest .content-more-btn:hover,
body.theme-dark .portal_search_suggest .content-more-btn:focus {
    color: var(--theme-text);
}

body.theme-dark .portal_search_suggest .content-divider::before,
body.theme-dark .portal_search_suggest .content-divider::after {
    background-color: var(--theme-border);
}

body.theme-dark .tbl_wrap table,
body.theme-dark .tbl_head01 table,
body.theme-dark .tbl_head02 table,
body.theme-dark .new_win .tbl_wrap table {
    background-color: #121212;
    color: var(--theme-text);
}

body.theme-dark .tbl_head01 thead th,
body.theme-dark .tbl_head02 thead th,
body.theme-dark .tbl_frm01 th {
    background-color: var(--theme-surface-subtle);
    border-color: var(--theme-border);
    color: var(--theme-text-soft);
}

body.theme-dark .tbl_head01 td,
body.theme-dark .tbl_head02 td,
body.theme-dark .tbl_frm01 td {
    border-color: var(--theme-border);
}

body.theme-dark .tbl_head01 tbody tr:hover td,
body.theme-dark .tbl_head02 tbody tr:hover td {
    background-color: var(--theme-surface-subtle);
}

body.theme-dark .pg_page {
    background-color: transparent;
    border-color: transparent;
    color: var(--theme-text-soft);
}

body.theme-dark .pg_page:hover {
    background-color: var(--theme-surface-subtle);
}

/* rb.bbs common list, category and sort controls */
body.theme-dark .rb_bbs_wrap {
    color: var(--theme-text);
}

body.theme-dark .rb_bbs_wrap .rb_bbs_top li.cnts,
body.theme-dark .rb_bbs_wrap #bo_list_total,
body.theme-dark .rb_bbs_wrap .bo_cnt,
body.theme-dark .rb_bbs_wrap .gall_info .gall_date,
body.theme-dark .rb_bbs_wrap .gall_info .gall_view,
body.theme-dark .rb_bbs_wrap .rb_bbs_for_info1_num,
body.theme-dark .rb_bbs_wrap .rb_bbs_for_info2 li,
body.theme-dark .rb_bbs_wrap .view_info_span,
body.theme-dark .rb_bbs_wrap .view_info_span_ip,
body.theme-dark .rb_bbs_wrap .view_info_span a,
body.theme-dark .rb_bbs_wrap .rb_bbs_for_cont_txt {
    color: var(--theme-text-soft);
}

body.theme-dark .rb_bbs_wrap #bo_cate {
    border-color: var(--theme-border);
}

body.theme-dark .rb_bbs_wrap #bo_cate #bo_cate_ul::before {
    background-color: var(--theme-border);
}

body.theme-dark .rb_bbs_wrap #bo_cate a {
    background-color: transparent;
    color: var(--theme-text);
}

body.theme-dark .rb_bbs_wrap #bo_cate #bo_cate_on,
body.theme-dark .rb_bbs_wrap #bo_cate .is-active {
    background-color: transparent;
    border-color: transparent;
    color: var(--rb-main-color);
}

body.theme-dark .bo_cate_wrap #bo_cate + .right-area {
    background-color: #121212;
    box-shadow: -18px 0 18px #121212;
}

body.theme-dark .section-header > h2,
body.theme-dark .right-area .sort_box > .sort,
body.theme-dark .right-area .more_btn {
    color: var(--theme-text);
}

body.theme-dark .right-area .sort_box .sort_menu {
    background-color: #121212;
    border-color: var(--theme-border);
    box-shadow: 0 16px 40px rgba(0,0,0,.12);
}

body.theme-dark .right-area .sort_box .sort_menu > li > a {
    color: var(--theme-text);
}

body.theme-dark .right-area .sort_box .sort_menu > li > a:hover,
body.theme-dark .right-area .sort_box .sort_menu > li > a:focus {
    background-color: var(--theme-surface-subtle);
    color: var(--theme-text);
}

body.theme-dark .right-area .sort_box .sort_menu > li.is-active > a {
    color: var(--rb-main-color);
}

body.theme-dark .rb_bbs_wrap .rb_bbs_for,
body.theme-dark .rb_bbs_wrap .rb_best_body,
body.theme-dark .rb_bbs_wrap .rb_best_item,
body.theme-dark .rb_bbs_wrap .rb_best_no_data,
body.theme-dark .rb_bbs_wrap .rb_best_col + .rb_best_col {
    border-color: var(--theme-border);
}

body.theme-dark .rb_bbs_wrap .rb_best_wrap,
body.theme-dark .rb_bbs_wrap .rb_best_head .tit,
body.theme-dark .rb_bbs_wrap .rb_best_item a,
body.theme-dark .rb_bbs_wrap .rb_best_item .subj {
    color: var(--theme-text);
}

body.theme-dark .rb_bbs_wrap .rb_best_tabs button.best_tab {
    background-color: var(--theme-surface-muted);
    color: var(--theme-text-soft);
}

body.theme-dark .rb_bbs_wrap .rb_best_tabs button.best_tab:hover {
    background-color: var(--theme-surface-subtle);
    color: var(--theme-text);
}

body.theme-dark .rb_bbs_wrap .rb_best_tabs button.best_tab.active {
    background-color: rgba(242,97,184,.12);
    color: var(--rb-main-color);
}

body.theme-dark .rb_bbs_wrap .rb_best_toggle_line::before,
body.theme-dark .rb_bbs_wrap .rb_best_toggle_line::after {
    background-color: var(--theme-border);
}

body.theme-dark .rb_bbs_wrap .rb_best_toggle {
    color: var(--theme-text-muted);
}

body.theme-dark .rb_bbs_wrap .rb_best_toggle:hover,
body.theme-dark .rb_bbs_wrap .rb_best_toggle:focus {
    background-color: var(--theme-surface-subtle);
    color: var(--theme-text);
}

body.theme-dark .rb_bbs_wrap .btm_btns .fl_btns,
body.theme-dark .rb_bbs_wrap .btns_gr_wrap .btns_gr .fl_btns {
    background-color: #121212;
    border-color: var(--theme-border);
    color: var(--theme-text-soft);
}

body.theme-dark .rb_bbs_write_wrap .btn_cancel {
    background-color: var(--theme-surface-subtle) !important;
    border-color: var(--theme-border) !important;
    color: var(--theme-text) !important;
}

body.theme-dark .rb_bbs_wrap .rb-board-table,
body.theme-dark .profile-content .rb-board-table,
body.theme-dark .rb_bbs_wrap .rb-board-table th,
body.theme-dark .profile-content .rb-board-table th,
body.theme-dark .rb_bbs_wrap .rb-board-table td,
body.theme-dark .profile-content .rb-board-table td {
    border-color: var(--theme-border);
}

body.theme-dark .rb_bbs_wrap .rb-board-table tbody tr[data-href]:hover,
body.theme-dark .profile-content .rb-board-table tbody tr[data-href]:hover,
body.theme-dark .rb_bbs_wrap .rb-board-table tbody tr[data-href]:hover td,
body.theme-dark .profile-content .rb-board-table tbody tr[data-href]:hover td {
    background-color: var(--theme-surface-muted);
}

body.theme-dark .rb_bbs_wrap .chk_box input[type="checkbox"] + label {
    color: var(--theme-text-soft);
}

body.theme-dark .rb_bbs_wrap .chk_box input[type="checkbox"] + label span {
    background-color: #121212;
    border-color: var(--theme-input-border);
}

body.theme-dark .rb_bbs_wrap .chk_box input[type="checkbox"]:checked + label {
    color: var(--theme-text);
}

body.theme-dark .rb_bbs_wrap .rb-current-row td,
body.theme-dark .profile-content .rb-current-row td,
body.theme-dark .rb_bbs_wrap .gallery-item.is-current {
    background-color: #211d16;
}

body.theme-dark .rb_bbs_wrap .is-unlocked,
body.theme-dark .profile-content .is-unlocked {
    background-color: #151e22;
}

/* Active gallery-list skin colors */
body.theme-dark .rb_bbs_gallery .gallery-item-info-sub,
body.theme-dark .list_gallery .gallery-item-info-sub,
body.theme-dark .list_gallery .gallery-meta,
body.theme-dark .list_gallery .gallery-meta-good,
body.theme-dark .rb_bbs_gallery .rb-promo-info,
body.theme-dark .rb_bbs_gallery .rb-promo-info-row b,
body.theme-dark .rb_bbs_gallery .rb-promo-info-row a,
body.theme-dark .gallery-genre-wrap a > span:last-child {
    color: var(--theme-text-soft);
}

body.theme-dark .rb_bbs_gallery .gallery-item-tit a,
body.theme-dark .list_gallery .gallery-item-tit a,
body.theme-dark .rb_model_promo .bbs_main_wrap_tit_l a {
    color: var(--theme-text);
}

body.theme-dark .rb_model_promo .bbs_main_wrap_tit_l span {
    color: var(--theme-text) !important;
}

body.theme-dark .gallery-genre-wrap a > span:first-child {
    background-color: #121212;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}

body.theme-dark .rb_bbs_gallery .order_row,
body.theme-dark .list_gallery .order_row {
    background-color: rgba(18,18,18,.58);
    box-shadow: 0 4px 14px rgba(0,0,0,.10);
}

body.theme-dark .rb_bbs_gallery .order_field,
body.theme-dark .rb_bbs_gallery .order_label,
body.theme-dark .list_gallery .order_field,
body.theme-dark .list_gallery .order_label {
    color: var(--theme-text-soft);
}

body.theme-dark .rb_bbs_gallery .order_input,
body.theme-dark .list_gallery .order_input {
    background-color: rgba(255,255,255,.10) !important;
    color: var(--theme-text) !important;
}

body.theme-dark .rb_bbs_gallery .order_input:focus,
body.theme-dark .list_gallery .order_input:focus {
    outline-color: var(--theme-text-soft);
}

/* Video category modal: its white owners are rendered inline by category/videos/skin.php. */
body.theme-dark .rb-category-panel {
    background-color: #121212;
    border-color: var(--theme-border);
    box-shadow: 0 24px 70px rgba(0,0,0,.22);
}

body.theme-dark .rb-category-head strong,
body.theme-dark .rb-category-section h3,
body.theme-dark .rb-category-group h4,
body.theme-dark .rb-category-option label,
body.theme-dark .rb-category-footer #rbCategoryReset {
    color: var(--theme-text);
}

body.theme-dark .rb-category-head .rb_login_modal_close img {
    filter: brightness(0) invert(1);
}

body.theme-dark .rb-category-section {
    border-color: var(--theme-border);
}

body.theme-dark .rb-category-footer {
    background-color: var(--theme-bg);
}

body.theme-dark .rb-category-footer .rb-category-apply {
    background-color: var(--rb-main-color);
    color: #fff;
}

/* rb.bbs view, comments and its own popups */
body.theme-dark .rb-locked-view .gallery-item-img {
    background-color: var(--theme-surface-muted);
}

body.theme-dark .rb-locked-view p {
    color: var(--theme-text-soft);
}

body.theme-dark .rb-locked-view .rb-locked-actions a,
body.theme-dark .rb-locked-view .rb-locked-actions button {
    background-color: #121212;
    border-color: var(--theme-border);
    color: var(--theme-text);
}

body.theme-dark .rb-locked-view .rb-locked-actions .bbs_unlock_confirm {
    background-color: var(--rb-main-color);
    border-color: var(--rb-main-color);
    color: #fff;
}

body.theme-dark .rb_bbs_wrap #bo_v {
    background-color: #121212;
}

body.theme-dark .rb_bbs_wrap .rb_view_title {
    border-top-color: var(--theme-border) !important;
}

body.theme-dark .rb_bbs_for_mem_view {
    border-bottom-color: var(--theme-border);
}

body.theme-dark .rb_bbs_wrap .rb_bbs_related h2,
body.theme-dark .rb_bbs_wrap .rb_bbs_related_item,
body.theme-dark .rb_bbs_wrap .rb_bbs_actions .rb_bbs_action {
    color: var(--theme-text);
}

body.theme-dark .rb_bbs_wrap .rb_bbs_related_connected .rb_bbs_related_item {
    border-color: var(--theme-border);
    background-color: var(--theme-surface-subtle);
}

body.theme-dark .rb_bbs_wrap .rb_bbs_related_item img {
    background-color: var(--theme-surface-subtle);
}

body.theme-dark .rb_bbs_wrap .rb_bbs_actions .rb_bbs_action:hover {
    background-color: var(--theme-surface-subtle);
    color: var(--theme-text);
}

body.theme-dark .rb_bbs_wrap .rb_bbs_actions .rb_bbs_action_popover {
    background-color: #121212;
    border-color: var(--theme-border);
}

body.theme-dark .rb_bbs_wrap .rb_bbs_actions .rb_bbs_action_popover_item {
    color: var(--theme-text);
}

body.theme-dark .rb_bbs_wrap .rb_bbs_actions .rb_bbs_action_popover_item:hover,
body.theme-dark .rb_bbs_wrap .rb_bbs_actions .rb_bbs_action_popover_item:focus {
    background-color: var(--theme-surface-subtle);
    color: var(--theme-text);
}

body.theme-dark .rb_bbs_wrap .rb-promo-view > .rb-promo-title,
body.theme-dark .rb_bbs_wrap .rb-promo-details dd,
body.theme-dark .rb_bbs_wrap .rb-promo-details dd a {
    color: var(--theme-text);
}

body.theme-dark .rb_bbs_wrap .rb-promo-details,
body.theme-dark .rb_bbs_wrap .rb-promo-details > div {
    border-color: var(--theme-border);
}

body.theme-dark .rb_bbs_wrap .rb-promo-details dt {
    background-color: var(--theme-surface-muted);
    color: var(--theme-text-soft);
}

/* rb.bbs model view */
body.theme-dark .rb_bbs_wrap .model-view-sidebar,
body.theme-dark .rb_bbs_wrap .model-view-section-title,
body.theme-dark .rb_bbs_wrap .model-view-basic-info,
body.theme-dark .rb_bbs_wrap .model-view-desc,
body.theme-dark .rb_bbs_wrap .model-view-switch-item:not(.is-active),
body.theme-dark .rb_bbs_wrap .model-view-switch-item:not(.is-active):hover {
    color: var(--theme-text);
}

body.theme-dark .rb_bbs_wrap .model-view-followers,
body.theme-dark .rb_bbs_wrap .model-view-no-videos,
body.theme-dark .rb_bbs_wrap .rb_bbs_gallery .gallery-meta-good-text {
    color: var(--theme-text-soft);
}

body.theme-dark .rb_bbs_wrap .model-view-avatar {
    background-color: var(--theme-surface-muted);
}

body.theme-dark .rb_bbs_wrap .model-view-header .bo_cate_wrap #bo_cate + .right-area .model-view-switch + .sort_box,
body.theme-dark .rb_bbs_wrap .model-view-header .bo_cate_wrap.bo_cate_wrap_no_category,
body.theme-dark .rb_bbs_wrap .model-view-header .bo_cate_wrap.bo_cate_wrap_no_category > .right-area .model-view-switch + .sort_box,
body.theme-dark .rb_bbs_wrap .model-view-no-videos {
    border-color: var(--theme-border);
}

body.theme-dark .rb_bbs_wrap .model-view-header .bo_cate_wrap.bo_cate_wrap_no_category > .right-area {
    background-color: #121212;
}

body.theme-dark .no_data {
    border-bottom-color: var(--theme-border);
    color: var(--theme-text-soft);
}

body.theme-dark .rb_bbs_wrap .writer_prof {
    background-color: #121212;
    border-color: var(--theme-border);
    color: var(--theme-text);
}

body.theme-dark .rb_bbs_wrap .writer_prof .writer_prof_ul1 .writer_prof_li_prof_txt,
body.theme-dark .rb_bbs_wrap .writer_prof_li_txt,
body.theme-dark .rb_bbs_wrap .p-lv-sub,
body.theme-dark .rb_bbs_wrap .p-lv-foot {
    color: var(--theme-text-soft);
}

body.theme-dark .rb_bbs_wrap .writer_prof .writer_prof_nameblock .prof_nick,
body.theme-dark .rb_bbs_wrap .writer_prof .writer_prof_ul1 .writer_prof_li_prof_txt .prof_nick .sv_wrap a,
body.theme-dark .rb_bbs_wrap .writer_prof_edge_btns .rb_bbs_action,
body.theme-dark .rb_bbs_wrap .p-lv-label,
body.theme-dark .rb_bbs_wrap .p-lv-chev,
body.theme-dark .rb_bbs_wrap .p-lv-pct {
    color: var(--theme-text);
}

body.theme-dark .rb_bbs_wrap .writer_prof_edge_btns .rb_bbs_action:hover {
    background-color: var(--theme-surface-subtle);
    color: var(--theme-text);
}

body.theme-dark .rb_bbs_wrap [data-rb-favorite].is-on {
    color: #f25565;
}

body.theme-dark .rb_bbs_wrap .rb_bbs_actions [data-rb-favorite].is-on:hover,
body.theme-dark .rb_bbs_wrap .writer_prof_edge_btns [data-rb-favorite].is-on:hover {
    color: #f25565;
}

body.theme-dark .rb_bbs_wrap .btns_gr_wrap .btns_gr [data-rb-favorite].is-on {
    color: #f25565;
}

body.theme-dark .rb_bbs_wrap .btns_gr_wrap .btns_gr [data-rb-favorite]:not(.is-on) {
    color: #fff;
}

body.theme-dark .rb_bbs_wrap .writer_prof_ul2 .fl_btns {
    background-color: #121212;
    border-color: var(--theme-border);
    color: var(--theme-text);
}

body.theme-dark .rb_bbs_write_wrap .select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M18.707 8.793a1 1 0 00-1.414 0L12 14.086 6.707 8.793a1 1 0 10-1.414 1.414L12 16.914l6.707-6.707a1 1 0 000-1.414Z'/%3E%3C/svg%3E");
}

/* Write-form dropdowns and related-content search results. */
body.theme-dark .rb_bbs_write_wrap .dropdown-menu-custom,
body.theme-dark .rb_bbs_write_wrap .board-relation-dropdown,
body.theme-dark .rb_bbs_write_wrap .related-results {
    background-color: var(--theme-surface-subtle);
    border-color: var(--theme-border);
    box-shadow: 0 12px 28px rgba(0,0,0,.32);
    color: var(--theme-text);
}

body.theme-dark .rb_bbs_write_wrap .dropdown-menu-custom,
body.theme-dark .rb_bbs_write_wrap .board-relation-dropdown,
body.theme-dark .rb_bbs_write_wrap select,
body.theme-dark .rb_bbs_write_wrap select option {
    color-scheme: dark;
}

body.theme-dark .rb_bbs_write_wrap select option {
    background-color: var(--theme-input-bg);
    color: var(--theme-text);
}

body.theme-dark .rb_bbs_write_wrap .dropdown-search-input,
body.theme-dark .rb_bbs_write_wrap .board-relation-search {
    background-color: var(--theme-input-bg);
    border-color: var(--theme-input-border);
    color: var(--theme-text);
}

body.theme-dark .rb_bbs_write_wrap .dropdown-search-input::placeholder,
body.theme-dark .rb_bbs_write_wrap .board-relation-search::placeholder {
    color: var(--theme-text-muted);
}

body.theme-dark .rb_bbs_write_wrap .dropdown-item-checkbox,
body.theme-dark .rb_bbs_write_wrap .board-relation-option,
body.theme-dark .rb_bbs_write_wrap .related-results-title,
body.theme-dark .rb_bbs_write_wrap .related-result {
    color: var(--theme-text);
}

body.theme-dark .rb_bbs_write_wrap .dropdown-item-checkbox:hover,
body.theme-dark .rb_bbs_write_wrap .board-relation-option:hover,
body.theme-dark .rb_bbs_write_wrap .board-relation-option:focus-within,
body.theme-dark .rb_bbs_write_wrap .related-result:hover,
body.theme-dark .rb_bbs_write_wrap .related-result:focus {
    background-color: var(--theme-surface-muted);
    color: var(--theme-text);
}

body.theme-dark .rb_bbs_write_wrap .related-result-thumb {
    background-color: var(--theme-surface-muted);
}

body.theme-dark .rb_bbs_write_wrap .related-result-content span,
body.theme-dark .rb_bbs_write_wrap .related-results-empty {
    color: var(--theme-text-soft);
}

body.theme-dark .rb_bbs_write_wrap .dropdown-menu-custom {
    scrollbar-color: var(--theme-border-strong) transparent;
}

body.theme-dark .rb_bbs_write_wrap .dropdown-menu-custom::-webkit-scrollbar-thumb {
    background-color: var(--theme-border-strong);
}

body.theme-dark .rb_bbs_wrap .rb_lb_track,
body.theme-dark .rb_bbs_wrap .rb_lb_fill::-webkit-progress-bar {
    background-color: var(--theme-surface-subtle);
    border-color: var(--theme-border);
}

body.theme-dark .rb_bbs_wrap .rb_lb_progress_text {
    color: var(--theme-text);
}

body.theme-dark .rb_bbs_wrap #bo_v_con {
    --tt-gray-light-a-50: rgba(255,255,255,.04);
    --tt-gray-light-a-100: rgba(255,255,255,.06);
    --tt-gray-light-a-200: rgba(255,255,255,.12);
    --tt-gray-light-a-400: rgba(255,255,255,.42);
    --tt-gray-light-a-500: rgba(255,255,255,.64);
    --tt-gray-light-a-700: rgba(255,255,255,.84);
    --tt-gray-light-a-800: rgba(255,255,255,.94);
    --tt-gray-light-a-900: rgba(255,255,255,.98);
    color: var(--theme-text);
}

body.theme-dark .rb_bbs_wrap .rb-rating-label,
body.theme-dark .rb_bbs_wrap .rb-rating-msg {
    color: var(--theme-text-soft);
}

body.theme-dark .rb_bbs_wrap .rb-rating-stats div {
    border-color: var(--theme-border);
}

body.theme-dark .rb_bbs_wrap .rb-rating-stats strong {
    color: var(--theme-text);
}

body.theme-dark .rb_bbs_wrap .rb-rating-stats span {
    color: var(--theme-text-soft);
}

body.theme-dark .rb_bbs_wrap .rb_notice_chk .fl_btns:not(.is-checked),
body.theme-dark .rb_bbs_wrap .rb_notice_chk .fl_btns.main_color_bg:not(.is-checked) {
    background-color: var(--theme-surface-subtle) !important;
    color: var(--theme-text) !important;
}

body.theme-dark .rb_bbs_wrap .cmt_btn {
    background-color: #121212;
}

body.theme-dark .rb_bbs_wrap .bo_v_nb li,
body.theme-dark .rb_bbs_wrap #bo_v_file li,
body.theme-dark .rb_bbs_wrap #bo_v_link li,
body.theme-dark .rb_bbs_wrap #bo_vc article,
body.theme-dark .rb_bbs_wrap .cmt_head.cmt_btn_op {
    border-color: var(--theme-border) !important;
}

body.theme-dark .rb_bbs_wrap #bo_v_info .if_date,
body.theme-dark .rb_bbs_wrap .bo_v_nb li i,
body.theme-dark .rb_bbs_wrap .bo_v_nb li .nb_tit,
body.theme-dark .rb_bbs_wrap .bo_v_nb li .nb_date,
body.theme-dark .rb_bbs_wrap #bo_v_file .bo_v_file_cnt,
body.theme-dark .rb_bbs_wrap #bo_v_link .bo_v_link_cnt,
body.theme-dark .rb_bbs_wrap .cm_wrap span,
body.theme-dark .rb_bbs_wrap #bo_vc .cmt_actions,
body.theme-dark .rb_bbs_wrap .cm_wrpa_write_left span {
    color: var(--theme-text-soft);
}

body.theme-dark .rb_bbs_wrap #bo_v_info {
    border-color: var(--theme-border) !important;
    color: var(--theme-text-soft);
}

body.theme-dark .rb_bbs_wrap #bo_v_info .sv_member,
body.theme-dark .rb_bbs_wrap #bo_v_con a,
body.theme-dark .rb_bbs_wrap #bo_v_file a,
body.theme-dark .rb_bbs_wrap #bo_v_link a,
body.theme-dark .rb_bbs_wrap .cmt_btn span.total,
body.theme-dark .rb_bbs_wrap #bo_vc .cmt_contents,
body.theme-dark .rb_bbs_wrap #bo_vc .cmt_act,
body.theme-dark .rb_bbs_wrap #bo_vc .bo_vl_opt button,
body.theme-dark .rb_bbs_wrap .bo_vc_w .btn_confirm label {
    color: var(--theme-text);
}

body.theme-dark .rb_bbs_wrap .bo_v_nb li:hover {
    background-color: var(--theme-surface-muted);
}

body.theme-dark .rb_bbs_write_wrap .guest_inp_wrap {
    background-color: var(--theme-surface-subtle);
    color: var(--theme-text);
}

body.theme-dark .rb_bbs_write_wrap .guest_inp_wrap .help_text {
    color: var(--theme-text-muted);
}

body.theme-dark .rb_bbs_wrap .rb-board-title-head a.font-R,
body.theme-dark .profile-content .rb-board-title-head a.font-R,
body.theme-dark .rb_bbs_wrap .rb-board-title-head .rb-board-subject,
body.theme-dark .profile-content .rb-board-title-head .rb-board-subject {
    color: var(--theme-text);
}

body.theme-dark .rb_bbs_wrap .bo_vc_w textarea {
    background-color: var(--theme-surface-muted) !important;
    border-color: var(--theme-border) !important;
    color: var(--theme-text) !important;
}

body.theme-dark .rb_bbs_wrap .bo_vc_w textarea:focus {
    background-color: #121212 !important;
    border-color: var(--theme-text-soft) !important;
}

body.theme-dark .rb_bbs_wrap .bo_vc_act {
    background-color: #121212;
    border-color: var(--theme-border);
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
}

body.theme-dark .rb_bbs_wrap .bo_vc_act li a {
    color: var(--theme-text);
}

body.theme-dark .rb_bbs_wrap .bo_vc_act li a:hover,
body.theme-dark .rb_bbs_wrap .bo_vc_act li a:focus {
    background-color: var(--theme-surface-subtle);
    color: var(--rb-main-color);
}

body.theme-dark .rb_bbs_wrap #bo_v_act {
    background-color: var(--theme-surface-muted);
}

body.theme-dark .rb_bbs_wrap #bo_v_act .bo_v_good,
body.theme-dark .rb_bbs_wrap #bo_v_act .bo_v_nogood {
    background-color: #121212;
    border-color: var(--theme-border);
}

body.theme-dark .bo_sch,
body.theme-dark .bbs_unlock_box,
body.theme-dark .rb_bbs_wrap .more_opt,
body.theme-dark #autosave_pop {
    background-color: var(--theme-surface);
    border-color: var(--theme-border);
    color: var(--theme-text);
}

body.theme-dark .bo_sch {
    box-shadow: 0 24px 70px rgba(0,0,0,.18);
}

body.theme-dark .bo_sch .bo_sch_title,
body.theme-dark .bo_sch .bo_sch_head,
body.theme-dark #autosave_pop ul {
    border-color: var(--theme-border);
}

body.theme-dark .bo_sch .sch_btn img {
    filter: brightness(0) invert(1);
}

body.theme-dark .rb_bbs_wrap .more_opt li,
body.theme-dark .rb_bbs_wrap .more_opt li button,
body.theme-dark .rb_bbs_wrap .more_opt li a {
    background-color: #121212;
    border-color: var(--theme-border);
    color: var(--theme-text-soft);
}

body.theme-dark #autosave_pop li {
    background-color: var(--theme-surface-subtle);
    border-color: var(--theme-border);
}

/* GNUBoard autosave is shared by board, Q&A and reply write skins. */
body.theme-dark #autosave_pop a,
body.theme-dark #autosave_pop .autosave_close,
body.theme-dark #autosave_pop .autosave_save {
    color: var(--theme-text);
}

body.theme-dark #autosave_pop span,
body.theme-dark #autosave_pop .autosave_guide {
    color: var(--theme-text-muted);
}

body.theme-dark #autosave_pop .autosave_close:hover,
body.theme-dark #autosave_pop .autosave_save:hover {
    background-color: var(--theme-surface-subtle);
    color: var(--theme-text);
}

body.theme-dark #autosave_wrapper ul.autosave_wrapper_ul2 #autosave_pop:after {
    color: var(--theme-surface);
}

body.theme-dark #autosave_wrapper ul.autosave_wrapper_ul2 #btn_autosave {
    background-color: var(--theme-surface-subtle);
    color: var(--theme-text);
}

body.theme-dark #autosave_wrapper ul.autosave_wrapper_ul2 #autosave_pop {
    background-color: var(--theme-surface);
}

body.theme-dark #autosave_wrapper ul.autosave_wrapper_ul2 #autosave_pop li,
body.theme-dark #autosave_wrapper ul.autosave_wrapper_ul2 #autosave_pop button.autosave_close,
body.theme-dark #autosave_wrapper ul.autosave_wrapper_ul2 #autosave_pop button.autosave_save,
body.theme-dark #autosave_wrapper ul.autosave_wrapper_ul2 .autosave_guide {
    border-color: var(--theme-border);
}

body.theme-dark #autosave_wrapper ul.autosave_wrapper_ul2 #autosave_pop button.autosave_close,
body.theme-dark #autosave_wrapper ul.autosave_wrapper_ul2 #autosave_pop button.autosave_save {
    color: var(--theme-text);
}

body.theme-dark #autosave_wrapper ul.autosave_wrapper_ul2 #autosave_pop button.autosave_close:hover,
body.theme-dark #autosave_wrapper ul.autosave_wrapper_ul2 #autosave_pop button.autosave_save:hover {
    background-color: var(--theme-surface-subtle);
}

/* Leaderboard */
body.theme-dark .rank-detail-aside,
body.theme-dark .rank-list,
body.theme-dark .rank-row {
    border-color: var(--theme-border);
}

body.theme-dark .rank-page-head h1,
body.theme-dark .rank-aside-title,
body.theme-dark .rank-aside-rewards strong,
body.theme-dark .rank-row-rank:not(.is-top),
body.theme-dark .rank-row-name .rank-name-text,
body.theme-dark .rank-row-name .rank-name-text .sv_member {
    color: var(--theme-text);
}

body.theme-dark .rank-page-head p,
body.theme-dark .rank-aside-title small,
body.theme-dark .rank-aside-desc,
body.theme-dark .rank-aside-rewards span,
body.theme-dark .rank-list-empty,
body.theme-dark .rank-row-user p,
body.theme-dark .rank-move,
body.theme-dark .rank-move-value,
body.theme-dark .rank-move-new,
body.theme-dark .rank-move-new .rank-move-value {
    color: var(--theme-text-muted);
}

body.theme-dark #rank_cate.search-cate-basic,
body.theme-dark #rank_cate.search-cate-basic #rank_cate_ul a {
    color: var(--theme-text);
}

body.theme-dark #rank_cate.search-cate-basic #rank_cate_ul a:not(.sch_on) {
    background-color: var(--theme-surface-subtle);
}

body.theme-dark #rank_cate.search-cate-basic #rank_cate_ul a:not(.sch_on):hover,
body.theme-dark #rank_cate.search-cate-basic #rank_cate_ul a:not(.sch_on):focus {
    background-color: var(--theme-surface-muted);
    color: var(--theme-text);
}

body.theme-dark .rank-row.is-owner {
    background-color: var(--theme-surface-subtle) !important;
}

body.theme-dark .rb_lb_track {
    border-color: var(--theme-border);
    background-color: var(--theme-surface-muted);
}

body.theme-dark .rb_lb_progress_text {
    color: var(--theme-text);
}

body.theme-dark .rb_bbs_wrap .bo_sch_bg,
body.theme-dark .bbs_unlock_bg,
body.theme-dark .bo_sch_bg {
    background-color: var(--theme-overlay);
}

body.theme-dark .bbs_unlock #unlockModalMessage {
    color: var(--theme-text-soft);
}

body.theme-dark .bbs_unlock_cancel,
body.theme-dark .bbs_unlock_cancel:hover {
    background-color: var(--theme-surface-subtle);
    color: var(--theme-text);
}

/* Global search results */
body.theme-dark .rb_serch_skin {
    color: var(--theme-text);
}

body.theme-dark .rb_serch_skin #sch_res_ov,
body.theme-dark .rb_serch_skin .no_data {
    border-color: var(--theme-border);
}

body.theme-dark .rb_serch_skin #sch_res_ov h2,
body.theme-dark .rb_serch_skin .pop_a_blank {
    color: var(--theme-text-soft);
}

body.theme-dark .rb_serch_skin #sch_res_ov h2 strong,
body.theme-dark .sch_res_list h2,
body.theme-dark .sch_res_list h2 a,
body.theme-dark .rb_serch_skin .search_board_result .section-header h2,
body.theme-dark .rb_serch_skin .search_board_result .section-header h2 a,
body.theme-dark .sch_res_title,
body.theme-dark .sch_res_title a,
body.theme-dark .rb_serch_skin .gallery-item-tit a {
    color: var(--theme-text);
}

body.theme-dark #sch_res_detail,
body.theme-dark .switch_field label {
    background-color: var(--theme-surface-muted);
    border-color: var(--theme-border);
    color: var(--theme-text-soft);
}

body.theme-dark .sch_res_list li {
    background-color: #121212;
}

body.theme-dark .sch_res_list li + li,
body.theme-dark .sch_res_list .search_ym1_list .search_ym1_item + .search_ym1_item,
body.theme-dark #my_tab_content .search_ym1_list .search_ym1_item + .search_ym1_item,
body.theme-dark .rb_search_related {
    border-color: var(--theme-border);
}

body.theme-dark .rb_serch_skin .content-divider::before,
body.theme-dark .rb_serch_skin .content-divider::after {
    background-color: var(--theme-border);
}

body.theme-dark .sch_res_list p,
body.theme-dark .sch_res_list .sch_info,
body.theme-dark .rb_search_related strong {
    color: var(--theme-text-soft);
}

body.theme-dark .rb_search_member_name {
    color: var(--theme-text);
}

body.theme-dark .rb_search_member_id {
    color: var(--theme-text-muted);
}

body.theme-dark .rb_search_member_more {
    background-color: var(--theme-surface-subtle);
    color: var(--theme-text-soft);
}

body.theme-dark .rb_search_member_more:hover {
    color: var(--theme-text);
}

body.theme-dark .rb_search_related a {
    background-color: #121212;
    border-color: var(--theme-border);
    color: var(--theme-text-soft);
}

body.theme-dark .rb_serch_skin .content-more-btn:hover,
body.theme-dark .rb_serch_skin .content-more-btn:focus {
    background-color: var(--theme-surface-subtle);
    color: var(--theme-text);
}

/* Login/member modal rendered by the active rb.member skin. */
body.theme-dark .rb_login_modal_dim {
    background-color: var(--theme-overlay);
}

body.theme-dark .rb_member .rb_login .rb_login_box {
    background-color: #121212;
    border-color: var(--theme-border);
    color: var(--theme-text);
}

body.theme-dark .rb_login_modal_panel {
    background-color: #121212;
    border-color: var(--theme-border);
    color: var(--theme-text);
    box-shadow: 0 24px 70px rgba(0,0,0,.18);
}

body.theme-dark .rb_login_modal_error {
    background-color: var(--theme-surface-subtle);
}

body.theme-dark .rb_login_modal_input {
    background-color: var(--theme-input-bg) !important;
    border-color: var(--theme-input-border) !important;
    color: var(--theme-text) !important;
}

body.theme-dark .rb_login_modal_input:focus {
    background-color: #121212 !important;
    border-color: var(--theme-text-soft) !important;
}

body.theme-dark .rb_login_modal_input:-webkit-autofill,
body.theme-dark .rb_login_modal_input:-webkit-autofill:hover,
body.theme-dark .rb_login_modal_input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px var(--theme-input-bg) inset;
    -webkit-text-fill-color: var(--theme-text);
    caret-color: var(--theme-text);
}

body.theme-dark .rb_login_modal_options a,
body.theme-dark .rb_login_modal_join a,
body.theme-dark .rb_member #login_info .login_if_lpl a,
body.theme-dark .rb_member .rb_login .rb_login_box li.join_links a {
    color: var(--theme-text);
}

body.theme-dark .rb_login_modal_social > span,
body.theme-dark .rb_member .rb_login .rb_login_box li span,
body.theme-dark .rb_member .rb_reg_sub_title,
body.theme-dark .rb_member .rb_join .frm_label {
    color: var(--theme-text-soft);
}

body.theme-dark .rb_login_modal_join,
body.theme-dark .rb_member .rb_login .rb_login_box li.join_links,
body.theme-dark .rb_member .sns_reg_wrap,
body.theme-dark .register_agreements > .agreement_all {
    border-color: var(--theme-border);
}

body.theme-dark .rb_login_modal_join {
    color: var(--theme-text-soft);
}

/* Shared Sonner notices are mounted outside the AppShell but still follow body.theme-dark. */
body.theme-dark [data-sonner-toaster] {
    --normal-bg: var(--theme-surface-muted);
    --normal-bg-hover: var(--theme-surface-subtle);
    --normal-border: var(--theme-border);
    --normal-border-hover: var(--theme-border-strong);
    --normal-text: var(--theme-text);
}

body.theme-dark [data-sonner-toast][data-styled='true'] [data-description] {
    color: var(--theme-text-soft);
}

body.theme-dark .rb_member .rb_join .help_t_text {
    background-color: var(--theme-surface-muted);
    color: var(--theme-text-soft);
}

body.theme-dark .rb_member .rb_join .rb-help {
    --rb-border: 1px solid var(--theme-border);
    --rb-border-color: var(--theme-border);
    --rb-bg: var(--theme-surface-muted);
    --rb-fg: var(--theme-text);
}

body.theme-dark .rb_member .rb_join .rb-help-pop-desc {
    color: var(--theme-text-soft);
}

body.theme-dark .rb_member .rb_join .help_text,
body.theme-dark .rb_member .rb_join .help_text a {
    color: var(--theme-text-soft);
}

body.theme-dark .rb_member .rb_join #captcha {
    border-color: var(--theme-input-border);
}

body.theme-dark .rb_member .rb_join #captcha #captcha_key {
    background-color: var(--theme-input-bg);
    border-color: var(--theme-input-border);
    color: var(--theme-text);
}

body.theme-dark .rb_member .rb_join #captcha #captcha_key:focus {
    border-color: var(--theme-text-soft) !important;
}

body.theme-dark .rb_member .rb_join #captcha #captcha_mp3,
body.theme-dark .rb_member .rb_join #captcha #captcha_reload {
    border-color: var(--theme-input-border);
    filter: grayscale(1) invert(1);
}

body.theme-dark .rb_member .rb_join .rb_member_leave {
    background-color: var(--theme-surface-subtle) !important;
    color: var(--theme-text) !important;
}

body.theme-dark .register_agreements > .agreement_row > label {
    color: var(--theme-text-soft);
}

body.theme-dark .register_agreements > .agreement_all > label {
    color: var(--theme-text);
}

body.theme-dark .rb_member .rb_join .btn_frmline,
body.theme-dark .rb_member .rb_reg .btn_frmline {
    background-color: #121212;
    border-color: var(--theme-border-strong);
    color: var(--theme-text);
}

body.theme-dark img[src*="/icon_close.svg"],
body.theme-dark .rb_member .rb_login_logo img,
body.theme-dark .rb-logo img {
    filter: brightness(0) invert(1);
}

/* MyFix source-owned components. Authenticated browser state is required for runtime proof. */
body.theme-dark .my-page-tabs-list a,
body.theme-dark .playlist-card {
    color: var(--theme-text);
}

body.theme-dark .my-page-tabs-list a {
    border-color: var(--theme-border-strong);
    background-color: var(--theme-surface);
}

body.theme-dark .my-page-tabs-list a:hover,
body.theme-dark .my-page-tabs-list a:focus,
body.theme-dark .playlist-card-menu-items a:hover,
body.theme-dark .playlist-card-menu-items a:focus,
body.theme-dark .playlist-card-menu-items button:hover,
body.theme-dark .playlist-card-menu-items button:focus,
body.theme-dark .content-more-btn:hover,
body.theme-dark .content-more-btn:focus,
body.theme-dark .playlist-item-remove:hover,
body.theme-dark .playlist-item-remove:focus {
    background-color: var(--theme-surface-subtle);
    color: var(--theme-text);
}

body.theme-dark .my-page-tabs-list a.sch_on {
    background-color: var(--rb-main-color);
    border-color: var(--rb-main-color);
    color: #fff;
}

body.theme-dark .content-divider-line {
    background-color: var(--theme-border);
}

body.theme-dark .favorite_empty_title,
body.theme-dark .history-date,
body.theme-dark .playlist-card-title,
body.theme-dark .playlist-empty-title,
body.theme-dark .favorite_member_name {
    color: var(--theme-text);
}

body.theme-dark .favorite_empty_desc,
body.theme-dark .favorite_member_link,
body.theme-dark .playlist-card-meta,
body.theme-dark .playlist-empty-desc {
    color: var(--theme-text-soft);
}

body.theme-dark #my_tab_content .search_ym1_list .gallery-item-tit a,
body.theme-dark #favorite_page_content .search_ym1_list .gallery-item-tit a,
body.theme-dark #unlock_page_content .search_ym1_list .gallery-item-tit a {
    color: var(--theme-text);
}

body.theme-dark #my_tab_content .search_ym1_list .gallery-item-con,
body.theme-dark #my_tab_content .search_ym1_list .gallery-item-info-sub,
body.theme-dark #my_tab_content .search_ym1_list .pop_a_blank,
body.theme-dark #favorite_page_content .search_ym1_list .gallery-item-con,
body.theme-dark #favorite_page_content .search_ym1_list .gallery-item-info-sub,
body.theme-dark #favorite_page_content .search_ym1_list .pop_a_blank,
body.theme-dark #unlock_page_content .search_ym1_list .gallery-item-con,
body.theme-dark #unlock_page_content .search_ym1_list .gallery-item-info-sub,
body.theme-dark #unlock_page_content .search_ym1_list .pop_a_blank {
    color: var(--theme-text-soft);
}

body.theme-dark #favorite_page_content .search_ym1_list .search_ym1_item + .search_ym1_item,
body.theme-dark #unlock_page_content .search_ym1_list .search_ym1_item + .search_ym1_item {
    border-color: var(--theme-border);
}

body.theme-dark .playlist-card-menu-items {
    border-color: var(--theme-border);
    background-color: var(--theme-surface);
}

body.theme-dark .playlist-card-menu-items a,
body.theme-dark .playlist-card-menu-items button {
    color: var(--theme-text);
}

body.theme-dark .playlist-item-remove {
    border-color: var(--theme-border);
    color: var(--theme-text-soft);
}

body.theme-dark .playlist-rename-btn,
body.theme-dark .playlist-delete-btn {
    color: var(--theme-text);
}

body.theme-dark .playlist {
    border-color: var(--theme-border);
    background-color: var(--theme-surface);
    color: var(--theme-text);
}

body.theme-dark .playlist-info h2,
body.theme-dark .playlist-owner-name,
body.theme-dark .playlist-item-title,
body.theme-dark .playlist-page span,
body.theme-dark .rb_bbs_playlist_recommendations_title {
    color: var(--theme-text);
}

body.theme-dark .playlist-info p,
body.theme-dark .playlist-label,
body.theme-dark .playlist-page a {
    color: var(--theme-text-soft);
}

body.theme-dark .playlist-item:hover,
body.theme-dark .playlist-item:focus-within,
body.theme-dark .playlist-item.is-current {
    background-color: var(--theme-surface-subtle);
}

body.theme-dark .playlist-item-models {
    color: var(--theme-text-soft);
}

body.theme-dark .playlist-profile,
body.theme-dark .playlist-thumb {
    background-color: var(--theme-surface-subtle);
}

body.theme-dark .playlist-page span[aria-disabled="true"] {
    color: var(--theme-text-soft);
    opacity: .55;
}

body.theme-dark .playlist-item .playlist-item-models .name-link {
    color: var(--rb-main-color) !important;
}

body.theme-dark .rb_bbs_playlist_recommendations {
    border-color: var(--theme-border);
}

body.theme-dark .rb-history-spinner {
    background-color: rgba(255,255,255,.18);
}

/* Active connect, FAQ, Q&A and content skins */
body.theme-dark #current_connect li {
    border-color: var(--theme-border);
}

body.theme-dark #current_connect .crt_num,
body.theme-dark #current_connect .crt_lct a,
body.theme-dark #current_connect li.empty_li {
    color: var(--theme-text-soft);
}

body.theme-dark #current_connect .sv_member {
    color: var(--theme-text);
}

body.theme-dark #current_connect .cc_flex .fl_btns {
    background-color: #121212;
    border-color: var(--theme-border);
}

body.theme-dark #current_connect .cc_flex .fl_btns:not(.main_color_bg) img,
body.theme-dark .rb_faq .btns_gr_wrap .btns_gr .fl_btns:not(.main_color_bg) img {
    filter: brightness(0) invert(1);
}

body.theme-dark .dmca-content {
    color: var(--theme-text);
}

body.theme-dark #faq_wrap li {
    background-color: #121212;
    border-color: var(--theme-border);
}

body.theme-dark #faq_wrap {
    border-top-color: var(--theme-border) !important;
}

body.theme-dark .rb_faq h2,
body.theme-dark .rb_faq .rb_faq_sub_tit {
    color: var(--theme-text);
}

body.theme-dark .rb_faq .no_data a {
    color: var(--theme-text-soft);
}

body.theme-dark .rb_faq .no_data a:hover {
    color: var(--rb-main-color);
}

body.theme-dark .rb_faq .faq_ser_wrap input {
    border-color: var(--theme-border);
    color: var(--theme-text);
}

body.theme-dark .rb_faq .faq_ser_wrap button svg path {
    fill: var(--theme-text);
}

body.theme-dark #faq_wrap li h3 a,
body.theme-dark .rb_faq #faq_wrap li h3.faq_li_open a,
body.theme-dark #faq_wrap li h3 .tit_bg {
    color: var(--theme-text);
}

body.theme-dark #faq_wrap li h3 .tit_btn {
    background-color: #121212;
    color: var(--theme-text-soft);
}

body.theme-dark #faq_con .con_inner .closer_btn {
    background-color: #121212;
}

body.theme-dark #faq_sch {
    background-color: var(--theme-surface-muted);
}

body.theme-dark .rb_faq #bo_cate a {
    color: var(--theme-text);
}

body.theme-dark .rb_faq #bo_cate #bo_cate_ul::before {
    background-color: var(--theme-border);
}

body.theme-dark .rb_faq .btns_gr_wrap .btns_gr .fl_btns {
    background-color: #121212;
    border-color: var(--theme-border);
}

body.theme-dark .rb_bbs_wrap_qa .rb_bbs_for_cont_subj a {
    color: var(--theme-text);
}

body.theme-dark .rb_bbs_wrap_qa .rb_bbs_for {
    border-bottom-color: var(--theme-border) !important;
}

body.theme-dark .rb_bbs_wrap_qa .rb_status_bt:not(.active) {
    background-color: var(--theme-surface-muted);
    color: var(--theme-text);
}

body.theme-dark #bo_list .bo_report_target {
    color: #fff;
}

/* Q&A view contact details. */
body.theme-dark .rb_bbs_wrap .cont_info_wrap {
    background-color: var(--theme-surface-muted);
}
body.theme-dark .rb_bbs_wrap .cont_info_wrap_l dd:nth-child(1),
body.theme-dark .rb_bbs_wrap .cont_info_wrap_r dd:nth-child(1) {
    color: var(--theme-text-muted);
}
body.theme-dark .rb_bbs_wrap .cont_info_wrap_l dd:nth-child(2),
body.theme-dark .rb_bbs_wrap .cont_info_wrap_r dd:nth-child(2) {
    color: var(--theme-text);
}

/* Rebuilder configuration panel. */
body.theme-dark .sh-side-demos-container {
    background-color: #121212;
    color: var(--theme-text);
}

body.theme-dark .sh-side-demos-container .rb_config h2,
body.theme-dark .sh-side-demos-container .rb_config label,
body.theme-dark .sh-side-demos-container .rows_inp_l_span span {
    color: var(--theme-text);
}

body.theme-dark .sh-side-demos-container .rb_config h6 {
    color: var(--theme-text) !important;
}

body.theme-dark .sh-side-demos-container .rb_config_sub_txt,
body.theme-dark .sh-side-demos-container .rows_inp_l_span,
body.theme-dark .sh-side-demos-container .skin_path_url_txt,
body.theme-dark .sh-side-demos-container .rb_config .no_data {
    color: var(--theme-text-soft) !important;
}

body.theme-dark .sh-side-demos-container .rb_config_sec,
body.theme-dark .sh-side-demos-container .config_wrap_bg,
body.theme-dark .sh-side-demos-container .config_wrap_bg_shop,
body.theme-dark .sh-side-demos-container .rb_right_err_box {
    border-color: var(--theme-border);
}

body.theme-dark .sh-side-demos-container .rb_config .no_data,
body.theme-dark .sh-side-demos-container .config_wrap_sub_tit,
body.theme-dark .sh-side-demos-container .selected_tags .tag,
body.theme-dark .sh-side-demos-container .selected_tags .item-tag {
    background-color: var(--theme-surface-muted);
}

body.theme-dark .sh-side-demos-container .rb_config input:disabled,
body.theme-dark .sh-side-demos-container .rb_config select:disabled,
body.theme-dark .sh-side-demos-container .rb_config textarea:disabled,
body.theme-dark .sh-side-demos-container input[type="radio"][disabled] + label,
body.theme-dark .sh-side-demos-container input[type="checkbox"][disabled] + label {
    color: var(--theme-text-muted) !important;
}

body.theme-dark .sh-side-demos-container input[type="radio"] + label:before,
body.theme-dark .sh-side-demos-container input[type="checkbox"] + label:before,
body.theme-dark .rb-category-option input[type="radio"] + label:before,
body.theme-dark .rb-category-option input[type="checkbox"] + label:before {
    border-color: var(--theme-input-border);
    background-color: var(--theme-input-bg);
}

body.theme-dark .sh-side-demos-container input[type="radio"]:checked + label:before,
body.theme-dark .sh-side-demos-container input[type="checkbox"]:checked + label:before,
body.theme-dark .rb-category-option input[type="radio"]:checked + label:before,
body.theme-dark .rb-category-option input[type="checkbox"]:checked + label:before {
    border-color: var(--theme-text-soft);
    background-color: var(--theme-input-bg);
}

body.theme-dark .sh-side-demos-container input[type="radio"] + label:after,
body.theme-dark .rb-category-option input[type="radio"] + label:after {
    background-color: var(--theme-text-soft);
}

body.theme-dark .sh-side-demos-container input[type="checkbox"] + label:after,
body.theme-dark .rb-category-option input[type="checkbox"] + label:after {
    border-color: var(--theme-text-soft);
}

body.theme-dark .sh-side-demos-container input[type="radio"]:focus-visible + label:before,
body.theme-dark .sh-side-demos-container input[type="checkbox"]:focus-visible + label:before,
body.theme-dark .rb-category-option input[type="radio"]:focus-visible + label:before,
body.theme-dark .rb-category-option input[type="checkbox"]:focus-visible + label:before,
body.theme-dark .sh-side-demos-container button:focus-visible {
    outline: 2px solid var(--theme-text-soft);
    outline-offset: 2px;
}

body.theme-dark .sh-side-demos-container select option {
    background-color: var(--theme-input-bg);
    color: var(--theme-text);
}

body.theme-dark .sh-side-demos-container select option:checked {
    background-color: var(--theme-surface-subtle);
}

body.theme-dark .sh-side-demos-container .select,
body.theme-dark .sh-side-demos-container .config_wrap .select_tiny {
    background-image: url('../../../rb/rb.config/image/arr_down_w.svg');
    background-size: 16px 16px;
}

body.theme-dark .sh-side-demos-container .rb_config_save,
body.theme-dark .sh-side-demos-container .rb_config_save2,
body.theme-dark .sh-side-demos-container .rb_config_reload,
body.theme-dark .sh-side-demos-container .rb_config_close,
body.theme-dark .sh-side-demos-container #widget_add_btn,
body.theme-dark .sh-side-demos-container #clear_top_btn,
body.theme-dark .sh-side-demos-container .add_module_btns {
    border: 1px solid var(--theme-border-strong);
    background-color: var(--theme-surface-subtle);
    color: var(--theme-text);
}

body.theme-dark .sh-side-demos-container .rb_config_save:hover,
body.theme-dark .sh-side-demos-container .rb_config_save2:hover,
body.theme-dark .sh-side-demos-container .rb_config_reload:hover,
body.theme-dark .sh-side-demos-container .rb_config_close:hover,
body.theme-dark .sh-side-demos-container #widget_add_btn:hover,
body.theme-dark .sh-side-demos-container #clear_top_btn:hover,
body.theme-dark .sh-side-demos-container .add_module_btns:hover {
    background-color: #303030;
    color: var(--theme-text);
}

body.theme-dark .sh-side-demos-container .rb-help-btn svg path[fill] {
    fill: var(--theme-text-muted);
}

body.theme-dark .sh-side-demos-container .rb-help-btn:hover svg path[fill] {
    fill: var(--theme-text-soft);
}

body.theme-dark .sh-side-demos-container .ui-slider {
    background-color: var(--theme-border);
}

body.theme-dark .sh-side-demos-container .ui-slider .ui-slider-handle {
    border-color: var(--theme-text-soft);
    background-color: var(--theme-surface-subtle);
    color: var(--theme-text);
}

body.theme-dark .sh-side-demos-container .clr-picker {
    background-color: var(--theme-surface-subtle);
    box-shadow: 0 0 5px rgba(0,0,0,.2), 0 5px 20px rgba(0,0,0,.35);
}

body.theme-dark .sh-side-demos-container .clr-picker input.clr-color {
    border-color: var(--theme-input-border);
    background-color: var(--theme-input-bg);
    color: var(--theme-text);
}

body.theme-dark .sh-side-demos-container .clr-picker input.clr-color:focus,
body.theme-dark .sh-side-demos-container .clr-keyboard-nav .clr-marker:focus,
body.theme-dark .sh-side-demos-container .clr-keyboard-nav .clr-hue input:focus + div,
body.theme-dark .sh-side-demos-container .clr-keyboard-nav .clr-alpha input:focus + div,
body.theme-dark .sh-side-demos-container .clr-keyboard-nav .clr-segmented input:focus + label {
    border-color: var(--theme-text-soft);
    box-shadow: 0 0 0 2px var(--theme-text-soft);
}

body.theme-dark .sh-side-demos-container .sh-side-demos-container-close img {
    filter: brightness(0) invert(1);
}

body.theme-dark .rb-custom-alert-popup {
    --rb-alert-popup-bg: var(--theme-surface-muted);
    --rb-alert-popup-color: var(--theme-text);
    --rb-alert-btn-bg: var(--theme-surface-subtle);
    --rb-alert-btn-color: var(--theme-text);
    --rb-alert-btn-ok-bg: var(--theme-surface-subtle);
    --rb-alert-btn-ok-color: var(--theme-text);
    background-color: var(--theme-surface-muted) !important;
    color: var(--theme-text) !important;
}

body.theme-dark .rb-custom-alert-popup .rb-alert-btn {
    background-color: var(--theme-surface-subtle) !important;
    color: var(--theme-text) !important;
}

body.theme-dark .rb-custom-alert-popup .rb-alert-btn.rb-btn-ok {
    background-color: var(--theme-surface-subtle) !important;
    color: var(--theme-text) !important;
}

body.theme-dark .rb-custom-alert-popup-bg {
    background-color: var(--theme-overlay);
}

body.theme-dark .rb-custom-alert-popup svg path[fill] {
    fill: #FFB256;
}

body.theme-dark .rb_report_modal_dim {
    background-color: var(--theme-overlay);
}

body.theme-dark .rb_report_modal_box {
    border-color: var(--theme-border);
    background-color: var(--theme-surface);
    color: var(--theme-text);
}

body.theme-dark .rb_report_modal_title,
body.theme-dark .rb_report_modal_head button,
body.theme-dark .rb_report_type_label,
body.theme-dark .rb_report_reason_label,
body.theme-dark .rb_report_cancel {
    color: var(--theme-text);
}

body.theme-dark .rb_report_optional,
body.theme-dark .rb_report_count,
body.theme-dark .rb_report_notice {
    color: var(--theme-text-muted);
}

body.theme-dark .rb_report_type input[type="radio"] {
    accent-color: var(--rb-main-color);
}

body.theme-dark .rb_report_textarea {
    background-color: var(--theme-surface-subtle) !important;
    color: var(--theme-text) !important;
}

body.theme-dark .rb_report_textarea::placeholder {
    color: var(--theme-text-muted);
}

body.theme-dark .rb_report_cancel {
    border-color: var(--theme-border);
}

body.theme-dark .playlist-modal-item {
    color: var(--theme-text);
}

body.theme-dark .playlist-create-toggle {
    border-color: var(--theme-border);
}

body.theme-dark .playlist-modal-empty {
    color: var(--theme-text-muted);
}

body.theme-dark .playlist-create-form input {
    border-color: var(--theme-border);
    background-color: var(--theme-surface-subtle);
    color: var(--theme-text);
}

body.theme-dark .rb_report_cancel:hover,
body.theme-dark .rb_report_submit:disabled {
    background-color: var(--theme-surface-subtle);
}

body.theme-dark .rb_report_submit:disabled {
    color: var(--theme-text-muted);
}
