/* ============================================================
   举报 H5 · 主样式
   移动端优先，兼容微信内置浏览器 / iOS Safari / Android Chrome
   ============================================================ */

:root {
  --brand: #3e63dd;
  --brand-dark: #3352bd;
  --link: #5c6b96;
  --page-bg: #f4f4f6;
  --bar-bg: #ededed;
  --card-bg: #ffffff;
  --text: #1a1a1a;
  --text-2: #4a4a4a;
  --text-3: #8a8f99;
  --text-4: #b6bac2;
  --line: #ededed;
  --danger: #e34d4d;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(20, 24, 40, .04);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

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

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--page-bg);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue",
               "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
  -webkit-text-size-adjust: 100%;
}

button, input, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { border: 0; background: none; padding: 0; cursor: pointer; }
input, textarea { border: 0; outline: none; background: transparent; }
img { display: block; max-width: 100%; }

/* 桌面预览时模拟手机视口 */
#app {
  position: relative;
  width: 100%;
  max-width: 480px;
  min-height: 100%;
  margin: 0 auto;
  background: var(--page-bg);
  overflow: hidden;
}
@media (min-width: 520px) {
  body { background: #e6e8eb; }
  #app {
    min-height: 100vh;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .04), 0 18px 48px rgba(20, 24, 40, .12);
  }
}

/* ---------------- 顶部导航（仿微信内嵌页头） ---------------- */
.appbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 8px;
  height: calc(50px + var(--safe-top));
  padding: var(--safe-top) 6px 0;
  background: var(--bar-bg);
  border-bottom: .5px solid rgba(0, 0, 0, .04);
  transition: background-color .2s ease;
}
.appbar.is-scrolled { background: #eaeaea; }

.ab-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2c2c2c;
  flex: 0 0 auto;
  border-radius: 50%;
  transition: background-color .15s ease;
}
.ab-btn:active { background: rgba(0, 0, 0, .06); }
.ab-btn svg { width: 17px; height: 17px; }

.ab-title {
  flex: 1 1 auto;
  min-width: 0;
  text-align: center;
  line-height: 1.15;
}
.ab-title h1 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: .2px;
  color: #111;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ab-title .ab-sub {
  margin: 1px 0 0;
  font-size: 9.5px;
  color: #6f6f6f;
  letter-spacing: .1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ab-title .ab-sub:empty { display: none; }

/* ---------------- 视图栈 ---------------- */
.views {
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - 50px - var(--safe-top));
}

.view {
  position: absolute;
  inset: 0;
  top: 0;
  bottom: auto;
  min-height: 100%;
  background: var(--page-bg);
  will-change: transform;
  transition: transform .28s cubic-bezier(.32, .72, .28, 1), opacity .28s ease;
}
.view.is-root { position: relative; }
.view.off-right { transform: translate3d(100%, 0, 0); }
.view.off-left  { transform: translate3d(-22%, 0, 0); opacity: .6; }
.view.entering  { transform: translate3d(100%, 0, 0); transition: none; }

/* ---------------- 列表 ---------------- */
.panel-hint {
  display: flex;
  align-items: center;
  margin: 0;
  height: 50px;
  padding: 0 20px;
  font-size: 15px;
  color: #222;
  letter-spacing: .2px;
}

.list {
  background: var(--card-bg);
  box-shadow: var(--shadow);
}
.cell {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 51px;
  padding: 0 20px;
  text-align: left;
  background: var(--card-bg);
  transition: background-color .12s ease;
}
.cell:active { background: #f5f5f7; }
.cell + .cell::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: #f1f1f1;
}
.cell-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 16px;
  color: #202020;
  line-height: 1.42;
  word-break: break-word;
}
.cell-arrow {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  margin-right: 2px;
  border-right: 1.4px solid #9b9b9b;
  border-top: 1.4px solid #9b9b9b;
  transform: rotate(45deg);
  border-radius: 1px;
}
.cell-tag {
  flex: 0 0 auto;
  font-size: 12px;
  color: var(--text-4);
}

.helper-link {
  display: block;
  width: 100%;
  padding: 26px 20px 40px;
  text-align: center;
  font-size: 14px;
  color: var(--link);
}
.helper-link:active { opacity: .6; }

.page-foot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(16px + var(--safe-bottom));
  padding: 0 24px;
  text-align: center;
  font-size: 11.5px;
  line-height: 1.7;
  color: #b3b7bf;
}

/* 已选路径条 */
.crumb {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 12px 16px;
  background: #fbfbfc;
  border-bottom: .5px solid var(--line);
  font-size: 12.5px;
  color: var(--text-3);
}
.crumb b { font-weight: 400; color: #5c626d; }

/* ---------------- 表单 ---------------- */
.form { padding: 12px 12px 110px; }

.field-card {
  margin-bottom: 10px;
  padding: 14px 14px 12px;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.field-label {
  font-size: 14.5px;
  font-weight: 600;
  color: #23262b;
  letter-spacing: .2px;
}
.field-label .req { color: var(--danger); margin-left: 3px; font-weight: 500; }
.field-meta { font-size: 12px; color: var(--text-4); font-variant-numeric: tabular-nums; }

.field-card textarea {
  display: block;
  width: 100%;
  min-height: 108px;
  padding: 10px 12px;
  background: #f7f8fa;
  border-radius: 9px;
  font-size: 14.5px;
  line-height: 1.62;
  resize: none;
  color: #1f2229;
}
.field-card textarea::placeholder,
.field-card input::placeholder { color: #b0b5bd; }

.field-card input[type="text"],
.field-card input[type="tel"],
.field-card input[type="url"] {
  display: block;
  width: 100%;
  height: 44px;
  padding: 0 12px;
  background: #f7f8fa;
  border-radius: 9px;
  font-size: 14.5px;
}
.field-card input:focus,
.field-card textarea:focus { background: #f2f4f8; box-shadow: inset 0 0 0 1px rgba(62, 99, 221, .28); }

.field-tip {
  margin: 8px 2px 0;
  font-size: 11.5px;
  line-height: 1.6;
  color: #9aa0a9;
}

.target-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 24px;
}
.target-path {
  flex: 1 1 auto;
  font-size: 13.5px;
  line-height: 1.5;
  color: #3d424b;
  word-break: break-word;
}
.target-path i { font-style: normal; color: #c2c6cd; padding: 0 4px; }
.link-btn { font-size: 13px; color: var(--brand); flex: 0 0 auto; }

/* 图片上传 */
.uploader {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.thumb {
  position: relative;
  padding-top: 100%;
  border-radius: 9px;
  overflow: hidden;
  background: #f2f3f5;
}
.thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.thumb-del {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: 13px;
  line-height: 21px;
  text-align: center;
  backdrop-filter: blur(2px);
}
.thumb-upload {
  position: relative;
  padding-top: 100%;
  border: 1px dashed #d6dae1;
  border-radius: 9px;
  background: #fafbfc;
  color: #9ba1ab;
}
.thumb-upload:active { background: #f3f5f8; }
.thumb-upload .inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.thumb-upload .plus { font-size: 24px; line-height: 1; font-weight: 300; color: #b9bfc8; }
.thumb-upload .cnt { font-size: 11.5px; letter-spacing: .3px; }

.agree {
  display: flex;
  gap: 8px;
  padding: 4px 6px 0;
  font-size: 11.5px;
  line-height: 1.65;
  color: #9aa0a9;
}
.agree a { color: var(--link); text-decoration: none; }

/* 底部固定操作栏 */
.actionbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  max-width: 480px;
  margin: 0 auto;
  padding: 10px 14px calc(10px + var(--safe-bottom));
  background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(180%) blur(12px);
  border-top: .5px solid rgba(0, 0, 0, .07);
  transition: transform .28s cubic-bezier(.32, .72, .28, 1), opacity .2s ease;
}
.actionbar.hidden { transform: translateY(120%); opacity: 0; pointer-events: none; }

.btn-primary {
  width: 100%;
  height: 47px;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background-color .15s ease, transform .1s ease;
}
.btn-primary:active { background: var(--brand-dark); transform: scale(.995); }
.btn-primary[disabled] { background: #b9c4e8; color: #fff; }
.btn-primary .spinner {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, .4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- 结果页 ---------------- */
.result {
  min-height: calc(100vh - 52px);
  padding: 56px 24px calc(40px + var(--safe-bottom));
  background: #fff;
  text-align: center;
}
.result .badge {
  width: 68px;
  height: 68px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: #eaf0ff;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pop .42s cubic-bezier(.2, 1.4, .5, 1);
}
.result .badge svg { width: 34px; height: 34px; stroke: var(--brand); }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.result h2 { margin: 0 0 8px; font-size: 19px; font-weight: 600; letter-spacing: .3px; }
.result p.lead { margin: 0 auto 22px; max-width: 300px; font-size: 13.5px; line-height: 1.7; color: #8b9099; }

.ticket {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 26px;
  padding: 11px 16px;
  background: #f6f7f9;
  border-radius: 10px;
  font-size: 13px;
  color: #5c626d;
}
.ticket b { font-weight: 600; color: #1f2328; letter-spacing: .6px; font-variant-numeric: tabular-nums; }
.ticket .copy { color: var(--brand); font-size: 12.5px; }

.result-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 300px;
  margin: 0 auto;
}
.btn-ghost {
  height: 45px;
  border-radius: 10px;
  border: 1px solid #e3e6eb;
  color: #4a4f58;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-ghost:active { background: #f6f7f9; }

/* ---------------- 须知页 ---------------- */
.notice { padding: 6px 20px calc(40px + var(--safe-bottom)); background: #fff; min-height: calc(100vh - 52px); }
.notice h3 { margin: 22px 0 8px; font-size: 15px; font-weight: 600; }
.notice p { margin: 0 0 12px; font-size: 13.5px; line-height: 1.85; color: #555b64; text-align: justify; }
.notice ol { margin: 0 0 14px; padding-left: 18px; }
.notice li { font-size: 13.5px; line-height: 1.85; color: #555b64; margin-bottom: 6px; }
.notice .sign { margin-top: 26px; font-size: 12px; color: #a2a7ae; text-align: right; }

/* ---------------- Toast / 遮罩 ---------------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 22%;
  z-index: 90;
  transform: translate(-50%, 8px);
  max-width: 74vw;
  padding: 10px 16px;
  border-radius: 9px;
  background: rgba(28, 30, 35, .88);
  color: #fff;
  font-size: 13.5px;
  line-height: 1.5;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.loading-mask {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .28);
}
.loading-mask.show { display: flex; }
.loading-box {
  padding: 18px 22px;
  border-radius: 12px;
  background: rgba(30, 32, 38, .9);
  color: #fff;
  font-size: 13px;
  text-align: center;
}
.loading-box .dot { display: inline-block; width: 16px; height: 16px; margin-bottom: 6px;
  border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }

.skeleton { padding: 0; }
.skeleton .cell { min-height: 57px; }
.sk-bar {
  height: 13px;
  border-radius: 4px;
  background: linear-gradient(90deg, #f1f2f4 25%, #f7f8fa 37%, #f1f2f4 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
}
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

.empty {
  padding: 60px 24px;
  text-align: center;
  color: #a6abb3;
  font-size: 13.5px;
}

/* ---------------- 底部动作面板 ---------------- */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, .34);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.sheet-mask.show { opacity: 1; pointer-events: auto; }
.sheet {
  width: 100%;
  max-width: 480px;
  padding: 6px 8px calc(8px + var(--safe-bottom));
  background: #f7f8fa;
  border-radius: 14px 14px 0 0;
  transform: translateY(100%);
  transition: transform .26s cubic-bezier(.32, .72, .28, 1);
}
.sheet-mask.show .sheet { transform: translateY(0); }
.sheet-item {
  display: block;
  width: 100%;
  height: 50px;
  background: #fff;
  font-size: 16px;
  color: #23262b;
  border-radius: 9px;
  margin-bottom: 6px;
}
.sheet-item:active { background: #f0f1f4; }
.sheet-cancel { color: #7a7f88; margin-top: 6px; }

/* ============================================================
   举报表单（按设计稿 1:1：联系方式 / 图片上传 / 投诉内容 / 绿色提交）
   ============================================================ */
.fm { padding-top: 5px; }

.fm-block {
  background: #fff;
  padding: 14px 20px 17px;
}
.fm-block + .fm-block { border-top: 1px solid #e6e6e6; }

.fm-label {
  display: block;
  font-size: 16.5px;
  font-weight: 600;
  line-height: 24px;
  color: #333;
  letter-spacing: .3px;
}
.fm-label .req {
  font-style: normal;
  font-weight: 600;
  color: #e64340;
  margin-left: 3px;
}

.fm-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.fm-count {
  font-size: 13px;
  color: #a8a8a8;
  font-variant-numeric: tabular-nums;
}

.fm-input {
  display: block;
  width: 100%;
  height: 37px;
  margin-top: 9px;
  padding: 0;
  font-size: 15px;
  color: #222;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #e1e1e1;
  border-radius: 0;
}
.fm-input::placeholder { color: #acacac; }

.fm-textarea {
  display: block;
  width: 100%;
  height: 120px;
  margin-top: 9px;
  padding: 4px 0 0;
  font-size: 15px;
  line-height: 22px;
  color: #222;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #e1e1e1;
  border-radius: 0;
  resize: none;
}
.fm-textarea::placeholder { color: #acacac; }

.fm-uploader {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 10px;
}
.fm-add,
.fm-thumb {
  position: relative;
  width: 100%;
  padding-top: 100%;
  border-radius: 10px;
  overflow: hidden;
}
.fm-add { background: #f7f8fa; }
.fm-add::before,
.fm-add::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: #b9bcc2;
  border-radius: 1px;
}
.fm-add::before { width: 18px; height: 2px; transform: translate(-50%, -50%); }
.fm-add::after { width: 2px; height: 18px; transform: translate(-50%, -50%); }
.fm-add:active { background: #f1f2f4; }

.fm-thumb { background: #f2f3f5; }
.fm-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.fm-del {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 20px;
  height: 20px;
  line-height: 19px;
  text-align: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: 13px;
}

.fm-submit-wrap { padding: 20px; }
.fm-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 48px;
  border-radius: 8px;
  background: #56bc69;
  color: #fff;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 2px;
  transition: background-color .15s ease;
}
.fm-submit:active { background: #4ba95d; }
.fm-submit[disabled] { background: #a9d7b3; letter-spacing: 0; }
.fm-submit .spinner {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, .45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

/* ---------------- 表单内联错误提示 ---------------- */
.fm-err {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 16px;
  color: #fa5151;
  letter-spacing: .2px;
}
.fm-err[hidden] { display: none; }

/* ---------------- 提交成功弹窗 ---------------- */
.fm-modal-mask {
  position: fixed;
  left: 0;
  right: 0;
  top: calc(50px + var(--safe-top));
  bottom: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  background: rgba(0, 0, 0, .45);
  opacity: 0;
  transition: opacity .2s ease;
}
.fm-modal-mask.show { opacity: 1; }

.fm-modal {
  width: 100%;
  max-width: 480px;
  padding: 24px 20px 20px;
  background: #fff;
  border-radius: 12px;
  text-align: center;
  transform: scale(.96);
  transition: transform .2s cubic-bezier(.2, .9, .3, 1.1);
}
.fm-modal-mask.show .fm-modal { transform: scale(1); }

.fm-modal h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 26px;
  color: #313131;
  letter-spacing: 1px;
}
.fm-modal p {
  margin: 10px 0 0;
  font-size: 15px;
  line-height: 24px;
  color: #666;
}
.fm-modal-btn {
  display: block;
  width: 119px;
  height: 39px;
  margin: 20px auto 0;
  border-radius: 6px;
  background: #586b95;
  color: #fff;
  font-size: 15px;
  letter-spacing: 1px;
}
.fm-modal-btn:active { background: #4c5d82; }
