@charset "UTF-8";

/* ------------------------------------------------------------------
   三维场景查看器样式
   ------------------------------------------------------------------ */

:root {
  color-scheme: dark;
  --font-sans: "Plus Jakarta Sans", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  --tile: rgba(0, 0, 0, .6);
  --tile-border: rgba(255, 255, 255, .2);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-ui: cubic-bezier(.4, 0, .2, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  min-height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
  background: #000;
  color: #fff;
  font: 14px/1.5 var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:focus-visible { outline: 2px solid #60a5fa; outline-offset: 2px; }

.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* 画布 -------------------------------------------------------------- */
.model-page-root {
  position: fixed;
  inset: 0;
  width: 100vw;
  width: 100dvw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  z-index: 1;
  background: #000;
}
.canvas-area { position: absolute; inset: 0; z-index: 0; touch-action: none; overscroll-behavior: none; }
/* !important 用于压过 PlayCanvas 写入的内联 width/height：
   让元素尺寸永远跟随容器，拖动窗口时不出现尺寸错位。
   object-fit: cover 保证 backing 尚未更新时也等比铺满，不变形、不露黑边。 */
.canvas-area canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  touch-action: none;
  overscroll-behavior: none;
  user-select: none;
  -webkit-user-select: none;
  background: #000;
}

/* 加载遮罩 ---------------------------------------------------------- */
.loading-overlay {
  position: fixed;
  inset: 0;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  background: #07090cc2;
  backdrop-filter: blur(22px) saturate(115%);
  -webkit-backdrop-filter: blur(22px) saturate(115%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn .45s var(--ease-out);
  color: #fffffff5;
}
.loading-overlay::after {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(circle at 50% 46%, rgba(255, 255, 255, .06), transparent 30%),
              linear-gradient(180deg, #05070a14, #05070a57);
  content: "";
  pointer-events: none;
}
.loading-bg-image {
  position: absolute;
  inset: 0;
  background: url("./assets/cover.png") center / cover no-repeat;
  transform: scale(1.05);
  transition: filter .2s linear, opacity .3s ease;
  z-index: 0;
  filter: blur(10px);
}
.loading-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(84vw, 360px);
  padding: 32px;
  position: relative;
  z-index: 1;
}
.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  animation: loadingContentEnter .7s var(--ease-out) both;
}
.progress-value {
  display: flex;
  justify-content: center;
  align-items: baseline;
  width: 100%;
  color: #fffffff5;
  font-family: var(--font-sans);
  font-size: clamp(52px, 6vw, 64px);
  font-weight: 600;
  line-height: 1;
  text-shadow: 0 8px 30px rgba(0, 0, 0, .22);
}
.progress-value-number { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; letter-spacing: .05em; }
.progress-value-suffix { letter-spacing: 0; margin-left: .04em; }
.progress-track {
  position: relative;
  width: 100%;
  height: 2px;
  margin-top: 28px;
  overflow: hidden;
  border-radius: 999px;
  background: #ffffff29;
  box-shadow: inset 0 1px #0000001f;
}
.progress-fill {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: #f2f7fff5;
  box-shadow: 0 0 12px #c3dcff52;
  transform: scaleX(var(--loading-progress, 0));
  transform-origin: left center;
  transition: transform .45s var(--ease-out);
  will-change: transform;
}
.progress-fill::after {
  position: absolute;
  inset: 0;
  width: 38%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .9), transparent);
  content: "";
  opacity: .72;
  animation: progressSweep 1.8s ease-in-out infinite;
}
.loading-text { display: flex; flex-direction: column; align-items: center; gap: 7px; margin-top: 22px; text-align: center; }
.loading-main-text { color: #ffffffe6; font-family: var(--font-sans); font-size: 14px; font-weight: 600; letter-spacing: .015em; line-height: 1.4; }
.loading-sub-text { min-height: 18px; color: #ffffff85; font-family: var(--font-sans); font-size: 12px; font-weight: 500; letter-spacing: .01em; line-height: 1.5; }
.loading-smooth-mode-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  margin-top: 28px;
  padding: 14px 20px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  background: #ffffffeb;
  color: #0f172a;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1.3;
  box-shadow: 0 10px 28px #00000038;
  transition: transform .3s var(--ease-ui), background .3s var(--ease-ui), box-shadow .3s var(--ease-ui);
  -webkit-tap-highlight-color: transparent;
}
.loading-smooth-mode-btn[hidden] { display: none; }
.loading-smooth-mode-btn:hover { background: #fff; transform: translateY(-2px) scale(1.02); box-shadow: 0 14px 32px #00000047; }
.loading-smooth-mode-btn:active { transform: translateY(0) scale(.98); box-shadow: 0 6px 16px #0003; }

@keyframes loadingContentEnter { 0% { opacity: 0; transform: translateY(12px) scale(.985); } 100% { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes progressSweep { 0% { transform: translate(-120%); } 100% { transform: translate(270%); } }
@keyframes fadeIn { 0% { opacity: 0; transform: scale(.95); } 100% { opacity: 1; transform: scale(1); } }
@keyframes loadingOverlayExit {
  0% { opacity: 1; background: #07090cc2; backdrop-filter: blur(22px) saturate(115%); -webkit-backdrop-filter: blur(22px) saturate(115%); }
  100% { opacity: 0; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
}
.loading-overlay.loading-reveal-crossfade {
  pointer-events: none;
  opacity: 0;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  animation: loadingOverlayExit var(--loading-exit-duration, .45s) ease-out both;
}
.loading-fade-out { animation: fadeOut .5s ease-out forwards; }
@keyframes fadeOut { 0% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(.95); } }

/* over-area / 顶层 UI ------------------------------------------------ */
.over-area { position: absolute; inset: 0; pointer-events: none; z-index: 40; }
.over-area button, .over-area .pop-menu, .over-area .tool-btn { pointer-events: auto; }

.fade-ui { opacity: 1; transition: opacity .5s ease; }
.fade-ui.is-idle { opacity: 0; pointer-events: none; }
.fade-ui.is-idle button { pointer-events: none; }

.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 8px 8px 0;
  display: flex;
  align-items: flex-start;
  z-index: 50;
}
.model-title {
  position: absolute;
  left: 50%;
  top: 32px;
  transform: translateX(-50%);
  margin: 0;
  color: #fff;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: .2em;
  text-transform: uppercase;
  white-space: nowrap;
  text-align: center;
  user-select: none;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .8);
  display: none;
}

/* 底部工具栏 */
.bottom-toolbar {
  position: absolute;
  bottom: 56px;
  left: 50%;
  transform: translateX(-50%);
  height: 76px;
  padding: 0 16px;
  gap: 16px;
  border-top: 1px solid rgba(255, 255, 255, .03);
  border-radius: 16px;
  background: rgba(0, 0, 0, .3);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tool-btn {
  position: relative;
  width: 44px;
  height: 44px;
  flex: none;
  background: rgba(0, 0, 0, .5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 15px -3px #0000001a;
  cursor: pointer;
  transition: all .3s var(--ease-ui);
}
.tool-btn:hover { transform: scale(1.1); }
.tool-btn:active { transform: scale(.95); }
.tool-btn .icon { width: 24px; height: 24px; }
.tool-btn.tool-text-btn { font-size: 15px; font-weight: 800; letter-spacing: .04em; }
.only-mobile { display: none; }

/* Tooltip：content:attr(data-tooltip) */
.tooltip-btn::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 16px);
  left: 50%;
  transform: translate(-50%) translateY(4px);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: all .3s var(--ease-ui);
  z-index: 100;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .8);
}
@media (hover: hover) and (pointer: fine) {
  .tooltip-btn:hover::before { opacity: 1; transform: translate(-50%) translateY(0); }
}
.tooltip-btn.is-tooltip-shown::before,
.tooltip-btn:focus-visible::before { opacity: 1; transform: translate(-50%) translateY(0); }
.tooltip-btn:not([data-tooltip])::before, .tooltip-btn[data-tooltip=""]::before { content: none; }

/* 弹出菜单（浏览模式 / 高清流畅 / 速度） */
.pop-anchor { position: relative; display: flex; align-items: center; }
.pop-menu {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  padding-bottom: 32px;
}
.pop-menu[hidden] { display: none; }
/* 视角面板比其它菜单高，整体上移以避开巡览条（桌面 152px / 移动端 96px）。
   注意不能用 padding-bottom：那只会把元素撑高，底边仍贴着按钮顶部，
   透明 padding 区还会拦住巡览条的点击。 */
#fov-pop, #speed-pop { bottom: calc(100% + 92px); }

/* 视角（焦距）滑杆 */
.fov-inner {
  width: 176px;
  padding: 12px 14px 10px;
  gap: 10px;
  align-items: stretch;
}
.fov-readout {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 1px;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
#fov-value { font-size: 22px; font-weight: 800; line-height: 1; }
.fov-unit { font-size: 13px; opacity: .6; }
.range-input {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 18px;
  margin: 0;
  background: transparent;
  cursor: pointer;
  touch-action: none;
}
.range-input::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .25);
}
.range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  margin-top: -6px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .45);
}
.range-input::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .25);
}
.range-input::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .45);
}
.fov-scale {
  display: flex;
  justify-content: space-between;
  color: #ffffff8c;
  font-size: 11px;
  font-weight: 600;
  user-select: none;
}

/* 窄屏下按钮靠右，跟随锚点会让面板溢出右边界，改为相对视口居中 */
@media (max-width: 767px) {
  #fov-pop {
    position: fixed;
    left: 50%;
    bottom: calc(152px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
  }
}

.pop-menu-inner {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 6px;
  width: max-content;
  border-radius: 16px;
  background: rgba(0, 0, 0, .7);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, .15);
  box-shadow: 0 8px 32px rgba(0, 0, 0, .3);
}
.pop-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  /* 未选中项原本是 60% 白，看起来像禁用；提到 82% 保证可读 */
  color: rgba(255, 255, 255, .82);
  transition: all .3s var(--ease-ui);
}

/* 模式切换提示：切换瞬间在画面上方弹出，避免"点了没反应"的错觉 */
.mode-hint {
  position: fixed;
  left: 50%;
  top: 96px;
  transform: translateX(-50%) translateY(-8px);
  z-index: 10060;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(0, 0, 0, .55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .02em;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
.mode-hint.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.pop-item:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.pop-item.is-active { background: rgba(255, 255, 255, .13); color: #fff; }
.pop-check { width: 16px; height: 16px; flex: none; opacity: 0; }
.pop-item.is-active .pop-check { opacity: 1; }
.pop-item .mode-icon { width: 20px; height: 20px; }


/* 标注：dot-click-text */
.annotation-display-root { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 5; }
/* 拖动窗口期间 backing 与元素比例不一致，标注投影会错位，先隐藏避免视觉跳动 */
.annotation-display-root.is-resizing { visibility: hidden; }
.annotation-hit {
  position: absolute;
  width: 32px;
  height: 32px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* 线上实测为白底黑字圆点 */
.annotation-dot {
  position: relative;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2.5px solid #fff;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1e293b;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  user-select: none;
  transition: opacity .25s ease, filter .15s ease, transform .3s ease;
  box-shadow: 0 2px 8px #0006;
}
.annotation-hit:hover .annotation-dot { filter: drop-shadow(0 0 4px rgba(148, 163, 184, .8)); transform: scale(1.15); }
/* 当前选中的标注点：静态描边高亮，不做脉冲缩放 */
.annotation-dot.is-active {
  box-shadow: 0 0 0 4px rgba(255, 255, 255, .32), 0 2px 8px #0006;
}

.annotation-pop { position: absolute; z-index: 10; pointer-events: auto; max-width: min(340px, 76vw); }
.annotation-pop[hidden] { display: none; }
.annotation-pop-inner {
  position: relative;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 12px;
  background: rgba(0, 0, 0, .25);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  line-height: 1.25;
  /* 这里不能用 pre-wrap：它会把 HTML 模板里的换行与缩进也渲染成空白行，
     把单行气泡撑到 134px 高。气泡只需自动换行。 */
  white-space: normal;
  overflow-wrap: break-word;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .5);
  box-shadow: 0 8px 24px #0004;
}
/* 气泡只显示名称，不带序号徽标 */
#annotation-pop-text { display: block; }


/* 标注巡览切换器 */
.annotation-switcher {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 152px;
  z-index: 10050;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 12px;
  background: rgba(0, 0, 0, .3);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 4px 16px #0003;
  max-width: calc(100vw - 32px);
}
.as-btn { width: 30px; height: 30px; flex: none; border-radius: 8px; display: flex; align-items: center; justify-content: center; transition: background .2s ease, transform .3s var(--ease-ui); }
.as-btn:hover { background: rgba(255, 255, 255, .1); transform: scale(1.08); }
.as-btn .icon { width: 20px; height: 20px; }
.as-title { max-width: 42vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 600; user-select: none; }
/* 线上巡览条不显示「n / 总数」计数 */
.as-index { display: none; }

/* 弹窗 -------------------------------------------------------------- */
.dialog-overlay { position: fixed; inset: 0; z-index: 10150; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(15, 23, 42, .27); }
.dialog-overlay[hidden] { display: none; }
.help-panel {
  --help-bg: #18212bea;
  --help-text: #f1f5f9;
  --help-muted: #b1bdcc;
  --help-line: #ffffff24;
  --help-soft: #ffffff0d;
  --help-active: #ffffff18;
  width: 560px;
  max-width: 100%;
  max-height: min(680px, 100%);
  display: flex;
  flex-direction: column;
  color: var(--help-text);
  background: var(--help-bg);
  border: 1px solid var(--help-line);
  border-radius: 12px;
  box-shadow: 0 16px 56px #0003;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow: hidden;
  font-weight: 400;
  font-size: 13px;
  line-height: 1.65;
}
.help-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 12px; }
.help-header h2 { margin: 0; font-size: 16px; font-weight: 600; }
.help-close { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 6px; color: var(--help-muted); }
.help-close .icon { width: 20px; height: 20px; }
.help-close:hover, .help-tabs button:hover { background: var(--help-soft); }
.help-tabs { display: flex; gap: 4px; padding: 0 20px 12px; border-bottom: 1px solid var(--help-line); }
.help-tabs button { padding: 6px 12px; border-radius: 6px; white-space: nowrap; }
.help-tabs button[aria-pressed="true"] { background: var(--help-active); }
.help-content { padding: 20px; overflow-y: auto; min-height: 0; }
.help-content h3 { font-size: 13px; font-weight: 600; margin: 0 0 5px; }
.help-content p { margin: 0; }
.help-mode { display: flex; align-items: center; gap: 8px; }
.help-mode-icon { width: 16px; height: 16px; flex-shrink: 0; }
.help-controls { margin: 12px 0 0; padding-left: 18px; list-style: disc; display: grid; gap: 8px; }
.help-muted { color: var(--help-muted); font-weight: 400; }
.help-content .help-note { margin-top: 18px; padding: 10px 12px; border-radius: 6px; background: var(--help-soft); color: var(--help-muted); }
.help-shortcut { display: flex; gap: 14px; align-items: flex-start; }
.help-shortcut + .help-shortcut { margin-top: 20px; }
.help-shortcut kbd { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 32px; height: 32px; border: 1px solid var(--help-line); border-radius: 6px; background: var(--help-soft); font-family: inherit; font-size: 14px; }
.help-quick-shortcuts { display: grid; gap: 10px; margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--help-line); }
.help-quick-shortcuts > div { display: flex; align-items: baseline; gap: 10px; }
.help-quick-shortcuts dt, .help-quick-shortcuts dd { margin: 0; }
.help-quick-shortcuts kbd { display: inline-block; min-width: 24px; padding: 0 4px; text-align: center; border: 1px solid var(--help-line); border-radius: 4px; font: inherit; }
.help-credits { margin-top: 18px !important; padding-top: 12px; border-top: 1px solid var(--help-line); color: var(--help-muted); font-size: 11px; }
.help-panel button:focus-visible { outline: 2px solid #60a5fa; outline-offset: 2px; }


/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 168px;
  transform: translate(-50%, 8px);
  z-index: 10200;
  padding: 10px 18px;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 999px;
  background: rgba(15, 20, 25, .92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* 响应式 ------------------------------------------------------------ */
@media screen and (min-width: 1024px) {
  .top-bar { padding: 8px 20px 0; }
  .model-title { display: block; top: 48px; }
  .tool-btn { width: 52px; height: 52px; }
  .tool-btn .icon { width: 30px; height: 30px; }
  .pop-item { font-size: 15px; }
}

@media screen and (max-width: 767px) {
  .loading-container { width: min(84vw, 320px); padding: 24px 16px; }
  .progress-value { font-size: 52px; }
  .loading-main-text { font-size: 13px; }

  .bottom-toolbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    transform: none;
    width: 100%;
    height: auto;
    min-height: 84px;
    /* 8 个按钮在 390px 下需压到 6px 间距才不会换行 */
    padding: 12px 6px calc(12px + min(34px, env(safe-area-inset-bottom, 0px)));
    gap: 6px;
    border-radius: 0;
    flex-wrap: wrap;
  }
  .tool-btn { width: 40px; height: 40px; }
  .tool-btn.tool-text-btn { padding: 0 2px; }
  .tool-btn .icon { width: 22px; height: 22px; }
  .only-mobile { display: flex; }
  /* 窄屏工具栏已有 8 个按钮，飞行速度面板只在桌面显示，避免换行 */
  .only-desktop { display: none; }
  .tooltip-btn::before { font-size: 12px; padding: 6px 10px; }
  .annotation-switcher { bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
  .toast { bottom: 120px; }
  .help-overlay, .dialog-overlay { padding: 12px; }
  .help-header { padding: 12px 16px 8px; }
  .help-tabs { padding: 0 16px 10px; }
  .help-tabs button { padding: 6px 10px; }
  .help-content { padding: 16px; }
}

/* 矮窗口 / 分屏 */
@media screen and (max-height: 520px) {
  .bottom-toolbar { bottom: 12px; height: 56px; }
  .annotation-switcher { bottom: 84px; }
  }

@media (prefers-reduced-motion: reduce) {
  .loading-overlay, .loading-content, .progress-fill::after, .annotation-dot.is-active { animation: none; }
  .progress-fill { transition-duration: .01ms; }
  .fade-ui, .tool-btn, .annotation-dot { transition-duration: .01ms; }
}
@media (hover: none) {
  /* 触摸设备没有 hover，避免 tooltip 文字误显示 */
  .tooltip-btn::before { display: none; }
}


