/* ========================================================
   勇者橘喵传 · 视觉样式系统 (借鉴《勇者奶蛙传》温润典雅复古暗金风格)
   ======================================================== */

:root {
  --bg-deep: #171321;
  --bg-card: #271c2c;
  --bg-card-glass: rgba(39, 28, 44, 0.9);
  --gold-primary: #dfb36b;
  --gold-light: #ffe59b;
  --gold-dark: #8c693a;
  --gold-border: rgba(223, 179, 107, 0.45);
  --cream-text: #fff2db;
  --dim-text: #bda6b3;
  --accent-pink: #d9536f;
  --accent-purple: #743a6d;
  --accent-energy: linear-gradient(90deg, #ff9800, #ffeb3b, #76ff03);
  --shadow-warm: 0 8px 24px rgba(0, 0, 0, 0.65);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-deep);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--cream-text);
}

#app {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.btn-lobby-float {
  display: none !important;
}

.btn-lobby-float:hover {
  background: rgba(223, 179, 107, 0.35);
  border-color: #ffe59b;
  transform: translateY(-2px);
}

.btn-lobby-float:active {
  transform: translateY(1px);
}

/* 3D WebGL Canvas */
#game-container {
  position: absolute;
  inset: 0;
  z-index: 1;
}

#game-container canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

/* UI Overlay Layer */
#ui-layer {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

.hidden {
  display: none !important;
}

/* ========================================================
   Floating Combo & Juice Toast Banner
   ======================================================== */
.combo-container {
  position: absolute;
  top: 18%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  z-index: 35;
}

.combo-toast {
  padding: 6px 18px;
  border-radius: 20px;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
  box-shadow: 0 8px 20px rgba(0,0,0,0.6);
  animation: toastPop 1.4s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
  white-space: nowrap;
}

.combo-toast.combo {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fffbeb;
  border: 2px solid #fef08a;
}
.combo-toast.fever {
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  color: #ffffff;
  border: 2px solid #fbcfe8;
  font-size: 22px;
}
.combo-toast.buff {
  background: linear-gradient(135deg, #0284c7, #06b6d4);
  color: #ffffff;
  border: 2px solid #bae6fd;
}
.combo-toast.special {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  border: 2px solid #a7f3d0;
  font-size: 20px;
}
.combo-toast.alert {
  background: linear-gradient(135deg, #dc2626, #991b1b);
  color: #ffffff;
  border: 2px solid #fecaca;
}

@keyframes toastPop {
  0% { transform: scale(0.4) translateY(20px); opacity: 0; }
  20% { transform: scale(1.15) translateY(0); opacity: 1; }
  35% { transform: scale(1.0); }
  80% { transform: scale(1.0) translateY(-10px); opacity: 1; }
  100% { transform: scale(0.85) translateY(-35px); opacity: 0; }
}

/* ========================================================
   1. 顶部 HUD 状态栏
   ======================================================== */
.hud-container {
  pointer-events: auto;
  position: absolute;
  top: 12px;
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  z-index: 20;
}

/* 角色面板 */
.hero-panel {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card-glass);
  border: 1px solid var(--gold-border);
  box-shadow: var(--shadow-warm), inset 0 0 10px rgba(223, 179, 107, 0.15);
  border-radius: 36px;
  padding: 5px 14px 5px 6px;
  backdrop-filter: blur(8px);
}

.avatar-frame {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--gold-light);
  box-shadow: 0 0 12px rgba(255, 229, 155, 0.45);
  overflow: hidden;
  background: #000;
  flex-shrink: 0;
  transition: transform 0.15s;
}

.avatar-frame:active {
  transform: scale(0.92);
}

.cat-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  transform: scale(1.15);
}

.avatar-tag {
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #d32f2f, #f57c00);
  color: #fff;
  font-size: 8px;
  font-weight: 800;
  padding: 0 4px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.hero-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.hero-title {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hero-name {
  font-weight: 700;
  font-size: 13px;
  color: var(--gold-light);
  letter-spacing: 0.5px;
}

.zone-badge {
  font-size: 10px;
  padding: 1px 6px;
  background: rgba(223, 179, 107, 0.2);
  border: 1px solid var(--gold-primary);
  border-radius: 10px;
  color: var(--gold-light);
}

/* 猫薄荷蓄力槽 */
.energy-track {
  position: relative;
  width: 110px;
  height: 12px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(223, 179, 107, 0.4);
}

.energy-fill {
  height: 100%;
  background: var(--accent-energy);
  border-radius: 10px;
  transition: width 0.2s ease-out;
  box-shadow: 0 0 8px rgba(255, 235, 59, 0.7);
}

.energy-caption {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 2px #000;
}

/* 中间栏：M-E-O-W 字母收集器与 Buff 药丸 */
.center-hud {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.letter-tracker {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid var(--gold-border);
  padding: 3px 8px;
  border-radius: 14px;
  backdrop-filter: blur(6px);
}

.letter-tag {
  font-size: 9px;
  color: var(--dim-text);
  margin-right: 2px;
}

.letter-chip {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.4);
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.letter-chip.collected {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
  border-color: #fde047;
  box-shadow: 0 0 8px rgba(250, 204, 21, 0.8);
  transform: scale(1.15);
}

/* Buffs 栏 */
.buffs-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.buff-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  animation: pulseBuff 1s infinite alternate;
}

.buff-tuna {
  background: linear-gradient(135deg, #0288d1, #00b0ff);
  color: #fff;
  border: 1px solid #80d8ff;
}
.buff-magnet {
  background: linear-gradient(135deg, #c2185b, #e91e63);
  color: #fff;
  border: 1px solid #ff80ab;
}
.buff-shield {
  background: linear-gradient(135deg, #2e7d32, #4caf50);
  color: #fff;
  border: 1px solid #b9f6ca;
}
.buff-hoverboard {
  background: linear-gradient(135deg, #0284c7, #06b6d4);
  color: #fff;
  border: 1px solid #67e8f9;
}
.buff-slip {
  background: linear-gradient(135deg, #9333ea, #db2777);
  color: #fff;
  border: 1px solid #f472b6;
  box-shadow: 0 0 10px rgba(219, 39, 119, 0.6);
  animation: pulseBuff 0.4s infinite alternate;
}

@keyframes pulseBuff {
  0% { transform: scale(0.96); }
  100% { transform: scale(1.04); }
}

/* 右侧数值与按钮 */
.stats-panel {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  background: var(--bg-card-glass);
  border: 1px solid var(--gold-border);
  border-radius: 18px;
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(6px);
}

.stat-val {
  color: var(--gold-light);
}

.tool-buttons {
  display: flex;
  gap: 6px;
}

.icon-btn {
  pointer-events: auto;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--gold-border);
  background: var(--bg-card-glass);
  color: var(--cream-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  transition: transform 0.1s, background 0.2s;
}

.icon-btn:active {
  transform: scale(0.92);
}

/* ========================================================
   2. 底部操作按键 (仅保留滑板与加速，全屏视野更开阔)
   ======================================================== */
.touch-overlay {
  pointer-events: none;
  position: absolute;
  bottom: 24px;
  left: 20px;
  right: 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  z-index: 25;
}

.touch-action-left,
.touch-action-right {
  pointer-events: auto;
}

.touch-action-btn {
  cursor: pointer;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s ease, box-shadow 0.2s ease, filter 0.15s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.touch-action-btn:active {
  transform: scale(0.92);
  filter: brightness(1.25);
}

.touch-action-btn .btn-emoji {
  font-size: 26px;
  line-height: 1;
}

.touch-action-btn .btn-label {
  font-size: 11px;
  font-weight: 800;
  margin-top: 2px;
  letter-spacing: 0.5px;
}

/* 左侧：极速滑板按钮 */
.hoverboard-btn {
  background: radial-gradient(circle at 35% 25%, #0284c7, #075985, #082f49);
  border: 2.5px solid #38bdf8;
  color: #f0f9ff;
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.45), inset 0 0 10px rgba(56, 189, 248, 0.4);
}

.hoverboard-btn:hover {
  box-shadow: 0 0 22px rgba(56, 189, 248, 0.7), inset 0 0 12px rgba(255, 255, 255, 0.5);
}

/* 右侧：极速冲刺/加速技能按钮 */
.super-btn {
  background: radial-gradient(circle at 35% 25%, #f97316, #c2410c, #7c2d12);
  border: 2.5px solid #fbbf24;
  color: #fffbeb;
  box-shadow: 0 6px 18px rgba(249, 115, 22, 0.45), inset 0 0 10px rgba(251, 191, 36, 0.4);
}

.super-btn.ready {
  background: radial-gradient(circle at 35% 25%, #f59e0b, #d97706, #78350f);
  border-color: #fde047;
  color: #fff;
  box-shadow: 0 0 24px rgba(250, 204, 21, 0.9), inset 0 0 12px rgba(255, 255, 255, 0.6);
  animation: pulseSuper 0.9s infinite alternate;
}

.super-btn.active {
  background: radial-gradient(circle at 35% 25%, #ec4899, #be185d, #700732);
  border-color: #f472b6;
  color: #fff;
  box-shadow: 0 0 28px rgba(244, 114, 182, 0.95);
  animation: pulseSuper 0.6s infinite alternate;
}

@keyframes pulseSuper {
  0% { transform: scale(1); box-shadow: 0 0 14px rgba(250, 204, 21, 0.6); }
  100% { transform: scale(1.08); box-shadow: 0 0 26px rgba(250, 204, 21, 1); }
}

/* ========================================================
   3. 弹窗与全屏模态框 (Title, Story, GameOver, Help)
   ======================================================== */
.screen-modal {
  pointer-events: auto;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(18, 14, 24, 0.85);
  backdrop-filter: blur(10px);
  z-index: 50;
  padding: 16px;
}

/* 首页标题卡片 */
.title-card {
  position: relative;
  width: min(92vw, 450px);
  background: radial-gradient(circle at 50% 15%, #38243e, #181120 75%);
  border: 2px solid var(--gold-primary);
  border-radius: 24px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.8), inset 0 0 0 2px rgba(255, 225, 155, 0.2);
  padding: 30px 24px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 主角头像展台 */
.hero-showcase {
  position: relative;
  width: 115px;
  height: 115px;
  margin-bottom: 12px;
}

.portrait-glow {
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.45), transparent 70%);
  animation: glowPulse 2.5s infinite alternate;
}

@keyframes glowPulse {
  0% { transform: scale(0.9); opacity: 0.6; }
  100% { transform: scale(1.15); opacity: 1; }
}

.portrait-border {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid var(--gold-light);
  box-shadow: 0 6px 16px rgba(0,0,0,0.6);
  overflow: hidden;
  background: #000;
}

.portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 32%;
  transform: scale(1.18);
}

.hero-crown {
  position: absolute;
  top: -14px;
  right: -4px;
  font-size: 26px;
  transform: rotate(20deg);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.6));
}

.title-eyebrow {
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--gold-primary);
  margin-bottom: 6px;
  font-weight: 600;
}

.main-title {
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 0.05em;
  background: linear-gradient(180deg, #fff9ea 0%, #ffe082 50%, #d4af37 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
}

.title-subtitle {
  font-size: 12px;
  color: var(--dim-text);
  margin-bottom: 16px;
}

.best-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  background: rgba(223, 179, 107, 0.15);
  border: 1px solid var(--gold-border);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gold-light);
  margin-bottom: 22px;
}

.title-actions {
  width: 100%;
  display: grid;
  gap: 12px;
}

.btn-primary {
  cursor: pointer;
  pointer-events: auto;
  width: 100%;
  padding: 13px 18px;
  border-radius: 14px;
  border: 1px solid #ffd87c;
  background: linear-gradient(135deg, #a64468, #4d2358);
  color: #fff6de;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 5px 0 #3a1643, 0 8px 20px rgba(166, 68, 104, 0.4);
  transition: transform 0.1s, box-shadow 0.1s;
}

.btn-primary:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 #3a1643, 0 4px 10px rgba(166, 68, 104, 0.3);
}

.btn-primary .btn-arrow {
  width: 18px;
  height: 18px;
}

.btn-secondary {
  cursor: pointer;
  pointer-events: auto;
  width: 100%;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--gold-border);
  background: rgba(255, 239, 210, 0.08);
  color: var(--cream-text);
  font-size: 13px;
  font-weight: 600;
  transition: background 0.2s;
}

.btn-sub-row {
  display: flex;
  gap: 10px;
  width: 100%;
}

.btn-sub-row .btn-secondary {
  flex: 1;
}

.btn-secondary:hover {
  background: rgba(255, 239, 210, 0.15);
}

.title-tips {
  margin-top: 14px;
  font-size: 10px;
  color: #8c7886;
}

/* ========================================================
   4. 剧情故事弹窗
   ======================================================== */
.dialogue-box {
  width: min(90vw, 420px);
  background: radial-gradient(circle at 50% 20%, #3a263d, #1b1322);
  border: 2px solid var(--gold-primary);
  border-radius: 20px;
  box-shadow: var(--shadow-warm);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dialogue-header {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(223, 179, 107, 0.25);
  padding-bottom: 12px;
}

.dialogue-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid var(--gold-light);
  object-fit: cover;
  object-position: center 30%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.dialogue-speaker h3 {
  font-size: 15px;
  color: var(--gold-light);
}

.dialogue-speaker p {
  font-size: 11px;
  color: var(--dim-text);
}

.dialogue-body {
  font-size: 14px;
  line-height: 1.6;
  color: var(--cream-text);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dialogue-body strong {
  color: #ffd54f;
}

.dialogue-footer {
  margin-top: 6px;
}

/* ========================================================
   5. 结算画面 (Game Over)
   ======================================================== */
.gameover-card {
  width: min(92vw, 430px);
  background: radial-gradient(circle at 50% 15%, #38243b, #191122 80%);
  border: 2px solid var(--gold-primary);
  border-radius: 24px;
  box-shadow: var(--shadow-warm);
  padding: 26px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.card-crown {
  font-size: 14px;
  font-weight: 700;
  color: var(--gold-light);
  letter-spacing: 0.1em;
}

.rank-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.rank-badge {
  font-size: 54px;
  font-weight: 900;
  font-family: Impact, "Arial Black", sans-serif;
  letter-spacing: 0.05em;
  line-height: 1;
}

.rank-sss {
  background: linear-gradient(180deg, #fff7cd, #ffd700, #ff6f00);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 14px rgba(255, 215, 0, 0.9));
}
.rank-ss {
  background: linear-gradient(180deg, #f3e5f5, #ab47bc, #6a1b9a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 12px rgba(171, 71, 188, 0.8));
}
.rank-s {
  background: linear-gradient(180deg, #e8f5e9, #4caf50, #1b5e20);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 10px rgba(76, 175, 80, 0.8));
}
.rank-a {
  background: linear-gradient(180deg, #e1f5fe, #03a9f4, #01579b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.rank-b {
  color: #b0bec5;
}

.rank-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--cream-text);
}

.new-record-pill {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 12px;
  background: linear-gradient(90deg, #d81b60, #f06292);
  color: #fff;
  box-shadow: 0 0 10px rgba(233, 30, 99, 0.8);
  animation: pulseBuff 0.8s infinite alternate;
}

.stats-grid {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.stat-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--gold-border);
  border-radius: 12px;
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-box.highlight {
  border-color: var(--gold-light);
  background: rgba(223, 179, 107, 0.12);
}

.stat-label {
  font-size: 10px;
  color: var(--dim-text);
}

.stat-number {
  font-size: 15px;
  color: var(--gold-light);
}

.gameover-actions {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* ========================================================
   6. 帮助攻略模态框 (Help Modal)
   ======================================================== */
.modal-backdrop {
  pointer-events: auto;
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}

.modal-content {
  width: min(92vw, 480px);
  max-height: 85vh;
  background: radial-gradient(circle at 50% 15%, #35253b, #191220);
  border: 2px solid var(--gold-primary);
  border-radius: 20px;
  box-shadow: var(--shadow-warm);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--gold-border);
}

.modal-header h3 {
  font-size: 16px;
  color: var(--gold-light);
}

.btn-close {
  background: none;
  border: none;
  color: var(--dim-text);
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
}

.modal-scrollable {
  padding: 18px 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.help-section h4 {
  font-size: 13px;
  color: var(--gold-light);
  margin-bottom: 8px;
  border-left: 3px solid var(--gold-primary);
  padding-left: 8px;
}

.help-section ul {
  list-style: none;
  font-size: 12px;
  line-height: 1.6;
  color: var(--cream-text);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.help-section code {
  background: rgba(223, 179, 107, 0.2);
  color: var(--gold-light);
  padding: 2px 4px;
  border-radius: 4px;
  font-family: inherit;
}

.item-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.item-card {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(223, 179, 107, 0.25);
  border-radius: 10px;
  padding: 8px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.item-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.item-card strong {
  display: block;
  font-size: 11px;
  color: var(--gold-light);
}

.item-card p {
  font-size: 10px;
  color: var(--dim-text);
  line-height: 1.3;
}

/* 暂停画面 */
.pause-card {
  width: min(85vw, 320px);
  background: var(--bg-card);
  border: 2px solid var(--gold-primary);
  border-radius: 20px;
  padding: 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.pause-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ========================================================
   4. 全平台与多端屏幕自适应样式系统 (Responsive Screen Adaptation)
   ======================================================== */
@supports (height: 100dvh) {
  html, body, #app {
    height: 100dvh;
  }
}

@media (max-width: 768px) {
  .btn-lobby-float {
    top: max(8px, env(safe-area-inset-top));
    right: 8px;
    padding: 6px 12px;
    font-size: 12px;
    z-index: 100;
  }

  .hud-container {
    top: max(8px, env(safe-area-inset-top));
    left: 8px;
    right: 8px;
    gap: 6px;
  }

  .hero-panel {
    padding: 4px 8px 4px 4px;
    gap: 6px;
    border-radius: 24px;
  }

  .avatar-frame {
    width: 36px;
    height: 36px;
  }

  .hero-name {
    font-size: 11px;
  }

  .zone-badge {
    display: none;
  }

  .energy-track {
    width: 75px;
    height: 10px;
  }

  .energy-caption {
    font-size: 7px;
  }

  .center-hud {
    gap: 2px;
  }

  .letter-tracker {
    padding: 3px 6px;
    font-size: 10px;
  }

  .letter-chip {
    width: 20px;
    height: 20px;
    font-size: 10px;
  }

  .stats-panel {
    gap: 4px;
  }

  .stat-pill {
    padding: 3px 6px;
    font-size: 10px;
    border-radius: 12px;
  }

  .icon-btn {
    width: 32px;
    height: 32px;
    font-size: 13px;
  }

  .touch-overlay {
    bottom: max(16px, env(safe-area-inset-bottom));
    left: 14px;
    right: 14px;
  }

  .touch-action-btn {
    width: 62px;
    height: 62px;
  }

  .touch-action-btn .btn-emoji {
    font-size: 22px;
  }

  .touch-action-btn .btn-label {
    font-size: 10px;
  }

  /* 模态弹窗小屏尺寸适配 */
  .title-card,
  .gameover-card,
  .story-screen .dialogue-box,
  .help-card {
    max-width: min(94vw, 400px);
    max-height: min(92dvh, 580px);
    overflow-y: auto;
    padding: 16px;
  }

  .main-title {
    font-size: 32px;
  }
}

@media (max-width: 480px) {
  .score-pill {
    display: none;
  }
}

