/* 会员飞轮 · 移动 H5 优先 */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
:root {
  --gold: #b8860b; --gold-l: #f7ecd4; --ink: #2b2118; --sub: #8a7a66;
  --bg: #f6f2ea; --card: #fffdf8; --line: #e8e0d0;
  --s: #c0392b; --a: #2a6fb0; --b: #7a8a6a; --c: #999;
  --ok: #3a8a4f; --bad: #c0392b;
}
html { font-size: 16px; }
body { background: var(--bg); color: var(--ink); font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif; }
#app { max-width: 640px; margin: 0 auto; min-height: 100vh; padding-bottom: 64px; }
.boot { padding: 40vh 20px; text-align: center; color: var(--sub); }

/* 顶栏 */
.topbar { position: sticky; top: 0; z-index: 10; background: linear-gradient(180deg, rgba(241, 235, 219, .97), rgba(241, 235, 219, .88)); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); box-shadow: 0 1px 0 rgba(163, 128, 47, .25); color: #3a332a; padding: 10px 16px; display: flex; align-items: center; gap: 8px; }
.topbar .t { font-size: 17px; font-weight: 700; letter-spacing: 1px; flex: 1; }
.topbar .who { font-size: 12px; color: #7a7060; }
.logo-img { height: 28px; width: 28px; border-radius: 7px; display: block; box-shadow: 0 1px 3px rgba(58, 51, 42, .25); }
.login-logo { width: 132px; height: 132px; border-radius: 28px; box-shadow: 0 6px 24px rgba(90, 68, 38, .30); }

/* tabbar */
.tabbar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; background: #fffdf8; border-top: 1px solid var(--line); display: flex; max-width: 640px; margin: 0 auto; }
.tabbar button { flex: 1; border: 0; background: none; padding: 8px 0 10px; font-size: 11px; color: var(--sub); cursor: pointer; }
.tabbar button .ic { display: block; font-size: 20px; margin-bottom: 2px; }
.tabbar button.on { color: var(--gold); font-weight: 700; }

.wrap { padding: 12px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 12px; }
.card h3 { font-size: 15px; margin-bottom: 10px; }
.row { display: flex; align-items: center; gap: 8px; }
.row.between { justify-content: space-between; }
.muted { color: var(--sub); font-size: 12px; }
.small { font-size: 12px; }

button.btn { border: 0; border-radius: 10px; padding: 11px 16px; font-size: 15px; background: var(--gold); color: #fff; cursor: pointer; }
button.btn.ghost { background: #efe8d8; color: var(--ink); }
button.btn.sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
button.btn:disabled { opacity: .5; }
.btnline { display: flex; gap: 8px; flex-wrap: wrap; }

input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 15px; background: #fff; color: var(--ink); }
textarea { min-height: 76px; resize: vertical; }
.field { margin-bottom: 10px; }
.field label { display: block; font-size: 13px; color: var(--sub); margin-bottom: 4px; }

/* 分层色块 */
.tier-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tier-cell { border-radius: 12px; padding: 12px 6px; text-align: center; color: #fff; }
.tier-cell .n { font-size: 26px; font-weight: 800; }
.tier-cell .l { font-size: 12px; opacity: .9; }
.tier-cell .b { font-size: 11px; opacity: .8; margin-top: 4px; }
.tier-S { background: linear-gradient(135deg, #c0392b, #e67e22); }
.tier-A { background: linear-gradient(135deg, #2a6fb0, #4aa3c7); }
.tier-B { background: linear-gradient(135deg, #7a8a6a, #9ab08a); }
.tier-C { background: linear-gradient(135deg, #777, #999); }

.badge { display: inline-block; min-width: 20px; padding: 2px 7px; border-radius: 20px; font-size: 12px; font-weight: 700; color: #fff; text-align: center; }
.badge.S { background: #c0392b; } .badge.A { background: #2a6fb0; } .badge.B { background: #7a8a6a; } .badge.C { background: #999; } .badge.none { background: #ccc; }
.badge.src { background: #efe8d8; color: var(--sub); font-weight: 400; margin-left: 4px; }

/* 会员列表 */
.mrow { display: flex; align-items: center; gap: 10px; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.mrow:last-child { border-bottom: 0; }
.mrow .nm { font-weight: 600; }
.mrow .meta { font-size: 12px; color: var(--sub); margin-top: 2px; }
.mrow .rt { margin-left: auto; text-align: right; font-size: 12px; color: var(--sub); white-space: nowrap; }

.filterbar { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.filterbar .chip { border: 1px solid var(--line); background: #fff; border-radius: 20px; padding: 6px 12px; font-size: 13px; color: var(--sub); cursor: pointer; }
.filterbar .chip.on { background: var(--gold); color: #fff; border-color: var(--gold); }

/* 弹层 */
.sheet-mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 40; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; background: var(--card); border-radius: 16px 16px 0 0; max-width: 640px; margin: 0 auto; max-height: 86vh; overflow-y: auto; padding: 16px; }
.sheet .grab { width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 0 auto 12px; }

table.prev { width: 100%; border-collapse: collapse; font-size: 12px; }
table.prev th, table.prev td { border: 1px solid var(--line); padding: 6px; text-align: left; }
table.prev th { background: #f3edde; }

.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 90px; background: rgba(30,24,16,.92); color: #fff; padding: 10px 18px; border-radius: 20px; font-size: 14px; z-index: 99; max-width: 80vw; }

.copybox { background: #f3edde; border-radius: 10px; padding: 12px; font-size: 14px; line-height: 1.6; white-space: pre-wrap; word-break: break-all; margin: 8px 0; }

.login-hero { text-align: center; padding: 14vh 24px 24px; }
.login-hero .logo { font-size: 54px; }
.login-hero h1 { font-size: 24px; margin: 12px 0 4px; letter-spacing: 2px; }
.login-hero p { color: var(--sub); margin-bottom: 28px; }

.tag { display: inline-block; background: #efe8d8; border-radius: 6px; padding: 2px 8px; font-size: 12px; margin: 2px 4px 2px 0; color: var(--sub); }
.warn { color: var(--bad); font-size: 12px; }
.ok { color: var(--ok); }
.pill { display: inline-block; border-radius: 20px; padding: 3px 10px; font-size: 12px; background: #efe8d8; color: var(--sub); }
.pill.running { background: #e8f0e4; color: var(--ok); }
.pill.done { background: #e4ecf5; color: var(--a); }
.empty { text-align: center; color: var(--sub); padding: 40px 0; }
.hr { height: 1px; background: var(--line); margin: 12px 0; }
.kv { display: flex; justify-content: space-between; font-size: 13px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.kv:last-child { border-bottom: 0; }
