* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
:root {
  --primary: #1B1F27;
  --accent: #FF5A1F;
  --success: #16A34A;
  --warn: #D97706;
  --danger: #DC2626;
  --bg: #F5F6F8;
  --card: #FFFFFF;
  --text: #1A1D23;
  --text-sub: #6B7280;
  --line: #E5E7EB;
}
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
  -webkit-user-select: none;
  user-select: none;
}
.hidden { display: none !important; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea {
  font-family: inherit; font-size: 16px; width: 100%;
  border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; background: #fff; color: var(--text); outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); }

/* 按钮 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 12px; font-size: 16px; padding: 12px 18px; transition: opacity .15s; }
.btn:active { opacity: .8; }
.btn-accent { background: var(--accent); color: #fff; font-weight: 600; }
.btn-dark { background: var(--primary); color: #fff; font-weight: 600; }
.btn-ghost { background: rgba(255,255,255,.15); color: #fff; }
.btn-subtle { background: var(--bg); color: var(--text); border: 1px solid var(--line); }
.btn-sm { padding: 6px 12px; font-size: 14px; border-radius: 10px; }
.btn-lg { width: 100%; padding: 14px; font-size: 17px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* 登录/注册页 */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(160deg, #14171d 0%, #232936 60%, #2b3342 100%); padding: 24px; }
.login-card { width: 100%; max-width: 400px; background: #fff; border-radius: 20px; padding: 32px 24px; box-shadow: 0 12px 40px rgba(0,0,0,.25); }
.brand { text-align: center; margin-bottom: 28px; }
.brand-mark { width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 16px; background: var(--primary); color: var(--accent); font-size: 26px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.brand h1 { font-size: 22px; color: var(--text); }
.brand p { color: var(--text-sub); font-size: 14px; margin-top: 2px; }
.field { display: block; margin-bottom: 16px; }
.field span { display: block; font-size: 14px; color: var(--text-sub); margin-bottom: 6px; }
.form-error { background: #FEF2F2; color: var(--danger); border-radius: 10px; padding: 10px 12px; font-size: 14px; margin-bottom: 14px; }
.form-tip { font-size: 13px; color: var(--text-sub); margin-top: 10px; text-align: center; }
.form-link { color: var(--accent); font-weight: 600; cursor: pointer; text-decoration: underline; }

/* 顶栏 */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; }
.topbar-title { font-weight: 600; font-size: 17px; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.user-name { font-size: 14px; color: rgba(255,255,255,.8); max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 页面 */
.page { max-width: 560px; margin: 0 auto; padding: 16px 16px 96px; }
.page h2 { font-size: 20px; margin-bottom: 12px; }

/* 卡片 */
.card { background: var(--card); border-radius: 16px; padding: 16px; box-shadow: 0 2px 8px rgba(0,0,0,.06); margin-bottom: 12px; }
.card-title { font-weight: 600; margin-bottom: 8px; }

/* 标签 */
.tag { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 999px; }
.tag-green { background: #ECFDF3; color: var(--success); }
.tag-gray { background: #F3F4F6; color: var(--text-sub); }
.tag-orange { background: #FFF4E5; color: var(--warn); }
.tag-red { background: #FEF2F2; color: var(--danger); }
.tag-blue { background: #EFF4FF; color: #2F6BFF; }

/* 开门页面 */
.door-wrap { text-align: center; padding-top: 38px; }
.door-status { font-size: 15px; color: var(--text-sub); margin-bottom: 28px; }
.door-status .ok { color: var(--success); font-weight: 600; }
.door-btn {
  width: 180px; height: 180px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, #E8450B 100%);
  color: #fff; font-size: 20px; font-weight: 700;
  box-shadow: 0 8px 32px rgba(255,90,31,.45);
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .15s;
  position: relative;
}
.door-btn:active { transform: scale(.94); box-shadow: 0 4px 16px rgba(255,90,31,.35); }
.door-btn:disabled { background: #ccc; box-shadow: none; }
.door-btn.guest { background: #C3C7CE; box-shadow: none; cursor: pointer; }
.door-btn .icon { font-size: 48px; display: block; margin-bottom: 4px; }
.door-result { margin-top: 24px; padding: 14px 18px; border-radius: 14px; font-size: 15px; font-weight: 600; }
.door-result.success { background: #ECFDF3; color: var(--success); }
.door-result.fail { background: #FEF2F2; color: var(--danger); }
.door-tip { margin-top: 20px; font-size: 13px; color: var(--text-sub); }

/* 我的卡 */
.card-item { padding: 14px 0; border-bottom: 1px solid var(--line); }
.card-item:last-child { border-bottom: none; }
.card-item .top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.card-item .name { font-weight: 600; font-size: 16px; }
.card-item .info { font-size: 13px; color: var(--text-sub); }
.card-item .info b { color: var(--accent); font-size: 15px; }

/* 套餐展示 */
.pkg-card { background: var(--card); border-radius: 16px; padding: 18px 16px; box-shadow: 0 2px 8px rgba(0,0,0,.06); margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; }
.pkg-card .pkg-left { flex: 1; }
.pkg-card .pkg-name { font-weight: 600; font-size: 16px; margin-bottom: 4px; }
.pkg-card .pkg-desc { font-size: 13px; color: var(--text-sub); margin-bottom: 2px; }
.pkg-card .pkg-tag { font-size: 12px; }
.pkg-card .pkg-price { font-size: 22px; font-weight: 700; color: var(--accent); white-space: nowrap; }
.pkg-card .pkg-price .unit { font-size: 14px; font-weight: 400; }

/* 设置 */
.setting-section { margin-bottom: 20px; }
.setting-section .card-title { margin-bottom: 12px; }

/* 底部导航 */
.tabbar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; background: #fff; border-top: 1px solid var(--line); display: flex; padding-bottom: env(safe-area-inset-bottom); }
.tab { flex: 1; padding: 10px 0 8px; font-size: 13px; color: var(--text-sub); border-top: 2px solid transparent; }
.tab.active { color: var(--accent); border-top-color: var(--accent); font-weight: 600; }

/* 列表 */
.list-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: none; }
.list-main b { display: block; font-size: 16px; }
.list-main span { font-size: 13px; color: var(--text-sub); }
.list-side { text-align: right; font-size: 13px; color: var(--text-sub); white-space: nowrap; }

/* 空状态 */
.empty { text-align: center; color: var(--text-sub); padding: 40px 0; }
.empty .big { font-size: 40px; margin-bottom: 8px; }

/* 轮播图 */
.carousel { position: relative; width: 100%; overflow: hidden; background: #E8EAED; }
.carousel-track { display: flex; transition: transform .4s ease; }
.carousel-slide { min-width: 100%; aspect-ratio: 16/9; }
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.carousel-dots { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; }
.carousel-dots .dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.55); transition: all .2s; }
.carousel-dots .dot.active { background: #fff; width: 18px; border-radius: 4px; }

/* 场馆实景图 */
.venue-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.venue-item { border-radius: 10px; overflow: hidden; aspect-ratio: 4/3; }
.venue-item img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 页面内边距 */
.page-inner { max-width: 560px; margin: 0 auto; }

/* 通栏（轮播图贴边） */
.full-bleed { margin: -16px -16px 0; }

/* 模态框 */
.modal-mask { position: fixed; inset: 0; background: rgba(15,17,22,.55); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.modal { background: #fff; width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto; border-radius: 20px 20px 0 0; padding: 20px 20px 28px; animation: up .18s ease-out; }
@keyframes up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal h3 { font-size: 18px; margin-bottom: 16px; }
.modal .btn-row { display: flex; gap: 10px; margin-top: 18px; }
.modal .btn-row .btn { flex: 1; }
.form-grid { display: grid; gap: 12px; }

/* 工具栏 */
.toolbar { display: flex; gap: 10px; margin-bottom: 12px; }
.toolbar input { flex: 1; }
