.theme-toggle{display:inline-flex;align-items:center;justify-content:center;gap:4px;min-width:44px;min-height:40px;border:0;border-radius:4px;background:transparent;color:#fff;cursor:pointer;padding:4px 8px;margin-right:8px}
.theme-toggle>span:first-child{font-size:22px;line-height:1}
.theme-mode-label{display:none}
.theme-toggle:hover{background:#ffffff18}
.theme-toggle:focus-visible{outline:2px solid #8fbcff;outline-offset:2px}
#mobile_nav{justify-content:flex-start}
#mobile_nav .theme-toggle{margin-right:auto}
#mobile_nav>.navbar-brand:last-of-type{margin-left:auto}
html[data-theme="dark"] #header .navbar{background:#22272c!important}
@media(max-width:991px){#header>.container{justify-content:flex-start}#header .navbar-toggler{margin-right:4px}#header .theme-toggle{margin-right:auto}#header .navbar-brand:last-of-type{margin-left:auto}}
html[data-theme="dark"] body{background:#15181b!important;color:#dce0e4}
html[data-theme="dark"] #header,html[data-theme="dark"] #footer{background:#22272c!important;color:#adb5bd}
html[data-theme="dark"] .card,html[data-theme="dark"] .modal-content,html[data-theme="dark"] .dropdown-menu,html[data-theme="dark"] .list-group-item{background:#22272c;color:#dce0e4;border-color:#363d45}
html[data-theme="dark"] .card-header,html[data-theme="dark"] .card-footer,html[data-theme="dark"] .modal-header,html[data-theme="dark"] .modal-footer{background:#262c32;border-color:#363d45}
html[data-theme="dark"] .card,html[data-theme="dark"] .card-header{background-image:none}
html[data-theme="dark"] .card-header{color:#dce0e4;text-shadow:none}
html[data-theme="dark"] a{color:#9ec9ff}
html[data-theme="dark"] .btn-primary,html[data-theme="dark"] .btn-danger,html[data-theme="dark"] .navbar a{color:#fff}
html[data-theme="dark"] .text-muted,html[data-theme="dark"] .text-grey,html[data-theme="dark"] .text-gray{color:#a5adb5!important}
html[data-theme="dark"] .text-dark,html[data-theme="dark"] .text-body{color:#dce0e4!important}
html[data-theme="dark"] .bg-white,html[data-theme="dark"] .bg-light{background:#22272c!important}
html[data-theme="dark"] .form-control,html[data-theme="dark"] .custom-select,html[data-theme="dark"] .input-group-text{background:#1c2126;color:#e1e5e9;border-color:#414a54}
html[data-theme="dark"] .form-control::placeholder{color:#98a2ac}
html[data-theme="dark"] .form-control:focus{border-color:#75aaff;box-shadow:0 0 0 2px #75aaff30}
html[data-theme="dark"] .nav-tabs,html[data-theme="dark"] .thread,html[data-theme="dark"] .post,html[data-theme="dark"] hr,html[data-theme="dark"] .border,html[data-theme="dark"] .border-bottom{border-color:#363d45!important}
html[data-theme="dark"] .nav-tabs .nav-link.active,html[data-theme="dark"] .page-link{background:#22272c;color:#dce0e4;border-color:#414a54}
html[data-theme="dark"] .page-item.active .page-link{background:#3466ff;color:#fff}
html[data-theme="dark"] .table{color:#dce0e4}
html[data-theme="dark"] .table td,html[data-theme="dark"] .table th{border-color:#363d45}
html[data-theme="dark"] .image-text-title{color:#ff7278}
html[data-theme="dark"] .image-text-subtitle{color:#ed77ed}
html[data-theme="dark"] .image-text-description{color:#dce0e4}
html[data-theme="dark"] blockquote,html[data-theme="dark"] pre{background:#1b2025;color:#dce0e4;border-color:#414a54}

/* Mobile thread list: one line, responsive ellipsis. */
@media (max-width:767.98px){
 body{min-width:0;width:100%;}
 .thread .media-body{min-width:0;}
 .thread .subject{display:flex;align-items:center;min-width:0;max-width:100%;overflow:hidden;white-space:nowrap!important;}
 .thread .subject>a{display:block;flex:0 1 auto;min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap!important;word-break:normal!important;}
 .thread .subject>i{flex-shrink:0;}
}
