/* ============================================
   MY BENCH · 游戏风（粗黑边 + 彩色徽章 + 偏移阴影）
   ============================================ */

:root {
  --bg: #E8EEF5;
  --bg-2: #DCE5F0;
  --surface: #FFFFFF;
  --ink: #1A1A1A;
  --ink-2: #4A4A4A;
  --muted: #8A8A8A;
  --line: #1A1A1A;

  /* 游戏徽章色 */
  --c-yellow: #FFD966;
  --c-purple: #C9A7F5;
  --c-blue: #7EB6FF;
  --c-green: #7ED9A7;
  --c-pink: #FFB3D9;
  --c-orange: #FFB066;
  --c-red: #FF8888;
  --c-cyan: #7EDDE0;

  --shadow-sm: 2px 2px 0 var(--line);
  --shadow: 4px 4px 0 var(--line);
  --shadow-lg: 6px 6px 0 var(--line);

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 18px;
  --radius-xl: 22px;

  --font: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;

  --tabbar-h: 64px;
  --mobile-header-h: 60px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-weight: 500;
}
h1, h2, h3, h4 { font-weight: 800; margin: 0; letter-spacing: -.01em; }
button { font-family: inherit; cursor: pointer; font-weight: 700; touch-action: manipulation; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

/* ===== 通用游戏按钮 ===== */
.btn-game {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px;
  background: var(--surface);
  color: var(--ink);
  border: 2.5px solid var(--line);
  border-radius: var(--radius);
  font-size: 14px; font-weight: 800;
  box-shadow: var(--shadow);
  transition: all .12s ease;
  letter-spacing: .02em;
}
.btn-game:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--line); }
.btn-game:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--line); }

.btn-primary { background: var(--c-yellow); }
.btn-blue { background: var(--c-blue); }
.btn-green { background: var(--c-green); }
.btn-pink { background: var(--c-pink); }
.btn-orange { background: var(--c-orange); }
.btn-purple { background: var(--c-purple); }

.btn-lg { padding: 14px 28px; font-size: 16px; border-radius: var(--radius-lg); }
.btn-sm { padding: 6px 12px; font-size: 12px; box-shadow: var(--shadow-sm); border-radius: var(--radius-sm); }
.btn-sm:hover { box-shadow: 3px 3px 0 var(--line); }
.btn-sm:active { box-shadow: 0 0 0 var(--line); }

.btn-icon {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--surface); color: var(--ink);
  border: 2px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 800;
  box-shadow: 2px 2px 0 var(--line);
  transition: all .12s ease;
  padding: 0;
}
.btn-icon:hover { transform: translate(-1px,-1px); box-shadow: 3px 3px 0 var(--line); }
.btn-icon:active { transform: translate(1px,1px); box-shadow: 0 0 0 var(--line); }
.btn-icon.danger { background: var(--c-red); color: #fff; }

/* ===== 徽章 ===== */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px;
  border: 2px solid var(--line);
  border-radius: 999px;
  font-size: 11px; font-weight: 800;
  background: var(--surface); color: var(--ink);
  box-shadow: 2px 2px 0 var(--line);
  letter-spacing: .03em;
}
.badge.b-yellow { background: var(--c-yellow); }
.badge.b-purple { background: var(--c-purple); }
.badge.b-blue { background: var(--c-blue); }
.badge.b-green { background: var(--c-green); }
.badge.b-pink { background: var(--c-pink); }
.badge.b-orange { background: var(--c-orange); }
.badge.b-red { background: var(--c-red); color: #fff; }
.badge.b-cyan { background: var(--c-cyan); }
.badge.b-white { background: var(--surface); }

/* ===== 登录页 ===== */
.auth-screen {
  position: fixed; inset: 0;
  background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 20px;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(126, 182, 255, .25), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(255, 217, 102, .25), transparent 40%);
}
.auth-card {
  width: 100%; max-width: 400px;
  background: var(--surface);
  border: 3px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 32px 28px;
  box-shadow: var(--shadow-lg);
}
.auth-logo {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 28px;
}
.logo-mark {
  width: 56px; height: 56px; border-radius: var(--radius);
  background: var(--c-yellow);
  border: 3px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  box-shadow: var(--shadow);
}
.logo-name { font-size: 22px; font-weight: 900; letter-spacing: .04em; }
.logo-tag { font-size: 11px; color: var(--muted); letter-spacing: .2em; margin-top: 2px; }

.auth-tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  margin-bottom: 22px;
  padding: 4px;
  background: var(--bg-2);
  border: 2px solid var(--line);
  border-radius: var(--radius);
}
.auth-tab {
  padding: 10px;
  background: transparent;
  border: 2px solid transparent;
  border-radius: 10px;
  font-size: 14px;
}
.auth-tab.active {
  background: var(--surface);
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-form .btn-game { width: 100%; margin-top: 6px; }
.auth-error { color: #D33; font-size: 12px; min-height: 16px; font-weight: 600; }
.auth-foot { margin-top: 24px; font-size: 11px; color: var(--muted); letter-spacing: .15em; }

/* ===== 表单 ===== */
.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 12px; font-weight: 800; color: var(--ink-2); letter-spacing: .05em; }
.form-input, .form-textarea, .form-select {
  width: 100%; padding: 11px 14px;
  background: var(--surface);
  border: 2.5px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: inherit; font-size: 14px; font-weight: 600;
  color: var(--ink);
  transition: all .12s ease;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none;
  box-shadow: var(--shadow);
  transform: translate(-1px, -1px);
}
.form-textarea { min-height: 80px; resize: vertical; line-height: 1.5; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ===== 主应用布局 ===== */
.app { display: flex; min-height: 100vh; }

/* ===== 侧边栏 ===== */
.sidebar {
  width: 240px; flex-shrink: 0;
  background: var(--surface);
  border-right: 3px solid var(--line);
  display: flex; flex-direction: column;
  padding: 20px 14px;
  position: sticky; top: 0; height: 100vh;
  overflow-y: auto;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  padding: 6px 8px 18px;
  border-bottom: 2px dashed var(--line);
  margin-bottom: 12px;
}
.brand-mark {
  width: 42px; height: 42px; border-radius: var(--radius);
  background: var(--c-yellow);
  border: 2.5px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  box-shadow: var(--shadow-sm);
}
.brand-name { font-size: 16px; font-weight: 900; letter-spacing: .06em; }
.brand-tag { font-size: 10px; color: var(--muted); letter-spacing: .2em; margin-top: 2px; }

.nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border: 2.5px solid transparent;
  border-radius: var(--radius);
  color: var(--ink-2); font-weight: 700; font-size: 13px;
  cursor: pointer; user-select: none;
  transition: all .12s ease;
  background: transparent;
}
.nav-item .icon {
  width: 26px; height: 26px;
  border-radius: 8px;
  background: var(--bg-2);
  border: 2px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}
.nav-item:hover { background: var(--bg-2); color: var(--ink); }
.nav-item.active {
  background: var(--c-yellow);
  color: var(--ink);
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}
.nav-item.active .icon { background: var(--surface); }

.sidebar-foot {
  padding-top: 12px;
  border-top: 2px dashed var(--line);
  margin-top: 12px;
}
.user-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: var(--bg-2);
  border: 2px solid var(--line);
  border-radius: var(--radius);
}
.user-chip-avatar {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--c-purple);
  border: 2px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.user-chip-name { font-size: 13px; font-weight: 800; }
.user-chip-level { font-size: 10px; color: var(--muted); }
.logout-btn {
  margin-left: auto; padding: 4px 8px;
  font-size: 10px; border-radius: 6px;
}

/* ===== 主区 ===== */
.main {
  flex: 1;
  padding: 28px 36px 60px;
  min-width: 0;
}
.loading { padding: 80px; text-align: center; color: var(--muted); font-weight: 700; }

/* ===== 移动端 header / tabbar ===== */
.mobile-header, .tabbar, .drawer-mask { display: none; }

/* ===== 欢迎卡（Hero） ===== */
.hero {
  background: var(--surface);
  border: 3px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 28px 32px;
  box-shadow: var(--shadow-lg);
  margin-bottom: 22px;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px; align-items: center;
}
.hero-avatar {
  width: 84px; height: 84px; border-radius: var(--radius-lg);
  background: var(--c-purple);
  border: 3px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-size: 44px;
  box-shadow: var(--shadow);
}
.hero-name { font-size: 24px; font-weight: 900; letter-spacing: .01em; }
.hero-meta { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.hero-right { display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.hero-date { font-size: 12px; color: var(--muted); font-weight: 700; letter-spacing: .1em; }
.hero-hello { font-size: 16px; font-weight: 800; margin-top: 4px; }
.exp-bar {
  width: 180px; height: 12px;
  background: var(--bg-2);
  border: 2px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.exp-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--c-green), var(--c-yellow));
  border-right: 2px solid var(--line);
}
.exp-text { font-size: 11px; color: var(--ink-2); font-weight: 700; margin-top: 4px; }

/* ===== 统计卡 ===== */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 14px; margin-bottom: 22px;
}
.stat {
  background: var(--surface);
  border: 3px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex; align-items: center; gap: 14px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: all .15s ease;
}
.stat:hover { transform: translate(-2px,-2px); box-shadow: var(--shadow-lg); }
.stat:active { transform: translate(1px,1px); box-shadow: var(--shadow-sm); }
.stat-icon {
  width: 48px; height: 48px; border-radius: var(--radius);
  border: 2.5px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}
.stat-icon.i-yellow { background: var(--c-yellow); }
.stat-icon.i-blue { background: var(--c-blue); }
.stat-icon.i-green { background: var(--c-green); }
.stat-icon.i-pink { background: var(--c-pink); }
.stat-icon.i-purple { background: var(--c-purple); }
.stat-icon.i-orange { background: var(--c-orange); }
.stat-icon.i-cyan { background: var(--c-cyan); }
.stat-icon.i-red { background: var(--c-red); color: #fff; }
.stat-num { font-size: 26px; font-weight: 900; line-height: 1; }
.stat-label { font-size: 11px; color: var(--muted); margin-top: 4px; font-weight: 700; letter-spacing: .05em; }

/* ===== 双栏 ===== */
.dual { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.panel {
  background: var(--surface);
  border: 3px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow);
}
.panel-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
}
.panel-title { font-size: 18px; font-weight: 900; }
.panel-link {
  font-size: 12px; color: var(--ink-2); font-weight: 700;
  cursor: pointer;
}
.panel-link:hover { color: var(--ink); text-decoration: underline; }

/* ===== 列表 ===== */
.list { list-style: none; padding: 0; margin: 0; }
.list-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0;
  border-bottom: 2px dashed var(--bg-2);
}
.list-item:last-child { border-bottom: none; }
.check {
  width: 22px; height: 22px; border-radius: 6px;
  border: 2.5px solid var(--line);
  background: var(--surface);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
  transition: all .12s ease;
  padding: 0;
}
.check.done {
  background: var(--c-green);
}
.check.done::after {
  content: '✓'; color: var(--ink); font-size: 13px; font-weight: 900;
}
.list-text { flex: 1; font-size: 14px; font-weight: 600; word-break: break-word; }
.list-text.done { color: var(--muted); text-decoration: line-through; }
.list-meta { font-size: 11px; color: var(--muted); font-weight: 700; }
.list-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--c-orange);
  border: 1.5px solid var(--line);
  flex-shrink: 0;
}
.owner-tag {
  font-size: 10px; padding: 1px 6px;
  background: var(--c-cyan); border: 1.5px solid var(--line);
  border-radius: 999px; font-weight: 800;
}

.add-btn {
  display: block; width: 100%;
  padding: 12px;
  margin-top: 12px;
  background: var(--bg-2);
  border: 2.5px dashed var(--line);
  border-radius: var(--radius);
  color: var(--ink-2); font-size: 13px; font-weight: 800;
  transition: all .12s ease;
}
.add-btn:hover { background: var(--c-yellow); color: var(--ink); }

/* ===== 小日常瓷砖 ===== */
.little-section { margin-top: 28px; }
.section-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 14px;
}
.section-tag {
  font-size: 11px; color: var(--muted);
  letter-spacing: .25em; font-weight: 800;
}
.section-title { font-size: 22px; font-weight: 900; margin-top: 4px; }
.tile-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.tile {
  background: var(--surface);
  border: 3px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
  cursor: pointer;
  display: flex; flex-direction: column; gap: 6px;
  min-height: 100px;
  box-shadow: var(--shadow);
  transition: all .15s ease;
}
.tile:hover { transform: translate(-2px,-2px); box-shadow: var(--shadow-lg); }
.tile:active { transform: translate(1px,1px); box-shadow: var(--shadow-sm); }
.tile-icon {
  width: 36px; height: 36px; border-radius: 10px;
  border: 2px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  box-shadow: var(--shadow-sm);
}
.tile-name { font-size: 14px; font-weight: 800; margin-top: 4px; }
.tile-count { font-size: 11px; color: var(--muted); font-weight: 700; }

/* ===== 模块页 ===== */
.module { display: flex; flex-direction: column; gap: 18px; }
.module-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  padding-bottom: 14px;
  border-bottom: 3px solid var(--line);
  flex-wrap: wrap; gap: 12px;
}
.module-title-wrap { display: flex; gap: 14px; align-items: center; min-width: 0; }
.module-icon {
  width: 52px; height: 52px; border-radius: var(--radius);
  background: var(--c-yellow);
  border: 3px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  box-shadow: var(--shadow);
  flex-shrink: 0;
}
.module-title { font-size: 26px; font-weight: 900; }
.module-sub { font-size: 11px; color: var(--muted); font-weight: 700; letter-spacing: .18em; margin-top: 2px; text-transform: uppercase; }
.module-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* 团队切换条 */
.team-bar {
  display: flex; gap: 8px; flex-wrap: wrap;
  padding: 12px;
  background: var(--bg-2);
  border: 2.5px solid var(--line);
  border-radius: var(--radius);
}
.team-tab {
  padding: 6px 14px;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 999px;
  font-size: 12px; font-weight: 800;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all .12s ease;
}
.team-tab.active { background: var(--c-blue); }
.team-tab:hover { transform: translate(-1px,-1px); box-shadow: 3px 3px 0 var(--line); }

/* ===== 卡片列表 ===== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.card-item {
  background: var(--surface);
  border: 3px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  display: flex; flex-direction: column; gap: 8px;
  box-shadow: var(--shadow);
  transition: all .15s ease;
}
.card-item:hover { transform: translate(-2px,-2px); box-shadow: var(--shadow-lg); }
.card-item-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.card-item-title { font-size: 16px; font-weight: 900; word-break: break-word; }
.card-item-body { color: var(--ink-2); font-size: 13px; line-height: 1.6; font-weight: 500; word-break: break-word; }
.card-item-foot {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 10px; border-top: 2px dashed var(--bg-2);
}
.card-item-meta { font-size: 11px; color: var(--muted); font-weight: 700; }
.card-item-actions { display: flex; gap: 6px; }
.amount-positive { color: #1a8f4d; font-weight: 900; font-size: 16px; }
.amount-negative { color: #d33; font-weight: 900; font-size: 16px; }

/* ===== 空态 ===== */
.empty {
  background: var(--surface);
  border: 3px dashed var(--line);
  border-radius: var(--radius-lg);
  padding: 60px 20px;
  text-align: center;
  color: var(--muted);
}
.empty-icon { font-size: 40px; margin-bottom: 12px; }
.empty-title { font-size: 16px; font-weight: 800; color: var(--ink-2); margin-bottom: 6px; }

/* ===== 弹窗 ===== */
.modal-mask {
  position: fixed; inset: 0;
  background: rgba(26, 26, 26, 0.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 200;
  padding: 20px;
}
.modal {
  background: var(--surface);
  border: 3px solid var(--line);
  border-radius: var(--radius-xl);
  width: 480px; max-width: 100%;
  max-height: 88vh;
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg);
  animation: pop .18s ease-out;
}
@keyframes pop {
  from { opacity: 0; transform: scale(.94) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 22px;
  border-bottom: 3px solid var(--line);
  background: var(--c-yellow);
}
.modal-title { font-size: 17px; font-weight: 900; }
.modal-body { padding: 22px; overflow-y: auto; }
.form-foot {
  display: flex; justify-content: flex-end; gap: 10px;
  margin-top: 20px; padding-top: 16px;
  border-top: 2px dashed var(--bg-2);
}

/* ===== Toast ===== */
.toast {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: var(--surface);
  padding: 10px 18px;
  border: 2.5px solid var(--line);
  border-radius: 999px;
  font-size: 13px; font-weight: 800;
  z-index: 300;
  box-shadow: var(--shadow);
  animation: pop .18s ease-out;
}
.toast.ok { background: var(--c-green); color: var(--ink); }
.toast.err { background: var(--c-red); color: #fff; }

/* ===== 团队页 ===== */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.team-card {
  background: var(--surface);
  border: 3px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow);
}
.team-name { font-size: 17px; font-weight: 900; }
.team-code {
  font-family: 'Courier New', monospace;
  font-size: 18px; font-weight: 900;
  background: var(--bg-2);
  border: 2px dashed var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  text-align: center;
  letter-spacing: .2em;
  margin: 10px 0;
}
.member-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.member-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 8px;
  background: var(--bg-2);
  border: 2px solid var(--line);
  border-radius: 999px;
  font-size: 11px; font-weight: 700;
}
.member-avatar {
  width: 18px; height: 18px; border-radius: 5px;
  background: var(--c-purple);
  border: 1.5px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px;
}

/* ===== 我的页面：头像选择 ===== */
.avatar-grid {
  display: grid; grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}
.avatar-pick {
  aspect-ratio: 1;
  background: var(--bg-2);
  border: 2.5px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 24px;
  cursor: pointer;
  transition: all .12s ease;
  box-shadow: var(--shadow-sm);
}
.avatar-pick:hover { transform: translate(-1px,-1px); box-shadow: 3px 3px 0 var(--line); }
.avatar-pick.active {
  background: var(--c-yellow);
  transform: translate(-1px,-1px);
  box-shadow: var(--shadow);
}
.user-chip { cursor: pointer; transition: all .15s ease; }
.user-chip:hover { transform: translate(-1px,-1px); box-shadow: var(--shadow); }

/* ===== 响应式：平板（768–1100px） ===== */
@media (min-width: 768px) and (max-width: 1100px) {
  .sidebar { width: 76px; padding: 20px 10px; }
  .brand-text, .sidebar-foot, .nav-item span:not(.icon) { display: none; }
  .brand { justify-content: center; padding: 6px 4px 14px; }
  .nav-item { justify-content: center; padding: 10px; gap: 0; }
  .main { padding: 24px 24px 60px; }
  .stats, .tile-grid { grid-template-columns: repeat(2, 1fr); }
  .dual { grid-template-columns: 1fr; }
  .hero-grid { grid-template-columns: auto 1fr; }
  .hero-right { grid-column: 1/-1; align-items: flex-start; flex-direction: row; justify-content: space-between; }
}

/* ===== 响应式：手机（<768px） ===== */
@media (max-width: 767px) {
  .sidebar { display: none; }
  .main { padding: calc(var(--mobile-header-h) + 16px) 14px calc(var(--tabbar-h) + 24px); }
  body { padding-bottom: 0; }

  .mobile-header {
    display: flex; align-items: center; justify-content: space-between;
    position: fixed; top: 0; left: 0; right: 0;
    height: var(--mobile-header-h);
    padding: 0 14px;
    background: var(--surface);
    border-bottom: 3px solid var(--line);
    z-index: 90;
  }
  .mobile-brand { display: flex; align-items: center; gap: 10px; }
  .mobile-brand .brand-mark { width: 34px; height: 34px; font-size: 18px; }
  .mobile-title { font-size: 14px; font-weight: 900; letter-spacing: .08em; }
  .mobile-sub { font-size: 10px; color: var(--muted); font-weight: 700; }
  .mobile-menu-btn {
    width: 36px; height: 36px;
    background: var(--c-yellow);
    border: 2.5px solid var(--line);
    border-radius: var(--radius-sm);
    font-size: 18px; font-weight: 900;
    box-shadow: var(--shadow-sm);
  }

  .tabbar {
    display: flex;
    position: fixed; bottom: 0; left: 0; right: 0;
    height: var(--tabbar-h);
    background: var(--surface);
    border-top: 3px solid var(--line);
    z-index: 90;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .tabbar-item {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 3px;
    background: transparent; border: none;
    color: var(--muted); font-size: 10px; font-weight: 800;
    cursor: pointer;
  }
  .tabbar-item .tab-icon {
    width: 32px; height: 32px;
    border-radius: 10px;
    background: var(--bg-2);
    border: 2px solid var(--line);
    display: flex; align-items: center; justify-content: center;
    font-size: 15px;
  }
  .tabbar-item.active { color: var(--ink); }
  .tabbar-item.active .tab-icon { background: var(--c-yellow); }

  .drawer-mask {
    display: block;
    position: fixed; inset: 0;
    background: rgba(26, 26, 26, 0.5);
    z-index: 150;
  }
  .drawer {
    position: absolute; left: 0; right: 0; bottom: 0;
    background: var(--surface);
    border-top: 3px solid var(--line);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
    max-height: 72vh; overflow-y: auto;
    animation: drawerUp .22s ease-out;
  }
  @keyframes drawerUp {
    from { transform: translateY(40%); }
    to { transform: translateY(0); }
  }
  .drawer-head {
    display: flex; justify-content: space-between; align-items: center;
    padding-bottom: 12px; border-bottom: 2px dashed var(--bg-2);
    margin-bottom: 14px;
  }
  .drawer-title { font-size: 16px; font-weight: 900; }
  .drawer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .drawer-item {
    display: flex; flex-direction: column; align-items: center;
    gap: 6px; padding: 12px 4px;
    background: var(--bg-2); border: 2px solid var(--line);
    border-radius: var(--radius-sm);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
  }
  .drawer-item:active { transform: translate(1px,1px); box-shadow: 0 0 0 var(--line); }
  .drawer-item.active { background: var(--c-yellow); }
  .drawer-item .drawer-icon {
    width: 30px; height: 30px;
    background: var(--surface);
    border: 2px solid var(--line);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
  }
  .drawer-item .drawer-name { font-size: 10px; font-weight: 800; }

  /* 主区在手机上：单列布局 */
  .hero { padding: 20px; }
  .hero-grid { grid-template-columns: auto 1fr; gap: 14px; }
  .hero-avatar { width: 64px; height: 64px; font-size: 32px; }
  .hero-name { font-size: 18px; }
  .hero-right { grid-column: 1/-1; flex-direction: row; align-items: center; justify-content: space-between; }
  .exp-bar { width: 120px; }

  .stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat { padding: 12px; gap: 10px; }
  .stat-icon { width: 38px; height: 38px; font-size: 17px; }
  .stat-num { font-size: 20px; }
  .stat-label { font-size: 10px; }

  .dual { grid-template-columns: 1fr; gap: 12px; }
  .panel { padding: 14px 16px; }
  .panel-title { font-size: 16px; }

  .tile-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .tile { padding: 14px; min-height: 88px; }
  .tile-icon { width: 32px; height: 32px; font-size: 16px; }
  .tile-name { font-size: 13px; }

  .module-head { align-items: flex-start; }
  .module-title { font-size: 20px; }
  .module-icon { width: 42px; height: 42px; font-size: 19px; }

  .cards { grid-template-columns: 1fr; gap: 10px; }
  .card-item { padding: 14px; }

  .modal {
    width: 100%; max-width: 100%;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    max-height: 92vh;
    align-self: flex-end;
  }
  .modal-mask { align-items: flex-end; padding: 0; }

  .auth-card { padding: 24px 20px; }
}
