/* ============================================================
   「沉浸视界」个人网站 —— 星空玻璃拟态主题样式
   ============================================================ */

:root {
  --bg: #0c0818;
  --txt: #f8eef5;
  --txt-dim: rgba(248, 238, 245, 0.62);
  --glass: rgba(44, 32, 60, 0.52);
  --glass-strong: rgba(30, 22, 47, 0.85);
  --stroke: rgba(255, 222, 196, 0.18);
  --accent: #ffd28a;
  --accent-2: #ff9ec4;

  /* 各区域主题色 */
  --c-hall: #ffd28a;
  --c-about: #ff9e7d;
  --c-works: #8fe3c9;
  --c-skills: #c9a6ff;
  --c-contact: #ff9ec4;

  --font: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans CJK SC",
          -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html, body { height: 100%; overflow: hidden; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--txt);
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

button {
  font-family: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

#app { position: fixed; inset: 0; }

/* ---------- 3D 画布 ---------- */
#scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* ---------- VR 镜片氛围层 ---------- */
#lens {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  background:
    radial-gradient(ellipse 118% 108% at 50% 50%,
      transparent 58%,
      rgba(0, 0, 5, 0.42) 82%,
      rgba(0, 0, 4, 0.9) 100%);
  mix-blend-mode: normal;
}
#lens::after { /* 极淡扫描线，模拟镜片眩光 */
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg, transparent 0 3px, rgba(180, 200, 255, 0.014) 3px 4px);
}

/* ---------- 顶栏导航 ---------- */
#navbar {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 9px 14px 9px 20px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--stroke);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  box-shadow: 0 8px 40px rgba(0, 0, 10, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease), top 0.4s var(--ease);
}
#navbar.hidden { opacity: 0; transform: translateX(-50%) translateY(-18px); pointer-events: none; }
#navbar.docked { top: 12px; }

.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; letter-spacing: 1px; font-size: 15px; color: #fff; white-space: nowrap; }
.brand-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff3e0, var(--accent) 60%, #8a5a28);
  box-shadow: 0 0 12px var(--accent), 0 0 26px rgba(255, 190, 120, 0.45);
  animation: breathe 3.2s ease-in-out infinite;
}
@keyframes breathe { 50% { transform: scale(0.82); box-shadow: 0 0 18px var(--accent); } }

#nav-links { display: flex; gap: 2px; }
.nav-btn {
  position: relative;
  padding: 7px 15px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--txt-dim);
  transition: color 0.25s, background 0.25s, box-shadow 0.25s;
  letter-spacing: 2px;
}
.nav-btn:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.nav-btn.active { color: #fff; background: rgba(255, 210, 138, 0.16); box-shadow: 0 0 14px rgba(255, 190, 120, 0.35); }

.tools { display: flex; gap: 6px; }
.tool-btn {
  width: 34px; height: 34px; border-radius: 50%;
  font-size: 15px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--stroke);
  display: grid; place-items: center;
  transition: background 0.25s, transform 0.2s;
}
.tool-btn:hover { background: rgba(255, 255, 255, 0.14); transform: translateY(-1px); }
.tool-btn.off { opacity: 0.55; filter: grayscale(0.9); }

/* ---------- 大厅主视觉 ---------- */
#hero {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  text-align: center;
  pointer-events: none;
  transition: opacity 0.8s var(--ease), transform 0.9s var(--ease);
}
#hero.folded { opacity: 0; transform: scale(0.94) translateY(8px); pointer-events: none; }
.hero-inner { max-width: 760px; padding: 0 22px; }
.hero-kicker {
  font-size: 12px; letter-spacing: 5px;
  color: var(--accent-2);
  text-shadow: 0 0 18px rgba(255, 158, 196, 0.55);
  margin-bottom: 22px;
  animation: float-in 1.4s var(--ease) both;
}
.hero-name {
  font-size: clamp(34px, 6vw, 64px);
  font-weight: 800;
  letter-spacing: 2px;
  background: linear-gradient(120deg, #fff 10%, #ffe9d2 45%, var(--accent) 80%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 6px 30px rgba(255, 185, 115, 0.35));
  animation: float-in 1.4s var(--ease) 0.12s both;
}
.hero-title {
  margin-top: 14px;
  font-size: clamp(15px, 2.2vw, 20px);
  color: var(--txt-dim);
  letter-spacing: 3px;
  animation: float-in 1.4s var(--ease) 0.24s both;
}
.hero-motto {
  margin-top: 18px;
  font-size: clamp(13px, 1.9vw, 16px);
  color: rgba(210, 225, 255, 0.8);
  animation: float-in 1.4s var(--ease) 0.34s both;
}
@keyframes float-in { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }

#hero-cta { pointer-events: auto; margin-top: 34px; animation: float-in 1.4s var(--ease) 0.46s both; }

.cta-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 30px;
  border-radius: 999px;
  font-size: 15px; font-weight: 600; letter-spacing: 1px;
  color: #fff;
  background: linear-gradient(120deg, rgba(255, 190, 120, 0.9), rgba(255, 140, 175, 0.78));
  border: 1px solid rgba(255, 236, 215, 0.45);
  box-shadow: 0 0 24px rgba(255, 175, 110, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.25s var(--ease), box-shadow 0.3s;
}
.cta-btn:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 8px 34px rgba(255, 175, 110, 0.6); }
.cta-btn:active { transform: scale(0.98); }
.cta-btn.small { padding: 9px 20px; font-size: 13px; }
.cta-btn.big { padding: 15px 38px; font-size: 16px; }
.cta-arrow { transition: transform 0.25s; }
.cta-btn:hover .cta-arrow { transform: translateX(6px); }

.hero-hint {
  position: absolute;
  bottom: 46px; left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  color: var(--txt-dim);
  letter-spacing: 1px;
  background: rgba(14, 9, 26, 0.5);
  border: 1px solid rgba(255, 222, 196, 0.14);
  padding: 8px 18px;
  border-radius: 999px;
  white-space: nowrap;
  animation: hint-fade 1.6s ease 1.6s both;
}
@keyframes hint-fade { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------- 全息内容窗口 ---------- */
#holo {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 84px 18px 40px;
  pointer-events: none; /* 容器不拦截事件，保证顶部导航在窗口打开时仍可点击 */
}
#holo.hidden { display: none; }
#holo > * { pointer-events: auto; }

.holo-head {
  width: min(860px, 94vw);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  border-radius: 18px 18px 0 0;
  background: var(--glass-strong);
  border: 1px solid var(--stroke);
  border-bottom: none;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transform: translateY(10px);
  animation: rise 0.5s var(--ease) forwards;
}
.holo-tag {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 10px;
  font-size: 17px;
  background: rgba(255, 210, 138, 0.14);
  border: 1px solid rgba(255, 210, 138, 0.38);
  box-shadow: 0 0 14px rgba(255, 210, 138, 0.35);
}
#holo-title { font-size: 20px; letter-spacing: 3px; flex: 1; text-align: left; }
.holo-actions { display: flex; gap: 8px; }
.mini-btn {
  padding: 7px 14px;
  font-size: 13px;
  border-radius: 999px;
  color: var(--txt-dim);
  border: 1px solid var(--stroke);
  transition: all 0.25s;
}
.mini-btn:hover { color: #fff; background: rgba(255, 255, 255, 0.1); }
.mini-btn.close:hover { background: rgba(255, 110, 110, 0.25); border-color: rgba(255, 120, 120, 0.5); }

.holo-body {
  width: min(860px, 94vw);
  max-height: min(64vh, 640px);
  overflow-y: auto;
  padding: 26px 28px;
  border-radius: 0 0 18px 18px;
  background: var(--glass-strong);
  border: 1px solid var(--stroke);
  border-top: none;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 24px 80px rgba(0, 0, 8, 0.6), 0 0 60px -30px var(--window-glow, var(--accent));
  transform: translateY(-10px);
  animation: rise 0.5s var(--ease) 0.06s forwards;
  user-select: text;
}
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
.holo-body::-webkit-scrollbar { width: 6px; }
.holo-body::-webkit-scrollbar-thumb { background: rgba(255, 214, 190, 0.3); border-radius: 3px; }

/* --- 关于我 --- */
.bio p { line-height: 1.9; color: rgba(225, 235, 255, 0.92); font-size: 15px; white-space: pre-line; }
.timeline { margin-top: 26px; position: relative; padding-left: 24px; }
.timeline::before {
  content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 1px;
  background: linear-gradient(180deg, var(--tl-c, var(--c-about)), transparent);
}
.tl-item { position: relative; margin-bottom: 22px; }
.tl-item::before {
  content: ""; position: absolute; left: -23px; top: 6px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--tl-c, var(--c-about));
  box-shadow: 0 0 10px var(--tl-c, var(--c-about));
}
.tl-year { font-size: 13px; color: var(--tl-c, var(--c-about)); letter-spacing: 2px; font-weight: 700; }
.tl-title { font-size: 16px; font-weight: 600; margin: 4px 0; }
.tl-desc { font-size: 14px; color: var(--txt-dim); line-height: 1.7; }

/* --- 作品集 --- */
.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}
.work-card {
  text-align: left;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 222, 196, 0.18);
  transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
}
.work-card:hover { transform: translateY(-5px); border-color: var(--wc, var(--accent)); box-shadow: 0 12px 34px rgba(0, 0, 10, 0.5), 0 0 24px -6px var(--wc, var(--accent)); }
.work-cover {
  position: relative;
  overflow: hidden;
  height: 150px;
  display: grid; place-items: center;
  background:
    radial-gradient(120% 150% at 20% 0%, rgba(255, 255, 255, 0.3), transparent 55%),
    linear-gradient(140deg, var(--wc, #ffd28a), #2a1d40);
  filter: saturate(0.9);
}
.work-emoji { font-size: 52px; filter: drop-shadow(0 2px 10px rgba(0, 0, 10, 0.45)); }
.work-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.work-card:hover .work-img { transform: scale(1.07); }
.work-meta { padding: 14px 16px 16px; }
.work-title { font-size: 15px; font-weight: 700; }
.work-summary {
  margin-top: 7px; font-size: 13px; line-height: 1.6;
  color: var(--txt-dim);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.work-tags { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: 11px; padding: 3px 9px; border-radius: 999px;
  color: rgba(255, 238, 225, 0.88);
  background: rgba(255, 214, 190, 0.1);
  border: 1px solid rgba(255, 214, 190, 0.22);
  letter-spacing: 0.5px;
}

/* --- 技能 --- */
.skills { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px 26px; }
.skill-row { }
.skill-top { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 7px; }
.skill-name { color: rgba(230, 240, 255, 0.95); }
.skill-pct { color: var(--sc, var(--c-skills)); font-weight: 700; }
.skill-bar { height: 7px; border-radius: 99px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.skill-fill {
  height: 100%; width: 0;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--sc, #c9a6ff), rgba(255, 255, 255, 0.28));
  box-shadow: 0 0 12px var(--sc, #c9a6ff);
  transition: width 1.2s var(--ease) 0.15s;
}
.skills-note { margin-top: 20px; font-size: 13px; color: var(--txt-dim); }

/* --- 联系 --- */
.contact-wrap { display: grid; gap: 24px; }
.social-row { display: flex; flex-wrap: wrap; gap: 12px; }
.social-link {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: 999px;
  font-size: 14px; color: #e6efff;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 222, 196, 0.22);
  text-decoration: none;
  transition: all 0.25s;
}
.social-link:hover { border-color: var(--c-contact); box-shadow: 0 0 18px -2px var(--c-contact); transform: translateY(-2px); }
.contact-form { display: grid; gap: 12px; }
.cf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .cf-row { grid-template-columns: 1fr; } }
.field label { display: block; font-size: 12px; color: var(--txt-dim); margin-bottom: 5px; letter-spacing: 1px; }
.field input, .field textarea {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  color: #eef3ff;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 214, 190, 0.25);
  outline: none;
  font-family: inherit; font-size: 14px;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.field input:focus, .field textarea:focus {
  border-color: var(--c-contact);
  box-shadow: 0 0 14px -2px var(--c-contact);
}
.field textarea { resize: vertical; min-height: 110px; }
.form-actions { display: flex; align-items: center; gap: 14px; margin-top: 4px; }
.form-status { font-size: 13px; color: var(--txt-dim); }

/* ---------- 作品详情浮层 ---------- */
#detail {
  position: absolute; inset: 0; z-index: 40;
  display: grid; place-items: center;
  background: rgba(3, 5, 14, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fade-in 0.3s ease;
}
#detail.hidden { display: none; }
@keyframes fade-in { from { opacity: 0; } }
.detail-card {
  position: relative;
  width: min(560px, 92vw);
  border-radius: 18px;
  overflow: hidden;
  background: var(--glass-strong);
  border: 1px solid var(--stroke);
  box-shadow: 0 30px 90px rgba(0, 0, 8, 0.7);
  animation: pop 0.35s var(--ease);
}
@keyframes pop { from { opacity: 0; transform: scale(0.9) translateY(16px); } }
.detail-card > .mini-btn { position: absolute; top: 12px; right: 12px; z-index: 2; background: rgba(5, 8, 20, 0.55); }
.detail-hero {
  position: relative;
  overflow: hidden;
  height: 200px;
  display: grid; place-items: center;
  background: linear-gradient(140deg, var(--wc, #ffd28a), #2a1d40 80%);
  filter: saturate(0.92);
}
.detail-emoji { font-size: 64px; filter: drop-shadow(0 2px 10px rgba(0, 0, 10, 0.4)); }
.detail-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.detail-main { padding: 22px 26px 26px; user-select: text; }
#detail-title { font-size: 22px; }
.detail-tags { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
#detail-summary { margin-top: 14px; line-height: 1.9; color: rgba(225, 235, 255, 0.9); font-size: 15px; white-space: pre-line; }
#detail-link { margin-top: 18px; }

/* ---------- Toast ---------- */
#toast {
  position: absolute;
  left: 50%; bottom: 60px;
  transform: translateX(-50%);
  z-index: 60;
  padding: 11px 22px;
  border-radius: 999px;
  font-size: 14px;
  background: rgba(28, 20, 40, 0.92);
  border: 1px solid rgba(255, 214, 190, 0.3);
  box-shadow: 0 8px 30px rgba(10, 5, 18, 0.5);
  animation: toast-in 0.35s var(--ease);
}
#toast.hidden { display: none; }
#toast.ok { border-color: rgba(125, 255, 176, 0.5); color: #bfffd9; }
#toast.err { border-color: rgba(255, 130, 130, 0.55); color: #ffd2d2; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 14px); } }

/* ---------- 开场「睁眼」仪式 ---------- */
#boot {
  position: absolute; inset: 0; z-index: 100;
  display: grid; place-items: center;
  background: #0a0714;
  transition: opacity 1s ease;
  text-align: center;
}
#boot.done { opacity: 0; pointer-events: none; }
#boot.gone { display: none; }
.boot-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 45% at 50% 42%, rgba(255, 190, 120, 0.14), transparent 70%),
    radial-gradient(40% 30% at 70% 80%, rgba(255, 158, 196, 0.09), transparent 70%),
    radial-gradient(50% 35% at 25% 75%, rgba(150, 212, 255, 0.07), transparent 70%);
  animation: bg-drift 9s ease-in-out infinite alternate;
}
@keyframes bg-drift { from { transform: scale(1); } to { transform: scale(1.15); } }
.boot-card { position: relative; padding: 30px; max-width: 640px; }
.boot-kicker {
  font-size: 12px; letter-spacing: 6px; color: var(--accent-2);
  text-shadow: 0 0 16px rgba(255, 158, 196, 0.55);
  animation: float-in 1.2s var(--ease) both;
}
.boot-title {
  margin-top: 18px;
  font-size: clamp(34px, 7vw, 62px);
  font-weight: 800; line-height: 1.25;
  background: linear-gradient(120deg, #fff, #ffe9d2 55%, var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 8px 40px rgba(255, 185, 115, 0.35));
  animation: float-in 1.2s var(--ease) 0.2s both;
}
.boot-sub { margin: 20px auto 30px; color: var(--txt-dim); line-height: 1.8; font-size: 15px; animation: float-in 1.2s var(--ease) 0.35s both; }
#btn-enter { animation: float-in 1.2s var(--ease) 0.5s both, glow-pulse 2.6s ease 2.2s infinite; }
@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 22px rgba(255, 175, 110, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
  50% { box-shadow: 0 0 44px rgba(255, 175, 110, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
}
.boot-tip { margin-top: 26px; font-size: 13px; color: rgba(200, 215, 250, 0.5); letter-spacing: 1px; animation: float-in 1.2s var(--ease) 0.65s both; }
.boot-loading {
  position: absolute; bottom: 34px; width: 100%;
  font-size: 12px; letter-spacing: 3px; color: rgba(200, 215, 250, 0.4);
}
.boot-loading::after { content: ""; animation: dots 1.4s steps(4) infinite; }
@keyframes dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }

/* ---------- 无 WebGL 降级 ---------- */
#fallback {
  position: absolute; inset: 0; z-index: 90;
  display: grid; place-items: center;
  background: var(--bg);
  padding: 24px;
}
#fallback.hidden { display: none; }
.fb-card { text-align: center; line-height: 2; color: var(--txt-dim); max-width: 520px; }
.fb-card h2 { color: #fff; margin-bottom: 14px; }

/* ---------- 隐藏态工具 ---------- */
.hidden { display: none !important; }

/* ---------- 安静模式（减少动效） ---------- */
body.calm #navbar .brand-dot { animation: none; }
body.calm #hero-cta:hover { transform: none; }
body.calm .cta-btn, body.calm #btn-enter { animation: none !important; }
body.calm #boot .boot-bg { animation: none; }
body.calm .skill-fill { transition: none; }

/* ---------- 小屏适配 ---------- */
@media (max-width: 760px) {
  #navbar { gap: 6px; padding: 7px 8px 7px 12px; }
  .brand { display: none; }
  .nav-btn { padding: 7px 11px; font-size: 13px; }
  .hero-hint { display: none; }
  #hero-cta { margin-top: 26px; }
}

/* ============================================================
   新功能：氛围叠加层 / 粒子画布 / 方向罗盘 / 陀螺仪按钮
   ============================================================ */

/* --- 氛围叠加层（夜色无叠加，黄昏暖橙，晨光清亮） --- */
#atmo {
  position: absolute; inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1s ease;
}
body[data-mood="dusk"] #atmo {
  opacity: 1;
  background:
    radial-gradient(120% 70% at 50% 108%, rgba(255, 120, 55, 0.22), transparent 60%),
    linear-gradient(180deg, transparent 35%, rgba(190, 70, 120, 0.08) 72%, rgba(255, 140, 60, 0.18) 100%);
}
body[data-mood="dawn"] #atmo {
  opacity: 1;
  background:
    linear-gradient(180deg, rgba(150, 205, 255, 0.12) 0%, rgba(170, 215, 255, 0.04) 26%, transparent 45%),
    linear-gradient(180deg, transparent 55%, rgba(255, 205, 150, 0.05) 80%, rgba(255, 170, 120, 0.12) 100%);
}

/* --- 光标星尘画布 --- */
#fx {
  position: absolute; inset: 0;
  z-index: 6;
  pointer-events: none;
}

/* --- 方向罗盘 HUD --- */
#compass {
  position: absolute;
  left: 50%; bottom: 24px;
  transform: translateX(-50%);
  z-index: 14;
  width: min(420px, 92vw);
  height: 40px;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.6s ease, transform 0.6s ease;
}
#compass.off { opacity: 0; pointer-events: none; } /* 隐藏时彻底不拦截任何事件 */
.compass-line {
  position: absolute;
  left: 8%; right: 8%; bottom: 4px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 226, 190, 0.28) 22%, rgba(255, 226, 190, 0.28) 78%, transparent);
}
.compass-notch {
  position: absolute;
  left: 50%; top: 2px;
  width: 0; height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 9px solid rgba(255, 226, 190, 0.85);
  filter: drop-shadow(0 0 6px rgba(255, 190, 120, 0.7));
  transform: translateX(-50%);
}
#compass-items { position: absolute; inset: 0; }
.cp-item {
  position: absolute;
  bottom: 3px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 4px;
  pointer-events: auto;
  cursor: pointer;
  padding: 2px 6px;
  transition: opacity 0.25s ease, left 0.12s linear;
  will-change: left, opacity;
}
.cp-item:hover .cp-label { color: #fff; }
.cp-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--cc, #fff);
  box-shadow: 0 0 10px var(--cc, #fff);
}
.cp-label {
  font-size: 12px;
  letter-spacing: 1px;
  color: rgba(250, 243, 255, 0.92);
  text-shadow: 0 1px 8px #000, 0 0 14px var(--cc, #fff);
  white-space: nowrap;
}

/* --- 陀螺仪按钮：仅在触屏/粗指针设备显示 --- */
@media (hover: hover) and (pointer: fine) {
  #btn-gyro { display: none; }
}
.tool-btn.on { background: rgba(255, 210, 138, 0.22); box-shadow: 0 0 12px rgba(255, 190, 120, 0.5); }

/* 罗盘小屏微调 */
@media (max-width: 520px) {
  #compass { bottom: 16px; }
  .cp-label { font-size: 11px; }
}

/* ============================================================
   新功能：每日一言 / 特别日子彩蛋 / 情绪电台 / 白昼 / 灯箱
   ============================================================ */

/* 白昼氛围叠加（更亮的天空感） */
body[data-mood="day"] #atmo {
  opacity: 1;
  background:
    radial-gradient(130% 90% at 50% -15%, rgba(255, 246, 220, 0.16), transparent 62%),
    linear-gradient(180deg, rgba(150, 205, 255, 0.12) 0%, transparent 45%);
}

/* 每日一言 */
.hero-quote {
  margin-top: 16px;
  min-height: 1.3em;
  font-size: 15px;
  font-style: italic;
  letter-spacing: 1px;
  color: rgba(255, 238, 220, 0.86);
  text-shadow: 0 1px 12px rgba(0, 0, 10, 0.55);
  animation: float-in 1.4s var(--ease) 0.4s both;
}
.hero-quote:empty { display: none; }

/* 特别日子彩蛋角标 */
.today-badge {
  margin-bottom: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  border-radius: 999px;
  font-size: 15px;
  letter-spacing: 1px;
  color: #fff;
  background: linear-gradient(120deg, rgba(255, 158, 124, 0.9), rgba(255, 123, 178, 0.82));
  box-shadow: 0 8px 30px rgba(255, 140, 150, 0.4);
  animation: float-in 0.9s var(--ease) both;
}

/* 情绪电台 dock */
.mood-dock {
  margin-top: 22px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px 7px 16px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--stroke);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  pointer-events: none;
  animation: float-in 1.4s var(--ease) 0.55s both;
}
.mood-label { font-size: 12px; color: var(--txt-dim); letter-spacing: 1px; pointer-events: none; }
.mood-btn {
  pointer-events: auto;
  padding: 6px 12px;
  font-size: 13px;
  border-radius: 999px;
  color: var(--txt-dim);
  border: 1px solid transparent;
  transition: all 0.25s;
}
.mood-btn:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.mood-btn.active {
  color: #fff;
  background: rgba(255, 210, 138, 0.18);
  border-color: rgba(255, 210, 138, 0.42);
  box-shadow: 0 0 12px rgba(255, 190, 120, 0.35);
}

/* 全屏相册灯箱 */
#lb {
  position: absolute; inset: 0;
  z-index: 80;
  display: grid; place-items: center;
  background: rgba(3, 3, 12, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: fade-in 0.3s ease;
}
#lb.hidden { display: none; }
.lb-stage {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  max-width: 94vw; max-height: 88vh;
}
#lb-img {
  max-width: 92vw; max-height: 76vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.65);
  user-select: none;
}
#lb-cap { color: var(--txt-dim); font-size: 13px; letter-spacing: 1px; max-width: 84vw; text-align: center; }
#lb-count {
  position: absolute; bottom: 20px; left: 50%;
  transform: translateX(-50%);
  color: var(--txt-dim); font-size: 13px; letter-spacing: 3px;
}
.lb-btn {
  position: absolute;
  width: 46px; height: 46px;
  border-radius: 50%;
  font-size: 19px; color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: grid; place-items: center;
  cursor: pointer;
  transition: background 0.25s, transform 0.2s;
  z-index: 2;
}
.lb-btn:hover { background: rgba(255, 255, 255, 0.22); transform: scale(1.06); }
#lb-close { top: 20px; right: 20px; }
#lb-prev { left: 16px; top: 50%; transform: translateY(-50%); font-size: 30px; }
#lb-next { right: 16px; top: 50%; transform: translateY(-50%); font-size: 30px; }
#lb-prev:hover { transform: translateY(-50%) scale(1.08); }
#lb-next:hover { transform: translateY(-50%) scale(1.08); }
