* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: 14px; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  background: #d98d5f;
  color: #333;
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }

.phone-wrap { max-width: 480px; min-height: 100vh; margin: 0 auto; box-shadow: 0 0 30px rgba(90, 40, 10, .22); }
.survey { min-height: 100vh; background: #f3b482; padding-bottom: env(safe-area-inset-bottom); }

/* ---------- 顶部橙色头 ---------- */
.hero {
  background: linear-gradient(180deg, #ff7a10 0%, #ff5a00 55%, #ff4b00 100%);
  color: #fff;
  padding: 16px 20px 18px;
  text-align: center;
}
.hero-cover {
  display: block; width: 100%; height: auto;
  border-radius: 10px; margin: 2px auto 12px; box-shadow: 0 4px 14px rgba(0, 0, 0, .16);
}
.hero h1 { margin: 0 0 10px; font-size: 1.21rem; font-weight: 700; letter-spacing: 2px; }
.hero-sub { margin: 0; font-size: 0.86rem; line-height: 1.75; text-align: justify; color: #fff8ef; }
.tips { margin-top: 16px; }
.tips h2 { margin: 0 0 10px; font-size: 1.07rem; font-weight: 700; letter-spacing: 1px; }
.tips ol { list-style: none; margin: 0; padding: 0; text-align: left; }
.tips li { font-size: 0.86rem; line-height: 1.75; color: #fff8ef; margin-bottom: 3px; padding-left: 0; }
.tips .num { font-weight: 700; margin-right: 2px; }
.contact { margin: 4px 0 0; font-size: 0.86rem; line-height: 1.7; color: #fff; text-align: left; padding-left: 2.4em; }

/* ---------- 表单卡片 ---------- */
.form-area { padding: 10px 12px 22px; }
.bar { height: 15px; background: linear-gradient(180deg, #e8864a, #dd7036); border-radius: 1px; }
.card { position: relative; background: #fff; border: 1px solid #df6d34; padding: 12px 12px 14px; }
.corner {
  position: absolute; width: 13px; height: 13px; pointer-events: none;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='13' height='13'><path d='M1 12 L1 4 Q1 1 4 1 L12 1' fill='none' stroke='%23e2743a' stroke-width='1.3'/><circle cx='1' cy='12' r='1.5' fill='%23e2743a'/></svg>") no-repeat center/contain;
}
.corner.tl { left: -2px; top: -2px; }
.corner.tr { right: -2px; top: -2px; transform: scaleX(-1); }
.corner.bl { left: -2px; bottom: -2px; transform: scaleY(-1); }
.corner.br { right: -2px; bottom: -2px; transform: scale(-1); }

.f-label { display: block; color: #c40000; font-size: 0.93rem; font-weight: 700; margin: 0 0 9px; line-height: 1.4; }
.f-label .req { margin-right: 2px; }
.field { margin-bottom: 10px; }
.field:last-child { margin-bottom: 0; }
input[type=text], input[type=tel], select, textarea {
  width: 100%; border: 1px solid #c8d7e0; border-radius: 2px; background: #fff;
  font-size: 1rem; color: #2f3640; font-family: inherit; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input[type=radio], input[type=checkbox] { font-family: inherit; }
input[type=text], input[type=tel] { height: 38px; padding: 0 10px; }
textarea { min-height: 96px; padding: 8px 10px; resize: vertical; line-height: 1.6; }
input:focus, select:focus, textarea:focus { border-color: #f0843f; box-shadow: 0 0 0 2px rgba(240, 132, 63, .14); }
input::placeholder, textarea::placeholder { color: #e29a9a; font-size: 0.93rem; }
.invalid { border-color: #d81e06 !important; background: #fffafa; }
.field-error { display: block; color: #d81e06; font-size: 0.79rem; margin-top: 5px; }

.addr-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; margin-bottom: 9px; }
.street-other { margin-top: 8px; }
.street-detail { margin-top: 8px; min-height: 68px; resize: vertical; }
select {
  height: 34px; padding: 0 20px 0 7px; appearance: none; -webkit-appearance: none; font-size: 0.86rem;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6'><path d='M0 0 l5 6 l5 -6 z' fill='%23666'/></svg>");
  background-repeat: no-repeat; background-position: right 7px center; color: #333;
}
select:disabled { background-color: #f7f7f7; color: #999; }

.pkg-title { color: #c40000; font-size: 0.93rem; font-weight: 700; margin: 0 0 8px; }
.pkg-title .req { margin-right: 2px; }
.pkg-hint { margin: 0 0 11px; font-size: 0.79rem; color: #9a8b80; line-height: 1.5; }
.pkg-list { display: flex; flex-direction: column; gap: 9px; }
.pkg-option {
  display: block; padding: 9px;
  border: 1px solid #e1e7ec; border-radius: 5px; background: #fff; cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.pkg-option:hover { border-color: #f0a875; }
.pkg-option.selected { border-color: #ef7b32; background: #fff8f2; box-shadow: 0 0 0 1px rgba(239, 123, 50, .22); }
.pkg-head { display: block; margin: 0 0 6px; }
.pkg-radio { display: inline-block; vertical-align: middle; width: 17px; height: 17px; margin: 0 6px 0 0; accent-color: #e2601a; cursor: pointer; }
.pkg-inner { display: block; }
.pkg-img { display: block; width: 80%; max-width: 100%; height: auto; margin: 4px auto 8px; border: 1px solid #f0f0f0; border-radius: 2px; object-fit: contain; cursor: zoom-in; }
.pkg-name { display: inline; vertical-align: middle; font-size: 0.86rem; font-weight: 700; color: #c4551b; line-height: 1.5; word-break: break-all; }
.pkg-items { margin: 0; padding: 0; list-style: none; }
.pkg-items li { font-size: 0.75rem; line-height: 1.65; color: #7a7a7a; word-break: break-all; }
.pkg-none-text { font-size: 0.86rem; color: #8a8a8a; vertical-align: middle; }
.pkg-options { margin-top: 10px; padding: 9px 9px 10px; border-top: 1px dashed #f0cfb6; background: #fffdfb; display: flex; flex-direction: column; gap: 7px; }
.pkg-sub-title { font-size: 0.79rem; font-weight: 700; color: #b15a24; line-height: 1.5; }
.pkg-sub-option {
  display: block; padding: 8px;
  border: 1px solid #ecd9c9; border-radius: 4px; background: #fff; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.pkg-sub-option:hover { border-color: #f0a875; }
.pkg-sub-option.selected { border-color: #ef7b32; background: #fff4ea; }
.pkg-sub-option.invalid { border-color: #d81e06; }
.pkg-sub-head { display: block; margin: 0 0 4px; }
.pkg-sub-option input { display: inline-block; vertical-align: middle; width: 15px; height: 15px; margin: 0 6px 0 0; accent-color: #e2601a; cursor: pointer; }
.pkg-sub-inner { display: block; }
.pkg-sub-name { display: inline; vertical-align: middle; font-size: 0.86rem; font-weight: 600; color: #9c5020; line-height: 1.5; word-break: break-all; }
.pkg-sub-img { display: block; width: 80%; max-width: 100%; height: auto; margin: 2px auto 6px; object-fit: contain; border: 1px solid #f0e2d6; border-radius: 4px; background: #fff7f1; cursor: zoom-in; }
.pkg-sub-items { margin: 3px 0 0; padding: 0; list-style: none; }
.pkg-sub-items li { font-size: 0.75rem; line-height: 1.6; color: #7a7a7a; word-break: break-all; }
.pkg-card.invalid { border-color: #d81e06; }
.card.invalid { border-color: #d81e06; }

/* 收件信息合并卡片 */
.recipient-group { display: flex; flex-direction: column; }
.recipient-group > .card { border: 0; padding: 10px 0 0; background: transparent; }
.recipient-group > .card + .card { border-top: 1px dashed #f1d9c6; padding-top: 12px; margin-top: 4px; }
.recipient-group .bar,
.recipient-group .corner { display: none; }

/* 图片放大预览 */
.img-preview {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  padding: 20px; background: rgba(0, 0, 0, .82); cursor: zoom-out;
}
.img-preview img { max-width: 92vw; max-height: 88vh; object-fit: contain; border-radius: 6px; background: #fff; }

/* 单选字段 */
.radio-list { display: flex; flex-direction: column; gap: 8px; }
.radio-option {
  display: flex; align-items: center; gap: 9px; padding: 9px 10px; font-size: 0.93rem; color: #4a4a4a;
  border: 1px solid #e1e7ec; border-radius: 5px; background: #fff; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.radio-option:hover { border-color: #f0a875; }
.radio-option.selected { border-color: #ef7b32; background: #fff8f2; }
.radio-option.invalid { border-color: #d81e06; }
.radio-option input { width: 16px; height: 16px; accent-color: #e2601a; cursor: pointer; }
.radio-text { flex: 1; min-width: 0; word-break: break-all; }

.submit-btn {
  display: block; width: 100%; height: 46px; margin-top: 16px; border: 0; border-radius: 2px;
  background: #c8102e; color: #fff; font-size: 1.14rem; font-weight: 700; letter-spacing: 5px;
  font-family: inherit; cursor: pointer; transition: opacity .15s, transform .1s;
}
.submit-btn:active { transform: translateY(1px); }
.submit-btn:disabled { opacity: .6; cursor: not-allowed; }
.foot-note { text-align: center; font-size: 0.79rem; color: rgba(255,255,255,.8); margin: 14px 0 0; }
.closed-notice { background: #fff; border: 1px solid #df6d34; padding: 20px 16px; text-align: center; color: #c40000; font-size: 1rem; line-height: 1.7; margin-bottom: 12px; }

/* ---------- 提交结果 ---------- */
.mask { position: fixed; inset: 0; background: rgba(0,0,0,.48); display: flex; align-items: center; justify-content: center; padding: 24px; z-index: 50; }
.success-card { background: #fff; border-radius: 10px; width: 100%; max-width: 320px; padding: 26px 22px 22px; text-align: center; box-shadow: 0 12px 40px rgba(0,0,0,.2); }
.success-icon { line-height: 0; margin-bottom: 12px; }
.success-card h3 { margin: 0 0 8px; font-size: 1.29rem; color: #e2541b; }
.success-card p { margin: 0 0 20px; font-size: 0.93rem; line-height: 1.7; color: #666; }
.success-card button { width: 100%; height: 40px; border: 0; border-radius: 4px; background: #f26a21; color: #fff; font-size: 1.07rem; font-family: inherit; cursor: pointer; }

.toast {
  position: fixed; left: 50%; top: 18px; transform: translateX(-50%); z-index: 99;
  background: rgba(40, 30, 25, .92); color: #fff; padding: 9px 16px; border-radius: 20px;
  font-size: 0.93rem; max-width: 86%; text-align: center; box-shadow: 0 6px 20px rgba(0,0,0,.2);
}

@media (min-width: 520px) {
  .phone-wrap { margin: 18px auto; min-height: calc(100vh - 36px); border-radius: 6px; overflow: hidden; }
}
