*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #08090f;
  --glass-bg: rgba(255,255,255,0.055);
  --glass-border: rgba(255,255,255,0.10);
  --text-dim: rgba(255,255,255,0.35);
  --text-mid: rgba(255,255,255,0.65);
  --text-bright: rgba(255,255,255,0.90);
  --live-bg: rgba(255,75,75,0.18);
  --live-border: rgba(255,90,90,0.35);
  --live-text: #ffb0b0;
  --video-bg: rgba(60,150,255,0.18);
  --video-border: rgba(70,160,255,0.35);
  --video-text: #a0d0ff;
  --both-text: #d0b0ff;
  --both-border: rgba(180,130,255,0.35);

  /* Theme variables (default = huasheng) */
  --theme-primary: #f5c842;
  --theme-secondary: #8a64ff;
  --theme-gradient-1: rgba(90,60,200,0.50);
  --theme-gradient-2: rgba(40,70,200,0.28);
  --theme-gradient-3: rgba(110,35,190,0.22);
  --theme-particle: #c8a0ff;
  --theme-accent-bg: rgba(130,100,255,0.22);
  --theme-accent-border: rgba(130,100,255,0.45);
  --theme-accent-text: #c8b0ff;
  --theme-glow: rgba(130,100,255,0.12);
  --mx: 0px;
  --my: 0px;
  --rx: 0deg;
  --ry: 0deg;
  --calendar-rx: 0deg;
  --calendar-ry: 0deg;
  --calendar-light-x: 50%;
  --calendar-light-y: 50%;
  --calendar-shadow-x: 0px;
  --ui-follow-x: 0px;
  --ui-follow-y: 0px;
  --ui-follow-rx: 0deg;
  --ui-follow-ry: 0deg;
  --cursor-x: 50%;
  --cursor-y: 50%;
  --cursor-glow-opacity: 0.14;
  --motion-fast: 180ms;
  --motion-mid: 420ms;
  --motion-slow: 720ms;
  --motion-ease-out: cubic-bezier(.16,1,.3,1);
}

/* Per-streamer theme overrides */
body[data-streamer="langzhong"] {
  --theme-primary: #2d7a3a;
  --theme-secondary: #1a4d24;
  --theme-gradient-1: rgba(30,90,40,0.45);
  --theme-gradient-2: rgba(20,60,30,0.28);
  --theme-gradient-3: rgba(45,122,58,0.20);
  --theme-particle: #4daa5e;
  --theme-accent-bg: rgba(45,138,62,0.22);
  --theme-accent-border: rgba(45,138,62,0.45);
  --theme-accent-text: #8ade9e;
  --theme-glow: rgba(45,138,62,0.12);
}

body[data-streamer="xiaohan"] {
  --theme-primary: #3a9fbf;
  --theme-secondary: #1a6b8a;
  --theme-gradient-1: rgba(40,120,180,0.45);
  --theme-gradient-2: rgba(20,80,140,0.28);
  --theme-gradient-3: rgba(60,160,200,0.20);
  --theme-particle: #6ac8e8;
  --theme-accent-bg: rgba(58,159,191,0.22);
  --theme-accent-border: rgba(58,159,191,0.45);
  --theme-accent-text: #8ad0e8;
  --theme-glow: rgba(58,159,191,0.12);
}

body[data-streamer="yushan"] {
  --theme-primary: #e88a30;
  --theme-secondary: #c06020;
  --theme-gradient-1: rgba(200,120,30,0.45);
  --theme-gradient-2: rgba(180,90,20,0.28);
  --theme-gradient-3: rgba(220,140,50,0.20);
  --theme-particle: #f0b060;
  --theme-accent-bg: rgba(232,138,48,0.22);
  --theme-accent-border: rgba(232,138,48,0.45);
  --theme-accent-text: #f0c080;
  --theme-glow: rgba(232,138,48,0.12);
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text-bright);
  font-family: -apple-system, 'PingFang SC', 'Helvetica Neue', sans-serif;
  overflow: hidden;
  transition: background-color 0.5s ease;
}

.bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 80% 55% at 50% 10%, var(--theme-gradient-1) 0%, transparent 100%),
    radial-gradient(ellipse 55% 45% at 15% 85%, var(--theme-gradient-2) 0%, transparent 100%),
    radial-gradient(ellipse 45% 40% at 88% 75%, var(--theme-gradient-3) 0%, transparent 100%);
  transition: background 0.6s ease;
}

.immersive-bg {
  inset: -2vh -2vw;
  transform:
    perspective(1000px)
    rotateX(calc(var(--rx) * -0.32))
    rotateY(calc(var(--ry) * 0.32))
    translate3d(calc(var(--mx) * -0.008), calc(var(--my) * -0.006), 0);
  transform-origin: 50% 50%;
  transform-style: preserve-3d;
  will-change: transform;
  transition: background 0.6s ease, transform 0.18s ease-out;
}

.immersive-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.045;
  background-image:
    linear-gradient(rgba(255,255,255,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: radial-gradient(circle at 50% 42%, black, transparent 72%);
}

.cursor-glow,
.cursor-dot {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 50;
  pointer-events: none;
  border-radius: 999px;
  transform: translate3d(-50%, -50%, 0);
}

.cursor-glow {
  width: 104px;
  height: 104px;
  opacity: var(--cursor-glow-opacity);
  background: radial-gradient(circle, rgba(245,200,66,0.55), rgba(138,100,255,0.22) 42%, transparent 72%);
  filter: blur(1px);
  mix-blend-mode: screen;
}

.cursor-dot {
  width: 4px;
  height: 4px;
  opacity: 0.72;
  background: rgba(255,245,190,0.82);
  box-shadow: 0 0 7px rgba(245,200,66,0.42);
}

.opening-reveal {
  position: fixed;
  inset: 0;
  z-index: 100;
  overflow: hidden;
  isolation: isolate;
  pointer-events: auto;
  background: transparent;
  perspective: 1200px;
}

.opening-reveal.is-finishing {
  opacity: 0;
  transition: opacity 0.16s ease;
}

.opening-white-half {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 2;
  width: 50%;
  background: #fff;
  transform: scaleX(1);
  will-change: transform;
  animation: opening-half-retreat 1.3s cubic-bezier(.65,0,.2,1) 3.5s forwards;
  animation-play-state: paused;
}

.opening-white-left {
  left: 0;
  transform-origin: left center;
}

.opening-white-right {
  right: 0;
  transform-origin: right center;
}

.opening-goo-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  background: #fff;
  filter: contrast(25);
  animation: opening-goo-layer-clear 0.1s linear 3.4s forwards;
  animation-play-state: paused;
}

.opening-svg-letters {
  font-family: Impact, Haettenschweiler, 'Arial Black', sans-serif;
  font-size: 220px;
  font-weight: 950;
  letter-spacing: -10px;
  text-anchor: middle;
  dominant-baseline: central;
  text-transform: uppercase;
}

.opening-goo-svg,
.opening-blend-svg {
  width: min(82vw, 1100px);
  height: auto;
  display: block;
  overflow: visible;
}

.opening-goo-svg .opening-svg-letters { fill: #000; }
.opening-blend-svg .opening-svg-letters { fill: #fff; }

.opening-goo-svg {
  filter: blur(80px);
  transform: scale(0.96);
  animation: opening-goo-focus 2.6s cubic-bezier(.65,0,.2,1) 0.4s forwards;
  animation-play-state: paused;
}

.opening-blend-layer {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  animation: opening-blend-in 0.1s linear 3.4s forwards;
  animation-play-state: paused;
}

.opening-blend-svg {
  mix-blend-mode: difference;
}

.opening-blend-svg-left,
.opening-blend-svg-right {
  grid-column: 1;
  grid-row: 1;
  will-change: transform;
}

.opening-blend-svg-left {
  clip-path: inset(0 50% 0 0);
  transform: translateX(0);
  animation: opening-blend-half-left 1.3s cubic-bezier(.65,0,.2,1) 3.5s forwards;
  animation-play-state: paused;
}

.opening-blend-svg-right {
  clip-path: inset(0 0 0 50%);
  transform: translateX(0);
  animation: opening-blend-half-right 1.3s cubic-bezier(.65,0,.2,1) 3.5s forwards;
  animation-play-state: paused;
}

.opening-slit-glow {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  z-index: 7;
  width: 3px;
  opacity: 1;
  background: linear-gradient(180deg, transparent 0%, color-mix(in srgb, var(--theme-primary) 70%, transparent) 25%, #fff 50%, color-mix(in srgb, var(--theme-primary) 70%, transparent) 75%, transparent 100%);
  box-shadow: 0 0 30px color-mix(in srgb, var(--theme-primary) 80%, transparent), 0 0 60px color-mix(in srgb, var(--theme-secondary) 55%, transparent);
  transform: translateX(-50%) scaleY(0);
  transform-origin: center;
  animation:
    opening-slit-rise 0.4s cubic-bezier(.16,1,.3,1) 3.0s forwards,
    opening-slit-fade 0.2s ease 3.4s forwards;
  animation-play-state: paused;
}

.opening-loading {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 14px;
  z-index: 8;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #111;
  font: 700 11px/1 'JetBrains Mono', Consolas, monospace;
  letter-spacing: 0.15em;
  mix-blend-mode: difference;
  animation: opening-loading-out 0.4s ease 4.0s forwards;
  animation-play-state: paused;
}

.opening-loading-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.opening-progress {
  width: 100%;
  height: 1px;
  background: rgba(0,0,0,0.18);
  overflow: hidden;
}

.opening-progress-fill {
  width: 100%;
  height: 100%;
  background: #000;
  transform-origin: left center;
  transform: scaleX(0);
  animation: opening-progress-fill 2.6s cubic-bezier(.65,0,.2,1) 0.4s forwards;
  animation-play-state: paused;
}

.opening-progress-text {
  display: inline-block;
  min-width: 3ch;
  font-variant-numeric: tabular-nums;
}

.skip-opening {
  position: absolute;
  right: clamp(14px, 2.4vw, 28px);
  top: clamp(14px, 2.4vw, 26px);
  z-index: 9;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.16);
  background: rgba(255,255,255,0.72);
  color: rgba(0,0,0,0.7);
  font: 700 11px/1 'JetBrains Mono', Consolas, monospace;
  letter-spacing: 0.12em;
  cursor: pointer;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.skip-opening:hover {
  background: rgba(255,255,255,0.9);
  border-color: rgba(0,0,0,0.28);
}

.skip-opening:focus-visible {
  outline: 2px solid var(--theme-primary);
  outline-offset: 3px;
}

.opening-reveal.is-ready .opening-white-half,
.opening-reveal.is-ready .opening-goo-layer,
.opening-reveal.is-ready .opening-goo-svg,
.opening-reveal.is-ready .opening-blend-layer,
.opening-reveal.is-ready .opening-blend-svg-left,
.opening-reveal.is-ready .opening-blend-svg-right,
.opening-reveal.is-ready .opening-slit-glow,
.opening-reveal.is-ready .opening-loading,
.opening-reveal.is-ready .opening-progress-fill {
  animation-play-state: running;
}

.site-header {
  position: fixed; top: 0; right: 0;
  padding: 16px 20px; z-index: 10;
  display: flex; align-items: center; gap: 8px;
}

.social-icons { display: flex; gap: 8px; }

.social-icon {
  width: 30px; height: 30px; border-radius: 999px;
  background: rgba(8,14,22,0.44);
  border: 1px solid rgba(255,255,255,0.10);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.70);
  text-decoration: none;
  box-shadow: 0 12px 26px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.08);
  backdrop-filter: blur(16px) saturate(1.12);
  -webkit-backdrop-filter: blur(16px) saturate(1.12);
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, color 0.15s;
}
.social-icon:hover {
  background: rgba(16,28,40,0.56);
  border-color: rgba(255,255,255,0.16);
  color: rgba(255,255,255,0.88);
  box-shadow: 0 14px 30px rgba(0,0,0,0.20), 0 0 18px color-mix(in srgb, var(--theme-primary) 16%, transparent), inset 0 1px 0 rgba(255,255,255,0.10);
}
.social-icon svg { width: 14px; height: 14px; }

.visual-mode-switcher {
  --visual-mode-indicator-x: 5px;
  --visual-mode-indicator-width: 42px;
  --visual-mode-indicator-color: var(--theme-primary);
  position: fixed;
  left: 16px;
  top: 16px;
  z-index: 24;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  min-width: 98px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(8,14,22,0.48);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 18px 40px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.09);
  backdrop-filter: blur(17px) saturate(1.18);
  -webkit-backdrop-filter: blur(17px) saturate(1.18);
  transform-style: preserve-3d;
  transform-origin: center center;
  will-change: transform;
  transition: transform 0.18s ease-out, background 0.2s ease, border-color 0.2s ease, gap 0.22s ease;
}
.visual-mode-indicator {
  position: absolute;
  left: 0;
  top: 5px;
  bottom: 5px;
  z-index: 0;
  width: var(--visual-mode-indicator-width);
  border-radius: 999px;
  pointer-events: none;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--visual-mode-indicator-color) 34%, rgba(255,255,255,0.12)), color-mix(in srgb, var(--visual-mode-indicator-color) 18%, transparent)),
    rgba(255,255,255,0.06);
  box-shadow:
    0 0 16px color-mix(in srgb, var(--visual-mode-indicator-color) 24%, transparent),
    inset 0 1px 0 rgba(255,255,255,0.16);
  transform: translate3d(var(--visual-mode-indicator-x), 0, 0);
  transition:
    transform 240ms var(--motion-ease-out),
    width 240ms var(--motion-ease-out),
    background-color 180ms ease,
    box-shadow 220ms ease;
  will-change: transform, width;
}
.visual-mode-btn {
  --visual-mode-color: var(--theme-primary);
  flex: 0 0 auto;
  min-width: 42px;
  width: 42px;
  height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255,255,255,0.72);
  font: 800 12px/1 'JetBrains Mono', Consolas, monospace;
  letter-spacing: 0;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  position: relative;
  z-index: 1;
  transition: background 0.2s ease, color 0.2s ease, opacity 0.2s ease, transform 0.2s ease, width 0.22s ease, min-width 0.22s ease, padding 0.22s ease;
}
.visual-mode-btn[data-visual-mode="3d"] { --visual-mode-color: var(--theme-primary); }
.visual-mode-btn[data-visual-mode="2d"] { --visual-mode-color: #3a9fbf; }
.visual-mode-btn.active {
  background: transparent;
  color: #f7fbff;
  text-shadow: 0 1px 8px rgba(0,0,0,0.30);
  box-shadow: none;
}
.visual-mode-btn:not(.active):not(:disabled):hover {
  background: rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.92);
}
.visual-mode-btn:disabled {
  opacity: 0.38;
  cursor: default;
}
.visual-mode-btn:focus-visible {
  outline: 2px solid var(--theme-primary);
  outline-offset: 2px;
}

main {
  position: relative; z-index: 1;
  height: 100vh;
  display: flex; flex-direction: column; align-items: center;
  padding: 212px 20px 24px; gap: 16px;
}

.logo-container {
  position: fixed; inset: 0; z-index: 1;
  width: auto; height: auto; flex-shrink: 0;
  cursor: grab;
  touch-action: none;
}
.logo-container:active { cursor: grabbing; }
#three-canvas {
  position: relative;
  z-index: 1;
  width: 100%; height: 100%; display: block;
  background: transparent;
  filter: drop-shadow(0 0 18px var(--theme-glow));
  opacity: 1;
  transition: opacity 0.34s ease, visibility 0.34s ease;
}

.video-stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.42s ease, visibility 0.42s ease;
  background: #05060a;
}
.video-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(10,12,18,0.12), transparent 20%, transparent 58%, rgba(10,12,18,0.36)),
    linear-gradient(90deg, rgba(10,12,18,0.24), transparent 18%, transparent 82%, rgba(10,12,18,0.24));
}
.character-video {
  position: absolute;
  z-index: 1;
  display: block;
  border: 0;
  pointer-events: none;
  user-select: none;
}
.character-video-bg {
  inset: -2vh -2vw;
  width: 104vw;
  height: 104vh;
  object-fit: cover;
  opacity: 0.68;
  filter: blur(2px) saturate(1.06) brightness(0.78);
  transform: scale(1.018);
}
.character-video-main {
  left: 50%;
  top: clamp(92px, 13vh, 108px);
  width: clamp(320px, 25vw, 370px);
  max-width: 82vw;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  opacity: 0.88;
  transform: translate(-50%, -50%);
  filter: contrast(1.04) saturate(1.02) drop-shadow(0 8px 18px rgba(0,0,0,0.18));
  -webkit-mask-image:
    linear-gradient(90deg, transparent 0, rgba(0,0,0,0.08) 12%, #000 34%, #000 66%, rgba(0,0,0,0.08) 88%, transparent 100%),
    linear-gradient(180deg, transparent 0, rgba(0,0,0,0.08) 14%, #000 32%, #000 68%, rgba(0,0,0,0.08) 86%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(90deg, transparent 0, rgba(0,0,0,0.08) 12%, #000 34%, #000 66%, rgba(0,0,0,0.08) 88%, transparent 100%),
    linear-gradient(180deg, transparent 0, rgba(0,0,0,0.08) 14%, #000 32%, #000 68%, rgba(0,0,0,0.08) 86%, transparent 100%);
  mask-composite: intersect;
}
.video-glass-edge {
  position: absolute;
  inset: 0;
  z-index: 3;
  opacity: 0.82;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.11), transparent 18%, transparent 76%, rgba(255,255,255,0.06)),
    linear-gradient(90deg, rgba(255,255,255,0.055), transparent 16%, transparent 84%, rgba(255,255,255,0.055));
  box-shadow:
    inset 0 120px 150px rgba(10,12,18,0.22),
    inset 0 -160px 190px rgba(10,12,18,0.38),
    inset 120px 0 160px rgba(10,12,18,0.22),
    inset -120px 0 160px rgba(10,12,18,0.22);
}

body[data-visual-mode="2d"] .video-stage {
  opacity: 1;
  visibility: visible;
}
body[data-visual-mode="2d"] #three-canvas {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
body[data-visual-mode="2d"] .logo-container {
  cursor: default;
  touch-action: auto;
}
body[data-visual-mode="2d"] .logo-container:active {
  cursor: default;
}
body[data-visual-mode="2d"] .model-reset-btn,
body[data-visual-mode="2d"] .model-drop-btn,
body[data-visual-mode="2d"] .model-switch-btn {
  display: none;
}

.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border); border-radius: 14px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.08);
}

.streamer-switcher,
.calendar-shell,
.calendar-card {
  position: relative;
  z-index: 2;
}

/* Streamer switcher with sliding highlight */
.streamer-switcher {
  --switcher-indicator-x: 7px;
  --switcher-indicator-width: 43px;
  --switcher-indicator-color: #e88a30;
  display: flex; gap: 7px; padding: 6px 7px;
  border-radius: 999px; width: auto; max-width: 220px; min-width: 190px;
  background: rgba(8,14,22,0.38);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 18px 42px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.08);
  backdrop-filter: blur(17px) saturate(1.16);
  -webkit-backdrop-filter: blur(17px) saturate(1.16);
  flex-shrink: 0;
  position: relative;
  justify-content: center;
  transform-style: preserve-3d;
  transform-origin: center center;
  will-change: transform;
  transition: transform 0.18s ease-out;
}
.switcher-indicator {
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  z-index: 0;
  width: var(--switcher-indicator-width);
  border-radius: 999px;
  pointer-events: none;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--switcher-indicator-color) 36%, rgba(255,255,255,0.12)), color-mix(in srgb, var(--switcher-indicator-color) 18%, transparent)),
    rgba(255,255,255,0.05);
  box-shadow:
    0 0 18px color-mix(in srgb, var(--switcher-indicator-color) 24%, transparent),
    inset 0 1px 0 rgba(255,255,255,0.16);
  transform: translate3d(var(--switcher-indicator-x), 0, 0);
  transition:
    transform 240ms var(--motion-ease-out),
    width 240ms var(--motion-ease-out),
    background-color 180ms ease,
    box-shadow 220ms ease;
  will-change: transform, width;
}
.switcher-pill {
  --switcher-color: var(--theme-primary);
  flex: 1; height: 30px; min-width: 36px; padding: 0;
  border: 0; border-radius: 999px;
  background: transparent; color: var(--text-dim);
  font-family: inherit; cursor: pointer;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, transform 0.25s ease;
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center;
}
.switcher-pill[data-streamer="huasheng"] { --switcher-color: #f5c842; }
.switcher-pill[data-streamer="langzhong"] { --switcher-color: #2d7a3a; }
.switcher-pill[data-streamer="xiaohan"] { --switcher-color: #3a9fbf; }
.switcher-pill[data-streamer="yushan"] { --switcher-color: #e88a30; }
.switcher-dot {
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--switcher-color);
  opacity: 0.62;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.20), 0 0 10px color-mix(in srgb, var(--switcher-color) 45%, transparent);
  transition: opacity 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.switcher-pill.active {
  background: transparent;
  box-shadow: none;
}
.switcher-pill.active .switcher-dot {
  opacity: 1;
  transform: scale(1.12);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.28), 0 0 14px color-mix(in srgb, var(--switcher-color) 72%, transparent);
}
.switcher-pill.is-live .switcher-dot {
  opacity: 1;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.30),
    0 0 0 5px color-mix(in srgb, var(--switcher-color) 20%, transparent),
    0 0 16px color-mix(in srgb, var(--switcher-color) 78%, transparent);
}
.switcher-pill:not(.active):hover { background: rgba(255,255,255,0.055); }
.switcher-pill:not(.active):hover .switcher-dot { opacity: 0.9; transform: scale(1.05); }
.switcher-pill:focus-visible {
  outline: 2px solid var(--switcher-color);
  outline-offset: 2px;
}

.calendar-shell {
  width: 100%; max-width: 560px;
  flex: 1; min-height: 0;
  perspective: 900px;
  perspective-origin: center center;
  transition: flex-basis 0.28s ease, min-height 0.28s ease, max-width 0.28s ease;
}
.calendar-toggle-btn {
  --calendar-dot-size: 7px;
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 5;
  width: 26px;
  height: 26px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(8,14,22,0.42);
  backdrop-filter: blur(17px) saturate(1.14);
  -webkit-backdrop-filter: blur(17px) saturate(1.14);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 16px 36px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.08);
  color: var(--theme-primary);
  cursor: pointer;
  opacity: 0.72;
  transform-origin: center center;
  transition: opacity 0.22s ease, width 0.24s ease, height 0.24s ease, left 0.24s ease, top 0.24s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.calendar-toggle-btn:hover {
  opacity: 1;
  background: rgba(16,28,40,0.58);
  border-color: color-mix(in srgb, var(--theme-primary) 34%, rgba(255,255,255,0.12));
  box-shadow: 0 18px 40px rgba(0,0,0,0.20), 0 0 18px color-mix(in srgb, var(--theme-primary) 20%, transparent), inset 0 1px 0 rgba(255,255,255,0.10);
}
.calendar-toggle-btn:focus-visible {
  outline: 2px solid var(--theme-primary);
  outline-offset: 3px;
}
.calendar-toggle-dot {
  width: var(--calendar-dot-size);
  height: var(--calendar-dot-size);
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 10px color-mix(in srgb, var(--theme-primary) 58%, transparent);
  transition: width 0.24s ease, height 0.24s ease, box-shadow 0.24s ease;
}
.model-reset-btn {
  --control-lift: 0px;
  --control-scale: 1;
  position: absolute; right: 0; top: -42px;
  width: 34px; height: 34px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 999px;
  background: rgba(8,14,22,0.42);
  backdrop-filter: blur(17px) saturate(1.14); -webkit-backdrop-filter: blur(17px) saturate(1.14);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 16px 36px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.08);
  color: var(--theme-primary);
  cursor: pointer;
  z-index: 3;
  transform: translateY(var(--control-lift)) scale(var(--control-scale));
  transform-origin: center center;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.model-reset-btn:hover {
  background: rgba(16,28,40,0.56);
  border-color: color-mix(in srgb, var(--theme-primary) 34%, rgba(255,255,255,0.12));
  box-shadow: 0 18px 40px rgba(0,0,0,0.20), 0 0 18px color-mix(in srgb, var(--theme-primary) 18%, transparent), inset 0 1px 0 rgba(255,255,255,0.10);
  --control-lift: -1px;
}
.model-reset-btn:active { --control-lift: 0px; --control-scale: 0.96; }
.model-reset-btn:focus-visible {
  outline: 2px solid var(--theme-primary);
  outline-offset: 2px;
}
.model-reset-btn svg {
  width: 16px; height: 16px;
  fill: currentColor;
}
.model-action-btn {
  --control-lift: 0px;
  --control-scale: 1;
  width: 34px; height: 34px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 999px;
  background: rgba(8,14,22,0.42);
  backdrop-filter: blur(17px) saturate(1.14); -webkit-backdrop-filter: blur(17px) saturate(1.14);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 16px 36px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.08);
  color: var(--theme-primary);
  cursor: pointer;
  transform: translateY(var(--control-lift)) scale(var(--control-scale));
  transform-origin: center center;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.model-action-btn[hidden] { display: none; }
.model-drop-btn {
  position: absolute; right: 42px; top: -42px;
}
.model-switch-btn {
  position: absolute; right: 84px; top: -42px;
}
.model-drop-btn:hover,
.model-switch-btn:hover {
  background: rgba(16,28,40,0.56);
  border-color: color-mix(in srgb, var(--theme-primary) 34%, rgba(255,255,255,0.12));
  box-shadow: 0 18px 40px rgba(0,0,0,0.20), 0 0 18px color-mix(in srgb, var(--theme-primary) 18%, transparent), inset 0 1px 0 rgba(255,255,255,0.10);
  --control-lift: -1px;
}
.model-drop-btn:active,
.model-switch-btn:active { --control-lift: 0px; --control-scale: 0.96; }
.model-drop-btn:focus-visible,
.model-switch-btn:focus-visible {
  outline: 2px solid var(--theme-primary);
  outline-offset: 2px;
}
.model-drop-btn svg,
.model-switch-btn svg {
  width: 16px; height: 16px;
  fill: currentColor;
}

body:not(.motion-reduced) .visual-mode-switcher,
body:not(.motion-reduced) .streamer-switcher,
body:not(.motion-reduced) .model-reset-btn,
body:not(.motion-reduced) .model-action-btn {
  transform:
    perspective(900px)
    translate3d(var(--ui-follow-x), var(--ui-follow-y), 0)
    rotateX(calc(var(--ui-follow-rx) * -1))
    rotateY(var(--ui-follow-ry));
}

body:not(.motion-reduced) .model-reset-btn,
body:not(.motion-reduced) .model-action-btn {
  transform:
    perspective(900px)
    translate3d(var(--ui-follow-x), calc(var(--ui-follow-y) + var(--control-lift)), 0)
    rotateX(calc(var(--ui-follow-rx) * -1))
    rotateY(var(--ui-follow-ry))
    scale(var(--control-scale));
}

.calendar-card {
  width: 100%; height: 100%;
  padding: 18px 20px;
  display: flex; flex-direction: column; gap: 12px;
  flex: 1; min-height: 0;
  overflow: hidden;
  border-radius: 28px;
  background: rgba(10,18,27,0.48);
  border: 1px solid rgba(255,255,255,0.09);
  transform-style: preserve-3d;
  transform-origin: center center;
  will-change: transform;
  transition: transform 0.18s ease-out, opacity 0.24s ease, width 0.26s ease, height 0.26s ease, padding 0.26s ease, border-color 0.24s ease, background 0.24s ease, box-shadow 0.24s ease;
}

.calendar-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: 0;
  pointer-events: none;
  opacity: 0.58;
  background: radial-gradient(circle at var(--cursor-x) var(--cursor-y), color-mix(in srgb, var(--theme-primary) 16%, transparent), transparent 32%);
}

.calendar-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.42;
  background:
    radial-gradient(circle at var(--calendar-light-x) var(--calendar-light-y), rgba(255,255,255,0.15), transparent 28%),
    linear-gradient(115deg, rgba(255,255,255,0.10), transparent 34%, rgba(0,0,0,0.16) 100%);
  mix-blend-mode: screen;
}

.calendar-card > *:not(.calendar-toggle-btn) {
  position: relative;
  z-index: 1;
}
.calendar-content {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  transition: opacity var(--motion-fast) var(--motion-ease-out), transform var(--motion-fast) var(--motion-ease-out), filter var(--motion-fast) var(--motion-ease-out);
}

.calendar-shell.is-calendar-transitioning .calendar-content {
  opacity: 0;
  pointer-events: none;
  filter: blur(1.5px);
}

.calendar-shell.is-calendar-transitioning.is-calendar-moving-next .calendar-content {
  transform: translateX(-18px);
}

.calendar-shell.is-calendar-transitioning.is-calendar-moving-prev .calendar-content {
  transform: translateX(18px);
}

.calendar-shell.is-calendar-transitioning.is-calendar-replacing .calendar-content {
  opacity: 0.58;
  transform: scale(0.992);
  filter: blur(2px);
}

.calendar-shell.is-calendar-entering.is-calendar-moving-next .calendar-content {
  animation: calendar-content-enter-next var(--motion-mid) var(--motion-ease-out) both;
}

.calendar-shell.is-calendar-entering.is-calendar-moving-prev .calendar-content {
  animation: calendar-content-enter-prev var(--motion-mid) var(--motion-ease-out) both;
}

.calendar-shell.is-calendar-entering.is-calendar-replacing .calendar-content {
  animation: calendar-content-enter-replace var(--motion-mid) var(--motion-ease-out) both;
}

.calendar-shell.is-calendar-entering .cal-month-label,
.calendar-shell.is-calendar-entering .cal-controls {
  animation: calendar-header-enter var(--motion-mid) var(--motion-ease-out) both;
}

.calendar-shell.is-calendar-entering .cal-controls {
  animation-delay: 45ms;
}

body:not(.motion-reduced) .calendar-card {
  transform:
    translate3d(calc(var(--mx) * -0.003), calc(var(--my) * -0.002), 0)
    rotateX(calc(var(--calendar-rx) * -1))
    rotateY(var(--calendar-ry));
  box-shadow:
    var(--calendar-shadow-x) 24px 58px rgba(0,0,0,0.24),
    0 10px 34px rgba(0,0,0,0.18),
    inset 0 1px 0 rgba(255,255,255,0.09);
}

body[data-visual-mode="2d"] .calendar-card {
  background: rgba(10,18,27,0.52);
  border-color: rgba(255,255,255,0.11);
  box-shadow:
    var(--calendar-shadow-x) 26px 60px rgba(0,0,0,0.28),
    0 12px 36px rgba(0,0,0,0.20),
    inset 0 1px 0 rgba(255,255,255,0.10);
}

.calendar-shell.is-calendar-collapsed {
  flex: 0 0 34px;
  min-height: 34px;
  max-width: 560px;
}
.calendar-shell.is-calendar-collapsed .calendar-card {
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  overflow: visible;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  transform: none;
}
.calendar-shell.is-calendar-collapsed .calendar-card::before,
.calendar-shell.is-calendar-collapsed .calendar-card::after {
  opacity: 0;
}
.calendar-shell.is-calendar-collapsed .calendar-content {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.96);
}
.calendar-shell.is-calendar-collapsed .calendar-toggle-btn {
  --calendar-dot-size: 6px;
  left: 7px;
  top: 7px;
  width: 20px;
  height: 20px;
  opacity: 0.42;
  background: rgba(8,14,22,0.24);
  border-color: rgba(255,255,255,0.07);
  box-shadow: 0 8px 22px rgba(0,0,0,0.12), 0 0 12px color-mix(in srgb, var(--theme-primary) 14%, transparent);
}
.calendar-shell.is-calendar-collapsed .calendar-toggle-btn:hover,
.calendar-shell.is-calendar-collapsed .calendar-toggle-btn:focus-visible {
  opacity: 0.66;
}
.calendar-shell.is-calendar-collapsed .model-reset-btn,
.calendar-shell.is-calendar-collapsed .model-action-btn {
  opacity: 0;
  pointer-events: none;
}

.cal-header {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 8px;
  padding-left: 34px;
}
.cal-month-label { font-size: 14px; font-weight: 500; color: var(--text-mid); letter-spacing: 0.04em; }
.cal-controls { display: flex; align-items: center; gap: 14px; }
.cal-legend { display: flex; gap: 12px; align-items: center; }
.legend-item { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--text-dim); }
.dot { width: 8px; height: 8px; border-radius: 999px; }
.dot-live { background: rgba(255,75,75,0.75); }
.dot-video { background: rgba(60,150,255,0.75); }
.dot-both { background: linear-gradient(135deg, rgba(255,75,75,0.75), rgba(60,150,255,0.75)); }

.cal-nav { display: flex; gap: 4px; }
.nav-btn {
  width: 24px; height: 24px; border-radius: 999px;
  background: rgba(255,255,255,0.055); border: 1px solid rgba(255,255,255,0.10);
  color: var(--text-dim); font-size: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.nav-btn:hover {
  background: rgba(255,255,255,0.11);
  border-color: rgba(255,255,255,0.16);
  color: var(--text-mid);
  box-shadow: 0 6px 16px rgba(0,0,0,0.12), inset 0 1px 0 rgba(255,255,255,0.08);
}
.nav-btn:disabled { opacity: 0.3; cursor: default; }

.weekdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.weekdays span { text-align: center; font-size: 10px; color: var(--text-dim); font-weight: 500; }

.days-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; flex: 1; }

.day {
  aspect-ratio: 1; border-radius: 12px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  background: rgba(255,255,255,0.024); border: 1px solid rgba(255,255,255,0.045);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.035);
  transition: background 0.12s, border-color 0.12s, box-shadow 0.12s; overflow: hidden;
}

.calendar-shell.is-calendar-entering .day {
  animation: calendar-day-enter 260ms var(--motion-ease-out) both;
  animation-delay: calc(var(--day-index, 0) * 4ms);
}

@keyframes calendar-content-enter-next {
  from {
    opacity: 0;
    transform: translateX(22px);
    filter: blur(2px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
    filter: blur(0);
  }
}

@keyframes calendar-content-enter-prev {
  from {
    opacity: 0;
    transform: translateX(-22px);
    filter: blur(2px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
    filter: blur(0);
  }
}

@keyframes calendar-content-enter-replace {
  from {
    opacity: 0.64;
    transform: scale(0.992);
    filter: blur(2px);
  }
  to {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
  }
}

@keyframes calendar-header-enter {
  from {
    opacity: 0;
    translate: 0 7px;
    filter: blur(4px);
  }
  to {
    opacity: 1;
    translate: 0 0;
    filter: blur(0);
  }
}

@keyframes calendar-day-enter {
  from {
    opacity: 0.72;
    translate: 0 3px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}
.day.empty { background: transparent; border-color: transparent; }
.day-num { font-size: 11px; line-height: 1; color: var(--text-dim); }
.day-time { font-size: 7.5px; line-height: 1; color: inherit; opacity: 0.8; }

.day.today { border-color: rgba(255,255,255,0.25); }
.day.today .day-num { color: var(--text-bright); font-weight: 600; }

.day.live { background: var(--live-bg); border-color: var(--live-border); box-shadow: 0 0 12px rgba(255,70,70,0.10), inset 0 1px 0 rgba(255,255,255,0.04); }
.day.live .day-num, .day.live .day-time { color: var(--live-text); }

.day.video { background: var(--video-bg); border-color: var(--video-border); box-shadow: 0 0 12px rgba(60,150,255,0.10), inset 0 1px 0 rgba(255,255,255,0.04); }
.day.video .day-num, .day.video .day-time { color: var(--video-text); }

.day.both {
  background: linear-gradient(135deg, var(--live-bg), var(--video-bg));
  border-color: var(--both-border); box-shadow: 0 0 12px rgba(150,100,255,0.12), inset 0 1px 0 rgba(255,255,255,0.04);
}
.day.both .day-num, .day.both .day-time { color: var(--both-text); }

/* Live status panel (left) with glass background */
.live-status-panel {
  position: fixed; left: 16px; top: 50%;
  transform: translateY(-50%); z-index: 15;
  display: flex; flex-direction: column; gap: 8px;
  padding: 10px 8px;
  width: 126px;
  overflow: hidden;
  background: rgba(8,14,22,0.38);
  backdrop-filter: blur(17px) saturate(1.12); -webkit-backdrop-filter: blur(17px) saturate(1.12);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  box-shadow: 0 18px 42px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.07);
  transition: width 0.24s ease, padding 0.24s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.live-status-panel:not(:hover):not(:focus-within) {
  width: 42px;
  padding-left: 7px;
  padding-right: 7px;
}
.live-status-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; color: var(--text-dim);
  cursor: default; padding: 5px 8px; border-radius: 999px;
  transition: background 0.15s, gap 0.2s ease, padding 0.2s ease, min-width 0.2s ease;
  min-width: 108px;
  width: 100%;
  border: 0;
  background: transparent;
  font-family: inherit;
  text-align: left;
  justify-content: flex-start;
}
.live-status-panel:not(:hover):not(:focus-within) .live-status-item {
  min-width: 26px;
  width: 26px;
  justify-content: center;
  gap: 0;
  padding-left: 0;
  padding-right: 0;
}
.live-status-item:hover { background: rgba(255,255,255,0.055); }
.live-status-item:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--theme-primary) 78%, white);
  outline-offset: 2px;
}
.live-status-item.online {
  background: rgba(255,75,75,0.10);
  border-radius: 999px;
  cursor: pointer;
}
.live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,0.2); flex-shrink: 0;
}
.live-dot.online {
  animation: pulse 2s ease infinite;
}
.live-dot.online[data-color="huasheng"] { background: #f5c842; box-shadow: 0 0 6px #f5c842; }
.live-dot.online[data-color="langzhong"] { background: #2d7a3a; box-shadow: 0 0 6px #2d7a3a; }
.live-dot.online[data-color="xiaohan"] { background: #3a9fbf; box-shadow: 0 0 6px #3a9fbf; }
.live-dot.online[data-color="yushan"] { background: #e88a30; box-shadow: 0 0 6px #e88a30; }
.live-status-item.online { color: var(--text-bright); }
.live-status-copy {
  min-width: 0;
  display: flex; flex-direction: column; gap: 1px;
  max-width: 92px;
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.2s ease, max-width 0.24s ease, transform 0.2s ease;
}
.live-status-panel:not(:hover):not(:focus-within) .live-status-copy {
  max-width: 0;
  opacity: 0;
  transform: translateX(-6px);
  pointer-events: none;
}
.live-status-panel:hover .live-status-copy,
.live-status-panel:focus-within .live-status-copy {
  max-width: 92px;
  opacity: 1;
  transform: translateX(0);
}
.live-status-name {
  color: var(--text-mid);
  white-space: nowrap;
}
.live-status-label {
  color: var(--text-dim);
  font-size: 9px;
  line-height: 1.1;
  white-space: nowrap;
}
.live-status-item.online .live-status-name,
.live-status-item.online .live-status-label {
  color: var(--text-bright);
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Notification bubbles (right) with polished shadow */
.notification-bubbles {
  position: fixed; right: 16px; top: 50%;
  transform: translateY(-50%); z-index: 15;
  display: flex; flex-direction: column; gap: 8px;
  max-width: 200px;
}
.notif-bubble {
  padding: 10px 14px; border-radius: 18px;
  background: rgba(8,14,22,0.42); backdrop-filter: blur(17px) saturate(1.12);
  border: 1px solid rgba(255,255,255,0.09);
  font-size: 11px; color: var(--text-mid);
  animation: slideInRight 0.3s ease;
  cursor: pointer;
  box-shadow: 0 18px 42px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.07);
}
.notif-bubble:hover { background: rgba(16,28,40,0.54); }
.notif-bubble .notif-streamer {
  display: flex; align-items: center; gap: 4px;
  margin-bottom: 4px; font-size: 10px;
}
.notif-dot {
  width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0;
}
.notif-dot[data-color="huasheng"] { background: #f5c842; }
.notif-dot[data-color="langzhong"] { background: #2d7a3a; }
.notif-dot[data-color="xiaohan"] { background: #3a9fbf; }
.notif-dot[data-color="yushan"] { background: #e88a30; }
.notif-bubble .notif-title {
  color: var(--text-bright); font-size: 11px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.mobile-live-status {
  display: none;
}

.mobile-live-trigger,
.mobile-live-row {
  font-family: inherit;
}

.mobile-live-trigger {
  min-height: 36px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 999px;
  background: rgba(8,14,22,0.68);
  color: rgba(255,255,255,0.88);
  box-shadow: 0 16px 38px rgba(0,0,0,0.24), inset 0 1px 0 rgba(255,255,255,0.10);
  backdrop-filter: blur(17px) saturate(1.16);
  -webkit-backdrop-filter: blur(17px) saturate(1.16);
}

.mobile-live-trigger-dot,
.mobile-live-dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.24);
}

.mobile-live-trigger-dot.is-live {
  background: var(--theme-primary);
  box-shadow: 0 0 12px color-mix(in srgb, var(--theme-primary) 75%, transparent);
}

.mobile-live-trigger-text {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  white-space: nowrap;
}

.mobile-live-sheet {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 30;
  max-height: min(45vh, 360px);
  padding: 14px;
  border-radius: 22px;
  background: rgba(8,14,22,0.86);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 24px 70px rgba(0,0,0,0.40), inset 0 1px 0 rgba(255,255,255,0.10);
  backdrop-filter: blur(20px) saturate(1.18);
  -webkit-backdrop-filter: blur(20px) saturate(1.18);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.mobile-live-status.is-open .mobile-live-sheet {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.mobile-live-sheet-title {
  padding: 0 2px 10px;
  color: rgba(255,255,255,0.86);
  font-size: 13px;
  font-weight: 700;
}

.mobile-live-list {
  display: grid;
  gap: 8px;
}

.mobile-live-row {
  min-height: 44px;
  width: 100%;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  background: rgba(255,255,255,0.045);
  color: rgba(255,255,255,0.74);
  text-align: left;
}

.mobile-live-row.online {
  background: color-mix(in srgb, var(--theme-primary) 15%, rgba(255,255,255,0.04));
  border-color: color-mix(in srgb, var(--theme-primary) 34%, rgba(255,255,255,0.10));
  color: rgba(255,255,255,0.92);
}

.mobile-live-dot.online {
  background: var(--theme-primary);
  box-shadow: 0 0 12px color-mix(in srgb, var(--theme-primary) 70%, transparent);
}

.mobile-live-dot[data-color="huasheng"] { background: #f5c842; }
.mobile-live-dot[data-color="langzhong"] { background: #2d7a3a; }
.mobile-live-dot[data-color="xiaohan"] { background: #3a9fbf; }
.mobile-live-dot[data-color="yushan"] { background: #e88a30; }

.mobile-live-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mobile-live-name {
  color: rgba(255,255,255,0.90);
  font-size: 13px;
  font-weight: 700;
}

.mobile-live-label {
  max-width: 72vw;
  overflow: hidden;
  color: rgba(255,255,255,0.56);
  font-size: 11px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-visual-mode="2d"] .live-status-panel,
body[data-visual-mode="2d"] .notification-bubbles .notif-bubble {
  background: rgba(10,18,27,0.50);
  border-color: rgba(255,255,255,0.11);
  box-shadow: 0 18px 42px rgba(0,0,0,0.22), inset 0 1px 0 rgba(255,255,255,0.09);
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes mobile-live-dot-pulse {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(255,255,255,0.30),
      0 0 0 4px color-mix(in srgb, var(--switcher-color) 14%, transparent),
      0 0 14px color-mix(in srgb, var(--switcher-color) 68%, transparent);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(255,255,255,0.34),
      0 0 0 7px color-mix(in srgb, var(--switcher-color) 24%, transparent),
      0 0 18px color-mix(in srgb, var(--switcher-color) 82%, transparent);
  }
}

@keyframes opening-goo-focus {
  0% {
    filter: blur(80px);
    transform: scale(0.96);
  }
  100% {
    filter: blur(0);
    transform: scale(1);
  }
}

@keyframes opening-goo-layer-clear {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

@keyframes opening-blend-in {
  to { opacity: 1; }
}

@keyframes opening-slit-rise {
  0% {
    transform: translateX(-50%) scaleY(0);
  }
  100% {
    transform: translateX(-50%) scaleY(1);
  }
}

@keyframes opening-slit-fade {
  to { opacity: 0; }
}

@keyframes opening-half-retreat {
  to { transform: scaleX(0); }
}

@keyframes opening-loading-out {
  to { opacity: 0; }
}

@keyframes opening-progress-fill {
  to { transform: scaleX(1); }
}

@keyframes opening-blend-half-left {
  to { transform: translateX(-50vw); }
}

@keyframes opening-blend-half-right {
  to { transform: translateX(50vw); }
}

body[data-device="mobile"] main {
  padding: 150px 12px 16px;
  gap: 10px;
}

body[data-device="mobile"] .site-header {
  padding: 12px;
}

body[data-device="mobile"] .mobile-live-status {
  position: fixed;
  right: 12px;
  top: 56px;
  z-index: 25;
  display: block;
}

body[data-device="mobile"] .visual-mode-switcher {
  --visual-mode-indicator-x: 4px;
  --visual-mode-indicator-width: 40px;
  left: 12px;
  top: 12px;
  padding: 4px;
  background: rgba(8,14,22,0.66);
  border-color: rgba(255,255,255,0.14);
}

body[data-device="mobile"] .visual-mode-indicator {
  top: 4px;
  bottom: 4px;
}

body[data-device="mobile"] .visual-mode-btn,
body[data-device="mobile"] .switcher-pill,
body[data-device="mobile"] .calendar-toggle-btn,
body[data-device="mobile"] .model-reset-btn,
body[data-device="mobile"] .model-action-btn {
  min-width: 40px;
  width: 40px;
  height: 40px;
}

body[data-device="mobile"] .visual-mode-btn {
  font-size: 12px;
  padding: 0 10px;
}

body[data-device="mobile"] .streamer-switcher {
  --switcher-indicator-x: 5px;
  --switcher-indicator-width: 44px;
  min-width: 204px;
  padding: 5px;
  gap: 5px;
  background: rgba(8,14,22,0.62);
  border-color: rgba(255,255,255,0.14);
}

body[data-device="mobile"] .switcher-indicator {
  top: 5px;
  bottom: 5px;
}

body[data-device="mobile"] .switcher-dot {
  width: 14px;
  height: 14px;
}

body[data-device="mobile"] .switcher-pill.is-live .switcher-dot {
  animation: mobile-live-dot-pulse 1.8s ease-in-out infinite;
}

body[data-device="mobile"] .calendar-shell {
  max-width: min(100%, 430px);
}

body[data-device="mobile"] .calendar-card {
  padding: 14px 12px;
  background: rgba(8,14,22,0.66);
  border-color: rgba(255,255,255,0.14);
  box-shadow: 0 20px 48px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.10);
}

body[data-device="mobile"] .calendar-card::before {
  opacity: 0.34;
}

body[data-device="mobile"] .calendar-card::after {
  opacity: 0.28;
}

body[data-device="mobile"] .cal-header {
  gap: 6px;
  padding-left: 56px;
}

body[data-device="mobile"] .calendar-shell.is-calendar-collapsed {
  flex: 0 0 40px;
  min-height: 40px;
}

body[data-device="mobile"] .calendar-shell.is-calendar-collapsed .calendar-card {
  width: 40px;
  height: 40px;
  min-height: 40px;
}

body[data-device="mobile"] .calendar-shell.is-calendar-collapsed .calendar-toggle-btn {
  left: 0;
  top: 0;
  width: 40px;
  height: 40px;
}

body[data-device="mobile"] .cal-controls {
  width: 100%;
  justify-content: space-between;
  gap: 8px;
}

body[data-device="mobile"] .cal-legend {
  gap: 7px;
}

body[data-device="mobile"] .legend-item,
body[data-device="mobile"] .weekdays span,
body[data-device="mobile"] .day-num {
  color: rgba(255,255,255,0.76);
}

body[data-device="mobile"] .days-grid {
  gap: 3px;
}

body[data-device="mobile"] .day {
  border-radius: 10px;
  background: rgba(255,255,255,0.045);
  border-color: rgba(255,255,255,0.08);
}

body[data-device="mobile"] .day-time {
  font-size: 7px;
  opacity: 0.92;
}

body[data-device="mobile"] .model-reset-btn {
  top: -48px;
}

body[data-device="mobile"] .model-drop-btn {
  top: -48px;
  right: 48px;
}

body[data-device="mobile"] .model-switch-btn {
  top: -48px;
  right: 96px;
}

body[data-device="mobile"] .live-status-panel,
body[data-device="mobile"] .notification-bubbles {
  display: none;
}

body[data-device="mobile"][data-visual-mode="2d"] .calendar-card {
  background: rgba(8,14,22,0.72);
  border-color: rgba(255,255,255,0.16);
}
































@media (hover: none), (pointer: coarse) {
  .live-status-panel:not(:hover):not(:focus-within) {
    width: 126px;
    padding-left: 8px;
    padding-right: 8px;
  }

  .live-status-panel:not(:hover):not(:focus-within) .live-status-item {
    min-width: 108px;
    width: 100%;
    justify-content: flex-start;
    gap: 8px;
    padding-left: 8px;
    padding-right: 8px;
  }

  .live-status-panel:not(:hover):not(:focus-within) .live-status-copy {
    max-width: 92px;
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
}

@media (max-width: 768px) {
  .live-status-panel, .notification-bubbles { display: none; }
}

@media (max-width: 480px) {
  main { padding: 166px 12px 16px; gap: 12px; }
  .visual-mode-switcher { left: 12px; top: 12px; }
  .visual-mode-btn { min-width: 38px; width: 38px; height: 28px; padding: 0 8px; font-size: 11px; }
  .character-video-main { top: 84px; width: min(70vw, 300px); max-width: none; }
  .character-video-bg { filter: blur(2px) saturate(1.05) brightness(0.78); }
  .calendar-card { padding: 14px 12px; }
  .days-grid { gap: 3px; }
  .day { border-radius: 10px; }
  .day-num { font-size: 9px; }
  .day-time { font-size: 6.5px; }
  .switcher-pill { height: 26px; min-width: 32px; }
  .switcher-dot { width: 12px; height: 12px; }
  .streamer-switcher { gap: 5px; padding: 4px; min-width: 170px; }
  .model-reset-btn { top: -36px; width: 30px; height: 30px; }
  .model-drop-btn { top: -36px; right: 38px; width: 30px; height: 30px; }
  .model-switch-btn { top: -36px; right: 76px; width: 30px; height: 30px; }
}

@media (max-width: 860px), (hover: none), (pointer: coarse) {
  .cursor-glow,
  .cursor-dot {
    display: none;
  }

  .immersive-bg,
  body:not(.motion-reduced) .visual-mode-switcher,
  body:not(.motion-reduced) .streamer-switcher,
  body:not(.motion-reduced) .calendar-card {
    transform: none;
  }

  body:not(.motion-reduced) .model-reset-btn,
  body:not(.motion-reduced) .model-action-btn {
    transform: translateY(var(--control-lift)) scale(var(--control-scale));
  }
}

body.motion-coarse-pointer .cursor-glow,
body.motion-coarse-pointer .cursor-dot,
body.motion-reduced .cursor-glow,
body.motion-reduced .cursor-dot {
  display: none;
}

body.motion-coarse-pointer .immersive-bg,
body.motion-coarse-pointer .visual-mode-switcher,
body.motion-coarse-pointer .streamer-switcher,
body.motion-coarse-pointer .calendar-card,
body.motion-reduced .immersive-bg,
body.motion-reduced .visual-mode-switcher,
body.motion-reduced .streamer-switcher,
body.motion-reduced .calendar-card {
  transform: none;
}

body.motion-coarse-pointer .model-reset-btn,
body.motion-coarse-pointer .model-action-btn {
  transform: translateY(var(--control-lift)) scale(var(--control-scale));
}

body.motion-reduced .model-reset-btn,
body.motion-reduced .model-action-btn {
  transform: none;
}

body.motion-reduced .calendar-shell.is-calendar-entering .calendar-content,
body.motion-reduced .calendar-shell.is-calendar-entering .day,
body.motion-reduced .calendar-shell.is-calendar-entering .cal-month-label,
body.motion-reduced .calendar-shell.is-calendar-entering .cal-controls {
  animation: none;
  opacity: 1;
  translate: 0 0;
  filter: none;
}

@media (prefers-reduced-motion: reduce) {

  .cursor-glow,
  .cursor-dot {
    display: none;
  }

  .immersive-bg,
  body:not(.motion-reduced) .visual-mode-switcher,
  body:not(.motion-reduced) .streamer-switcher,
  body:not(.motion-reduced) .model-reset-btn,
  body:not(.motion-reduced) .model-action-btn,
  body:not(.motion-reduced) .calendar-card {
    animation: none !important;
    transform: none !important;
    transition: none !important;
  }

  .calendar-shell.is-calendar-entering .calendar-content,
  .calendar-shell.is-calendar-entering .day,
  .calendar-shell.is-calendar-entering .cal-month-label,
  .calendar-shell.is-calendar-entering .cal-controls {
    animation: none !important;
    opacity: 1 !important;
    translate: 0 0 !important;
    filter: none !important;
  }
}
