:root {
  --orange:#f56e48;
  --red:#b6382d;
  --dark:#282b30;
  --muted:#8d929b;
  --bg:#f7f7f9;
  --line:#f0f0f2;
  --gradient:linear-gradient(105deg,#f67b50,#b84730)
}

* {
  box-sizing:border-box
}

html,body {
  margin:0;
  min-height:100%;
  font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;
  color:#18191b;
  background:#eef2f9
}

button,input {
  font:inherit
}

button {
  border:0;
  cursor:pointer
}

input {
  outline:none;
  border:0;
  min-width:0
}

input::placeholder {
  color:#a1a5af
}

button:focus-visible,input:focus-visible {
  outline:2px solid #e36a46;
  outline-offset:2px
}

#app {
  width:100%;
  max-width:430px;
  min-height:100dvh;
  margin:auto;
  background:#fafafa;
  position:relative;
  overflow:hidden;
  box-shadow:0 0 25px #13213d12
}

.screen {
  min-height:100dvh;
  padding-bottom:calc(72px + env(safe-area-inset-bottom));
  background:#fafafa
}

.screen.plain {
  padding-bottom:25px
}

.subhead {
  height:52px;
  display:flex;
  align-items:center;
  justify-content:center;
  position:relative;
  background:#fff;
  font-size:18px;
  font-weight:700;
  color:#161719
}

.subhead .back {
  position:absolute;
  left:16px;
  top:0;
  height:52px;
  width:32px;
  background:none;
  font-size:33px;
  line-height:43px;
  font-weight:300;
  text-align:left
}

.subhead .head-action {
  position:absolute;
  right:16px;
  top:0;
  height:52px;
  background:none;
  color:#de6044;
  font-size:29px;
  font-weight:300
}

.tabbar {
  position:fixed;
  z-index:10;
  bottom:0;
  left:50%;
  transform:translateX(-50%);
  width:100%;
  height:calc(63px + env(safe-area-inset-bottom));
  padding-bottom:env(safe-area-inset-bottom);
  display:grid;
  grid-template-columns:1fr 1fr;
  background:#fff;
  border-top:1px solid #f1f1f1
}

.tabbar button {
  background:#fff;
  color:#a4a8b1;
  font-size:12px;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  gap:2px
}

.tabbar button.active {
  color:#c8543c
}

.tabbar svg {
  height:24px;
  width:24px;
  stroke:currentColor;
  fill:none;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round
}

.demo-strip {
  background:#fff9ec;
  color:#9c6429;
  padding:7px 14px;
  font-size:11px;
  text-align:center;
  line-height:1.35
}

.home {
  background:#a3211b;
  padding:14px 14px 0
}

.hero {
  width:100%;
  display:block;
  aspect-ratio:2.34;
  object-fit:cover;
  border-radius:12px;
  background:#f7c7ab
}

.history {
  margin-top:10px;
  border:1px solid #ffffff32;
  border-radius:12px 12px 0 0;
  background:linear-gradient(145deg,#9e2723 0%,#d43b3b 52%,#922a24 100%);
  padding:15px 16px 6px;
  color:white;
  min-height:calc(100dvh - 246px)
}

.history h1 {
  font-size:22px;
  margin:0;
  text-align:center;
  letter-spacing:1px;
  line-height:42px
}

.history h1 b {
  color:#ffd949;
  padding:0 8px
}

.history .hint {
  font-size:11px;
  text-align:center;
  color:#ffe9db;
  margin:-1px 0 12px
}

.table-head,.table-row {
  display:grid;
  grid-template-columns:17% 18% 13% 28% 24%;
  align-items:center;
  text-align:center
}

.table-head {
  height:43px;
  color:#ffe0d7;
  border-top:1px solid #ffffff33;
  border-bottom:1px solid #ffffff33;
  font-size:13px
}

.scroll-window {
  height:calc(100dvh - 350px);
  min-height:300px;
  max-height:600px;
  overflow:hidden;
  position:relative
}

.rows {
  will-change:transform
}

.table-row {
  min-height:38px;
  border-bottom:1px solid #ffffff18;
  font-size:13px
}

.table-row strong {
  font-weight:600;
  color:#ffeb3b
}

.gender {
  font-size:15px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:18px;
  height:18px;
  border-radius:100%;
  background:#398fec;
  color:#fff
}

.gender.f {
  background:#fa6194
}

.home .bottom-gap {
  height:72px
}

.profile-top {
  background:var(--gradient);
  height:125px;
  color:#fff;
  display:flex;
  align-items:center;
  gap:15px;
  padding:0 21px 16px
}

.shield {
  width:53px;
  height:57px;
  display:grid;
  place-items:center;
  font-size:32px;
  background:linear-gradient(140deg,#e41f19,#a00000);
  border:3px solid white;
  border-radius:22px 22px 27px 27px
}

.profile-name {
  font-size:20px;
  font-weight:700
}

.profile-id {
  font-size:12px;
  margin-top:3px
}

.wallet-card {
  position:relative;
  margin:-24px 15px 15px;
  background:#fff;
  border-radius:11px;
  box-shadow:0 5px 10px #00000010;
  padding:22px 20px 20px
}

.balances {
  display:grid;
  grid-template-columns:1fr 1fr;
  text-align:center;
  margin-bottom:20px
}

.balances>div:first-child {
  border-right:1px solid #eee
}

.balance-label {
  font-size:13px;
  color:#929292
}

.balance-number {
  font-size:21px;
  font-weight:700;
  margin-top:7px
}

.balance-number.accent {
  color:var(--orange)
}

.actions {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:15px
}

.primary {
  background:var(--gradient);
  color:white;
  border-radius:10px;
  height:43px;
  font-size:16px;
  font-weight:700;
  letter-spacing:1px;
  box-shadow:0 5px 10px #f9654026
}

.primary:active {
  filter:brightness(.94)
}

.menu {
  margin:0 15px;
  background:white;
  border-radius:11px;
  overflow:hidden
}

.menu button {
  width:100%;
  height:55px;
  display:flex;
  align-items:center;
  background:white;
  border-bottom:1px solid #f7f7f7;
  text-align:left;
  font-size:16px;
  color:#333;
  padding:0 16px;
  gap:13px
}

.menu button:last-child {
  border:0
}

.menu .symbol {
  font-size:23px;
  color:#ed744f;
  width:20px;
  text-align:center
}

.menu .chev {
  margin-left:auto;
  color:#c7c7c7;
  font-size:26px;
  font-weight:200
}

.cards-wrap {
  padding:16px
}

.bank-tile {
  position:relative;
  overflow:hidden;
  background:linear-gradient(115deg,#dc6041,#ad4935);
  border-radius:11px;
  color:#fff;
  padding:20px;
  height:151px;
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-bottom:12px
}

.bank-tile::before,.bank-tile::after {
  content:"";
  position:absolute;
  right:-19px;
  top:-28px;
  border-radius:50%;
  width:98px;
  height:98px;
  background:#ffffff16
}

.bank-tile::after {
  right:-4px;
  top:-32px;
  width:69px;
  height:69px;
  background:#ffffff18
}

.bank-tile b {
  font-size:17px;
  position:relative
}

.bank-tile span {
  font-size:14px;
  position:relative
}

.bank-tile button {
  position:absolute;
  right:20px;
  bottom:18px;
  background:#ffffff32;
  color:white;
  border-radius:10px;
  padding:7px 15px;
  font-size:12px
}

.empty {
  color:#9b9da2;
  text-align:center;
  margin-top:25vh
}

.field-panel {
  margin:20px 13px;
  background:#fff;
  border-radius:11px;
  padding:20px
}

.label {
  display:block;
  color:#62666a;
  font-size:14px;
  margin-bottom:9px
}

.text-input {
  width:100%;
  height:45px;
  border-radius:10px;
  background:#f5f5f7;
  padding:0 13px;
  font-size:15px;
  color:#30343a
}

.field {
  margin-bottom:17px
}

.helper {
  font-size:12px;
  color:#94979d;
  margin:15px 0 20px
}

.wide {
  width:100%
}

.form-section {
  background:#fff;
  border-radius:10px;
  padding:18px 15px;
  margin-bottom:15px
}

.withdraw-body {
  padding:17px 16px
}

.available {
  font-size:14px;
  color:#777;
  margin-bottom:16px
}

.available b {
  color:var(--orange)
}

.selected-bank {
  display:flex;
  align-items:center;
  gap:12px;
  width:100%;
  min-height:70px;
  text-align:left;
  background:var(--gradient);
  border-radius:10px;
  color:white;
  padding:13px 15px;
  margin-bottom:16px
}

.selected-bank .cardicon {
  font-size:25px
}

.selected-bank small {
  font-size:12px
}

.selected-bank .chev {
  margin-left:auto;
  font-size:26px
}

.amount-input {
  height:40px;
  display:flex;
  align-items:center;
  gap:7px
}

.amount-input span {
  font-size:18px;
  font-weight:700
}

.amount-input input {
  flex:1;
  background:transparent;
  font-size:18px
}

.pin {
  display:flex;
  gap:7px
}

.pin input {
  width:100%;
  height:47px;
  border:1px solid #e9e9eb;
  border-radius:8px;
  text-align:center;
  font-size:22px;
  background:#fff
}

.inline-link {
  background:none;
  color:#ed6443;
  font-size:12px;
  display:block;
  margin:14px 0 0 auto;
  padding:0
}

.records-toggle {
  background:#fff;
  width:100%;
  padding:14px 16px;
  border-radius:10px;
  text-align:left;
  font-size:16px;
  font-weight:700;
  color:#343434;
  display:flex;
  justify-content:space-between;
  margin-top:16px
}

.records-toggle small {
  font-weight:400;
  color:#a0a0a0
}

.record-empty {
  background:white;
  color:#aaa;
  text-align:center;
  padding:20px;
  border-radius:0 0 10px 10px;
  font-size:13px
}

.initial {
  background:#fff;
  border-radius:10px;
  padding:16px;
  color:#96999e;
  margin:20px 13px 0;
  font-size:14px
}

.center-empty {
  position:absolute;
  top:22%;
  left:0;
  width:100%;
  text-align:center;
  color:#999;
  font-size:15px
}

.overlay {
  position:fixed;
  inset:0;
  z-index:30;
  background:#0009;
  display:flex;
  justify-content:center;
  align-items:center;
  padding:15px
}

.auth-overlay {
  backdrop-filter:blur(5px)
}

.auth-card {
  background:white;
  border-radius:11px;
  width:min(100%,370px);
  padding:28px 20px 23px;
  max-height:92dvh;
  overflow:auto
}

.auth-logo {
  width:75px;
  height:75px;
  object-fit:contain;
  display:block;
  margin:0 auto 6px;
  border-radius:11px
}

.auth-card h2 {
  text-align:center;
  margin:0 0 30px;
  font-size:23px;
  color:#0b0b0b
}

.auth-field {
  height:42px;
  border:1px solid #e9e9ee;
  border-radius:10px;
  display:flex;
  align-items:center;
  overflow:hidden;
  background:#f7f8fa;
  margin-bottom:13px
}

.auth-field .input-icon {
  flex:0 0 42px;
  text-align:center;
  color:#99a1b0;
  font-size:20px
}

.auth-field input {
  height:100%;
  flex:1;
  background:transparent;
  font-size:14px
}

.auth-field button {
  width:40px;
  height:100%;
  color:#99a1b0;
  background:#f9fafb;
  font-size:18px
}

.auth-submit {
  width:100%;
  margin-top:12px
}

.auth-swap {
  display:block;
  margin:19px auto 0;
  color:#e45a3c;
  background:transparent;
  font-size:14px
}

.auth-help {
  color:#999;
  text-align:center;
  font-size:11px;
  margin:17px 0 0;
  line-height:1.5
}

.sheet-overlay {
  align-items:flex-end;
  padding:0
}

.sheet {
  background:#fff;
  border-radius:15px 15px 0 0;
  width:min(100%,430px);
  padding:20px 22px calc(22px + env(safe-area-inset-bottom));
  max-height:90dvh;
  overflow:auto
}

.sheet-header {
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:22px
}

.sheet-header b {
  font-size:18px
}

.sheet-header button {
  background:transparent;
  color:#888;
  font-size:27px
}

.confirm-box {
  background:#fff;
  border-radius:5px;
  width:min(100%,290px);
  text-align:center;
  overflow:hidden
}

.confirm-box h3 {
  font-size:16px;
  margin:15px 0 21px
}

.confirm-box p {
  font-size:14px;
  color:#919191;
  margin:0 0 16px
}

.confirm-buttons {
  display:flex;
  border-top:1px solid #eee
}

.confirm-buttons button {
  height:43px;
  width:50%;
  background:white;
  font-size:15px
}

.confirm-buttons button+button {
  color:#d96144;
  border-left:1px solid #eee
}

.toast {
  position:fixed;
  bottom:95px;
  left:50%;
  transform:translateX(-50%);
  background:#272727ec;
  color:white;
  border-radius:8px;
  padding:10px 15px;
  font-size:13px;
  z-index:50;
  white-space:nowrap;
  max-width:90vw;
  overflow:hidden;
  text-overflow:ellipsis
}

@media(max-width:340px) {
  .table-head,.table-row {
    font-size:11px
  }

  .auth-card {
    padding-left:15px;
    padding-right:15px
  }

  .pin {
    gap:4px
  }

}

@media(min-width:431px) {
  #app {
    min-height:100vh
  }

  .overlay {
    max-width:430px;
    left:50%;
    transform:translateX(-50%)
  }

}

/* 手机视口全宽显示，登录/注册弹窗随屏幕宽度伸缩。 */
[data-page], .subhead a { text-decoration: none; }
.tabbar a {
  background: #fff;
  color: #a4a8b1;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 2px;
}
.tabbar a.active { color: #c8543c; }
.menu a {
  width: 100%;
  height: 55px;
  display: flex;
  align-items: center;
  background: #fff;
  border-bottom: 1px solid #f7f7f7;
  text-align: left;
  font-size: 16px;
  color: #333;
  padding: 0 16px;
  gap: 13px;
}
.menu a:last-child { border: 0; }
.primary[href] { display: grid; place-items: center; }
.subhead a { color: inherit; }
[hidden] { display: none !important; }
body.modal-open { overflow: hidden; }
.overlay {
  width: 100%;
  max-width: none;
  left: 0;
  right: 0;
  transform: none;
  padding: 16px;
}
.auth-card {
  width: 100%;
  max-width: 430px;
  min-width: 0;
}
@media (max-width: 768px) {
  #app { max-width: none; box-shadow: none; }
  .auth-card { max-width: none; }
}
@media (min-width: 769px) {
  .overlay {
    width: 430px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
  }
}

/* 首页轮播图由 /api/mobile/home 返回的 banners 更新。 */
.hero-slider {
  width: 100%;
  aspect-ratio: 2.34;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: #f7c7ab;
}
.hero-slides {
  width: 100%;
  height: 100%;
  display: flex;
  transition: transform .35s ease;
}
.hero-slide {
  min-width: 100%;
  height: 100%;
  display: block;
}
.hero-slide .hero {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border-radius: 0;
  object-fit: cover;
}
.hero-dots {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 7px;
}
.hero-dots button {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffffff99;
  padding: 0;
}
.hero-dots button.active {
  width: 17px;
  border-radius: 5px;
  background: #fff;
}
.auth-submit:disabled { opacity: .7; cursor: wait; }
