/* 手账界面的日夜配色：改变面板表面和文字，不对封面/舞台做反色。 */
.library-tabs .library-theme-toggle { margin-left:auto; padding:8px 17px; min-height:44px; border-radius:25px; font-family:inherit; font-size:14px; font-weight:700; line-height:1.4; cursor:pointer; white-space:nowrap; }
html[data-ui-theme="dark"] {
  --night-panel:#242a3c; --night-raised:#2e354b; --night-muted:#bbb5cd; --night-line:#50576f;
}
html[data-ui-theme="dark"] body.journal-library,
html[data-ui-theme="dark"] .journal-preparation,
html[data-ui-theme="dark"] .home-rank-modal,
html[data-ui-theme="dark"] .home-rank-rules,
html[data-ui-theme="dark"] .rv-vol-panel {
  --rv-ui-paper:#191d2b; --rv-ui-ink:#f1eef8; --rv-ui-muted:#bbb5cd; --rv-ui-pink:#ee789d; --rv-ui-line:#50576f;
  color-scheme:dark;
}
html[data-ui-theme="dark"] body.journal-library,
html[data-ui-theme="dark"] .journal-library #app,
html[data-ui-theme="dark"] .journal-preparation {
  background:#191d2b radial-gradient(#35394b 1px,transparent 1px)!important; background-size:22px 22px!important; color:#f1eef8!important;
}
html[data-ui-theme="dark"] .journal-library .game-title,
html[data-ui-theme="dark"] .journal-library .home-link,
html[data-ui-theme="dark"] .journal-library .library-heading strong,
html[data-ui-theme="dark"] .journal-library .song-name,
html[data-ui-theme="dark"] .journal-library .song-title,
html[data-ui-theme="dark"] .journal-library .card-title,
html[data-ui-theme="dark"] .journal-library .collection-title,
html[data-ui-theme="dark"] .journal-preparation h1,
html[data-ui-theme="dark"] .journal-preparation h2,
html[data-ui-theme="dark"] .journal-preparation h3,
html[data-ui-theme="dark"] .journal-preparation strong,
html[data-ui-theme="dark"] .journal-preparation .journal-back,
html[data-ui-theme="dark"] .home-rank-dialog,
html[data-ui-theme="dark"] .home-rank-rules-card { color:#f1eef8!important; text-shadow:none!important; }
html[data-ui-theme="dark"] .journal-library .song-card,
html[data-ui-theme="dark"] .journal-library .collection-card,
html[data-ui-theme="dark"] .journal-library .search-bar input,
html[data-ui-theme="dark"] .journal-library .journal-filters select,
html[data-ui-theme="dark"] .journal-library .library-tabs a,
html[data-ui-theme="dark"] .journal-preparation .journal-photo,
html[data-ui-theme="dark"] .journal-preparation .key-guide,
html[data-ui-theme="dark"] .journal-preparation .journal-key-guide,
html[data-ui-theme="dark"] .journal-preparation .journal-challenge-scores,
html[data-ui-theme="dark"] .journal-preparation .journal-best,
html[data-ui-theme="dark"] .journal-preparation .journal-mode-tab:not(.selected),
html[data-ui-theme="dark"] .journal-preparation .journal-origin-card,
html[data-ui-theme="dark"] .home-rank-dialog,
html[data-ui-theme="dark"] .home-rank-rules-card {
  background:#242a3c!important; color:#f1eef8!important; border-color:#50576f!important; box-shadow:2px 4px 0 #101421!important;
}
html[data-ui-theme="dark"] body.journal-library #songCards .song-card { box-shadow:2px 4px 0 #101421!important; }
html[data-ui-theme="dark"] .journal-library .game-subtitle,
html[data-ui-theme="dark"] .journal-library .song-up,
html[data-ui-theme="dark"] .journal-library .card-up,
html[data-ui-theme="dark"] .journal-library .song-artist,
html[data-ui-theme="dark"] .journal-library .song-meta,
html[data-ui-theme="dark"] .journal-library .library-heading span,
html[data-ui-theme="dark"] .journal-library #journalCount,
html[data-ui-theme="dark"] .journal-preparation p,
html[data-ui-theme="dark"] .journal-preparation .instruction,
html[data-ui-theme="dark"] .journal-preparation .journal-divider,
html[data-ui-theme="dark"] .journal-preparation .journal-key-label,
html[data-ui-theme="dark"] .journal-preparation .journal-singer,
html[data-ui-theme="dark"] .journal-preparation .journal-up,
html[data-ui-theme="dark"] .home-rank-subtitle,
html[data-ui-theme="dark"] #homeRankSubtitle,
html[data-ui-theme="dark"] .home-rank-rules-card p { color:#bbb5cd!important; }
html[data-ui-theme="dark"] .journal-library input::placeholder { color:#aaa6bc!important; opacity:1; }
html[data-ui-theme="dark"] .journal-library .singer-tag,
html[data-ui-theme="dark"] .journal-library .card-artist,
html[data-ui-theme="dark"] .journal-library .event-song-status,
html[data-ui-theme="dark"] .journal-library .song-singer,
html[data-ui-theme="dark"] .journal-library .event-badge,
html[data-ui-theme="dark"] .journal-preparation .journal-view-tabs,
html[data-ui-theme="dark"] .journal-preparation .journal-view-switch,
html[data-ui-theme="dark"] .journal-preparation .journal-falling-view-tabs,
html[data-ui-theme="dark"] .journal-preparation .journal-falling-view-tab,
html[data-ui-theme="dark"] .journal-preparation .journal-key-rules,
html[data-ui-theme="dark"] .journal-preparation .journal-key-card {
  background:#30364b!important; color:#ded8ee!important; border-color:#50576f!important;
}
html[data-ui-theme="dark"] body.journal-library button,
html[data-ui-theme="dark"] .journal-preparation button,
html[data-ui-theme="dark"] .home-rank-modal button,
html[data-ui-theme="dark"] .home-rank-rules button {
  background:#2e354b!important; color:#f1eef8!important; border-color:#747c99!important; box-shadow:2px 3px 0 #101421!important;
}
html[data-ui-theme="dark"] .journal-library .library-tabs a[aria-current="page"],
html[data-ui-theme="dark"] .journal-library #libraryThemeToggle[aria-pressed="true"],
html[data-ui-theme="dark"] .journal-preparation .journal-mode-tab.selected,
html[data-ui-theme="dark"] .journal-preparation #startBtn,
html[data-ui-theme="dark"] .journal-preparation #startButton,
html[data-ui-theme="dark"] .home-rank-tabs button.active {
  background:#ee789d!important; color:#211426!important; border-color:#f3a8c0!important;
}
html[data-ui-theme="dark"] .journal-preparation .difficulty-option.is-active,
html[data-ui-theme="dark"] .journal-preparation .runner-choice.active {
  background:#316b59!important; color:#fff!important; border-color:#86d9bd!important;
}
html[data-ui-theme="dark"] .journal-preparation .difficulty-option.is-active[data-difficulty="hd"],
html[data-ui-theme="dark"] .journal-preparation .runner-choice.active[data-difficulty="hard"] { background:#68532b!important; border-color:#eed78b!important; }
html[data-ui-theme="dark"] .journal-preparation .difficulty-option.is-active[data-difficulty="demon"],
html[data-ui-theme="dark"] .journal-preparation .runner-choice.active[data-difficulty="demon"] { background:#68417b!important; border-color:#d4a1e5!important; }
html[data-ui-theme="dark"] .journal-library input:not([type="range"]):not([type="checkbox"]):not([type="color"]),
html[data-ui-theme="dark"] .journal-preparation input:not([type="range"]):not([type="checkbox"]):not([type="color"]),
html[data-ui-theme="dark"] .journal-library select,
html[data-ui-theme="dark"] .journal-preparation select,
html[data-ui-theme="dark"] .rv-vol-panel,
html[data-ui-theme="dark"] .home-rank-rules-card { background:#242a3c!important; color:#f1eef8!important; border-color:#50576f!important; }
html[data-ui-theme="dark"] .journal-preparation .difficulty-option:not(.is-active),
html[data-ui-theme="dark"] .journal-preparation .runner-choice:not(.active),
html[data-ui-theme="dark"] .journal-preparation button:disabled {
  background:#242a3c!important; color:#c9c2d9!important; border-color:#6c728a!important;
}
html[data-ui-theme="dark"] .journal-preparation .journal-divider,
html[data-ui-theme="dark"] .journal-preparation .rv-speed-control,
html[data-ui-theme="dark"] .journal-preparation .journal-key-card { border-color:#50576f!important; }
html[data-ui-theme="dark"] .home-rank-row { background:#30364b!important; color:#f1eef8!important; border-color:#555d76!important; }
html[data-ui-theme="dark"] .home-rank-row * { color:inherit; }
html[data-ui-theme="dark"] .home-rank-self { background:#242a3c!important; color:#f1eef8!important; border-color:#c2bbd5!important; }
html[data-ui-theme="dark"] .home-rank-self * { color:inherit; }
html[data-ui-theme="dark"] .home-rank-row .home-rank-medal { color:#24202b!important; }
html[data-ui-theme="dark"] .home-rank-row.is-top1 .home-rank-no,
html[data-ui-theme="dark"] .home-rank-row.is-top2 .home-rank-no,
html[data-ui-theme="dark"] .home-rank-row.is-top3 .home-rank-no { color:#24202b!important; }
html[data-ui-theme="dark"] .journal-preparation .key-guide *,
html[data-ui-theme="dark"] .journal-preparation .lane-guide * { color:inherit!important; }
html[data-ui-theme="dark"] .journal-preparation .journal-falling-view-tab.selected {
  background:#454056!important; color:#ffb1ca!important; border-color:#be829f!important;
}
html[data-ui-theme="dark"] .home-rank-mine { background:#242a3c!important; color:#f1eef8!important; border-color:#bfb8d3!important; }
html[data-ui-theme="dark"] .home-rank-mine * { color:inherit!important; }
html[data-ui-theme="dark"] .home-rank-rules-body,
html[data-ui-theme="dark"] .home-rank-rules-list { color:#ded8ee!important; background:#242a3c!important; }
@media(max-width:560px) { .library-tabs .library-theme-toggle { padding:8px 11px; font-size:12px; } }
/* 矮横屏的右上角须给 B 站宿主胶囊留出点击区域。 */
@media(min-width:600px) and (max-height:500px) { .journal-library .library-tabs { padding-right:120px; } }

/* 深色面板的子控件必须一起换表面，避免白底白字或黑底黑字。 */
html[data-ui-theme="dark"] .journal-preview-button {background:#30364b!important;color:#f1eef8!important;border-color:#626b86!important;}
html[data-ui-theme="dark"] .journal-preview-icon {background:#fff8e9!important;border-color:#76708d!important;color:#29243c!important;}
html[data-ui-theme="dark"] .journal-preview-icon svg,
html[data-ui-theme="dark"] .journal-preview-icon path {color:#29243c!important;}
html[data-ui-theme="dark"] .journal-preview-bars i {background:#29243c!important;}
html[data-ui-theme="dark"] .rv-vol-panel .rvp-title,
html[data-ui-theme="dark"] .rv-vol-panel .rvp-label,
html[data-ui-theme="dark"] .rv-vol-panel .rvp-val,
html[data-ui-theme="dark"] .rv-vol-panel .rvp-speed-note,
html[data-ui-theme="dark"] .rv-vol-panel .rv-speed-label,
html[data-ui-theme="dark"] .rv-vol-panel .rv-speed-value,
html[data-ui-theme="dark"] .rv-vol-panel .rv-key-bindings,
html[data-ui-theme="dark"] .rv-vol-panel .rv-key-help {color:#eee9f7!important;}
html[data-ui-theme="dark"] .rv-vol-panel .rvp-close,
html[data-ui-theme="dark"] .rv-vol-panel .rv-key-chip,
html[data-ui-theme="dark"] .rv-vol-panel .rv-key-add,
html[data-ui-theme="dark"] .rv-vol-panel .rvp-choice-row,
html[data-ui-theme="dark"] .rv-vol-panel .rvp-toggle-row,
html[data-ui-theme="dark"] .rv-vol-panel .rvp-action-row {background:#30364b!important;color:#f1eef8!important;border-color:#737d9a!important;box-shadow:none!important;}
html[data-ui-theme="dark"] .rv-vol-panel .rvp-choice-options {background:#171c2b!important;border-color:#737d9a!important;}
html[data-ui-theme="dark"] .rv-vol-panel .rvp-choice-button {background:transparent!important;color:#e1dbea!important;}
html[data-ui-theme="dark"] .rv-vol-panel .rvp-choice-button[aria-checked="true"] {background:#ef8cab!important;color:#241c2c!important;}
html[data-ui-theme="dark"] .rv-vol-panel .rvp-toggle-row[aria-checked="true"] {background:#453047!important;color:#f1eef8!important;}
html[data-ui-theme="dark"] .rv-vol-panel .rvp-toggle-track {background:#171c2b!important;border-color:#8992ac!important;}
html[data-ui-theme="dark"] .rv-vol-panel .rvp-toggle-row[aria-checked="true"] .rvp-toggle-track {background:#b94571!important;}
html[data-ui-theme="dark"] .rv-vol-panel .rvp-toggle-knob {background:#fff8eb!important;}
html[data-ui-theme="dark"] .rv-vol-panel .rv-key-chip span {color:#ffb0b6!important;}
html[data-ui-theme="dark"] .rv-vol-panel .rv-key-chip:disabled {opacity:.85;}
html[data-ui-theme="dark"] .rv-vol-panel .rvp-key-root,
html[data-ui-theme="dark"] .rv-vol-panel .rvp-extra,
html[data-ui-theme="dark"] .rv-vol-panel .rvp-speed {border-color:#5b647e!important;}
.journal-note-shape-tabs button {cursor:pointer;}
.continue-last-song {display:table;margin:12px auto 0;padding:7px 15px;border-radius:22px;background:#fff8ef;color:#302b4e;font-weight:700;text-decoration:underline;text-underline-offset:3px;font-size:14px;max-width:90%;}
html[data-ui-theme="dark"] .journal-origin-title,
html[data-ui-theme="dark"] .exp-rs-origin-title,
html[data-ui-theme="dark"] #resultsScreen .origin-title {color:#eee9f7!important;}
html[data-ui-theme="dark"] .journal-origin-up,
html[data-ui-theme="dark"] .exp-rs-origin-up,
html[data-ui-theme="dark"] #resultsScreen .origin-up {color:#c6bfd6!important;}
html[data-ui-theme="dark"] .exp-rs-origin-card,
html[data-ui-theme="dark"] #resultsScreen .origin-card {background:#242a3c!important;color:#eee9f7!important;border-color:#50576f!important;box-shadow:2px 4px 0 #101421!important;}
.journal-track-palette-button[hidden] {display:none!important;}

/* 结算页统一跟随日夜主题；浅色页不会再单独出现深色原曲卡。 */
html[data-ui-theme="dark"] #resultsScreen,
html[data-ui-theme="dark"] .exp-rs-root {background:#151827 radial-gradient(#2d3247 1px,transparent 1px)!important;background-size:22px 22px!important;color:#f1eef8!important;color-scheme:dark;}
html[data-ui-theme="dark"] #resultsScreen .results-content,
html[data-ui-theme="dark"] .exp-rs-root .exp-rs-card,
html[data-ui-theme="dark"] #resultsScreen .rank-card,
html[data-ui-theme="dark"] .exp-rs-root .exp-rs-rank-card {background:#22283a!important;color:#f1eef8!important;border-color:#606984!important;box-shadow:4px 5px 0 #0d1020!important;}
html[data-ui-theme="dark"] #resultsScreen .results-badge,
html[data-ui-theme="dark"] .exp-rs-root .exp-rs-badge {background:#423346!important;color:#ebc5d4!important;}
html[data-ui-theme="dark"] #resultsScreen .rv-result-brand,
html[data-ui-theme="dark"] .exp-rs-root .rv-result-brand {color:#ffe2ec!important;}
html[data-ui-theme="dark"] #resultsScreen .rv-result-invite,
html[data-ui-theme="dark"] .exp-rs-root .rv-result-invite {color:#bcb2ce!important;}
html[data-ui-theme="dark"] #resultsScreen .results-song-name,
html[data-ui-theme="dark"] .exp-rs-root .exp-rs-song,
html[data-ui-theme="dark"] #resultsScreen .results-score,
html[data-ui-theme="dark"] .exp-rs-root .exp-rs-score,
html[data-ui-theme="dark"] #resultsScreen .rank-title,
html[data-ui-theme="dark"] .exp-rs-root .exp-rs-rank-title,
html[data-ui-theme="dark"] #resultsScreen .results-combo b,
html[data-ui-theme="dark"] .exp-rs-root .exp-rs-combo b {color:#f1eef8!important;}
html[data-ui-theme="dark"] #resultsScreen .results-difficulty,
html[data-ui-theme="dark"] .exp-rs-root .exp-rs-difficulty {background:#30374c!important;color:#ddd5e9!important;border-color:#727c98!important;}
html[data-ui-theme="dark"] #resultsScreen .stat-item,
html[data-ui-theme="dark"] .exp-rs-root .exp-rs-stat {background:#2d344a!important;}
html[data-ui-theme="dark"] #resultsScreen .stat-label,
html[data-ui-theme="dark"] .exp-rs-root .exp-rs-stat-k,
html[data-ui-theme="dark"] #resultsScreen .score-label,
html[data-ui-theme="dark"] .exp-rs-root .exp-rs-score-label,
html[data-ui-theme="dark"] #resultsScreen .results-combo,
html[data-ui-theme="dark"] #resultsScreen .rank-subtitle,
html[data-ui-theme="dark"] #resultsScreen .rank-empty,
html[data-ui-theme="dark"] #resultsScreen .rank-event-hint,
html[data-ui-theme="dark"] .exp-rs-root .exp-rs-combo,
html[data-ui-theme="dark"] .exp-rs-root .exp-rs-rank-empty,
html[data-ui-theme="dark"] .exp-rs-root .exp-rs-rank-subtitle,
html[data-ui-theme="dark"] .exp-rs-root .exp-rs-rank-unavailable {color:#c5bdd2!important;}
html[data-ui-theme="dark"] #resultsScreen .btn-result,
html[data-ui-theme="dark"] .exp-rs-root .exp-rs-btn,
html[data-ui-theme="dark"] #resultsScreen .rank-board-tab,
html[data-ui-theme="dark"] .exp-rs-root .exp-rs-rank-board-tab {background:#30374e!important;color:#eee8f5!important;border-color:#737d99!important;box-shadow:2px 3px 0 #101626!important;}
html[data-ui-theme="dark"] #resultsScreen .btn-retry,
html[data-ui-theme="dark"] #resultsScreen .btn-share,
html[data-ui-theme="dark"] .exp-rs-root .exp-rs-btn-retry,
html[data-ui-theme="dark"] .exp-rs-root .exp-rs-btn-share,
html[data-ui-theme="dark"] .exp-rs-root .exp-rs-btn-log {background:#eb81a2!important;color:#241b2b!important;}
html[data-ui-theme="dark"] #resultsScreen .rank-board-tab.active,
html[data-ui-theme="dark"] .exp-rs-root .exp-rs-rank-board-tab.active {background:#634355!important;color:#ffe0eb!important;}
html[data-ui-theme="dark"] #resultsScreen [data-cloud-save-feedback],
html[data-ui-theme="dark"] .exp-rs-root [data-cloud-save-feedback] {color:#c8c0d7!important;border-color:#66718c!important;}
html[data-ui-theme="dark"] #resultsScreen .rank-row,
html[data-ui-theme="dark"] #resultsScreen .rank-mine,
html[data-ui-theme="dark"] .exp-rs-root .exp-rs-rank-row,
html[data-ui-theme="dark"] .exp-rs-root .exp-rs-rank-mine {background:#2d344a!important;color:#eee8f5!important;border-color:#8d96af!important;}
html[data-ui-theme="dark"] #resultsScreen .rank-nickname,
html[data-ui-theme="dark"] #resultsScreen .rank-score,
html[data-ui-theme="dark"] .exp-rs-root .exp-rs-rank-nickname,
html[data-ui-theme="dark"] .exp-rs-root .exp-rs-rank-score {color:#eee8f5!important;}
html[data-ui-theme="dark"] #resultsScreen .results-grade-wrap,
html[data-ui-theme="dark"] .exp-rs-root .exp-rs-grade-wrap,
html[data-ui-theme="dark"] #resultsScreen .results-grade,
html[data-ui-theme="dark"] .exp-rs-root .exp-rs-grade {background:#22283a!important;}
html[data-ui-theme="dark"] #resultsScreen .grade-C,
html[data-ui-theme="dark"] .exp-rs-root .exp-rs-grade-C {--grade-ink:#98b6e4;}
html[data-ui-theme="dark"] #resultsScreen .grade-S,html[data-ui-theme="dark"] .exp-rs-root .exp-rs-grade-S {--grade-ink:#f4cd63;}
html[data-ui-theme="dark"] #resultsScreen .grade-A,html[data-ui-theme="dark"] .exp-rs-root .exp-rs-grade-A {--grade-ink:#f18cad;}
html[data-ui-theme="dark"] #resultsScreen .grade-B,html[data-ui-theme="dark"] .exp-rs-root .exp-rs-grade-B {--grade-ink:#7ad2b9;}
html[data-ui-theme="dark"] .rv-challenge-result-art {background:#30364c!important;border-color:#606984!important;}
html[data-ui-theme="dark"] .rv-challenge-result-copy p,
html[data-ui-theme="dark"] .rv-challenge-result-heading h2,
html[data-ui-theme="dark"] .rv-unranked-result-note {color:#eee8f5!important;}
html[data-ui-theme="dark"] #resultsScreen .rank-tag,
html[data-ui-theme="dark"] .exp-rs-root .exp-rs-rank-tag {background:#59657f!important;color:#f5efff!important;}
html[data-ui-theme="dark"] #resultsScreen .rank-no,
html[data-ui-theme="dark"] .exp-rs-root .exp-rs-rank-no {color:#c5bdd2!important;}
html[data-ui-theme="dark"] #resultsScreen .rank-top1 .rank-no,
html[data-ui-theme="dark"] #resultsScreen .rank-top2 .rank-no,
html[data-ui-theme="dark"] #resultsScreen .rank-top3 .rank-no,
html[data-ui-theme="dark"] .exp-rs-root .exp-rs-rank-top1 .exp-rs-rank-no,
html[data-ui-theme="dark"] .exp-rs-root .exp-rs-rank-top2 .exp-rs-rank-no,
html[data-ui-theme="dark"] .exp-rs-root .exp-rs-rank-top3 .exp-rs-rank-no {color:#241c2c!important;}
html[data-ui-theme="dark"] #resultsScreen .rank-avatar-mine,
html[data-ui-theme="dark"] .exp-rs-root .exp-rs-rank-avatar-mine {color:#241c2c!important;}
html[data-ui-theme="dark"] #resultsScreen .trivia-bar,html[data-ui-theme="dark"] .exp-rs-root .exp-rs-trivia {color:#c5bdd2!important;border-color:#606984!important;}
html[data-ui-theme="dark"] .exp-rs-root .exp-rs-rank-help-dialog {background:#22283a!important;color:#eee8f5!important;border-color:#606984!important;}
html[data-ui-theme="dark"] .exp-rs-root .exp-rs-rank-help-body,html[data-ui-theme="dark"] .exp-rs-root .exp-rs-rank-help-song {color:#d5cde3!important;}
html[data-ui-theme="dark"] .rv-challenge-result-heading > span {color:#c5bdd2!important;}
