/* 身心健康AI动态监测 · 仅镜面（无底座）
 * 实物：高 1500mm × 宽 600mm → 宽:高 = 2:5
 *
 * 两侧自适应（object-fit: contain 思路）：
 *   glass-w = min(可用宽, 可用高 × 600/1500)
 *   glass-h = min(可用高, 可用宽 × 1500/600)
 * 宽屏 → 左右留边；竖长屏 → 上下留边；比例始终锁 2:5。
 *
 * 本地预览：可读宽度优先；真机加 ?full=1 → body.kiosk-full。
 */

* { box-sizing: border-box; }
html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #111418;
  color: #f4f7fb;
  font-family: "Microsoft YaHei", "微软雅黑", "PingFang SC", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  pointer-events: none !important;
}

.hidden { display: none !important; }

.kiosk {
  width: 100%;
  width: 100vw;
  height: 100%;
  height: 100dvh;
  max-height: 100svh;
  display: grid;
  place-items: center;
  padding:
    max(1.2vh, env(safe-area-inset-top, 0px))
    max(2vw, env(safe-area-inset-right, 0px))
    max(1.2vh, env(safe-area-inset-bottom, 0px))
    max(2vw, env(safe-area-inset-left, 0px));
  background: #111418;
}

.kiosk-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
}

/*
 * 手机 / iPad / 电脑自动 contain：始终锁 600:1500，随视口伸缩，不裁切溢出。
 * 仍可用四角拖拉手动改尺寸（.is-manual）。
 */
.mirror-frame {
  position: relative;
  --avail-w: min(94vw, calc(100% - 4px));
  --avail-h: min(94dvh, 94svh, calc(100% - 4px));
  --glass-w: min(var(--avail-w), calc(var(--avail-h) * 600 / 1500));
  --glass-h: min(var(--avail-h), calc(var(--glass-w) * 1500 / 600));
  width: var(--glass-w);
  height: var(--glass-h);
  max-width: 100%;
  max-height: 100%;
  flex: 0 0 auto;
  border-radius: clamp(10px, 1.6vw, 18px);
  padding: clamp(4px, 0.8vw, 8px);
  background: linear-gradient(160deg, #4a5568 0%, #1e2633 45%, #0f141c 100%);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 rgba(0, 0, 0, 0.4);
}
.mirror-frame.is-manual {
  max-width: min(98vw, 100%);
  max-height: min(96dvh, 96svh, 100%);
}

/* 预览自由变形：四边 + 四角 */
.mirror-resize-box {
  position: absolute;
  inset: 0;
  z-index: 40;
  pointer-events: none;
}
.mirror-resize-box .rz {
  position: absolute;
  pointer-events: auto;
  touch-action: none;
  user-select: none;
  background: transparent;
}
/* 边 */
.rz-n, .rz-s { left: 14px; right: 14px; height: 10px; cursor: ns-resize; }
.rz-e, .rz-w { top: 14px; bottom: 14px; width: 10px; cursor: ew-resize; }
.rz-n { top: -2px; }
.rz-s { bottom: -2px; }
.rz-e { right: -2px; }
.rz-w { left: -2px; }
/* 角 */
.rz-ne, .rz-nw, .rz-se, .rz-sw {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.28);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
}
.rz-ne { top: -3px; right: -3px; cursor: nesw-resize; }
.rz-nw { top: -3px; left: -3px; cursor: nwse-resize; }
.rz-se { bottom: -3px; right: -3px; cursor: nwse-resize; }
.rz-sw { bottom: -3px; left: -3px; cursor: nesw-resize; }
.rz-ne:hover, .rz-nw:hover, .rz-se:hover, .rz-sw:hover,
.rz-n:hover, .rz-s:hover, .rz-e:hover, .rz-w:hover {
  background: rgba(11, 122, 94, 0.55);
}
/* 真机 / 全屏：整屏 contain，宽屏左右留边、窄屏上下留边 */
body.kiosk-full .kiosk {
  padding: 0;
  /* 安全区（刘海屏等） */
  padding:
    env(safe-area-inset-top, 0)
    env(safe-area-inset-right, 0)
    env(safe-area-inset-bottom, 0)
    env(safe-area-inset-left, 0);
}
body.kiosk-full .mirror-frame {
  --avail-w: 100%;
  --avail-h: 100%;
  /* 相对 .kiosk 内容盒；100dvh/100vw 在有 safe-area padding 时仍可用 */
  --glass-w: min(100vw, calc(100dvh * 600 / 1500));
  --glass-h: min(100dvh, calc(var(--glass-w) * 1500 / 600));
  width: var(--glass-w);
  height: var(--glass-h);
  max-width: 100%;
  max-height: 100%;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}
body.kiosk-full .mirror-frame.is-manual {
  /* 真机全屏仍走自动 contain，忽略预览拖拽尺寸 */
  width: var(--glass-w) !important;
  height: var(--glass-h) !important;
}
body.kiosk-full .mirror-resize-box,
body.kiosk-full #btn-mirror-reset {
  display: none !important;
}

.stage {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #1a222c;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

#cam {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
  background: #1a222c;
}

/* MediaPipe 网格：与摄像头同镜像，实时轮廓碾压 YuNet 五点 */
#face-mesh,
.face-mesh {
  position: absolute;
  inset: 0;
  z-index: 14;
  width: 100%;
  height: 100%;
  pointer-events: none;
  transform: scaleX(-1);
}
.face-mesh.hidden {
  display: none !important;
}
/* 点颜色由距离逻辑控制，暂停时不再整层灰度滤镜（避免蓝/灰乱跳） */

#cam.cam-off {
  visibility: hidden;
  opacity: 0;
}

#work {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.12) 0%, transparent 32%, transparent 70%, rgba(255, 255, 255, 0.04) 100%);
}

/* TODO(硬件开关): 镜内圆形悬浮测试菜单；上线前整块删除 */
.test-fab-wrap {
  position: absolute;
  top: max(14px, env(safe-area-inset-top, 0px));
  right: max(12px, env(safe-area-inset-right, 0px));
  z-index: 55;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: auto;
}
.test-fab-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.58);
  color: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.18),
    0 8px 22px rgba(0, 0, 0, 0.32);
  cursor: pointer;
  font: inherit;
}
.test-fab-btn:active { transform: scale(0.94); }
.test-fab-btn.is-open {
  background: rgba(15, 23, 42, 0.82);
}
.test-fab-icon {
  width: 22px;
  height: 22px;
  display: block;
}
.test-fab-label { display: none !important; }
.test-menu {
  min-width: 112px;
  padding: 6px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.92);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 10px 28px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.test-menu.hidden { display: none !important; }
.test-menu-item {
  border: 0;
  border-radius: 8px;
  padding: 10px 12px;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.test-menu-item:active,
.test-menu-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* 顶部日期时间：轻量，不抢距离提示与数值 */
.mirror-clock {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  z-index: 18;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 12px 12px 10px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.42) 0%, rgba(0, 0, 0, 0.08) 70%, transparent 100%);
}
.mirror-clock-date {
  font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
  font-size: clamp(0.68rem, 2.4vw, 0.8rem);
  font-weight: 500;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.58);
  line-height: 1.2;
}
.mirror-clock-time {
  font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
  font-size: clamp(1.15rem, 4.4vw, 1.55rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: transparent;
  background: linear-gradient(180deg, #e2e8f0 0%, #94a3b8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  filter: drop-shadow(0 1px 8px rgba(0, 0, 0, 0.35));
}

/* 待机品牌：镜面中心 */
.mirror-brand {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  z-index: 12;
  width: min(86%, 300px);
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.16s ease, transform 0.16s ease;
}
.stage.waiting .mirror-brand {
  opacity: 1;
  animation: brand-breathe 5.5s ease-in-out infinite;
}
/* 入镜立刻收起；进入流程后也保持隐藏 */
.stage.waiting.has-face .mirror-brand,
.stage.entering .mirror-brand,
.stage.scanning .mirror-brand,
.stage.presenting .mirror-brand {
  opacity: 0 !important;
  animation: none;
  transform: translate(-50%, -48%);
  pointer-events: none;
}
.mirror-brand-logo {
  display: block;
  margin: 0 auto;
  width: min(36%, 110px);
  height: auto;
  max-height: 14vh;
  object-fit: contain;
  filter: drop-shadow(0 2px 18px rgba(0, 0, 0, 0.4));
  pointer-events: none;
  user-select: none;
}
.mirror-brand-tag {
  margin: 0.7rem 0 0;
  font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
  font-size: clamp(0.72rem, 2.6vw, 0.88rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-indent: 0.12em;
  color: transparent;
  background: linear-gradient(
    105deg,
    #22c55e 0%,
    #14b8a6 35%,
    #3b82f6 70%,
    #22c55e 100%
  );
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 1px 8px rgba(0, 0, 0, 0.28));
  animation: tag-shine 4.8s linear infinite;
}
@keyframes tag-shine {
  0% { background-position: 0% 50%; }
  100% { background-position: 220% 50%; }
}
@keyframes brand-breathe {
  0%, 100% { opacity: 0.88; }
  50% { opacity: 1; }
}

/* 阶段轨：对准 → 采集 → 呈现 */
.stage-rail {
  position: absolute;
  left: 50%;
  top: 5.9rem;
  transform: translateX(-50%);
  z-index: 17;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.32rem 0.75rem;
  border-radius: 999px;
  background: rgba(8, 12, 18, 0.42);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.1),
    0 0 24px rgba(20, 184, 166, 0.08);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.stage.entering .stage-rail,
.stage.scanning .stage-rail,
.stage.presenting .stage-rail {
  opacity: 1;
}
.stage-rail span {
  font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
  font-size: clamp(0.62rem, 2.2vw, 0.74rem);
  font-weight: 700;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.34);
  transition: color 0.25s ease, text-shadow 0.25s ease;
}
.stage-rail span.is-done {
  color: #2dd4bf;
  text-shadow: 0 0 12px rgba(45, 212, 191, 0.35);
}
.stage-rail span.is-active {
  color: transparent;
  background: linear-gradient(90deg, #22c55e, #3b82f6);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.35));
}
.stage-rail-sep {
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.35), rgba(59, 130, 246, 0.45));
  opacity: 0.55;
}
.stage.waiting .distance-tip { top: 4.6rem; }
.stage.entering .distance-tip { opacity: 0.35; top: 7.4rem; }

/* 开检前自报 */
.self-report {
  position: absolute;
  left: 50%;
  top: 48%;
  transform: translate(-50%, -50%);
  z-index: 22;
  width: min(88%, 300px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  padding: 1rem 0.85rem 0.9rem;
  border-radius: 18px;
  background: rgba(10, 14, 20, 0.55);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
  pointer-events: auto;
  animation: report-in 0.4s ease;
}
.self-report.hidden { display: none !important; }
@keyframes report-in {
  from { opacity: 0; transform: translate(-50%, -46%); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}
.self-report-kicker {
  margin: 0;
  font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: transparent;
  background: linear-gradient(90deg, #22c55e, #3b82f6);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.self-report-title {
  margin: 0;
  font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #fff;
}
.self-report-opts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
  margin-top: 0.45rem;
  pointer-events: auto;
  user-select: none;
}
.self-report-opts [data-mood] {
  height: 42px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.92);
  font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.35s ease, transform 0.35s ease, background 0.25s ease;
}
.self-report-opts [data-mood]:active {
  transform: scale(0.97);
  background: rgba(255, 255, 255, 0.14);
}
.self-report-opts [data-mood].is-picked {
  animation: mood-pick 0.75s ease forwards;
  background: rgba(94, 234, 212, 0.28);
  box-shadow: 0 0 0 1px rgba(94, 234, 212, 0.55);
  color: #fff;
}
.self-report.is-resolving .self-report-opts [data-mood]:not(.is-picked) {
  opacity: 0;
  transform: scale(0.92);
}
.self-report.is-resolving .self-report-skip {
  opacity: 0;
}
@keyframes mood-pick {
  0% { transform: scale(1); opacity: 1; filter: brightness(1); }
  35% { transform: scale(1.1); opacity: 1; filter: brightness(1.15); }
  100% { transform: scale(0.55); opacity: 0; filter: brightness(1.3); }
}
.self-report-skip {
  margin: 0.35rem 0 0;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.45);
  font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  padding: 0.35rem 0.5rem;
  cursor: pointer;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  transition: opacity 0.3s ease;
}

.countdown-ring.is-paused {
  opacity: 0.55;
  filter: grayscale(0.35);
}
.countdown-ring.is-paused #countdown-num {
  color: rgba(255, 255, 255, 0.7);
}
.countdown-ring {
  position: absolute;
  left: 50%;
  top: 16%;
  transform: translateX(-50%);
  z-index: 20;
  width: 78px;
  height: 78px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(8, 12, 18, 0.5);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12),
    0 0 28px rgba(20, 184, 166, 0.18);
}
.countdown-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.countdown-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 5;
}
.countdown-arc {
  fill: none;
  stroke: url(#countdown-grad);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 238.76;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.85s linear;
}
.countdown-ring #countdown-num {
  position: relative;
  z-index: 1;
  font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: #fff;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.4);
}

/* 采集期氛围光 */
.scan-aura {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 18%, rgba(34, 197, 94, 0.14) 0%, transparent 42%),
    radial-gradient(ellipse at 50% 100%, rgba(59, 130, 246, 0.12) 0%, transparent 48%);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.stage.scanning .scan-aura:not(.hidden) {
  opacity: 1;
  animation: aura-pulse 2.8s ease-in-out infinite;
}
.scan-aura.hidden { display: none !important; }
@keyframes aura-pulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

/* 采集期：全镜轻量扫描线（未锁脸时可见；锁脸后减弱） */
.scan-raster {
  position: absolute;
  left: 10%;
  right: 10%;
  top: 18%;
  bottom: 28%;
  z-index: 5;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.stage.scanning .scan-raster:not(.hidden) {
  opacity: 0.72;
}
.stage.scanning.has-face .scan-raster:not(.hidden) {
  opacity: 0.22;
}
.scan-raster.hidden { display: none !important; }
.scan-raster-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(94, 234, 212, 0.15) 18%,
    rgba(167, 243, 208, 0.7) 50%,
    rgba(147, 197, 253, 0.35) 78%,
    transparent 100%
  );
  box-shadow:
    0 0 10px rgba(45, 212, 191, 0.35),
    0 0 28px rgba(59, 130, 246, 0.12);
  animation: scan-raster-sweep 2.6s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}
.stage.is-scan-paused .scan-raster-line,
.stage.is-scan-paused .face-scan-beam {
  animation-play-state: paused;
  opacity: 0.28;
  filter: grayscale(0.4);
}
@keyframes scan-raster-sweep {
  0% { top: 4%; opacity: 0.2; }
  12% { opacity: 0.9; }
  88% { opacity: 0.85; }
  100% { top: 94%; opacity: 0.15; }
}

/* 扫描期：轻量人脸框（相对镜面，已镜像） */
.face-guide {
  position: absolute;
  z-index: 16;
  overflow: hidden;
  border: 2px solid rgba(94, 234, 212, 0.78);
  border-radius: 14px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25), inset 0 0 24px rgba(45, 212, 191, 0.08);
  pointer-events: none;
  transition: left 0.12s ease, top 0.12s ease, width 0.12s ease, height 0.12s ease, opacity 0.2s ease;
}
.face-guide.is-warn {
  border-color: rgba(251, 191, 36, 0.85);
}
.face-guide.hidden { display: none !important; }
.face-scan-beam {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 10%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.35) 22%,
    rgba(167, 243, 208, 0.95) 50%,
    rgba(147, 197, 253, 0.45) 78%,
    transparent 100%
  );
  box-shadow:
    0 0 8px rgba(94, 234, 212, 0.55),
    0 0 18px rgba(45, 212, 191, 0.25);
  animation: face-scan-sweep 1.85s cubic-bezier(0.4, 0.05, 0.6, 0.95) infinite;
}
.face-guide.is-warn .face-scan-beam {
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(253, 230, 138, 0.45) 25%,
    rgba(251, 191, 36, 0.9) 50%,
    rgba(253, 230, 138, 0.4) 75%,
    transparent 100%
  );
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.4);
}
@keyframes face-scan-sweep {
  0% { top: 8%; opacity: 0.25; }
  14% { opacity: 1; }
  86% { opacity: 0.95; }
  100% { top: 88%; opacity: 0.2; }
}
@media (prefers-reduced-motion: reduce) {
  .scan-raster-line,
  .face-scan-beam,
  .stage.scanning .scan-aura:not(.hidden) {
    animation: none !important;
  }
  .face-scan-beam { top: 46%; opacity: 0.55; }
  .scan-raster-line { top: 48%; opacity: 0.4; }
}

/* 扫描期：稳定度条 + 实时提示 */
.scan-live {
  position: absolute;
  left: 50%;
  top: calc(16% + 92px);
  transform: translateX(-50%);
  z-index: 19;
  width: min(78%, 280px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.scan-live.hidden { display: none !important; }
.stability-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(8, 12, 18, 0.52);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.stability-label {
  flex: 0 0 auto;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.78);
}
.stability-track {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
}
.stability-track i {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #fbbf24, #34d399);
  transition: width 0.18s ease, background 0.2s ease;
}
.stability-track.is-low i {
  background: linear-gradient(90deg, #f87171, #fbbf24);
}
.scan-hint {
  margin: 0;
  padding: 0.4rem 0.7rem;
  border-radius: 12px;
  text-align: center;
  font-size: clamp(0.72rem, 2.6vw, 0.88rem);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.94);
  background: rgba(8, 12, 18, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
  line-height: 1.3;
}
.reject-banner {
  margin: 0 auto 4px;
  max-width: calc(100% - 12px);
  padding: 0.65rem 0.9rem;
  border-radius: 12px;
  text-align: center;
  font-size: clamp(0.82rem, 3vw, 1rem);
  font-weight: 700;
  line-height: 1.35;
  color: #fff7ed;
  background: rgba(120, 53, 15, 0.78);
  box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.45);
}
.reject-banner.hidden { display: none !important; }

.attire-bar .demo-tag {
  display: inline-block;
  margin-left: 0.35rem;
  font-size: 0.78em;
  font-weight: 600;
  opacity: 0.78;
  letter-spacing: 0.04em;
}

/* 授权临期/停用提示（镜面顶栏） */
.entitlement-banner {
  position: absolute;
  top: 0.85rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  max-width: 86%;
  margin: 0;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: clamp(0.72rem, 2.1vw, 0.9rem);
  line-height: 1.35;
  text-align: center;
  color: #7c2d12;
  background: rgba(254, 243, 199, 0.92);
  border: 1px solid rgba(217, 119, 6, 0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  pointer-events: none;
}
.entitlement-banner.hidden { display: none !important; }
.entitlement-banner.is-block {
  color: #7f1d1d;
  background: rgba(254, 226, 226, 0.94);
  border-color: rgba(185, 28, 28, 0.35);
}

/* 距离提示：仅偏远/偏近时显示，合适时隐藏（防闪） */
.distance-tip {
  position: absolute;
  left: 50%;
  top: 4.6rem;
  transform: translateX(-50%);
  z-index: 18;
  margin: 0;
  max-width: calc(100% - 28px);
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: rgba(8, 12, 18, 0.52);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(0.72rem, 2.8vw, 0.9rem);
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.25;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}
.distance-tip.hidden { display: none !important; }
.distance-tip strong {
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.01em;
}
.stage.scanning .distance-tip {
  top: calc(16% + 92px);
}
.stage.presenting .distance-tip {
  display: none !important;
}
.distance-tip.is-warn {
  background: rgba(120, 53, 15, 0.62);
  box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.45);
}
.distance-tip.is-ok {
  background: rgba(6, 78, 59, 0.5);
  box-shadow: 0 0 0 1px rgba(94, 234, 212, 0.35);
}

.result-dock {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  padding: 0 10px 16px;
  pointer-events: none;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.22) 72%, transparent 100%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.stage.presenting .result-dock {
  opacity: 1;
  transform: translateY(0);
}
.stage.waiting .result-dock,
.stage.entering .result-dock,
.stage.scanning .result-dock {
  opacity: 0;
  pointer-events: none;
}

.result-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}
.result-hero.hidden { display: none !important; }
.result-conclusion {
  display: none !important; /* 结论只走语音，不占屏 */
}
.primary-gauge {
  display: none; /* 四项并排后不再使用主指标大环 */
  justify-content: center;
  width: 100%;
}
.primary-gauge .gauge-orb {
  gap: 6px;
}
.primary-gauge .gauge-orb-disc {
  width: clamp(108px, 34%, 132px);
}
.primary-gauge .home-hv-gauge-num {
  font-size: clamp(1.85rem, 7vw, 2.35rem);
}
.primary-gauge .home-hv-gauge-label {
  font-size: clamp(0.82rem, 3vw, 0.98rem);
}
.trend-strip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: min(92%, 280px);
  margin: 2px auto 0;
}
.trend-strip.hidden { display: none !important; }
.trend-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0.35rem 0.75rem;
}
.compare-line {
  margin: 0;
  min-height: 1.1em;
  font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
  font-size: clamp(0.68rem, 2.4vw, 0.8rem);
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.58);
  text-align: center;
}
.compare-line.is-up { color: rgba(251, 191, 36, 0.9); }
.compare-line.is-down { color: rgba(94, 234, 212, 0.9); }
.compare-line.is-flat { color: rgba(255, 255, 255, 0.55); }
.today-count {
  font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
  font-size: clamp(0.6rem, 2.1vw, 0.7rem);
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.4);
}
.trend-bars {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
  height: 28px;
  width: 100%;
}
.trend-bars i {
  display: block;
  width: 7px;
  min-height: 3px;
  border-radius: 3px 3px 1px 1px;
  background: rgba(255, 255, 255, 0.22);
  transform-origin: bottom center;
  transform: scaleY(0.2);
  opacity: 0;
}
.stage.presenting .result-dock.is-reveal .trend-bars i {
  animation: trend-bar-in 0.45s ease forwards;
}
.stage.presenting .result-dock.is-reveal .trend-bars i.is-current {
  background: rgba(94, 234, 212, 0.85);
}
.stage.presenting .result-dock.is-reveal .trend-bars i.is-prev {
  background: rgba(255, 255, 255, 0.38);
}
@keyframes trend-bar-in {
  from { opacity: 0; transform: scaleY(0.15); }
  to { opacity: 1; transform: scaleY(1); }
}

/* 呈现入场：四项同等并排 */
.stage.presenting .result-dock.is-reveal .gauge-orbs .gauge-orb {
  animation: orb-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.stage.presenting .result-dock.is-reveal .gauge-orbs .gauge-orb:nth-child(1) { animation-delay: 0.06s; }
.stage.presenting .result-dock.is-reveal .gauge-orbs .gauge-orb:nth-child(2) { animation-delay: 0.12s; }
.stage.presenting .result-dock.is-reveal .gauge-orbs .gauge-orb:nth-child(3) { animation-delay: 0.18s; }
.stage.presenting .result-dock.is-reveal .gauge-orbs .gauge-orb:nth-child(4) { animation-delay: 0.24s; }
.stage.presenting .result-dock.is-reveal .trend-strip {
  animation: trend-fade 0.5s ease 0.18s both;
}
@keyframes orb-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes trend-fade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.env-line-vis {
  display: none !important; /* 环境摘要只走语音/后台，不占屏 */
}

/* 参考有效性：质量 / 稳定 / 误差（可解释，非黑箱 100%） */
.validity-bar {
  margin: 2px auto 0;
  max-width: 96%;
  padding: 0.38rem 0.7rem;
  border-radius: 999px;
  text-align: center;
  font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
  font-size: clamp(0.68rem, 2.4vw, 0.8rem);
  font-weight: 700;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(15, 23, 42, 0.55);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14);
  pointer-events: none;
}
.validity-bar.hidden { display: none !important; }
.validity-bar.is-ok {
  background: rgba(6, 78, 59, 0.55);
  box-shadow: 0 0 0 1px rgba(94, 234, 212, 0.4);
}
.validity-bar.is-bad {
  background: rgba(127, 29, 29, 0.55);
  box-shadow: 0 0 0 1px rgba(252, 165, 165, 0.45);
}
.report-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
  pointer-events: auto;
}
.report-actions.hidden { display: none !important; }
.report-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0.35rem 1rem;
  border: 0;
  border-radius: 999px;
  text-decoration: none;
  font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
  font-size: clamp(0.72rem, 2.5vw, 0.84rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.report-btn-ghost {
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.22);
}
.report-btn:active { transform: scale(0.98); }
.share-card {
  text-align: center;
  max-width: min(92vw, 360px);
}
.share-qr {
  display: block;
  width: min(58vw, 220px);
  height: auto;
  margin: 12px auto 8px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08);
}
.share-url {
  margin: 0 0 8px;
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.55);
  word-break: break-all;
  line-height: 1.35;
}

/* 结果区：能力备注 / 建议 / 追问芯片（驱动大模型续聊） */
.note-row,
.tip-row,
.hint-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  max-width: 100%;
  pointer-events: auto;
}
.note-row:empty,
.tip-row:empty,
.hint-row:empty {
  display: none;
}
.note-chip,
.tip-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0.28rem 0.62rem;
  border-radius: 999px;
  font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
  font-size: clamp(0.68rem, 2.4vw, 0.78rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.25;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
  pointer-events: none;
}
.note-chip {
  color: rgba(167, 243, 208, 0.95);
  background: rgba(6, 78, 59, 0.42);
  box-shadow: 0 0 0 1px rgba(94, 234, 212, 0.28);
}
.hint-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0.3rem 0.68rem;
  border: 0;
  border-radius: 999px;
  font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
  font-size: clamp(0.68rem, 2.4vw, 0.78rem);
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.25;
  color: rgba(226, 232, 240, 0.78);
  background: rgba(15, 23, 42, 0.38);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s ease, color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.hint-chip:hover {
  color: rgba(241, 245, 249, 0.92);
  background: rgba(15, 23, 42, 0.52);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.22);
}
.hint-chip:active {
  transform: scale(0.97);
  color: rgba(241, 245, 249, 0.95);
  background: rgba(15, 23, 42, 0.62);
}
.chat-status {
  margin: 2px auto 0;
  max-width: 92%;
  text-align: center;
  font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
  font-size: clamp(0.68rem, 2.3vw, 0.78rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(253, 230, 138, 0.95);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}
.chat-status.hidden { display: none !important; }
.stage.presenting .result-dock.is-reveal .note-row,
.stage.presenting .result-dock.is-reveal .tip-row,
.stage.presenting .result-dock.is-reveal .hint-row {
  animation: trend-fade 0.45s ease 0.28s both;
}

/* 着装核查：与四项圆环分轨，置于圆环上方 */
.attire-bar {
  margin: 0 auto 2px;
  max-width: calc(100% - 12px);
  padding: 0.5rem 0.85rem;
  border-radius: 12px;
  font-size: clamp(0.78rem, 2.9vw, 0.95rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.3;
  text-align: center;
  color: #fff;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.22);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}
.attire-bar.is-pass {
  background: rgba(6, 95, 70, 0.78);
  box-shadow: 0 0 0 1px rgba(94, 234, 212, 0.55);
}
.attire-bar.is-fail {
  background: rgba(146, 64, 14, 0.82);
  box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.55);
}
.attire-bar.is-skip {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 600;
}

.gauge-orbs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  align-items: end;
}
.gauge-orbs.is-secondary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  opacity: 0.88;
}
.gauge-orbs.is-secondary .gauge-orb-disc {
  width: clamp(58px, 16%, 72px);
}
.gauge-orbs.is-secondary .home-hv-gauge-num {
  font-size: clamp(0.95rem, 3.4vw, 1.15rem);
}
.gauge-orbs.is-secondary .home-hv-gauge-label {
  font-size: clamp(0.58rem, 2vw, 0.7rem);
}
.gauge-orbs.is-secondary .gauge-orb-caption {
  font-size: clamp(0.52rem, 1.85vw, 0.64rem);
  color: rgba(255, 255, 255, 0.5);
}
.gauge-orbs.is-secondary .home-hv-gauge-band {
  font-size: clamp(0.52rem, 1.85vw, 0.64rem);
}
.gauge-orbs.hidden { display: none !important; }

.gauge-orb {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.gauge-orb-disc {
  position: relative;
  width: clamp(72px, 20%, 96px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}
.gauge-orb-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.home-hv-gauge-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.16);
  stroke-width: 6;
}
.home-hv-gauge-val {
  fill: none;
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dasharray 0.85s cubic-bezier(0.22, 1, 0.36, 1), stroke 0.3s ease;
}
.home-hv-gauge--good .home-hv-gauge-val { stroke: #2dd4bf; }
.primary-gauge .home-hv-gauge--good .home-hv-gauge-val { stroke: #38bdf8; }
.primary-gauge .gauge-orb-disc::after {
  content: "";
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, rgba(34, 197, 94, 0.16), transparent 62%);
  pointer-events: none;
  z-index: 0;
}
.home-hv-gauge--mid .home-hv-gauge-val { stroke: #fbbf24; }
.home-hv-gauge--low .home-hv-gauge-val { stroke: #f87171; }
.home-hv-gauge--muted .home-hv-gauge-val { stroke: rgba(255, 255, 255, 0.32); }

.gauge-orb-core { position: relative; z-index: 1; text-align: center; }
.home-hv-gauge-num {
  font-size: clamp(1.25rem, 4.6vw, 1.7rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  color: #fff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55);
  line-height: 1;
}
.home-hv-gauge-label {
  font-size: clamp(0.68rem, 2.4vw, 0.82rem);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.gauge-orb-caption {
  font-size: clamp(0.58rem, 2vw, 0.7rem);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.01em;
  line-height: 1.15;
  text-align: center;
  white-space: nowrap;
}
.home-hv-gauge-band {
  font-size: clamp(0.58rem, 2vw, 0.7rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.1;
  text-align: center;
}
.home-hv-intl-std-band {
  display: none !important;
}
.gauge-orb.is-waiting .home-hv-gauge-num {
  opacity: 0.4;
}
.gauge-orb.is-waiting .home-hv-gauge-val {
  opacity: 0.15;
}
.home-hv-gauge--empty .home-hv-gauge-val {
  stroke: rgba(255, 255, 255, 0.12);
}

/* 镜面内确认弹层：标题 + 说明 + 主/次按钮，相对镜面居中 */
.confirm-modal {
  position: absolute;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 18px;
  border-radius: inherit;
  box-sizing: border-box;
}
.confirm-modal.hidden {
  display: none !important;
}
.confirm-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  margin: 0;
  padding: 0;
  border-radius: inherit;
  background: rgba(6, 10, 16, 0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: pointer;
}
.confirm-modal-card {
  position: relative;
  z-index: 1;
  width: min(260px, 100%);
  box-sizing: border-box;
  display: grid;
  justify-items: stretch;
  gap: 10px;
  padding: 1.15rem 1rem 1rem;
  border-radius: 16px;
  background: #161d28;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.1),
    0 18px 40px rgba(0, 0, 0, 0.45);
  text-align: center;
}
.confirm-modal-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  line-height: 1.3;
}
.confirm-modal-desc {
  margin: 0 0 4px;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.55);
}
.confirm-modal-actions {
  display: grid;
  gap: 8px;
}
.confirm-btn {
  height: 44px;
  border: 0;
  border-radius: 12px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.02em;
}
.confirm-btn:active { transform: scale(0.98); }
.confirm-btn-primary {
  background: #fff;
  color: #0c1524;
}
.confirm-btn-ghost {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

/* 已关闭态：铺满镜面、内容居中 */
.exit-overlay {
  position: absolute;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  margin: 0;
  border-radius: inherit;
  background: #0c1118;
}
.exit-overlay.hidden { display: none !important; }
.exit-screen {
  width: min(240px, 86%);
  box-sizing: border-box;
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 0.55rem;
  color: rgba(255, 255, 255, 0.92);
  padding: 0;
  margin: 0;
}
.exit-screen h1 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.exit-screen p {
  margin: 0;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.52);
  line-height: 1.5;
}
.btn-reopen {
  margin-top: 0.55rem;
  height: 44px;
  min-width: 148px;
  padding: 0 1.25rem;
  border: 0;
  border-radius: 12px;
  background: #fff;
  color: #0c1524;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}
.btn-reopen:active { transform: scale(0.98); }

@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.85; }
}
