/* Approved moonlit Fanren presentation. The existing snow/day theme is kept intact. */
.profile-scene,
.profile-scene-shade,
.profile-eyebrow,
.profile-seal,
.music-scene { display: none; }

.wallpaper-only-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--gold);
  font: inherit;
  font-size: 12px;
  white-space: nowrap;
  transition: color .2s ease;
}
.header-actions .wallpaper-only-toggle:hover,
.header-actions .wallpaper-only-toggle[aria-pressed="true"] {
  color: var(--nav-hover);
  border-color: transparent;
  background: transparent;
}
.wallpaper-only-toggle:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
body.is-wallpaper-only .page-main,
body.is-wallpaper-only .site-footer { visibility: hidden; pointer-events: none; }

html[data-theme="dark"],
html[data-theme="dark"][data-wallpaper="true"] {
  --bg: #081323;
  --card: rgba(13, 29, 49, .82);
  --card-strong: rgba(29, 49, 70, .9);
  --text: #f1f3ec;
  --text-muted: #b8c8d8;
  --line: rgba(174, 196, 218, .24);
  --line-strong: rgba(193, 207, 215, .45);
  --accent: #d6bf86;
  --focus: #ddceaa;
  --gold: #d6bf86;
  --nav-hover: #fff7dc;
  --header-bg: linear-gradient(100deg, rgba(14, 29, 49, .87), rgba(19, 36, 60, .76));
  --quote-bg: rgba(11, 27, 46, .83);
  --quote-text: #e9dfbc;
}
html[data-theme="dark"] .site-background-shade {
  background: linear-gradient(180deg, rgba(4, 12, 27, .09), rgba(4, 12, 27, .02) 45%, rgba(3, 10, 21, .24));
}
html[data-theme="dark"] .site-header {
  border-color: rgba(185, 205, 227, .3);
  background: var(--header-bg);
  box-shadow: 0 8px 32px rgba(2, 9, 20, .2), inset 0 1px rgba(233, 242, 244, .06);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
html[data-theme="dark"] .brand { color: #eef0e7; }
html[data-theme="dark"] .main-nav a { color: #c2cfdb; }
html[data-theme="dark"] .main-nav a:hover,
html[data-theme="dark"] .main-nav a.active,
html[data-theme="dark"] .main-nav a[aria-current="page"] {
  color: #f4e4b6;
  background: transparent;
  box-shadow: none;
  text-decoration: none;
}
html[data-theme="dark"] .main-nav a[aria-current="page"]::after { display: none; }
html[data-theme="dark"] .header-actions .icon-button:hover,
html[data-theme="dark"] .header-actions .icon-button[aria-expanded="true"] {
  color: #f4e4b6;
  background: transparent;
  border-color: transparent;
}
html[data-theme="dark"] .settings-panel {
  border-color: rgba(188, 208, 226, .36);
  background: rgba(12, 27, 46, .97);
  color: #edf1eb;
  box-shadow: 0 18px 48px rgba(1, 8, 18, .45);
}
html[data-theme="dark"] .settings-panel label,
html[data-theme="dark"] .settings-panel p { color: #c6d3df; }
html[data-theme="dark"] .settings-panel input,
html[data-theme="dark"] .settings-panel select,
html[data-theme="dark"] .settings-panel button {
  color: #eef1eb;
  accent-color: #d6bf86;
}

/* A softly lit silver-blue surface, with the original search interaction. */
html[data-theme="dark"] .search-form {
  --search-ink: #eef3ed;
  --search-muted: #c1d0dc;
  --search-focus: #ddceaa;
  border-color: rgba(194, 211, 229, .46);
  border-radius: 22px;
  background: linear-gradient(120deg, rgba(32, 56, 78, .92), rgba(15, 31, 52, .89));
  box-shadow: inset 0 1px 1px rgba(227, 239, 245, .22), inset 0 -1px 3px rgba(3, 11, 22, .36), 0 8px 24px rgba(2, 10, 22, .2);
}
html[data-theme="dark"] .search-form::before { opacity: .09; mix-blend-mode: screen; }
html[data-theme="dark"] .search-form::after { opacity: .14; }
html[data-theme="dark"] .search-form:focus-within {
  border-color: rgba(224, 211, 165, .8);
  box-shadow: inset 0 1px 1px rgba(227, 239, 245, .24), 0 0 0 3px rgba(211, 190, 136, .11), 0 8px 26px rgba(2, 10, 22, .24);
}
html[data-theme="dark"] .search-form input { color: #eef3ed; }
html[data-theme="dark"] .search-form input::placeholder { color: #c1d0dc; opacity: 1; }
html[data-theme="dark"] .search-form > .icon { color: #d9e3e7; }
html[data-theme="dark"] .search-form button {
  border-color: rgba(208, 222, 200, .48);
  border-radius: 17px;
  background: linear-gradient(145deg, #426b57, #2d503f);
  color: #f6f1d7;
  box-shadow: inset 0 1px 2px rgba(235, 244, 204, .2), 0 2px 8px rgba(0, 0, 0, .14);
}
html[data-theme="dark"] .search-form button:hover { background: linear-gradient(145deg, #4c7962, #355d49); }

/* Han Li occupies the right side; the left remains a quiet reading surface. */
html[data-theme="dark"] .profile-card {
  position: relative;
  isolation: isolate;
  min-height: 310px;
  border: 1px solid rgba(180, 204, 220, .38);
  border-radius: 22px;
  background: #09182b;
  box-shadow: 0 16px 34px rgba(2, 8, 19, .24), inset 0 0 0 1px rgba(223, 237, 239, .03);
}
html[data-theme="dark"] .profile-scene {
  position: absolute;
  z-index: -3;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 80% 40%;
  filter: saturate(.78) brightness(.86);
  pointer-events: none;
}
html[data-theme="dark"] .profile-scene-shade {
  position: absolute;
  z-index: -2;
  inset: 0;
  display: block;
  background: linear-gradient(90deg, #09182b 0%, rgba(9, 24, 43, .98) 30%, rgba(9, 24, 43, .91) 42%, rgba(9, 24, 43, .64) 56%, rgba(9, 24, 43, .08) 78%, rgba(9, 24, 43, .14)), linear-gradient(0deg, rgba(5, 15, 31, .7), transparent 45%);
  pointer-events: none;
}
html[data-theme="dark"] .profile-card::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  left: 32px;
  width: 46%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(222, 202, 152, .8), transparent);
  pointer-events: none;
}
html[data-theme="dark"] .profile-card .profile-body {
  position: relative;
  min-height: 310px;
  height: 100%;
  padding: 32px;
  justify-content: space-between;
}
html[data-theme="dark"] .profile-card .profile-main { align-items: center; gap: 22px; }
html[data-theme="dark"] .profile-card .avatar {
  flex: 0 0 96px;
  width: 96px;
  height: 96px;
  padding: 3px;
  border: 1px solid rgba(223, 209, 164, .8);
  border-radius: 50%;
  background: linear-gradient(135deg, #d9e4dd, #66868f 46%, #1e3b4c 65%, #c8b47c);
  box-shadow: 0 8px 24px rgba(0, 8, 18, .3), 0 0 18px rgba(203, 216, 209, .08);
  overflow: hidden;
}
html[data-theme="dark"] .profile-card .avatar img,
html[data-theme="dark"] .profile-card .avatar span { background: #172d3c; color: #e9e5d0; }
html[data-theme="dark"] .profile-card .avatar img.theme-avatar {
  object-position: 100% 50%;
  transform: translate(-10%, 12%) scale(1.9);
  transform-origin: 63% 36%;
  filter: saturate(.76) brightness(.88);
}
html[data-theme="dark"] .profile-card .profile-name-group { max-width: 350px; }
html[data-theme="dark"] .profile-card .profile-eyebrow {
  display: block;
  margin: 0 0 10px;
  color: #d6bf86;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: .18em;
}
html[data-theme="dark"] .profile-card .profile-name-group h2 {
  margin: 0 0 10px;
  color: #f1f3ec;
  font-family: "Noto Serif SC", "Songti SC", "STSong", serif;
  font-size: 32px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: .1em;
  text-shadow: 0 2px 14px rgba(2, 11, 21, .5);
}
html[data-theme="dark"] .profile-card .profile-name-group p {
  max-width: 30ch;
  color: #c4d1dd;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.9;
  text-shadow: 0 1px 8px #09182b;
}
html[data-theme="dark"] .profile-card .tag-list { margin-top: 12px; }
html[data-theme="dark"] .profile-card .tag {
  border-color: rgba(193, 205, 201, .25);
  background: rgba(28, 51, 63, .5);
  color: #c8d6d7;
  font-size: 10px;
}
html[data-theme="dark"] .profile-card .profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 250px;
  max-width: 100%;
  gap: 0;
  margin-top: auto;
  padding-top: 36px;
  border: 0;
}
html[data-theme="dark"] .profile-card .profile-stats > div {
  align-items: flex-start;
  gap: 6px;
  padding: 0 22px;
  text-align: left;
}
html[data-theme="dark"] .profile-card .profile-stats > div:first-child { padding-left: 0; }
html[data-theme="dark"] .profile-card .profile-stats > div + div { border-left: 1px solid rgba(183, 204, 217, .22); }
html[data-theme="dark"] .profile-card .profile-stats > div + div::before { display: none; }
html[data-theme="dark"] .profile-card .profile-stats > div:nth-child(n) strong {
  color: #eee7cf;
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 27px;
  font-weight: 400;
  line-height: 1;
  text-shadow: 0 2px 10px rgba(5, 15, 28, .7);
}
html[data-theme="dark"] .profile-card .profile-stats span { color: #bdcbd5; font-size: 11px; font-weight: 400; letter-spacing: .15em; }
html[data-theme="dark"] .profile-card .profile-seal {
  position: absolute;
  right: 28px;
  bottom: 28px;
  display: block;
  width: 27px;
  padding: 7px 4px;
  border: 1px solid rgba(220, 204, 159, .5);
  border-radius: 3px;
  color: #d9c896;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 11px;
  line-height: 1.6;
  text-align: center;
  writing-mode: vertical-rl;
  letter-spacing: .2em;
  opacity: .8;
  pointer-events: none;
}

/* The functional cloud player sits on the same still moonlit scenery. */
html[data-theme="dark"] .music-card {
  --player-accent: #d7c48b;
  --player-accent-strong: #ead9a9;
  --player-copy: #f1f3ec;
  --player-muted: #c3d0db;
  --player-time: #c4d1dc;
  --player-lyric: #ddcd9f;
  --player-track: rgba(195, 213, 224, .25);
  isolation: isolate;
  min-height: 310px;
  padding: 28px;
  border: 1px solid rgba(180, 204, 220, .38);
  border-radius: 22px;
  background: #0b1c34;
  box-shadow: 0 16px 34px rgba(2, 8, 19, .24), inset 0 1px rgba(230, 239, 240, .05);
}
html[data-theme="dark"] .music-card::before,
html[data-theme="dark"] .music-card.is-playing::before {
  z-index: -1;
  inset: 0;
  width: auto;
  height: auto;
  border-radius: 0;
  background: linear-gradient(135deg, rgba(11, 27, 47, .25), rgba(9, 23, 41, .9));
  filter: none;
}
html[data-theme="dark"] .music-card .music-scene {
  position: absolute;
  z-index: -2;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 67% 45%;
  opacity: .3;
  filter: saturate(.6);
  pointer-events: none;
}
html[data-theme="dark"] .music-card .track-header { gap: 17px; margin: 0 0 22px; }
html[data-theme="dark"] .music-card .album-art {
  flex-basis: 76px;
  width: 76px;
  height: 76px;
  border: 2px solid #b8c5c8;
  background: #243e4a;
  box-shadow: 0 5px 20px rgba(0, 6, 17, .35), 0 0 0 3px rgba(214, 191, 134, .12);
}
html[data-theme="dark"] .music-card .album-art::after {
  width: 16px;
  height: 16px;
  border-color: #becccb;
  background: #d0d9d4;
}
html[data-theme="dark"] .music-card .music-source {
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #d6bf86;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .18em;
  box-shadow: none;
}
html[data-theme="dark"] .music-card .track-copy h2 {
  margin-top: 7px;
  color: #f1f3ec;
  font-family: "Noto Serif SC", "Songti SC", "STSong", serif;
  font-size: 23px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: .04em;
}
html[data-theme="dark"] .music-card #track-artist { margin-top: 3px; color: #c3d0db; font-size: 12px; font-weight: 400; }
html[data-theme="dark"] .music-card .lyrics #lyric-current { color: #ddcd9f; font-size: 12px; font-weight: 400; }
html[data-theme="dark"] .music-card .progress-row { gap: 8px; margin-bottom: 15px; font-size: 10px; font-weight: 400; }
html[data-theme="dark"] .music-card .progress-row span { flex-basis: 32px; min-width: 32px; }
html[data-theme="dark"] .music-card .progress-row input {
  height: 4px;
  background: linear-gradient(to right, #d7c48b var(--player-progress, 0%), var(--player-track) var(--player-progress, 0%));
}
html[data-theme="dark"] .music-card .progress-row input::-webkit-slider-runnable-track { height: 4px; }
html[data-theme="dark"] .music-card .progress-row input::-webkit-slider-thumb { width: 10px; height: 10px; margin-top: -3px; background: #e1d0a2; }
html[data-theme="dark"] .music-card .progress-row input::-moz-range-track { height: 4px; }
html[data-theme="dark"] .music-card .progress-row input::-moz-range-thumb { width: 10px; height: 10px; background: #e1d0a2; }
html[data-theme="dark"] .music-card .player-controls { gap: 18px; }
html[data-theme="dark"] .music-card .transport { color: #c2d2dc; }
html[data-theme="dark"] .music-card .transport:enabled:hover { color: #f2dfaf; }
html[data-theme="dark"] .music-card .play-button {
  border: 1px solid rgba(221, 212, 176, .85);
  background: linear-gradient(145deg, #536d6d, #273f4d);
  color: #f6efd7;
  box-shadow: inset 0 1px 4px rgba(232, 239, 224, .17), 0 4px 14px rgba(0, 7, 20, .34);
}
html[data-theme="dark"] .music-card .play-button:enabled:hover { background: linear-gradient(145deg, #647f7b, #324e5a); transform: scale(1.06); }

html[data-theme="dark"] .signal-quote {
  border-color: rgba(184, 204, 218, .3);
  border-radius: 22px;
  background: linear-gradient(110deg, rgba(13, 31, 47, .89), rgba(20, 36, 54, .77));
  color: #e9dfbc;
  box-shadow: inset 0 1px rgba(227, 237, 230, .07), 0 8px 28px rgba(2, 9, 21, .2);
}
html[data-theme="dark"] .signal-quote .lyric-line { color: #e9dfbc; font-family: "Noto Serif SC", "Songti SC", serif; font-size: 17px; font-weight: 500; text-shadow: 0 0 16px rgba(216, 197, 143, .2); }
html[data-theme="dark"] .lyric-wave i { background: #c3bd91; }
html[data-theme="dark"] .lyric-mark { color: #c6bc92; }
html[data-theme="dark"] .photo-preview,
html[data-theme="dark"] .latest-article,
html[data-theme="dark"] .latest-moment,
html[data-theme="dark"] .home-content .card,
html[data-theme="dark"] .secondary-content .card,
html[data-theme="dark"] .content-panel {
  border-color: rgba(177, 200, 217, .3);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(20, 39, 60, .84), rgba(10, 27, 46, .79));
  box-shadow: inset 0 1px rgba(225, 238, 240, .05), 0 10px 30px rgba(2, 9, 20, .16);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
html[data-theme="dark"] .card-heading { border-bottom-color: rgba(177, 200, 217, .19); }
html[data-theme="dark"] .card-heading h2 { color: #e9e9d9; }
html[data-theme="dark"] .empty-state h3 { color: #c8d5df; }
html[data-theme="dark"] .empty-state p { color: #aabed0; }
html[data-theme="dark"] .site-footer,
html[data-theme="dark"][data-wallpaper="true"] .site-footer { border-color: rgba(177, 200, 217, .24); background: rgba(9, 24, 42, .57); color: #b9cbd9; border-radius: 18px 18px 0 0; }

@media (max-width: 767px) {
  html[data-theme="dark"] .main-nav { background-color: rgba(11, 27, 46, .97); }
  html[data-theme="dark"] .profile-card { min-height: 290px; }
  html[data-theme="dark"] .profile-card .profile-body { min-height: 290px; padding: 24px; }
  html[data-theme="dark"] .profile-card .profile-main { gap: 17px; }
  html[data-theme="dark"] .profile-card .avatar { flex-basis: 76px; width: 76px; height: 76px; }
  html[data-theme="dark"] .profile-card .profile-name-group h2 { font-size: 27px; }
  html[data-theme="dark"] .profile-card .profile-name-group p { font-size: 12px; }
  html[data-theme="dark"] .profile-scene { object-position: 87% 40%; opacity: .8; }
  html[data-theme="dark"] .profile-card .profile-stats { width: 240px; padding-top: 32px; }
  html[data-theme="dark"] .profile-card .profile-stats > div { padding-right: 20px; padding-left: 20px; }
  html[data-theme="dark"] .profile-card .profile-stats > div:first-child { padding-left: 0; }
  html[data-theme="dark"] .music-card { min-height: 285px; padding: 24px; }
  html[data-theme="dark"] .music-card .track-header { gap: 17px; margin-bottom: 22px; }
  html[data-theme="dark"] .music-card .album-art { flex-basis: 70px; width: 70px; height: 70px; }
  html[data-theme="dark"] .music-card .track-copy h2 { font-size: 23px; line-height: 1.4; }
  html[data-theme="dark"] .music-card #track-artist { font-size: 12px; line-height: 20px; }
  html[data-theme="dark"] .signal-quote .lyric-line { font-size: 14px; letter-spacing: .04em; }
}
@media (max-width: 420px) {
  .header-inner { padding-inline: 12px; gap: 8px; }
  .header-actions { gap: 4px; }
  .brand { font-size: 18px; }
  .wallpaper-only-toggle { padding-right: 2px; padding-left: 2px; font-size: 11px; }
  html[data-theme="dark"] .profile-card .profile-body { padding: 22px; }
  html[data-theme="dark"] .profile-card .avatar { flex-basis: 64px; width: 64px; height: 64px; }
  html[data-theme="dark"] .profile-card .profile-main { gap: 14px; }
  html[data-theme="dark"] .profile-card .profile-name-group h2 { font-size: 24px; }
  html[data-theme="dark"] .profile-card .profile-eyebrow { font-size: 9px; letter-spacing: .1em; }
  html[data-theme="dark"] .profile-card .profile-stats { width: 228px; }
  html[data-theme="dark"] .profile-card .profile-seal { display: none; }
  html[data-theme="dark"] .music-card { padding: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .wallpaper-only-toggle { transition: none; }
  html[data-theme="dark"] .music-card .play-button { transition: none; }
  html[data-theme="dark"] .music-card .play-button:enabled:hover { transform: none; }
}
