:root {
  --bg: #f6f7fb;
  --card: #fff;
  --txt: #1d2129;
  --sub: #86909c;
  --line: #eef0f4;
  --main: #ff5b3a;
  --main2: #ff8a3d;
  --ok: #00b42a;
  --warn: #ff7d00;
  --radius: 14px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0; background: var(--bg); color: var(--txt);
  font: 15px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  padding-bottom: 68px;
}
a { color: var(--main); text-decoration: none; }
.hide { display: none !important; }
.wrap { max-width: 680px; margin: 0 auto; padding: 0 14px; }
.muted { color: var(--sub); font-size: 13px; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 8px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.grow { flex: 1; min-width: 0; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 顶栏 */
header {
  position: sticky; top: 0; z-index: 20;
  background: linear-gradient(135deg, var(--main), var(--main2));
  color: #fff; padding: 14px 14px 12px;
  border-radius: 0 0 18px 18px;
  box-shadow: 0 6px 18px rgba(255, 91, 58, .18);
}
header .brand { font-size: 19px; font-weight: 700; letter-spacing: .5px; }
header .slogan { font-size: 12px; opacity: .9; margin-top: 2px; }
header .avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,.22); display: grid; place-items: center; font-size: 13px;
}

/* 卡片 */
.card {
  background: var(--card); border-radius: var(--radius); padding: 14px;
  margin: 12px 0; box-shadow: 0 2px 10px rgba(29, 33, 41, .05);
}
.card h3 { margin: 0 0 6px; font-size: 16px; }
.tag {
  display: inline-block; padding: 1px 8px; border-radius: 20px;
  background: #fff3ef; color: var(--main); font-size: 12px; margin-right: 6px;
}
.tag.gray { background: #f2f3f5; color: var(--sub); }
.tag.free { background: #e8ffea; color: var(--ok); }
.money { color: var(--main); font-weight: 700; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 10px; padding: 11px 16px; font-size: 15px;
  background: #f2f3f5; color: var(--txt); cursor: pointer; font-weight: 600;
}
.btn:active { transform: scale(.98); }
.btn.main { background: linear-gradient(135deg, var(--main), var(--main2)); color: #fff; }
.btn.line { background: #fff; border: 1px solid var(--main); color: var(--main); }
.btn.sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; }

/* 表单 */
label { display: block; font-size: 13px; color: var(--sub); margin: 12px 0 6px; }
input, textarea, select {
  width: 100%; border: 1px solid var(--line); background: #fafbfc;
  border-radius: 10px; padding: 11px 12px; font-size: 15px; color: var(--txt);
  font-family: inherit;
}
textarea { min-height: 84px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--main); background: #fff; }

/* 列表项 */
.item { padding: 13px 0; border-bottom: 1px solid var(--line); }
.item:last-child { border-bottom: 0; }
.badge { font-size: 12px; padding: 1px 7px; border-radius: 6px; background: #f2f3f5; color: var(--sub); }
.badge.ok { background: #e8ffea; color: var(--ok); }
.badge.wait { background: #fff7e8; color: var(--warn); }
.badge.no { background: #ffece8; color: #f53f3f; }

/* 底部 Tab */
nav.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: #fff; display: flex; border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
nav.tabbar a {
  flex: 1; text-align: center; padding: 8px 0 7px; color: var(--sub); font-size: 11px;
}
nav.tabbar a b { display: block; font-size: 19px; font-weight: 400; line-height: 1.2; }
nav.tabbar a.on { color: var(--main); }

/* 筛选条 */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; padding: 6px 13px; border-radius: 20px; background: #fff;
  color: var(--sub); font-size: 13px; border: 1px solid var(--line);
}
.chip.on { background: var(--main); color: #fff; border-color: var(--main); }

/* 进度 */
.progress { height: 8px; border-radius: 6px; background: #f2f3f5; overflow: hidden; margin: 8px 0; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--main), var(--main2)); }

/* 弹层 */
.mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 50; display: grid; place-items: end center; }
.sheet { background: #fff; border-radius: 18px 18px 0 0; width: 100%; max-width: 680px; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); }
.sheet h4 { margin: 0 0 10px; font-size: 16px; }

/* 图片 */
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.thumbs img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }

.toast {
  position: fixed; left: 50%; top: 42%; transform: translate(-50%, -50%);
  background: rgba(0,0,0,.78); color: #fff; padding: 10px 16px; border-radius: 10px;
  font-size: 14px; z-index: 99; max-width: 80%; text-align: center;
}
.empty { text-align: center; color: var(--sub); padding: 46px 0; font-size: 14px; }
.stat { flex: 1; text-align: center; }
.stat b { display: block; font-size: 20px; }
