:root {
  --navy: #16365c;
  --navy-deep: #0d2544;
  --navy-soft: #2b5586;
  --gold: #b8934a;
  --ink: #1b2735;
  --ink-2: #4a5a6e;
  --ink-3: #8296ab;
  --line: #e2e9f2;
  --bg: #f2f6fb;
  --white: #ffffff;
  --ok: #1f7a4d;
  --warn: #b03a2e;
  --amber-bg: #fdf6e6;
  --amber-line: #e8c87a;
  --radius: 16px;
  --shadow: 0 2px 4px rgba(16,42,74,.04), 0 12px 28px rgba(16,42,74,.07);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    "Hiragino Sans GB", "Source Han Sans CN", "Noto Sans SC", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.page { min-height: 100vh; display: flex; flex-direction: column; }

/* ---------- 顶部 ---------- */
.hero {
  background: linear-gradient(160deg, #1b416f 0%, var(--navy-deep) 100%);
  color: #fff;
  padding: 30px 22px 30px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  right: -70px; top: -90px;
  width: 250px; height: 250px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(184,147,74,.28), transparent 68%);
}
.hero .kicker {
  font-size: 11.5px;
  letter-spacing: .16em;
  color: #a9c2e0;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.hero h1 {
  margin: 0 0 8px;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: .01em;
  line-height: 1.42;
}
.hero p {
  margin: 0;
  font-size: 13px;
  color: #b9cde5;
}
.hero .rule {
  width: 34px; height: 2px;
  background: var(--gold);
  margin: 14px 0 12px;
  border-radius: 2px;
}

/* ---------- 主体 ---------- */
main {
  flex: 1;
  width: 100%;
  max-width: 660px;
  margin: 0 auto;
  padding: 18px 14px 40px;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  margin-bottom: 14px;
}

.card-title {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin: 0 0 16px;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--navy);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.card-title .idx {
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: var(--navy);
  width: 19px; height: 19px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  transform: translateY(-1px);
}
.card-title .hint {
  margin-left: auto;
  font-size: 11.5px;
  font-weight: 400;
  color: var(--ink-3);
}

/* ---------- 表单 ---------- */
.field {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed #eef3f9;
}
.field:last-child { border-bottom: none; }
.field > label, .field > .lbl {
  flex: 0 0 88px;
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.35;
}
.field > label .req, .field > .lbl .req { color: var(--warn); margin-left: 2px; }
.field .ctl { flex: 1; min-width: 0; }

input[type="text"], input[type="tel"], select {
  width: 100%;
  padding: 9px 11px;
  font-size: 14.5px;
  font-family: inherit;
  color: var(--ink);
  background: #f8fafd;
  border: 1px solid var(--line);
  border-radius: 9px;
  outline: none;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
input:focus, select:focus {
  border-color: var(--navy-soft);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(43,85,134,.11);
}
input:disabled { color: var(--ink-3); background: #fbfcfe; }

.ro {
  font-size: 14.5px;
  color: var(--ink);
  padding: 9px 0;
  word-break: break-all;
}
.ro.muted { color: var(--ink-3); font-size: 13px; }

.ro-wrap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.peek {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--navy-soft);
  font-size: 11.5px;
  padding: 2px 8px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
}
.peek:active { background: #eef4fb; }

.badge-fix {
  font-size: 11px;
  color: var(--gold);
  background: var(--amber-bg);
  border: 1px solid var(--amber-line);
  border-radius: 5px;
  padding: 1px 6px;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}

/* ---------- 登录 ---------- */
.login-lead {
  font-size: 13.5px;
  color: var(--ink-2);
  margin: -4px 0 18px;
  line-height: 1.7;
}
.login-lead b { color: var(--navy); font-weight: 600; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  padding: 13px 18px;
  font-size: 15.5px;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background: var(--navy);
  border: none;
  border-radius: 11px;
  cursor: pointer;
  transition: background .15s, transform .08s, opacity .15s;
  letter-spacing: .02em;
}
.btn:hover { background: #1d4472; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.ghost {
  background: #fff;
  color: var(--navy);
  border: 1px solid #cfdcea;
  font-weight: 500;
  font-size: 14px;
}
.btn.ghost:hover { background: #f6f9fd; }
.btn.sm { width: auto; padding: 7px 14px; font-size: 13px; border-radius: 8px; }

.msg {
  margin-top: 12px;
  font-size: 13px;
  color: var(--warn);
  background: #fdf0ee;
  border: 1px solid #f3c9c2;
  border-radius: 9px;
  padding: 9px 12px;
  display: none;
}
.msg.show { display: block; }

/* ---------- 参保意愿 ---------- */
.intent-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 4px 0 6px;
}
.intent-opt {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 18px 10px 16px;
  border: 1.5px solid var(--line);
  border-radius: 13px;
  background: #fbfcfe;
  cursor: pointer;
  transition: all .16s;
  text-align: center;
}
.intent-opt input { position: absolute; opacity: 0; pointer-events: none; }
.intent-opt .num {
  font-size: 21px;
  font-weight: 700;
  line-height: 1;
  color: var(--ink-3);
  font-family: "SF Mono", ui-monospace, Consolas, monospace;
}
.intent-opt .txt { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.intent-opt .sub { font-size: 11.5px; color: var(--ink-3); }

.intent-opt.on {
  border-color: var(--navy);
  background: linear-gradient(165deg, #f2f7ff, #e8f0fb);
  box-shadow: 0 3px 12px rgba(22,54,92,.11);
}
.intent-opt.on .num { color: var(--navy); }
.intent-opt.on .txt { color: var(--navy); }
.intent-opt.on::after {
  content: "✓";
  position: absolute;
  top: 7px; right: 9px;
  font-size: 11px;
  color: #fff;
  background: var(--navy);
  width: 16px; height: 16px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
}

.sub-panel {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 11px;
  background: #f7fafd;
  border: 1px solid var(--line);
}
.sub-panel[hidden] { display: none; }
.sub-panel h4 {
  margin: 0 0 10px;
  font-size: 13.5px;
  color: var(--navy);
  font-weight: 600;
}
.sub-panel .field { padding: 6px 0; border-bottom: none; }
.sub-panel .field > .lbl { flex: 0 0 118px; font-size: 13px; }

.radios { display: flex; gap: 10px; }
.radios label {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px;
  border: 1.5px solid var(--line);
  border-radius: 9px;
  background: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: all .15s;
}
.radios input { accent-color: var(--navy); margin: 0; }
.radios label.on { border-color: var(--navy); background: #eef4fc; color: var(--navy); font-weight: 600; }

/* ---------- 提示块 ---------- */
.note {
  font-size: 13px;
  line-height: 1.75;
  padding: 13px 15px;
  border-radius: 11px;
  margin-top: 12px;
}
.note.amber { background: var(--amber-bg); border: 1px solid var(--amber-line); color: #7a5a18; }
.note.blue { background: #eef4fc; border: 1px solid #cfdff2; color: #24466f; }
.note.red { background: #fdf0ee; border: 1px solid #f3c9c2; color: #8c2f24; }
.note b { font-weight: 700; }
.note ul { margin: 6px 0 0; padding-left: 18px; }
.note li { margin-bottom: 3px; }

/* ---------- 时间轴 ---------- */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
  position: relative;
  padding: 0 0 16px 22px;
  border-left: 1.5px solid #dbe6f2;
  margin-left: 4px;
}
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -5.5px; top: 6px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--navy-soft);
}
.timeline li.key::before { background: var(--gold); border-color: var(--gold); }
.timeline .t { font-size: 13px; font-weight: 600; color: var(--navy); }
.timeline .d { font-size: 12.5px; color: var(--ink-2); }

/* ---------- 底部提交栏 ---------- */
.actionbar {
  position: sticky;
  bottom: 0;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  padding: 11px 14px calc(11px + env(safe-area-inset-bottom));
  margin: 0 -14px -40px;
  z-index: 30;
}
.actionbar .inner { max-width: 660px; margin: 0 auto; display: flex; gap: 10px; }
.actionbar .btn { flex: 1; }

/* ---------- 回执 ---------- */
.receipt { text-align: center; padding: 8px 4px 4px; }
.receipt .tick {
  width: 62px; height: 62px;
  margin: 4px auto 14px;
  border-radius: 50%;
  background: linear-gradient(160deg, #24774b, #1a5c3a);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 29px;
  box-shadow: 0 8px 20px rgba(31,122,77,.24);
}
.receipt h2 { margin: 0 0 6px; font-size: 19px; color: var(--navy); }
.receipt .lead { font-size: 13.5px; color: var(--ink-2); margin: 0 0 18px; }

.kv {
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 14px;
}
.kv .row {
  display: flex;
  font-size: 13.5px;
  padding: 10px 14px;
  border-bottom: 1px solid #eef3f9;
  background: #fff;
}
.kv .row:last-child { border-bottom: none; }
.kv .row:nth-child(even) { background: #fafcfe; }
.kv .k { flex: 0 0 100px; color: var(--ink-3); }
.kv .v { flex: 1; color: var(--ink); font-weight: 500; word-break: break-all; }

.tag {
  display: inline-block;
  font-size: 12px;
  padding: 2px 9px;
  border-radius: 20px;
  font-weight: 600;
}
.tag.join { background: #e8f4ed; color: #1a5c3a; }
.tag.quit { background: #fdf0ee; color: #8c2f24; }

footer {
  text-align: center;
  font-size: 11.5px;
  color: var(--ink-3);
  padding: 4px 20px 30px;
  line-height: 1.8;
}

.skeleton {
  height: 120px;
  border-radius: var(--radius);
  background: linear-gradient(90deg, #eef3f9 25%, #f7fafd 50%, #eef3f9 75%);
  background-size: 400% 100%;
  animation: sk 1.3s ease infinite;
  margin-bottom: 14px;
}
@keyframes sk { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

@media (max-width: 400px) {
  .field { flex-wrap: wrap; gap: 4px; }
  .field > label, .field > .lbl { flex: 0 0 100%; font-size: 12.5px; color: var(--ink-3); }
  .field .ctl { flex: 1 0 100%; }
  .intent-opt { padding: 15px 6px 13px; }
  .hero h1 { font-size: 19px; }
}

/* 回执内的提示块保持左对齐（避免继承居中出现断行错位） */
.receipt .note { text-align: left; }

/* ---------- 字段填写样例（唯一提示手段，需醒目但不惊扰） ---------- */
.field-tip {
  margin-top: 8px;
  padding: 8px 10px;
  background: #fdf8ec;
  border: 1px solid #ecdcb4;
  border-radius: 9px;
  font-size: 12.5px;
  line-height: 1.7;
  color: #6d5a35;
}
.field-tip b {
  color: #8a6720;
  font-weight: 700;
  white-space: nowrap;
}
