* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --brand: #ff6a00;
  --brand-d: #e85d00;
  --bg: #f5f6f8;
  --card: #fff;
  --text: #222;
  --muted: #888;
  --line: #eee;
}
html, body { background: var(--bg); color: var(--text);
  font-family: -apple-system, "PingFang SC", "Helvetica Neue", Arial, sans-serif; }
#app { max-width: 640px; margin: 0 auto; padding: 16px 14px 84px; }

.hidden { display: none !important; }

h1.page-title { font-size: 20px; margin: 6px 2px 16px; }
.muted { color: var(--muted); font-size: 13px; }

/* 表单 */
.auth { max-width: 360px; margin: 48px auto 0; }
.auth .logo { text-align: center; font-size: 26px; font-weight: 700; color: var(--brand); margin-bottom: 6px; }
.auth .sub { text-align: center; color: var(--muted); margin-bottom: 28px; }
.field { margin-bottom: 14px; }
.field input { width: 100%; height: 46px; border: 1px solid var(--line); border-radius: 10px;
  padding: 0 14px; font-size: 15px; background: #fff; }
.field input:focus { outline: none; border-color: var(--brand); }
.btn { width: 100%; height: 46px; border: none; border-radius: 10px; background: var(--brand);
  color: #fff; font-size: 16px; font-weight: 600; cursor: pointer; }
.btn:active { background: var(--brand-d); }
.btn.ghost { background: #fff; color: var(--brand); border: 1px solid var(--brand); }
.switch-line { text-align: center; margin-top: 16px; font-size: 14px; color: var(--muted); }
.switch-line a { color: var(--brand); text-decoration: none; }

/* 会员横幅 */
.member-banner { background: linear-gradient(135deg, #2b2b2b, #444); color: #ffd9a8;
  border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; font-size: 14px; }
.member-banner b { color: #fff; }

/* 图片网格 */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.card { background: var(--card); border-radius: 12px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.05); }
.card .thumb { width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block; background: #eee; cursor: zoom-in; }
.card .body { padding: 10px; }
.card .name { font-size: 13px; margin-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .dl { width: 100%; height: 34px; border: none; border-radius: 8px; background: var(--brand);
  color: #fff; font-size: 13px; cursor: pointer; }
.card .dl:active { background: var(--brand-d); }
.empty { text-align: center; color: var(--muted); padding: 60px 0; }

/* 套餐 */
.plans { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 8px; }
.plan { background: var(--card); border: 2px solid var(--line); border-radius: 12px;
  padding: 18px 12px; text-align: center; cursor: pointer; transition: border-color .15s; }
.plan.selected { border-color: var(--brand); }
.plan .p-name { font-size: 15px; font-weight: 600; }
.plan .p-price { color: var(--brand); font-size: 26px; font-weight: 800; margin: 8px 0 2px; }
.plan .p-price small { font-size: 13px; font-weight: 500; }
.plan .p-tag { font-size: 12px; color: var(--muted); }
.pay-bar { margin-top: 22px; }

/* 我的 */
.mine-card { background: var(--card); border-radius: 12px; padding: 20px 16px; margin-bottom: 16px; }
.mine-card .u { font-size: 18px; font-weight: 600; }
.mine-card .s { margin-top: 8px; font-size: 14px; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 12px; }
.badge.on { background: #fff3e6; color: var(--brand); }
.badge.off { background: #eee; color: var(--muted); }

/* tabbar */
.tabbar { position: fixed; bottom: 0; left: 0; right: 0; height: 56px; background: #fff;
  border-top: 1px solid var(--line); display: flex; max-width: 640px; margin: 0 auto; }
.tabbar a { flex: 1; display: flex; align-items: center; justify-content: center;
  text-decoration: none; color: var(--muted); font-size: 14px; }
.tabbar a.active { color: var(--brand); font-weight: 600; }

/* 大图查看 */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.9); z-index: 900;
  display: flex; align-items: center; justify-content: center; flex-direction: column; padding: 20px; }
.lightbox img { max-width: 100%; max-height: 82vh; object-fit: contain; border-radius: 6px; }
.lightbox .lb-close { position: absolute; top: 14px; right: 20px; color: #fff; font-size: 34px; line-height: 1; }
.lightbox .lb-title { color: #fff; margin-top: 14px; font-size: 15px; }

/* toast */
.toast { position: fixed; left: 50%; top: 40%; transform: translateX(-50%);
  background: rgba(0,0,0,.8); color: #fff; padding: 10px 18px; border-radius: 8px;
  font-size: 14px; z-index: 999; max-width: 80%; text-align: center; }
