/* ============================================================
   PaySys 收银台样式
   配色：字体日记网主题黄 #fff12f（填充色，配黑字）
        支付渠道色：支付宝 #1677ff / 微信 #07c160
   字号与响应式策略对齐 donate/index-simple.html：
   手机端直接给大字（标题 26px / 正文 15-16px），≥768px 再放大
   ============================================================ */

:root {
  /* 品牌黄：只做「填充」，上面一律压深色字，保证对比度 */
  --y: #fff12f;
  --y-deep: #ecdc00;
  --y-soft: #fffbdd;
  --y-line: #f2e57a;

  /* 文字 */
  --ink: #111;
  --ink-2: #333;
  --muted: #888;

  /* 支付渠道 */
  --alipay: #1677ff;
  --alipay-dark: #0d5fd6;
  --wechat: #07c160;
  --wechat-dark: #06a851;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  border: none;
  outline: none;
  font-family: "微软雅黑", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body {
  background: #000;
  color: var(--ink-2);
  padding: 20px 15px;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  /* 顶部对齐 + item 的 margin:auto，内容短时居中、内容长时可滚动，
     避免 flex 垂直居中把超长页面顶部裁掉 */
  align-items: flex-start;
  justify-content: center;
  -webkit-text-size-adjust: 100%;
}

.ps-wrap {
  width: 100%;
  max-width: 480px;
  margin: auto;
}

/* ---------- 卡片 ---------- */
.ps-card {
  background: #f0f0f0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}

.ps-head {
  background: var(--y);
  color: var(--ink);
  padding: 22px 16px 24px;
  text-align: center;
  border-radius: 16px 16px 0 0;
  position: relative;
}

.ps-head::after {
  content: "";
  position: absolute;
  bottom: -14px;
  left: 0;
  width: 100%;
  height: 28px;
  background: var(--y);
  border-radius: 50% / 14px;
}

.ps-head h1 {
  font-size: 26px;
  font-weight: bold;
  line-height: 1.35;
  position: relative;
  z-index: 2;
}

.ps-head p {
  font-size: 16px;
  color: rgba(0, 0, 0, .68);
  margin-top: 8px;
  line-height: 1.5;
  position: relative;
  z-index: 2;
}

.ps-body {
  background: #fff;
  padding: 24px 18px 20px;
  border-radius: 0 0 16px 16px;
  margin-top: -1px;
}

/* ---------- 价格 ---------- */
.ps-price {
  text-align: center;
  margin: 2px 0 18px;
}

.ps-price .num {
  font-size: 46px;
  font-weight: bold;
  color: var(--ink);
  line-height: 1;
}

.ps-price .num small {
  font-size: 22px;
  font-weight: normal;
  margin-right: 2px;
  color: rgba(0, 0, 0, .5);
}

/* 金额包裹层：给「渠道专属价」标签一个定位锚点 */
.ps-price .num-wrap {
  position: relative;
  display: inline-block;
}

/* 小数位：弱化处理，和整数拉开大小与颜色对比 */
.ps-price .num i {
  font-style: normal;
  font-size: 24px;
  font-weight: normal;
  color: rgba(0, 0, 0, .5);
}

/* 渠道专属价：悬浮在金额右上角的小标签 */
.ps-price-tag {
  position: absolute;
  top: -14px;
  right: -64px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--y);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(236, 220, 0, .45);
}

.ps-price .desc {
  font-size: 15px;
  color: var(--muted);
  margin-top: 10px;
  line-height: 1.5;
}

/* ---------- 表单 ---------- */
.ps-field {
  margin-bottom: 14px;
}

.ps-field label {
  display: block;
  font-size: 14px;
  color: #666;
  margin-bottom: 7px;
}

.ps-input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  font-size: 16px; /* 低于 16px 时 iOS 聚焦会自动放大页面 */
  color: var(--ink-2);
  background: #f5f5f5;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  transition: border-color .2s, box-shadow .2s;
}

.ps-input:focus {
  border-color: var(--ink);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 241, 47, .55);
}

/* ---------- 按钮 ---------- */
.ps-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 52px;
  padding: 0 16px;
  text-align: center;
  background: var(--y);
  color: var(--ink);
  font-size: 18px;
  font-weight: bold;
  border-radius: 10px;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s, transform .06s;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
}

.ps-btn:hover {
  background: var(--y-deep);
}

.ps-btn:active {
  transform: translateY(1px);
}

.ps-btn:focus-visible {
  outline: 3px solid rgba(22, 119, 255, .4);
  outline-offset: 2px;
}

.ps-btn[disabled] {
  background: #e6e2c8;
  color: #8d8a78;
  cursor: not-allowed;
  transform: none;
}

/* 渠道色：只在「真的走这个渠道」的按钮上用 */
.ps-btn-alipay {
  background: var(--alipay);
  color: #fff;
}

.ps-btn-alipay:hover {
  background: var(--alipay-dark);
}

.ps-btn-alipay[disabled] {
  background: #9dc2f7;
  color: #fff;
}

.ps-btn-wechat {
  background: var(--wechat);
  color: #fff;
}

.ps-btn-wechat:hover {
  background: var(--wechat-dark);
}

.ps-btn-wechat[disabled] {
  /* 浅绿底 + 深绿字：既保留渠道色识别，又保证文字/图标可读（原白字仅 1.6:1） */
  background: #b9e5cb;
  color: #2c6e4c;
}

/* 渠道图标：官方矢量，白色单色 + 负空间透出按钮底色 */
.ps-ico {
  width: 22px;
  height: 22px;
  flex: none;
  display: block;
}

.ps-btn-txt {
  display: inline-block;
  line-height: 1.15;
}

/* 按钮副标：主文案下一行小字（如"即将开放"） */
.ps-btn-tag {
  display: block;
  font-size: 11px;
  line-height: 1.1;
  margin-top: 2px;
  font-weight: 400;
  opacity: .92;
  letter-spacing: .5px;
}

/* ---------- 支付按钮排布：单个通栏 / 两个并排 ---------- */
.ps-btns {
  display: flex;
  gap: 10px;
}
.ps-btns .ps-btn {
  flex: 1 1 0;
  min-width: 0;
  padding-left: 8px;
  padding-right: 8px;
}
/* 并排时取消纵向堆叠间距 */
.ps-btns .ps-btn + .ps-btn {
  margin-top: 0;
}
/* 只剩一个按钮（删掉微信 echo 后）：字号恢复标准 */
.ps-btns .ps-btn:only-child {
  padding-left: 0;
  padding-right: 0;
}
.ps-btns .ps-btn:only-child .ps-btn-txt {
  font-size: inherit;
}
/* 两个按钮并排：文字缩一号，避免长文案挤出按钮 */
.ps-btns .ps-btn:not(:only-child) .ps-btn-txt {
  font-size: 15px;
  white-space: normal;
  line-height: 1.25;
  text-align: center;
}

/* 次级按钮：中性描边，避免和黄主按钮抢焦点 */
.ps-btn-ghost {
  background: #fff;
  color: var(--ink);
  border: 1px solid #ddd;
  font-size: 16px;
  height: 46px;
}

.ps-btn-ghost:hover {
  background: #fafafa;
  border-color: var(--ink);
}

.ps-btn-sm {
  width: auto;
  display: inline-flex;
  padding: 0 18px;
  height: 40px;
  font-size: 14px;
}

/* ---------- 提示 ---------- */
.ps-alert {
  padding: 12px 14px;
  border-left: 3px solid transparent;
  border-radius: 10px;
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 16px;
}

.ps-alert-info  { background: #f5f5f4; color: #4a4a4a; border-left-color: #dcdcd8; }
.ps-alert-ok    { background: var(--y-soft); color: #5c5000; border-left-color: var(--y); }
.ps-alert-warn  { background: #fff4e2; color: #8a5300; border-left-color: #f0a000; }
.ps-alert-error { background: #fdecec; color: #b3261e; border-left-color: #e5484d; }

.ps-tip {
  font-size: 14px;
  color: #999;
  line-height: 1.6;
  margin: 12px 0;
  text-align: center;
}

.ps-tip a {
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
  background: linear-gradient(transparent 66%, var(--y) 66%);
}

.ps-tip a:hover {
  background: linear-gradient(transparent 40%, var(--y) 40%);
}

/* ---------- 信息行 ---------- */
.ps-info {
  background: #fafafa;
  border-radius: 10px;
  padding: 4px 14px;
  margin-bottom: 16px;
}

.ps-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 0;
  font-size: 16px;
  border-bottom: 1px dashed #ececec;
}

.ps-row:last-child { border-bottom: none; }

.ps-k { color: var(--muted); flex: none; }

.ps-v {
  color: var(--ink-2);
  text-align: right;
  word-break: break-all;
  font-weight: 500;
}

/* 重点值：黑字 + 黄色马克笔，替代原来的绿色 */
.hl,
.ps-v.hl {
  color: var(--ink);
  font-weight: bold;
  background: linear-gradient(transparent 62%, var(--y) 62%);
}

.ps-v.mono {
  font-family: Consolas, Monaco, monospace;
  font-size: 14px;
  letter-spacing: -.2px;
}

/* ---------- 凭证码 ---------- */
.ps-code {
  background: var(--y-soft);
  border: 1px dashed var(--y-line);
  border-radius: 10px;
  padding: 14px;
  text-align: center;
  margin-bottom: 16px;
}

.ps-code .label {
  font-size: 13px;
  color: #8a7d00;
  margin-bottom: 6px;
}

.ps-code .value {
  font-family: Consolas, Monaco, monospace;
  font-size: 26px;
  letter-spacing: 3px;
  color: var(--ink);
  font-weight: bold;
  word-break: break-all;
}

/* ---------- 步骤 ---------- */
.ps-steps {
  counter-reset: step;
  margin-bottom: 16px;
}

.ps-step {
  position: relative;
  padding-left: 30px;
  font-size: 15px;
  color: #666;
  line-height: 1.5;
  margin-bottom: 10px;
}

.ps-step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1px;
  width: 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  border-radius: 50%;
  background: var(--y);
  color: var(--ink);
  font-size: 12px;
  font-weight: bold;
}

.ps-step b { color: var(--ink-2); }

.ps-actions {
  margin-top: 4px;
}

.ps-actions .ps-btn + .ps-btn,
.ps-btn + .ps-btn {
  margin-top: 10px;
}

/* ---------- 网盘切换（发货页） ---------- */
.ps-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.ps-tab {
  flex: 1;
  height: 42px;
  border-radius: 10px;
  background: #f5f5f5;
  border: 1px solid #e5e5e5;
  color: #666;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
}

.ps-tab.on {
  background: var(--y);
  border-color: var(--y);
  color: var(--ink);
  font-weight: bold;
}

.ps-pan { display: none; }

.ps-pan.on { display: block; }

.ps-qr {
  width: 190px;
  margin: 0 auto;
  padding: 10px;
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
}

.ps-qr img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
}

.ps-qr-tip {
  text-align: center;
  font-size: 13px;
  color: #999;
  margin: 8px 0 4px;
}

/* ---------- 页脚 ---------- */
.ps-foot {
  text-align: center;
  color: #8a8a8a;
  font-size: 13px;
  line-height: 1.9;
  margin-top: 18px;
}

.ps-foot a {
  color: #8a8a8a;
  text-decoration: none;
}

.ps-foot a:hover { color: var(--y); }

/* 黑底页脚上的品牌黄，对比度足够 */
.ps-wx {
  color: var(--y);
  font-weight: bold;
  font-size: 14px;
}

.ps-foot-note {
  color: #6b6b6b;
}

/* ---------- 加载态（跳转支付宝页） ---------- */
.ps-loading {
  text-align: center;
  padding: 10px 0 2px;
  font-size: 14px;
  color: #999;
}

.ps-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin: 0 3px;
  border-radius: 50%;
  background: var(--alipay);
  animation: psblink 1.2s infinite ease-in-out;
}

.ps-dot:nth-child(2) { animation-delay: .2s; }
.ps-dot:nth-child(3) { animation-delay: .4s; }

@keyframes psblink {
  0%, 80%, 100% { opacity: .25; }
  40% { opacity: 1; }
}

/* ---------- 大屏放大（对齐 donate 页的 768 断点） ---------- */
@media (min-width: 768px) {
  body {
    padding: 28px 20px;
  }

  .ps-wrap {
    max-width: 520px;
  }

  .ps-head {
    padding: 26px 20px 28px;
  }

  .ps-head h1 {
    font-size: 32px;
  }

  .ps-head p {
    font-size: 20px;
  }

  .ps-body {
    padding: 28px 22px 24px;
  }

  .ps-price .num {
    font-size: 56px;
  }

  .ps-price .num small {
    font-size: 26px;
  }

  .ps-price .num i {
    font-size: 28px;
  }

  .ps-price .desc,
  .ps-alert,
  .ps-step {
    font-size: 16px;
  }

  .ps-row {
    font-size: 17px;
  }

  .ps-tip {
    font-size: 15px;
  }

  .ps-code .value {
    font-size: 30px;
  }

  .ps-btn {
    height: 56px;
    font-size: 19px;
  }

  /* 桌面端两个按钮并排：文字随之放大一号 */
  .ps-btns .ps-btn:not(:only-child) .ps-btn-txt {
    font-size: 17px;
  }

  .ps-ico {
    width: 24px;
    height: 24px;
  }
}

/* ---------- 窄屏兜底 ---------- */
@media (max-width: 360px) {
  body {
    padding: 14px 10px;
  }

  .ps-head h1 { font-size: 23px; }
  .ps-head p { font-size: 15px; }
  .ps-price .num { font-size: 40px; }
  .ps-price .num i { font-size: 20px; }
  .ps-price .desc { font-size: 14px; }
  .ps-alert { font-size: 14px; }
  .ps-row { font-size: 15px; }
  .ps-code .value { font-size: 22px; letter-spacing: 2px; }
  .ps-btn { font-size: 17px; }
  .ps-ico { width: 20px; height: 20px; }
}
