/* =========================================================
   相城应急 · 冬季安全隐患大排查 H5 样式表
   主色：应急蓝 (#0B4FA2 / #1366D6) + 警示橙 (#FF6B1A) + 安全绿 (#10B981)
   ========================================================= */

:root {
  --blue-deep: #072A5E;
  --blue-main: #0E4FA8;
  --blue-bright: #1D75E8;
  --blue-soft: #EBF4FF;
  --orange-alert: #FF6B1A;
  --orange-glow: #FF9248;
  --red-danger: #E53935;
  --green-safe: #10B981;
  --gold: #F59E0B;
  --text-dark: #10243E;
  --text-mid: #4A607A;
  --text-light: #8195AD;
  --bg-surface: #F4F8FC;
  --white: #FFFFFF;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-card: 0 10px 28px rgba(7, 42, 94, 0.12);
}

*, *::before, *::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-dark);
  background: #061C3D;
  -webkit-font-smoothing: antialiased;
}

.hidden {
  display: none !important;
}

/* 桌面端外围氛围背景 */
.desktop-bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(29, 117, 232, 0.35), transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255, 107, 26, 0.2), transparent 50%),
    linear-gradient(135deg, #04152E 0%, #092B5C 100%);
  z-index: 0;
}

/* 移动端容器（桌面居中展示为手机画幅） */
.phone-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 430px;
  height: 100%;
  max-height: 900px;
  margin: 0 auto;
  background: var(--bg-surface);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

@media (min-width: 480px) {
  body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
  }
  .phone-shell {
    height: min(860px, calc(100vh - 32px));
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.18);
  }
}

/* ================= 顶部全局导航条 ================= */
.top-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(12px, env(safe-area-inset-top)) 14px 10px;
  pointer-events: none;
}

.brand-pill {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(7, 42, 94, 0.72);
  backdrop-filter: blur(8px);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.4px;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #FF7D33;
  box-shadow: 0 0 8px #FF7D33;
  animation: blinkDot 2s infinite;
}

@keyframes blinkDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.85); }
}

.top-actions {
  pointer-events: auto;
  display: flex;
  gap: 8px;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(7, 42, 94, 0.72);
  backdrop-filter: blur(8px);
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.icon-btn:active {
  transform: scale(0.92);
}

/* ================= 通用视图切换 ================= */
.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s;
}

.screen.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ================= 视图 1：开屏封面 ================= */
.screen-cover {
  background: linear-gradient(175deg, #062554 0%, #0E4DA6 48%, #166CD9 78%, #0B3A7D 100%);
  color: #FFFFFF;
  justify-content: space-between;
  overflow-y: auto;
  overflow-x: hidden;
}

@media (max-height: 700px) {
  .cover-sky {
    height: 150px;
    padding-top: 42px;
  }
  .emblem-wrap {
    width: 84px;
    height: 84px;
  }
  .title-main {
    font-size: 30px;
  }
  .cover-desc {
    margin-bottom: 12px;
    font-size: 13px;
  }
  .cover-stats {
    margin-bottom: 14px;
    padding: 8px 18px;
  }
  .cover-skyline {
    height: 58px;
  }
}

.cover-sky {
  position: relative;
  height: 225px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 48px;
  flex-shrink: 0;
}

.radar-ring {
  position: absolute;
  top: 56%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(125, 211, 252, 0.22);
  pointer-events: none;
}

.ring-1 { width: 150px; height: 150px; animation: radarPulse 3.6s ease-out infinite; }
.ring-2 { width: 225px; height: 225px; animation: radarPulse 3.6s ease-out 1.2s infinite; }
.ring-3 { width: 300px; height: 300px; animation: radarPulse 3.6s ease-out 2.4s infinite; }

@keyframes radarPulse {
  0% { transform: translate(-50%, -50%) scale(0.75); opacity: 0.7; }
  100% { transform: translate(-50%, -50%) scale(1.22); opacity: 0; }
}

.emblem-wrap {
  position: relative;
  z-index: 2;
  width: 112px;
  height: 112px;
  filter: drop-shadow(0 12px 24px rgba(4, 21, 46, 0.45));
  animation: floatSlow 3.2s ease-in-out infinite;
}

@keyframes floatSlow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

.cover-content {
  position: relative;
  z-index: 3;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 24px;
}

.dept-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 12px;
  font-weight: 500;
  color: #E0F2FE;
  margin-bottom: 12px;
}

.cover-title {
  margin: 0 0 12px;
  line-height: 1.15;
}

.title-sub {
  display: block;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 3px;
  color: #BAE6FD;
  margin-bottom: 6px;
}

.title-main {
  display: block;
  font-size: 36px;
  font-weight: 800;
  letter-spacing: 1px;
  text-shadow: 0 4px 18px rgba(4, 21, 46, 0.35);
}

.title-main em {
  font-style: normal;
  color: #FFD166;
  background: linear-gradient(180deg, #FFF3B0 0%, #FFB703 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.cover-desc {
  margin: 0 0 18px;
  font-size: 13.5px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.88);
  max-width: 320px;
}

.cover-desc strong {
  color: #FFE082;
}

.cover-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 10px 22px;
  border-radius: 16px;
  background: rgba(6, 30, 68, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  margin-bottom: 20px;
}

.stat-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-num {
  font-size: 20px;
  font-weight: 800;
  color: #FFD166;
  line-height: 1.1;
}

.stat-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 2px;
}

.stat-divider {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.18);
}

/* 主按钮 */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 999px;
  padding: 13px 28px;
  font-size: 16px;
  font-weight: 700;
  color: #FFFFFF;
  background: linear-gradient(135deg, #FF7B29 0%, #F25019 100%);
  box-shadow: 0 10px 24px rgba(242, 80, 25, 0.42);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary:active {
  transform: scale(0.96);
}

.btn-cta {
  width: 84%;
  max-width: 280px;
  padding: 14px 28px;
  font-size: 17px;
  letter-spacing: 1px;
}

.pulse-btn {
  animation: btnGlow 2.4s ease-in-out infinite;
}

@keyframes btnGlow {
  0%, 100% { box-shadow: 0 10px 24px rgba(242, 80, 25, 0.42), 0 0 0 0 rgba(255, 138, 61, 0.55); }
  50% { box-shadow: 0 12px 28px rgba(242, 80, 25, 0.55), 0 0 0 10px rgba(255, 138, 61, 0); }
}

.btn-full {
  width: 100%;
}

.btn-sm {
  padding: 10px 18px;
  font-size: 14px;
}

.btn-accent {
  border: none;
  border-radius: 10px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 700;
  color: #FFFFFF;
  background: linear-gradient(135deg, var(--blue-bright), var(--blue-main));
  cursor: pointer;
  white-space: nowrap;
}

.btn-outline {
  width: 100%;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1.5px solid var(--blue-main);
  background: #FFFFFF;
  color: var(--blue-main);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.cover-secondary-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.link-pill {
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  backdrop-filter: blur(6px);
}

.cover-skyline {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 92px;
  flex-shrink: 0;
  margin-top: auto;
}

.cover-skyline svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* ================= 视图 2：安全隐患找茬 ================= */
.screen-game {
  background: #ECF2F9;
  padding-top: 54px;
}

.game-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 14px 8px;
  flex-shrink: 0;
}

.hud-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stage-badge {
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--blue-main);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 700;
}

.stage-title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: var(--text-dark);
}

.hud-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hud-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #FFFFFF;
  border: 1px solid #D8E4F2;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--blue-deep);
  box-shadow: 0 2px 6px rgba(7, 42, 94, 0.06);
}

.timer-pill {
  font-variant-numeric: tabular-nums;
}

.game-instruction {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 14px 8px;
  padding: 7px 12px;
  border-radius: 10px;
  background: #FFF6EB;
  border: 1px solid #FFD8B3;
  font-size: 12px;
  color: #9A3412;
  font-weight: 500;
  flex-shrink: 0;
}

.inst-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--orange-alert);
  flex-shrink: 0;
}

/* 交互式 SVG 场景容器 */
.scene-viewport {
  position: relative;
  flex: 1;
  min-height: 0;
  margin: 0 12px;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(180deg, #D9E8F7 0%, #C7D9EC 100%);
  border: 2px solid #FFFFFF;
  box-shadow: 0 10px 26px rgba(7, 42, 94, 0.14);
}

.scene-stage {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scene-stage svg {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  display: block;
  user-select: none;
  touch-action: manipulation;
}

/* SVG 内部隐患可点击区域与动画 */
.hazard-item {
  cursor: pointer;
  transition: filter 0.2s ease;
}

.hazard-item:hover {
  filter: brightness(1.06);
}

.hazard-item.hint-pulse {
  animation: hintFlash 0.7s ease-in-out 4;
}

@keyframes hintFlash {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(255, 107, 26, 0)); }
  50% { filter: drop-shadow(0 0 14px rgba(255, 70, 0, 1)); }
}

.hazard-item.found .hazard-danger-fx {
  opacity: 0;
  transition: opacity 0.4s ease;
}

.hazard-item .hazard-found-badge {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(0.3);
  transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

.hazard-item.found .hazard-found-badge {
  opacity: 1;
  transform: scale(1);
}

/* SVG 细节动态效果 */
.fx-flicker {
  animation: fxFlicker 0.9s ease-in-out infinite alternate;
  transform-box: fill-box;
  transform-origin: center bottom;
}

@keyframes fxFlicker {
  0% { opacity: 0.78; transform: scaleY(0.92); }
  100% { opacity: 1; transform: scaleY(1.08); }
}

.fx-spark {
  animation: fxSpark 0.55s steps(2, end) infinite;
}

@keyframes fxSpark {
  0% { opacity: 1; }
  50% { opacity: 0.25; }
  100% { opacity: 0.95; }
}

.fx-steam {
  animation: fxSteam 2.2s ease-in-out infinite;
}

@keyframes fxSteam {
  0% { transform: translateY(3px); opacity: 0.3; }
  50% { transform: translateY(-4px); opacity: 0.85; }
  100% { transform: translateY(-10px); opacity: 0.1; }
}

.fx-sway {
  animation: fxSway 2.8s ease-in-out infinite;
  transform-origin: 292px 115px;
}

@keyframes fxSway {
  0%, 100% { transform: rotate(-1.5deg); }
  50% { transform: rotate(2deg); }
}

.fx-blink {
  animation: fxBlink 1.1s ease-in-out infinite;
}

@keyframes fxBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}

/* 误触波纹与提示 */
.tap-feedback-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.miss-ripple {
  position: absolute;
  width: 44px;
  height: 44px;
  margin-left: -22px;
  margin-top: -22px;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.9);
  background: rgba(14, 79, 168, 0.22);
  animation: rippleOut 0.55s ease-out forwards;
}

@keyframes rippleOut {
  0% { transform: scale(0.3); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}

.scene-toast {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(16, 36, 62, 0.86);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
  z-index: 10;
}

.scene-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* 底部排查标签栏 */
.hazard-dock {
  background: #FFFFFF;
  margin: 10px 12px max(12px, env(safe-area-inset-bottom));
  padding: 10px 12px 12px;
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(7, 42, 94, 0.08);
  flex-shrink: 0;
}

.dock-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.dock-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-mid);
}

.hint-btn {
  border: 1px solid #FCD34D;
  background: #FFFBEB;
  color: #B45309;
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.hint-btn:active {
  transform: scale(0.95);
}

.hazard-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.hazard-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 600;
  background: #F1F5F9;
  color: #64748B;
  border: 1px dashed #CBD5E1;
  transition: all 0.25s ease;
}

.hazard-tag.found {
  background: #ECFDF5;
  color: #047857;
  border: 1px solid #6EE7B7;
  cursor: pointer;
}

/* ================= 视图 3：情景答题 ================= */
.screen-quiz {
  background: linear-gradient(180deg, #0B4FA2 0%, #1565C0 28%, #F2F6FB 28%, #F2F6FB 100%);
  padding: 58px 16px 20px;
  overflow-y: auto;
}

.quiz-header {
  color: #FFFFFF;
  margin-bottom: 14px;
}

.quiz-badge {
  font-size: 13px;
  font-weight: 700;
  color: #BAE6FD;
  margin-bottom: 8px;
}

.quiz-progress-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.quiz-progress-bar {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
  overflow: hidden;
}

.quiz-progress-fill {
  height: 100%;
  width: 33%;
  border-radius: 999px;
  background: linear-gradient(90deg, #FDE047, #FF8A3D);
  transition: width 0.35s ease;
}

.quiz-step {
  font-size: 13px;
  font-weight: 700;
}

.quiz-card {
  background: #FFFFFF;
  border-radius: 22px;
  padding: 15px 16px;
  box-shadow: var(--shadow-card);
}

.quiz-scenario-art {
  width: 100%;
  height: 98px;
  border-radius: 14px;
  background: #EFF6FF;
  margin-bottom: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quiz-scenario-art svg {
  width: 100%;
  height: 100%;
}

.quiz-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  background: #E0F2FE;
  color: #0369A1;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
}

.quiz-question {
  margin: 0 0 12px;
  font-size: 16px;
  line-height: 1.45;
  color: var(--text-dark);
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quiz-opt {
  width: 100%;
  text-align: left;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 13px;
  border: 1.5px solid #DCE6F2;
  background: #F8FBFF;
  color: var(--text-dark);
  font-size: 13.5px;
  line-height: 1.42;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quiz-opt:active:not(:disabled) {
  transform: scale(0.98);
}

.opt-letter {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #E2ECF7;
  color: var(--blue-main);
  font-size: 12.5px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.quiz-opt.correct {
  background: #ECFDF5;
  border-color: var(--green-safe);
  color: #065F46;
}

.quiz-opt.correct .opt-letter {
  background: var(--green-safe);
  color: #FFFFFF;
}

.quiz-opt.wrong {
  background: #FEF2F2;
  border-color: var(--red-danger);
  color: #991B1B;
}

.quiz-opt.wrong .opt-letter {
  background: var(--red-danger);
  color: #FFFFFF;
}

.quiz-feedback {
  margin-top: 16px;
  padding: 14px;
  border-radius: 14px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
}

.feedback-head {
  font-size: 14.5px;
  font-weight: 800;
  margin-bottom: 6px;
}

.feedback-head.is-ok { color: #059669; }
.feedback-head.is-no { color: #DC2626; }

.feedback-body {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-mid);
}

.btn-next-q {
  width: 100%;
  padding: 11px 20px;
  font-size: 15px;
}

/* ================= 视图 4：结果页 & 海报 ================= */
.screen-result {
  background: #EEF4FB;
  padding-top: 52px;
}

.result-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 8px 16px 28px;
}

.confetti-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 5;
}

.confetti-piece {
  position: absolute;
  top: -16px;
  width: 8px;
  height: 14px;
  border-radius: 2px;
  animation: confettiFall linear forwards;
}

@keyframes confettiFall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(720px) rotate(520deg); opacity: 0; }
}

.result-hero {
  background: linear-gradient(145deg, #072B61 0%, #1055B5 65%, #1E78E8 100%);
  color: #FFFFFF;
  border-radius: 22px;
  padding: 22px 18px 18px;
  text-align: center;
  box-shadow: 0 14px 30px rgba(7, 43, 97, 0.25);
  margin-bottom: 14px;
}

.medal-badge {
  font-size: 46px;
  line-height: 1;
  margin-bottom: 8px;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.25));
}

.result-subtitle {
  font-size: 12.5px;
  color: #BAE6FD;
  margin-bottom: 4px;
}

.result-rank {
  margin: 0 0 16px;
  font-size: 24px;
  font-weight: 800;
  color: #FFE082;
}

.score-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.score-item {
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 13px;
  padding: 10px 6px;
}

.score-val {
  font-size: 20px;
  font-weight: 800;
  color: #FFFFFF;
}

.score-lbl {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 2px;
}

/* 专属海报生成区 */
.poster-panel {
  background: #FFFFFF;
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 6px 18px rgba(7, 42, 94, 0.07);
  margin-bottom: 14px;
}

.panel-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}

.panel-title span {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-dark);
}

.panel-title small {
  font-size: 11.5px;
  color: var(--text-light);
}

.nickname-row {
  display: flex;
  gap: 8px;
}

.nickname-row input {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1.5px solid #D5E2F0;
  background: #F8FBFF;
  font-size: 14px;
  color: var(--text-dark);
  outline: none;
}

.nickname-row input:focus {
  border-color: var(--blue-bright);
  background: #FFFFFF;
}

.poster-preview-box {
  margin-top: 14px;
  text-align: center;
}

.poster-preview-box img {
  width: 100%;
  max-width: 280px;
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(7, 42, 94, 0.18);
  display: block;
  margin: 0 auto 12px;
}

.poster-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.save-tip {
  font-size: 11.5px;
  color: var(--text-light);
}

/* 实用工具卡片 */
.utility-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.utility-card {
  width: 100%;
  border: 1px solid #DCE7F5;
  background: #FFFFFF;
  border-radius: 15px;
  padding: 13px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(7, 42, 94, 0.05);
}

.util-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--blue-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.util-text {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.util-text strong {
  font-size: 14.5px;
  color: var(--text-dark);
}

.util-text small {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 2px;
}

.util-arrow {
  font-size: 22px;
  color: #94A3B8;
}

.result-footer {
  text-align: center;
  margin-top: 18px;
  color: var(--text-mid);
  font-size: 13px;
  font-weight: 700;
}

.result-footer p {
  margin: 2px 0;
}

.footer-sub {
  font-size: 11.5px;
  font-weight: 400;
  color: var(--text-light);
}

/* ================= 弹窗系统 ================= */
.modal-backdrop {
  position: absolute;
  inset: 0;
  z-index: 60;
  background: rgba(5, 22, 48, 0.62);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 14px;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-sheet {
  width: 100%;
  max-height: 84%;
  overflow-y: auto;
  background: #FFFFFF;
  border-radius: 22px;
  padding: 20px 18px 18px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
  animation: slideUp 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes slideUp {
  from { transform: translateY(34px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.hazard-sheet-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: #ECFDF5;
  color: #047857;
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: 10px;
}

.check-circle {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #10B981;
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

.hazard-sheet-title {
  margin: 0 0 14px;
  font-size: 19px;
  font-weight: 800;
  color: var(--text-dark);
}

.hazard-info-block {
  padding: 12px 14px;
  border-radius: 13px;
  margin-bottom: 10px;
}

.hazard-info-block p {
  margin: 4px 0 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-dark);
}

.info-label {
  font-size: 12.5px;
  font-weight: 800;
}

.danger-block {
  background: #FFF5F5;
  border: 1px solid #FECACA;
}

.danger-block .info-label { color: #B91C1C; }

.safe-block {
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  margin-bottom: 16px;
}

.safe-block .info-label { color: #047857; }

.clear-sheet {
  text-align: center;
  padding: 26px 20px 20px;
}

.clear-icon {
  font-size: 52px;
  margin-bottom: 8px;
}

.clear-title {
  margin: 0 0 8px;
  font-size: 21px;
  color: var(--blue-deep);
}

.clear-desc {
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-mid);
}

/* 自查清单 & 电话弹窗 */
.tool-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.tool-sheet-header h3 {
  margin: 0;
  font-size: 17px;
  color: var(--text-dark);
}

.close-x {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: #F1F5F9;
  color: var(--text-mid);
  font-size: 14px;
  cursor: pointer;
}

.tool-sheet-sub {
  margin: 0 0 12px;
  font-size: 12.5px;
  color: var(--text-mid);
}

.checklist-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 11px;
  background: #F8FBFF;
  border: 1px solid #E2ECF7;
  cursor: pointer;
  font-size: 13px;
  line-height: 1.45;
}

.check-row input {
  margin-top: 2px;
  width: 17px;
  height: 17px;
  accent-color: var(--green-safe);
  flex-shrink: 0;
}

.check-row.checked {
  background: #ECFDF5;
  border-color: #A7F3D0;
  color: #065F46;
}

.phone-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.phone-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  border-radius: 12px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  text-decoration: none;
  color: var(--text-dark);
}

.phone-item.urgent {
  background: #FFF7ED;
  border-color: #FED7AA;
}

.phone-meta {
  display: flex;
  flex-direction: column;
}

.phone-meta strong {
  font-size: 14px;
}

.phone-meta span {
  font-size: 11.5px;
  color: var(--text-light);
  margin-top: 2px;
}

.phone-num {
  font-size: 20px;
  font-weight: 800;
  color: var(--blue-main);
  letter-spacing: 0.5px;
}

.phone-item.urgent .phone-num {
  color: var(--orange-alert);
}
