/* ===== 设计变量 ===== */
:root {
  --primary: #1677ff;
  --primary-deep: #0958d9;
  --primary-soft: #e6f0ff;
  --primary-tint: #f0f6ff;
  --ink: #1d2129;
  --text: #4e5969;
  --muted: #86909c;
  --line: #e5e6eb;
  --line-soft: #f2f3f5;
  --page: #f7f8fa;
  --white: #ffffff;
  --success: #00b42a;
  --warning: #ff7d00;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  --grad: linear-gradient(135deg, #1677ff 0%, #4096ff 50%, #69b1ff 100%);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
/* 防止自定义 display 覆盖 hidden 属性（如 .up-file 的 display:flex） */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: var(--text);
  background: var(--page);
  line-height: 1.6;
  font-size: 15px;
}

.app { max-width: 480px; margin: 0 auto; min-height: 100vh; padding-bottom: 40px; }

/* ===== 头部 ===== */
.hero {
  background: var(--grad);
  padding: 36px 20px 28px;
  color: #fff;
  border-radius: 0 0 20px 20px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  right: -40px; top: -40px;
  width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(255,255,255,0.25), transparent 70%);
  border-radius: 50%;
}
.hero-title { font-size: 20px; font-weight: 700; letter-spacing: 0.5px; position: relative; z-index: 1; line-height: 1.4; }
.hero-meta {
  margin-top: 10px;
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  font-size: 13px; opacity: 0.95;
  position: relative; z-index: 1;
}
.hero-meta-item { display: inline-flex; align-items: center; gap: 4px; }
.hero-meta-sep { opacity: 0.6; }

/* 开票附加信息开关：默认收起，减少版面占用 */
.invx-switch {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 0 0; padding-top: 14px;
  border-top: 1px dashed var(--border);
  cursor: pointer;
}
.invx-label { font-size: 13px; font-weight: 600; color: var(--text); }
.invx-hint { font-weight: 400; color: var(--muted); }
.invx-input { position: absolute; opacity: 0; pointer-events: none; }
.invx-track {
  position: relative; flex: none;
  width: 40px; height: 22px; border-radius: 11px;
  background: #e5e6eb; transition: background .2s;
}
.invx-track::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.15);
  transition: transform .2s;
}
.invx-input:checked ~ .invx-track { background: #1677ff; }
.invx-input:checked ~ .invx-track::after { transform: translateX(18px); }
.invx-body { padding-top: 2px; }

.container { padding: 16px; }

/* ===== 步骤条 ===== */
.steps {
  display: flex; align-items: center; justify-content: center; gap: 0;
  background: var(--white); border-radius: var(--radius-sm);
  padding: 14px; margin-bottom: 14px; box-shadow: var(--shadow);
}
.step {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--muted);
}
.step span {
  display: inline-grid; place-items: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--line-soft); color: var(--muted); font-size: 12px; font-weight: 600;
}
.step.is-active { color: var(--primary); font-weight: 600; }
.step.is-active span { background: var(--primary); color: #fff; }
.step + .step::before {
  content: ''; width: 32px; height: 2px; background: var(--line-soft); margin: 0 10px;
}

/* ===== 卡片 ===== */
.card {
  background: var(--white);
  border-radius: var(--radius);
  margin-bottom: 10px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px 8px;
  border-bottom: 1px solid var(--line-soft);
}
.card-hd h3 { font-size: 15px; color: var(--ink); font-weight: 600; }
.card-bd { padding: 10px 14px; }

.tag {
  font-size: 11px; padding: 2px 8px; border-radius: 10px;
  background: var(--primary-soft); color: var(--primary); font-weight: 500;
}
.tag-ghost { background: var(--line-soft); color: var(--muted); }

/* ===== 表单字段 ===== */
.field { margin-bottom: 10px; }
.field:last-child { margin-bottom: 0; }
.field > label {
  display: block; font-size: 13.5px; color: var(--ink); margin-bottom: 4px; font-weight: 500;
}
.req { color: #f53f3f; margin-left: 2px; }
.field { min-width: 0; }
/* 所有单行输入框（text / date / tel / email / select）共用完全一致的盒模型，
   保证「计划来渝时间」与「来渝方式及班次」等相邻字段视觉统一 */
.field input[type="text"],
.field input[type="tel"],
.field input[type="email"],
.field input[type="password"],
.field input[type="number"],
.field input[type="date"],
.field select {
  display: block;
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--ink);
  background: var(--white);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}
.field textarea {
  display: block;
  width: 100%;
  min-height: 70px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--white);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
  resize: vertical;
}
.field input::placeholder,
.field textarea::placeholder { color: var(--muted); }
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

/* 日期输入：保留原生渲染（含日历图标与系统级垂直居中），
   只统一外壳盒模型并防止 iOS 下内容溢出卡片 */
.field input[type="date"] {
  max-width: 100%;
  min-width: 0;
  flex: none;
  text-align: left;
  text-align-last: left;
}
.field input[type="date"]::-webkit-datetime-edit-fields-wrapper { padding: 0; }

/* 自动填充且不可修改的字段（报名表单手机号） */
.field input[readonly] { background: var(--line-soft); color: var(--muted); cursor: not-allowed; }
.hint { font-size: 12px; color: var(--muted); margin-top: 6px; }

.radio-row { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px; border: 1px solid var(--line); border-radius: 15px;
  cursor: pointer; font-size: 13px; color: var(--text); background: var(--white);
  transition: all 0.2s;
}
.chip input { accent-color: var(--primary); }
.chip:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }

.check-list { display: flex; flex-direction: column; gap: 5px; }
.check-item {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px;
  cursor: pointer; transition: all 0.2s;
}
.check-item:has(input:checked) { border-color: var(--primary); background: var(--primary-tint); }
.check-item input { margin-top: 3px; accent-color: var(--primary); }
.check-item .ci-body { font-size: 12.5px; color: var(--text); }

/* 分论坛双行（标题 + 主席） */
.check-forum { align-items: flex-start; gap: 8px; }
.check-forum input { margin-top: 4px; }
.check-forum .cf-body { display: flex; flex-direction: column; gap: 2px; }
.check-forum .cf-title { font-size: 12.5px; color: var(--ink); line-height: 1.35; }
.check-forum .cf-chair {
  font-size: 10.5px; color: var(--muted); line-height: 1.4;
  padding-top: 2px; border-top: 1px dashed var(--line); margin-top: 0;
}

/* ===== 文件类字段（报告摘要提交） ===== */
.field-file .ff-label { font-size: 13.5px; color: var(--ink); font-weight: 500; margin-bottom: 8px; }

/* 上传区 */
.up-zone {
  position: relative;
  border: 1.5px dashed #c9d7ec; border-radius: 10px;
  background: linear-gradient(180deg, #fbfdff 0%, #f7faff 100%);
  padding: 12px 14px; cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  outline: none;
}
.up-zone:hover, .up-zone:focus-visible, .up-zone.dragover {
  border-color: var(--primary);
  background: #f4f9ff;
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.up-zone.has-file {
  border-style: solid; border-color: #bfd8ff;
  background: #f7fbff;
  box-shadow: none;
}
.up-zone input[type="file"] { display: none; }

.up-idle { display: flex; align-items: center; gap: 12px; }
.up-ico {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #e8f1ff 0%, #d8e9ff 100%);
  color: var(--primary);
}
.up-text { flex: 1; min-width: 0; }
.up-title { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.up-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* 已选文件态 */
.up-file { display: flex; align-items: center; gap: 10px; text-align: left; }
.uf-badge {
  flex: none; min-width: 40px; text-align: center;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.5px;
  padding: 5px 6px; border-radius: 7px;
  background: #eef2f7; color: #4e5969;
}
.uf-badge.ext-pdf { background: #fff1f0; color: #f5484d; }
.uf-badge.ext-pptx, .uf-badge.ext-ppt { background: #fff3e8; color: #ff8d1a; }
.uf-badge.ext-docx, .uf-badge.ext-doc { background: #e8f3ff; color: var(--primary); }
.uf-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.uf-name {
  font-size: 13px; font-weight: 500; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.uf-meta { font-size: 11px; color: var(--muted); }
.uf-clear {
  flex: none; border: none; background: none; cursor: pointer;
  font-size: 12px; color: #f56f6f; padding: 6px 2px 6px 10px;
}
.uf-clear:active { opacity: 0.75; }

/* 提示与模板下载 */
.fp-tip { font-size: 11.5px; color: var(--muted); margin-top: 8px; text-align: center; }
.fp-tip:empty { display: none; }
.fp-tip.is-error { color: #d4380d; }
.fp-hint { font-size: 11.5px; color: var(--muted); margin-top: 8px; text-align: center; line-height: 1.5; }
/* 模版下载：纯文字链接，无背景按钮样式 */
.up-tpl {
  display: flex; align-items: center; justify-content: center; gap: 5px;
  width: fit-content; margin: 10px auto 0; padding: 0;
  border: none; background: none; color: var(--primary);
  font-size: 12.5px; font-weight: 500; text-decoration: none;
}
.up-tpl .ut-ico { width: 14px; height: 14px; flex: none; }
.up-tpl:hover { opacity: 0.8; }
.up-tpl:active { opacity: 0.6; }

/* 微信聊天文件选择（仅微信客户端内显示） */
.up-wxbtn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; margin-top: 8px; padding: 9px 0;
  border: 1px solid #cdeada; border-radius: 8px;
  background: #f3fbf7; color: #07c160;
  font-size: 13px; font-weight: 500; cursor: pointer;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s;
}
.up-wxbtn svg { width: 15px; height: 15px; flex: none; }
.up-wxbtn:hover { background: #e8f9f1; border-color: #07c160; }
.up-wxbtn:disabled { opacity: 0.55; cursor: default; }
.up-wxbtn:active { opacity: 0.8; }

/* 微信发票抬头导入（仅微信客户端内可用） */
.btn-wx-inv {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: fit-content; margin-top: 8px; padding: 7px 14px;
  border: 1px solid #cdeada; border-radius: 8px;
  background: #f3fbf7; color: #07c160;
  font-size: 12.5px; font-weight: 500; cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.btn-wx-inv svg { width: 14px; height: 14px; flex: none; }
.btn-wx-inv:hover { background: #e8f9f1; border-color: #07c160; }
.btn-wx-inv:active { opacity: 0.8; }

/* 分论坛分组 */
.forum-group { margin-bottom: 6px; }
.forum-group:last-child { margin-bottom: 0; }
/* 分论坛选项之间留出间距，避免拥挤 */
.forum-group .check-forum { margin-bottom: 8px; }
.forum-group .check-forum:last-child { margin-bottom: 0; }
.fg-title {
  font-size: 11.5px; font-weight: 600; color: var(--primary);
  padding: 4px 8px; background: var(--primary-tint);
  border-radius: 6px; margin-bottom: 6px; letter-spacing: 0.5px;
}

/* ===== 缴费卡片 ===== */
.fee-group { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fee-card {
  position: relative; display: flex; flex-direction: column;
  border: 1.5px solid var(--line); border-radius: 12px;
  padding: 13px 14px 12px; background: var(--white);
  cursor: pointer; transition: border-color .18s, background .18s, box-shadow .18s;
}
.fee-card input { position: absolute; opacity: 0; pointer-events: none; }
.fee-card:hover { border-color: #c9d7ec; }
.fee-card:has(input:checked) {
  border-color: var(--primary); background: var(--primary-tint);
  box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.09);
}
.fc-head { display: flex; align-items: center; gap: 6px; padding-right: 22px; min-width: 0; }
.fc-name { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.fee-card:has(input:checked) .fc-name { color: var(--primary); }
.fc-badge {
  flex: none; font-size: 10.5px; line-height: 1.6; padding: 0 6px;
  border-radius: 7px; font-weight: 500;
  background: linear-gradient(135deg, #ff9a2e, #ff7d00); color: #fff;
}
.fc-price { display: flex; align-items: baseline; gap: 1px; margin-top: 9px; color: var(--ink); }
.fc-price .fc-cur { font-size: 13px; font-weight: 600; }
.fc-price .fc-num { font-size: 23px; font-weight: 700; line-height: 1.1; letter-spacing: -0.5px; }
.fee-card:has(input:checked) .fc-price { color: var(--primary); }
.fc-orig { font-size: 11.5px; color: var(--muted); text-decoration: line-through; margin-top: 2px; }
.fc-desc { font-size: 11.5px; color: var(--muted); margin-top: 7px; }
/* 选中指示：右上角圆形对勾 */
.fc-check {
  position: absolute; top: 11px; right: 11px;
  width: 18px; height: 18px; border-radius: 50%;
  border: 1.5px solid #d5d8e0; background: var(--white); color: transparent;
  display: grid; place-items: center; transition: all .18s;
}
.fc-check svg { width: 11px; height: 11px; }
.fee-card:has(input:checked) .fc-check {
  border-color: var(--primary); background: var(--primary); color: #fff;
}

/* 早鸟截止提示（仅在有真实截止时间时展示） */
.fee-note {
  margin-top: 11px; text-align: center;
  font-size: 11.5px; color: #c96a00;
}

/* ===== 优惠码入口 ===== */
.code-box {
  margin-top: 14px; padding: 12px 13px;
  border: 1.5px dashed #c9d7ec; border-radius: 12px;
  background: linear-gradient(180deg, #fbfdff 0%, #f7faff 100%);
  transition: border-color .18s, background .18s;
}
.code-box:hover { border-color: var(--primary); }
.code-box.is-disabled {
  border-style: solid; border-color: var(--line);
  background: var(--line-soft);
}
.cb-hd { display: flex; align-items: center; gap: 7px; }
.cb-ico { flex: none; display: grid; place-items: center; width: 20px; height: 20px; color: var(--primary); }
.cb-ico svg { width: 18px; height: 18px; }
.code-box.is-disabled .cb-ico { color: var(--muted); }
.cb-title { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.cb-tag {
  font-size: 10.5px; line-height: 1.7; padding: 0 6px; border-radius: 7px;
  background: var(--white); border: 1px solid var(--line); color: var(--muted);
}
.cb-input {
  width: 100%; margin-top: 9px; padding: 9px 12px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--white);
  font-size: 14px; letter-spacing: 1.5px; color: var(--ink);
  font-family: inherit; text-transform: uppercase; outline: none;
  transition: border-color .18s, box-shadow .18s;
}
.cb-input::placeholder { letter-spacing: 0; color: var(--muted); }
.cb-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.cb-input:disabled { background: transparent; color: var(--muted); cursor: not-allowed; }
.code-box .free-tip {
  margin-top: 8px; font-size: 11.5px; line-height: 1.5; color: #0958d9;
}

/* ===== 预览 ===== */
.preview-list { display: flex; flex-direction: column; gap: 0; }
.preview-item {
  display: flex; padding: 10px 0; border-bottom: 1px solid var(--line-soft);
}
.preview-item:last-child { border-bottom: none; }
.pi-label { width: 100px; color: var(--muted); font-size: 13px; flex-shrink: 0; }
.pi-value { color: var(--ink); font-size: 13px; word-break: break-all; line-height: 1.7; }
.pi-sub { display: block; color: var(--muted); font-size: 11.5px; margin-top: 1px; }

/* ===== 按钮 ===== */
.form-actions { margin-top: 18px; display: flex; gap: 10px; }
.form-actions.dual { justify-content: space-between; }
.submit-hint {
  margin-top: 10px; text-align: center;
  font-size: 11.5px; color: var(--muted); line-height: 1.5;
}
.btn-primary, .btn-secondary {
  flex: 1; padding: 13px; border: none; border-radius: 10px;
  font-size: 16px; font-weight: 600; cursor: pointer; transition: opacity 0.2s;
  font-family: inherit;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:active { opacity: 0.85; }
.btn-secondary { background: var(--line-soft); color: var(--text); }

/* ===== Toast ===== */
.toast {
  position: fixed; bottom: 40px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,0.8); color: #fff; padding: 10px 18px;
  border-radius: 8px; font-size: 14px; z-index: 999; max-width: 80%; text-align: center;
}
