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

:root {
  --bg0: #140a0d;
  --bg1: #2b1117;
  --wine: #7c1a24;
  --wine2: #a52a35;
  --wine3: #5b1019;
  --gold: #e0bd7c;
  --gold2: #f5e2ba;
  --paper: #fffaf0;
  --paper2: #f7ecd8;
  --ink: #3a2a25;
  --ink2: #7c665a;
  --line: rgba(124, 26, 36, 0.14);
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.38);
  --radius: 20px;
}

html, body { margin: 0; padding: 0; min-height: 100%; }

body {
  background:
    radial-gradient(120% 70% at 50% -10%, #3a161d 0%, var(--bg1) 45%, var(--bg0) 100%),
    var(--bg0);
  color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", "Songti SC", "STSong", serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

#app {
  max-width: 520px;
  margin: 0 auto;
  min-height: 100vh;
  padding-bottom: 92px;
  position: relative;
}
#app::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle at 18% 12%, rgba(224, 189, 124, 0.14), transparent 32%),
    radial-gradient(circle at 82% 6%, rgba(165, 42, 53, 0.22), transparent 38%);
  pointer-events: none;
  z-index: 0;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; }
a { color: inherit; }
.hidden { display: none !important; }

/* ============ 顶栏 ============ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px 12px;
  background: linear-gradient(180deg, rgba(20, 10, 13, 0.96), rgba(20, 10, 13, 0.72) 70%, rgba(20, 10, 13, 0));
  backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  font-size: 21px;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(224, 189, 124, 0.22), rgba(124, 26, 36, 0.35));
  border: 1px solid rgba(224, 189, 124, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.brand-txt b { display: block; color: var(--gold2); font-size: 18px; letter-spacing: 2px; font-weight: 600; }
.brand-txt small { display: block; color: rgba(245, 226, 186, 0.42); font-size: 9.5px; letter-spacing: 2.2px; margin-top: 2px; }

.balance-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12px;
  color: rgba(245, 226, 186, 0.75);
  background: linear-gradient(135deg, rgba(224, 189, 124, 0.14), rgba(124, 26, 36, 0.16));
  border: 1px solid rgba(224, 189, 124, 0.3);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
  white-space: nowrap;
}
.balance-pill b { color: var(--gold2); font-size: 14px; letter-spacing: 0.5px; }

/* ============ 通用 ============ */
.view { padding: 0 16px 8px; position: relative; z-index: 1; }

.panel {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 18px 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(124, 26, 36, 0.06);
  position: relative;
  overflow: hidden;
}
.panel::after {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 100% 0%, rgba(224, 189, 124, 0.16), transparent 40%);
  pointer-events: none;
}

.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 14px;
  position: relative; z-index: 1;
}
.panel-head .title {
  font-size: 15px; font-weight: 600; color: var(--wine3);
  letter-spacing: 1px;
  display: inline-flex; align-items: center; gap: 8px;
}
.panel-head .title::before {
  content: ""; width: 4px; height: 15px; border-radius: 3px;
  background: linear-gradient(180deg, var(--wine2), var(--gold));
}

.micro { font-size: 11px; color: var(--ink2); line-height: 1.7; letter-spacing: 0.3px; }
.micro.center { display: block; text-align: center; margin-top: 8px; }
.label { font-size: 12px; color: var(--ink2); letter-spacing: 1px; margin: 12px 0 8px; }
.label-row { display: flex; align-items: center; justify-content: space-between; }
.label-row .micro { margin: 0; }

.link { font-size: 12px; color: var(--wine); border-bottom: 1px solid rgba(124, 26, 36, 0.25); padding-bottom: 1px; }
.help-dot {
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 12px; color: var(--wine);
  border: 1px solid rgba(124, 26, 36, 0.25);
  background: rgba(124, 26, 36, 0.05);
}

/* ============ 首屏 hero ============ */
.hero {
  position: relative;
  margin: 4px 0 16px;
  padding: 22px 18px 18px;
  border-radius: 24px;
  background:
    linear-gradient(155deg, #93212c 0%, #651521 55%, #3f0f17 100%);
  border: 1px solid rgba(224, 189, 124, 0.32);
  box-shadow: 0 24px 46px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  overflow: hidden;
}
.hero-art { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.9; pointer-events: none; }
.hero-copy { position: relative; z-index: 1; }
.hero-copy h1 {
  margin: 0 0 8px;
  font-size: 25px;
  line-height: 1.4;
  color: #fff3dd;
  letter-spacing: 1.5px;
  font-weight: 600;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}
.hero-copy h1 em { font-style: normal; color: var(--gold2); }
.hero-copy p { margin: 0; font-size: 12px; line-height: 1.8; color: rgba(255, 243, 221, 0.66); max-width: 78%; }

.hero-stats {
  position: relative; z-index: 1;
  margin-top: 18px;
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(6px);
}
.hero-stats .hs { flex: 1; text-align: center; }
.hero-stats .hs b { display: block; font-size: 17px; color: var(--gold2); letter-spacing: 0.5px; }
.hero-stats .hs span { font-size: 10.5px; color: rgba(255, 243, 221, 0.55); letter-spacing: 1px; }
.hero-stats .hs-div { width: 1px; height: 26px; background: rgba(255, 255, 255, 0.14); }

/* ============ 分段控件 ============ */
.segmented {
  display: flex; gap: 6px;
  padding: 5px;
  border-radius: 14px;
  background: rgba(124, 26, 36, 0.06);
  border: 1px solid rgba(124, 26, 36, 0.08);
}
.seg {
  flex: 1;
  padding: 10px 8px;
  border-radius: 10px;
  font-size: 13px;
  color: var(--ink2);
  transition: all 0.18s;
}
.seg.active {
  color: #fff6e4;
  background: linear-gradient(135deg, var(--wine2), var(--wine3));
  box-shadow: 0 6px 14px rgba(124, 26, 36, 0.3);
  font-weight: 600;
}

/* ============ 下拉选择 ============ */
.dropdown { position: relative; }
.dd-trigger {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  padding: 13px 14px;
  border-radius: 13px;
  background: #fffdf8;
  border: 1px solid var(--line);
  font-size: 14px;
  color: var(--ink);
  transition: border-color 0.15s;
}
.dd-trigger:hover, .dd-trigger.open { border-color: rgba(124, 26, 36, 0.42); }
.dd-trigger .dd-value { display: flex; align-items: center; gap: 8px; }
.dd-trigger .pin { font-size: 13px; opacity: 0.6; }
.dd-trigger .caret { color: var(--ink2); font-size: 12px; transition: transform 0.2s; }
.dd-trigger.open .caret { transform: rotate(180deg); }

.dd-panel {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px);
  z-index: 40;
  background: #fffdf8;
  border: 1px solid rgba(124, 26, 36, 0.16);
  border-radius: 14px;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.22);
  padding: 10px;
  animation: popIn 0.16s ease;
}
@keyframes popIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.dd-search {
  width: 100%;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid var(--line);
  font-size: 13px;
  outline: none;
  background: #fff;
}
.dd-list { margin: 8px 0 0; max-height: 208px; overflow-y: auto; }
.dd-opt {
  width: 100%;
  text-align: left;
  padding: 11px 12px;
  border-radius: 9px;
  font-size: 13.5px;
  color: var(--ink);
  display: flex; align-items: center; justify-content: space-between;
}
.dd-opt:hover { background: rgba(124, 26, 36, 0.06); }
.dd-opt.active { color: var(--wine); font-weight: 600; background: rgba(124, 26, 36, 0.08); }
.dd-opt .tick { color: var(--wine); font-size: 12px; }
.dd-empty { padding: 14px; text-align: center; color: var(--ink2); font-size: 12px; }

/* ============ 主按钮 ============ */
.cta {
  position: relative;
  width: 100%;
  margin-top: 14px;
  padding: 15px 18px;
  border-radius: 15px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  color: #fff4de;
  font-size: 15.5px;
  letter-spacing: 2px;
  font-weight: 600;
  background: linear-gradient(135deg, #a92d38, #71141e 65%, #5b1019);
  box-shadow: 0 12px 26px rgba(124, 26, 36, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  overflow: hidden;
  transition: transform 0.12s, box-shadow 0.12s;
}
.cta::after {
  content: "";
  position: absolute; top: 0; left: -60%;
  width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.34), transparent);
  transform: skewX(-18deg);
  animation: sweep 4.6s ease-in-out infinite;
}
@keyframes sweep { 0% { left: -60%; } 55% { left: 120%; } 100% { left: 120%; } }
.cta:active { transform: scale(0.985); }
.cta[disabled] { opacity: 0.72; }
.cta .cta-main { position: relative; z-index: 1; white-space: nowrap; }
.cta .cta-price {
  position: relative; z-index: 1;
  font-size: 12px; letter-spacing: 0.5px;
  padding: 3px 9px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.cta.soft {
  color: var(--wine3);
  background: linear-gradient(135deg, #fbf0d6, #efd7a6);
  box-shadow: 0 8px 20px rgba(224, 189, 124, 0.28);
  border: 1px solid rgba(224, 189, 124, 0.55);
  letter-spacing: 1px;
}
.cta.soft::after { display: none; }
.cta.ghost {
  color: var(--wine);
  background: #fffdf8;
  border: 1px dashed rgba(124, 26, 36, 0.34);
  box-shadow: none;
  font-weight: 500;
  letter-spacing: 1px;
}
.cta.ghost::after { display: none; }

.pool-line {
  display: flex; align-items: center; gap: 8px;
  margin-top: 14px;
  font-size: 11.5px; color: var(--ink2);
}
.pool-line .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #3f8f5a;
  box-shadow: 0 0 0 3px rgba(63, 143, 90, 0.14);
}

/* ============ 流程 ============ */
.flow { display: grid; gap: 10px; }
.flow-step { display: flex; align-items: flex-start; gap: 12px; font-size: 13px; color: #4d3a31; line-height: 1.7; }
.flow-step i {
  width: 22px; height: 22px; flex: 0 0 22px;
  border-radius: 8px;
  display: grid; place-items: center;
  font-style: normal; font-size: 11.5px;
  color: var(--wine3);
  background: linear-gradient(135deg, #f8e8c8, #e8cf9d);
  border: 1px solid rgba(224, 189, 124, 0.6);
}

/* ============ 纸条卡 ============ */
.paper-card {
  position: relative;
  border-radius: 18px;
  padding: 24px 18px 20px;
  background:
    repeating-linear-gradient(180deg, rgba(124, 26, 36, 0.035) 0 1px, transparent 1px 26px),
    linear-gradient(165deg, #fffdf7, var(--paper2));
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.28), inset 0 0 0 1px rgba(124, 26, 36, 0.1);
  overflow: hidden;
}
.paper-card::before {
  content: "";
  position: absolute; inset: 9px;
  border: 1px dashed rgba(124, 26, 36, 0.2);
  border-radius: 12px;
  pointer-events: none;
}
.paper-card::after {
  content: "";
  position: absolute; top: -46px; left: 18px;
  width: 2px; height: 46px;
  background: linear-gradient(180deg, rgba(165, 42, 53, 0.5), rgba(165, 42, 53, 0.1));
}
.paper-content { position: relative; z-index: 1; font-size: 15px; line-height: 2; color: #46312a; white-space: pre-wrap; word-break: break-word; }
.paper-images { display: flex; gap: 8px; margin-top: 14px; position: relative; z-index: 1; }
.paper-images img {
  width: 31%; aspect-ratio: 1; object-fit: cover;
  border-radius: 11px; border: 1px solid rgba(124, 26, 36, 0.12);
  cursor: zoom-in;
}
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; position: relative; z-index: 1; }
.tag {
  font-size: 11px; padding: 4px 10px; border-radius: 999px;
  color: var(--wine3); background: rgba(124, 26, 36, 0.06);
  border: 1px solid rgba(124, 26, 36, 0.12);
}
.paper-meta {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 10px;
  margin-top: 16px; padding-top: 14px;
  border-top: 1px dashed rgba(124, 26, 36, 0.18);
  font-size: 12px; color: var(--ink2); flex-wrap: wrap;
}
.avatar {
  width: 36px; height: 36px; flex: 0 0 36px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 18px;
  background: linear-gradient(140deg, #f6e6c7, #e3cfa4);
  border: 1px solid rgba(124, 26, 36, 0.14);
}
.seal {
  position: absolute; right: 14px; bottom: 14px;
  width: 46px; height: 46px;
  border: 2px solid rgba(165, 42, 53, 0.5);
  border-radius: 9px;
  display: grid; place-items: center;
  color: rgba(165, 42, 53, 0.72);
  font-size: 12px; line-height: 1.1; text-align: center;
  letter-spacing: 1px; font-weight: 600;
  transform: rotate(-7deg);
  opacity: 0.75;
}

.contact-box {
  margin-top: 14px;
  padding: 13px 15px;
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(224, 189, 124, 0.16), rgba(224, 189, 124, 0.06));
  border: 1px dashed rgba(124, 26, 36, 0.26);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 13px;
}
.contact-box .val { font-weight: 600; color: var(--wine3); letter-spacing: 1px; word-break: break-all; }
.contact-box.locked .val { color: var(--ink2); font-weight: 400; letter-spacing: 2px; }
.contact-box .state { font-size: 11px; padding: 3px 8px; border-radius: 999px; }
.contact-box .state.ok { color: #2f6b45; background: rgba(63, 143, 90, 0.12); }
.contact-box .state.no { color: var(--ink2); background: rgba(0, 0, 0, 0.05); }

/* ============ 列表 ============ */
.list-item {
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 14px;
  margin-bottom: 10px;
  transition: transform 0.12s, box-shadow 0.12s;
}
.list-item:active { transform: scale(0.995); }
.list-item .row1 { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.list-item .name { font-size: 13px; font-weight: 600; color: var(--wine3); }
.list-item .txt {
  font-size: 13px; color: #4a352c; line-height: 1.75; margin: 7px 0 9px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.list-item .row2 { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 11px; color: var(--ink2); }
.list-item .cover {
  width: 56px; height: 56px; border-radius: 10px; object-fit: cover;
  border: 1px solid var(--line); margin-top: 8px;
}
.thumb-row { display: flex; gap: 6px; margin-top: 8px; }
.thumb-row img { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }

.badge { font-size: 11px; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.badge.pending { color: #8a6113; background: #fff2d2; }
.badge.approved { color: #2f6b45; background: #e7f4ea; }
.badge.rejected { color: #a03030; background: #fbe6e6; }
.badge.off { color: #6c6c6c; background: #eee; }

.ops-row { display: flex; gap: 8px; margin-top: 10px; }
.ops-row .btn {
  flex: 1;
  padding: 9px 6px;
  border-radius: 10px;
  font-size: 12px;
  border: 1px solid var(--line);
  color: var(--ink2);
  background: #fff;
}
.ops-row .btn.primary { color: var(--wine3); border-color: rgba(124, 26, 36, 0.3); background: rgba(224, 189, 124, 0.16); }
.ops-row .btn.danger { color: #a03030; border-color: rgba(160, 48, 48, 0.26); }

.empty { text-align: center; color: var(--ink2); font-size: 13px; padding: 34px 0; line-height: 1.9; }
.empty .big { display: block; font-size: 38px; margin-bottom: 8px; opacity: 0.6; }

.sub-tabs { display: flex; gap: 18px; margin-bottom: 14px; border-bottom: 1px solid var(--line); padding-bottom: 9px; }
.sub-tabs button { font-size: 13px; color: var(--ink2); padding-bottom: 4px; position: relative; }
.sub-tabs button.active { color: var(--wine3); font-weight: 600; }
.sub-tabs button.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -10px;
  height: 2px; background: linear-gradient(90deg, var(--wine2), var(--gold));
}

.kv { display: flex; justify-content: space-between; gap: 10px; padding: 11px 0; border-bottom: 1px dashed rgba(124, 26, 36, 0.1); font-size: 13px; }
.kv:last-child { border-bottom: none; }
.kv span { color: var(--ink2); }
.kv b { color: var(--wine3); white-space: nowrap; }

/* ============ 我的 ============ */
.me-head { display: flex; align-items: center; gap: 14px; }
.avatar-lg { width: 58px; height: 58px; font-size: 27px; border-radius: 50%; }
.me-who b { display: block; font-size: 19px; color: var(--wine3); letter-spacing: 0.5px; }
.me-who span { font-size: 11.5px; color: var(--ink2); }
.me-stats {
  display: flex; gap: 8px; margin: 16px 0 2px;
}
.me-stats > div {
  flex: 1; text-align: center;
  padding: 11px 6px;
  border-radius: 12px;
  background: rgba(124, 26, 36, 0.045);
  border: 1px solid rgba(124, 26, 36, 0.07);
}
.me-stats b { display: block; font-size: 16px; color: var(--wine3); }
.me-stats span { font-size: 10.5px; color: var(--ink2); letter-spacing: 0.5px; }

.pkg-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pkg {
  padding: 14px 8px;
  border-radius: 13px;
  background: #fffdf8;
  border: 1px solid var(--line);
  text-align: center;
  transition: all 0.16s;
}
.pkg b { display: block; font-size: 16px; color: var(--wine3); }
.pkg span { display: block; margin-top: 4px; font-size: 10.5px; color: var(--ink2); }
.pkg .gift { color: #b0761f; font-size: 10.5px; margin-top: 2px; }
.pkg:active { transform: scale(0.97); }

.avatar-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.avatar-picker button {
  width: 42px; height: 42px;
  border-radius: 12px;
  font-size: 19px;
  background: #fffdf8;
  border: 1px solid var(--line);
}
.avatar-picker button.active {
  border-color: rgba(124, 26, 36, 0.5);
  background: linear-gradient(140deg, #fbf0d6, #efd7a6);
  box-shadow: 0 6px 14px rgba(224, 189, 124, 0.28);
}

.row-link {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 2px;
  font-size: 13.5px;
  color: #4a352c;
  border-bottom: 1px dashed rgba(124, 26, 36, 0.1);
}
.row-link:last-child { border-bottom: none; }
.row-link .chev { color: var(--ink2); font-size: 16px; }

/* ============ 底部导航 ============ */
.navbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 520px;
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  background: rgba(20, 10, 13, 0.92);
  backdrop-filter: blur(18px);
  border-top: 1px solid rgba(224, 189, 124, 0.16);
  z-index: 40;
}
.navbar button {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 7px 0;
  border-radius: 12px;
  color: rgba(245, 226, 186, 0.44);
  font-size: 11px; letter-spacing: 1px;
  transition: color 0.15s, background 0.15s;
}
.navbar button i { font-style: normal; font-size: 19px; opacity: 0.82; }
.navbar button.active { color: var(--gold2); background: rgba(224, 189, 124, 0.09); }
.navbar button.active i { opacity: 1; }

/* ============ 弹层 ============ */
.mask {
  position: fixed; inset: 0;
  background: rgba(10, 4, 6, 0.76);
  backdrop-filter: blur(4px);
  z-index: 60;
  display: flex; align-items: flex-end; justify-content: center;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.sheet {
  width: 100%; max-width: 520px; max-height: 92vh; overflow-y: auto;
  background: linear-gradient(180deg, #fffaf0, #f7efdd);
  border-radius: 24px 24px 0 0;
  padding: 18px 16px calc(20px + env(safe-area-inset-bottom));
  border-top: 3px solid var(--gold);
  box-shadow: 0 -20px 50px rgba(0, 0, 0, 0.4);
  animation: slideUp 0.26s cubic-bezier(0.2, 0.85, 0.25, 1);
}
@keyframes slideUp { from { transform: translateY(48px); } to { transform: none; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sheet-head h3 { margin: 0; font-size: 17px; color: var(--wine3); letter-spacing: 1px; font-weight: 600; }
.sheet-head button { color: var(--ink2); font-size: 22px; line-height: 1; padding: 2px 8px; }

.draw-stage { display: flex; flex-direction: column; align-items: center; }
.draw-paper { width: 100%; animation: unfold 0.5s cubic-bezier(0.2, 0.9, 0.25, 1) both; transform-origin: top center; }
@keyframes unfold {
  0% { transform: scaleY(0.06) rotateX(-50deg); opacity: 0.55; }
  60% { transform: scaleY(1.02) rotateX(0); opacity: 1; }
  100% { transform: scaleY(1); }
}

.action-row { display: flex; gap: 8px; margin-top: 14px; }
.action-row .btn {
  flex: 1;
  padding: 12px 8px;
  border-radius: 12px;
  font-size: 13px;
  border: 1px solid var(--line);
  color: var(--wine3);
  background: #fffdf8;
}
.action-row .btn.primary {
  color: #fff4de;
  background: linear-gradient(135deg, var(--wine2), var(--wine3));
  border: none;
  font-weight: 600;
}

/* ============ 字段 / 表单 ============ */
.field-row { margin-bottom: 12px; }
.field {
  width: 100%;
  padding: 12px 13px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fffdf8;
  font-size: 14px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field:focus { border-color: rgba(124, 26, 36, 0.45); box-shadow: 0 0 0 3px rgba(124, 26, 36, 0.07); }
textarea.field { min-height: 110px; resize: vertical; line-height: 1.8; }

.pay-methods { display: flex; gap: 8px; margin: 12px 0 4px; }
.pay-methods .pm {
  flex: 1;
  padding: 12px 8px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fffdf8;
  font-size: 13px;
  color: var(--ink2);
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.pay-methods .pm.active { border-color: rgba(124, 26, 36, 0.4); color: var(--wine3); background: rgba(224, 189, 124, 0.14); font-weight: 600; }

.pay-summary {
  padding: 14px;
  border-radius: 14px;
  background: rgba(124, 26, 36, 0.05);
  border: 1px solid rgba(124, 26, 36, 0.08);
  font-size: 13px;
  color: var(--ink2);
  line-height: 2;
}
.pay-summary b { color: var(--wine3); font-size: 17px; }
.pay-summary .warn { color: #a35a12; }

/* ============ 登录 ============ */
.auth-wrap {
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 28px 22px 46px;
  position: relative; z-index: 1;
}
.auth-logo { text-align: center; margin-bottom: 24px; }
.auth-logo .lamp { display: block; font-size: 50px; margin-bottom: 4px; animation: swing 3.6s ease-in-out infinite; transform-origin: top center; }
.auth-logo b { display: block; color: var(--gold2); font-size: 27px; letter-spacing: 6px; font-weight: 600; }
.auth-logo span { display: block; color: rgba(245, 226, 186, 0.42); font-size: 10.5px; letter-spacing: 3px; margin-top: 4px; }
@keyframes swing { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }

.auth-card {
  background: var(--paper);
  border-radius: 22px;
  padding: 22px 18px;
  box-shadow: var(--shadow);
  position: relative; z-index: 1;
}
.auth-tabs { display: flex; gap: 26px; margin-bottom: 16px; }
.auth-tabs button { font-size: 16px; color: var(--ink2); padding: 4px 0; position: relative; letter-spacing: 1px; }
.auth-tabs button.active { color: var(--wine3); font-weight: 600; }
.auth-tabs button.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -5px; height: 2px;
  background: linear-gradient(90deg, var(--wine2), var(--gold));
}
.checkline { display: flex; gap: 9px; align-items: flex-start; font-size: 11.5px; color: var(--ink2); line-height: 1.7; margin: 4px 0 4px; }
.checkline input { margin-top: 2px; width: 16px; height: 16px; accent-color: var(--wine); }
.auth-foot { text-align: center; font-size: 11px; color: rgba(245, 226, 186, 0.38); margin-top: 18px; line-height: 1.9; }

/* ============ toast ============ */
.toast {
  position: fixed; left: 50%; bottom: 108px; transform: translateX(-50%);
  background: rgba(18, 8, 10, 0.95);
  color: #ffeccb;
  padding: 11px 18px; border-radius: 12px;
  font-size: 13px; z-index: 90; max-width: 84%; text-align: center;
  border: 1px solid rgba(224, 189, 124, 0.28);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  animation: fadeIn 0.16s ease;
}

/* ============ 图片选择 ============ */
.img-picker { display: flex; gap: 8px; flex-wrap: wrap; }
.img-picker .thumb { position: relative; width: 30%; aspect-ratio: 1; border-radius: 11px; overflow: hidden; border: 1px solid var(--line); }
.img-picker .thumb img { width: 100%; height: 100%; object-fit: cover; }
.img-picker .thumb button {
  position: absolute; right: 4px; top: 4px; width: 22px; height: 22px;
  border-radius: 50%; background: rgba(0, 0, 0, 0.55); color: #fff; font-size: 13px; line-height: 1;
}
.img-picker .add {
  width: 30%; aspect-ratio: 1; border-radius: 11px;
  border: 1px dashed rgba(124, 26, 36, 0.3);
  display: grid; place-items: center;
  color: var(--ink2); font-size: 24px; background: #fffdf8;
}

/* ============ 教程 ============ */
.tut-step { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px dashed rgba(124, 26, 36, 0.12); }
.tut-step:last-of-type { border-bottom: none; }
.tut-step i {
  flex: 0 0 26px; width: 26px; height: 26px; border-radius: 9px;
  display: grid; place-items: center; font-style: normal; font-size: 12px;
  color: var(--wine3); background: linear-gradient(135deg, #f8e8c8, #e8cf9d);
  border: 1px solid rgba(224, 189, 124, 0.6);
}
.tut-step b { display: block; font-size: 13.5px; color: var(--wine3); margin-bottom: 3px; }
.tut-step p { margin: 0; font-size: 12.5px; color: #5b463c; line-height: 1.8; }

@media (max-width: 360px) {
  .hero-copy h1 { font-size: 22px; }
  .pkg-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------------- 客服 ---------------- */
.kefu-badge {
  display: inline-block; margin-left: 6px; padding: 1px 7px;
  border-radius: 10px; background: #a8323c; color: #fff;
  font-size: 10px; font-style: normal; letter-spacing: 0.5px;
}
.kefu-sheet {
  max-height: 94vh;
  display: flex; flex-direction: column;
  padding-bottom: calc(14px + env(safe-area-inset-bottom));
}
.kefu-top { display: flex; align-items: center; gap: 10px; margin: 4px 0 10px; }
.kefu-ava {
  width: 42px; height: 42px; flex: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #8c1f28, #5e1119);
  color: var(--gold2); font-size: 20px;
  box-shadow: 0 6px 14px rgba(140, 31, 40, 0.28);
}
.kefu-ava.sm { width: 26px; height: 26px; font-size: 13px; box-shadow: none; }
.kefu-meta b { display: block; font-size: 15px; color: #4a352c; letter-spacing: 0.5px; }
.kefu-state { font-size: 11.5px; color: var(--ink2); }
.kefu-qq-box {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 12px; margin-bottom: 10px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(140, 31, 40, 0.06), rgba(224, 189, 124, 0.16));
  border: 1px solid rgba(140, 31, 40, 0.14);
}
.kefu-qq-label { font-size: 10.5px; color: var(--ink2); letter-spacing: 1px; }
.kefu-qq-num { font-size: 16px; color: #6d1620; font-weight: 700; letter-spacing: 1px; font-variant-numeric: tabular-nums; }
.kefu-qq-ops { display: flex; gap: 8px; flex: none; }
.kefu-btn {
  padding: 8px 14px; border-radius: 20px; font-size: 12.5px;
  background: linear-gradient(140deg, #9a2530, #6d1620);
  color: #ffeccd; box-shadow: 0 6px 14px rgba(109, 22, 32, 0.28);
}
.kefu-btn.ghost { background: transparent; color: #7c1a24; border: 1px solid rgba(124, 26, 36, 0.32); box-shadow: none; }

.kefu-chat {
  flex: 1; min-height: 220px; max-height: 42vh;
  overflow-y: auto;
  padding: 10px 2px;
  display: flex; flex-direction: column; gap: 10px;
  scrollbar-width: thin;
}
.kefu-loading { color: var(--ink2); font-size: 12.5px; text-align: center; padding: 24px 0; }
.kefu-msg { display: flex; align-items: flex-end; gap: 6px; max-width: 88%; }
.kefu-msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.kefu-msg.theirs { align-self: flex-start; }
.kefu-bubble {
  padding: 9px 12px; border-radius: 14px;
  font-size: 13px; line-height: 1.65; word-break: break-word;
  background: #fffdf7; color: #4a352c;
  border: 1px solid rgba(124, 26, 36, 0.1);
  box-shadow: 0 2px 8px rgba(80, 40, 30, 0.06);
}
.kefu-msg.mine .kefu-bubble {
  background: linear-gradient(150deg, #8c1f28, #6d1620);
  color: #ffeccd; border-color: transparent;
}
.kefu-input { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.kefu-input input {
  flex: 1; padding: 12px 14px; border-radius: 14px;
  border: 1px solid rgba(124, 26, 36, 0.18);
  background: #fffdf7; font-size: 13.5px; color: #3a2a25;
}
.kefu-input input:focus { outline: none; border-color: rgba(140, 31, 40, 0.5); }
.kefu-send {
  flex: none; padding: 12px 20px; border-radius: 14px;
  background: linear-gradient(140deg, #9a2530, #6d1620);
  color: #ffeccd; font-size: 13.5px; letter-spacing: 1px;
}
.kefu-send:disabled { opacity: 0.6; }
.kefu-foot { margin-top: 8px; font-size: 11px; color: var(--ink2); text-align: center; line-height: 1.7; }

/* ---------------- 省市两级下拉 ---------------- */
.region-body {
  display: grid; grid-template-columns: 98px 1fr; gap: 8px;
  margin-top: 8px;
}
.region-prov {
  max-height: 226px; overflow-y: auto;
  border-right: 1px dashed rgba(124, 26, 36, 0.12);
  padding-right: 4px;
  display: flex; flex-direction: column; gap: 2px;
}
.rp-item {
  width: 100%; text-align: left; padding: 7px 8px; border-radius: 8px;
  font-size: 12px; color: #5b463c; line-height: 1.4;
}
.rp-item.active { background: rgba(140, 31, 40, 0.1); color: #7c1a24; font-weight: 600; }
.region-city {
  max-height: 226px; overflow-y: auto;
  display: flex; flex-wrap: wrap; gap: 6px; align-content: flex-start;
}
.rc-item {
  padding: 7px 10px; border-radius: 8px;
  background: rgba(124, 26, 36, 0.05);
  font-size: 12px; color: #4a352c; line-height: 1.3;
}
.rc-item.active { background: linear-gradient(140deg, #9a2530, #6d1620); color: #ffeccd; }
.rc-item.hit { width: 100%; text-align: left; }

/* ---------------- 连抽选择 ---------------- */
.count-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 4px; }
.count-btn {
  padding: 10px 4px; border-radius: 12px;
  border: 1px solid rgba(124, 26, 36, 0.18);
  background: #fffdf7;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.count-btn b { font-size: 12.5px; color: #4a352c; letter-spacing: 0.5px; }
.count-btn span { font-size: 11px; color: #7c665a; }
.count-btn.active {
  background: linear-gradient(140deg, #9a2530, #6d1620);
  border-color: transparent;
  box-shadow: 0 8px 18px rgba(140, 31, 40, 0.25);
}
.count-btn.active b, .count-btn.active span { color: #ffeccd; }

/* ---------------- 连抽结果 ---------------- */
.multi-sheet { display: flex; flex-direction: column; max-height: 92vh; }
.multi-sum {
  font-size: 12.5px; color: var(--ink2); margin: 2px 0 10px;
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
}
.multi-sum b { color: #7c1a24; font-size: 15px; }
.multi-list {
  flex: 1; overflow-y: auto; max-height: 54vh;
  display: flex; flex-direction: column; gap: 10px; padding: 2px 0;
}
.multi-card {
  background: #fffdf7; border: 1px solid rgba(124, 26, 36, 0.12);
  border-radius: 14px; padding: 10px 12px;
  box-shadow: 0 3px 10px rgba(80, 40, 30, 0.05);
}
.multi-card .mc-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 11px; color: var(--ink2); }
.mc-idx {
  width: 18px; height: 18px; border-radius: 50%;
  background: #8c1f28; color: #ffeccd; font-size: 11px;
  display: flex; align-items: center; justify-content: center; flex: none;
}
.mc-text { margin-top: 7px; font-size: 13px; color: #4a352c; line-height: 1.7; }
.mc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.mc-contact { font-size: 11.5px; color: #7c1a24; }
.mc-btn { padding: 5px 12px; border-radius: 12px; background: rgba(140, 31, 40, 0.08); color: #7c1a24; font-size: 11.5px; }

.draw-panel { overflow: visible; }
.draw-panel::after { border-radius: var(--radius); }

/* ================= 手机端细节 ================= */
@media (max-width: 767px) {
  /* iOS 输入框字号小于 16px 会在聚焦时自动放大页面 */
  .field, textarea.field, .dd-search, .kefu-input input { font-size: 16px; }
  .seg { padding: 11px 8px; }
  .count-btn { padding: 11px 2px; }
  .count-btn b { font-size: 12px; }
  .count-btn span { font-size: 10.5px; }
  .dd-trigger { padding: 14px; }
  .topbar { padding-top: calc(14px + env(safe-area-inset-top)); }
  .sheet { max-height: 94vh; }
  .region-prov, .region-city { max-height: 206px; overscroll-behavior: contain; }
  .dd-list { overscroll-behavior: contain; }
  .multi-list { max-height: 52vh; overscroll-behavior: contain; }
  .panel { padding: 16px 14px; }
  .hero { padding: 20px 16px 16px; }
  .hero-copy h1 { font-size: 24px; }
}

@media (max-width: 360px) {
  .hero-copy h1 { font-size: 22px; }
  .pkg-grid { grid-template-columns: repeat(2, 1fr); }
  .count-grid { gap: 6px; }
  .count-btn b { font-size: 11.5px; letter-spacing: 0; }
  .count-btn span { font-size: 10px; }
  .region-body { grid-template-columns: 88px 1fr; }
}

/* ================= 电脑端（>= 981px）：双栏宽屏 ================= */
@media (min-width: 981px) {
  body { background-attachment: fixed; }
  #app { max-width: 1200px; padding-bottom: 26px; }
  #mainView { display: flex; flex-direction: column; min-height: 100vh; }

  /* 顶栏 + 横向导航：导航从底部移到顶部 */
  .topbar {
    order: 0; position: sticky; top: 0;
    padding: 16px 30px 12px;
  }
  .brand-mark { width: 42px; height: 42px; font-size: 23px; border-radius: 13px; }
  .brand-txt b { font-size: 20px; }
  .balance-pill { padding: 9px 16px; font-size: 12.5px; }
  .navbar {
    order: 1;
    position: sticky; top: 68px; bottom: auto; left: auto;
    transform: none; width: auto; max-width: none;
    margin: 0 24px 18px;
    padding: 7px;
    display: flex; justify-content: center; gap: 6px;
    border-radius: 16px;
    border: 1px solid rgba(224, 189, 124, 0.16);
    background: rgba(24, 12, 15, 0.9);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
  }
  .navbar button {
    flex: 0 0 auto;
    flex-direction: row; gap: 8px;
    padding: 10px 24px;
    border-radius: 11px;
    font-size: 13px; letter-spacing: 1.5px;
  }
  .navbar button i { font-size: 17px; }

  main { order: 2; padding: 0 24px 44px; }
  .view { padding: 0; }

  /* 首页：左 hero + 怎么玩，右侧抽取面板 */
  #viewHome {
    display: grid;
    grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
    gap: 22px;
    align-items: start;
    max-width: 1152px;
    margin: 0 auto;
  }
  .home-hero {
    grid-column: 1; grid-row: 1;
    margin: 0; min-height: 288px;
    padding: 34px 32px 26px;
    display: flex; flex-direction: column; justify-content: space-between;
  }
  .home-hero .hero-copy h1 { font-size: 34px; line-height: 1.35; }
  .hero-copy p { font-size: 13.5px; line-height: 1.9; max-width: 84%; }
  .hero-stats { margin-top: 24px; }
  .draw-panel {
    grid-column: 2; grid-row: 1 / span 2;
    position: sticky; top: 166px;
    margin: 0; padding: 24px 22px;
  }
  .flow-panel { grid-column: 1; grid-row: 2; margin: 0; }
  .flow { grid-template-columns: 1fr 1fr; gap: 12px 18px; }

  /* 其他页面：宽度收在中间，避免一行拉太长 */
  #viewPapers, #viewRecords { max-width: 880px; margin: 0 auto; }
  #viewMe {
    display: grid; grid-template-columns: 1fr 1fr; gap: 18px;
    max-width: 1060px; margin: 0 auto; align-items: start;
  }
  #viewMe .me-card { grid-column: 1; grid-row: 1; margin: 0; }
  #rechargePanel { grid-column: 2; grid-row: 1; margin: 0; }
  #viewMe > .panel:nth-child(3) { grid-column: 1; grid-row: 2; margin: 0; }
  #viewMe > .panel:nth-child(4) { grid-column: 2; grid-row: 2; margin: 0; }

  .panel {
    padding: 24px 22px; margin-bottom: 18px;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
  }
  .panel:hover { transform: translateY(-2px); }
  .paper-card { max-width: 720px; margin: 0 auto; }

  /* 弹层改成桌面对话框 */
  .mask { align-items: center; padding: 28px; }
  .sheet {
    max-width: 560px; max-height: 86vh;
    border-radius: 24px;
    border: 1px solid rgba(224, 189, 124, 0.42);
    border-top-width: 2px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
    animation: popIn 0.2s ease;
  }
  .multi-sheet { max-width: 700px; }
  .multi-list {
    max-height: 58vh;
    display: grid; grid-template-columns: 1fr 1fr;
    align-content: start;
  }
  .toast { bottom: 38px; }
  .kefu-chat { max-height: 46vh; }
  .kefu-sheet { max-width: 520px; }

  /* 登录页：左边品牌，右边表单 */
  .auth-wrap {
    max-width: 980px; margin: 0 auto;
    display: grid; grid-template-columns: 1fr 408px; grid-template-rows: auto auto;
    gap: 14px 64px; align-items: center; align-content: center;
    padding: 36px 30px;
  }
  .auth-logo { grid-column: 1; grid-row: 1 / span 2; text-align: left; margin: 0; }
  .auth-logo .lamp { font-size: 74px; }
  .auth-logo b { font-size: 36px; letter-spacing: 8px; }
  .auth-logo span { font-size: 11.5px; letter-spacing: 4px; }
  .auth-card { grid-column: 2; grid-row: 1; padding: 30px 26px; }
  .auth-foot { grid-column: 2; grid-row: 2; margin-top: 0; text-align: center; }
}

/* ================= 红线提醒 ================= */
.tips-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tip b { display: block; font-size: 12.5px; color: var(--wine3); letter-spacing: 1px; margin-bottom: 4px; }
.tip span { display: block; font-size: 11.5px; color: var(--ink2); line-height: 1.75; }

@media (max-width: 767px) {
  .tips-grid { grid-template-columns: 1fr; gap: 10px; }
  .tips-panel .panel-head { margin-bottom: 10px; }
}

@media (min-width: 981px) {
  .tips-panel { grid-column: 1 / -1; grid-row: 3; margin: 0; padding: 20px 22px; }
  .navbar { width: max-content; max-width: calc(100% - 48px); margin-left: auto; margin-right: auto; padding: 7px 12px; }
}

/* ================= 登录页品牌点缀 ================= */
.auth-feats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.auth-feats span {
  font-size: 11px; letter-spacing: 1px;
  color: rgba(245, 226, 186, 0.62);
  padding: 5px 11px; border-radius: 999px;
  border: 1px solid rgba(224, 189, 124, 0.24);
  background: rgba(224, 189, 124, 0.07);
}
@media (max-width: 767px) {
  .auth-feats { justify-content: center; margin-top: 12px; }
}
@media (min-width: 981px) {
  .auth-logo .auth-feats { margin-top: 22px; }
}

/* ================= 超小屏（<=360）细节 ================= */
@media (max-width: 360px) {
  .brand-txt small { display: none; }
  .brand-txt b { font-size: 16px; letter-spacing: 1px; }
  .brand-mark { width: 34px; height: 34px; font-size: 19px; }
  .balance-pill { padding: 7px 11px; font-size: 11px; }
  .balance-pill b { font-size: 13px; }
  .pkg-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .pkg { padding: 10px 4px; }
  .pkg b { font-size: 14px; }
}
/* ================= 平板 / 小笔记本（768-980） ================= */
@media (min-width: 768px) and (max-width: 980px) {
  #app { max-width: 900px; padding-bottom: 26px; }
  .topbar { padding: 20px 26px 12px; }
  .navbar {
    position: sticky; top: 0; bottom: auto; left: auto;
    transform: none; width: auto; max-width: none;
    margin: 0 18px 16px; padding: 7px;
    display: flex; justify-content: center; gap: 6px;
    border-radius: 15px; border: 1px solid rgba(224, 189, 124, 0.16);
    background: rgba(24, 12, 15, 0.96);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.24);
  }
  .navbar button { flex: 0 0 auto; flex-direction: row; gap: 8px; padding: 10px 20px; border-radius: 11px; font-size: 12.5px; }
  .navbar button i { font-size: 16px; }
  main { padding: 0 22px 40px; }
  #viewHome { display: grid; grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr); gap: 16px; align-items: start; }
  .home-hero { grid-column: 1; grid-row: 1; margin: 0; min-height: 260px; }
  .draw-panel { grid-column: 2; grid-row: 1 / span 2; margin: 0; position: sticky; top: 96px; }
  .flow-panel { grid-column: 1; grid-row: 2; margin: 0; }
  .flow { grid-template-columns: 1fr 1fr; gap: 10px 16px; }
  .tips-panel { grid-column: 1 / -1; grid-row: 3; margin: 0; }
  .tips-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #viewMe { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
  #viewMe .me-card { grid-column: 1; grid-row: 1; margin: 0; }
  #rechargePanel { grid-column: 2; grid-row: 1; margin: 0; }
  #viewMe > .panel:nth-child(3) { grid-column: 1; grid-row: 2; margin: 0; }
  #viewMe > .panel:nth-child(4) { grid-column: 2; grid-row: 2; margin: 0; }
  #viewPapers, #viewRecords { max-width: 820px; margin: 0 auto; }
  .mask { align-items: center; padding: 24px; }
  .sheet { max-width: 560px; border-radius: 22px; animation: popIn 0.2s ease; }
  .multi-sheet { max-width: 720px; }
  .multi-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-height: 56vh; }
  .pkg-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .toast { bottom: 30px; }
}

/* 长内容必须能在窄卡片里断行，避免撑破布局 */
.paper-content, .mc-text, .list-item .txt, .kefu-msg, .kefu-bubble,
.paper-meta, .contact-box .val, .tip span, .notice, .field, .dd-text {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* 不支持毛玻璃时的降级底栏，防止文字叠在内容上看不清 */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .navbar { background: #140a0d; }
  .mask { background: rgba(10, 4, 6, 0.94); }
}

/* 记录页待支付订单操作 */
.list-item .ops { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.mini-btn {
  padding: 6px 12px; border-radius: 999px;
  border: 1px solid rgba(140, 31, 40, 0.28);
  background: rgba(140, 31, 40, 0.07);
  color: var(--wine3); font-size: 11.5px;
}
.mini-btn:disabled { opacity: 0.55; }

/* 自定义充值 */
.custom-recharge { display: flex; gap: 8px; margin-top: 12px; }
.custom-recharge input {
  flex: 1; min-width: 0; padding: 11px 12px;
  border: 1px solid var(--line); border-radius: 12px;
  background: #fffdf8; font-size: 16px; color: var(--ink);
}
.custom-recharge button {
  flex: none; padding: 0 18px; border-radius: 12px;
  background: rgba(140, 31, 40, 0.1); color: var(--wine3);
  border: 1px solid rgba(140, 31, 40, 0.24); font-size: 13px;
}

/* 客服快捷问题 */
.kefu-quick { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 2px 8px; }
.kefu-quick button {
  font-size: 11.5px; padding: 6px 10px; border-radius: 999px;
  border: 1px solid rgba(140, 31, 40, 0.2);
  background: rgba(140, 31, 40, 0.06); color: #7c1a24;
}
