/* 小储兑换 · 兑换页（移动端，按截图还原） */

:root {
  --c-brand: var(--brand, #f5333f);
  --c-brand-2: #e0202a;
  --c-bg: #f2f3f6;
  --c-panel: #ffffff;
  --c-ink: #20242b;
  --c-ink-2: #4a4f58;
  --c-muted: #9aa0a9;
  --c-line: #f0f1f4;
  --c-ok: #16a05d;
  --c-ok-bg: #e9f8f0;
  --c-warn: #c07d16;
  --c-warn-bg: #fff5e6;
  --c-bad: #d93a32;
  --c-bad-bg: #fdeeee;
  --c-blue: #3d6bff;
  --c-blue-bg: #eaf1ff;
  --c-shadow: 0 6px 22px rgba(20, 26, 40, 0.06);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
[hidden] { display: none !important; }

body.c-body {
  background: #e9ebef;
  color: var(--c-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.c-sprite { display: none; }
.c-ic {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -0.13em;
  flex: none;
}

/* 顶部 */
.c-head {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 520px;
  margin: 0 auto;
  height: 54px;
  padding: 0 12px;
  background: linear-gradient(135deg, #ff4b46 0%, #f0202c 100%);
}
.c-head-btn {
  flex: none;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--c-ink);
  font-size: 18px;
  text-decoration: none;
  box-shadow: var(--c-shadow);
  cursor: pointer;
}
.c-head-title {
  flex: 1;
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.c-wrap {
  max-width: 520px;
  margin: 0 auto;
  padding: 4px 14px 20px;
}

/* 提示 */
.c-tip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 4px auto 12px;
  padding: 4px 14px;
  width: fit-content;
  border-radius: 999px;
  background: #fff0f0;
  color: var(--c-brand);
  font-size: 12.5px;
  font-weight: 600;
}
.c-tip-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--c-brand);
  color: #fff;
  font-size: 11px;
}
.c-tip-dot .c-ic { stroke-width: 2.6; }

/* 卡片 */
.c-card {
  margin-top: 12px;
  padding: 16px;
  border-radius: 16px;
  background: var(--c-panel);
  box-shadow: var(--c-shadow);
}
.c-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 800;
}
.c-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--c-brand);
  color: #fff;
  font-size: 15px;
}

.c-muted { color: var(--c-muted); }
.c-small { font-size: 12.5px; }
.c-empty-text { margin: 8px 0 0; }

/* 表单 */
.c-form { margin-top: 6px; }
.c-field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 0;
  border-bottom: 1px solid var(--c-line);
}
.c-field-name {
  flex: none;
  width: 102px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--c-ink);
}
.c-field-name .c-ic { color: var(--c-brand); font-size: 16px; }
.c-field-input { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; }
.c-field-input input,
.c-field-input select {
  flex: 1;
  min-width: 0;
  height: 34px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--c-ink);
  font-size: 14px;
}
.c-field-input input::placeholder { color: #b7bbc2; }
.c-field-input select {
  appearance: none;
  -webkit-appearance: none;
  font-weight: 600;
}

.c-mini {
  flex: none;
  height: 30px;
  padding: 0 12px;
  border: 1px solid #f6c9cb;
  border-radius: 999px;
  background: #fff;
  color: var(--c-brand);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.c-mini:active { background: #fff5f5; }

/* 隐私协议 */
.c-privacy {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 16px;
  font-size: 12.5px;
  color: var(--c-ink-2);
}
.c-privacy-check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.c-privacy-check input {
  appearance: none;
  -webkit-appearance: none;
  width: 17px;
  height: 17px;
  margin: 0;
  border: 1.5px solid #cfd3da;
  border-radius: 4px;
  background: #fff;
  position: relative;
  cursor: pointer;
}
.c-privacy-check input:checked { border-color: var(--c-brand); background: var(--c-brand); }
.c-privacy-check input:checked::after {
  content: "";
  position: absolute;
  left: 4.5px;
  top: 1.5px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(42deg);
}
.c-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--c-brand);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.c-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 50px;
  margin-top: 16px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #ff4b46 0%, #f0202c 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(240, 32, 44, 0.26);
}
.c-submit:active { transform: scale(0.995); }

/* 说明 */
.c-docs { margin-top: 6px; font-size: 13px; color: var(--c-ink-2); line-height: 1.75; word-break: break-word; }
.c-docs p { margin: 0 0 6px; }
.c-docs img { max-width: 100%; border-radius: 8px; }
.c-docs a { color: var(--c-brand); }

/* 状态 */
.c-status-card { padding-top: 14px; }
.c-status-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.c-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}
.c-badge-ok { background: var(--c-ok-bg); color: var(--c-ok); }
.c-badge-warn { background: var(--c-warn-bg); color: var(--c-warn); }
.c-badge-info { background: var(--c-blue-bg); color: var(--c-blue); }
.c-badge-bad { background: var(--c-bad-bg); color: var(--c-bad); }
.c-badge-mute { background: #f0f1f4; color: var(--c-muted); }

.c-kv { margin: 10px 0 0; }
.c-kv dt { float: left; clear: left; width: 82px; color: var(--c-muted); font-size: 13px; line-height: 28px; }
.c-kv dd { margin: 0 0 0 82px; font-size: 13px; line-height: 28px; color: var(--c-ink-2); word-break: break-word; }

/* 订单号 + 蓝色「复制」文字按钮 */
.c-order-no { word-break: break-all; }
.c-copy-text {
  margin-left: 8px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--c-blue);
  font: inherit;
  font-size: 13px;
  line-height: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: opacity .15s ease;
}
.c-copy-text:active { opacity: .55; }

.c-delivery {
  position: relative;
  margin-top: 14px;
  padding: 12px;
  border: 1px dashed #f3c9cb;
  border-radius: 12px;
  background: #fffafa;
}
.c-delivery-title { font-size: 12.5px; color: var(--c-brand); font-weight: 700; margin-bottom: 6px; }
.c-delivery-body {
  margin: 0;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-all;
  color: var(--c-ink);
}
.c-delivery .c-mini { position: absolute; right: 10px; top: 8px; }

.c-alert {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.6;
}
.c-alert-ok { background: var(--c-ok-bg); color: var(--c-ok); }
.c-alert-err { background: var(--c-bad-bg); color: var(--c-bad); }
.c-alert-warn { background: var(--c-warn-bg); color: var(--c-warn); }

/* 广告 */
.c-ad-img { display: block; width: 100%; margin-top: 6px; border-radius: 12px; }
.c-ad-text { margin-top: 8px; font-size: 13px; color: var(--c-ink-2); line-height: 1.7; }
.c-ad-link { display: inline-block; margin-top: 8px; color: var(--c-brand); font-size: 13px; font-weight: 600; text-decoration: none; }

/* 客服 */
.c-qr { display: block; width: 150px; max-width: 100%; margin: 10px auto; border-radius: 10px; }
.c-contact { margin-top: 6px; font-size: 13px; color: var(--c-ink-2); line-height: 1.75; }

.c-footer { margin: 18px 0 6px; text-align: center; font-size: 11.5px; color: var(--c-muted); }

/* 底部保障 */
.c-trust {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 520px;
  margin: 6px auto 0;
  padding: 14px 14px calc(16px + env(safe-area-inset-bottom));
  text-align: center;
}
.c-trust-item { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.c-trust-icon { color: var(--c-brand); font-size: 20px; }
.c-trust-item b { font-size: 13px; font-weight: 800; }
.c-trust-item span:last-child { font-size: 11.5px; color: var(--c-muted); }

/* 弹窗 */
.c-mask {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(12, 16, 26, 0.48);
}
.c-modal {
  width: 100%;
  max-width: 420px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
}
.c-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--c-line);
}
.c-modal-head h2 { margin: 0; font-size: 16px; font-weight: 800; }
.c-modal-close {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: #f3f4f6;
  color: var(--c-muted);
  font-size: 15px;
  cursor: pointer;
}
.c-modal-body { padding: 14px 16px 18px; overflow-y: auto; font-size: 13px; color: var(--c-ink-2); line-height: 1.8; }
.c-modal-body p { margin: 0 0 8px; }

/* 轻提示 */
.c-toast {
  position: fixed;
  left: 50%;
  bottom: 82px;
  z-index: 90;
  transform: translateX(-50%);
  max-width: 80vw;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(25, 30, 42, 0.92);
  color: #fff;
  font-size: 13px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.c-toast.show { opacity: 1; }
.c-head-btn-ghost { visibility: hidden; }
