/* 松间夜色 keeps the original palette. 晴日来信 adds warm paper, green ink,
   soft daylight and distinct photo/3D stages, without recoloring image assets. */
.theme-switch { display:flex; gap:4px; padding:5px; border:1px solid var(--line); border-radius:999px; background:var(--panel); }
.theme-switch button { display:flex; align-items:center; gap:7px; border:0; border-radius:999px; padding:8px 14px; background:transparent; color:var(--muted); font-size:12px; white-space:nowrap; }
.theme-switch button[aria-pressed=true] { background:var(--accent-dark); color:var(--accent); }
.theme-switch button:hover { color:var(--text); }
.theme-switch button:focus-visible { outline-offset:2px; }
:root[data-theme=daylight] { color-scheme:light; --bg:#f8f7f0; --panel:#fffefb; --panel-hover:#eef5ef; --line:#d5dfd4; --line-soft:#e5eae0; --text:#263f37; --muted:#587063; --dim:#687d70; --accent:#287158; --accent-dark:#e2efe4; --surface:#f2f6ed; }
html[data-theme=daylight] body { background:radial-gradient(ellipse at 90% 0%,#f8e7bc66,transparent 40%),radial-gradient(ellipse at 0% 42%,#cfead75e,transparent 38%),var(--bg); }
html[data-theme=daylight] ::selection { background:#d3e6c4; color:#203c30; }
html[data-theme=daylight] .site-header { background:#fffefb80; }
html[data-theme=daylight] .brand-caption { color:#426b57; }
html[data-theme=daylight] #primary-nav [aria-current]::after { height:3px; border-radius:3px 3px 0 0; background:linear-gradient(90deg,#287158,#8cae5a); }
html[data-theme=daylight] .theme-switch { box-shadow:0 3px 15px #4863420a; }
html[data-theme=daylight] .theme-switch [data-theme-choice=daylight][aria-pressed=true] { background:#f5e7c4; color:#755221; }
html[data-theme=daylight] :is(.panel,.collection-card,.game-card,.project-card,.metric-card,.memory-card,.case-feature-card) { box-shadow:0 5px 22px #38512f06; }
html[data-theme=daylight] .home-intro h1 { color:#264c3a; }
html[data-theme=daylight] .feature-profile { background:radial-gradient(ellipse at 90% 15%,#fcf0c9,transparent 70%),linear-gradient(130deg,#e7f0dc,#d8e8dc); border-color:#cad8bf; }
html[data-theme=daylight] .feature-profile:hover { background:#e4eedb; }
html[data-theme=daylight] .feature-copy p { color:#4f7059; }
html[data-theme=daylight] .feature-corner { color:#56724a; }
html[data-theme=daylight] .globe-wrap { color:#558953; }
html[data-theme=daylight] .feature-room { color:#fff; }
html[data-theme=daylight] .feature-room :is(.eyebrow,.feature-bottom p,.diagram-label) { color:#dce5dd; }
html[data-theme=daylight] .feature-room .icon { color:#d8eabc; }
html[data-theme=daylight] .market-live { background:linear-gradient(130deg,#fffdf6,#edf4eb); box-shadow:0 5px 30px #44643b08; }
html[data-theme=daylight] :is(.market-up,.stock-positive) { color:#b9503d; }
html[data-theme=daylight] :is(.market-down,.stock-negative) { color:#26796c; }
html[data-theme=daylight] :is(.metric-card strong,.hw-relative,.hw-specs dd,.hw-catalog-table td) { color:var(--text); }
html[data-theme=daylight] :is(input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea) { background:#fffefb; color:var(--text); border-color:var(--line); }
html[data-theme=daylight] :is(input,select,textarea)::placeholder { color:#728475; }
html[data-theme=daylight] input { accent-color:var(--accent); }
html[data-theme=daylight] :is(.hw-inspector,.mb-inspector,.mb-platform,.memory-card,.memory-candidates article,.case-feature-card,.globe-landmark,.note-topic,.mb-guide-grid>article,.wallpaper-dialog) { background:var(--panel); border-color:var(--line); }
html[data-theme=daylight] :is(.mb-platform.is-current,.mb-path,.mb-pair-status,.mb-fit-note,.memory-compare-empty,.memory-capacity-guide span,.hw-board-entry,.game-version,.listening-panel,.project-feature) { background:#eaf2e4; color:var(--text); border-color:#c7d6bc; }
html[data-theme=daylight] :is(.hw-catalog-table th,.hw-comparison th,.mb-table thead,.hw-catalog-table tr.is-selected td,.mb-table tr.is-selected,.hw-rank-row.is-selected,.hw-mode-switch button[aria-pressed=true],.mode-button.is-active) { background:#e3eedb; border-color:#bdcfae; }
html[data-theme=daylight] :is(.hw-rank-row:hover,.hw-catalog-table tr:hover td,.mb-table td>button:hover,.mode-button:hover) { background:#eef4e8; }
html[data-theme=daylight] :is(.hw-mode-switch button,.hw-comparison button,.mb-clear-filter,.mb-chipset-chips button,.script-tabs button) { background:#f0f4e9; color:var(--muted); border-color:var(--line); }
html[data-theme=daylight] :is(.mb-revision,.mb-table-status.unknown,.mb-pair-status.unknown strong) { color:#8b642a; }
html[data-theme=daylight] .mb-pair-status.unknown { background:#fbf0d5; }
html[data-theme=daylight] .mb-table td>button small { color:var(--muted); }
html[data-theme=daylight] .case-card-visual { background:radial-gradient(ellipse at 80% 20%,#f6e5b3,transparent),#e1ecd8; }
html[data-theme=daylight] .game-symbol-cover { background:radial-gradient(ellipse at 70% 10%,#fae7b4,transparent),linear-gradient(145deg,#e4edda,#d7e6db); }
html[data-theme=daylight] .game-cover-symbol { color:#487451; }
html[data-theme=daylight] :is(.script-title h3,.script-role-card p) { color:var(--text); }
html[data-theme=daylight] :is(.script-title .eyebrow,.script-source,.rule-step-number) { color:var(--accent); }
html[data-theme=daylight] .script-tabs button[aria-selected=true] { background:#e3eedb; color:var(--accent); border-color:#99b98b; }
html[data-theme=daylight] .script-role-sheet { background:linear-gradient(130deg,#fffefb,#eff4e9); border-color:var(--line); }
html[data-theme=daylight] .script-faction { --faction-color:#3d714a; }
html[data-theme=daylight] .script-faction.faction-1 { --faction-color:#387069; }
html[data-theme=daylight] .script-faction.faction-2 { --faction-color:#9a652b; }
html[data-theme=daylight] :is(.script-faction.faction-3,.script-faction[data-faction="狼人"]) { --faction-color:#a14f48; }
html[data-theme=daylight] .script-faction[data-faction="村民"] { --faction-color:#3d714a; }
html[data-theme=daylight] .script-faction-heading { background:#e8efde; border-color:var(--line); }
html[data-theme=daylight] :is(.video-placeholder,.song-art,.empty-icon,.project-icon,.landmark-photo-pending) { background:#e8efde; color:var(--accent); border-color:#c4d4b5; }
html[data-theme=daylight] .ladder-row>div { background:#d9e9c9; }
html[data-theme=daylight] .ladder-row:nth-child(2)>div { background:#e3edda; }
html[data-theme=daylight] .ladder-row:nth-child(3)>div { background:#edf2e6; }
html[data-theme=daylight] .ladder-row>div>span { color:var(--muted); }
html[data-theme=daylight] .site-like-button { background:#fffefb; border-color:var(--line); }
html[data-theme=daylight] .site-like-button[aria-pressed=true] { background:#fbece5; border-color:#e4bbb0; color:#9f554b; }
/* Preserve the lighting of the rendered globe, room and hardware models.
   Their toolbars and captions remain readable on the bright page. */
html[data-theme=daylight] :is(.dorm-stage,.travel-globe-stage,.build-model-stage) { --text:#edf0e7; --muted:#b8c9b6; --dim:#9aac9a; --accent:#b7de83; --bg:#111716; --line:#4c6150; }
html[data-theme=daylight] .whale-terminal { background:#e8f2f7; color:#294e70; border-color:#c2d6df; box-shadow:0 20px 65px #47738c18; }
html[data-theme=daylight] .whale-atmosphere { background:radial-gradient(ellipse at 75% 20%,#fff3c5b0,transparent 55%),radial-gradient(ellipse at 20% 65%,#e5e5fb,transparent 60%),linear-gradient(135deg,#f4f9fc,#d6e9f5 70%,#c9e3ed); }
html[data-theme=daylight] .whale-atmosphere::after { box-shadow:inset 0 0 100px 20px #fff7; }
html[data-theme=daylight] .whale-orbit { border-color:#597fb51c; }
html[data-theme=daylight] .whale-menu h1 { color:#315d85; text-shadow:0 2px 0 #fff9,0 0 35px #fffd; }
html[data-theme=daylight] :is(.whale-kicker,.whale-development,.whale-topbar,.whale-bottom,.whale-bottom a,.whale-menu-number,.whale-menu-arrow) { color:#516c8a; text-shadow:none; }
html[data-theme=daylight] .whale-menu-rule { background:#859cbd; }
html[data-theme=daylight] .whale-menu nav button { background:linear-gradient(90deg,#ffffffc9,#ffffff70); color:#345573; border-color:#90abc049; box-shadow:0 4px 18px #5c7b9d08; }
html[data-theme=daylight] .whale-menu nav button:is(:hover,:focus-visible) { background:#fff; border-color:#8caec8; }
html[data-theme=daylight] :is(.whale-topbar button,.whale-notice button) { background:#ffffffa8; color:#345573; border-color:#a1b9ce; }
html[data-theme=daylight] .whale-notice { background:#f7fbff; border-color:#9db5d1; color:#345573; }
html[data-theme=daylight] .wallpaper-card>button { background:#edf2e7; }
html[data-theme=daylight] .wallpaper-large { background:#ecf0e8; }
html[data-theme=daylight] :is(.trade-history,.build-inspector,.build-guides article,.favorite-cover) { background:var(--panel); border-color:var(--line); }
html[data-theme=daylight] .github-profile { background:linear-gradient(120deg,#e8f0db,#fff9e8); }
html[data-theme=daylight] .project-preview { background:radial-gradient(ellipse at 50% 100%,#d7e8c670,transparent 75%),#f0f4e9; }
html[data-theme=daylight] .project-preview.project-room-gallery { background:#edf2e7; }
html[data-theme=daylight] :is(.history-readout,.design-tags span,.project-feature-tags span) { color:var(--text); }
html[data-theme=daylight] :is(.design-tags span,.project-feature-tags span,.build-conditions,.power-recommendation,.build-table-wrap thead th) { background:#e7efdd; border-color:#c3d3b5; }
html[data-theme=daylight] :is(.history-switch button[aria-pressed=true],.stock-extreme-controls button[aria-pressed=true],.place-chip[aria-pressed=true],.design-selector button.is-selected,.build-model-row.is-selected) { background:#e2eedb; color:var(--accent); }
html[data-theme=daylight] .stock-month-track { background:#e5ebe0; }
html[data-theme=daylight] .stock-discrepancy { color:#8a6329; background:#f9f0d8; }
html[data-theme=daylight] .travel-city-list button { color:#297993; }
html[data-theme=daylight] .residence-line button { color:#92682a; }
html[data-theme=daylight] .game-dealer { background:#f2f6eb; border-color:#c5d7b7; }
html[data-theme=daylight] .dealer-seat { background:#e9f0df; color:var(--text); border-color:#b8cca7; }
html[data-theme=daylight] .dealer-secret { background:#e4edda; color:var(--text); border-color:#b6cd9f; }
html[data-theme=daylight] .media-work-type { color:#edf0e7; }
html[data-theme=daylight] :is(.hw-brand.amd,.hw-brand.intel) { color:#486a6a; }
html[data-theme=daylight] :is(.hw-rank-scroll,.hw-catalog-scroll,.mb-table-wrap) { scrollbar-color:#adc4a5 #f0f4e9; }
html[data-theme=daylight] .dorm-view-actions button { background:#e9f0df; border-color:#c3d2b5; }
html[data-theme=daylight] .collection-card { background:var(--panel); }
html[data-theme=daylight] .small-pill { background:#edf2e7; }
html[data-theme=daylight] .button { border-color:#baccb0; }
html[data-theme=daylight] .button.secondary { background:#e8efde; color:var(--accent); }
html[data-theme=daylight] .button.secondary:hover { background:#dce9cd; border-color:#91b382; }
html[data-theme=daylight] .page-number { color:#718773; }
html[data-theme=daylight] .home-bottom>a { background:#fffefb; }
html[data-theme=daylight] .collection-icon { background:#e5edda; }
html[data-theme=daylight] .hardware-model-stage { --text:#edf0e7; --muted:#b8c9b6; --dim:#9aac9a; --accent:#b7de83; --bg:#111716; --line:#4c6150; }
html[data-theme=daylight] :is(.map-panel,.model-stage) { background:var(--panel); }
html[data-theme=daylight] .tag { color:var(--muted); border-color:var(--line); }
html[data-theme=daylight] .card-icon { background:#e5edda; }
html[data-theme=daylight] .tab:hover { background:#edf3e7; }
html[data-theme=daylight] .mb-platform.is-incompatible .mb-platform-title b { color:#856c5c; }
html[data-theme=daylight] :is(.detail-dialog,.wallpaper-dialog)::backdrop { background:#26423788; }
/* Phone footer: two links on the first row, the theme switch spanning the second.
   The base rule pushes every footer link right (margin-left:auto), which in this
   grid parked 首页 in the middle of its cell — reset it here. */
@media(max-width:650px) {
  .site-footer { display:grid; grid-template-columns:1fr 1fr; gap:18px; padding-block:24px; }
  .site-footer>a { margin-left:0; }
  .site-footer>a.footer-home { justify-self:start; }
  .theme-switch { grid-column:1/-1; grid-row:2; justify-self:stretch; }
  .site-footer>a:last-child { justify-self:end; }
  .theme-switch button { padding:8px 12px; flex:1; justify-content:center; }
}
