:root {
  --bg: #fbf7f2;
  --card: #ffffff;
  --ink: #2c2724;
  --ink-2: #6d625a;
  --ink-3: #9b8f85;
  --line: #ece2d8;
  --brand: #c2593c;
  --brand-soft: #f7e4da;
  --brand-deep: #9c452e;
  --warm: #e8a87c;
  --ok: #3f7d5a;
  --danger: #c0392b;
  --radius: 16px;
  --shadow: 0 8px 28px rgba(122, 84, 60, 0.08);
}

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 560px; margin: 0 auto; padding: 0 16px 48px; }

/* ---------------- 顶部品牌条（统一 LOGO） ---------------- */
.topbrand {
  margin: 0 -16px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.topbrand img { height: 48px; width: auto; display: block; }
.topbrand .tb-tag {
  margin-left: auto;
  flex: none;
  font-size: 11.5px;
  letter-spacing: 1.5px;
  color: var(--brand-deep);
  background: var(--brand-soft);
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

/* ---------------- 头部 ---------------- */
.hero {
  margin: 0 -16px 0;
  padding: 34px 22px 26px;
  background: linear-gradient(160deg, #f6e0cf 0%, #f9ece0 52%, #fbf7f2 100%);
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  right: -60px; top: -70px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232,168,124,.42), rgba(232,168,124,0) 70%);
}
.hero .badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--brand-deep);
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(194,89,60,.16);
  padding: 4px 10px; border-radius: 999px;
  letter-spacing: .5px;
}
.hero h1 {
  margin: 12px 0 6px;
  font-size: 27px;
  letter-spacing: 1px;
  font-weight: 700;
}
.hero p {
  margin: 0;
  color: var(--ink-2);
  font-size: 14.5px;
}
.hero .promise {
  margin-top: 16px;
  background: rgba(255,255,255,.78);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 13px;
  font-size: 13px;
  color: var(--ink-2);
  display: flex; gap: 8px; align-items: flex-start;
}
.hero .promise b { color: var(--brand-deep); font-weight: 600; }

/* ---------------- 卡片 / 表单 ---------------- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 18px;
  margin-top: 16px;
  border: 1px solid #f3ece5;
}
.card h2 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 600;
}
.card .sub { margin: 0 0 14px; font-size: 13px; color: var(--ink-3); }

.field { margin-bottom: 18px; }
.field > label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--ink);
}
.field .req { color: var(--brand); margin-left: 2px; }
.field .hint { font-size: 12.5px; color: var(--ink-3); margin-top: 6px; line-height: 1.5; }

input[type="text"], input[type="tel"], select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fdfbf9;
  border-radius: 12px;
  padding: 13px 14px;
  font-size: 16px;
  color: var(--ink);
  font-family: inherit;
  appearance: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
textarea { min-height: 116px; resize: vertical; line-height: 1.6; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--warm);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(232,168,124,.20);
}
input::placeholder, textarea::placeholder { color: #bdb0a4; }
select {
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%239b8f85' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 380px) { .row2 { grid-template-columns: 1fr; } }

/* 单选卡片 */
.pills { display: flex; gap: 10px; flex-wrap: wrap; }
.pill {
  flex: 1 1 0;
  min-width: 130px;
  position: relative;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 12px;
  cursor: pointer;
  background: #fdfbf9;
  transition: .15s;
}
.pill input { position: absolute; opacity: 0; pointer-events: none; }
.pill .t { font-size: 14.5px; font-weight: 500; }
.pill .d { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.pill:has(input:checked) {
  border-color: var(--brand);
  background: var(--brand-soft);
  box-shadow: 0 0 0 1px var(--brand) inset;
}
.pill:has(input:checked) .t { color: var(--brand-deep); }

/* 上传 */
.uploader { display: flex; flex-wrap: wrap; gap: 10px; }
.up-btn {
  width: 84px; height: 84px;
  border: 1.5px dashed #ddcdbe;
  border-radius: 12px;
  background: #fdfbf9;
  color: var(--ink-3);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; font-size: 12px; cursor: pointer;
}
.up-btn:active { background: var(--brand-soft); }
.up-btn svg { width: 22px; height: 22px; stroke: var(--ink-3); }
.thumb {
  width: 84px; height: 84px; border-radius: 12px; overflow: hidden;
  position: relative; background: #f2ece6; border: 1px solid var(--line);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .del {
  position: absolute; right: -6px; top: -6px;
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(44,39,36,.78); color: #fff;
  border: none; font-size: 13px; line-height: 22px; text-align: center;
  cursor: pointer;
}
.thumb .bar {
  position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: var(--brand); width: 0%;
  transition: width .2s;
}
.thumb .bar.done { width: 100%; opacity: .5; }

/* 隐私勾选 */
.agree {
  display: flex; gap: 10px; align-items: flex-start;
  background: #fdf8f4; border: 1px solid #f1e3d7;
  border-radius: 12px; padding: 12px 13px;
  font-size: 13px; color: var(--ink-2); line-height: 1.6;
}
.agree input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--brand); flex: 0 0 auto; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; border: none; border-radius: 13px;
  padding: 15px 18px;
  font-size: 16.5px; font-weight: 600; font-family: inherit;
  background: var(--brand); color: #fff;
  box-shadow: 0 6px 18px rgba(194,89,60,.22);
  cursor: pointer;
  transition: transform .1s, opacity .15s;
}
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .6; box-shadow: none; }
.btn.ghost {
  background: #fff; color: var(--brand-deep);
  border: 1px solid #eccfc2; box-shadow: none;
}
.btn.link { background: none; color: var(--ink-2); font-weight: 400; font-size: 14px; box-shadow: none; padding: 10px; }

.err {
  display: none;
  background: #fdeeea; color: var(--danger);
  border: 1px solid #f7d4cc; border-radius: 10px;
  padding: 10px 12px; font-size: 13.5px; margin-bottom: 12px;
}
.err.show { display: block; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: #e2a89a; background: #fffaf8; }

/* ---------------- 成功页 ---------------- */
.success { text-align: center; padding: 8px 4px 4px; }
.success .tick {
  width: 62px; height: 62px; margin: 4px auto 14px;
  border-radius: 50%;
  background: #eef6f0;
  display: flex; align-items: center; justify-content: center;
}
.success .tick svg { width: 30px; height: 30px; stroke: var(--ok); }
.success h2 { font-size: 20px; margin: 0 0 6px; }
.success .lead { color: var(--ink-2); font-size: 14px; margin: 0 0 18px; }
.code-box {
  background: #fdf8f4; border: 1px dashed #e3cbba; border-radius: 14px;
  padding: 16px 14px; margin-bottom: 14px;
}
.code-box .k { font-size: 12.5px; color: var(--ink-3); letter-spacing: .5px; }
.code-box .v {
  font-size: 21px; font-weight: 700; letter-spacing: 1.2px;
  color: var(--brand-deep); margin-top: 4px;
  font-variant-numeric: tabular-nums;
  word-break: break-all;
}
.code-box .copy {
  margin-top: 8px; font-size: 13px; color: var(--brand);
  background: none; border: none; cursor: pointer; font-family: inherit;
  text-decoration: underline; text-underline-offset: 3px;
}
.notice {
  text-align: left; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; padding: 13px 14px; font-size: 13.5px; color: var(--ink-2);
  margin-bottom: 16px;
}
.notice b { color: var(--ink); }
.notice ul { margin: 8px 0 0; padding-left: 18px; }
.notice li { margin-bottom: 4px; }
.steps { display: flex; gap: 6px; margin: 18px 0 0; }
.steps .s { flex: 1; text-align: center; font-size: 11.5px; color: var(--ink-3); }
.steps .s .dot {
  width: 100%; height: 4px; border-radius: 3px; background: #ede4da; margin-bottom: 6px;
}
.steps .s.on .dot { background: var(--warm); }
.steps .s.on { color: var(--brand-deep); }

/* ---------------- 查询页 ---------------- */
.ticket-head { display: flex; flex-wrap: wrap; align-items: flex-start;
               justify-content: space-between; gap: 6px 10px; }
.ticket-head > div { flex: 1 1 200px; min-width: 0; }
.ticket-head h2 { font-size: 17px; letter-spacing: .2px; word-break: break-all; }
.status-chip {
  font-size: 12.5px; padding: 4px 10px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand-deep); white-space: nowrap;
}
.meta-list { margin: 12px 0 0; font-size: 13.5px; color: var(--ink-2); }
.meta-list div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed #f1e8e0; }
.meta-list div:last-child { border-bottom: none; }
.meta-list span:last-child { color: var(--ink); text-align: right; }

.timeline { margin: 16px 0 0; padding: 0; list-style: none; }
.timeline li { position: relative; padding: 0 0 18px 26px; font-size: 14px; }
.timeline li::before {
  content: ""; position: absolute; left: 4px; top: 7px;
  width: 9px; height: 9px; border-radius: 50%;
  background: #e6d7c8; border: 2px solid #fff; box-shadow: 0 0 0 1px #e6d7c8;
}
.timeline li::after {
  content: ""; position: absolute; left: 8px; top: 18px; bottom: 0;
  width: 1px; background: #eee3d8;
}
.timeline li:last-child::after { display: none; }
.timeline li.on::before { background: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.timeline .tm { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.timeline .nm { color: var(--ink); }
.timeline li.on .nm { font-weight: 600; color: var(--brand-deep); }

.foot {
  margin-top: 26px; text-align: center;
  font-size: 12px; color: #b3a69a; line-height: 1.9;
}
.foot a { color: #b3a69a; }
.loading { text-align: center; color: var(--ink-3); font-size: 14px; padding: 40px 0; }
.hidden { display: none !important; }
