/* ============================================================
 * style.css —— HUD / 面板 / 卡片
 * 配色沿用 Vienne 站的深色科技感：深蓝黑底 + 青绿主色 + 霓虹点缀
 * ============================================================ */

:root {
  --bg: #050914;
  --bg-2: #0a1024;
  --line: rgba(120, 160, 220, 0.16);
  --line-2: rgba(120, 160, 220, 0.28);
  --txt: #e8f0ff;
  --txt-2: #8fa3c8;
  --txt-3: #5f7094;
  --cyan: #22e0c8;
  --purple: #7c5cff;
  --pink: #ff3d81;
  --gold: #ffc247;
  --blue: #39a0ff;
  --mono: Consolas, "SF Mono", "Cascadia Mono", monospace;
  --sans: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
}

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

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--txt);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

/* touch-action:none —— 交给 JS 自己处理手势，否则 iOS Safari 会把双指捏合
   当成「缩放整个网页」（它无视 viewport 的 user-scalable=no）。 */
#scene { position: fixed; inset: 0; display: block; touch-action: none; }

.ui-layer {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 10;
}
.ui-layer > * { pointer-events: auto; }

/* 面板打开时隐藏 HUD，避免挡视线 */
body.ui-open #hud-top,
body.ui-open #hint-bar,
body.ui-open #bag-btn,
body.ui-open #radar,
body.ui-open #joystick,
body.ui-open #zoom-ctl,
body.ui-open #interact-prompt { opacity: 0; pointer-events: none; }

#hud-top, #hint-bar, #bag-btn, #radar, #joystick, #zoom-ctl, #interact-prompt {
  transition: opacity .35s ease;
}

/* ---------------- 顶栏 ---------------- */
#hud-top {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  gap: 16px;
}

.brand {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 16px;
  background: rgba(8, 14, 30, 0.62);
  border: 1px solid var(--line);
  border-radius: 12px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.brand .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.brand b { font-size: 15px; letter-spacing: .5px; }
.brand span { font-family: var(--mono); font-size: 11px; color: var(--txt-3); }

#nav { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.nav-btn {
  display: flex; align-items: center; gap: 7px;
  padding: 9px 15px;
  font-size: 13px; font-family: var(--sans);
  color: var(--txt-2);
  background: rgba(8, 14, 30, 0.62);
  border: 1px solid var(--line);
  border-radius: 11px;
  cursor: pointer;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: all .22s ease;
  white-space: nowrap;
}
.nav-btn:hover { color: var(--txt); border-color: var(--c, var(--cyan)); transform: translateY(-2px); }
.nav-btn.active { color: #041018; background: var(--c, var(--cyan)); border-color: var(--c, var(--cyan)); box-shadow: 0 0 22px -4px var(--c, var(--cyan)); }
.nav-btn .ico { font-size: 14px; }
.nav-btn em {
  font-family: var(--mono); font-style: normal;
  font-size: 9px; opacity: .75; letter-spacing: .5px;
}

.hud-right { display: flex; gap: 8px; align-items: center; }
.ghost-btn {
  padding: 9px 14px; font-size: 12px;
  color: var(--txt-2); background: rgba(8, 14, 30, 0.62);
  border: 1px solid var(--line); border-radius: 11px;
  cursor: pointer; backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-family: var(--sans);
  transition: all .22s ease;
}
.ghost-btn:hover { color: var(--txt); border-color: var(--line-2); }
/* a 标签版按钮：去掉下划线与继承色，保持和 button 一致的行高 */
a.ghost-btn { text-decoration: none; display: inline-flex; align-items: center; line-height: 1.2; }
#home-btn { color: var(--gold); }
#home-btn:hover { border-color: var(--gold); }

/* ---------------- 底部操作提示 ---------------- */
#hint-bar {
  position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 14px; align-items: center;
  padding: 9px 18px;
  background: rgba(8, 14, 30, 0.6);
  border: 1px solid var(--line);
  border-radius: 12px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-size: 12px; color: var(--txt-2);
  white-space: nowrap;
}
#hint-bar kbd {
  font-family: var(--mono); font-size: 11px;
  padding: 2px 7px; margin-right: 4px;
  background: rgba(120, 160, 220, 0.14);
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  border-radius: 5px; color: var(--txt);
}
#hint-bar span { display: inline-flex; align-items: center; }

/* ---------------- 靠近提示 ---------------- */
#interact-prompt {
  position: absolute; bottom: 76px; left: 50%; transform: translateX(-50%) translateY(10px);
  padding: 12px 22px;
  background: linear-gradient(135deg, rgba(34, 224, 200, 0.14), rgba(124, 92, 255, 0.12));
  border: 1px solid var(--c, var(--cyan));
  border-radius: 14px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  text-align: center;
  opacity: 0; pointer-events: none;
  transition: all .25s cubic-bezier(.2,.9,.3,1.2);
  box-shadow: 0 0 30px -8px var(--c, var(--cyan));
}
#interact-prompt.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#interact-prompt .t { font-size: 15px; font-weight: 600; }
#interact-prompt .s { font-size: 11.5px; color: var(--txt-2); margin-top: 3px; font-family: var(--mono); }
#interact-prompt kbd {
  display: inline-block; margin: 7px 3px 0;
  font-family: var(--mono); font-size: 11px;
  padding: 3px 9px;
  background: var(--c, var(--cyan)); color: #041018;
  border-radius: 6px; font-weight: 700;
}

/* ---------------- 背包 ---------------- */
#bag-btn {
  position: absolute; left: 20px; bottom: 20px;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  background: rgba(8, 14, 30, 0.62);
  border: 1px solid var(--line);
  border-radius: 12px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  cursor: pointer; font-family: var(--sans);
  color: var(--txt); font-size: 13px;
  transition: all .22s ease;
}
#bag-btn:hover { border-color: var(--gold); transform: translateY(-2px); }
#bag-btn .count { font-family: var(--mono); font-size: 16px; color: var(--gold); font-weight: 700; }
#bag-btn .of { font-family: var(--mono); font-size: 11px; color: var(--txt-3); }

/* ---------------- 雷达小地图 ---------------- */
#radar {
  position: absolute; right: 20px; bottom: 20px;
  width: 148px; height: 148px;
  background: rgba(6, 11, 24, 0.7);
  border: 1px solid var(--line);
  border-radius: 50%;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
}
#radar canvas { width: 100%; height: 100%; display: block; }
/* ---------------- 虚拟摇杆（触屏） ---------------- */
#joystick {
  position: absolute; left: 24px; bottom: 100px;
  width: 128px; height: 128px;
  border-radius: 50%;
  background: rgba(8, 14, 30, 0.45);
  border: 1px solid var(--line-2);
  display: none;
  touch-action: none;
}
#joystick .knob {
  position: absolute; left: 50%; top: 50%;
  width: 52px; height: 52px; margin: -26px 0 0 -26px;
  border-radius: 50%;
  background: rgba(34, 224, 200, 0.35);
  border: 1px solid var(--cyan);
}
body.touch #joystick { display: block; }

/* ---------------- 缩放控件（触屏） ----------------
 * 放在右侧、时段面板上方，避免和摇杆 / 雷达 / 背包打架。
 * 只在触屏设备出现（body.touch），桌面端用滚轮。 */
#zoom-ctl {
  position: absolute; right: 20px; bottom: 330px;
  display: none; flex-direction: column; gap: 8px;
  touch-action: none;
}
body.touch #zoom-ctl { display: flex; }
#zoom-ctl button {
  width: 42px; height: 42px;
  border-radius: 50%;
  font-size: 19px; line-height: 1; font-weight: 500;
  color: var(--txt);
  background: rgba(8, 14, 30, 0.62);
  border: 1px solid var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  cursor: pointer;
  transition: color .18s ease, border-color .18s ease, background .18s ease;
}
#zoom-ctl button:active {
  color: var(--gold);
  border-color: rgba(255, 194, 71, 0.6);
  background: rgba(255, 194, 71, 0.14);
}

/* ---------------- 加载屏 ---------------- */
#loader {
  position: fixed; inset: 0; z-index: 100;
  background: radial-gradient(circle at 50% 45%, #0d1733 0%, #050914 70%);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 22px;
  transition: opacity .7s ease;
}
#loader.hide { opacity: 0; pointer-events: none; }
#loader .logo {
  font-size: 40px; font-weight: 800; letter-spacing: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--purple) 55%, var(--pink));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
#loader .sub { font-family: var(--mono); font-size: 12px; color: var(--txt-3); letter-spacing: 2px; }
#loader .bar {
  width: min(340px, 70vw); height: 4px;
  background: rgba(120, 160, 220, 0.14);
  border-radius: 4px; overflow: hidden;
}
#loader .bar i {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  border-radius: 4px; transition: width .3s ease;
}
#loader .step { font-family: var(--mono); font-size: 11px; color: var(--cyan); min-height: 16px; }
#loader .enter {
  margin-top: 6px; padding: 12px 30px;
  font-family: var(--sans); font-size: 14px;
  color: #041018; background: var(--cyan);
  border: none; border-radius: 12px; cursor: pointer;
  opacity: 0; transform: translateY(8px);
  transition: all .4s ease; pointer-events: none;
  box-shadow: 0 0 34px -6px var(--cyan);
}
#loader.ready .enter { opacity: 1; transform: translateY(0); pointer-events: auto; }
#loader.ready .step { color: var(--txt-3); }

/* ---------------- 通用遮罩 + 面板 ---------------- */
.overlay {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(3, 6, 16, 0.66);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: none;
  align-items: center; justify-content: center;
  padding: 24px;
}
.overlay.show { display: flex; animation: fadeIn .28s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.panel {
  position: relative;
  width: min(880px, 100%);
  max-height: min(86vh, 860px);
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, rgba(11, 18, 38, 0.96), rgba(7, 12, 28, 0.98));
  border: 1px solid var(--pc, var(--line-2));
  border-radius: 18px;
  box-shadow: 0 30px 90px -30px rgba(0, 0, 0, .9), 0 0 60px -20px var(--pc, transparent);
  animation: riseIn .34s cubic-bezier(.2,.8,.3,1);
  overflow: hidden;
}
@keyframes riseIn { from { opacity: 0; transform: translateY(26px) scale(.97); } to { opacity: 1; transform: none; } }

/* 顶部扫描线装饰 */
.panel::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--pc, var(--cyan)), transparent);
  opacity: .85;
}

.panel-head {
  padding: 22px 26px 18px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  flex-shrink: 0;
}
.panel-head h2 { font-size: 24px; font-weight: 700; letter-spacing: .5px; }
.panel-head p { font-size: 13px; color: var(--txt-2); margin-top: 5px; line-height: 1.55; }
.close-btn {
  flex-shrink: 0;
  width: 34px; height: 34px; border-radius: 10px;
  background: rgba(120, 160, 220, 0.1);
  border: 1px solid var(--line);
  color: var(--txt-2); font-size: 18px; cursor: pointer;
  transition: all .2s ease; line-height: 1;
}
.close-btn:hover { color: var(--pink); border-color: var(--pink); transform: rotate(90deg); }

.panel-body {
  padding: 22px 26px 26px;
  overflow-y: auto;
  flex: 1;
}
.panel-body::-webkit-scrollbar { width: 8px; }
.panel-body::-webkit-scrollbar-thumb { background: rgba(120,160,220,.22); border-radius: 4px; }
.panel-body::-webkit-scrollbar-track { background: transparent; }

/* ---------------- 通用零件 ---------------- */
.sec-title {
  font-family: var(--sans); font-size: 12.5px;
  color: var(--txt-3); letter-spacing: 0.1em;
  margin: 26px 0 12px; display: flex; align-items: center; gap: 10px;
}
.sec-title::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.panel-body > .sec-title:first-child { margin-top: 0; }

.tag {
  display: inline-block; padding: 3px 10px; margin: 0 6px 6px 0;
  font-size: 11.5px; color: var(--txt-2);
  background: rgba(120, 160, 220, 0.09);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.tag.hl { color: var(--pc, var(--cyan)); border-color: var(--pc, var(--cyan)); background: rgba(34, 224, 200, .08); }

.card {
  padding: 16px 18px;
  background: rgba(120, 160, 220, 0.045);
  border: 1px solid var(--line);
  border-radius: 13px;
  transition: all .22s ease;
}
.card:hover {
  border-color: var(--pc, var(--line-2));
  background: rgba(120, 160, 220, 0.075);
  transform: translateY(-2px);
}
.card h3 { font-size: 15.5px; font-weight: 650; margin-bottom: 7px; }
.card p { font-size: 13px; color: var(--txt-2); line-height: 1.68; }
.card .meta {
  font-family: var(--mono); font-size: 10.5px; color: var(--txt-3);
  display: flex; gap: 10px; align-items: center; margin-bottom: 8px; flex-wrap: wrap;
}
.card .meta .cat {
  padding: 2px 8px; border-radius: 5px; font-size: 10px;
  color: var(--pc, var(--cyan));
  background: color-mix(in srgb, var(--pc, var(--cyan)) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--pc, var(--cyan)) 35%, transparent);
}

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

code.snip {
  display: block; margin-top: 10px; padding: 10px 13px;
  font-family: var(--mono); font-size: 12px; color: #9effe6;
  background: rgba(0, 0, 0, .4);
  border-left: 2px solid var(--cyan);
  border-radius: 0 8px 8px 0;
  overflow-x: auto; white-space: nowrap;
}

a.link {
  display: inline-flex; align-items: center; gap: 5px;
  margin: 10px 10px 0 0; padding: 6px 13px;
  font-size: 12px; color: var(--txt);
  background: rgba(120, 160, 220, 0.08);
  border: 1px solid var(--line-2); border-radius: 9px;
  text-decoration: none; transition: all .2s ease;
}
a.link:hover { color: #041018; background: var(--pc, var(--cyan)); border-color: var(--pc, var(--cyan)); }

/* Hero 简介 */
.hero-line { font-size: 14px; line-height: 1.85; color: var(--txt-2); margin-bottom: 12px; }
.hero-line b { color: var(--txt); font-weight: 650; }
.stat-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.stat {
  padding: 8px 14px; font-size: 12px; color: var(--cyan);
  background: rgba(34, 224, 200, .08);
  border: 1px solid rgba(34, 224, 200, .3);
  border-radius: 9px;
}

/* 时间线 */
.timeline { position: relative; padding-left: 22px; }
.timeline::before {
  content: ''; position: absolute; left: 5px; top: 6px; bottom: 6px;
  width: 1px; background: linear-gradient(180deg, var(--cyan), rgba(124,92,255,.5), transparent);
}
.tl-item { position: relative; padding-bottom: 18px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ''; position: absolute; left: -21px; top: 5px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--bg-2); border: 2px solid var(--cyan);
}
.tl-item .t { font-family: var(--mono); font-size: 11px; color: var(--cyan); }
.tl-item .r { font-size: 14px; font-weight: 620; margin: 3px 0 4px; }
.tl-item .d { font-size: 12.5px; color: var(--txt-2); line-height: 1.65; }

/* 系统课 */
.course-box {
  padding: 18px 20px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(124, 92, 255, .13), rgba(34, 224, 200, .07));
  border: 1px solid rgba(124, 92, 255, .3);
}
.course-box .badge {
  display: inline-block; padding: 3px 10px; margin-bottom: 9px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 1px;
  color: #041018; background: var(--gold); border-radius: 5px; font-weight: 700;
}
.course-box h3 { font-size: 17px; margin-bottom: 7px; }
.course-box p { font-size: 13px; color: var(--txt-2); line-height: 1.65; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
.chip {
  padding: 5px 11px; font-family: var(--mono); font-size: 11px;
  color: var(--purple); background: rgba(124, 92, 255, .1);
  border: 1px solid rgba(124, 92, 255, .32); border-radius: 7px;
}

/* 项目卡 */
.proj { display: flex; gap: 14px; }
.proj .ico {
  flex-shrink: 0; width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; font-size: 22px;
  background: rgba(120, 160, 220, .09); border: 1px solid var(--line);
}

/* 简历 */
.res-sec { margin-bottom: 20px; }
.res-sec:last-child { margin-bottom: 0; }
.res-sec h4 {
  font-family: var(--mono); font-size: 11px; color: var(--cyan);
  letter-spacing: 1.4px; margin-bottom: 9px;
}
.res-row {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 9px 12px; border-radius: 9px;
  border: 1px solid var(--line); margin-bottom: 6px;
  background: rgba(120, 160, 220, .04);
  font-size: 13px;
}
.res-row .b { color: var(--txt-2); font-size: 12.5px; text-align: right; }
.res-note {
  margin-top: 16px; padding: 12px 15px; font-size: 12px; color: var(--txt-3);
  background: rgba(255, 194, 71, .06);
  border: 1px solid rgba(255, 194, 71, .22); border-radius: 10px;
}

/* 联系 */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.contact-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-radius: 13px;
  background: rgba(120, 160, 220, .045);
  border: 1px solid var(--line);
  transition: all .22s ease;
}
.contact-item:hover { border-color: var(--pc, var(--cyan)); transform: translateY(-2px); }
.contact-item .i { font-size: 20px; }
.contact-item .l { font-family: var(--mono); font-size: 10px; color: var(--txt-3); letter-spacing: 1px; }
.contact-item .v { font-size: 13.5px; color: var(--txt); word-break: break-all; }
.copy-btn {
  margin-left: auto; padding: 4px 10px;
  font-size: 11px; font-family: var(--sans);
  color: var(--txt-2); background: rgba(120, 160, 220, .1);
  border: 1px solid var(--line); border-radius: 7px; cursor: pointer;
  transition: all .2s ease; flex-shrink: 0;
}
.copy-btn:hover { color: var(--cyan); border-color: var(--cyan); }

.foot-note {
  margin-top: 20px; padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 12px; color: var(--txt-3); line-height: 1.7;
}

/* ---------------- 明信片 ---------------- */
.postcard {
  width: min(480px, 100%);
  padding: 30px 32px 24px;
  background: linear-gradient(150deg, #f3ead6 0%, #e6dcc4 100%);
  color: #2b2216;
  border-radius: 6px;
  box-shadow: 0 40px 90px -30px rgba(0,0,0,.9);
  transform: rotate(-1.2deg);
  animation: cardIn .5s cubic-bezier(.2,.8,.3,1.1);
  position: relative;
}
@keyframes cardIn { from { opacity: 0; transform: rotate(-8deg) scale(.8) translateY(40px); } to { opacity: 1; transform: rotate(-1.2deg); } }
.postcard::after {
  content: ''; position: absolute; inset: 10px;
  border: 1px dashed rgba(90, 70, 40, .4); border-radius: 3px; pointer-events: none;
}
.postcard .badge {
  display: inline-block; padding: 3px 9px; margin-bottom: 12px;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 1.4px;
  color: #f3ead6; background: #2b2216; border-radius: 3px;
}
.postcard h3 { font-size: 20px; margin-bottom: 12px; font-weight: 700; }
.postcard p { font-size: 14.5px; line-height: 1.85; color: #4a3d29; }
.postcard .sig {
  margin-top: 18px; text-align: right;
  font-size: 12px; color: #7a6748; font-style: italic;
}
.postcard .close-post {
  display: block; margin: 22px auto 0; padding: 9px 26px;
  font-family: var(--sans); font-size: 13px;
  color: #f3ead6; background: #2b2216;
  border: none; border-radius: 8px; cursor: pointer;
}

/* ---------------- 星球向导聊天窗 ---------------- */
#chat {
  position: absolute; right: 20px; top: 76px;
  width: min(310px, calc(100vw - 40px));
  display: none; flex-direction: column;
  background: rgba(9, 15, 32, 0.9);
  border: 1px solid var(--line-2);
  border-radius: 15px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  overflow: hidden;
  box-shadow: 0 24px 60px -24px rgba(0,0,0,.9);
}
#chat.show { display: flex; animation: riseIn .3s ease; }
#chat .hd {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 15px; border-bottom: 1px solid var(--line);
}
#chat .hd .av {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  display: flex; align-items: center; justify-content: center; font-size: 16px;
}
#chat .hd .n { font-size: 13px; font-weight: 600; }
#chat .hd .s {
  font-family: var(--mono); font-size: 9.5px; color: var(--cyan);
  display: flex; align-items: center; gap: 4px; margin-top: 2px;
}
#chat .hd .s::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--cyan); box-shadow: 0 0 8px var(--cyan);
}
#chat .msgs { padding: 14px 15px; display: flex; flex-direction: column; gap: 9px; max-height: 300px; overflow-y: auto; }
#chat .msgs::-webkit-scrollbar { width: 6px; }
#chat .msgs::-webkit-scrollbar-thumb { background: rgba(120,160,220,.22); border-radius: 3px; }
.bubble {
  padding: 9px 13px; font-size: 12.5px; line-height: 1.65;
  border-radius: 12px; max-width: 88%;
  background: rgba(120, 160, 220, .1);
  border: 1px solid var(--line);
  border-bottom-left-radius: 3px;
}
.bubble.me {
  align-self: flex-end; background: rgba(34, 224, 200, .14);
  border-color: rgba(34, 224, 200, .35);
  border-bottom-left-radius: 12px; border-bottom-right-radius: 3px;
}
#chat .quick {
  padding: 10px 14px 14px; display: flex; flex-wrap: wrap; gap: 6px;
  border-top: 1px solid var(--line);
}
#chat .quick button {
  padding: 6px 11px; font-size: 11.5px; font-family: var(--sans);
  color: var(--txt-2); background: rgba(120, 160, 220, .08);
  border: 1px solid var(--line); border-radius: 8px; cursor: pointer;
  transition: all .2s ease;
}
#chat .quick button:hover { color: var(--cyan); border-color: var(--cyan); }

/* ---------------- 吐司 ---------------- */
#toasts {
  position: absolute; top: 76px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none;
}
.toast {
  padding: 10px 18px; font-size: 13px;
  background: rgba(9, 15, 32, .92);
  border: 1px solid var(--c, var(--line-2));
  border-radius: 11px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 12px 40px -14px rgba(0,0,0,.9);
  animation: toastIn .34s cubic-bezier(.2,.9,.3,1.2);
  display: flex; align-items: center; gap: 9px;
  max-width: 86vw;
}
.toast.out { animation: toastOut .3s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-14px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-10px); } }
.toast .emo { font-size: 16px; }
.toast .tx { line-height: 1.4; }
.toast .tx small { display: block; font-size: 11px; color: var(--txt-3); margin-top: 2px; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 780px) {
  #hud-top { padding: 10px 12px; flex-wrap: wrap; }
  .brand { padding: 6px 11px; }
  .brand span { display: none; }
  #nav { order: 3; width: 100%; overflow-x: auto; justify-content: flex-start; padding-bottom: 2px; }
  .nav-btn { padding: 7px 11px; font-size: 12px; }
  .nav-btn em { display: none; }
  #hint-bar { display: none; }
  #radar { width: 108px; height: 108px; right: 12px; bottom: 12px; }
  #bag-btn { left: 12px; bottom: 12px; padding: 8px 12px; }
  #zoom-ctl { right: 12px; bottom: 248px; }
  #zoom-ctl button { width: 38px; height: 38px; font-size: 17px; }
  .panel-head { padding: 18px 18px 15px; }
  .panel-head h2 { font-size: 20px; }
  .panel-body { padding: 18px; }
  .grid-2, .grid-3, .contact-grid { grid-template-columns: 1fr; }
  #chat { top: 70px; right: 12px; }
  .overlay { padding: 12px; }
}

/* ---------------- 时段滑块 ---------------- */
#tod-widget {
  position: absolute; right: 20px; bottom: 190px;
  width: 168px;
  padding: 10px 14px 12px;
  background: rgba(8, 14, 30, 0.62);
  border: 1px solid var(--line);
  border-radius: 12px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: opacity .35s ease;
  z-index: 5;
}
#tod-widget .tod-head {
  display: flex; align-items: center; gap: 7px;
  margin-bottom: 8px;
}
#tod-widget .tod-icon { font-size: 14px; }
#tod-widget .tod-label { font-size: 12px; font-weight: 700; color: var(--txt); flex: 1; }
#tod-widget .tod-clock { font-family: var(--mono); font-size: 11px; color: var(--gold); margin-left: auto; }
#tod-widget .tod-foot {
  display: flex; align-items: center; gap: 6px;
  margin-top: 7px;
}
#tod-widget .tod-rate {
  font-family: var(--mono); font-size: 10px; line-height: 1;
  color: var(--txt-2); background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line); border-radius: 7px;
  padding: 3px 6px; cursor: pointer;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
#tod-widget .tod-rate:hover {
  color: var(--gold); border-color: rgba(255, 194, 71, 0.55);
  background: rgba(255, 194, 71, 0.12);
}
#tod-slider {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 4px; border-radius: 2px;
  background: linear-gradient(90deg, #1a2450 0%, #d8a8b8 25%, #9fd4ff 50%, #ffc9a0 73%, #1a2450 100%);
  outline: none; cursor: pointer;
}
#tod-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--gold); border: 2px solid rgba(255,255,255,0.85);
  box-shadow: 0 0 8px rgba(255,194,71,0.6);
}
#tod-slider::-moz-range-thumb {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--gold); border: 2px solid rgba(255,255,255,0.85);
}
body.ui-open #tod-widget { opacity: 0; pointer-events: none; }

@media (max-width: 780px) {
  #tod-widget { right: 12px; bottom: 132px; width: 132px; padding: 8px 10px 10px; }
}
#tod-widget .tod-weather {
  font-size: 11px; color: var(--txt-3);
  padding: 1px 7px; border: 1px solid var(--line); border-radius: 8px;
}
#tod-widget .tod-label { white-space: nowrap; }
@media (max-width: 780px) {
  #tod-widget { width: 148px; }
  #tod-widget .tod-clock { margin-left: auto; }
  #tod-widget .tod-head { gap: 5px; }
}
