.background-theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
  padding: 2px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.08);
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.12);
}

.background-theme-switch button {
  min-width: 46px !important;
  padding-inline: 9px !important;
  border-radius: 999px !important;
  white-space: nowrap;
}

.background-theme-switch button.is-selected,
.background-theme-switch button[aria-pressed="true"] {
  color: #111 !important;
  background: rgba(255, 255, 255, 0.90) !important;
  text-shadow: none !important;
  box-shadow:
    0 3px 10px rgba(0, 0, 0, 0.14),
    inset 1px 1px 0 rgba(255, 255, 255, 0.72) !important;
}

.memory-snow-valley-video {
  position: fixed;
  inset: 0;
  z-index: -2;
  display: block;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  object-position: center center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  background: #d7e1e7;
  transform: translateZ(0);
  transition: opacity 360ms ease, visibility 360ms ease;
}

body.theme-snow {
  --mp-ink: #f8fbff;
  --mp-soft: rgba(248, 251, 255, 0.84);
  --mp-faint: rgba(243, 248, 252, 0.68);
  color-scheme: dark;
  color: #fff !important;
  background-color: #d7e1e7 !important;
  background-image: none !important;
}

body.theme-snow .memory-snow-valley-video.is-active {
  opacity: 1;
  visibility: visible;
}

body:not(.theme-snow) .memory-snow-valley-video {
  opacity: 0;
  visibility: hidden;
}

body.theme-snow::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(7, 18, 28, 0.22), rgba(9, 21, 31, 0.05) 48%, rgba(4, 12, 20, 0.16)),
    linear-gradient(180deg, rgba(255,255,255,0.02), rgba(2, 10, 17, 0.18)) !important;
}

body.theme-snow .memory-art-scene {
  opacity: 0 !important;
  visibility: hidden !important;
}

body.theme-snow .memory-brand,
body.theme-snow .memory-brand__text strong {
  color: #fff !important;
  text-shadow: 0 1px 5px rgba(0,0,0,0.62) !important;
}

body.theme-snow .memory-brand__text span {
  color: rgba(248, 252, 255, 0.72) !important;
  text-shadow: 0 1px 4px rgba(0,0,0,0.54) !important;
}

body.theme-snow .memory-brand__mark {
  color: #fff !important;
  border-color: rgba(255,255,255,0.44) !important;
  background: rgba(8, 20, 29, 0.18) !important;
  box-shadow:
    0 14px 34px rgba(0,0,0,0.28),
    inset 1px 1px 0 rgba(255,255,255,0.36) !important;
}

body.theme-snow .view-controls {
  color: #fff !important;
  border-color: rgba(255,255,255,0.30) !important;
  background: rgba(7, 18, 27, 0.25) !important;
  backdrop-filter: blur(13px) saturate(118%) !important;
  -webkit-backdrop-filter: blur(13px) saturate(118%) !important;
  box-shadow:
    0 18px 42px rgba(0,0,0,0.30),
    inset 1px 1px 0 rgba(255,255,255,0.18) !important;
}

body.theme-snow .view-controls button,
body.theme-snow .view-controls .group-label,
body.theme-snow .viewport-zoom-button,
body.theme-snow .viewport-zoom-readout {
  color: rgba(250, 253, 255, 0.96) !important;
  text-shadow: 0 1px 5px rgba(0,0,0,0.58) !important;
}

body.theme-snow .view-controls .sort-switch,
body.theme-snow .viewport-zoom-group,
body.theme-snow .background-theme-switch {
  background: rgba(255,255,255,0.075) !important;
  box-shadow: inset 0 1px 4px rgba(0,0,0,0.20) !important;
}

body.theme-snow .view-controls button.is-selected,
body.theme-snow .background-theme-switch button[aria-pressed="true"] {
  color: #13212b !important;
  background: rgba(255,255,255,0.92) !important;
  text-shadow: none !important;
}

body.theme-snow .cell,
body.theme-snow .focus-cells .cell {
  color: #fff !important;
  background: transparent !important;
  border-color: transparent !important;
  box-shadow:
    0 16px 34px rgba(0,0,0,0.18),
    0 2px 8px rgba(0,0,0,0.10) !important;
}

body.theme-snow .cell .en,
body.theme-snow .cell .zh,
body.theme-snow .cell .num,
body.theme-snow .cell .obj {
  color: #fff !important;
  text-shadow:
    0 1px 3px rgba(0,0,0,0.90),
    0 2px 8px rgba(0,0,0,0.48) !important;
}

body.theme-snow .cell .zh,
body.theme-snow .cell .num {
  color: rgba(250,253,255,0.88) !important;
}

body.theme-snow .cell .obj,
body.theme-snow .cell:hover .obj,
body.theme-snow .cell.is-active .obj {
  background: rgba(5, 16, 24, 0.18) !important;
  box-shadow: 0 3px 10px rgba(0,0,0,0.12) !important;
}

body.theme-snow .glass-panel {
  color: #fff !important;
  border-color: rgba(255,255,255,0.30) !important;
  background: rgba(7, 18, 27, 0.34) !important;
  backdrop-filter: blur(16px) saturate(116%) !important;
  -webkit-backdrop-filter: blur(16px) saturate(116%) !important;
  box-shadow:
    0 24px 58px rgba(0,0,0,0.36),
    inset 1px 1px 0 rgba(255,255,255,0.18) !important;
}

body.theme-snow .glass-panel .gp-num,
body.theme-snow .glass-panel .gp-en,
body.theme-snow .glass-panel .gp-zh,
body.theme-snow .glass-panel .gp-obj,
body.theme-snow .glass-panel .gp-pos,
body.theme-snow .glass-panel .gp-audio-status,
body.theme-snow .glass-panel .gp-audio,
body.theme-snow .glass-panel .gp-close {
  color: #fff !important;
}

body.theme-snow .glass-panel .gp-pos,
body.theme-snow .glass-panel .gp-audio,
body.theme-snow .glass-panel .gp-close {
  background: rgba(255,255,255,0.08) !important;
  border-color: rgba(255,255,255,0.18) !important;
}

body.theme-snow .glass-panel .gp-note {
  color: #fff !important;
  background: rgba(4, 14, 22, 0.24) !important;
  border-color: rgba(255,255,255,0.16) !important;
}

body.theme-snow .glass-panel .gp-note::placeholder {
  color: rgba(244,250,255,0.58) !important;
}

@media (max-width: 768px) {
  .background-theme-switch {
    order: 3 !important;
  }

  .background-theme-switch button {
    min-width: 42px !important;
    padding-inline: 7px !important;
  }

  .memory-snow-valley-video {
    object-position: center center;
  }
}

@media (max-height: 500px) and (max-width: 900px) and (orientation: landscape) {
  .memory-snow-valley-video {
    object-position: center 48%;
  }
}