﻿/* 虚惊事件 · 表单 + A4 警示卡 */

/* 旧 hero 已迁移至 .tool-hero，保留选择器避免残留引用报错 */
.nm-hero, .hz-hero, .mx-hero, .exam-hero { display: none; }


.nm-form .field + .field { margin-top: 12px; }
.nm-hint {
  font-size: 13px;
  color: var(--muted);
  margin: 6px 0 0;
  line-height: 1.5;
}

.nm-photos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
}
.nm-photo-slot {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--line-strong);
  background: #f7f9fc;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.nm-photo-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.nm-photo-slot.is-empty {
  color: var(--muted);
  font-size: 13px;
  gap: 6px;
  cursor: pointer;
}
.nm-photo-slot.is-empty svg { width: 22px; height: 22px; opacity: .7; }
.nm-photo-del {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(20, 24, 32, .72);
  color: #fff;
  display: grid;
  place-items: center;
}
.nm-photo-del svg { width: 14px; height: 14px; }

.nm-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
}
.nm-actions .btn { width: 100%; }

.nm-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  font-size: 13px;
  line-height: 1.5;
}
.nm-loading i {
  width: 16px;
  height: 16px;
  border: 2px solid #fed7aa;
  border-top-color: #ea580c;
  border-radius: 50%;
  animation: nm-spin .8s linear infinite;
  flex: none;
}
@keyframes nm-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .nm-loading i { animation: none; }
}

.nm-preview-wrap {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.nm-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.nm-preview-head h3 { font-size: 16px; font-weight: var(--fw-medium); }
.nm-preview-ops { display: flex; gap: 8px; flex-wrap: wrap; }

.nm-a4-stage {
  width: 100%;
  overflow: auto;
  padding: 8px 0 16px;
  background: #e8ecf2;
  border-radius: var(--radius);
  display: flex;
  justify-content: center;
}

/* 屏幕预览：等比缩小 A4 */
.nm-a4 {
  width: 210mm;
  min-height: 297mm;
  max-width: 100%;
  background: #fff;
  color: #1a1f2e;
  box-shadow: 0 10px 30px rgba(24, 39, 75, .12);
  transform-origin: top center;
  box-sizing: border-box;
  padding: 12mm 12mm 11mm;
  display: flex;
  flex-direction: column;
  font-family: "MiSans", "PingFang SC", "Microsoft YaHei", sans-serif;
}
@media (max-width: 860px) {
  .nm-a4-stage { padding: 12px 8px 20px; }
  .nm-a4 {
    width: min(100%, 420px);
    min-height: calc(min(100%, 420px) * 1.414);
    padding: 5.5%;
  }
}

.nm-a4-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 2.5px solid #d97706;
}
.nm-a4-brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nm-a4-brand em {
  font-style: normal;
  font-size: 12px;
  letter-spacing: .18em;
  color: #b45309;
  font-weight: var(--fw-medium);
}
.nm-a4-brand strong {
  font-size: 23px;
  font-weight: var(--fw-semibold);
  color: #9a3412;
  letter-spacing: .04em;
}
.nm-a4-issue {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ea580c, #f59e0b);
  color: #fff;
  font-size: 13px;
  font-weight: var(--fw-medium);
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(234, 88, 12, .25);
}
.nm-a4-issue b { font-size: 17px; font-weight: var(--fw-semibold); letter-spacing: .02em; }

.nm-a4-title {
  margin: 12px 0 6px;
  font-size: 19px;
  font-weight: var(--fw-semibold);
  line-height: 1.4;
  color: #1a1f2e;
}
.nm-a4-meta {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 10px;
}
.nm-a4-meta span { color: #1a1f2e; font-weight: var(--fw-medium); }
.nm-a4-summary {
  margin: 0 0 8px;
  font-size: 13.5px;
  line-height: 1.65;
  color: #9a3412;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  padding: 10px 12px;
}

.nm-a4-sec {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
}
.nm-a4-list {
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}
.nm-a4-list li {
  margin: 0 0 5px;
  font-size: 13px;
  line-height: 1.55;
  color: #334155;
}
.nm-a4-list li b {
  color: #c2410c;
  margin-right: 4px;
  font-weight: var(--fw-medium);
}
.nm-a4-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  letter-spacing: .08em;
  color: #b45309;
  font-weight: var(--fw-medium);
  margin-bottom: 4px;
}
.nm-a4-label::before {
  content: "";
  width: 3px;
  height: 11px;
  border-radius: 2px;
  background: #ea580c;
}
.nm-a4-body {
  font-size: 13.5px;
  line-height: 1.7;
  color: #334155;
  white-space: pre-wrap;
  word-break: break-word;
}

/* 现场图片区：置于卡片末尾，单图通栏 / 双图并排 */
.nm-a4-sec-photos { margin-top: 12px; }
.nm-a4-photos {
  margin-top: 8px;
  display: grid;
  gap: 8px;
}
.nm-a4-photos.is-one {
  grid-template-columns: 1fr;
}
.nm-a4-photos.is-two {
  grid-template-columns: 1fr 1fr;
}
.nm-a4-photo {
  position: relative;
  margin: 0;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(24, 39, 75, .05);
}
.nm-a4-photos.is-one .nm-a4-photo {
  height: 96mm;
}
.nm-a4-photos.is-two .nm-a4-photo {
  height: 70mm;
}
.nm-a4-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #fff;
}
.nm-a4-photo figcaption {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fff;
  color: #475569;
  font-size: 10.5px;
  line-height: 1.5;
  letter-spacing: .04em;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 4px rgba(15, 23, 42, .12);
}

.nm-a4-note {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
}
.nm-a4-note .nm-a4-body { font-size: 13px; color: #9a3412; }

.nm-a4-foot {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed #cbd5e1;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 11.5px;
  color: #64748b;
  line-height: 1.45;
}
.nm-a4-foot strong { color: #c2410c; font-weight: var(--fw-medium); }

.nm-print-tip {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: #edf4ff;
  border: 1px solid rgba(47, 124, 246, .14);
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.65;
}
.nm-print-tip b { color: var(--ink); font-weight: var(--fw-medium); }
.nm-print-tip ol {
  margin: 6px 0 0;
  padding-left: 18px;
}

/* 打印：只输出 A4 卡 */
@media print {
  @page {
    size: A4 portrait;
    margin: 0;
  }
  html, body {
    background: #fff !important;
    height: auto !important;
    overflow: visible !important;
  }
  body * { visibility: hidden; }
  #print-root,
  #print-root * { visibility: visible; }
  #print-root {
    position: absolute;
    left: 0;
    top: 0;
    width: 210mm;
    min-height: 297mm;
  }
  .nm-a4 {
    width: 210mm !important;
    min-height: 297mm !important;
    max-width: none !important;
    margin: 0 !important;
    box-shadow: none !important;
    transform: none !important;
    padding: 12mm !important;
  }
  .nm-a4-photos.is-one .nm-a4-photo { height: 96mm; max-height: 96mm; }
  .nm-a4-photos.is-two .nm-a4-photo { height: 70mm; max-height: 70mm; }
  .app-bg, #splash, #topbar, #tabbar, #toasts, #overlay, .hidden-file { display: none !important; }
}
