/* Shared light/dark controls. Every page keeps the same coral accent. */
:root{color-scheme:light}
.topbar .actions{gap:2px;flex-shrink:0}
.theme-toggle{flex-shrink:0}
.theme-toggle:not(.btn){background:var(--soft);color:#626d81;border-radius:50%;width:38px;height:38px;margin-left:4px}
.theme-toggle .icon{width:21px;height:21px}
.theme-toggle:hover{color:var(--accent-strong)}
.topbar .page-title,.reader-title{min-width:0}
.reader-title h1{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
@media(max-width:360px){.topbar{gap:6px;padding-left:12px;padding-right:12px}.topbar .actions .icon-btn{width:36px}.topbar .actions .theme-toggle{width:36px;margin-left:2px}}

:root[data-theme="dark"]{color-scheme:dark;--accent:#ff967d;--accent-strong:#ffac95;--ink:#e9edf5;--muted:#a4b0c4;--soft:#263146;--line:#303c51;--paper:#192231;background:#0e1521;color:var(--ink)}
:root[data-theme="dark"] .app{background:var(--paper);box-shadow:0 0 70px #0003}
:root[data-theme="dark"] .topbar,:root[data-theme="dark"] .reader .topbar,:root[data-theme="dark"] .bottom-nav,:root[data-theme="dark"] .reader .bottom-nav{background:#141c2af5;color:var(--ink);border-color:var(--line)}
:root[data-theme="dark"] .bottom-nav a{color:var(--muted)}
:root[data-theme="dark"] .bottom-nav a.active{color:var(--accent-strong)}
:root[data-theme="dark"] .theme-toggle:not(.btn){color:#ffd08a;background:#303448}
:root[data-theme="dark"] .panel,:root[data-theme="dark"] .result,:root[data-theme="dark"] .menu-item,:root[data-theme="dark"] .auth-card,:root[data-theme="dark"] .profile,:root[data-theme="dark"] dialog{background:#1e293a;color:var(--ink);border-color:var(--line);box-shadow:0 5px 25px #0001}
:root[data-theme="dark"] .cover{background:var(--soft)}
:root[data-theme="dark"] .chapter:hover{background:#2a3548}
:root[data-theme="dark"] .tag{background:var(--soft);color:#bdc8da}
:root[data-theme="dark"] .tag.coral,:root[data-theme="dark"] .chip.active,:root[data-theme="dark"] .tags a.tag:hover{background:#49312f;color:var(--accent-strong)}
:root[data-theme="dark"] .bubble{background:#3c2b2c;color:var(--accent)}
:root[data-theme="dark"] .shortcuts a:nth-child(3) .bubble{background:#283652;color:#a7bcff}
:root[data-theme="dark"] .btn.primary{background:linear-gradient(115deg,#ff9878,#ff806d);color:#291b19;box-shadow:0 4px 14px #0002}
:root[data-theme="dark"] .btn.outline{background:#30292e;color:var(--accent-strong);border-color:#775046}
:root[data-theme="dark"] .tabs button,:root[data-theme="dark"] .category-tabs a{color:#bcc7da}
:root[data-theme="dark"] .tabs button.active,:root[data-theme="dark"] .category-tabs a.active,:root[data-theme="dark"] .pagination button.active,:root[data-theme="dark"] .tag-pagination a.active{background:var(--accent);border-color:var(--accent);color:#291b19}
:root[data-theme="dark"] .pagination button,:root[data-theme="dark"] .tag-pagination a,:root[data-theme="dark"] .tag-pagination .disabled,:root[data-theme="dark"] .category-options select,:root[data-theme="dark"] .page-jump input[type=number]{background:var(--soft);border-color:var(--line);color:var(--ink)}
:root[data-theme="dark"] .tag-pagination a.active{background:var(--accent);color:#291b19}
:root[data-theme="dark"] .result p,:root[data-theme="dark"] dialog p,:root[data-theme="dark"] .input-wrap,:root[data-theme="dark"] .invite-link,:root[data-theme="dark"] .editor-pick p{color:#b3bfd2}
:root[data-theme="dark"] input::placeholder{color:#9ba8bf}
:root[data-theme="dark"] .form-error{color:#ff9c8e}
:root[data-theme="dark"] .captcha{background:repeating-linear-gradient(30deg,#253449,#253449 8px,#35445c 9px,#29394e 10px);color:#9dd5ff}
:root[data-theme="dark"] .auth-hero .topbar{background:linear-gradient(#141c2af5,#141c2a99)}
:root[data-theme="dark"] .avatar{border-color:#1e293a}
:root[data-theme="dark"] .invite-hero{background:linear-gradient(90deg,#172131f2,#17213170),url('/statics/images/no_pic.png') center/cover}
:root[data-theme="dark"] .invite-hero p{color:#bfcbdf}
:root[data-theme="dark"] .rank:nth-child(1){background:#30272a;border-color:#865348}
:root[data-theme="dark"] .rank .number{color:#b0bacd}
:root[data-theme="dark"] .rank:nth-child(1) .number{color:#ffca77}
:root[data-theme="dark"] .rank:nth-child(2) .number{color:#c1cde6}
:root[data-theme="dark"] .rank:nth-child(3) .number{color:#ecab88}
:root[data-theme="dark"] .home-ranking{background:linear-gradient(130deg,#34282b,#1e293a)}
:root[data-theme="dark"] .home-ranking li+li{border-color:#45343b}
:root[data-theme="dark"] .editor-pick{background:#232e43}
:root[data-theme="dark"] .editor-label{color:#afbed8}
:root[data-theme="dark"] .topic-grid a{background:#382c2f}
:root[data-theme="dark"] .topic-grid a:nth-child(3n+2){background:#28334c}
:root[data-theme="dark"] .topic-grid a:nth-child(3n){background:#263d37}
:root[data-theme="dark"] .footnote{color:var(--muted)}
:root[data-theme="dark"] .backtop{background:#263146;color:var(--accent-strong);border-color:#63504e;box-shadow:0 4px 18px #0005}
:root[data-theme="dark"] .comic-backtop:hover{background:#354059}
:root[data-theme="dark"] .reader,:root[data-theme="dark"] .reader-pages{background:#141c2a}
:root[data-theme="dark"] .reader-pages img{filter:brightness(.78);border-color:#141c2a}
:root[data-theme="dark"] .toast{background:#dce4f2;color:#142031}
:root[data-theme="dark"] .noscript-note{background:#3b302c;color:#edc5ae}
dialog::backdrop{background:#0d14218c}
