/* Telegram-inspired night palette. Existing light preference remains available. */
.nav-label-mobile{display:none}
.home-launcher{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:0 0 20px}.home-launcher>a{display:flex;align-items:center;gap:14px;padding:22px;background:var(--paper);border:1px solid var(--line);border-radius:12px;min-width:0}.home-launcher strong{display:block;font-size:17px}.home-launcher small{display:block;font-size:13px;color:var(--muted);margin-top:6px}.launcher-icon{width:46px;height:46px;border-radius:14px;background:var(--bg);color:var(--green);display:grid;place-items:center;font-size:27px;flex-shrink:0}.launcher-arrow{margin-left:auto;color:var(--muted)}.nav-icon svg{display:block;width:23px;height:23px}.nav-label{min-width:0}
:root[data-theme=dark]{--sage:#2b5278;--radius:12px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;font-size:16px}
:root[data-theme=dark] :is(h1,h2,h3){letter-spacing:-.35px;font-family:inherit}
:root[data-theme=dark] h1{font-size:30px;font-weight:650;line-height:1.3}
:root[data-theme=dark] h2{font-size:22px}
:root[data-theme=dark] .sidebar{width:244px;padding:26px 14px 18px;background:#1e2a38;border-color:#101b27}
:root[data-theme=dark] .sidebar .brand{font-size:34px;margin:0 16px 32px;letter-spacing:-1.6px}
:root[data-theme=dark] .brand-dot{color:#64b5ef}
:root[data-theme=dark] .brand-mark{font-style:normal}
:root[data-theme=dark] .workspace-label{font-size:10px;letter-spacing:1px;margin:0 16px 14px}
:root[data-theme=dark] .tiny-dot{background:#64b5ef}
:root[data-theme=dark] nav{gap:5px}
:root[data-theme=dark] nav a{padding:13px 15px;font-size:15px;font-weight:500;border-radius:9px;gap:14px;min-height:48px}
:root[data-theme=dark] nav a.active{background:#2b5278;color:#fff}
:root[data-theme=dark] nav a:hover:not(.active){background:#293b4d}
:root[data-theme=dark] nav .nav-icon{color:#8eabc2}
:root[data-theme=dark] nav a.active .nav-icon{color:#fff}
:root[data-theme=dark] .nav-badge{border-radius:20px;padding:3px 7px;font-size:11px}
:root[data-theme=dark] .sidebar-note{display:none}
:root[data-theme=dark] .sidebar-bottom{font-size:14px}
:root[data-theme=dark] .sidebar-bottom>.text-button{font-size:13px}
:root[data-theme=dark] .profile{padding-top:18px}.profile small{line-height:1.5}
:root[data-theme=dark] .avatar{background:#5288c1;color:#fff}
:root[data-theme=dark] .online-dot{background:#6cc596}
:root[data-theme=dark] .main{margin-left:244px;max-width:none;padding:0 32px}
:root[data-theme=dark] .topbar{height:65px;margin-bottom:28px;border-color:#2a3948}
:root[data-theme=dark] .topbar>span{font-size:11px;letter-spacing:.7px}
:root[data-theme=dark] .topbar-right{font-size:13px;gap:16px}
:root[data-theme=dark] .page-heading{margin-bottom:24px}
:root[data-theme=dark] .page-heading p{font-size:14px}
:root[data-theme=dark] :is(.button,.tab){font-size:14px;letter-spacing:0;border-radius:8px;gap:9px}
:root[data-theme=dark] .button{padding:11px 16px;border-color:#354b60}
:root[data-theme=dark] .button:hover{transform:none}
:root[data-theme=dark] .button.primary,:root[data-theme=dark] .button.lime{background:#3d75ac;color:#fff;border-color:#3d75ac}
:root[data-theme=dark] :is(.button.primary,.button.lime):hover{background:#4179b0;border-color:#4179b0}
:root[data-theme=dark] .button.danger{background:#9a494e;border-color:#9a494e}
:root[data-theme=dark] .home-launcher>a:hover{background:#27394c;border-color:#4a7194}
:root[data-theme=dark] .launcher-icon{background:#2c4965;color:#93cef8}
:root[data-theme=dark] .home-launcher>a:nth-child(2) .launcher-icon{background:#3c3958;color:#bcaff1}
:root[data-theme=dark] .home-launcher>a:nth-child(3) .launcher-icon{background:#294b50;color:#8bd4cf}
:root[data-theme=dark] .stats{margin:0 0 28px;gap:16px}
:root[data-theme=dark] .stat{padding:17px 20px;border-radius:12px;background:#1d2936}
:root[data-theme=dark] .stat strong{font-size:27px}
:root[data-theme=dark] .stat small{font-size:13px;line-height:1.4}
:root[data-theme=dark] .home-columns{grid-template-columns:minmax(0,1.8fr) minmax(300px,1fr);gap:24px}
:root[data-theme=dark] .section-head h2{font-size:21px}
:root[data-theme=dark] .section-head a{font-size:13px;color:#79bbed}
:root[data-theme=dark] .panel{border-radius:12px;border-color:#304050}
:root[data-theme=dark] .video-card{border-radius:12px}
:root[data-theme=dark] .video-info h3{font-size:16px;font-weight:600;line-height:1.45}
:root[data-theme=dark] .video-info p{font-size:13px}
:root[data-theme=dark] .video-thumb img{opacity:1}
:root[data-theme=dark] .video-info{padding:18px}
:root[data-theme=dark] .play-circle{background:#17212ba6}
:root[data-theme=dark] :is(.video-progress span,.bar span){background:#64b5ef}
:root[data-theme=dark] .deck-mini{padding:18px 0}
:root[data-theme=dark] .deck-mini strong{font-size:15px}
:root[data-theme=dark] .deck-mini small{font-size:12px;line-height:1.5}
:root[data-theme=dark] .quote-strip{display:none}
:root[data-theme=dark] footer{font-size:13px;border-color:#2a3948;padding:20px 0;margin-top:32px}
:root[data-theme=dark] footer span{font-size:11px}
:root[data-theme=dark] :is(label,.small,.text-button){font-size:14px}
:root[data-theme=dark] :is(input,select,textarea){font-size:15px;padding:12px;border-radius:8px}
:root[data-theme=dark] :is(input,textarea)::placeholder{font-size:14px;color:#8ea2b5}
:root[data-theme=dark] input[type=checkbox]{accent-color:#5288c1}
:root[data-theme=dark] :is(button,a,input,select,textarea,summary):focus-visible{outline:2px solid #80c4f5;outline-offset:3px}
:root[data-theme=dark] :is(.word-table td,.torrent-file){border-color:var(--line)}
:root[data-theme=dark] .word-table{font-size:15px}
:root[data-theme=dark] .word-table small{font-size:12px}
:root[data-theme=dark] :is(.file-table td,.torrent-file,.torrent-meta,.settings-row){font-size:14px}
:root[data-theme=dark] :is(.notice,.file-table small,.download-summary,.badge){font-size:13px}
:root[data-theme=dark] .theme-toggle{padding:8px 11px;font-size:12px}
:root[data-theme=dark] :is(.tab.active,.catalog-tabs .tab.active,.season-tabs .active){background:#2b5278;color:#fff;border-color:#3c6a94}
:root[data-theme=dark] .episode-row h3{font-size:16px}
:root[data-theme=dark] :is(.episode-row p,.episode-original,.episode-row .media-caption){font-size:12px}
:root[data-theme=dark] .series-cover-label{background:#17212be6}
:root[data-theme=dark] .media-check{background:#17212be6}
:root[data-theme=dark] .novel-cover{background:linear-gradient(135deg,#284968,#263a53);border-left-color:#162b41;color:#eef6ff}
:root[data-theme=dark] .novel-cover span{color:#a2cbee}
:root[data-theme=dark] .novel-word:hover{background:#5288c14d}
:root[data-theme=dark] :is(.player-surface,.subtitle-overlay){background:#0e1722;color:#f1f5f9}
:root[data-theme=dark] .sub-word:hover{background:#5288c1;color:#fff}
:root[data-theme=dark] .sub-word.known{border-color:#64b5ef}
:root[data-theme=dark] :is(#toast,.manga-selection-hint){background:#2b5278;color:#fff;border-color:#4b7499}
:root[data-theme=dark] .login-art{background:#1e2e40;color:#e7f1fb}
:root[data-theme=dark] .word-orbit{border-color:#3a5874}
:root[data-theme=dark] .study-card .study-word{font-family:inherit}
:root[data-theme=dark] dialog{border-radius:14px;box-shadow:0 18px 70px #0006}
:root[data-theme=dark] #novel-translation :is(.small,label){font-size:12px}
:root[data-theme=dark] #novel-translation .button{font-size:12px}
:root[data-theme=dark] .manga-reading .main,:root[data-theme=dark] .novel-focus .main{margin:0 auto}
:root[data-theme=dark] *{scrollbar-color:#41566b #17212b;scrollbar-width:thin}
@media(min-width:1800px){:root[data-theme=dark] .main{padding:0 44px}:root[data-theme=dark] .home-columns{grid-template-columns:minmax(0,2fr) minmax(350px,1fr)}}
@media(max-width:1100px){:root[data-theme=dark] .sidebar{width:216px}:root[data-theme=dark] .main{margin-left:216px;padding:0 24px}:root[data-theme=dark] .home-columns{grid-template-columns:1fr}.home-launcher>a{padding:16px;gap:10px}.home-launcher small{font-size:12px}.launcher-arrow{display:none}}
@media(max-width:760px){
  :root[data-theme=dark] .sidebar{position:sticky;top:0;width:100%;height:auto;display:block;padding:12px 10px 8px;background:#1e2a38}
  :root[data-theme=dark] .sidebar .brand{font-size:25px;margin:0 8px 12px;display:block;width:max-content}
  :root[data-theme=dark] nav{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:2px}
  :root[data-theme=dark] nav a{display:flex;flex-direction:column;justify-content:center;gap:5px;padding:8px 1px;min-width:0;min-height:58px;font-size:10px;text-align:center}
  :root[data-theme=dark] .nav-label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
  :root[data-theme=dark] .nav-label-mobile{display:block;font-size:9px;line-height:1.3;white-space:nowrap}
  :root[data-theme=dark] .nav-icon svg{width:22px;height:22px}
  :root[data-theme=dark] .main{margin:0;padding:0 16px}
  :root[data-theme=dark] .topbar{height:52px;margin-bottom:20px}
  :root[data-theme=dark] .topbar>span{display:none}
  :root[data-theme=dark] .topbar-right{justify-content:flex-end;width:100%;gap:14px}
  :root[data-theme=dark] .streak{font-size:12px}
  :root[data-theme=dark] h1{font-size:25px}
  :root[data-theme=dark] .page-heading{flex-wrap:wrap;gap:14px;margin-bottom:20px}
  :root[data-theme=dark] .page-heading .button{font-size:13px;padding:10px 14px}
  .home-launcher{grid-template-columns:1fr;gap:8px;margin-bottom:16px}.home-launcher>a{padding:13px 16px}.home-launcher strong{font-size:15px}.home-launcher small{font-size:12px;margin-top:3px}.launcher-icon{width:38px;height:38px;font-size:23px}.launcher-arrow{display:block}
  :root[data-theme=dark] .stats{gap:8px;margin-bottom:24px}
  :root[data-theme=dark] .stat{padding:13px 9px}
  :root[data-theme=dark] .stat strong{font-size:23px}
  :root[data-theme=dark] .stat small{font-size:11px}
  :root[data-theme=dark] .home-columns{grid-template-columns:minmax(0,1fr);gap:24px}
  :root[data-theme=dark] .home-columns .cards-grid{grid-template-columns:1fr!important}
  :root[data-theme=dark] .video-info{padding:15px}
  :root[data-theme=dark] .video-info h3{font-size:15px}
  :root[data-theme=dark] .section-head h2{font-size:19px}
  :root[data-theme=dark] .section-head a{font-size:12px}
  :root[data-theme=dark] .word-table td{font-size:13px}
  :root[data-theme=dark] footer span{font-size:10px;float:none;display:block;margin-top:6px}
  :root[data-theme=dark] .novel-focus .main{padding:12px}
  :root[data-theme=dark] .manga-reading .main{padding:0}
}
@media(prefers-reduced-motion:reduce){.button{transition:none}}
