/* css/style.css — 滑翔伞平安飞行 H5 深色 HUD 风格 */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; height: 100%; overflow: hidden; font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; background: #0b1220; color: #e2e8f0; }

#cesiumContainer { position: fixed; inset: 0; }
#cesiumContainer .cesium-viewer-bottom { display: none !important; }
#cesiumContainer .cesium-widget-credits { display: none !important; }
#cesiumContainer .cesium-viewer-toolbar { display: none !important; }

/* 顶部工具条 */
.top-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(env(safe-area-inset-top) + 10px) 14px 10px;
  background: linear-gradient(180deg, rgba(8, 14, 28, 0.92), rgba(8, 14, 28, 0));
  pointer-events: none;
}
.brand { font-size: 17px; font-weight: 800; color: #7dd3fc; letter-spacing: 1px; text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.brand-sub { font-size: 12px; color: #8a94a6; font-weight: 400; }
.tool-group { display: flex; align-items: center; gap: 6px; pointer-events: auto; flex-wrap: wrap; justify-content: flex-end; }
.btn {
  background: rgba(15, 23, 42, 0.75); color: #dbeafe;
  border: 1px solid rgba(56, 189, 248, 0.35); border-radius: 999px;
  font-size: 12px; padding: 6px 12px; cursor: pointer; backdrop-filter: blur(6px);
  transition: all .15s; white-space: nowrap;
}
.btn:hover { background: rgba(56, 189, 248, 0.2); }
.btn-active { background: linear-gradient(135deg, #38bdf8, #0ea5e9); color: #06121f; font-weight: 700; border-color: transparent; }
.btn-group { display: flex; gap: 4px; }
.btn-group .btn { border-radius: 8px; padding: 5px 10px; }

/* 轨迹信息 */
.track-info {
  position: fixed; left: 14px; top: calc(env(safe-area-inset-top) + 62px); z-index: 15;
  background: rgba(15, 23, 42, 0.7); border: 1px solid rgba(56, 189, 248, 0.2);
  border-left: 4px solid #38bdf8; border-radius: 12px; padding: 8px 12px;
  max-width: 46vw; backdrop-filter: blur(6px);
}
.track-title { font-size: 14px; font-weight: 700; color: #f1f5f9; }
.track-meta { font-size: 11px; color: #8a94a6; margin-top: 3px; }
.track-coord { font-size: 10px; color: #64748b; margin-top: 3px; line-height: 1.5; }

/* 右上数据面板 */
.hud-panel {
  position: fixed; top: calc(env(safe-area-inset-top) + 120px); right: 14px; z-index: 15;
  display: flex; flex-direction: column; align-items: flex-end; gap: 6px;
}
.hud-row {
  background: rgba(15, 23, 42, 0.72); border: 1px solid rgba(56, 189, 248, 0.25);
  border-right: 4px solid #38bdf8; border-radius: 8px 0 0 8px;
  padding: 3px 12px 3px 10px; display: flex; align-items: baseline; gap: 6px;
  backdrop-filter: blur(4px);
}
.hud-label { font-size: 10px; color: #64748b; width: 28px; flex-shrink: 0; }
.hud-num { font-size: 20px; font-weight: 800; color: #7dd3fc; font-variant-numeric: tabular-nums; line-height: 1.15; }
.hud-unit { font-size: 10px; color: #8a94a6; }

/* 高度曲线面板 */
.chart-panel {
  position: fixed; left: 14px; bottom: 150px; z-index: 18; width: min(340px, 92vw);
  background: rgba(15, 23, 42, 0.88); border: 1px solid rgba(56, 189, 248, 0.25); border-radius: 14px;
  padding: 10px 10px 4px; backdrop-filter: blur(8px); display: none;
}
.chart-panel.show { display: block; }
.chart-head { font-size: 12px; color: #a5c9ee; font-weight: 600; display: flex; justify-content: space-between; }
.chart-close { color: #64748b; cursor: pointer; }
#chartBox { width: 100%; height: 140px; }

/* 底部时间轴 */
.control-bar {
  position: fixed; left: 12px; right: 12px; bottom: calc(env(safe-area-inset-bottom) + 58px); z-index: 20;
  display: flex; align-items: center; gap: 10px;
  background: rgba(15, 23, 42, 0.88); border: 1px solid rgba(56, 189, 248, 0.2); border-radius: 18px;
  padding: 8px 14px; backdrop-filter: blur(8px);
}
.play-btn {
  width: 44px; height: 44px; border-radius: 50%; border: none; flex-shrink: 0;
  background: linear-gradient(135deg, #38bdf8, #0ea5e9); color: #06121f;
  font-size: 18px; font-weight: 800; cursor: pointer;
}
.progress-wrap { flex: 1; min-width: 0; }
.seek { width: 100%; -webkit-appearance: none; appearance: none; height: 6px; border-radius: 999px; background: linear-gradient(90deg, #38bdf8 var(--p,0%), #334155 var(--p,0%)); outline: none; }
.seek::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: #7dd3fc; border: 3px solid #0ea5e9; box-shadow: 0 0 8px rgba(56,189,248,.6); cursor: pointer; }
.tick-row { position: relative; height: 16px; margin-top: 2px; }
.tick { position: absolute; transform: translateX(-50%); font-size: 10px; color: #64748b; font-variant-numeric: tabular-nums; }
.tick:first-child { transform: none; }
.tick:last-child { transform: translateX(-100%); }
/* 时间轴姿态异常红点（severity>=2，点击跳转该时刻） */
.state-dot { position: absolute; top: 4px; width: 6px; height: 6px; border-radius: 50%; background: #f43f5e; box-shadow: 0 0 5px rgba(244,63,94,.8); cursor: pointer; transform: translateX(-50%); }
.speed-btn {
  color: #7dd3fc; font-size: 14px; font-weight: 700; background: rgba(56,189,248,.12);
  border: 1px solid rgba(56,189,248,.3); border-radius: 10px; padding: 8px 14px; cursor: pointer; flex-shrink: 0;
}

@media (min-width: 768px) {
  .hud-panel { top: 100px; }
  .control-bar { max-width: 720px; margin: 0 auto; }
}

/* ========== Tab 导航（底部导航栏，复盘/社区/飞行记录） ========== */
.tab-bar {
  position: fixed; top: auto; left: 0; right: 0; bottom: calc(env(safe-area-inset-bottom) + 6px); z-index: 30;
  display: flex; justify-content: center; gap: 6px;
  padding: 6px 12px calc(env(safe-area-inset-bottom) + 8px);
  background: linear-gradient(0deg, rgba(8,14,28,.97), rgba(8,14,28,.72), transparent);
  pointer-events: none;
}
.tab-btn {
  pointer-events: auto; background: rgba(15,23,42,.72); color: #8a94a6;
  border: 1px solid rgba(148,163,184,.25); border-radius: 999px;
  font-size: 13px; font-weight: 600; padding: 6px 18px; cursor: pointer; backdrop-filter: blur(6px);
  transition: all .15s;
}
.tab-btn.tab-active {
  background: linear-gradient(135deg, #38bdf8, #0ea5e9); color: #06121f; border-color: transparent; font-weight: 800;
}
body[data-view="replay"] .replay-ui { display: block; }
body[data-view="replay"] .top-bar { top: calc(env(safe-area-inset-top) + 6px); }
body[data-view="replay"] .track-info { top: calc(env(safe-area-inset-top) + 56px); }
body[data-view="replay"] .hud-panel { top: calc(env(safe-area-inset-top) + 108px); }
body[data-view="replay"] .tab-btn[data-view="replay"] { background: linear-gradient(135deg,#38bdf8,#0ea5e9); color: #06121f; border-color: transparent; font-weight: 800; }
body[data-view="community"] .tab-btn[data-view="community"],
body[data-view="flylog"] .tab-btn[data-view="flylog"] { background: linear-gradient(135deg,#38bdf8,#0ea5e9); color: #06121f; border-color: transparent; font-weight: 800; }
body[data-view="community"] .replay-ui, body[data-view="flylog"] .replay-ui, body[data-view="base"] .replay-ui { display: none; }

/* ========== 页面视图（社区/记录） ========== */
.page-view {
  position: fixed; inset: 0; z-index: 21; display: none;
  background: linear-gradient(180deg, #0b1220 0%, #0e1a30 40%, #0b1220 100%);
  overflow-y: auto; padding: calc(env(safe-area-inset-top) + 10px) 14px calc(env(safe-area-inset-bottom) + 78px);
}
body[data-view="community"] #viewCommunity,
body[data-view="flylog"] #viewFlylog,
body[data-view="base"] #viewBase { display: block; }
body[data-view="post"] #viewPost,
body[data-view="rank"] #viewRank { display: block; }
body[data-view="post"] .replay-ui, body[data-view="rank"] .replay-ui { display: none; }
.pv-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; flex-wrap: wrap; gap: 8px; }
.pv-head-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pv-title { font-size: 18px; font-weight: 800; color: #f1f5f9; }
.pv-sub { display: block; font-size: 11px; color: #64748b; font-weight: 400; margin-top: 2px; }
.pv-btn {
  background: linear-gradient(135deg, #38bdf8, #0ea5e9); color: #06121f;
  border: none; border-radius: 999px; font-size: 13px; font-weight: 700; padding: 8px 16px; cursor: pointer;
}
.pv-ghost { background: rgba(15,23,42,.8); color: #dbeafe; border: 1px solid rgba(148,163,184,.3); }

/* 卡片列表 */
.card-list { display: flex; flex-direction: column; gap: 10px; }
.card {
  background: rgba(15, 23, 42, 0.85); border: 1px solid rgba(56, 189, 248, 0.18);
  border-left: 4px solid #38bdf8; border-radius: 14px; padding: 12px 14px;
  backdrop-filter: blur(6px); cursor: pointer; transition: transform .12s;
}
.card:active { transform: scale(.985); }
.card-head { display: flex; justify-content: space-between; align-items: baseline; }
.card-title { font-size: 15px; font-weight: 700; color: #f1f5f9; }
.card-badge { font-size: 10px; color: #7dd3fc; background: rgba(56,189,248,.15); border-radius: 999px; padding: 2px 8px; }
.card-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; font-size: 11px; color: #8a94a6; }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.stars { color: #fbbf24; font-size: 13px; letter-spacing: 1px; }
.card-btns { display: flex; gap: 6px; }
.mini-btn {
  background: rgba(15,23,42,.85); color: #dbeafe; border: 1px solid rgba(148,163,184,.3);
  border-radius: 8px; font-size: 11px; padding: 4px 10px; cursor: pointer;
}
.mini-primary { background: linear-gradient(135deg,#38bdf8,#0ea5e9); color: #06121f; border-color: transparent; font-weight: 700; }
.mini-danger { border-color: rgba(248,113,113,.4); color: #f87171; }

/* 轨迹信息卡动作 */
.track-actions { display: flex; gap: 6px; margin-top: 8px; }

/* ========== 飞行记录表单 ========== */
.flylog-form {
  background: rgba(15,23,42,.85); border: 1px solid rgba(56,189,248,.18); border-radius: 14px;
  padding: 14px; margin-bottom: 14px;
}
.fl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fl-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: #8a94a6; }
.fl-grid input, .fl-grid select, .fl-note textarea {
  background: rgba(8,14,28,.8); color: #e2e8f0; border: 1px solid rgba(148,163,184,.3);
  border-radius: 8px; padding: 8px 10px; font-size: 13px; outline: none;
}
.fl-grid input:focus, .fl-grid select:focus, .fl-note textarea:focus { border-color: #38bdf8; }
.fl-note { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: #8a94a6; margin-top: 10px; }
.fl-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.fl-share { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #a5c9ee; }
.fl-share input { accent-color: #38bdf8; }
.fl-log-card { background: rgba(15,23,42,.85); border: 1px solid rgba(56,189,248,.15); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; }
.fl-log-title { font-size: 14px; font-weight: 700; color: #f1f5f9; }
.fl-log-meta { font-size: 11px; color: #8a94a6; margin-top: 5px; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.fl-log-note { font-size: 12px; color: #cbd5e1; margin-top: 6px; }

/* ========== 评论/登录/上传弹层 ========== */
.modal {
  position: fixed; inset: 0; z-index: 40; display: none;
  background: rgba(2,6,16,.6); align-items: center; justify-content: center; padding: 20px;
}
.modal.show { display: flex; }
.modal-box {
  width: min(420px, 92vw); max-height: 86vh; overflow-y: auto;
  background: rgba(15,23,42,.97); border: 1px solid rgba(56,189,248,.3);
  border-radius: 16px; padding: 18px;
}
.modal-title { font-size: 15px; font-weight: 800; color: #f1f5f9; margin-bottom: 10px; }
.star-row { display: flex; gap: 4px; margin-bottom: 10px; }
.star { font-size: 30px; color: #334155; cursor: pointer; transition: color .1s; }
.star.on { color: #fbbf24; }
.modal-box textarea {
  width: 100%; background: rgba(8,14,28,.8); color: #e2e8f0; border: 1px solid rgba(148,163,184,.3);
  border-radius: 10px; padding: 10px; font-size: 13px; outline: none; resize: vertical;
}
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }

/* 登录/注册/发布表单 */
.auth-fields label { display: block; font-size: 12px; color: #94a3b8; margin-bottom: 10px; }
.auth-fields input, .auth-fields select {
  display: block; width: 100%; margin-top: 4px; box-sizing: border-box;
  background: rgba(8,14,28,.8); color: #e2e8f0;
  border: 1px solid rgba(148,163,184,.3); border-radius: 10px; padding: 9px 10px; font-size: 13px;
}

/* 基地筛选 chips */
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.chip {
  background: rgba(30,41,59,.8); color: #94a3b8; border: 1px solid rgba(148,163,184,.25);
  border-radius: 999px; padding: 5px 14px; font-size: 12px; cursor: pointer;
  transition: all .15s;
}
.chip:hover { color: #e2e8f0; border-color: #38bdf8; }
.chip-active { background: #38bdf8; color: #082f49; border-color: #38bdf8; font-weight: 700; }

.session-info { font-size: 12px; color: #7dd3fc; margin-right: 4px; }

/* 卡片基地标签 / 笔记 */
.base-tag { color: #5eead4; }
.card-note {
  font-size: 12px; color: #94a3b8; margin: 6px 0 8px; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* 飞行摘要卡 */
.track-summary {
  display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: #7dd3fc;
  margin-top: 4px;
}
.track-summary b { color: #e2e8f0; font-weight: 700; }

/* 照片预览 */
.photo-preview { display: block; width: 100%; max-height: 140px; object-fit: cover; border-radius: 8px; margin-top: 6px; border: 1px solid rgba(148,163,184,.3); }
.card-photo { width: 100%; max-height: 120px; object-fit: cover; border-radius: 8px; margin: 6px 0; border: 1px solid rgba(148,163,184,.25); }

/* 点赞 / 收藏按钮 */
.like-btn, .fav-btn {
  background: rgba(30,41,59,.7); color: #94a3b8; border: 1px solid rgba(148,163,184,.25);
  border-radius: 999px; padding: 3px 10px; font-size: 11px; cursor: pointer; transition: all .15s;
}
.like-btn.on { color: #f43f5e; border-color: #f43f5e; background: rgba(244,63,94,.12); }
.fav-btn.on { color: #fbbf24; border-color: #fbbf24; background: rgba(251,191,36,.12); }

/* 作者链接 */
.author-link { color: #7dd3fc; cursor: pointer; text-decoration: underline; }
.author-link:hover { color: #e0f2fe; }

/* 个人主页 */
.profile-stat-row { display: flex; gap: 10px; margin: 10px 0; flex-wrap: wrap; }
.profile-stat {
  background: rgba(30,41,59,.7); border-radius: 10px; padding: 8px 14px; text-align: center; flex: 1; min-width: 90px;
}
.profile-stat b { display: block; font-size: 18px; color: #7dd3fc; }
.profile-stat span { font-size: 11px; color: #94a3b8; }
.profile-track {
  background: rgba(30,41,59,.55); border-radius: 10px; padding: 8px 12px; margin: 6px 0;
  font-size: 12px; color: #cbd5e1; cursor: pointer; display: flex; justify-content: space-between; align-items: center;
}
.profile-track:hover { border-color: #38bdf8; }

/* 告警闪烁 */
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .55; } }

/* 空态 */
.empty-tip { text-align: center; color: #64748b; font-size: 13px; padding: 40px 0; }

/* Token 提示条 */
.token-bar {
  position: fixed; top: calc(env(safe-area-inset-top) + 56px); left: 50%; transform: translateX(-50%);
  z-index: 98; display: none; align-items: center; gap: 8px;
  background: rgba(120, 86, 8, 0.92); color: #fef3c7; font-size: 12px;
  padding: 8px 14px; border-radius: 10px; max-width: 92vw; text-align: center;
  border: 1px solid #fbbf24; line-height: 1.5;
}
.token-bar.show { display: flex; }
.token-bar b { color: #fde68a; }
.token-bar .mini-btn { background: rgba(255,255,255,.15); color: #fef3c7; border-color: rgba(254,243,199,.4); }

/* ========== 手机竖屏适配（≤767px 且竖屏，对标径大小程序竖屏体验） ==========
   电脑横屏 / 平板横屏保持上方桌面布局；本层仅覆盖竖屏尺寸 */
@media (max-width: 767px) and (orientation: portrait) {
  /* 顶部 Tab：全宽大触控按钮（已移到底部导航栏） */
  .tab-bar { padding: 6px 8px calc(env(safe-area-inset-bottom) + 10px); gap: 8px; }
  .tab-btn { flex: 1; max-width: 150px; font-size: 15px; font-weight: 700; padding: 11px 0; border-radius: 999px; }

  /* 复盘视图工具条：紧跟顶部（Tab 已移底部），按钮加大触控 */
  body[data-view="replay"] .top-bar { top: calc(env(safe-area-inset-top) + 8px); padding: 6px 8px 10px; }
  .brand { font-size: 15px; }
  .brand-sub { display: none; }
  .tool-group { gap: 6px; }
  .btn { font-size: 13px; padding: 8px 12px; min-height: 40px; }
  .btn-group .btn { padding: 8px 10px; }

  /* 轨迹信息卡：顶部全宽横条（紧凑） */
  body[data-view="replay"] .track-info { top: calc(env(safe-area-inset-top) + 60px); left: 8px; right: 8px; max-width: none; padding: 7px 10px; border-radius: 12px; }
  .track-title { font-size: 13px; }
  .track-meta, .track-coord { font-size: 10px; }
  .track-actions { gap: 5px; }
  .track-actions .mini-btn { padding: 6px 12px; font-size: 12px; }

  /* 数据面板：右上紧凑竖排 */
  body[data-view="replay"] .hud-panel { top: calc(env(safe-area-inset-top) + 128px); right: 8px; gap: 5px; }
  .hud-row { padding: 2px 10px 2px 8px; }
  .hud-label { font-size: 9px; width: 22px; }
  .hud-num { font-size: 15px; }
  .hud-unit { font-size: 9px; }

  /* 底部控制条：全宽、大播放键（进度条保持全宽长度，仅做细） */
  .control-bar { left: 8px; right: 8px; bottom: calc(env(safe-area-inset-bottom) + 64px); gap: 8px; padding: 6px 10px; border-radius: 16px; }
  .progress-wrap { flex: 1; min-width: 0; }
  .play-btn { width: 44px; height: 44px; font-size: 18px; }
  .seek { height: 2px; }
  .seek::-webkit-slider-thumb { width: 18px; height: 18px; }
  .tick-row { height: 11px; margin-top: 1px; }
  .tick { font-size: 8px; }
  .speed-btn { font-size: 14px; padding: 8px 12px; border-radius: 12px; }

  /* 高度曲线：底部控制条上方全宽 */
  .chart-panel { left: 8px; right: 8px; bottom: 128px; width: auto; padding: 8px 8px 2px; }
  #chartBox { height: 120px; }

  /* 社区 / 飞行记录页 */
  .page-view { padding: calc(env(safe-area-inset-top) + 12px) 10px calc(env(safe-area-inset-bottom) + 80px); }
  .pv-title { font-size: 16px; }
  .pv-sub { font-size: 10px; }
  .pv-btn { font-size: 14px; padding: 10px 18px; }
  .pv-ghost { padding: 10px 16px; }
  .pv-head-right { gap: 6px; }
  .session-info { font-size: 11px; }
  .card { padding: 12px; }
  .card-title { font-size: 14px; }
  .card-meta { font-size: 10px; }
  .mini-btn { font-size: 12px; padding: 6px 12px; }
  .chip { padding: 8px 16px; font-size: 13px; }
  .fl-grid { grid-template-columns: 1fr; }
  .fl-log-title { font-size: 13px; }

  /* 弹层：近全宽、输入 16px 防 iOS 聚焦缩放 */
  .modal { padding: 12px; }
  .modal-box { width: 96vw; max-height: 90vh; padding: 16px; }
  .modal-title { font-size: 16px; }
  .auth-fields input, .auth-fields select,
  .fl-grid input, .fl-grid select, .fl-note textarea,
  .modal-box textarea { font-size: 16px; padding: 10px; }
  .star { font-size: 36px; }
  .photo-preview, .card-photo { max-height: 160px; }

  /* ========== 竖屏布局修正（移动端重构）：品牌隐藏、工具两行、信息卡紧凑、指标条置底 ========== */
  /* 1) 品牌隐藏，工具条两行紧凑按钮（一行图层组 + 一行功能组），高度压缩避免覆盖信息卡 */
  .brand { display: none; }
  body[data-view="replay"] .top-bar { top: calc(env(safe-area-inset-top) + 6px); padding: 4px 8px 6px; justify-content: flex-end; }
  .tool-group { width: 100%; gap: 3px; justify-content: flex-start; }
  .btn { font-size: 12px; padding: 4px 9px; min-height: 30px; }
  .btn-group { gap: 3px; }
  .btn-group .btn { padding: 4px 8px; min-height: 30px; }

  /* 2) 轨迹信息卡：位于工具行下方（避让两行按钮，不再被遮挡），压缩字号与间距 */
  body[data-view="replay"] .track-info { top: calc(env(safe-area-inset-top) + 86px); padding: 6px 9px; border-left-width: 3px; }
  .track-title { font-size: 12px; }
  .track-meta { font-size: 10px; margin-top: 2px; }
  .track-summary { font-size: 11px; gap: 6px; margin-top: 3px; }
  .track-summary b { font-size: 11px; }
  .track-coord { font-size: 9px; margin-top: 2px; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .track-actions { margin-top: 4px; gap: 4px; }
  .track-actions .mini-btn { padding: 4px 10px; font-size: 11px; }

  /* 3) 数据面板：右上竖排 → 底部横排 6 格指标条（隐藏“时间”项，控制条已有进度；位于底部控制条上方，尺寸更紧凑） */
  body[data-view="replay"] .hud-panel {
    top: auto; left: 8px; right: 8px;
    bottom: calc(env(safe-area-inset-bottom) + 128px);
    flex-direction: row; flex-wrap: nowrap; gap: 2px; align-items: stretch;
  }
  .hud-row { flex: 1 1 0; min-width: 0; border-radius: 6px; border-right-width: 2px; padding: 2px 1px; flex-direction: column; align-items: center; justify-content: center; gap: 0; text-align: center; }
  .hud-label { font-size: 7px; width: auto; line-height: 1; }
  .hud-num { font-size: 11px; line-height: 1.15; }
  .hud-unit { font-size: 7px; line-height: 1; }
  .hud-row:last-child { display: none; }

  /* 4) 高度曲线面板：上移到指标条之上，避免遮挡 */
  .chart-panel { left: 8px; right: 8px; bottom: 196px; width: auto; }
}

/* ========== 附近滑翔基地（社区页区块 + 基地卡片） ========== */
.pv-stats { display: flex; gap: 14px; margin-bottom: 12px; padding: 8px 12px; border-radius: 10px; background: rgba(14, 165, 233, .08); border: 1px solid rgba(56, 189, 248, .2); font-size: 11px; color: #7dd3fc; }
.pv-stats b { color: #fbbf24; font-weight: 700; margin: 0 2px; }
.pv-section { margin-bottom: 14px; }
.pv-section-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.pv-section-title { font-size: 15px; font-weight: 700; color: #e2e8f0; }
.base-list { display: flex; flex-direction: column; gap: 8px; }
.base-card { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: #111a2e; border: 1px solid #1e293b; cursor: pointer; transition: border-color .15s ease; }
.base-card:active { border-color: #38bdf8; }
.base-type-tag { flex: none; font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 999px; }
.bt-takeoff { background: rgba(74, 222, 128, .16); color: #4ade80; }
.bt-landing { background: rgba(96, 165, 250, .16); color: #60a5fa; }
.base-main { flex: 1; min-width: 0; }
.base-name { font-size: 13px; font-weight: 700; color: #e2e8f0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.base-name em { font-style: normal; font-size: 11px; color: #94a3b8; font-weight: 500; }
.base-meta { font-size: 10px; color: #64748b; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.base-goto { flex: none; padding: 5px 12px; border-radius: 999px; background: rgba(14, 165, 233, .14); color: #38bdf8; font-size: 11px; border: 1px solid rgba(56, 189, 248, .35); cursor: pointer; }

/* ========== 基地详情帖（信息卡 / 飞行记录 / 留言区） ========== */
.pv-head-left { display: flex; align-items: center; gap: 6px; }
.base-detail-card { padding: 12px 14px; border-radius: 12px; background: #111a2e; border: 1px solid #1e293b; margin-bottom: 12px; }
.base-detail-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.base-detail-alt { font-size: 11px; color: #94a3b8; }
.base-detail-name { font-size: 18px; font-weight: 800; color: #f1f5f9; }
.base-detail-desc { font-size: 12px; color: #94a3b8; margin-top: 6px; line-height: 1.5; }
.base-detail-meta { font-size: 10px; color: #64748b; margin-top: 6px; }
.base-detail-actions { display: flex; gap: 8px; margin-top: 10px; }
.base-sec-head { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 8px; }
.base-sec-title { font-size: 14px; font-weight: 700; color: #e2e8f0; margin: 10px 0 8px; display: block; }
.base-comment-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.base-comment { background: #0f172a; border: 1px solid #1e293b; border-radius: 10px; padding: 8px 12px; }
.bc-author { font-size: 12px; font-weight: 700; color: #38bdf8; }
.bc-time { float: right; font-size: 10px; color: #475569; margin-top: 2px; }
.bc-text { font-size: 12px; color: #cbd5e1; margin-top: 4px; line-height: 1.5; word-break: break-word; }
.base-reply { position: sticky; bottom: 78px; display: flex; gap: 8px; padding: 8px 0; background: linear-gradient(180deg, transparent, #0b1120 18%); }
.base-reply input { flex: 1; min-width: 0; background: #111a2e; border: 1px solid #1e293b; border-radius: 999px; padding: 9px 14px; color: #e2e8f0; font-size: 13px; }
.base-reply input::placeholder { color: #64748b; }
.bc-ops { display: flex; gap: 8px; margin-top: 6px; }
.bc-op { background: rgba(56, 189, 248, .12); color: #38bdf8; border: 1px solid rgba(56, 189, 248, .3); border-radius: 999px; padding: 3px 10px; font-size: 10px; cursor: pointer; }
.bc-op-danger { background: rgba(239, 68, 68, .12); color: #f87171; border-color: rgba(239, 68, 68, .35); }

/* ========== 沉浸观看：播放中隐藏信息卡；HUD 与顶部工具行点击联动显隐；暂停时全部常驻 ========== */
.track-info, .hud-panel, .top-bar { transition: opacity .28s ease; }
body.playing .track-info { opacity: 0; pointer-events: none; }
body.ui-tap-hidden .top-bar, body.ui-tap-hidden .hud-panel { opacity: 0; pointer-events: none; }
body:not(.playing).ui-tap-hidden .top-bar, body:not(.playing).ui-tap-hidden .hud-panel { opacity: 1; pointer-events: auto; }

/* ========== 自定义显示方案面板 ========== */
.custom-body { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; max-height: 62vh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.cv-row { display: flex; flex-direction: column; gap: 6px; }
.cv-row > label { font-size: 12px; color: #94a3b8; font-weight: 600; letter-spacing: 1px; }
.cv-row input { font-size: 14px; padding: 9px 10px; border-radius: 8px; border: 1px solid #334155; background: #0f172a; color: #e2e8f0; outline: none; }
.cv-row input:focus { border-color: #38bdf8; }
.cv-swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.cv-swatch { min-width: 36px; height: 30px; border-radius: 8px; border: 2px solid #334155; font-size: 11px; color: #cbd5e1; background: #1e293b; cursor: pointer; padding: 0 8px; }
.cv-swatch.cv-on { border-color: #38bdf8; box-shadow: 0 0 0 2px rgba(56, 189, 248, .25); }
.cv-segs { display: flex; flex-wrap: wrap; gap: 6px; }
.cv-segs button { padding: 7px 12px; border-radius: 8px; border: 2px solid #334155; background: #1e293b; color: #cbd5e1; font-size: 12px; cursor: pointer; }
.cv-segs button.cv-on { border-color: #38bdf8; color: #38bdf8; background: rgba(56, 189, 248, .12); }
.cv-preset { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 8px; background: #1e293b; margin-bottom: 6px; }
.cv-preset-dot { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.cv-preset-name { flex: 1; font-size: 12px; color: #e2e8f0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv-load { padding: 4px 10px; border-radius: 6px; background: #0ea5e9; color: #fff; font-size: 11px; border: none; cursor: pointer; }
.cv-del { width: 22px; height: 22px; border-radius: 6px; background: #334155; color: #94a3b8; font-size: 11px; border: none; cursor: pointer; }
.empty-tip { font-size: 11px; color: #64748b; padding: 6px 0; }

/* ========== 彩蛋（飞行记录场地输入"笑笑"保存后触发，全屏庆祝约 3 秒） ========== */
#eggOverlay {
  position: fixed; inset: 0; z-index: 9999; overflow: hidden; cursor: pointer;
  background: radial-gradient(circle at 30% 18%, rgba(244,114,182,.28), rgba(99,102,241,.2) 45%, rgba(2,6,16,.94) 82%);
  display: flex; align-items: center; justify-content: center;
  animation: eggFadeIn .35s ease-out;
  -webkit-user-select: none; user-select: none;
}
#eggOverlay.egg-out { opacity: 0; transition: opacity .6s ease; }
.egg-box { position: relative; z-index: 2; text-align: center; padding: 0 12px; }
.egg-text {
  font-size: clamp(34px, 9vw, 84px); font-weight: 900; letter-spacing: 4px; line-height: 1.25;
  background: linear-gradient(90deg, #f472b6, #fbbf24, #4ade80, #38bdf8, #a78bfa, #f472b6);
  background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: eggRainbow 1.1s linear infinite, eggBounce 1s ease-in-out infinite;
  text-shadow: 0 0 40px rgba(244,114,182,.25);
}
.egg-sub { font-size: clamp(15px, 3vw, 24px); color: #fbcfe8; margin-top: 14px; font-weight: 600; letter-spacing: 2px; animation: eggPulse 1.4s ease-in-out infinite; }
.egg-balloon { position: absolute; bottom: -180px; animation: eggRise linear forwards; }
.egg-spark { position: absolute; top: -60px; animation: eggFall linear forwards; }
@keyframes eggFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes eggRainbow { to { background-position: 300% 0; } }
@keyframes eggBounce { 0%,100% { transform: scale(1) translateY(0); } 50% { transform: scale(1.06) translateY(-10px); } }
@keyframes eggPulse { 0%,100% { opacity: .85; } 50% { opacity: 1; } }
@keyframes eggRise { to { transform: translateY(-125vh) rotate(10deg); } }
@keyframes eggFall { to { transform: translateY(125vh) rotate(-18deg); opacity: .15; } }

/* ============ 论坛化（v3.10b15）：帖子流 / 楼层 / 帖子详情 ============ */
.forum-row { display: flex; align-items: center; background: #0f172a; border: 1px solid #1e293b; border-radius: 10px; padding: 10px 12px; cursor: pointer; gap: 10px; }
.forum-row:hover { border-color: #38bdf8; }
.forum-row + .forum-row { margin-top: 8px; }
.fr-left { display: flex; align-items: center; }
.fr-tag { display: inline-block; min-width: 24px; text-align: center; border-radius: 6px; padding: 3px 6px; font-size: 11px; font-weight: 800; color: #fff; }
.fr-tag-flight { background: #38bdf8; }
.fr-tag-takeoff { background: #4ade80; }
.fr-tag-landing { background: #60a5fa; }
.fr-main { flex: 1; min-width: 0; }
.fr-title { font-size: 14px; font-weight: 700; color: #e2e8f0; line-height: 1.35; word-break: break-word; }
.fr-title em { font-style: normal; color: #64748b; font-weight: 400; font-size: 12px; }
.fr-private { display: inline-block; margin-left: 6px; font-size: 10px; color: #f59e0b; border: 1px solid rgba(245,158,11,.4); border-radius: 4px; padding: 1px 5px; vertical-align: 2px; }
.fr-meta { font-size: 11px; color: #64748b; margin-top: 3px; display: flex; gap: 10px; flex-wrap: wrap; }
.fr-meta .fr-base { color: #34d399; }
.fr-right { display: flex; flex-direction: column; align-items: flex-end; justify-content: center; min-width: 76px; gap: 2px; }
.fr-author { font-size: 11px; color: #38bdf8; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fr-date { font-size: 10px; color: #475569; }
.fr-replies { font-size: 11px; color: #94a3b8; }
.bc-floor { display: inline-block; background: rgba(56,189,248,.12); color: #38bdf8; border-radius: 4px; padding: 1px 6px; font-size: 10px; margin-right: 6px; font-weight: 700; }
/* 帖子详情 1 楼 */
.post-head { background: #0f172a; border: 1px solid #1e293b; border-radius: 12px; padding: 14px; margin-bottom: 12px; }
.post-title { font-size: 17px; font-weight: 800; color: #f1f5f9; line-height: 1.4; }
.post-meta { font-size: 12px; color: #94a3b8; margin-top: 6px; }
.post-meta .author-link { color: #38bdf8; cursor: pointer; }
.post-stats { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: #cbd5e1; margin-top: 10px; background: #0b1220; border: 1px solid #1e293b; border-radius: 8px; padding: 8px 10px; }
.post-photo { width: 100%; border-radius: 8px; margin-top: 10px; max-height: 300px; object-fit: cover; }
.post-note { font-size: 12px; color: #cbd5e1; margin-top: 10px; line-height: 1.6; background: #0b1220; border-left: 3px solid #38bdf8; padding: 8px 10px; border-radius: 0 8px 8px 0; }
.post-btns { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
#postStarRow { margin-bottom: 8px; }

/* ============ v3.11：排行榜 / 徽章 / 飞行故事 ============ */
.mini-ghost { background: transparent; color: #94a3b8; border: 1px solid #334155; }
.mini-ghost:hover { color: #38bdf8; border-color: #38bdf8; }
.rank-note { font-size: 11px; color: #64748b; margin: 4px 2px 10px; }
.rank-row { display: flex; align-items: center; gap: 10px; background: #0f172a; border: 1px solid #1e293b; border-radius: 10px; padding: 10px 12px; cursor: pointer; }
.rank-row:hover { border-color: #38bdf8; }
.rank-row + .rank-row { margin-top: 8px; }
.rank-no { width: 34px; text-align: center; flex-shrink: 0; }
.medal { font-size: 24px; }
.rank-num { font-size: 15px; font-weight: 800; color: #64748b; }
.rank-main { flex: 1; min-width: 0; }
.rank-title { font-size: 14px; font-weight: 700; color: #e2e8f0; line-height: 1.35; word-break: break-word; }
.rank-meta { font-size: 11px; color: #64748b; margin-top: 3px; }
.rank-meta .author-link { color: #38bdf8; cursor: pointer; }
.rank-val { text-align: right; flex-shrink: 0; }
.rank-score { font-size: 14px; font-weight: 800; color: #facc15; }
.rank-sub { font-size: 10px; color: #475569; margin-top: 2px; }
.badge-wall { background: #0f172a; border: 1px solid #1e293b; border-radius: 12px; padding: 12px; margin-bottom: 12px; }
.badge-head { font-size: 14px; font-weight: 800; color: #e2e8f0; margin-bottom: 10px; }
.badge-head span { color: #38bdf8; font-weight: 700; }
.badge-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.badge { background: rgba(56,189,248,.08); border: 1px solid rgba(56,189,248,.25); border-radius: 10px; padding: 8px 6px; text-align: center; }
.badge-locked { background: rgba(15,23,42,.5); border-color: #1e293b; opacity: .55; }
.badge-icon { font-size: 24px; }
.badge-name { font-size: 11px; font-weight: 700; color: #e2e8f0; margin-top: 4px; }
.badge-desc { font-size: 9px; color: #64748b; margin-top: 2px; line-height: 1.3; }
.story-hint { font-size: 11px; color: #94a3b8; margin-top: 10px; }

