* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #101828;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #fff;
  touch-action: none;
  user-select: none;
}

#app {
  position: relative;
  width: 100vw;
  height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 12%, rgba(86, 204, 242, 0.16), transparent 28%),
    radial-gradient(circle at 80% 18%, rgba(255, 204, 102, 0.12), transparent 25%),
    linear-gradient(180deg, #111827 0%, #0b1020 100%);
}

#gameCanvas {
  display: block;
  width: 100%;
  height: 100%;
}

.hidden {
  display: none !important;
}

.hud {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  left: 12px;
  right: 12px;
  z-index: 5;
  display: flex;
  gap: 8px;
  pointer-events: none;
}

.hud-item {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 26px rgba(0,0,0,0.18);
}

.hud-label {
  display: block;
  font-size: 11px;
  opacity: 0.72;
  line-height: 1;
  margin-bottom: 4px;
}

.hud strong {
  display: block;
  font-size: 18px;
  line-height: 1;
  letter-spacing: 0.2px;
}

.panel {
  position: absolute;
  z-index: 10;
  left: 18px;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  padding: 24px 20px 20px;
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.86);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 24px 60px rgba(0,0,0,0.36);
  backdrop-filter: blur(18px);
  text-align: center;
}

.brand-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.16);
  color: #86efac;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 10px;
}

.brand-pill.danger {
  background: rgba(248, 113, 113, 0.14);
  color: #fecaca;
}

h1 {
  margin: 0;
  font-size: 42px;
  line-height: 1.05;
  letter-spacing: 1px;
}

h2 {
  margin: 6px 0 18px;
  font-size: 28px;
  line-height: 1.1;
}

.subtitle {
  margin: 12px auto 16px;
  max-width: 280px;
  color: rgba(255,255,255,0.82);
  font-size: 15px;
  line-height: 1.7;
}

.tips {
  display: grid;
  gap: 8px;
  text-align: left;
  margin: 14px 0;
}

.tips > div,
.best-card {
  padding: 12px;
  border-radius: 16px;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.84);
  font-size: 13px;
  line-height: 1.5;
}

.best-card {
  text-align: center;
  margin: 14px 0 16px;
}

.best-card strong {
  font-size: 20px;
}

.primary-btn,
.ghost-btn {
  width: 100%;
  height: 52px;
  border: 0;
  border-radius: 18px;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
}

.primary-btn {
  color: #08111f;
  background: linear-gradient(180deg, #86efac, #22c55e);
  box-shadow: 0 12px 28px rgba(34,197,94,0.28);
}

.primary-btn:active {
  transform: translateY(1px) scale(0.99);
}

.ghost-btn {
  margin-top: 10px;
  color: rgba(255,255,255,0.86);
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.10);
}

.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 0 18px;
}

.result-grid > div {
  padding: 12px 10px;
  border-radius: 18px;
  background: rgba(255,255,255,0.06);
}

.result-grid span {
  display: block;
  color: rgba(255,255,255,0.68);
  font-size: 12px;
  margin-bottom: 6px;
}

.result-grid strong {
  font-size: 24px;
}

.toast {
  position: absolute;
  z-index: 12;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.86);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.92);
  font-size: 13px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.3);
  pointer-events: none;
}

@media (min-width: 720px) {
  #app {
    width: min(430px, 100vw);
    height: min(932px, 100vh);
    margin: 0 auto;
    border-left: 1px solid rgba(255,255,255,0.08);
    border-right: 1px solid rgba(255,255,255,0.08);
  }

  body {
    background: #050816;
  }
}

.goal-hint {
  position: absolute;
  z-index: 5;
  top: calc(max(12px, env(safe-area-inset-top)) + 68px);
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.70);
  border: 1px solid rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.88);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
  backdrop-filter: blur(10px);
}

.result-next strong {
  display: block;
  font-size: 14px;
  line-height: 1.55;
  letter-spacing: 0;
  color: rgba(255,255,255,0.92);
}

/* V0.1.8：HUD 保持四项指标，事件倒计时更强，结算事件复盘保持可见 */
.hud {
  gap: 6px;
}

.hud-item {
  padding: 8px 7px;
}

.hud strong {
  font-size: 17px;
}

.result-wide {
  grid-column: 1 / -1;
}

.result-wide strong {
  letter-spacing: 1px;
}


/* V0.1.5：新纪录和目标进度反馈 */
.new-record-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: -8px auto 10px;
  padding: 7px 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(253, 230, 138, 0.96), rgba(251, 191, 36, 0.96));
  color: #422006;
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 10px 28px rgba(251, 191, 36, 0.28);
  animation: recordPop 0.72s ease both;
}

@keyframes recordPop {
  0% { transform: scale(0.82); opacity: 0; }
  48% { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.rank-card strong {
  font-size: 28px;
}

.result-next {
  padding: 12px 14px !important;
}

.result-next strong {
  font-size: 18px;
  line-height: 1.35;
}

.result-next small {
  display: block;
  margin-top: 8px;
  color: rgba(255,255,255,0.72);
  font-size: 12px;
  font-weight: 700;
}

.progress-wrap {
  height: 9px;
  margin-top: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,0.10);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.16);
}

.progress-bar {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #86efac, #22c55e, #fde68a);
  transition: width 0.45s ease;
}

#gameOverPanel h2 {
  margin-bottom: 14px;
}

@media (max-height: 760px) {
  .panel {
    padding: 18px 18px 16px;
    border-radius: 24px;
  }

  h2 {
    font-size: 25px;
    margin-bottom: 12px;
  }

  .result-grid {
    gap: 8px;
    margin-bottom: 14px;
  }

  .result-grid > div {
    padding: 10px 8px;
  }

  .primary-btn,
  .ghost-btn {
    height: 48px;
  }
}


/* V0.1.8：本局事件复盘 */
.event-summary-card {
  padding: 10px 12px !important;
}

.event-summary-card strong {
  display: block;
  font-size: 13px;
  line-height: 1.55;
  letter-spacing: 0;
  color: rgba(255,255,255,0.86);
  font-weight: 800;
}

@media (max-height: 760px) {
  .event-summary-card {
    display: block;
    padding: 8px 10px !important;
  }

  .event-summary-card span {
    margin-bottom: 3px;
  }

  .event-summary-card strong {
    font-size: 11px;
    line-height: 1.35;
  }

  .rank-card,
  .result-next {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
  }

  .rank-card strong {
    font-size: 22px;
  }

  .result-next strong {
    font-size: 15px;
  }
}


/* V0.1.8：结算页事件复盘必须露出，压缩整体间距 */
#gameOverPanel {
  padding-top: 20px;
}

#gameOverPanel .result-grid {
  gap: 8px;
  margin-bottom: 12px;
}

#gameOverPanel .result-grid > div {
  padding-top: 10px;
  padding-bottom: 10px;
}

#gameOverPanel .event-summary-card {
  background: linear-gradient(180deg, rgba(253, 230, 138, 0.10), rgba(255,255,255,0.055));
  border: 1px solid rgba(253, 230, 138, 0.14);
}

#gameOverPanel .event-summary-card span {
  color: rgba(253, 230, 138, 0.86);
}

#gameOverPanel .event-summary-card strong {
  color: rgba(255,255,255,0.92);
}

/* V0.1.9：事件复盘从压缩统计改为清晰反馈 + 短目标更易读 */
.event-summary-card {
  text-align: left;
}

.event-summary-card .event-lines {
  display: block;
  color: rgba(255,255,255,0.92);
}

.event-praise {
  text-align: center;
  color: #fde68a;
  font-size: 13px;
  font-weight: 900;
  margin-bottom: 5px;
}

.event-detail {
  display: grid;
  gap: 3px;
  font-size: 12px;
  line-height: 1.35;
  color: rgba(255,255,255,0.86);
}

.event-detail span {
  display: block;
  margin: 0;
  color: rgba(255,255,255,0.86);
  font-size: 12px;
}

.event-detail b {
  color: rgba(253, 230, 138, 0.95);
}

@media (max-height: 760px) {
  .event-praise {
    font-size: 11px;
    margin-bottom: 3px;
  }

  .event-detail,
  .event-detail span {
    font-size: 10.5px;
    line-height: 1.25;
  }
}

/* V0.2.1：外部试玩优化版，本地试玩统计、反馈要点、小屏适配 */
.start-panel h1 {
  font-size: 44px;
  margin-top: 2px;
}

.start-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 14px 0;
}

.start-metrics > div {
  padding: 12px 10px;
  border-radius: 18px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.06);
}

.start-metrics span {
  display: block;
  color: rgba(255,255,255,0.64);
  font-size: 12px;
  margin-bottom: 5px;
}

.start-metrics strong {
  display: block;
  font-size: 20px;
  line-height: 1.1;
}

.settings-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 0 14px;
}

.toggle-btn {
  height: 42px;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 15px;
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.88);
  font-size: 14px;
  font-weight: 800;
}

.ghost-btn.compact {
  height: 46px;
}

.guide-panel h2 {
  margin-top: 2px;
  margin-bottom: 16px;
}

.guide-list {
  display: grid;
  gap: 10px;
  margin: 0 0 16px;
  text-align: left;
}

.guide-list > div {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255,255,255,0.065);
  border: 1px solid rgba(255,255,255,0.06);
}

.guide-list b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #082f49;
  background: linear-gradient(180deg, #bae6fd, #38bdf8);
  font-size: 16px;
}

.guide-list span {
  color: rgba(255,255,255,0.86);
  font-size: 14px;
  line-height: 1.55;
}

.orientation-tip {
  position: absolute;
  z-index: 20;
  top: max(12px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.9);
  font-size: 13px;
  font-weight: 800;
  pointer-events: none;
}

@media (max-height: 720px) {
  .start-panel h1 {
    font-size: 38px;
  }

  .subtitle {
    margin-top: 8px;
    margin-bottom: 10px;
    line-height: 1.55;
  }

  .start-metrics,
  .settings-row {
    margin: 10px 0;
  }

  .start-metrics > div {
    padding: 10px 8px;
  }

  .guide-list > div {
    padding: 9px;
  }
}

@media (orientation: landscape) and (max-height: 520px) {
  .orientation-tip {
    display: block !important;
  }
}


/* V0.2.1：本地试玩统计 */
.trial-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1.25fr;
  gap: 7px;
  margin: 10px 0 12px;
}
.trial-stats > div {
  min-width: 0;
  padding: 9px 6px;
  border-radius: 14px;
  background: rgba(255,255,255,0.052);
  border: 1px solid rgba(255,255,255,0.055);
}
.trial-stats span {
  display: block;
  color: rgba(255,255,255,0.56);
  font-size: 10px;
  margin-bottom: 4px;
}
.trial-stats strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(255,255,255,0.88);
  font-size: 12px;
  line-height: 1.1;
}
.start-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.start-actions .ghost-btn { margin-top: 10px; }
.feedback-list {
  display: grid;
  gap: 9px;
  text-align: left;
  margin: 0 0 16px;
}
.feedback-list > div {
  padding: 11px 12px;
  border-radius: 16px;
  background: rgba(255,255,255,0.065);
  border: 1px solid rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.86);
  font-size: 13px;
  line-height: 1.45;
}
#gameOverPanel {
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
}
#gameOverPanel::-webkit-scrollbar { width: 0; height: 0; }
@media (max-height: 720px) {
  .trial-stats { grid-template-columns: 1fr 1fr; gap: 7px; }
  .trial-stats > div { padding: 7px 6px; }
  .trial-stats strong { font-size: 11px; }
  .start-actions { grid-template-columns: 1fr; gap: 0; }
}

/* V0.2.2：前端数据接入版，匿名昵称、全网统计、排行榜、全网结果 */
.nickname-row {
  display: grid;
  grid-template-columns: 54px 1fr;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
  padding: 8px 10px;
  border-radius: 15px;
  background: rgba(255,255,255,0.055);
  border: 1px solid rgba(255,255,255,0.06);
  text-align: left;
}
.nickname-row span {
  color: rgba(255,255,255,0.62);
  font-size: 12px;
  font-weight: 800;
}
.nickname-row input {
  width: 100%;
  height: 34px;
  border: 0;
  outline: 0;
  border-radius: 12px;
  padding: 0 10px;
  background: rgba(15, 23, 42, 0.76);
  color: rgba(255,255,255,0.95);
  font-size: 14px;
  font-weight: 800;
}
.global-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 7px;
  margin: 10px 0 12px;
}
.global-stats > div {
  min-width: 0;
  padding: 9px 6px;
  border-radius: 14px;
  background: rgba(56,189,248,0.07);
  border: 1px solid rgba(56,189,248,0.10);
}
.global-stats span {
  display: block;
  color: rgba(186,230,253,0.72);
  font-size: 10px;
  margin-bottom: 4px;
}
.global-stats strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(255,255,255,0.9);
  font-size: 12px;
}
#apiStatusText.online { color: #86efac; }
.start-actions.three-actions {
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}
.start-actions.three-actions .ghost-btn {
  font-size: 13px;
  height: 44px;
}
.leaderboard-panel {
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.leaderboard-status {
  margin: -6px 0 12px;
  color: rgba(255,255,255,0.72);
  font-size: 12px;
  line-height: 1.5;
}
.leaderboard-list {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
  text-align: left;
}
.leaderboard-row {
  display: grid;
  grid-template-columns: 34px 1fr 64px;
  grid-template-areas:
    "rank name score"
    "rank meta meta";
  gap: 2px 8px;
  align-items: center;
  padding: 10px 11px;
  border-radius: 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.065);
}
.leaderboard-row b {
  grid-area: rank;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(253,230,138,0.18);
  color: #fde68a;
  font-size: 13px;
}
.leaderboard-row span {
  grid-area: name;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(255,255,255,0.92);
  font-size: 14px;
  font-weight: 900;
}
.leaderboard-row strong {
  grid-area: score;
  text-align: right;
  color: #86efac;
  font-size: 18px;
}
.leaderboard-row small {
  grid-area: meta;
  color: rgba(255,255,255,0.58);
  font-size: 11px;
}
.leaderboard-row.local {
  border-color: rgba(134,239,172,0.16);
  background: rgba(34,197,94,0.08);
}
.global-rank-card {
  padding: 10px 12px !important;
  background: linear-gradient(180deg, rgba(56,189,248,0.10), rgba(255,255,255,0.055)) !important;
  border: 1px solid rgba(56,189,248,0.14);
}
.global-rank-card strong {
  display: block;
  color: rgba(186,230,253,0.96);
  font-size: 18px !important;
  line-height: 1.3;
}
.global-rank-card small {
  display: block;
  margin-top: 5px;
  color: rgba(255,255,255,0.62);
  font-size: 11px;
}
@media (max-height: 760px) {
  .global-stats { grid-template-columns: 1fr 1fr; }
  .nickname-row { margin: 8px 0; padding: 7px 9px; }
  .start-actions.three-actions { grid-template-columns: 1fr; gap: 0; }
  .global-rank-card strong { font-size: 14px !important; }
}


/* V0.2.3：外部试玩 UI 收口版 */
html,
body {
  height: 100dvh;
}

#app {
  height: 100dvh;
  min-height: 100dvh;
}

/* 开始页不再垂直居中挤压，改为安全区内滚动，避免标题和底部按钮被遮挡 */
.start-panel {
  top: max(10px, env(safe-area-inset-top));
  bottom: max(10px, env(safe-area-inset-bottom));
  transform: none;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px 18px max(16px, env(safe-area-inset-bottom));
  border-radius: 24px;
}

.start-panel::-webkit-scrollbar,
.stats-panel::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.start-panel .brand-pill {
  margin-bottom: 7px;
  font-size: 11px;
  padding: 5px 9px;
}

.start-panel h1 {
  font-size: clamp(34px, 10vw, 42px);
  line-height: 1;
  margin: 0;
}

.start-panel .subtitle {
  margin: 9px auto 12px;
  max-width: 320px;
  font-size: 14px;
  line-height: 1.55;
}

.start-metrics {
  margin: 10px 0;
  gap: 9px;
}

.start-metrics > div {
  padding: 10px 8px;
}

.start-metrics strong {
  font-size: 19px;
}

.nickname-row {
  margin: 8px 0;
}

.quick-stats {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 7px 0 10px;
  color: rgba(255,255,255,0.66);
  font-size: 12px;
  font-weight: 700;
}

.quick-stats b {
  color: #86efac;
}

.compact-settings {
  margin: 8px 0 10px;
}

.compact-settings .toggle-btn {
  height: 38px;
  font-size: 13px;
}

.start-actions.four-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.start-actions.four-actions .ghost-btn {
  height: 42px;
  margin-top: 0;
  font-size: 13px;
}

.api-status-line {
  margin-top: 9px;
  color: rgba(255,255,255,0.46);
  font-size: 11px;
  font-weight: 700;
}

.api-status-line.online {
  color: rgba(134,239,172,0.76);
}

#statsApiStatusText.online {
  color: #86efac;
}

/* 试玩数据独立面板：调试/运营数据不再挤占开始页 */
.stats-panel {
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.stats-panel h2 {
  margin-bottom: 14px;
}

.stats-note {
  margin: 12px 0 16px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255,255,255,0.055);
  color: rgba(255,255,255,0.72);
  font-size: 13px;
  line-height: 1.55;
  text-align: left;
}

/* 结算页小屏收口：内容可滚动，操作按钮始终容易点到 */
#gameOverPanel {
  top: max(10px, env(safe-area-inset-top));
  bottom: max(10px, env(safe-area-inset-bottom));
  transform: none;
  max-height: none;
  overflow-y: auto;
  padding: 18px 18px max(10px, env(safe-area-inset-bottom));
}

#gameOverPanel h2 {
  font-size: clamp(26px, 7.6vw, 34px);
  margin: 4px 0 10px;
}

#gameOverPanel .result-grid {
  gap: 8px;
  margin: 10px 0 10px;
}

#gameOverPanel .result-grid > div {
  padding: 10px 9px;
}

.global-rank-card strong {
  font-size: 16px !important;
}

.event-summary-card {
  min-height: auto;
}

.panel-actions.sticky-actions {
  position: sticky;
  bottom: 0;
  z-index: 4;
  padding-top: 8px;
  padding-bottom: max(4px, env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(15, 23, 42, 0), rgba(15, 23, 42, 0.88) 24%, rgba(15, 23, 42, 0.96));
  backdrop-filter: blur(10px);
}

.panel-actions.sticky-actions .primary-btn {
  margin-top: 0;
}

.panel-actions.sticky-actions .ghost-btn {
  margin-top: 8px;
}

/* 排行榜空状态/少数据时不显得像未完成页面 */
.leaderboard-status {
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(255,255,255,0.045);
}

@media (max-height: 740px) {
  .start-panel {
    padding-top: 12px;
  }

  .start-panel h1 {
    font-size: 34px;
  }

  .start-panel .subtitle {
    font-size: 13px;
    line-height: 1.45;
    margin-bottom: 9px;
  }

  .start-metrics > div {
    padding: 9px 7px;
  }

  .settings-row.compact-settings {
    margin: 7px 0 9px;
  }

  .compact-settings .toggle-btn {
    height: 36px;
  }
}

@media (max-height: 660px) {
  .start-panel .brand-pill {
    display: none;
  }

  .quick-stats {
    font-size: 11px;
    margin: 5px 0 8px;
  }

  .start-actions.four-actions .ghost-btn {
    height: 38px;
    font-size: 12px;
  }
}

/* V0.2.3：面板允许纵向滚动，避免 body touch-action:none 影响小屏滚动 */
.panel { touch-action: pan-y; }
#gameCanvas { touch-action: none; }
