/* ============================================================
   手机网页版（H5）外壳样式
   - 750rpx 设计稿 → html font-size: 13.3333vw（1rem = 100rpx）
   - 桌面浏览器最大宽度 560px，居中显示
   ============================================================ */

html {
  font-size: 13.3333vw;
}

@media (min-width: 560px) {
  html {
    font-size: 74.6667px;
  }
}

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

body {
  max-width: 560px;
  margin: 0 auto;
  position: relative;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  color: inherit;
}

input,
textarea {
  font-family: inherit;
  border: none;
  outline: none;
  background: transparent;
}

/* 顶部导航（模拟小程序导航栏） */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 0.88rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border-bottom: 1px solid #ededed;
}

.navbar-title {
  font-size: 0.32rem;
  font-weight: 600;
  color: #1a1d21;
}

.navbar-back {
  position: absolute;
  left: 0.24rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.7rem;
  line-height: 1;
  color: #1a1d21;
}

.navbar-share {
  position: absolute;
  right: 0.24rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.28rem;
  color: var(--brand, #1a6fd4);
  display: flex;
  align-items: center;
  gap: 0.08rem;
}

/* 自定义数字键盘限制在同宽容器内 */
.kb {
  max-width: 560px;
  margin: 0 auto;
}

/* ---------------- Toast ---------------- */
.h5-toast {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  max-width: 5.6rem;
  padding: 0.22rem 0.36rem;
  background: rgba(17, 17, 17, 0.82);
  color: #ffffff;
  font-size: 0.28rem;
  line-height: 1.5;
  border-radius: 0.14rem;
  z-index: 1200;
  text-align: center;
  animation: h5-fade-in 0.15s ease-out;
}

@keyframes h5-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ---------------- Modal（仿 wx.showModal） ---------------- */
.h5-mask {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.6rem;
}

.h5-modal {
  width: 100%;
  max-width: 5.4rem;
  background: #ffffff;
  border-radius: 0.16rem;
  overflow: hidden;
  animation: h5-zoom-in 0.16s ease-out;
}

@keyframes h5-zoom-in {
  from { transform: scale(0.92); opacity: 0.6; }
  to { transform: scale(1); opacity: 1; }
}

.h5-modal-title {
  padding: 0.44rem 0.4rem 0;
  font-size: 0.34rem;
  font-weight: 600;
  text-align: center;
  color: #1a1d21;
}

.h5-modal-body {
  padding: 0.24rem 0.4rem 0.44rem;
  font-size: 0.28rem;
  color: #5c6470;
  line-height: 1.65;
  text-align: center;
  white-space: pre-wrap;
  word-break: break-all;
}

.h5-modal-actions {
  display: flex;
  border-top: 1px solid #ededed;
}

.h5-modal-actions button {
  flex: 1;
  padding: 0.3rem 0;
  font-size: 0.32rem;
  color: #5c6470;
}

.h5-modal-actions button.primary {
  color: var(--brand, #1a6fd4);
  font-weight: 600;
}

.h5-modal-actions button + button {
  border-left: 1px solid #ededed;
}

/* 微信分享引导 */
.h5-share-tip {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.72);
  z-index: 1300;
  color: #ffffff;
  padding: 1.2rem 0.6rem 0;
  text-align: center;
  font-size: 0.32rem;
  line-height: 1.8;
}

.h5-share-tip .arrow {
  font-size: 0.8rem;
  display: block;
  text-align: right;
  margin-bottom: 0.2rem;
  padding-right: 0.2rem;
}

/* 加载中 */
.h5-loading {
  padding: 1.4rem 0;
  text-align: center;
  color: #8b939f;
  font-size: 0.27rem;
}

/* ---------------- 小程序 → 网页 适配补充 ---------------- */

/* 退格图标（内联 SVG） */
.kb-del-icon {
  width: 0.48rem;
  height: 0.48rem;
  display: block;
}

/* 备注输入框 placeholder */
.wx-remark-input::placeholder {
  color: #b2b2b2;
}

.input::placeholder,
.textarea::placeholder {
  color: #b3b9c2;
}

/* 网页上按钮需要 width 撑满（小程序 button 默认块级满宽） */
.btn {
  width: 100%;
  cursor: pointer;
}

.btn[disabled] {
  cursor: not-allowed;
}

.wx-pay-btn {
  cursor: pointer;
}

.wx-pay-btn[disabled] {
  cursor: not-allowed;
}

/* 可点击元素手势 */
.func-item,
.type-item,
.kb-key,
.kb-pay,
.tip-item,
.footer-link,
.navbar-share,
.navbar-back,
.item {
  cursor: pointer;
}

/* iOS 输入框圆角/阴影清理 */
input,
textarea {
  -webkit-appearance: none;
  appearance: none;
  border-radius: 0;
  box-shadow: none;
}

