*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green: #1a7a3c;
  --green-dark: #0d5a28;
  --gold: #f5c518;
  --red: #e63946;
  --blue: #2563eb;
  --bg: #0f1f14;
  --card: rgba(26, 46, 31, 0.88);
  --text: #f0f4f0;
  --text-muted: #c8dcc8;
  --radius: 12px;
  --bg-image-default: url('../assets/background.webp');
  --bg-image-home: url('../assets/home.webp');
  /* 美式漫画统一色 — 偏高饱和、偏暖 */
  --comic-ink: #101010;
  --comic-yellow: #ffe600;
  --comic-yellow-light: #fff566;
  --comic-orange: #ff6b00;
  --comic-orange-light: #ffb347;
  --comic-green: #16d46b;
  --comic-green-light: #86efac;
  --comic-blue: #0ea5e9;
  --comic-blue-light: #7dd3fc;
  --comic-blue-dark: #0284c7;
  --comic-coral: #fb923c;
  --comic-coral-light: #fdba74;
  --comic-peach: #ffedd5;
  --comic-peach-deep: #fed7aa;
  --comic-apricot: #fff7ed;
  --comic-amber: #fbbf24;
  --comic-rust: #c2410c;
  --comic-sunset: #ff9500;
  --comic-sunset-dark: #ea580c;
  --comic-cream: #fff9db;
  --comic-shadow-sm: 3px 3px 0 var(--comic-ink);
  --comic-shadow-md:  5px 5px 0 var(--comic-ink);
  --comic-shadow-lg: 7px 7px 0 var(--comic-ink);
  /* 点球挑战 · 草地绿（较高饱和度） */
  --challenge-grass-light: #c5f0b5;
  --challenge-grass-mid: #8de078;
  --challenge-grass-base: #52c855;
  --challenge-grass-deep: #2ea838;
  --challenge-grass-dark: #1a7a28;
  --challenge-grass-ink: #1a4d22;
  --challenge-grass-muted: rgba(26, 77, 34, 0.82);
  --challenge-grass-line: rgba(26, 77, 34, 0.24);
  --challenge-grass-card: linear-gradient(165deg, #5fd858 0%, #2d9a3a 48%, #1d7828 100%);
  --challenge-grass-panel: linear-gradient(165deg, #c8f5b8 0%, #7ed86a 52%, #4bc24a 100%);
  /* 足球问答 · 蓝系（与主页模块卡片一致） */
  --quiz-card-gradient: linear-gradient(165deg, #60a5fa 0%, #2563eb 50%, #1e3a8a 100%);
  --quiz-panel-light: linear-gradient(180deg, #fff 0%, #dbeafe 100%);
  --quiz-badge-bg: #bfdbfe;
  --quiz-dot-color: rgba(30, 58, 138, 0.16);
  --card-min-xs: 200px;
  --card-min-sm: 260px;
  --card-min-md: 300px;
  --card-min-lg: 320px;
  --card-min-hero: 228px;
  /* 卡片 / 模块 / 弹窗最大宽度 — 窄屏等比收缩 */
  --card-max-xs: 220px;
  --phase-popup-min: 150px;
  --phase-popup-max: 168px;
  --penalty-intro-shell-max: 360px;
  --penalty-intro-card-max: 330px;
  --card-max-sm: 400px;
  --card-max-md: 420px;
  --card-max-lg: 480px;
  --card-max-xl: 520px;
  --card-max-home: 400px;
  --card-max-quiz: 720px;
  --card-max-hero: 300px;
  --home-intro-width: min(var(--card-max-hero), 100%);
  --home-column-width: var(--card-max-home);
  --home-column-gap: 32px;
  --card-max-term: var(--card-max-home);
  --card-max-reset: 320px;
}

html, body {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", sans-serif;
  -webkit-tap-highlight-color: transparent;
}

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

.screen {
  display: none;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  padding: 16px 24px;
  overflow: hidden;
}
.screen.active { display: flex; }

/* 竖屏提示 */
#orientation-hint {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.92);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
  padding: 24px;
}
#orientation-hint .hint-icon { font-size: 48px; animation: rotate-hint 2s ease infinite; }
#orientation-hint p { font-size: 16px; color: var(--text-muted); max-width: 280px; line-height: 1.6; }
.orientation-hint-sub { font-size: 13px; opacity: 0.75; }
.orientation-hint-back {
  pointer-events: auto;
  margin-top: 4px;
  min-width: 140px;
  max-width: 220px;
}
@keyframes rotate-hint {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(90deg); }
}
#orientation-hint.is-visible {
  display: flex;
}

/* 主页 - 横屏布局 */
#screen-home {
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 24px 40px;
  background:
    linear-gradient(105deg, rgba(15, 31, 20, 0.32) 0%, rgba(15, 31, 20, 0.18) 45%, rgba(15, 31, 20, 0.38) 100%),
    var(--bg-image-home) center center / cover no-repeat;
}
.home-layout {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 100%;
}
.home-layout > .home-intro,
.home-layout > .home-main,
.home-layout > .term-card {
  box-sizing: border-box;
  margin: 0;
}
.home-layout > .term-card .term-card-body {
  scrollbar-gutter: stable;
  overflow-y: auto;
}
/* 宽度不足时主页改为竖直排版 */
@media (max-width: 1100px) {
  #screen-home {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    overflow-y: auto;
    padding: 16px 14px;
    gap: 0;
  }
  .home-layout {
    gap: 14px;
  }
  .home-layout > .home-intro {
    align-self: center;
    width: var(--home-intro-width);
    max-width: 100%;
  }
  .home-layout > .home-main {
    width: 100%;
    max-width: min(var(--card-max-home), 100%);
    align-self: center;
    flex: 0 0 auto;
  }
  .home-layout > .term-card {
    width: 100%;
    max-width: min(var(--card-max-term), 100%);
    align-self: center;
  }
}

/* iPad / 平板竖屏 — 主页三列模块竖向居中，收紧模块间距 */
@media (min-width: 768px) and (max-width: 1100px) and (orientation: portrait) {
  #screen-home {
    justify-content: center;
    gap: 10px;
    padding: 20px 24px;
  }
  #screen-home {
    --home-intro-width: min(var(--card-max-home), 100%);
  }
  #screen-home .home-main {
    flex: 0 0 auto;
    gap: 10px;
  }
  #screen-home .mode-cards {
    gap: 16px;
  }
  #screen-home .term-card {
    flex: 0 0 auto;
    margin-top: 0;
  }
}
.home-intro {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  width: var(--home-intro-width);
  max-width: 100%;
}
.home-stats-group {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  width: 100%;
}
.home-stats-group .stats-bar,
.home-stats-group .home-footer {
  width: 100%;
  min-width: 0;
}
.home-stats-group .stats-bar {
  padding: 8px 4px;
}
.home-stats-group .stat-label {
  font-size: 10px;
  letter-spacing: 0.03em;
}
.home-stats-group .stat-value {
  font-size: 16px;
}
.home-stats-group .home-footer {
  padding: 5px 8px;
  font-size: 10px;
}
.home-stats-group .home-footer strong {
  font-size: 12px;
}
#screen-home .home-main {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: min(var(--card-max-home), 100%);
  min-width: 0;
  width: 100%;
  margin: 0 auto;
  align-self: center;
}
#screen-home .home-layout > .home-intro,
#screen-home .home-layout > .home-main,
#screen-home .home-layout > .term-card {
  margin: 0;
}
#screen-home .home-layout > .term-card {
  min-width: 0;
}
@media (min-width: 1101px) {
  #screen-home {
    --home-column-gap: clamp(16px, 2.2vw, 32px);
    --home-column-width: min(
      var(--card-max-home),
      calc((100vw - 2 * clamp(20px, 3vw, 40px) - 2 * var(--home-column-gap)) / 3)
    );
    --home-intro-width: var(--home-column-width);
    padding: clamp(16px, 2vw, 24px) clamp(20px, 3vw, 40px);
  }
  .home-layout {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, var(--home-column-width)));
    column-gap: var(--home-column-gap);
    width: min(
      calc(3 * var(--home-column-width) + 2 * var(--home-column-gap)),
      calc(100vw - 2 * clamp(20px, 3vw, 40px))
    );
    max-width: 100%;
    margin-inline: auto;
    align-items: center;
  }
  .home-layout > .home-intro,
  .home-layout > .home-main,
  .home-layout > .term-card {
    width: 100%;
    min-width: 0;
    max-width: var(--home-column-width);
  }
  .home-layout > .term-card.term-card--comic {
    min-width: 0;
  }
  .home-layout > .home-main {
    flex: none;
  }
}

/* 大屏平板横屏（iPad Air 等）— 三栏等比收缩并整体居中 */
@media (min-width: 1101px) and (max-width: 1320px) and (orientation: landscape) {
  #screen-home {
    --home-column-gap: clamp(14px, 1.8vw, 24px);
    --home-col-intro: min(280px, 26vw);
    --home-col-main: min(360px, 34vw);
    --home-col-term: min(340px, 32vw);
    overflow-x: hidden;
  }
  .home-layout {
    grid-template-columns: var(--home-col-intro) var(--home-col-main) var(--home-col-term);
    width: min(
      calc(var(--home-col-intro) + var(--home-col-main) + var(--home-col-term) + 2 * var(--home-column-gap)),
      calc(100vw - 2 * clamp(16px, 2.5vw, 32px))
    );
  }
  .home-layout > .home-intro,
  .home-layout > .home-main,
  .home-layout > .term-card {
    max-width: 100%;
  }
  #screen-home .home-intro .hero-panel {
    width: 100%;
    max-width: 100%;
  }
  .home-layout > .term-card {
    max-height: calc(100dvh - 32px);
  }
  .home-layout > .home-main {
    max-height: calc(100dvh - 32px);
    justify-content: center;
  }
  .home-layout > .mode-cards {
    gap: 18px;
  }
  .home-layout .mode-card {
    min-height: 82px;
    padding: 16px 18px 14px;
  }
}

/* PC 端 — 主页模块卡片与字号整体放大（平板/手机不变）
   使用 shows-keyboard-hints 覆盖触屏笔记本等被误判为 mobile 的 PC */
@media (min-width: 1101px) {
  html.shows-keyboard-hints:not(.is-landscape-mobile) #screen-home {
    --card-max-home: 540px;
    --card-max-hero: 420px;
    --card-max-term: 540px;
    --home-column-gap: clamp(32px, 3.5vw, 56px);
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) #screen-home .home-intro {
    gap: 22px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) #screen-home .home-stats-group {
    gap: 18px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) #screen-home .home-main {
    gap: 32px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) #screen-home .mode-cards {
    gap: 42px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) #screen-home .home-layout .mode-card {
    gap: 22px;
    padding: 30px 32px 28px;
    min-height: 132px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) #screen-home .mode-icon {
    font-size: 64px;
    padding: 9px;
    border-width: 3.5px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) #screen-home .mode-title {
    font-size: 34px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) #screen-home .mode-desc {
    font-size: 16px;
    padding: 6px 12px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) #screen-home .mode-sticker {
    font-size: 17px;
    padding: 5px 12px 6px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) #screen-home .mode-sticker--hero {
    font-size: 23px;
    padding: 6px 16px 7px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) #screen-home .hero-panel {
    padding: 28px 30px 26px 32px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) #screen-home .hero-panel .ball-icon {
    font-size: 52px;
    top: 18px;
    right: 12px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) #screen-home .hero--comic h1,
  html.shows-keyboard-hints:not(.is-landscape-mobile) #screen-home .hero--comic .hero-title {
    font-size: 64px;
    -webkit-text-stroke: 4.5px var(--comic-ink);
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) #screen-home .hero--comic .subtitle {
    font-size: 15px;
    padding: 5px 14px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) #screen-home .home-stats-group .stat-label {
    font-size: 14px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) #screen-home .home-stats-group .stat-value {
    font-size: 26px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) #screen-home .home-stats-group .home-footer {
    font-size: 14px;
    padding: 9px 16px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) #screen-home .home-stats-group .home-footer strong {
    font-size: 18px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) #screen-home .term-card--comic .term-card-category {
    font-size: 40px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) #screen-home .term-card--comic .term-card-inner {
    min-height: 400px;
    padding: 38px 22px 28px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) #screen-home .term-card--comic .term-card-title {
    font-size: 34px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) #screen-home .term-card--comic .term-card-explanation {
    font-size: 18px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) #screen-home .term-card--comic .term-card-meta {
    font-size: 14px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) #screen-home .term-card--comic .term-card-example-label {
    font-size: 18px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) #screen-home .term-card--comic .term-card-example {
    font-size: 16px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) #screen-home .term-card--comic .term-card-counter {
    font-size: 20px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) #screen-home .term-card-sticker {
    font-size: 21px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) #screen-home .term-card--comic .term-card-nav {
    width: 50px;
    height: 50px;
    font-size: 18px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) #screen-home .home-stats-group .stats-bar {
    padding: 12px 10px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) #screen-home .home-stats-group .stat-unit {
    font-size: 13px;
  }
}

/* PC 端 — 对话框 / 弹层尺寸与字号放大（平板/手机不变） */
@media (min-width: 1101px) {
  html.shows-keyboard-hints:not(.is-landscape-mobile) {
    --phase-popup-min: 198px;
    --phase-popup-max: 224px;
    --penalty-intro-shell-max: 400px;
    --penalty-intro-card-max: 380px;
    --pc-dialog-max: 540px;
    --pc-dialog-max-lg: 560px;
    --pc-result-max: 540px;
  }

  html.shows-keyboard-hints:not(.is-landscape-mobile) .modal > .modal-battle-stack,
  html.shows-keyboard-hints:not(.is-landscape-mobile) .modal-battle-stack {
    width: min(var(--pc-dialog-max), 100%);
    max-width: min(var(--pc-dialog-max), 100%);
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) .modal > .comic-card-shell {
    max-width: min(var(--pc-dialog-max), 100%);
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) .modal-content {
    max-width: min(420px, 100%);
    padding: 32px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) .modal-content p {
    font-size: 17px;
    margin-bottom: 24px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) .modal--battle-comic {
    padding: 20px 24px 28px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) .modal--battle-comic .battle-modal-card,
  html.shows-keyboard-hints:not(.is-landscape-mobile) .modal--battle-comic .comic-card-shell .battle-modal-card {
    padding: 22px 22px 20px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) .modal--battle-comic .master-egg-card.quiz-card--comic {
    padding: 24px 24px 26px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) .modal-battle-stack {
    gap: 8px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) .modal-battle-header .btn-back,
  html.shows-keyboard-hints:not(.is-landscape-mobile) .modal--battle-comic .modal-battle-header .btn-back {
    font-size: 16px;
    padding: 8px 14px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) .modal .comic-sticker,
  html.shows-keyboard-hints:not(.is-landscape-mobile) .modal .comic-sticker--md {
    font-size: 17px;
    padding: 5px 12px 6px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) .modal .battle-card-title {
    font-size: 30px;
    margin-bottom: 12px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) .modal .battle-card-desc {
    font-size: 16px;
    margin-bottom: 8px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) .modal .battle-card-hint {
    font-size: 14px;
    margin-top: 12px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) .modal .battle-card-meta {
    font-size: 15px;
    margin-bottom: 12px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) .modal .battle-overlay-actions .comic-action-btn,
  html.shows-keyboard-hints:not(.is-landscape-mobile) .modal .battle-actions .comic-action-btn,
  html.shows-keyboard-hints:not(.is-landscape-mobile) .modal .master-egg-actions .comic-action-btn,
  html.shows-keyboard-hints:not(.is-landscape-mobile) .modal .challenge-intro-actions .comic-action-btn,
  html.shows-keyboard-hints:not(.is-landscape-mobile) .battle-pause-overlay .comic-action-btn,
  html.shows-keyboard-hints:not(.is-landscape-mobile) .battle-result-overlay .comic-action-btn,
  html.shows-keyboard-hints:not(.is-landscape-mobile) .battle-phase-overlay .comic-action-btn {
    font-size: 17px;
    padding: 14px 18px;
    max-width: 360px;
    width: 100%;
    align-self: center;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) .modal .comic-action-btn--sm:not(.team-custom-mini) {
    font-size: 15px;
    padding: 12px 10px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) .modal .battle-overlay-actions,
  html.shows-keyboard-hints:not(.is-landscape-mobile) .battle-pause-overlay .battle-overlay-actions,
  html.shows-keyboard-hints:not(.is-landscape-mobile) .battle-result-overlay .battle-overlay-actions {
    gap: 10px;
    margin-top: 10px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) .modal .battle-actions {
    gap: 12px;
    margin-top: 6px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) .modal .ai-difficulty-options {
    gap: 12px;
    margin: 16px 0 6px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) .modal .ai-difficulty-btn {
    padding: 14px 16px;
    gap: 6px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) .modal .ai-difficulty-name {
    font-size: 21px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) .modal .ai-difficulty-desc {
    font-size: 14px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) #screen-challenge-setup .challenge-intro-block {
    margin-top: 16px;
    padding-top: 14px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) #screen-challenge-setup .challenge-intro-label {
    font-size: 13px;
    margin-bottom: 8px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) #screen-challenge-setup .challenge-intro-controls,
  html.shows-keyboard-hints:not(.is-landscape-mobile) #screen-challenge-setup .challenge-intro-rules {
    font-size: 15px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) #screen-challenge-setup .challenge-intro-rules li + li {
    margin-top: 10px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) #screen-challenge-setup .challenge-intro-actions {
    margin-top: 22px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) .modal .master-egg-icon {
    font-size: 52px;
    top: 12px;
    left: 14px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) .modal .master-egg-quote {
    font-size: 15px;
    margin-top: 18px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) .modal .master-egg-actions {
    margin-top: 28px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) .modal--battle-comic .team-custom-label {
    font-size: 14px;
    margin: 14px 0 8px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) .modal--battle-comic .team-custom-input {
    font-size: 17px;
    padding: 12px 14px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) .modal--battle-comic .team-pattern-btn {
    font-size: 15px;
    padding: 12px 8px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) .modal--battle-comic .team-color-field {
    font-size: 14px;
    gap: 8px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) .modal--battle-comic .team-color-field input[type="color"] {
    height: 46px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) .modal--battle-comic #team-custom-preview {
    width: 140px;
    height: 140px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) .modal--battle-comic .team-customize-actions {
    margin-top: 18px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) .modal--battle-comic .team-custom-mini {
    width: auto;
    max-width: 88px;
    padding: 10px 8px;
    font-size: 14px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) .modal--battle-comic .team-custom-random-kit {
    width: 100%;
    max-width: none;
    font-size: 16px;
    padding: 12px 14px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) .modal--battle-comic .team-customize-actions .comic-action-btn {
    width: 100%;
    max-width: none;
  }

  /* 对战内弹层（暂停 / 结果 / 阶段提示） */
  html.shows-keyboard-hints:not(.is-landscape-mobile) .battle-pause-overlay .comic-card-shell,
  html.shows-keyboard-hints:not(.is-landscape-mobile) .battle-result-overlay .comic-card-shell,
  html.shows-keyboard-hints:not(.is-landscape-mobile) .battle-phase-overlay .comic-card-shell:not(.comic-card-shell--penalty-intro) {
    width: min(var(--pc-dialog-max), 94vw);
    max-width: min(var(--pc-dialog-max), 94vw);
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) .battle-overlay-card.result-card,
  html.shows-keyboard-hints:not(.is-landscape-mobile) .battle-pause-overlay .battle-overlay-card,
  html.shows-keyboard-hints:not(.is-landscape-mobile) .battle-result-overlay .battle-result-card {
    max-width: min(var(--pc-dialog-max), 100%);
    padding: 40px 36px 32px;
    gap: 16px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) .battle-overlay-card.result-card h2,
  html.shows-keyboard-hints:not(.is-landscape-mobile) .battle-result-overlay .battle-result-card h2 {
    font-size: 32px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) .battle-overlay-card .result-icon,
  html.shows-keyboard-hints:not(.is-landscape-mobile) .battle-result-overlay .result-icon {
    font-size: 52px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) .battle-overlay-card .quiz-result-summary,
  html.shows-keyboard-hints:not(.is-landscape-mobile) .battle-result-overlay .quiz-result-summary {
    font-size: 17px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) .battle-overlay-card .quiz-result-summary strong,
  html.shows-keyboard-hints:not(.is-landscape-mobile) .battle-result-overlay .quiz-result-summary strong {
    font-size: 26px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) .battle-overlay-card .result-comment,
  html.shows-keyboard-hints:not(.is-landscape-mobile) .battle-result-overlay .result-comment {
    font-size: 16px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) .battle-phase-countdown {
    font-size: 46px;
    margin-top: 12px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) .comic-card-shell--phase-popup {
    max-width: min(var(--phase-popup-max), 100%);
    min-width: min(var(--phase-popup-min), 100%);
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) .battle-phase-overlay .comic-card-shell--phase-popup {
    width: min(var(--phase-popup-max), 100%);
    max-width: min(var(--phase-popup-max), 100%);
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) .battle-phase-overlay .comic-card-shell--penalty-intro {
    width: min(var(--penalty-intro-shell-max), 94vw);
    max-width: min(var(--penalty-intro-shell-max), 94vw);
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) .comic-card-shell--penalty-intro .battle-penalty-intro-card {
    max-width: min(var(--penalty-intro-card-max), 92vw);
    padding: 16px 20px 14px;
    gap: 4px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) .comic-card-shell--penalty-intro .battle-penalty-intro-card h2 {
    font-size: 22px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) .comic-card-shell--penalty-intro .battle-penalty-intro-card .quiz-result-summary {
    font-size: 13px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) .comic-card-shell--phase-popup .comic-sticker {
    font-size: 13px;
    padding: 4px 9px 5px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) .comic-card-shell--phase-popup .battle-overlay-card.result-card {
    padding: 26px 28px 22px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) .comic-card-shell--phase-popup .battle-overlay-card.result-card h2 {
    font-size: 28px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) .comic-card-shell--phase-popup .quiz-result-summary {
    font-size: 14px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) .comic-card-shell--phase-popup .battle-phase-countdown {
    font-size: 36px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) .comic-card-shell--penalty-intro .battle-penalty-rules {
    font-size: 12px;
    line-height: 1.45;
    margin-top: 8px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) .comic-card-shell--penalty-intro .battle-penalty-intro-actions {
    margin-top: 10px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) .comic-card-shell--penalty-intro .comic-action-btn {
    font-size: 13px;
    padding: 8px 12px;
  }

  /* 对战菜单 / 世界杯之路等全屏对话框 */
  html.shows-keyboard-hints:not(.is-landscape-mobile) .battle-screen--comic .battle-screen-stack {
    max-width: min(var(--pc-dialog-max), 100%);
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) .battle-screen--comic .battle-screen-stack--wide {
    max-width: min(var(--pc-dialog-max-lg), 100%);
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) .battle-screen--comic .comic-card-shell--battle,
  html.shows-keyboard-hints:not(.is-landscape-mobile) .battle-screen--comic .comic-card-shell--overlay {
    max-width: min(var(--pc-dialog-max), 100%);
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) .battle-screen--comic .comic-card-shell--battle-wide {
    max-width: min(var(--pc-dialog-max-lg), 100%);
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) .battle-setup-card.quiz-card--comic,
  html.shows-keyboard-hints:not(.is-landscape-mobile) .campaign-map-card.quiz-card--comic {
    padding: 22px 22px 20px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) .battle-screen--comic .battle-card-title {
    font-size: 30px;
    margin-bottom: 12px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) .battle-screen--comic .battle-card-desc {
    font-size: 16px;
    margin-bottom: 8px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) .battle-screen--comic .battle-card-hint {
    font-size: 14px;
    margin-top: 12px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) .battle-screen--comic .battle-actions {
    gap: 12px;
    margin-top: 6px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) .battle-screen--comic .battle-actions .comic-action-btn {
    font-size: 17px;
    padding: 14px 18px;
  }

  /* 问答 / 点球结果页（对话框式结果卡） */
  html.shows-keyboard-hints:not(.is-landscape-mobile) #screen-quiz-result .comic-card-shell--quiz {
    max-width: min(var(--pc-result-max), 100%);
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) #screen-quiz-result .quiz-result-card.result-card,
  html.shows-keyboard-hints:not(.is-landscape-mobile) #screen-challenge-result .challenge-result-card.quiz-result-card {
    max-width: min(var(--pc-result-max), 100%);
    padding: 40px 36px 32px;
    gap: 16px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) #screen-quiz-result .quiz-result-card h2,
  html.shows-keyboard-hints:not(.is-landscape-mobile) #screen-challenge-result .challenge-result-card h2 {
    font-size: 32px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) #screen-quiz-result .quiz-result-summary {
    font-size: 17px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) #screen-quiz-result .quiz-result-summary strong {
    font-size: 26px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) #screen-quiz-result .result-comment,
  html.shows-keyboard-hints:not(.is-landscape-mobile) #screen-challenge-result .challenge-result-comment {
    font-size: 16px;
    max-width: 380px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) #screen-challenge-result .challenge-result-icon {
    font-size: 64px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) #screen-challenge-result .challenge-result-score {
    font-size: 17px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) #screen-challenge-result .challenge-result-score strong {
    font-size: 32px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) #screen-challenge-result .challenge-result-score-total {
    font-size: 20px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) #screen-quiz-result .comic-action-btn,
  html.shows-keyboard-hints:not(.is-landscape-mobile) #screen-challenge-result .challenge-result-actions .comic-action-btn {
    font-size: 17px;
    padding: 14px 18px;
    max-width: none;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) #screen-challenge-shoot .shoot-center-panel .shoot-next-btn {
    min-width: 220px;
    padding: 16px 40px;
    font-size: 18px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) #screen-campaign-champion .campaign-champion-card {
    max-width: min(var(--pc-dialog-max), 100%);
    padding: 40px 36px 32px;
  }
  html.shows-keyboard-hints:not(.is-landscape-mobile) #screen-campaign-champion .campaign-trophy {
    font-size: 84px;
  }
}

.home-layout > .term-card {
  min-width: 0;
}
#screen-home .term-card {
  width: 100%;
  max-width: min(var(--card-max-term), 100%);
  min-width: min(var(--card-min-sm), 100%);
  margin: 0 auto;
  flex-shrink: 0;
  box-sizing: border-box;
}
#screen-home .hero {
  flex: 0 0 auto;
  text-align: left;
  padding: 0;
  width: 100%;
  max-width: 100%;
  align-self: stretch;
}
#screen-home .home-intro .hero--comic {
  padding: 0;
}
#screen-home .home-intro .hero-panel {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.ball-icon {
  font-size: 40px;
  line-height: 1;
  animation: bounce 2s ease infinite;
  filter: drop-shadow(3px 3px 0 var(--comic-ink));
}
.hero-panel .ball-icon {
  position: absolute;
  top: 13px;
  right: 8px;
  left: auto;
  z-index: 3;
  margin: 0;
  font-size: 38px;
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* —— 首页标题 · 漫画风 —— */
.hero--comic { padding: 0 4px; }
.hero-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: fit-content;
  max-width: min(var(--card-max-hero), 100%);
  min-width: min(var(--card-min-hero), 100%);
  padding: 18px 20px 16px 22px;
  background: linear-gradient(135deg, #fff566 0%, #ffe600 42%, #ffb347 100%);
  border: 4px solid var(--comic-ink);
  border-radius: 6px;
  box-shadow: var(--comic-shadow-lg);
  transform: rotate(-2.8deg);
  isolation: isolate;
  overflow: hidden;
}
.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  padding-top: 4px;
  padding-right: 44px;
  z-index: 1;
}
.hero-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255, 107, 0, 0.08) 1px, transparent 1px);
  background-size: 6px 6px;
  opacity: 0.45;
  pointer-events: none;
  border-radius: 2px;
  z-index: 0;
}
.hero-panel::after {
  content: '';
  position: absolute;
  left: 24%;
  top: 48%;
  width: 340%;
  height: 340%;
  transform: translate(-50%, -50%) rotate(8deg);
  background: repeating-conic-gradient(
    from -10deg,
    rgba(255, 255, 255, 0.34) 0deg 7.5deg,
    transparent 7.5deg 13deg
  );
  pointer-events: none;
  z-index: 0;
}
.hero-panel > * { position: relative; z-index: 1; }
.hero-title-wrap {
  position: relative;
  display: block;
  margin-top: 0;
}
.hero--comic h1,
.hero--comic .hero-title {
  position: relative;
  z-index: 1;
  display: block;
  font-family: "Bangers", "Arial Black", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 44px;
  font-weight: 900;
  margin: 0;
  padding: 0;
  color: #fff;
  letter-spacing: 0.06em;
  line-height: 1.05;
  white-space: nowrap;
  transform: rotate(-4deg) skewX(-5deg);
  -webkit-text-stroke: 3.5px var(--comic-ink);
  paint-order: stroke fill;
  text-shadow:
    4px 4px 0 var(--comic-ink),
    5px 5px 0 #ea580c,
    7px 7px 0 rgba(154, 52, 18, 0.65);
}
.hero--comic h1::after { display: none; }
.hero--comic .subtitle {
  display: inline-block;
  margin: 0;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 800;
  color: var(--comic-ink);
  background: var(--comic-coral-light);
  border: 2.5px solid var(--comic-ink);
  border-radius: 3px;
  box-shadow: 2px 2px 0 var(--comic-ink);
  text-shadow: none;
  transform: rotate(2deg);
  align-self: flex-start;
}

.stats-bar {
  display: flex;
  justify-content: space-around;
  padding: 10px 8px;
  width: 100%;
  min-width: min(var(--card-min-sm), 100%);
  background: linear-gradient(90deg, #fff7ed 0%, #ffedd5 50%, #fff9db 100%);
  border: 3px solid var(--comic-ink);
  border-radius: 6px;
  box-shadow: var(--comic-shadow-sm);
  transform: rotate(1.2deg);
}
.stat-item { text-align: center; }
.stat-item:nth-child(1) .stat-value { color: #ea580c; }
.stat-item:nth-child(2) .stat-value { color: #c2410c; }
.stat-item:nth-child(3) .stat-value { color: #d97706; }
.stat-label {
  display: block;
  font-family: "Bangers", "Arial Black", sans-serif;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: rgba(16, 16, 16, 0.62);
  text-transform: uppercase;
}
.stat-value {
  font-size: 18px;
  font-weight: 900;
  line-height: 1.2;
}
.stat-unit {
  font-size: 10px;
  font-weight: 700;
  color: rgba(16, 16, 16, 0.5);
}

.home-footer {
  text-align: center;
  padding: 6px 12px;
  width: 100%;
  min-width: min(var(--card-min-sm), 100%);
  font-size: 11px;
  font-weight: 700;
  color: var(--comic-ink);
  background: linear-gradient(90deg, #fed7aa 0%, #fde68a 100%);
  border: 2.5px solid var(--comic-ink);
  border-radius: 4px;
  box-shadow: 2px 2px 0 var(--comic-ink);
  transform: rotate(-1deg);
}
.home-footer strong {
  color: var(--comic-rust);
  font-size: 13px;
}

.mode-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  flex: 0 0 auto;
  align-content: start;
  width: 100%;
  min-width: 0;
}

/* —— 美式漫画风功能卡片（三模块统一宽高 · 竖向排列） —— */
.mode-card {
  --comic-shadow: var(--comic-shadow-lg);
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  gap: 16px;
  padding: 20px 22px 18px;
  min-height: 92px;
  border: 4px solid var(--comic-ink);
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  font-family: inherit;
  color: #fff;
  position: relative;
  overflow: visible;
  min-width: min(var(--card-min-sm), 100%);
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  box-shadow: var(--comic-shadow);
  transform: rotate(var(--comic-tilt, 0deg));
  isolation: isolate;
}
.mode-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      -42deg,
      transparent,
      transparent 10px,
      rgba(0, 0, 0, 0.04) 10px,
      rgba(0, 0, 0, 0.04) 11px
    );
  pointer-events: none;
  z-index: 0;
}
.mode-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(0, 0, 0, 0.14) 1px, transparent 1px);
  background-size: 6px 6px;
  opacity: 0.45;
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: multiply;
}
.mode-card > * { position: relative; z-index: 1; }

.mode-sticker,
.comic-sticker {
  position: absolute;
  top: 0;
  right: 12px;
  z-index: 5;
  padding: 3px 8px 4px;
  font-family: "Bangers", "Arial Black", sans-serif;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--comic-ink);
  background: #fde047;
  border: 2.5px solid var(--comic-ink);
  border-radius: 3px;
  box-shadow: 2px 2px 0 var(--comic-ink);
  transform: translateY(-50%) rotate(8deg);
  transform-origin: center center;
  line-height: 1;
  pointer-events: none;
}
.mode-sticker--hero,
.comic-sticker--hero {
  right: 18px;
  font-size: 17px;
  padding: 4px 12px 5px;
  background: #fef08a;
  transform: translateY(-50%) rotate(4deg);
}
.comic-sticker--md {
  right: 16px;
  font-size: 15px;
  padding: 4px 10px 5px;
  background: linear-gradient(180deg, #fff566, #ffe600);
  transform: translateY(-50%) rotate(5deg);
}

/* 漫画卡片外壳 — 角标可超出边框；统一最大宽度钳制 */
.comic-card-shell {
  position: relative;
  overflow: visible;
  width: 100%;
  max-width: min(var(--card-max-md), 100%);
  min-width: min(var(--card-min-md), 100%);
  flex-shrink: 0;
  box-sizing: border-box;
}
.comic-card-shell--quiz {
  max-width: min(var(--card-max-quiz), 100%);
  min-width: min(var(--card-min-md), 100%);
}
.comic-card-shell--battle {
  max-width: min(var(--card-max-md), 100%);
  min-width: min(var(--card-min-md), 100%);
}
.comic-card-shell--battle-wide {
  max-width: min(var(--card-max-lg), 100%);
  min-width: min(var(--card-min-lg), 100%);
}
.comic-card-shell--overlay {
  max-width: min(var(--card-max-md), 100%);
  min-width: min(var(--card-min-sm), 100%);
  width: 100%;
}
.comic-card-shell > *:not(.comic-sticker):not(.mode-sticker) {
  position: relative;
  z-index: 1;
  width: 100%;
}

.mode-icon {
  font-size: 46px;
  flex-shrink: 0;
  padding: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 3px solid var(--comic-ink);
  box-shadow: 3px 3px 0 var(--comic-ink);
  filter: drop-shadow(2px 2px 0 rgba(0, 0, 0, 0.85));
  line-height: 1;
}
.mode-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  flex: 1;
  min-width: 0;
}
.mode-title {
  font-size: 24px;
  font-family: "Bangers", "Arial Black", "PingFang SC", sans-serif;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: none;
  text-shadow:
    2px 2px 0 var(--comic-ink),
    -1px -1px 0 var(--comic-ink),
    1px -1px 0 var(--comic-ink),
    -1px 1px 0 var(--comic-ink);
}
.mode-desc {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  padding: 4px 8px;
  border-radius: 3px;
  border: 2px solid rgba(0, 0, 0, 0.55);
  background: rgba(0, 0, 0, 0.22);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.45);
  opacity: 1;
  align-self: flex-start;
}

.mode-card--featured {
  --comic-tilt: -1.6deg;
}

.mode-card.challenge { --comic-tilt: 2.2deg; }
.mode-card.quiz { --comic-tilt: -1.8deg; }
.mode-card.battle { --comic-tilt: -1.6deg; }

.mode-card.challenge {
  background: var(--challenge-grass-card);
}
.mode-card.quiz {
  background:
    linear-gradient(165deg, #60a5fa 0%, #2563eb 50%, #1e3a8a 100%);
}
.mode-card.battle {
  background:
    linear-gradient(165deg, #fdba74 0%, #ea580c 42%, #9a3412 100%);
}

.mode-card:hover {
  transform: rotate(var(--comic-tilt, 0deg)) translate(-2px, -2px);
  box-shadow: 7px 7px 0 var(--comic-ink);
}
.mode-card:active {
  transform: rotate(var(--comic-tilt, 0deg)) translate(3px, 3px);
  box-shadow: 2px 2px 0 var(--comic-ink);
  opacity: 1;
}

/* —— 术语知识卡 · 漫画风（暖色调） —— */
.term-card.term-card--comic {
  width: 100%;
  max-width: min(var(--card-max-term), 100%);
  min-width: min(var(--card-min-sm), 100%);
  border: 4px solid var(--comic-ink);
  border-radius: 6px;
  box-shadow: var(--comic-shadow-lg);
  transform: rotate(0.9deg);
  isolation: isolate;
  overflow: visible;
}
.term-card-sticker {
  position: absolute;
  top: 8px;
  left: 10px;
  z-index: 3;
  padding: 3px 10px 4px;
  font-family: "Bangers", "Arial Black", sans-serif;
  font-size: 16px;
  letter-spacing: 0.06em;
  color: var(--comic-ink);
  background: linear-gradient(180deg, #fff566, #ffe600);
  border: 2.5px solid var(--comic-ink);
  border-radius: 3px;
  box-shadow: 2px 2px 0 var(--comic-ink);
  transform: rotate(-6deg);
  line-height: 1;
}
.term-card--comic .term-card-sticker {
  top: -2px;
  left: -2px;
  transform: rotate(-10deg);
  transform-origin: top left;
}
.term-card--comic .term-card-category {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 5;
  transform: translate(-50%, -50%);
  padding: 0 10px;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #fff;
  white-space: nowrap;
  line-height: 1.2;
  text-shadow:
    1px 1px 0 var(--comic-ink),
    -1px -1px 0 var(--comic-ink);
  pointer-events: none;
}
.term-card--comic .term-card-pitch {
  background:
    repeating-linear-gradient(
      -42deg,
      transparent,
      transparent 10px,
      rgba(255, 255, 255, 0.08) 10px,
      rgba(255, 255, 255, 0.08) 11px
    ),
    linear-gradient(165deg, #ffb347 0%, #ff9500 45%, #ea580c 100%);
}
.term-card--comic .term-card-pitch-lines,
.term-card--comic .term-card-center-circle {
  border-color: rgba(255, 255, 255, 0.4);
}
.term-card--comic .term-card-pitch-lines::before {
  background: rgba(255, 255, 255, 0.28);
}
.term-card--comic .term-card-ball {
  opacity: 0.72;
  filter: drop-shadow(3px 3px 0 var(--comic-ink));
}
.term-card--comic .term-card-inner {
  min-height: 300px;
  max-height: min(85dvh, 580px);
  padding: 28px 16px 18px;
  background: linear-gradient(180deg, #fff7ed 0%, #ffedd5 100%);
  backdrop-filter: none;
  gap: 10px;
  overflow: hidden;
  border-radius: 2px;
}
.term-card--comic .term-card-inner::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(234, 88, 12, 0.1) 1px, transparent 1px);
  background-size: 6px 6px;
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}
.term-card--comic .term-card-inner > * { position: relative; z-index: 1; }
.term-card--comic .term-card-header {
  padding-bottom: 10px;
  border-bottom: 3px solid var(--comic-ink);
}
.term-card--comic .term-card-heading {
  align-items: center;
  min-height: auto;
  gap: 10px;
}
.term-card--comic .term-card-body {
  gap: 12px;
  padding-top: 6px;
  flex: 1 1 auto;
}
.term-card--comic .term-card-meta {
  font-size: 11px;
  font-weight: 700;
  color: #9a3412;
  padding: 3px 7px;
  border: 2px solid var(--comic-ink);
  border-radius: 3px;
  background: var(--comic-peach-deep);
}
.term-card--comic .term-card-title {
  flex: 1;
  min-width: 0;
  font-size: 24px;
  font-weight: 900;
  color: var(--comic-ink);
  margin: 0;
  padding-left: 32px;
  border-left: none;
  text-shadow:
    2px 2px 0 var(--comic-coral-light),
    -1px -1px 0 var(--comic-ink);
  line-height: 1.15;
}
.term-card--comic .term-card-explanation {
  font-size: 14px;
  line-height: 1.62;
  font-weight: 600;
  color: #0f172a;
}
.term-card--comic .term-card-example-wrap {
  padding: 11px 13px;
  margin-top: 2px;
  border-radius: 4px;
  background: linear-gradient(135deg, #fff566, #fde047);
  border: 2.5px solid var(--comic-ink);
  box-shadow: 2px 2px 0 var(--comic-ink);
}
.term-card--comic .term-card-example-label {
  font-family: "Bangers", sans-serif;
  font-size: 14px;
  color: #c2410c;
}
.term-card--comic .term-card-example {
  font-size: 13px;
  font-weight: 600;
  color: rgba(15, 23, 42, 0.82);
  font-style: normal;
}
.term-card--comic .term-card-footer {
  padding-top: 14px;
  margin-top: auto;
  flex-shrink: 0;
  border-top: 3px solid var(--comic-ink);
}
.term-card--comic .term-card-counter {
  font-family: "Bangers", sans-serif;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--comic-ink);
  padding: 4px 10px;
  border-radius: 4px;
  background: var(--comic-peach-deep);
  border: 2.5px solid var(--comic-ink);
  box-shadow: 2px 2px 0 var(--comic-ink);
}
.term-card--comic .term-card-nav {
  width: 38px;
  height: 38px;
  border-radius: 4px;
  border: 2.5px solid var(--comic-ink);
  background: #fff;
  color: var(--comic-ink);
  font-size: 14px;
  box-shadow: 2px 2px 0 var(--comic-ink);
  transition: transform 0.1s, box-shadow 0.1s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.term-card--comic .term-card-nav-primary {
  background: var(--comic-coral);
  color: var(--comic-ink);
  border-color: var(--comic-ink);
  box-shadow: 2px 2px 0 var(--comic-ink);
}
@media (hover: hover) and (pointer: fine) {
  .term-card--comic .term-card-nav:hover {
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0 var(--comic-ink);
  }
}
.term-card--comic .term-card-nav:active {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 var(--comic-ink);
}

/* 术语卡基础结构 */
.term-card {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  min-width: min(var(--card-min-sm), 100%);
  max-width: min(var(--card-max-term), 100%);
  align-self: center;
  max-height: min(85dvh, 520px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
}
.term-card-pitch {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(22, 101, 52, 0.95) 0,
      rgba(22, 101, 52, 0.95) 28px,
      rgba(18, 82, 42, 0.95) 28px,
      rgba(18, 82, 42, 0.95) 56px
    ),
    linear-gradient(180deg, #1a6b38 0%, #0f4d28 100%);
  z-index: 0;
}
.term-card-pitch-lines {
  position: absolute;
  inset: 12px;
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-radius: 4px;
  pointer-events: none;
}
.term-card-pitch-lines::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.18);
}
.term-card-center-circle {
  position: absolute;
  left: 50%;
  top: 38%;
  width: 72px;
  height: 72px;
  margin: -36px 0 0 -36px;
  border: 2px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  pointer-events: none;
}
.term-card-ball {
  position: absolute;
  right: 10px;
  bottom: 14px;
  font-size: 28px;
  line-height: 1;
  opacity: 0.35;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
  animation: term-ball-float 4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes term-ball-float {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(-6px, -8px) rotate(25deg); }
}
.term-card-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  max-height: min(85dvh, 520px);
  padding: 14px 16px 12px;
  background: linear-gradient(
    165deg,
    rgba(12, 28, 18, 0.88) 0%,
    rgba(8, 20, 12, 0.82) 100%
  );
  backdrop-filter: blur(6px);
  overflow: hidden;
}
.term-card-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
  padding-bottom: 8px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.15);
}
.term-card-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}
.term-card-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.term-card-whistle {
  font-size: 16px;
  line-height: 1;
}
.term-card-meta {
  font-size: 12px;
  color: rgba(200, 220, 200, 0.75);
  text-align: right;
  flex-shrink: 0;
}
.term-card-hot-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  font-family: "Bangers", sans-serif;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: #fff;
  background: linear-gradient(135deg, #fb923c 0%, #ea580c 100%);
  border: 2px solid var(--comic-ink);
  border-radius: 4px;
  box-shadow: 2px 2px 0 var(--comic-ink);
  line-height: 1.2;
  transform: rotate(8deg);
  transform-origin: top right;
  pointer-events: none;
}
.term-card-hot-badge.hidden { display: none; }
.term-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
}
.term-card-body::-webkit-scrollbar { width: 4px; }
.term-card-body::-webkit-scrollbar-thumb {
  background: rgba(245, 197, 24, 0.35);
  border-radius: 4px;
}
.term-card-title {
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
  padding-left: 10px;
  border-left: 3px solid var(--gold);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}
.term-card-explanation {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(220, 235, 220, 0.92);
}
.term-card-explanation::-webkit-scrollbar { width: 4px; }
.term-card-explanation::-webkit-scrollbar-thumb {
  background: rgba(245, 197, 24, 0.35);
  border-radius: 4px;
}
.term-card-example-wrap {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  padding: 9px 11px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(245, 197, 24, 0.2);
  margin: 0;
  flex-shrink: 0;
}
.term-card-example-wrap.hidden { display: none; }
.term-card-example-label {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.03em;
}
.term-card-example {
  font-size: 13px;
  line-height: 1.55;
  color: rgba(200, 215, 200, 0.88);
  font-style: italic;
}
.term-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.term-card-counter {
  font-size: 13px;
  font-weight: 600;
  color: rgba(245, 197, 24, 0.85);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.term-card-nav {
  width: 38px;
  height: 38px;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.15s, background 0.15s, border-color 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.term-card-nav-primary {
  background: linear-gradient(145deg, rgba(245, 197, 24, 0.35), rgba(200, 150, 10, 0.25));
  border-color: rgba(245, 197, 24, 0.5);
  color: var(--gold);
  box-shadow: 0 2px 8px rgba(245, 197, 24, 0.2);
}
@media (hover: hover) and (pointer: fine) {
  .term-card-nav:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.35);
  }
  .term-card-nav-primary:hover {
    background: linear-gradient(145deg, rgba(245, 197, 24, 0.5), rgba(200, 150, 10, 0.35));
  }
}
.term-card-nav:active { transform: scale(0.92); }
.term-card-loading .term-card-title { opacity: 0.5; }
.term-card-animate .term-card-body {
  animation: term-card-in 0.35s ease;
}
@keyframes term-card-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 900px) {
  .screen:not(.screen-battle):not(.screen-shoot) {
    padding: 12px 14px;
    overflow-y: auto;
  }

  #screen-home .home-main {
    max-width: min(var(--card-max-home), 100%);
    width: 100%;
    margin: 0 auto;
    align-self: center;
  }
  .hero-panel {
    width: 100%;
    max-width: 100%;
  }
  #screen-home .home-intro .hero-panel {
    width: 100%;
    max-width: 100%;
  }
  .term-card,
  .term-card.term-card--comic {
    width: 100%;
    max-width: min(var(--card-max-term), 100%);
    margin: 0 auto;
    max-height: min(80dvh, 520px);
  }
  .term-card-inner {
    max-height: min(80dvh, 520px);
  }

  #screen-quiz-result,
  #screen-challenge-result {
    align-items: stretch;
    justify-content: flex-start;
    padding: 12px 14px;
    gap: 10px;
  }
  .battle-screen--comic {
    align-items: center;
    justify-content: center;
    padding: 12px 14px;
    gap: 0;
    overflow-y: auto;
  }
  .battle-screen--comic .battle-screen-stack {
    max-width: 100%;
  }
  #screen-quiz {
    align-items: center;
    justify-content: center;
    padding: 12px 14px;
    gap: 0;
  }
  #screen-quiz .quiz-screen-stack {
    max-width: 100%;
  }
  #screen-quiz-result .screen-header {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  .battle-screen--comic .screen-header {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    justify-content: flex-start;
  }
  .comic-card-shell--quiz {
    width: 100%;
    max-width: 100%;
  }
  .comic-card-shell--battle,
  .comic-card-shell--battle-wide,
  .comic-card-shell--overlay {
    width: 100%;
    max-width: min(var(--card-max-md), 100%);
  }
  .comic-card-shell--battle-wide {
    max-width: min(var(--card-max-lg), 100%);
  }
  .modal--battle-comic .comic-card-shell,
  .modal--battle-comic .modal-battle-stack {
    width: min(var(--card-max-md), 100%);
    max-width: min(var(--card-max-md), 100%);
    margin-inline: auto;
  }
}

/* 通用头部 */
.screen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}
.btn-back {
  background: rgba(0,0,0,0.35);
  border: none;
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 20px;
  font-family: inherit;
  backdrop-filter: blur(4px);
}
.round-badge, .score-badge {
  font-size: 13px;
  background: rgba(0,0,0,0.45);
  padding: 6px 12px;
  border-radius: 20px;
  color: var(--text-muted);
  backdrop-filter: blur(4px);
}
.score-badge { color: var(--gold); }

/* 答题屏 · 漫画风（对战入口屏共用） */
#screen-quiz {
  justify-content: center;
  align-items: center;
  overflow-y: auto;
}
.quiz-screen-stack {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  width: 100%;
  max-width: min(var(--card-max-quiz), 100%);
  margin: auto;
  flex-shrink: 0;
  box-sizing: border-box;
}
#screen-quiz .screen-header {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-bottom: 0;
}
#screen-quiz .comic-card-shell--quiz {
  margin: 0;
  width: 100%;
}
#screen-quiz .quiz-streak-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
  position: relative;
}
#screen-quiz .quiz-streak {
  width: auto;
  max-width: min(240px, 100%);
  margin: 0;
}
#screen-quiz-result,
.battle-screen--comic {
  align-items: center;
  justify-content: center;
  gap: 14px;
  background:
    linear-gradient(to bottom, rgba(15, 31, 20, 0.26), rgba(15, 31, 20, 0.4)),
    var(--bg-image-home) center center / cover no-repeat;
}
#screen-quiz,
#screen-quiz-result,
.battle-screen--comic {
  background:
    linear-gradient(to bottom, rgba(15, 31, 20, 0.26), rgba(15, 31, 20, 0.4)),
    var(--bg-image-home) center center / cover no-repeat;
}
#screen-quiz .screen-header,
#screen-quiz-result .screen-header {
  width: 100%;
  min-width: min(var(--card-min-md), 100%);
  max-width: min(var(--card-max-quiz), 100%);
}
#screen-quiz .btn-back,
#screen-quiz-result .btn-back,
.battle-screen--comic .btn-back {
  background: #fff;
  border: 2.5px solid var(--comic-ink);
  color: var(--comic-ink);
  font-weight: 800;
  border-radius: 4px;
  box-shadow: 2px 2px 0 var(--comic-ink);
  backdrop-filter: none;
}
#screen-quiz .round-badge,
#screen-quiz .score-badge {
  font-weight: 800;
  font-size: 12px;
  color: var(--comic-ink);
  background: var(--quiz-badge-bg);
  border: 2.5px solid var(--comic-ink);
  border-radius: 4px;
  box-shadow: 2px 2px 0 var(--comic-ink);
  backdrop-filter: none;
}
#screen-quiz .score-badge {
  background: linear-gradient(180deg, #fff566, #ffe600);
}

/* 足球问答 · 答题卡蓝色主题 */
#screen-quiz .quiz-card--comic {
  background: var(--quiz-card-gradient);
}
#screen-quiz .quiz-card--comic::after {
  background-image: radial-gradient(circle, var(--quiz-dot-color) 1px, transparent 1px);
}
#screen-quiz .quiz-difficulty {
  background: var(--quiz-badge-bg);
}
#screen-quiz .quiz-star.filled {
  color: #fde047;
}
#screen-quiz .question-text {
  background: var(--quiz-panel-light);
}

.quiz-card--comic {
  position: relative;
  background: linear-gradient(165deg, #ffb347 0%, #ff9500 42%, #ea580c 100%);
  border: 4px solid var(--comic-ink);
  border-radius: 6px;
  padding: 22px 20px 18px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  max-height: calc(100dvh - 140px);
  overflow-y: auto;
  box-shadow: var(--comic-shadow-lg);
  backdrop-filter: none;
  isolation: isolate;
  box-sizing: border-box;
}
.quiz-card--comic::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(-42deg, transparent, transparent 10px, rgba(0, 0, 0, 0.04) 10px, rgba(0, 0, 0, 0.04) 11px);
  pointer-events: none;
  z-index: 0;
}
.quiz-card--comic::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(154, 52, 18, 0.14) 1px, transparent 1px);
  background-size: 6px 6px;
  opacity: 0.45;
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: multiply;
}
.quiz-card--comic > * { position: relative; z-index: 1; }
.quiz-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--comic-ink);
}
.quiz-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}
#screen-quiz .quiz-hot-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  font-family: "Bangers", sans-serif;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: #fff;
  background: linear-gradient(135deg, #fb923c 0%, #ea580c 100%);
  border: 2px solid var(--comic-ink);
  border-radius: 4px;
  box-shadow: 2px 2px 0 var(--comic-ink);
  line-height: 1.2;
  flex-shrink: 0;
}
#screen-quiz .quiz-hot-badge.hidden {
  display: none;
}
.quiz-difficulty {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
  min-width: 0;
  padding: 4px 8px;
  background: var(--comic-peach-deep);
  border: 2px solid var(--comic-ink);
  border-radius: 4px;
  box-shadow: 2px 2px 0 var(--comic-ink);
}
.quiz-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.quiz-nav-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 4px;
  border: 2.5px solid var(--comic-ink);
  background: #fff;
  color: var(--comic-ink);
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  box-shadow: 2px 2px 0 var(--comic-ink);
  transition: transform 0.1s, box-shadow 0.1s;
}
.quiz-nav-btn:active:not(:disabled) {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 var(--comic-ink);
}
.quiz-nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: 1px 1px 0 var(--comic-ink);
}
.quiz-difficulty-label {
  font-family: "Bangers", sans-serif;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--comic-ink);
}
.quiz-difficulty-stars {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  line-height: 1;
}
.quiz-star {
  font-size: 16px;
  color: rgba(16, 16, 16, 0.2);
}
.quiz-star.filled {
  color: var(--comic-orange);
  text-shadow: 1px 1px 0 var(--comic-ink);
}
.question-text {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.55;
  margin-bottom: 14px;
  padding: 12px 14px;
  color: var(--comic-ink);
  background: linear-gradient(180deg, #fff 0%, #ffedd5 100%);
  border: 3px solid var(--comic-ink);
  border-radius: 4px;
  box-shadow: var(--comic-shadow-sm);
}
.options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.option-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  background: #fff;
  border: 2.5px solid var(--comic-ink);
  border-radius: 4px;
  color: var(--comic-ink);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s, background 0.1s, color 0.1s;
  font-family: inherit;
  line-height: 1.45;
  box-shadow: 3px 3px 0 var(--comic-ink);
}
.option-btn:active:not(.disabled) {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--comic-ink);
}
.option-btn.correct {
  border-color: var(--comic-ink);
  background: #4ade80;
  color: var(--comic-ink);
  box-shadow: 3px 3px 0 #15803d;
}
.option-btn.wrong {
  border-color: var(--comic-ink);
  background: #f87171;
  color: var(--comic-ink);
  box-shadow: 3px 3px 0 #b91c1c;
}
.option-btn.disabled {
  pointer-events: none;
}
.option-btn.disabled:not(.correct):not(.wrong) {
  background: #fff;
  color: rgba(16, 16, 16, 0.42);
  box-shadow: 3px 3px 0 var(--comic-ink);
}
.option-btn.disabled.correct,
.option-btn.disabled.wrong {
  opacity: 1;
}

/* —— 漫画风 · 通用操作按钮（问答/对战/点球共用） —— */
.comic-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  width: 100%;
  max-width: 280px;
  margin: 0;
  padding: 12px 14px;
  border: 2.5px solid var(--comic-ink);
  border-radius: 4px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.3;
  text-align: center;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s, background 0.1s;
  box-shadow: 3px 3px 0 var(--comic-ink);
}
.comic-action-btn--primary {
  background: var(--comic-yellow);
  color: var(--comic-ink);
  border-width: 3px;
}
.comic-action-btn--secondary {
  background: linear-gradient(180deg, #fff 0%, #fff7ed 100%);
  color: var(--comic-ink);
}
.comic-action-btn--sm {
  padding: 10px 8px;
  font-size: 13px;
  max-width: none;
}
.comic-action-btn:active:not(:disabled) {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--comic-ink);
}
.comic-action-btn:disabled,
.comic-action-btn.coming-soon {
  opacity: 0.55;
  cursor: not-allowed;
}

.quiz-remark {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.6;
  color: var(--comic-ink);
  background: linear-gradient(135deg, #fff566, #fde047);
  border: 2.5px solid var(--comic-ink);
  box-shadow: 2px 2px 0 var(--comic-ink);
  border-left: none;
}
.quiz-remark.hidden { display: none; }
.quiz-streak-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
  position: relative;
}
.quiz-streak {
  width: auto;
  max-width: min(240px, 100%);
  margin: 0 auto;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  color: var(--comic-ink);
  padding: 6px 18px;
  background: linear-gradient(90deg, #fde047, #fb923c);
  border: 2.5px solid var(--comic-ink);
  border-radius: 4px;
  box-shadow: 2px 2px 0 var(--comic-ink);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.quiz-streak strong {
  font-family: "Bangers", sans-serif;
  font-size: 18px;
  letter-spacing: 0.04em;
}
.quiz-streak--idle {
  background: linear-gradient(90deg, #fef3c7, #fde68a);
  opacity: 0.92;
}
.quiz-streak--warm {
  background: linear-gradient(90deg, #fde047, #fbbf24);
}
.quiz-streak--hot {
  background: linear-gradient(90deg, #fff566, #fb923c);
  box-shadow: 3px 3px 0 var(--comic-ink);
}
.quiz-streak--fire {
  background: linear-gradient(90deg, #fff566, #f97316);
  box-shadow: 3px 3px 0 var(--comic-ink), 0 0 12px rgba(251, 146, 60, 0.45);
  animation: quiz-streak-glow 1.2s ease-in-out infinite;
}
.quiz-streak--bump {
  animation: quiz-streak-bump 0.52s cubic-bezier(0.34, 1.4, 0.64, 1);
}
.quiz-streak-toast {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%) translateY(6px) scale(0.92);
  padding: 4px 12px 5px;
  font-size: 12px;
  font-weight: 800;
  color: var(--comic-ink);
  white-space: nowrap;
  background: #fff;
  border: 2.5px solid var(--comic-ink);
  border-radius: 4px;
  box-shadow: 2px 2px 0 var(--comic-ink);
  pointer-events: none;
  opacity: 0;
  z-index: 2;
}
.quiz-streak-toast.is-show {
  animation: quiz-streak-toast-in 1.35s ease forwards;
}
.quiz-streak-toast.hidden:not(.is-show) {
  display: none;
}
@keyframes quiz-streak-bump {
  0% { transform: scale(1); }
  35% { transform: scale(1.08) rotate(-1deg); }
  70% { transform: scale(0.98) rotate(0.5deg); }
  100% { transform: scale(1) rotate(0deg); }
}
@keyframes quiz-streak-glow {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.08); }
}
@keyframes quiz-streak-toast-in {
  0% { opacity: 0; transform: translateX(-50%) translateY(10px) scale(0.88); }
  18% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1.04); }
  72% { opacity: 1; transform: translateX(-50%) translateY(-2px) scale(1); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-8px) scale(0.96); }
}
#screen-quiz-result .quiz-result-card.result-card,
.challenge-result-card.quiz-result-card.result-card,
.battle-overlay-card.result-card,
.comic-card-shell .quiz-result-card.result-card {
  width: 100%;
  min-width: min(var(--card-min-sm), 100%);
  max-width: min(var(--card-max-md), 100%);
  box-sizing: border-box;
  background: linear-gradient(165deg, #ffb347 0%, #ff9500 45%, #ea580c 100%);
  border: 4px solid var(--comic-ink);
  border-radius: 6px;
  box-shadow: var(--comic-shadow-lg);
  color: #fff;
  position: relative;
  isolation: isolate;
  overflow: visible;
}
#screen-quiz-result .quiz-result-card.result-card {
  background: var(--quiz-card-gradient);
}
#screen-quiz-result .quiz-result-card h2,
.challenge-result-card.quiz-result-card h2,
.battle-overlay-card.result-card h2 {
  font-family: "Bangers", "PingFang SC", sans-serif;
  font-size: 28px;
  letter-spacing: 0.06em;
  color: #fff;
  text-shadow: 3px 3px 0 var(--comic-ink);
}
.quiz-result-summary {
  font-size: 15px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
}
.quiz-result-summary strong {
  color: #fff566;
  font-size: 22px;
  text-shadow: 2px 2px 0 var(--comic-ink);
}
#screen-quiz-result .result-comment,
.challenge-result-card.quiz-result-card .result-comment,
.battle-overlay-card .result-comment {
  color: rgba(255, 255, 255, 0.88);
  font-weight: 600;
}
#screen-quiz-result .btn-primary,
.battle-overlay-card .btn-primary,
.challenge-result-actions .btn-primary,
.comic-action-btn--primary {
  background: var(--comic-yellow);
  color: var(--comic-ink);
  border: 3px solid var(--comic-ink);
  box-shadow: var(--comic-shadow-sm);
  font-weight: 800;
}
#screen-quiz-result .btn-secondary,
.battle-overlay-card .btn-secondary,
.challenge-result-actions .btn-secondary,
.comic-action-btn--secondary {
  background: linear-gradient(180deg, #fff 0%, #fff7ed 100%);
  color: var(--comic-ink);
  border: 2.5px solid var(--comic-ink);
  box-shadow: 3px 3px 0 var(--comic-ink);
  font-weight: 700;
}
#screen-quiz-result .btn-primary:active,
#screen-quiz-result .btn-secondary:active,
.battle-overlay-card .btn-primary:active,
.battle-overlay-card .btn-secondary:active,
.challenge-result-actions .btn-primary:active,
.challenge-result-actions .btn-secondary:active,
.comic-action-btn:active:not(:disabled) {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--comic-ink);
  opacity: 1;
}

@media (max-width: 640px) {
  .options { grid-template-columns: 1fr; }
  .question-text { font-size: 16px; }
  .quiz-card--comic { padding: 18px 14px 14px; }
  .hero--comic h1,
  .hero--comic .hero-title {
    font-size: 30px;
    -webkit-text-stroke-width: 2.5px;
    letter-spacing: 0.04em;
  }
  .hero-panel {
    max-width: 260px;
    padding: 16px 22px 14px 16px;
  }
  #screen-home .home-intro .hero-panel {
    width: 100%;
    max-width: 100%;
  }
  .hero-panel::after {
    width: 360%;
    height: 360%;
  }
  .hero-panel .ball-icon {
    font-size: 32px;
    top: 11px;
    right: 6px;
    left: auto;
  }
}

/* 射门全屏 — 沿用原球场背景图 */
.screen-shoot {
  padding: 0 !important;
  position: relative;
  min-height: 100dvh;
  min-height: 100vh;
  background: var(--bg-image-default) center center / cover no-repeat;
}
#goal-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
  touch-action: none;
  cursor: crosshair;
  display: block;
  z-index: 1;
}
.shoot-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
  z-index: 5;
}
.shoot-header {
  position: relative;
  z-index: 6;
  padding: max(12px, env(safe-area-inset-top, 0px)) 20px 12px;
  margin: 0;
  pointer-events: auto;
}
.screen-shoot .btn-back {
  background: #fff;
  border: 2.5px solid var(--comic-ink);
  color: var(--comic-ink);
  font-weight: 800;
  border-radius: 4px;
  box-shadow: 2px 2px 0 var(--comic-ink);
  backdrop-filter: none;
}
.screen-shoot .round-badge,
.screen-shoot .score-badge {
  font-weight: 800;
  font-size: 12px;
  color: var(--comic-ink);
  background: var(--comic-peach-deep);
  border: 2.5px solid var(--comic-ink);
  border-radius: 4px;
  box-shadow: 2px 2px 0 var(--comic-ink);
  backdrop-filter: none;
}
.screen-shoot .score-badge {
  background: linear-gradient(180deg, #fff566, #ffe600);
}
.shoot-timer-wrap {
  position: absolute;
  left: 50%;
  top: calc(max(12px, env(safe-area-inset-top, 0px)) + 58px);
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 4;
}
.shoot-timer {
  display: block;
  line-height: 1;
  background: none;
  border: none;
  box-shadow: none;
  padding: 0;
}
.shoot-timer-value {
  display: block;
  font-size: 36px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.78);
  text-shadow:
    0 1px 4px rgba(0, 0, 0, 0.55),
    0 2px 10px rgba(0, 0, 0, 0.35);
}
.shoot-timer.urgent .shoot-timer-value {
  color: rgba(255, 245, 120, 0.92);
  animation: shoot-timer-urgent 0.65s ease-in-out infinite alternate;
  text-shadow:
    0 1px 4px rgba(0, 0, 0, 0.5),
    0 0 16px rgba(255, 235, 59, 0.45);
}
.shoot-timer.hidden {
  opacity: 0;
  visibility: hidden;
}
@keyframes shoot-timer-urgent {
  from {
    transform: scale(1);
    filter: brightness(1);
  }
  to {
    transform: scale(1.06);
    filter: brightness(1.15);
  }
}
.shoot-controls {
  padding: 12px 20px max(20px, env(safe-area-inset-bottom, 0px));
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.28) 42%, transparent 100%);
}
.shoot-hint {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  text-align: center;
  line-height: 1.45;
  text-shadow:
    0 1px 3px rgba(0, 0, 0, 0.95),
    0 2px 10px rgba(0, 0, 0, 0.75);
  max-width: min(var(--card-max-md), 100%);
}
.shoot-hint.shoot-hint-warn {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
}
.shoot-center-panel {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 20px;
  box-sizing: border-box;
  pointer-events: none;
}
.shoot-center-panel:not(.hidden) {
  pointer-events: auto;
}
.shoot-center-panel.hidden {
  display: none;
}
.shoot-center-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  max-width: min(92vw, 520px);
  margin: 0 auto;
}
.shoot-result-text {
  margin: 0;
  width: 100%;
  font-family: "Bangers", "Arial Black", "PingFang SC", sans-serif;
  font-size: clamp(32px, 7.5vw, 52px);
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
  color: #fff;
  text-shadow:
    -2px -2px 0 #101010,
    2px -2px 0 #101010,
    -2px 2px 0 #101010,
    2px 2px 0 #101010,
    0 4px 12px rgba(0, 0, 0, 0.45);
}
.shoot-result-text--goal {
  color: #facc15;
}
.shoot-result-text--saved {
  color: #fff;
}
.shoot-result-text--miss {
  color: #fdba74;
}
.shoot-center-panel .shoot-next-btn {
  width: auto;
  min-width: 0;
  max-width: none;
  margin: 0;
  padding: 10px 24px;
  font-size: 15px;
  pointer-events: auto;
  align-self: center;
  transform: translate(-1.5px, -1.5px);
}
.shoot-center-panel .shoot-next-btn:active:not(:disabled) {
  transform: translate(0.5px, 0.5px);
}
.shoot-buttons {
  display: flex;
  gap: 16px;
  width: 100%;
  max-width: 360px;
}
.shoot-btn {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
  backdrop-filter: blur(4px);
}
.shoot-btn.left { background: rgba(26,58,122,0.85); }
.shoot-btn.right { background: rgba(122,26,26,0.85); }
.shoot-btn:active { opacity: 0.8; }
.shoot-next-btn {
  margin-top: 4px;
}
.shoot-next-btn.hidden { display: none; }

/* 点球挑战 · 结果页（漫画风，与问答结果一致） */
#screen-challenge-result {
  align-items: center;
  justify-content: center;
  padding: 16px;
  background:
    linear-gradient(to bottom, rgba(15, 31, 20, 0.26), rgba(15, 31, 20, 0.4)),
    var(--bg-image-home) center center / cover no-repeat;
}
#screen-challenge-result .challenge-result-card {
  margin: 0 auto;
  flex-shrink: 0;
}
.challenge-result-card.quiz-result-card {
  max-width: min(var(--card-max-sm), 100%);
  width: 100%;
  min-width: min(var(--card-min-sm), 100%);
  padding: 28px 24px 22px;
  gap: 10px;
  box-sizing: border-box;
}
.challenge-result-card.quiz-result-card .challenge-result-icon {
  font-size: 56px;
  line-height: 1;
  margin: 0;
  filter: drop-shadow(3px 3px 0 var(--comic-ink));
}
.challenge-result-card.score-5 h2 {
  color: #fff566;
}
.challenge-result-score-block {
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  border-radius: 0;
}
.challenge-result-score-label {
  display: none;
}
.challenge-result-score {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.4;
}
.challenge-result-score strong {
  font-family: "Bangers", sans-serif;
  font-size: 28px;
  font-weight: 400;
  color: #fff566;
  text-shadow: 2px 2px 0 var(--comic-ink);
  letter-spacing: 0.04em;
}
.challenge-result-score-total {
  font-size: 18px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.75);
}
.challenge-result-comment {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 600;
  margin: 0;
  padding: 0;
  max-width: 320px;
}
.challenge-result-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-top: 6px;
}
.challenge-result-actions .comic-action-btn,
.challenge-result-actions .btn-primary,
.challenge-result-actions .btn-secondary {
  width: 100%;
  max-width: none;
}

/* 结果页（通用 legacy） */
#screen-quiz-result {
  align-items: center;
  justify-content: center;
}
.result-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  padding: 32px 40px;
  background: var(--card);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
  width: 100%;
  min-width: min(var(--card-min-sm), 100%);
  max-width: min(var(--card-max-lg), 100%);
  box-sizing: border-box;
}
.result-icon { font-size: 56px; }
.result-card h2 { font-size: 24px; color: var(--gold); }
.result-score { font-size: 18px; }
.result-score strong { font-size: 32px; color: var(--gold); }
.result-comment {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 360px;
  margin: 8px 0 16px;
}

.btn-primary, .btn-secondary {
  width: 100%;
  max-width: 280px;
  padding: 14px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  margin-top: 8px;
}
.btn-primary { background: var(--green); color: #fff; }
.btn-secondary { background: transparent; color: var(--text-muted); border: 1px solid rgba(255,255,255,0.2); }
.btn-primary:active, .btn-secondary:active { opacity: 0.85; }

/* 弹窗 */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
  box-sizing: border-box;
}
.modal.hidden { display: none; }
.modal > .comic-card-shell,
.modal > .modal-content {
  width: 100%;
  flex-shrink: 0;
  box-sizing: border-box;
}
.modal > .modal-battle-stack {
  width: min(var(--card-max-md), 100%);
  max-width: min(var(--card-max-md), 100%);
  margin-inline: auto;
  flex-shrink: 0;
  box-sizing: border-box;
}
.modal > .comic-card-shell {
  max-width: min(var(--card-max-md), 100%);
  margin: auto;
}
.modal-content {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  max-width: min(var(--card-max-reset), 100%);
  width: 100%;
  text-align: center;
  backdrop-filter: blur(8px);
  box-sizing: border-box;
}
.modal-content p { font-size: 15px; line-height: 1.6; margin-bottom: 20px; }
.modal-buttons { display: flex; flex-direction: column; gap: 8px; }

.team-customize-modal {
  max-width: min(var(--card-max-sm), 100%);
  text-align: left;
}
.team-customize-modal .modal-buttons { margin-top: 4px; }
.team-customize-title {
  font-size: 20px;
  color: var(--gold);
  text-align: center;
  margin-bottom: 6px;
}
.team-customize-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 14px;
  text-align: center;
}
.team-custom-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin: 10px 0 6px;
}
.team-custom-name-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.team-custom-input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  font-size: 15px;
  font-family: inherit;
}
.team-custom-mini {
  max-width: 72px;
  margin-top: 0;
  padding: 10px 8px;
  flex-shrink: 0;
}
.team-custom-preview-wrap {
  display: flex;
  justify-content: center;
  margin: 12px 0 4px;
}
#team-custom-preview {
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.15);
  background: #ffffff;
}
.team-custom-patterns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.team-pattern-btn {
  padding: 10px 6px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.team-pattern-btn.active {
  color: #fff;
  border-color: rgba(34, 197, 94, 0.65);
  background: rgba(34, 197, 94, 0.22);
}
.team-custom-colors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}
.team-color-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}
.team-color-field input[type="color"] {
  width: 100%;
  height: 40px;
  padding: 2px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
  cursor: pointer;
}
.team-color-field.hidden { display: none; }
.team-custom-colors--solid {
  grid-template-columns: 1fr;
  max-width: 160px;
}
.team-custom-random-kit {
  max-width: none;
  margin-top: 12px;
  margin-bottom: 4px;
}
.team-customize-actions .btn-primary,
.team-customize-actions .btn-secondary {
  max-width: none;
}

@keyframes pop {
  0% { transform: scale(0.8); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.result-card { animation: pop 0.3s ease; }
.challenge-result-card { animation: challenge-result-pop 0.45s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes challenge-result-pop {
  0% { transform: scale(0.88) translateY(12px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

@media (max-width: 640px) {
  .options { grid-template-columns: 1fr; }
}

/* ===== 对战入口 · 沿用问答漫画组件 ===== */
.battle-screen--comic {
  justify-content: center;
  align-items: center;
  padding: 12px 24px 16px;
  overflow-y: auto;
  gap: 0;
}
.battle-screen-stack {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  width: 100%;
  max-width: min(var(--card-max-md), 100%);
  margin: auto;
  flex-shrink: 0;
  box-sizing: border-box;
}
.battle-screen-stack--wide {
  max-width: min(var(--card-max-lg), 100%);
}
.battle-screen-stack .screen-header {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
}
.battle-screen-stack .comic-card-shell--battle,
.battle-screen-stack .comic-card-shell--battle-wide,
.battle-screen-stack .comic-card-shell--overlay {
  margin: 0;
  width: 100%;
}
/* 二级弹窗打开时隐藏底层卡片，避免边框重叠 */
.battle-screen--comic.battle-submodal-open > .battle-screen-stack {
  visibility: hidden;
  pointer-events: none;
}
#screen-campaign-map.battle-screen--comic {
  overflow-y: auto;
}
.battle-setup-card.quiz-card--comic,
.campaign-map-card.quiz-card--comic,
.modal--battle-comic .battle-modal-card {
  max-width: none;
  max-height: calc(100dvh - 88px);
  padding: 18px 18px 16px;
}
.comic-card-shell .battle-setup-card.quiz-card--comic,
.comic-card-shell .campaign-map-card.quiz-card--comic,
.comic-card-shell .local-setup-card.quiz-card--comic,
.modal--battle-comic .comic-card-shell .battle-modal-card {
  width: 100%;
}
.battle-setup-card.quiz-card--comic::before,
.battle-setup-card.quiz-card--comic::after,
.campaign-map-card.quiz-card--comic::before,
.campaign-map-card.quiz-card--comic::after,
.modal--battle-comic .battle-modal-card::before,
.modal--battle-comic .battle-modal-card::after {
  display: none;
}
.local-setup-card.quiz-card--comic {
  max-width: none;
}
#screen-quiz-result .comic-card-shell--quiz {
  margin-inline: auto;
}
.modal--battle-comic .comic-card-shell {
  max-width: 100%;
  min-width: 0;
  width: 100%;
  margin-inline: auto;
}
.battle-card-title {
  margin: 0 0 10px;
  font-family: "Bangers", "Arial Black", "PingFang SC", sans-serif;
  font-size: 26px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--comic-ink);
  line-height: 1.1;
  text-align: left;
}
.battle-card-desc,
.battle-card-hint,
.battle-card-meta {
  margin: 0;
  padding: 0;
  border: none;
  box-shadow: none;
  background: none;
  text-align: left;
  line-height: 1.55;
}
.battle-card-desc {
  font-size: 14px;
  font-weight: 700;
  color: rgba(16, 16, 16, 0.9);
  margin-bottom: 6px;
}
.challenge-intro-card.quiz-card--comic {
  background: var(--challenge-grass-panel);
}
.challenge-intro-card.quiz-card--comic::after {
  background-image: radial-gradient(circle, rgba(20, 110, 35, 0.12) 1px, transparent 1px);
  opacity: 0.72;
}
.challenge-intro-card .battle-card-title {
  color: var(--comic-ink);
}
.challenge-intro-lead {
  margin-bottom: 4px;
  color: rgba(16, 16, 16, 0.72);
}
.challenge-intro-block {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(16, 16, 16, 0.12);
}
.challenge-intro-block:first-of-type {
  margin-top: 12px;
}
.challenge-intro-label {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--comic-ink);
}
.challenge-intro-controls {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.55;
  color: rgba(16, 16, 16, 0.72);
}
.challenge-intro-rules {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.55;
  color: var(--comic-ink);
  text-align: left;
}
.challenge-intro-rules li {
  position: relative;
  padding-left: 0.95em;
}
.challenge-intro-rules li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: rgba(16, 16, 16, 0.45);
  font-weight: 900;
}
.challenge-intro-rules li + li {
  margin-top: 8px;
}
.challenge-intro-rules strong {
  font-weight: 800;
  color: var(--comic-ink);
}
.challenge-intro-actions.battle-overlay-actions,
.challenge-intro-actions.battle-actions {
  display: flex;
  justify-content: center;
  width: auto;
  margin-top: 18px;
}
.challenge-intro-actions.battle-overlay-actions .comic-action-btn,
.challenge-intro-actions.battle-actions .comic-action-btn,
#screen-challenge-setup .challenge-intro-actions .comic-action-btn {
  width: auto;
  max-width: none;
  min-width: min(220px, 100%);
  padding-inline: 22px;
}
#screen-challenge-setup .comic-action-btn--primary {
  background: linear-gradient(180deg, #fff 0%, #f5f5f5 100%);
  color: var(--comic-ink);
  border-color: var(--comic-ink);
  box-shadow: var(--comic-shadow-sm);
}
#screen-challenge-setup .comic-action-btn--primary:hover {
  background: linear-gradient(180deg, #fff 0%, #fff7ed 100%);
}
#screen-challenge-setup .comic-action-btn--primary:active {
  box-shadow: 2px 2px 0 var(--comic-ink);
}

.master-egg-card.quiz-card--comic {
  background: linear-gradient(165deg, #fffbeb 0%, #fef3c7 52%, #fde68a 100%);
  text-align: center;
  padding: 20px 20px 22px;
}
.master-egg-card.quiz-card--comic::after {
  background-image: radial-gradient(circle, rgba(180, 83, 9, 0.07) 1px, transparent 1px);
  opacity: 0.6;
}
.master-egg-card .battle-card-title,
.master-egg-card .battle-card-desc,
.master-egg-lead,
.master-egg-quote {
  text-align: center;
}
.master-egg-card .battle-card-title {
  margin: 0 0 14px;
  font-weight: 800;
  color: #92400e;
  line-height: 1.25;
}
.master-egg-icon {
  position: absolute;
  top: 10px;
  left: 12px;
  z-index: 2;
  margin: 0;
  font-size: 44px;
  line-height: 1;
  filter: drop-shadow(2px 2px 0 rgba(16, 16, 16, 0.2));
  pointer-events: none;
}
.master-egg-lead {
  color: var(--comic-ink);
  line-height: 1.65;
}
.master-egg-quote {
  margin: 16px auto 0;
  max-width: 18em;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.65;
  color: var(--comic-ink);
}
.master-egg-actions.battle-overlay-actions {
  display: flex;
  justify-content: center;
  width: auto;
  margin-top: 24px;
}
.master-egg-actions.battle-overlay-actions .comic-action-btn,
#modal-master-egg .master-egg-actions .comic-action-btn {
  width: auto;
  max-width: none;
  min-width: min(160px, 100%);
  padding-inline: 24px;
}
.battle-card-meta {
  font-size: 13px;
  font-weight: 800;
  color: var(--comic-rust);
  margin-bottom: 10px;
}
.battle-card-hint {
  font-size: 12px;
  font-weight: 600;
  color: rgba(16, 16, 16, 0.55);
  margin-top: 10px;
}
.battle-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin-top: 4px;
}
.battle-actions .comic-action-btn,
.battle-overlay-actions .comic-action-btn,
.modal--battle-comic .comic-action-btn {
  width: 100%;
  max-width: none;
}
.campaign-map-actions {
  width: 100%;
  margin-top: 2px;
  display: flex;
  justify-content: center;
}
.campaign-map-actions .comic-action-btn {
  width: auto;
  max-width: 100%;
}
.battle-mode-btn.hidden { display: none; }
.battle-mode-btn.coming-soon {
  opacity: 0.55;
  cursor: not-allowed;
}
.battle-mode-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--comic-ink);
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(253, 224, 71, 0.85);
}
.road-trophy-badge {
  margin: 0 0 10px;
  padding: 0;
  font-weight: 800;
  font-size: 14px;
  color: var(--comic-rust);
  background: none;
  border: none;
  box-shadow: none;
  text-align: left;
}
.road-trophy-badge.hidden { display: none; }
.road-stage-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}
.ai-difficulty-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 14px 0 4px;
  width: 100%;
  min-width: min(var(--card-min-sm), 100%);
}
.ai-difficulty-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 4px;
  border: 2.5px solid var(--comic-ink);
  background: linear-gradient(180deg, #fff 0%, #fff7ed 100%);
  color: var(--comic-ink);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  box-shadow: 3px 3px 0 var(--comic-ink);
  transition: transform 0.1s, box-shadow 0.1s;
}
.ai-difficulty-btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--comic-ink);
}
.ai-difficulty-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--comic-ink);
}
.ai-difficulty-btn--peak {
  background: linear-gradient(135deg, #fff566 0%, #fb923c 100%);
  border-width: 3px;
}
.ai-difficulty-name {
  font-family: "Bangers", "Arial Black", "PingFang SC", sans-serif;
  font-size: 18px;
  letter-spacing: 0.04em;
  line-height: 1.1;
}
.ai-difficulty-desc {
  font-size: 12px;
  font-weight: 600;
  color: rgba(16, 16, 16, 0.72);
  line-height: 1.45;
}
.ai-difficulty-btn--peak .ai-difficulty-desc {
  color: rgba(16, 16, 16, 0.82);
  font-weight: 700;
}

.road-stage-btn {
  display: grid;
  grid-template-columns: 36px 56px 1fr auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 4px;
  border: 2.5px solid var(--comic-ink);
  background: linear-gradient(180deg, #fff 0%, #fff7ed 100%);
  color: var(--comic-ink);
  text-align: left;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s;
  box-shadow: 3px 3px 0 var(--comic-ink);
  font-family: inherit;
  font-weight: 800;
}
.road-stage-btn:hover:not(:disabled) {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--comic-ink);
}
.road-stage-btn:active:not(:disabled) {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--comic-ink);
}
.road-stage-btn.current {
  background: var(--comic-yellow);
  border-width: 3px;
}
.road-stage-btn.cleared:not(.locked) {
  background: linear-gradient(180deg, #ecfdf5 0%, #d1fae5 100%);
}
.road-stage-btn.locked {
  opacity: 0.55;
  cursor: not-allowed;
  border-style: dashed;
  background: linear-gradient(180deg, #fff 0%, #fff7ed 100%);
  box-shadow: 2px 2px 0 var(--comic-ink);
}
.road-stage-btn.locked:hover {
  transform: none;
  box-shadow: 2px 2px 0 var(--comic-ink);
}
.road-stage-emoji { font-size: 22px; text-align: center; line-height: 1; }
.road-stage-round { font-size: 11px; color: var(--comic-rust); font-weight: 700; }
.road-stage-name { font-size: 14px; font-weight: 800; }
.road-stage-status {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.65);
  color: var(--comic-ink);
}
.road-stage-status.status-current { background: #fff; font-weight: 800; }
.road-restart-btn.hidden { display: none; }

.local-team-panels {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 10px 8px;
  width: 100%;
  margin: 4px 0 10px;
}
.local-team-panel {
  padding: 0;
  border: none;
  box-shadow: none;
  background: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}
.local-team-kit {
  display: block;
  border-radius: 50%;
  border: 2.5px solid var(--comic-ink);
  background: #fff;
  box-shadow: 2px 2px 0 var(--comic-ink);
}
.local-team-label {
  font-size: 12px;
  font-weight: 800;
  color: var(--comic-rust);
  margin: 0;
  letter-spacing: 0.04em;
}
.local-team-vs {
  align-self: center;
  margin-top: 28px;
  font-family: "Bangers", "Arial Black", sans-serif;
  font-size: 22px;
  font-weight: 400;
  color: rgba(16, 16, 16, 0.35);
  letter-spacing: 0.08em;
}
.local-team-panel .comic-action-btn {
  width: 100%;
  max-width: none;
  margin-top: 2px;
}
.local-team-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--comic-ink);
  margin: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.local-setup-card .battle-card-desc {
  margin-bottom: 2px;
  text-align: center;
}
.local-setup-block {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(16, 16, 16, 0.12);
  width: 100%;
}
.local-setup-label {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--comic-ink);
  text-align: left;
}
.local-setup-list {
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: left;
}
.local-setup-list li {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  color: rgba(16, 16, 16, 0.78);
}
.local-setup-list li + li {
  margin-top: 6px;
}
.local-setup-list strong {
  display: inline-block;
  min-width: 2em;
  color: var(--comic-ink);
}
.local-setup-note {
  margin: 10px 0 0;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
  color: rgba(16, 16, 16, 0.5);
  text-align: center;
}
.local-setup-card .battle-actions {
  margin-top: 0;
}

/* 对战弹层 · 问答结果卡风格 */
.battle-overlay-card .result-icon {
  font-size: 44px;
  margin-bottom: 2px;
}
.battle-overlay-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  width: 100%;
  margin-top: 8px;
}
.battle-overlay-actions .comic-action-btn {
  width: 100%;
  max-width: none;
  margin: 0;
  box-sizing: border-box;
}
#battle-result-actions-ai,
#battle-result-actions-road {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  width: 100%;
}
#battle-result-actions-ai.hidden,
#battle-result-actions-road.hidden {
  display: none !important;
}
.battle-result-sub.hidden { display: none; }

/* 对战模式比赛内弹窗 — 标题 / 说明 / 倒计时等正文黑色 */
.battle-pause-overlay .battle-overlay-card.result-card,
.battle-phase-overlay .battle-overlay-card.result-card,
.battle-result-overlay .battle-overlay-card.result-card,
#screen-campaign-champion .campaign-champion-card.quiz-result-card {
  color: #111;
}
.battle-pause-overlay .battle-overlay-card.result-card h2,
.battle-phase-overlay .battle-overlay-card.result-card h2,
.battle-result-overlay .battle-overlay-card.result-card h2,
#screen-campaign-champion .campaign-champion-card.quiz-result-card h2 {
  color: #111;
  text-shadow: 2px 2px 0 rgba(255, 255, 255, 0.35);
}
.battle-pause-overlay .quiz-result-summary,
.battle-phase-overlay .quiz-result-summary,
.battle-result-overlay .quiz-result-summary,
#screen-campaign-champion .campaign-champion-card .result-comment {
  color: rgba(0, 0, 0, 0.88);
}
.battle-pause-overlay .quiz-result-summary strong,
.battle-phase-overlay .quiz-result-summary strong,
.battle-result-overlay .quiz-result-summary strong {
  color: #111;
  text-shadow: none;
}
.battle-pause-overlay .result-comment,
.battle-phase-overlay .result-comment,
.battle-result-overlay .result-comment {
  color: rgba(0, 0, 0, 0.85);
}
.battle-phase-overlay .battle-phase-countdown {
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
.battle-phase-overlay .battle-penalty-rules {
  color: rgba(0, 0, 0, 0.85);
}

.battle-phase-countdown {
  margin: 10px 0 0;
  font-family: "Bangers", sans-serif;
  font-size: 40px;
  font-weight: 400;
  color: #fff;
  line-height: 1;
  letter-spacing: 0.04em;
}

/* 半场 / 加时 / 点球入场 — 紧凑提示卡 */
.comic-card-shell--phase-popup {
  max-width: min(var(--phase-popup-max), 100%);
  min-width: min(var(--phase-popup-min), 100%);
}
.comic-card-shell--phase-popup .comic-sticker {
  font-size: 10px;
  padding: 2px 6px 3px;
  right: 6px;
  transform: translateY(-50%) rotate(6deg);
}
.comic-card-shell--phase-popup .battle-overlay-card.result-card {
  max-width: none;
  padding: 14px 16px 12px;
  gap: 4px;
  border-width: 3px;
  box-shadow: 4px 4px 0 var(--comic-ink);
}
.comic-card-shell--phase-popup .battle-overlay-card.result-card h2 {
  font-size: 20px;
  color: #111;
  text-shadow: 2px 2px 0 rgba(255, 255, 255, 0.35);
}
.comic-card-shell--phase-popup .quiz-result-summary {
  font-size: 11px;
  line-height: 1.35;
  color: rgba(0, 0, 0, 0.88);
}
.comic-card-shell--phase-popup .battle-phase-countdown {
  margin-top: 2px;
  font-size: 28px;
}

/* 对战模态框 */
.modal--road-reset {
  background: transparent;
  pointer-events: none;
  padding: 12px 14px;
}
.modal--road-reset:not(.hidden) .comic-card-shell,
.modal--road-reset:not(.hidden) .battle-modal-card {
  pointer-events: auto;
}
.modal--road-reset .comic-card-shell {
  margin: auto;
}
.modal--road-reset .battle-modal-card {
  text-align: center;
}
.modal--road-reset .battle-card-title {
  text-align: center;
  margin-bottom: 8px;
}
.modal--road-reset .battle-card-desc {
  text-align: center;
  line-height: 1.5;
  margin-bottom: 4px;
}
.modal--road-reset .battle-overlay-actions {
  align-items: center;
  margin-top: 12px;
}
.modal--road-reset .battle-overlay-actions .comic-action-btn {
  width: auto;
  min-width: min(160px, 100%);
  max-width: 100%;
  padding-inline: 20px;
}

.modal--battle-comic {
  background: rgba(0, 0, 0, 0.72);
  align-items: center;
  justify-content: center;
  padding: 12px 14px 20px;
  overflow-y: auto;
}
.modal-battle-stack {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  width: min(var(--card-max-md), 100%);
  max-width: min(var(--card-max-md), 100%);
  min-width: 0;
  margin-inline: auto;
  flex-shrink: 0;
  box-sizing: border-box;
}
.modal-battle-stack .comic-card-shell--battle,
.modal-battle-stack .comic-card-shell--battle-wide,
.modal-battle-stack .comic-card-shell--overlay {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-inline: auto;
}
.modal-battle-header {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-bottom: 0;
  padding: 0 2px;
  justify-content: flex-start;
  box-sizing: border-box;
  align-self: stretch;
}
.modal-battle-header .btn-back,
.modal--battle-comic .modal-battle-header .btn-back {
  background: #fff;
  border: 2.5px solid var(--comic-ink);
  color: var(--comic-ink);
  font-weight: 800;
  border-radius: 4px;
  box-shadow: 2px 2px 0 var(--comic-ink);
  backdrop-filter: none;
}
.modal--battle-comic .battle-modal-card {
  width: 100%;
  overflow-y: auto;
  text-align: left;
}
.modal--battle-comic .battle-modal-card.master-egg-card {
  text-align: center;
}
.modal--battle-comic .team-customize-desc {
  margin-bottom: 8px;
}
.modal--battle-comic .team-custom-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: rgba(16, 16, 16, 0.55);
  margin: 12px 0 6px;
}
.modal--battle-comic .team-custom-input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 4px;
  border: 2.5px solid var(--comic-ink);
  background: #fff;
  color: var(--comic-ink);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  box-shadow: 2px 2px 0 var(--comic-ink);
}
.modal--battle-comic .team-custom-name-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.modal--battle-comic .team-custom-mini {
  width: auto;
  max-width: 72px;
  flex-shrink: 0;
}
.modal--battle-comic .team-custom-random-kit {
  width: 100%;
  max-width: none;
  margin-top: 12px;
  margin-bottom: 4px;
}
.modal--battle-comic .team-customize-actions {
  margin-top: 14px;
  align-items: stretch;
}
.modal--battle-comic .team-customize-actions .comic-action-btn {
  width: 100%;
  max-width: none;
}
.modal--battle-comic .team-custom-preview-wrap {
  display: flex;
  justify-content: center;
  margin: 14px 0 6px;
}
.modal--battle-comic #team-custom-preview {
  border-radius: 50%;
  border: 2.5px solid var(--comic-ink);
  background: #ffffff;
  box-shadow: 2px 2px 0 var(--comic-ink);
}
.modal--battle-comic .team-custom-patterns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.modal--battle-comic .team-pattern-btn {
  padding: 10px 6px;
  border-radius: 4px;
  border: 2.5px solid var(--comic-ink);
  background: linear-gradient(180deg, #fff 0%, #fff7ed 100%);
  color: var(--comic-ink);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 2px 2px 0 var(--comic-ink);
  transition: transform 0.1s, box-shadow 0.1s;
}
.modal--battle-comic .team-pattern-btn.active {
  background: var(--comic-yellow);
}
.modal--battle-comic .team-pattern-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 var(--comic-ink);
}
.modal--battle-comic .team-custom-colors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}
.modal--battle-comic .team-custom-colors--solid {
  grid-template-columns: 1fr;
  max-width: 140px;
}
.modal--battle-comic .team-color-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(16, 16, 16, 0.55);
}
.modal--battle-comic .team-color-field input[type="color"] {
  width: 100%;
  height: 40px;
  padding: 2px;
  border: 2px solid var(--comic-ink);
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
}
.modal--battle-comic .team-color-field.hidden {
  display: none;
}
.modal--battle-comic .team-custom-random-kit {
  margin-top: 12px;
}
.modal--battle-comic .team-customize-actions {
  margin-top: 14px;
}

#screen-campaign-champion {
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.campaign-champion-card.quiz-result-card {
  max-width: min(var(--card-max-md), 100%);
  width: 100%;
  text-align: center;
  box-sizing: border-box;
}
.campaign-champion-card .battle-overlay-actions {
  margin-top: 8px;
}
.campaign-champion-card .battle-overlay-actions .comic-action-btn {
  width: 100%;
  max-width: none;
}
.campaign-trophy {
  font-size: 72px;
  animation: bounce 2s ease infinite;
}

/* ===== 足球对战 ===== */
#screen-battle-game.screen-battle {
  padding: 0 !important;
  position: relative;
  background: #357048;
  --battle-controls-z: 42;
  --battle-controls-touch-z: 43;
}
#battle-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  outline: none;
}
.battle-hud {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
/* 底部操作区高于顶栏/点球 HUD，盖在边栏字幕之上 */
.battle-hud-bottom:not(.hidden),
.battle-hud-local2p:not(.hidden),
.battle-penalty-pick-hud:not(.hidden) {
  position: relative;
  z-index: var(--battle-controls-z);
}
#screen-battle-game .battle-hud-bottom .joystick-wrap,
#screen-battle-game .battle-hud-bottom .battle-single-controls,
#screen-battle-game .battle-hud-bottom .battle-player-inputs,
#screen-battle-game .battle-hud-bottom .battle-dir-pad,
#screen-battle-game .battle-hud-bottom .action-bar,
#screen-battle-game .battle-hud-local2p .battle-side-controls,
#screen-battle-game .battle-hud-local2p .battle-player-inputs,
#screen-battle-game .battle-hud-local2p .battle-dir-pad,
#screen-battle-game .battle-hud-local2p .action-bar,
#screen-battle-game .battle-penalty-pick-hud .battle-player-inputs,
#screen-battle-game .battle-penalty-pick-hud .battle-dir-pad,
#screen-battle-game .battle-penalty-pick-hud .action-bar {
  position: relative;
  z-index: var(--battle-controls-z);
}
.battle-hud-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.55), transparent);
  font-size: 13px;
  pointer-events: auto;
}
.battle-back {
  flex: 0 0 auto;
  min-width: 48px;
  min-height: 48px;
  padding: 8px 12px !important;
}
.battle-hud-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  justify-self: start;
  grid-column: 1;
}
.battle-pause,
.battle-home {
  min-width: 48px;
  min-height: 48px;
  padding: 8px 12px !important;
  font-size: 15px;
  line-height: 1;
}
.battle-pause {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.battle-pause-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.battle-pause-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}
.battle-pause-icon .battle-pause-icon-pause {
  display: block;
}
.battle-pause-icon .battle-pause-icon-play {
  display: none;
}
.battle-pause.is-paused .battle-pause-icon .battle-pause-icon-pause {
  display: none;
}
.battle-pause.is-paused .battle-pause-icon .battle-pause-icon-play {
  display: block;
}
.battle-home {
  font-size: 18px;
}
#screen-battle-game .battle-hud-nav .btn-back {
  background: rgba(0, 0, 0, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.92);
  font-weight: 600;
  font-size: 17px;
  border-radius: 10px;
  box-shadow: none;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.15s, border-color 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
#screen-battle-game .battle-hud-nav .btn-back:hover {
  background: rgba(0, 0, 0, 0.48);
  border-color: rgba(255, 255, 255, 0.28);
}
#screen-battle-game .battle-hud-nav .btn-back:active {
  background: rgba(0, 0, 0, 0.55);
}
#screen-battle-game .battle-hud-nav .battle-pause,
#screen-battle-game .battle-hud-nav .battle-home {
  border-radius: 10px;
  box-sizing: border-box;
}
#screen-battle-game .battle-pause.is-paused {
  background: rgba(250, 204, 21, 0.88);
  color: #1a1a1a;
  border-color: rgba(0, 0, 0, 0.12);
}
#screen-battle-game .battle-hud-time,
#screen-battle-game .battle-hud-phase {
  background: rgba(0, 0, 0, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: 3px 8px;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 700;
  font-size: 12px;
  box-shadow: none;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
#screen-battle-game .battle-hud-phase {
  color: #fde68a;
  background: rgba(0, 0, 0, 0.42);
}
.battle-pause-overlay {
  position: absolute;
  inset: 0;
  z-index: 45;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.5);
  pointer-events: auto;
}
.battle-pause-overlay.hidden { display: none; }
.battle-pause-overlay .comic-card-shell,
.battle-phase-overlay .comic-card-shell,
.battle-result-overlay .comic-card-shell {
  margin: auto;
  flex-shrink: 0;
}
.battle-hud-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  text-align: center;
  justify-self: center;
  grid-column: 2;
  max-width: min(72vw, 420px);
}
.battle-hud-scoreboard {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 6px 8px;
  width: 100%;
}
.battle-hud-team {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}
.battle-hud-team--home {
  justify-self: end;
  justify-content: flex-end;
}
.battle-hud-team--away {
  justify-self: start;
  justify-content: flex-start;
}
.battle-hud-team-name {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: min(18vw, 96px);
}
.battle-hud-flag {
  width: 22px;
  height: 14px;
  flex-shrink: 0;
  border: 1.5px solid rgba(255, 255, 255, 0.38);
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  background: #2563eb;
}
.battle-hud-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 17px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.battle-hud-score-num {
  min-width: 1.15em;
  text-align: center;
}
.battle-hud-score-colon {
  display: inline-block;
  width: 0.5em;
  text-align: center;
  flex-shrink: 0;
}
.battle-hud-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  min-width: 56px;
  flex-shrink: 0;
  justify-self: end;
  grid-column: 3;
}
.battle-hud-time { font-weight: 700; white-space: nowrap; }
.battle-hud-phase { color: var(--gold); min-width: 44px; text-align: right; white-space: nowrap; }
.battle-hud-phase.goal-flash { animation: battle-flash 0.3s ease 2; }
.battle-hud-campaign {
  margin-top: 2px;
  font-size: 12px;
  color: #fde68a;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.battle-hud-campaign.hidden { display: none; }

.battle-hud-header {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  pointer-events: none;
  position: relative;
  z-index: 10;
}
.battle-hud-header .battle-hud-top {
  width: 100%;
  pointer-events: auto;
}

.battle-hud-header--pk {
  position: relative;
  z-index: 41;
}

.battle-hud-header--pk .battle-hud-pk:not(.hidden) {
  align-self: center;
  margin-top: 6px;
  z-index: 41;
}

.battle-hud-top--pk .battle-hud-time,
.battle-hud-top--pk .battle-hud-phase {
  display: none;
}

.battle-hud-scoreboard .battle-hud-team--active .battle-hud-team-name {
  font-weight: 900;
  text-shadow: 0 0 10px var(--team-active-color, rgba(250, 204, 21, 0.65));
}

.battle-hud-pk {
  pointer-events: none;
  width: fit-content;
  max-width: min(92vw, 480px);
  margin-top: 4px;
  margin-left: auto;
  margin-right: auto;
  padding: 8px 16px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: linear-gradient(180deg, rgba(88, 98, 110, 0.3) 0%, rgba(58, 68, 78, 0.34) 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  font-size: 13px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 2px 5px rgba(0, 0, 0, 0.1);
}
.battle-hud-pk.hidden { display: none; }
.battle-hud-pk-score {
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  font-weight: 600;
  font-size: 16px;
  text-align: center;
  line-height: 1.35;
  white-space: nowrap;
  letter-spacing: 0.06em;
}
.battle-hud-pk-round {
  margin: 0;
  color: rgba(255, 255, 255, 0.58);
  font-weight: 700;
  font-size: 14px;
  text-align: center;
  line-height: 1.3;
  white-space: nowrap;
  letter-spacing: 0.04em;
}
.battle-hud-pk-round.is-sudden-death {
  color: #fca5a5;
  font-size: 13px;
  letter-spacing: 0.02em;
}
.battle-hud-pk-turn {
  margin: 0;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  text-align: center;
  line-height: 1.2;
  white-space: nowrap;
}
.battle-hud-pk-turn.is-hidden { display: none; }
.battle-hud-pk-shooter {
  color: var(--pk-turn-color, #facc15);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.battle-hud-pk-role {
  color: rgba(255, 255, 255, 0.58);
  font-size: 14px;
  font-weight: 700;
}
.battle-hud-pk-meta {
  color: rgba(255, 255, 255, 0.52);
  font-size: 13px;
  font-weight: 600;
}
.battle-hud-pk.is-blind-pick .battle-hud-pk-countdown {
  color: rgba(255, 255, 255, 0.72);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
}
.battle-hud-pk.is-blind-pick .battle-hud-pk-countdown.is-urgent {
  color: rgba(248, 113, 113, 0.88);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.32);
}

.battle-hud-pk-countdown {
  position: relative;
  z-index: 50;
  margin: 2px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 46px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
}
.battle-hud-pk.is-blind-pick {
  overflow: visible;
}
.battle-hud-pk-countdown.is-urgent {
  color: rgba(248, 113, 113, 0.88);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.32);
}
.battle-hud-pk-countdown.hidden { display: none; }

.battle-phase-overlay {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  pointer-events: auto;
}
.battle-phase-overlay.hidden { display: none; }

.comic-card-shell--penalty-intro {
  max-width: min(var(--penalty-intro-shell-max), 94vw);
}
.battle-penalty-intro-card {
  max-width: min(var(--penalty-intro-card-max), 92vw);
  text-align: left;
}
.battle-penalty-rules {
  margin: 12px 0 4px;
  padding-left: 1.25em;
  list-style: disc;
  font-size: 0.92rem;
  line-height: 1.55;
}
.battle-penalty-rules li + li {
  margin-top: 6px;
}
.battle-penalty-intro-actions {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}

.battle-result-overlay {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: max(12px, env(safe-area-inset-top, 0px)) 12px max(12px, env(safe-area-inset-bottom, 0px));
  background: rgba(0, 0, 0, 0.5);
  pointer-events: auto;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}
.battle-result-overlay.hidden { display: none; }
.battle-result-overlay .comic-card-shell {
  width: min(var(--card-max-md), 94vw);
  max-width: min(var(--card-max-md), 94vw);
}
.battle-result-overlay .battle-result-card {
  width: 100%;
  box-sizing: border-box;
}
.battle-result-home { margin-top: 2px; }
@keyframes battle-flash {
  50% { color: #fff; transform: scale(1.12); }
}

.battle-hud-bottom.hidden,
.battle-hud-local2p.hidden {
  display: none !important;
}
.battle-hud-local2p {
  flex-direction: row;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px 14px;
}
.battle-side {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  min-width: 0;
  flex: 1;
}
.battle-side-home {
  align-items: flex-start;
}
.battle-side-away {
  align-items: flex-end;
}
.battle-side-label {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.08em;
}
.battle-side-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 220px;
}
.battle-side-away .battle-side-controls {
  align-items: flex-end;
}
.battle-side-home .battle-side-controls {
  align-items: flex-start;
}
.battle-side-controls .action-bar {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: none;
}
.battle-side-controls .action-row {
  width: 100%;
}

.battle-hud-bottom {
  pointer-events: auto;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 10px 12px 14px;
  gap: 6px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.32), transparent);
}

html.shows-keyboard-hints .battle-hud-bottom {
  background: transparent;
}

#battle-hud-bottom-single {
  justify-content: flex-end;
}

.battle-single-controls {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

html.shows-keyboard-hints #battle-hud-bottom-single:not(.hidden) {
  justify-content: stretch;
  gap: 0;
}

html.shows-keyboard-hints #battle-hud-bottom-single:not(.hidden) .battle-single-controls {
  width: 100%;
  justify-content: space-between;
}

/* 键鼠端强制隐藏摇杆（含带触控屏的 Windows 电脑） */
html.shows-keyboard-hints .battle-hud-bottom .joystick-wrap,
html.shows-keyboard-hints .joystick-touch-zone,
html.shows-keyboard-hints .joystick-float {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* 虚拟摇杆仅纯触控端显示 */
html.is-touch-play:not(.shows-keyboard-hints) #battle-hud-bottom-single:not(.hidden) .joystick-wrap {
  display: block;
}

.joystick-wrap {
  flex-shrink: 0;
}

/* 键鼠端对战 — 方向键（WASD 布局：上排 1 键，下排 3 键） */
.battle-dir-pad {
  display: none;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: 1fr 1fr;
  gap: 4px;
  width: 96px;
  height: auto;
  flex-shrink: 0;
  padding: 5px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  box-sizing: border-box;
}
.battle-player-inputs {
  display: flex;
  align-items: flex-end;
  gap: 6px;
}
html.shows-keyboard-hints .battle-player-inputs {
  gap: 12px;
  align-items: stretch;
}
html.shows-keyboard-hints #battle-hud-bottom-single:not(.hidden) .battle-dir-pad,
html.shows-keyboard-hints #battle-hud-bottom-local2p:not(.hidden) .battle-dir-pad {
  display: grid;
}
html.shows-keyboard-hints #battle-hud-bottom-single:not(.hidden) .action-bar {
  margin-left: auto;
  flex-shrink: 0;
}
/* 对战输入区 — 方向键与操作键模块同高（单人键鼠默认） */
html.shows-keyboard-hints .battle-hud {
  --battle-input-h: 118px;
  --battle-dir-btn-fs: 20px;
  --battle-act-label-fs: 14px;
  --battle-act-key-fs: 13px;
  --battle-act-key-wide-fs: 11px;
}
html.shows-keyboard-hints .battle-hud .battle-single-controls {
  align-items: stretch;
}
html.shows-keyboard-hints .battle-hud .battle-dir-pad {
  width: 168px;
  height: var(--battle-input-h);
  gap: 6px;
  padding: 8px;
  border-radius: 20px;
  grid-template-rows: 1fr 1fr;
}
html.shows-keyboard-hints .battle-hud .dir-btn {
  width: 100%;
  height: 100%;
  min-height: 0;
  aspect-ratio: auto;
  font-size: var(--battle-dir-btn-fs);
  border-radius: 14px;
  border-width: 2px;
}
html.shows-keyboard-hints .battle-hud .action-bar {
  max-width: 336px;
  height: var(--battle-input-h);
  padding: 8px;
  gap: 8px;
  border-radius: 22px;
  box-sizing: border-box;
}
html.shows-keyboard-hints .battle-hud .action-row {
  flex: 1 1 0;
  min-height: 0;
  gap: 8px;
  align-items: stretch;
}
html.shows-keyboard-hints .battle-hud .act-btn {
  flex: 1 1 0;
  min-height: 0;
  padding: 3px 6px 2px;
  font-size: var(--battle-act-label-fs);
  gap: 2px;
  border-radius: 16px;
}
html.shows-keyboard-hints .battle-hud .act-key {
  font-size: var(--battle-act-key-fs);
  padding: 1px 6px;
  min-height: 1.1em;
}
html.shows-keyboard-hints .battle-hud .act-key-wide {
  font-size: var(--battle-act-key-wide-fs);
  padding: 1px 5px;
}
html.shows-keyboard-hints .battle-hud .act-label {
  font-size: var(--battle-act-label-fs);
}
html.shows-keyboard-hints .battle-hud-local2p:not(.hidden) {
  align-items: stretch;
  justify-content: center;
  gap: 0;
  padding: 0;
  background: transparent;
}
html.shows-keyboard-hints .battle-hud-local2p .battle-side {
  flex: 0 0 50%;
  width: 50%;
  max-width: 50%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: stretch;
  box-sizing: border-box;
  padding: 8px 12px 12px;
}
html.shows-keyboard-hints .battle-hud-local2p .battle-side-home {
  align-items: flex-start;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}
html.shows-keyboard-hints .battle-hud-local2p .battle-side-away {
  align-items: flex-end;
}
html.shows-keyboard-hints .battle-hud-local2p .battle-side-controls {
  flex-direction: column;
  align-items: inherit;
  max-width: none;
  width: 100%;
  gap: 0;
}
/* 双人模式：WASD/小键盘贴边，P1 操作键与 P2 方向键向中线靠拢 */
html.shows-keyboard-hints .battle-hud-local2p {
  --battle-input-h: 130px;
  --battle-dir-btn-fs: 22px;
  --battle-act-label-fs: 16px;
  --battle-act-key-fs: 14px;
  --battle-act-key-wide-fs: 12px;
}
html.shows-keyboard-hints .battle-hud-local2p .battle-player-inputs {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 12px;
  flex-shrink: 0;
  width: 100%;
  justify-content: space-between;
}
html.shows-keyboard-hints .battle-hud-local2p .battle-side-home .battle-player-inputs {
  padding-right: 6px;
}
html.shows-keyboard-hints .battle-hud-local2p .battle-side-away .battle-player-inputs {
  padding-left: 6px;
}
html.shows-keyboard-hints .battle-hud-local2p .battle-side-controls .action-bar {
  width: auto;
  flex: 0 0 auto;
}
html.shows-keyboard-hints .battle-hud-local2p .battle-dir-pad {
  width: 184px;
}
html.shows-keyboard-hints .battle-hud-local2p .action-bar {
  max-width: 368px;
}
html.shows-keyboard-hints .battle-hud-local2p .act-btn {
  padding: 4px 6px 3px;
}

/* 点球盲选 — 复用对战 dir-btn / act-btn；中线两侧，仅上下键 + 确认键 */
.battle-penalty-pick-hud {
  pointer-events: none;
  justify-content: center;
  align-items: flex-end;
  gap: 0;
  padding: 8px 12px 12px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.3), transparent);
}
.battle-penalty-pick-hud:not(.hidden) {
  display: flex;
}
.battle-pk-pick-side.hidden {
  display: none !important;
}
.battle-pk-pick-side {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  box-sizing: border-box;
  padding: 0 16px;
}
.battle-pk-pick-side--home {
  justify-content: flex-end;
  padding-right: 10px;
}
.battle-pk-pick-side--away {
  justify-content: flex-start;
  padding-left: 10px;
}
.battle-penalty-pick-hud--solo .battle-pk-pick-side--home {
  flex: 0 0 auto;
  justify-content: center;
  padding: 0;
}
.battle-penalty-pick-hud:not(.battle-penalty-pick-hud--solo) {
  justify-content: stretch;
}
.battle-pk-pick-inputs {
  gap: 10px;
  align-items: stretch;
  flex-shrink: 0;
}
.battle-pk-pick-side .dir-btn,
.battle-pk-pick-side .act-btn {
  cursor: default;
  pointer-events: none;
}
.battle-penalty-pick-hud--interactive {
  pointer-events: auto;
}
.battle-penalty-pick-hud--interactive .dir-btn,
.battle-penalty-pick-hud--interactive .battle-pk-pick-confirm {
  pointer-events: auto;
  cursor: pointer;
}
.battle-dir-pad--pk .dir-btn.is-selected {
  border-color: rgba(250, 204, 21, 0.92);
  background: linear-gradient(180deg, rgba(250, 204, 21, 0.34) 0%, rgba(180, 120, 20, 0.38) 100%);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 0 0 2px rgba(250, 204, 21, 0.35),
    0 2px 8px rgba(0, 0, 0, 0.28);
}
.battle-pk-pick-side.is-pending .battle-dir-pad--pk .dir-btn:not(.is-selected) {
  opacity: 0.72;
}
.battle-dir-pad--pk {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr 1fr;
  width: 72px;
  height: var(--battle-input-h, 118px);
  gap: 6px;
  padding: 8px;
  border-radius: 20px;
  box-sizing: border-box;
}
html.shows-keyboard-hints .battle-dir-pad--pk {
  width: 84px;
}
.battle-dir-pad--pk .dir-btn[data-dir='up'] {
  grid-column: 1;
  grid-row: 1;
}
.battle-dir-pad--pk .dir-btn[data-dir='down'] {
  grid-column: 1;
  grid-row: 2;
}
.battle-pk-pick-bar {
  width: 88px;
  min-width: 88px;
  height: var(--battle-input-h, 118px);
  box-sizing: border-box;
}
html.shows-keyboard-hints .battle-pk-pick-bar {
  width: 96px;
  min-width: 96px;
}
.battle-pk-pick-bar .action-row-top {
  flex: 1;
  min-height: 0;
  align-items: stretch;
}
.battle-pk-pick-confirm {
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
}
.battle-pk-pick-side.is-pick .battle-pk-pick-confirm:not(.shoot) {
  opacity: 0.5;
}
.battle-pk-pick-side.is-blind-pick .battle-dir-pad--pk .dir-btn.is-selected {
  border-color: rgba(255, 255, 255, 0.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.06) 100%);
  color: rgba(255, 255, 255, 0.88);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 2px 6px rgba(0, 0, 0, 0.22);
}
.battle-pk-pick-side.is-done .battle-dir-pad--pk {
  opacity: 0.45;
}
.battle-pk-pick-side.is-done .battle-pk-pick-confirm {
  border-color: rgba(34, 197, 94, 0.75);
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.22) 0%, rgba(22, 120, 60, 0.28) 100%);
  color: #4ade80;
  opacity: 1;
}
.battle-pk-pick-side.is-hint .battle-pk-pick-inputs {
  animation: battle-pk-pick-hint 1.1s ease-in-out infinite;
}
@keyframes battle-pk-pick-hint {
  50% {
    filter: drop-shadow(0 0 6px rgba(250, 204, 21, 0.45));
  }
}

.dir-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(108, 120, 136, 0.3) 0%, rgba(78, 90, 104, 0.34) 100%);
  color: rgba(255, 255, 255, 0.58);
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 2px 5px rgba(0, 0, 0, 0.1);
  transition: transform 0.08s ease, box-shadow 0.08s ease, filter 0.1s ease, border-color 0.08s ease;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}
.dir-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14) 0%, transparent 50%);
  pointer-events: none;
}
.dir-btn[data-dir='up'] { grid-column: 2; grid-row: 1; }
.dir-btn[data-dir='left'] { grid-column: 1; grid-row: 2; }
.dir-btn[data-dir='down'] { grid-column: 2; grid-row: 2; }
.dir-btn[data-dir='right'] { grid-column: 3; grid-row: 2; }
.dir-btn-key {
  position: relative;
  z-index: 1;
}
.dir-btn-key--touch {
  display: none;
}
html:not(.shows-keyboard-hints) .dir-btn-key--kb {
  display: none;
}
html:not(.shows-keyboard-hints) .dir-btn-key--touch {
  display: inline;
}
.dir-btn:hover {
  filter: brightness(1.08);
  border-color: rgba(255, 255, 255, 0.42);
}
.dir-btn:active,
.dir-btn.is-key-pressed {
  transform: translateY(2px) scale(0.94);
  filter: brightness(1.2);
  border-color: rgba(255, 255, 255, 0.58);
  box-shadow:
    inset 0 3px 8px rgba(0, 0, 0, 0.42),
    0 0 0 2px rgba(255, 255, 255, 0.26),
    0 1px 3px rgba(0, 0, 0, 0.24);
}
.dir-btn:active::before,
.dir-btn.is-key-pressed::before {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.26) 0%, rgba(0, 0, 0, 0.06) 100%);
}
.battle-dir-pad--away .dir-btn {
  background: linear-gradient(180deg, rgba(98, 112, 132, 0.3) 0%, rgba(68, 82, 98, 0.34) 100%);
}

#battle-hud-bottom-single .action-bar {
  margin-left: auto;
  flex-shrink: 0;
}

/* 暂时隐藏虚拟摇杆，保留键盘操作 — 由 is-mobile 覆盖显示 */
.battle-hud-bottom .joystick-wrap {
  display: none;
}
.joystick-zone {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 2px solid rgba(255, 255, 255, 0.1);
  position: relative;
  touch-action: none;
}
html.is-touch-play .joystick-zone {
  width: 108px;
  height: 108px;
}
.joystick-knob {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

/* 触控设备 — 可变摇杆：默认显示底部摇杆，左侧按下在触点显示，松手恢复默认 */
.joystick-touch-zone {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: min(42vw, 480px);
  z-index: 1;
  pointer-events: none;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}
.joystick-touch-zone.is-enabled {
  pointer-events: auto;
}
.joystick-float {
  position: fixed;
  left: 0;
  top: 0;
  z-index: calc(var(--battle-controls-touch-z, 43) + 1);
  pointer-events: none;
  transform: translate(-50%, -50%);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.06s ease;
}
.joystick-float.is-active {
  opacity: 1;
  visibility: visible;
}
html.is-touch-play:not(.shows-keyboard-hints) #battle-hud-bottom-single:not(.hidden) {
  position: relative;
  justify-content: flex-end;
  gap: 10px;
  --moba-cluster-w: 200px;
  --moba-cluster-h: 200px;
  --moba-shoot-size: 78px;
  --moba-shoot-half: calc(var(--moba-shoot-size) / 2);
  --moba-skill-size: 46px;
  --moba-skill-half: calc(var(--moba-skill-size) / 2);
  --moba-arc-gap: 30px;
  --moba-arc-span: 110deg;
  /* 圆心距 = 射门半径 + 边缘间距 + 副键半径 → 39 + 30 + 23 = 92px */
  padding-right: 32px;
  padding-bottom: 28px;
}
html.is-touch-play:not(.shows-keyboard-hints) #battle-hud-bottom-single:not(.hidden) .joystick-wrap--slot {
  position: absolute;
  left: 12px;
  bottom: 14px;
  z-index: var(--battle-controls-z);
}
html.is-touch-play:not(.shows-keyboard-hints) .joystick-wrap--slot.is-hidden-by-float {
  visibility: hidden;
  pointer-events: none;
}

/* 移动端单人 — MOBA 环形技能键（右下拇指区） */
html.is-touch-play:not(.shows-keyboard-hints) #battle-hud-bottom-single:not(.hidden) .battle-single-controls {
  align-items: flex-end;
  flex: 0 0 auto;
  width: auto;
}
html.is-touch-play:not(.shows-keyboard-hints) #battle-hud-bottom-single:not(.hidden) .action-bar {
  position: relative;
  width: var(--moba-cluster-w);
  height: var(--moba-cluster-h);
  max-width: none;
  margin-left: 0;
  padding: 0;
  gap: 0;
  overflow: visible;
  background: transparent;
  border: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-sizing: border-box;
  flex-shrink: 0;
  z-index: var(--battle-controls-z);
}
html.is-touch-play:not(.shows-keyboard-hints) #battle-hud-bottom-single:not(.hidden) .action-row {
  display: contents;
}
html.is-touch-play:not(.shows-keyboard-hints) #battle-hud-bottom-single:not(.hidden) .action-bar .act-btn {
  position: absolute;
  flex: none;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border-radius: 50%;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  border-width: 1.5px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 3px 8px rgba(0, 0, 0, 0.18);
}
html.is-touch-play:not(.shows-keyboard-hints) #battle-hud-bottom-single:not(.hidden) #battle-btn-shoot {
  right: 0;
  bottom: 0;
  z-index: 3;
  width: var(--moba-shoot-size);
  height: var(--moba-shoot-size);
  font-size: 13px;
  background: radial-gradient(circle at 32% 28%, rgba(255, 210, 150, 0.5) 0%, rgba(232, 149, 74, 0.55) 38%, rgba(194, 65, 12, 0.72) 100%);
  border-color: rgba(255, 190, 110, 0.42);
  color: #fff;
  font-weight: 800;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.22),
    inset 0 -5px 0 rgba(120, 40, 10, 0.38),
    0 0 18px rgba(234, 88, 12, 0.22),
    0 5px 14px rgba(0, 0, 0, 0.38);
}
html.is-touch-play:not(.shows-keyboard-hints) #battle-hud-bottom-single:not(.hidden) #battle-btn-shoot .act-label {
  font-size: 14px;
  letter-spacing: 0.06em;
}
/* 副键：射门圆心左上方 90° 扇形（90°→180°）均匀分布 */
html.is-touch-play:not(.shows-keyboard-hints) #battle-hud-bottom-single:not(.hidden) #battle-btn-dash,
html.is-touch-play:not(.shows-keyboard-hints) #battle-hud-bottom-single:not(.hidden) #battle-btn-pass,
html.is-touch-play:not(.shows-keyboard-hints) #battle-hud-bottom-single:not(.hidden) #battle-btn-tackle,
html.is-touch-play:not(.shows-keyboard-hints) #battle-hud-bottom-single:not(.hidden) #battle-btn-switch {
  width: var(--moba-skill-size);
  height: var(--moba-skill-size);
  z-index: 1;
  color: rgba(255, 255, 255, 0.72);
}
/* 副键：射门圆心左上方 110° 扇形（80°→190°），与射门边缘间距 30px */
html.is-touch-play:not(.shows-keyboard-hints) #battle-hud-bottom-single:not(.hidden) #battle-btn-switch {
  left: 154px;
  top: 47px;
  background: radial-gradient(circle at 30% 25%, rgba(233, 180, 253, 0.18) 0%, rgba(168, 85, 247, 0.2) 55%, rgba(107, 33, 168, 0.26) 100%);
  border-color: rgba(216, 180, 254, 0.16);
}
html.is-touch-play:not(.shows-keyboard-hints) #battle-hud-bottom-single:not(.hidden) #battle-btn-pass {
  left: 97px;
  top: 56px;
  background: radial-gradient(circle at 30% 25%, rgba(253, 230, 138, 0.18) 0%, rgba(245, 158, 11, 0.2) 55%, rgba(180, 83, 9, 0.26) 100%);
  border-color: rgba(253, 224, 150, 0.16);
}
html.is-touch-play:not(.shows-keyboard-hints) #battle-hud-bottom-single:not(.hidden) #battle-btn-tackle {
  left: 56px;
  top: 97px;
  background: radial-gradient(circle at 30% 25%, rgba(167, 243, 208, 0.16) 0%, rgba(16, 185, 129, 0.18) 55%, rgba(6, 95, 70, 0.24) 100%);
  border-color: rgba(110, 231, 183, 0.14);
}
html.is-touch-play:not(.shows-keyboard-hints) #battle-hud-bottom-single:not(.hidden) #battle-btn-dash {
  left: 47px;
  top: 154px;
  background: radial-gradient(circle at 30% 25%, rgba(186, 230, 253, 0.18) 0%, rgba(59, 130, 246, 0.22) 55%, rgba(30, 64, 175, 0.28) 100%);
  border-color: rgba(147, 197, 253, 0.18);
}
html.is-touch-play:not(.shows-keyboard-hints) #battle-hud-bottom-single:not(.hidden) #battle-btn-dash.is-on-cd {
  background: radial-gradient(circle at 30% 25%, rgba(148, 158, 172, 0.22) 0%, rgba(100, 110, 122, 0.26) 55%, rgba(72, 80, 92, 0.3) 100%);
  border-color: rgba(180, 190, 200, 0.14);
}
html.is-touch-play:not(.shows-keyboard-hints) #battle-hud-bottom-single:not(.hidden) #battle-btn-tackle .act-label,
html.is-touch-play:not(.shows-keyboard-hints) #battle-hud-bottom-single:not(.hidden) #battle-btn-switch .act-label {
  font-size: 10px;
}
html.is-touch-play:not(.shows-keyboard-hints) #battle-hud-bottom-single:not(.hidden) #battle-btn-dash .act-label,
html.is-touch-play:not(.shows-keyboard-hints) #battle-hud-bottom-single:not(.hidden) #battle-btn-pass .act-label {
  font-size: 11px;
}
html.is-touch-play:not(.shows-keyboard-hints) #battle-hud-bottom-single:not(.hidden) .action-bar .act-btn:active:not(.is-on-cd),
html.is-touch-play:not(.shows-keyboard-hints) #battle-hud-bottom-single:not(.hidden) .action-bar .act-btn.is-key-pressed:not(.is-on-cd) {
  transform: scale(0.9);
}
html.is-touch-play:not(.shows-keyboard-hints) #battle-hud-bottom-single:not(.hidden) .action-bar .act-btn.dash.is-on-cd:active,
html.is-touch-play:not(.shows-keyboard-hints) #battle-hud-bottom-single:not(.hidden) .action-bar .act-btn.tackle.is-on-cd:active {
  transform: none;
}
html.is-touch-play:not(.shows-keyboard-hints) #battle-hud-bottom-single:not(.hidden) .action-bar .act-btn.shoot:active:not(.is-on-cd),
html.is-touch-play:not(.shows-keyboard-hints) #battle-hud-bottom-single:not(.hidden) .action-bar .act-btn.shoot.is-key-pressed {
  transform: scale(0.9);
  filter: brightness(1.22) saturate(1.12);
}

/* 触控模式：左侧摇杆识别区叠在 HUD 之上（避开顶栏），底部操作栏保持可点 */
html.is-touch-play:not(.shows-keyboard-hints) .joystick-touch-zone {
  z-index: var(--battle-controls-touch-z);
  top: 52px;
}
html.is-touch-play:not(.shows-keyboard-hints) .battle-hud-bottom .act-btn {
  pointer-events: auto;
  touch-action: manipulation;
}

.teammate-bar { display: none; }
.tm-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.28);
  background: linear-gradient(180deg, #5a7390 0%, #465a72 55%, #3a4a5c 100%);
  color: #eef2f6;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -3px 0 rgba(0, 0, 0, 0.25),
    0 4px 10px rgba(0, 0, 0, 0.35);
  transition: transform 0.07s ease, box-shadow 0.07s ease;
}
.tm-btn:active {
  transform: translateY(2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 2px 6px rgba(0, 0, 0, 0.3);
}
.tm-btn.active {
  border-color: rgba(212, 184, 88, 0.75);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -3px 0 rgba(100, 80, 40, 0.35),
    0 0 10px rgba(180, 150, 60, 0.35),
    0 4px 10px rgba(0, 0, 0, 0.35);
}
.tm-btn.pass-target {
  border-color: rgba(200, 180, 90, 0.65);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 0 10px rgba(180, 160, 80, 0.4),
    0 4px 10px rgba(0, 0, 0, 0.35);
}
.action-bar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 228px;
  align-items: stretch;
  padding: 7px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.action-row {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}
html:not(.shows-keyboard-hints) .battle-hud .act-key {
  display: none;
}
html.is-touch-play:not(.shows-keyboard-hints) .battle-hud {
  --battle-input-h: 108px;
}
html.is-touch-play:not(.shows-keyboard-hints) .battle-hud .battle-single-controls {
  align-items: stretch;
}
html.is-touch-play:not(.shows-keyboard-hints) .battle-hud .action-bar {
  height: var(--battle-input-h);
  padding: 6px;
  gap: 6px;
  box-sizing: border-box;
}
html.is-touch-play:not(.shows-keyboard-hints) .battle-hud .action-row {
  flex: 1 1 0;
  min-height: 0;
  align-items: stretch;
}
html:not(.shows-keyboard-hints) .battle-hud .act-btn {
  min-height: 0;
  flex: 1 1 0;
  padding: 4px 6px;
  font-size: 11px;
  gap: 0;
}
html.is-touch-play:not(.shows-keyboard-hints) .battle-hud .act-label {
  font-size: 11px;
  line-height: 1.1;
}
.action-row-top .act-btn,
.action-row-bottom .act-btn {
  flex: 1;
  min-width: 0;
}
.act-btn {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 9px 7px 8px;
  min-width: 0;
  min-height: 54px;
  background: linear-gradient(180deg, rgba(88, 98, 110, 0.3) 0%, rgba(58, 68, 78, 0.34) 100%);
  color: rgba(255, 255, 255, 0.58);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  font-family: inherit;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 2px 5px rgba(0, 0, 0, 0.1);
  transition: transform 0.08s ease, box-shadow 0.08s ease, filter 0.1s ease;
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
}
.act-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, transparent 48%);
  pointer-events: none;
  border-radius: inherit;
}
.act-btn::after {
  display: none;
}
.act-btn:hover {
  filter: brightness(1.06);
}
.act-btn:active:not(.is-on-cd),
.act-btn.is-key-pressed:not(.is-on-cd) {
  transform: translateY(3px) scale(0.96);
  filter: brightness(1.18);
  border-color: rgba(255, 255, 255, 0.52);
  box-shadow:
    inset 0 4px 10px rgba(0, 0, 0, 0.48),
    0 0 0 2px rgba(255, 255, 255, 0.28),
    0 1px 3px rgba(0, 0, 0, 0.28);
}
.act-btn.shoot:active:not(.is-on-cd),
.act-btn.shoot.is-key-pressed {
  filter: brightness(1.22) saturate(1.12);
  border-color: rgba(255, 220, 160, 0.7);
  box-shadow:
    inset 0 4px 10px rgba(0, 0, 0, 0.42),
    0 0 0 2px rgba(255, 190, 100, 0.5),
    0 0 14px rgba(234, 88, 12, 0.42);
}
.act-btn.dash:active:not(.is-on-cd),
.act-btn.dash.is-key-pressed:not(.is-on-cd),
.act-btn.tackle:active:not(.is-on-cd),
.act-btn.tackle.is-key-pressed:not(.is-on-cd) {
  filter: brightness(1.16);
  border-color: rgba(200, 220, 245, 0.55);
  box-shadow:
    inset 0 4px 10px rgba(0, 0, 0, 0.4),
    0 0 0 2px rgba(160, 190, 230, 0.4),
    0 0 10px rgba(59, 130, 246, 0.28);
}
.act-btn:active:not(.is-on-cd)::before,
.act-btn.is-key-pressed:not(.is-on-cd)::before {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0%, rgba(0, 0, 0, 0.08) 100%);
}
.act-label {
  position: relative;
  z-index: 1;
  line-height: 1;
  white-space: nowrap;
}
.act-btn.shoot {
  background: linear-gradient(180deg, rgba(232, 149, 74, 0.34) 0%, rgba(194, 65, 12, 0.32) 52%, rgba(154, 52, 18, 0.34) 100%);
  border-color: rgba(255, 200, 150, 0.18);
  color: rgba(255, 255, 255, 0.62);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 2px 6px rgba(154, 52, 18, 0.1);
}
.act-btn.dash,
.act-btn.tackle {
  position: relative;
  --dash-fill: 0%;
  background: radial-gradient(circle at 30% 25%, rgba(186, 230, 253, 0.2) 0%, rgba(59, 130, 246, 0.26) 55%, rgba(30, 64, 175, 0.32) 100%);
  border-color: rgba(147, 197, 253, 0.22);
  color: rgba(255, 255, 255, 0.88);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 2px 5px rgba(40, 60, 90, 0.12);
}
.act-btn.dash .dash-cd-fill,
.act-btn.tackle .dash-cd-fill {
  position: absolute;
  inset: 0;
  /* 圆心居中，从正上方(0deg)顺时针绕 360°；CD 中由透明蓝逐渐绘回 */
  border-radius: inherit;
  background: conic-gradient(
    from 0deg at 50% 50%,
    rgba(147, 197, 253, 0.22) 0%,
    rgba(59, 130, 246, 0.3) var(--dash-fill),
    transparent var(--dash-fill),
    transparent 100%
  );
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s ease;
}
.act-btn.dash.is-on-cd,
.act-btn.tackle.is-on-cd {
  background: radial-gradient(circle at 30% 25%, rgba(148, 158, 172, 0.24) 0%, rgba(100, 110, 122, 0.28) 55%, rgba(72, 80, 92, 0.32) 100%);
  border-color: rgba(180, 190, 200, 0.14);
  opacity: 1;
  cursor: not-allowed;
}
.act-btn.dash.is-on-cd .dash-cd-fill,
.act-btn.tackle.is-on-cd .dash-cd-fill {
  opacity: 1;
}
.act-btn.dash.is-on-cd .act-key,
.act-btn.dash.is-on-cd .act-label,
.act-btn.tackle.is-on-cd .act-key,
.act-btn.tackle.is-on-cd .act-label {
  opacity: 0.55;
}
.act-btn.dash.is-on-cd:hover,
.act-btn.tackle.is-on-cd:hover {
  filter: none;
}
.act-btn.dash.is-on-cd:active,
.act-btn.tackle.is-on-cd:active {
  transform: none;
}
.act-btn.active {
  background: linear-gradient(180deg, #d4a017 0%, #a16207 100%);
  border-color: rgba(255, 220, 120, 0.35);
  color: #fff;
}
.act-key {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.45em;
  min-height: 1.2em;
  padding: 2px 5px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  font-size: 10px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
  line-height: 1.2;
  flex-shrink: 0;
  letter-spacing: 0.02em;
  text-shadow: none;
}
.act-btn.shoot .act-key {
  background: rgba(0, 0, 0, 0.1);
  border-color: rgba(255, 255, 255, 0.08);
}
.act-key-wide {
  min-width: auto;
  padding: 2px 5px;
  font-size: 9px;
}
@media (max-width: 640px) {
  .battle-hud-bottom { flex-wrap: wrap; }
  .battle-side-controls { max-width: 100%; }
  .battle-hud .action-bar { max-width: 100%; gap: 6px; }
  .battle-hud .action-row { gap: 6px; }
  .joystick-zone { width: 88px; height: 88px; }
  .local-team-panels { grid-template-columns: 1fr; gap: 12px; }
  .local-team-vs { margin: 0; justify-self: center; }
  .battle-setup-card.quiz-card--comic,
  .campaign-map-card.quiz-card--comic { padding: 18px 14px 14px; }
  .battle-card-title { font-size: 22px; }
}

/* 横屏（≤1100px）— 三栏固定列宽 + 整体居中（术语卡切换不抖动） */
@media (max-width: 1100px) and (orientation: landscape) {
  #screen-home {
    justify-content: center;
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px 16px;
  }
  .home-layout {
    display: grid;
    grid-template-columns: var(--home-col-intro) var(--home-col-main) var(--home-col-term);
    column-gap: var(--home-column-gap);
    width: calc(var(--home-col-intro) + var(--home-col-main) + var(--home-col-term) + 2 * var(--home-column-gap));
    max-width: none;
    align-items: center;
  }
  .home-layout > .home-intro,
  .home-layout > .home-main,
  .home-layout > .term-card {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
  .home-layout > .home-main {
    flex: none;
  }
}

/* 平板横屏（如 iPad Mini 1024×768） */
@media (max-width: 1100px) and (orientation: landscape) and (min-height: 521px) {
  #screen-home {
    --home-column-gap: 14px;
    --home-col-intro: min(240px, 24vw);
    --home-col-main: min(340px, 36vw);
    --home-col-term: min(320px, 34vw);
    padding: 14px 20px;
  }
  .home-layout > .home-intro {
    --home-intro-width: var(--home-col-intro);
    max-height: calc(100dvh - 28px);
    gap: 11px;
  }
  .home-layout > .home-main {
    max-height: calc(100dvh - 28px);
    gap: 10px;
    justify-content: center;
  }
  .home-layout > .mode-cards {
    gap: 14px;
  }
  .home-layout > .term-card {
    max-height: calc(100dvh - 28px);
  }
  .home-layout .mode-card {
    min-height: 78px;
    padding: 14px 16px 12px;
  }
}

/* ===== 移动端横屏（矮视口，如 iPhone mini）适配 ===== */
html.is-landscape-mobile #screen-home {
  --home-column-gap: 10px;
  --home-col-intro: min(200px, 26vw);
  --home-col-main: min(280px, 38vw);
  --home-col-term: min(250px, 32vw);
  padding: 6px 12px;
}
html.is-landscape-mobile .home-layout > .home-intro {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  min-height: 0;
  max-height: calc(100dvh - 12px);
  --home-intro-width: 100%;
}
html.is-landscape-mobile #screen-home .hero {
  flex: 0 0 auto;
  width: 100%;
  max-width: 100%;
}
html.is-landscape-mobile #screen-home .home-stats-group {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  min-height: 0;
}
html.is-landscape-mobile #screen-home .home-stats-group .stats-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  min-height: 0;
  padding: 5px 4px;
}
html.is-landscape-mobile #screen-home .home-stats-group .stat-label {
  font-size: 9px;
}
html.is-landscape-mobile #screen-home .home-stats-group .stat-value {
  font-size: 14px;
}
html.is-landscape-mobile #screen-home .home-stats-group .home-footer {
  flex: 0 0 auto;
  padding: 4px 6px;
  font-size: 9px;
}
html.is-landscape-mobile #screen-home .home-stats-group .home-footer strong {
  font-size: 11px;
}
html.is-landscape-mobile .home-layout > .home-main {
  width: 100%;
  max-width: 100%;
  max-height: calc(100dvh - 12px);
  gap: 5px;
  justify-content: center;
}
html.is-landscape-mobile .home-layout > .mode-cards {
  gap: 10px;
  width: 100%;
}
html.is-landscape-mobile .home-layout > .term-card {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  max-height: calc(100dvh - 10px);
}
html.is-landscape-mobile #screen-home .home-intro .hero-panel {
  padding: 10px 12px 8px 14px;
}
html.is-landscape-mobile .hero-panel .ball-icon {
  font-size: 26px;
  top: 10px;
  right: 6px;
}
html.is-landscape-mobile .hero--comic .hero-title {
  font-size: 22px;
}
html.is-landscape-mobile .hero--comic .subtitle {
  font-size: 11px;
}
html.is-landscape-mobile .mode-card {
  min-height: 56px;
  padding: 8px 10px 7px;
  gap: 8px;
  border-width: 3px;
}
html.is-landscape-mobile .mode-icon {
  font-size: 28px;
  padding: 2px;
}
html.is-landscape-mobile .mode-title {
  font-size: 15px;
}
html.is-landscape-mobile .mode-desc {
  font-size: 10px;
  line-height: 1.25;
}
html.is-landscape-mobile .stats-bar {
  padding: 5px 4px;
}
html.is-landscape-mobile .term-card--comic .term-card-inner {
  min-height: 0;
  max-height: calc(100dvh - 18px);
  padding: 14px 10px 10px;
}
html.is-landscape-mobile .term-card--comic .term-card-title {
  font-size: 18px;
}
html.is-landscape-mobile .term-card--comic .term-card-explanation {
  font-size: 12px;
  line-height: 1.45;
}

@media (orientation: landscape) and (max-height: 420px) {
  html.is-landscape-mobile #screen-home .mode-desc {
    display: none;
  }
  html.is-landscape-mobile .mode-card {
    min-height: 50px;
    padding: 7px 10px 6px;
  }
  html.is-landscape-mobile .hero--comic .hero-title {
    font-size: 20px;
  }
}

html.is-landscape-mobile .battle-screen--comic {
  padding: 6px 10px 8px;
  gap: 0;
  justify-content: center;
  align-items: center;
  overflow-y: auto;
}
html.is-landscape-mobile .battle-screen--comic .battle-screen-stack {
  max-width: min(var(--card-max-md), 92vw);
  gap: 4px;
}
html.is-landscape-mobile .battle-screen--comic .battle-screen-stack--wide {
  max-width: min(var(--card-max-lg), 94vw);
}
html.is-landscape-mobile .battle-screen--comic .screen-header,
html.is-landscape-mobile .battle-screen--comic .comic-card-shell--battle,
html.is-landscape-mobile .battle-screen--comic .comic-card-shell--battle-wide,
html.is-landscape-mobile .modal--battle-comic > .comic-card-shell,
html.is-landscape-mobile .modal--battle-comic .modal-battle-stack {
  width: min(var(--card-max-md), 92vw);
  max-width: min(var(--card-max-md), 92vw);
  margin-inline: auto;
}
html.is-landscape-mobile .battle-screen--comic:has(.local-setup-card) .screen-header,
html.is-landscape-mobile .battle-screen--comic .comic-card-shell--battle-wide {
  max-width: 100%;
}
html.is-landscape-mobile .battle-setup-card.quiz-card--comic,
html.is-landscape-mobile .campaign-map-card.quiz-card--comic,
html.is-landscape-mobile .local-setup-card.quiz-card--comic,
html.is-landscape-mobile .modal--battle-comic .battle-modal-card {
  max-height: calc(100dvh - 52px);
  overflow-y: auto;
  padding: 12px 14px 10px;
}
html.is-landscape-mobile .battle-card-title {
  font-size: 20px;
  margin-bottom: 6px;
}
html.is-landscape-mobile .battle-card-desc,
html.is-landscape-mobile .battle-card-hint {
  font-size: 12px;
  line-height: 1.4;
}
html.is-landscape-mobile .battle-actions {
  gap: 6px;
}
html.is-landscape-mobile .battle-actions .comic-action-btn {
  padding: 9px 12px;
  font-size: 13px;
}
html.is-landscape-mobile .modal--battle-comic {
  padding: 6px 10px;
  align-items: center;
}

/* 移动端 · 足球对战一级菜单（玩法选择） — 仅纯触控端 */
html.is-touch-play:not(.shows-keyboard-hints) #screen-battle-setup {
  padding: max(10px, env(safe-area-inset-top, 0px)) 12px max(10px, env(safe-area-inset-bottom, 0px));
  gap: 0;
}
html.is-touch-play:not(.shows-keyboard-hints) #screen-battle-setup .battle-screen-stack {
  max-width: min(300px, 90vw);
  gap: 4px;
}
html.is-touch-play:not(.shows-keyboard-hints) #screen-battle-setup .comic-card-shell--battle {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
html.is-touch-play:not(.shows-keyboard-hints) #screen-battle-setup .battle-setup-card.quiz-card--comic {
  padding: 14px 14px 12px;
  max-height: none;
}
html.is-touch-play:not(.shows-keyboard-hints) #screen-battle-setup .battle-card-hint {
  display: none;
}
html.is-touch-play:not(.shows-keyboard-hints) #screen-battle-setup .battle-card-title {
  font-size: 20px;
  margin-bottom: 4px;
}
html.is-touch-play:not(.shows-keyboard-hints) #screen-battle-setup .battle-card-desc {
  font-size: 13px;
  margin-bottom: 8px;
}
html.is-touch-play:not(.shows-keyboard-hints) #screen-battle-setup .battle-actions {
  gap: 6px;
  margin-top: 0;
}
html.is-touch-play:not(.shows-keyboard-hints) #screen-battle-setup .battle-actions .comic-action-btn {
  padding: 9px 12px;
  font-size: 13px;
}
html.is-touch-play:not(.shows-keyboard-hints) #screen-battle-setup .comic-sticker {
  font-size: 12px;
  padding: 3px 8px 4px;
  right: 10px;
}
html.is-landscape-mobile #screen-battle-setup .battle-screen-stack,
html.is-landscape-mobile #screen-battle-setup .comic-card-shell--battle {
  width: min(300px, 88vw);
  max-width: min(300px, 88vw);
}
html.is-landscape-mobile #screen-battle-setup .battle-setup-card.quiz-card--comic {
  padding: 12px 12px 10px;
}

/* 移动端 · AI 难度选择 — 精简紧凑（仅纯触控端） */
html.is-touch-play:not(.shows-keyboard-hints) #modal-ai-difficulty {
  padding: max(10px, env(safe-area-inset-top, 0px)) 12px max(10px, env(safe-area-inset-bottom, 0px));
}
html.is-touch-play:not(.shows-keyboard-hints) #modal-ai-difficulty .modal-battle-stack {
  width: min(300px, 90vw);
  max-width: min(300px, 90vw);
  gap: 4px;
}
html.is-touch-play:not(.shows-keyboard-hints) #modal-ai-difficulty .comic-card-shell--battle {
  max-width: 100%;
  min-width: 0;
}
html.is-touch-play:not(.shows-keyboard-hints) #modal-ai-difficulty .battle-modal-card {
  padding: 14px 14px 12px;
  max-height: none;
}
html.is-touch-play:not(.shows-keyboard-hints) #modal-ai-difficulty .battle-card-title {
  font-size: 20px;
  margin-bottom: 8px;
  text-align: center;
}
html.is-touch-play:not(.shows-keyboard-hints) #modal-ai-difficulty .battle-card-desc,
html.is-touch-play:not(.shows-keyboard-hints) #modal-ai-difficulty .ai-difficulty-desc {
  display: none;
}
html.is-touch-play:not(.shows-keyboard-hints) #modal-ai-difficulty .ai-difficulty-options {
  margin: 0;
  gap: 6px;
  min-width: 0;
}
html.is-touch-play:not(.shows-keyboard-hints) #modal-ai-difficulty .ai-difficulty-btn {
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  gap: 0;
  text-align: center;
}
html.is-touch-play:not(.shows-keyboard-hints) #modal-ai-difficulty .ai-difficulty-name {
  font-size: 16px;
}
html.is-touch-play:not(.shows-keyboard-hints) #modal-ai-difficulty .comic-sticker {
  font-size: 11px;
  padding: 3px 8px 4px;
  right: 10px;
}
html.is-touch-play:not(.shows-keyboard-hints) #modal-ai-difficulty .modal-battle-header {
  margin-bottom: 0;
}
html.is-touch-play:not(.shows-keyboard-hints) #modal-ai-difficulty .modal-battle-header .btn-back {
  font-size: 13px;
  padding: 6px 10px;
}
html.is-touch-play:not(.shows-keyboard-hints).is-landscape-mobile #modal-ai-difficulty .modal-battle-stack {
  width: min(280px, 86vw);
  max-width: min(280px, 86vw);
}
html.is-touch-play:not(.shows-keyboard-hints).is-landscape-mobile #modal-ai-difficulty .battle-modal-card {
  padding: 12px 12px 10px;
}

/* 移动端 · 世界杯之路关卡地图 — 精简 + 双列展示全部 6 关 */
html.is-touch-play:not(.shows-keyboard-hints) #screen-campaign-map {
  padding: max(8px, env(safe-area-inset-top, 0px)) 10px max(8px, env(safe-area-inset-bottom, 0px));
  gap: 0;
}
html.is-touch-play:not(.shows-keyboard-hints) #screen-campaign-map .battle-screen-stack {
  max-width: min(320px, 94vw);
  gap: 4px;
}
html.is-touch-play:not(.shows-keyboard-hints) #screen-campaign-map .comic-card-shell--battle {
  max-width: 100%;
  min-width: 0;
}
html.is-touch-play:not(.shows-keyboard-hints) #screen-campaign-map .campaign-map-card.quiz-card--comic {
  padding: 12px 12px 10px;
  max-height: none;
  overflow: visible;
}
html.is-touch-play:not(.shows-keyboard-hints) #screen-campaign-map .battle-card-title {
  font-size: 20px;
  margin-bottom: 4px;
  text-align: center;
}
html.is-touch-play:not(.shows-keyboard-hints) #screen-campaign-map .battle-card-desc,
html.is-touch-play:not(.shows-keyboard-hints) #screen-campaign-map .battle-card-hint {
  display: none;
}
html.is-touch-play:not(.shows-keyboard-hints) #screen-campaign-map .battle-card-meta {
  font-size: 12px;
  font-weight: 800;
  color: var(--comic-ink);
  margin-bottom: 8px;
  text-align: center;
}
html.is-touch-play:not(.shows-keyboard-hints) #screen-campaign-map .road-trophy-badge {
  font-size: 12px;
  margin-bottom: 4px;
  text-align: center;
}
html.is-touch-play:not(.shows-keyboard-hints) #screen-campaign-map .road-stage-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
}
html.is-touch-play:not(.shows-keyboard-hints) #screen-campaign-map .road-stage-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 100%;
  min-width: 0;
  min-height: 74px;
  padding: 7px 5px 6px;
  border-width: 2px;
  box-shadow: 2px 2px 0 var(--comic-ink);
  text-align: center;
}
html.is-touch-play:not(.shows-keyboard-hints) #screen-campaign-map .road-stage-btn.current {
  border-width: 2.5px;
}
html.is-touch-play:not(.shows-keyboard-hints) #screen-campaign-map .road-stage-emoji {
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
}
html.is-touch-play:not(.shows-keyboard-hints) #screen-campaign-map .road-stage-round {
  font-size: 10px;
  line-height: 1.2;
  color: var(--comic-rust);
  font-weight: 700;
  width: 100%;
}
html.is-touch-play:not(.shows-keyboard-hints) #screen-campaign-map .road-stage-name {
  font-size: 12px;
  line-height: 1.25;
  font-weight: 800;
  width: 100%;
  word-break: keep-all;
}
html.is-touch-play:not(.shows-keyboard-hints) #screen-campaign-map .road-stage-status {
  font-size: 9px;
  line-height: 1.2;
  padding: 2px 6px;
  margin-top: 1px;
  max-width: 100%;
  white-space: nowrap;
}
html.is-touch-play:not(.shows-keyboard-hints) #screen-campaign-map .comic-sticker {
  font-size: 10px;
  padding: 2px 7px 3px;
  right: 8px;
}
html.is-touch-play:not(.shows-keyboard-hints) #screen-campaign-map .campaign-map-actions {
  margin-top: 6px;
}
html.is-touch-play:not(.shows-keyboard-hints) #screen-campaign-map .campaign-map-actions .comic-action-btn {
  padding: 8px 10px;
  font-size: 12px;
}
html.is-touch-play:not(.shows-keyboard-hints) #screen-campaign-map .screen-header .btn-back {
  font-size: 13px;
  padding: 6px 10px;
}
html.is-touch-play:not(.shows-keyboard-hints).is-landscape-mobile #screen-campaign-map .battle-screen-stack {
  max-width: min(520px, 96vw);
}
html.is-touch-play:not(.shows-keyboard-hints).is-landscape-mobile #screen-campaign-map .road-stage-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}
html.is-touch-play:not(.shows-keyboard-hints).is-landscape-mobile #screen-campaign-map .road-stage-btn {
  min-height: 68px;
  padding: 6px 4px 5px;
}
html.is-touch-play:not(.shows-keyboard-hints).is-landscape-mobile #screen-campaign-map .road-stage-name {
  font-size: 11px;
}
html.is-touch-play:not(.shows-keyboard-hints).is-landscape-mobile #screen-campaign-map .campaign-map-card.quiz-card--comic {
  padding: 10px 10px 8px;
}

html.is-landscape-mobile #orientation-hint {
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-content: center;
  gap: 10px 16px;
  padding: 10px 16px;
}
html.is-landscape-mobile #orientation-hint .hint-icon {
  font-size: 32px;
}
html.is-landscape-mobile #orientation-hint p {
  font-size: 13px;
  max-width: 240px;
  text-align: left;
}
html.is-landscape-mobile .orientation-hint-back {
  margin-top: 0;
  min-width: 120px;
}

/* 横屏 · 问答模块 */
html.is-landscape-mobile #screen-quiz {
  padding: 6px 10px 8px;
  justify-content: center;
  align-items: center;
  overflow-y: auto;
  gap: 0;
}
html.is-landscape-mobile #screen-quiz-result {
  padding: 6px 10px 8px;
  justify-content: flex-start;
  align-items: center;
  overflow-y: auto;
  gap: 4px;
}
html.is-landscape-mobile #screen-quiz .quiz-screen-stack,
html.is-landscape-mobile #screen-quiz-result .screen-header,
html.is-landscape-mobile #screen-quiz-result .comic-card-shell--quiz {
  width: 100%;
  max-width: min(var(--card-max-md), 94vw);
  margin-inline: auto;
}
html.is-landscape-mobile #screen-quiz .screen-header,
html.is-landscape-mobile #screen-quiz-result .screen-header {
  margin-bottom: 0;
  flex-shrink: 0;
}
html.is-landscape-mobile #screen-quiz .quiz-screen-stack {
  gap: 4px;
  max-width: min(var(--card-max-md), 94vw);
}
html.is-landscape-mobile #screen-quiz-result .comic-card-shell--quiz {
  margin-top: 0;
}
html.is-landscape-mobile #screen-quiz .quiz-card--comic:not(.battle-modal-card):not(.team-customize-modal) {
  max-height: calc(100dvh - 52px);
  padding: 10px 12px 8px;
  overflow-y: auto;
}
html.is-landscape-mobile #screen-quiz .quiz-card-head {
  margin-bottom: 6px;
  padding-bottom: 6px;
}
html.is-landscape-mobile #screen-quiz .quiz-nav-btn {
  width: 30px;
  height: 30px;
  font-size: 18px;
}
html.is-landscape-mobile #screen-quiz .question-text {
  font-size: 14px;
  line-height: 1.45;
  padding: 8px 10px;
  margin-bottom: 8px;
}
html.is-landscape-mobile #screen-quiz .options {
  gap: 6px;
}
html.is-landscape-mobile #screen-quiz .option-btn {
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.35;
}
html.is-landscape-mobile #screen-quiz .quiz-remark {
  font-size: 11px;
  margin-top: 6px;
}
html.is-landscape-mobile #screen-quiz .quiz-streak-wrap {
  flex-shrink: 0;
}
html.is-landscape-mobile #screen-quiz .quiz-streak {
  max-width: min(220px, 94vw);
  padding: 4px 14px;
  font-size: 12px;
}
html.is-landscape-mobile #screen-quiz .quiz-streak-toast {
  font-size: 11px;
  padding: 3px 10px 4px;
}
html.is-landscape-mobile #screen-quiz-result .quiz-result-card {
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  padding: 16px 18px 14px;
}

/* 移动端 · 对战结算弹窗（世界杯之路等）可滚动且紧凑 */
html.is-touch-play:not(.shows-keyboard-hints) .battle-result-overlay {
  padding: max(8px, env(safe-area-inset-top, 0px)) 10px max(8px, env(safe-area-inset-bottom, 0px));
}
html.is-touch-play:not(.shows-keyboard-hints) .battle-result-overlay .comic-card-shell {
  width: min(var(--card-max-md), 96vw);
  max-width: min(var(--card-max-md), 96vw);
}
html.is-touch-play:not(.shows-keyboard-hints) .battle-result-overlay .battle-result-card {
  padding: 14px 14px 12px;
  gap: 6px;
}
html.is-touch-play:not(.shows-keyboard-hints) .battle-result-overlay .battle-result-card h2 {
  font-size: 22px;
}
html.is-touch-play:not(.shows-keyboard-hints) .battle-result-overlay .battle-result-card .result-icon {
  font-size: 36px;
  margin-bottom: 0;
}
html.is-touch-play:not(.shows-keyboard-hints) .battle-result-overlay .battle-result-card .quiz-result-summary {
  font-size: 13px;
  line-height: 1.35;
}
html.is-touch-play:not(.shows-keyboard-hints) .battle-result-overlay .battle-result-card .quiz-result-summary strong {
  font-size: 18px;
}
html.is-touch-play:not(.shows-keyboard-hints) .battle-result-overlay .battle-result-card .battle-result-sub {
  font-size: 12px;
  line-height: 1.4;
  margin: 0;
  max-width: none;
}
html.is-touch-play:not(.shows-keyboard-hints) .battle-result-overlay .battle-overlay-actions {
  gap: 6px;
  margin-top: 4px;
}
html.is-touch-play:not(.shows-keyboard-hints) .battle-result-overlay .battle-overlay-actions .comic-action-btn {
  padding: 9px 12px;
  font-size: 13px;
}
html.is-landscape-mobile .battle-result-overlay .comic-sticker--md {
  font-size: 9px;
  padding: 2px 5px 3px;
  right: 4px;
}

/* 移动端 · 问答结算 */
html.is-touch-play:not(.shows-keyboard-hints) #screen-quiz-result {
  align-items: center;
  justify-content: center;
  padding: max(10px, env(safe-area-inset-top, 0px)) 12px max(10px, env(safe-area-inset-bottom, 0px));
  gap: 0;
}
html.is-touch-play:not(.shows-keyboard-hints) #screen-quiz-result .comic-card-shell--quiz {
  width: min(300px, 90vw);
  max-width: min(300px, 90vw);
  min-width: 0;
}
html.is-touch-play:not(.shows-keyboard-hints) #screen-quiz-result .quiz-result-card.result-card {
  padding: 14px 14px 12px;
  gap: 6px;
  border-width: 3px;
  box-shadow: var(--comic-shadow-md);
  min-width: 0;
}
html.is-touch-play:not(.shows-keyboard-hints) #screen-quiz-result .quiz-result-card h2 {
  font-size: 20px;
}
html.is-touch-play:not(.shows-keyboard-hints) #screen-quiz-result .quiz-result-summary {
  font-size: 13px;
  line-height: 1.35;
}
html.is-touch-play:not(.shows-keyboard-hints) #screen-quiz-result .quiz-result-summary strong {
  font-size: 18px;
}
html.is-touch-play:not(.shows-keyboard-hints) #screen-quiz-result .result-comment {
  font-size: 12px;
  line-height: 1.45;
  margin: 0;
  max-width: none;
}
html.is-touch-play:not(.shows-keyboard-hints) #screen-quiz-result .btn-primary,
html.is-touch-play:not(.shows-keyboard-hints) #screen-quiz-result .btn-secondary {
  max-width: none;
  padding: 9px 12px;
  font-size: 13px;
  margin-top: 4px;
  border-width: 2.5px;
}
html.is-touch-play:not(.shows-keyboard-hints) #screen-quiz-result .comic-sticker--md {
  font-size: 11px;
  padding: 2px 7px 3px;
  right: 8px;
}
html.is-touch-play:not(.shows-keyboard-hints).is-landscape-mobile #screen-quiz-result {
  justify-content: center;
  gap: 0;
}
html.is-touch-play:not(.shows-keyboard-hints).is-landscape-mobile #screen-quiz-result .comic-card-shell--quiz {
  width: min(280px, 86vw);
  max-width: min(280px, 86vw);
}
html.is-touch-play:not(.shows-keyboard-hints).is-landscape-mobile #screen-quiz-result .quiz-result-card {
  max-height: calc(100dvh - 20px);
  overflow-y: auto;
  padding: 12px 12px 10px;
  gap: 5px;
}
html.is-touch-play:not(.shows-keyboard-hints).is-landscape-mobile #screen-quiz-result .quiz-result-card h2 {
  font-size: 18px;
}
html.is-touch-play:not(.shows-keyboard-hints).is-landscape-mobile #screen-quiz-result .quiz-result-summary strong {
  font-size: 16px;
}

/* 移动端 · 点球挑战说明 */
html.is-touch-play:not(.shows-keyboard-hints) #screen-challenge-setup {
  padding: max(10px, env(safe-area-inset-top, 0px)) 12px max(10px, env(safe-area-inset-bottom, 0px));
  gap: 0;
}
html.is-touch-play:not(.shows-keyboard-hints) #screen-challenge-setup .battle-screen-stack {
  max-width: min(300px, 90vw);
  gap: 4px;
}
html.is-touch-play:not(.shows-keyboard-hints) #screen-challenge-setup .comic-card-shell--battle {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
html.is-touch-play:not(.shows-keyboard-hints) #screen-challenge-setup .challenge-intro-card.quiz-card--comic {
  padding: 14px 14px 12px;
  max-height: none;
}
html.is-touch-play:not(.shows-keyboard-hints) #screen-challenge-setup .battle-card-title {
  font-size: 20px;
  margin-bottom: 0;
}
html.is-touch-play:not(.shows-keyboard-hints) #screen-challenge-setup .challenge-intro-lead,
html.is-touch-play:not(.shows-keyboard-hints) #screen-challenge-setup .challenge-intro-block:first-of-type,
html.is-touch-play:not(.shows-keyboard-hints) #screen-challenge-setup .challenge-intro-label {
  display: none;
}
html.is-touch-play:not(.shows-keyboard-hints) #screen-challenge-setup .challenge-intro-block {
  margin-top: 8px;
  padding-top: 0;
  border-top: none;
}
html.is-touch-play:not(.shows-keyboard-hints) #screen-challenge-setup .challenge-intro-rules {
  font-size: 12px;
  line-height: 1.45;
}
html.is-touch-play:not(.shows-keyboard-hints) #screen-challenge-setup .challenge-intro-rules li + li {
  margin-top: 5px;
}
html.is-touch-play:not(.shows-keyboard-hints) #screen-challenge-setup .challenge-intro-actions {
  margin-top: 10px;
}
html.is-touch-play:not(.shows-keyboard-hints) #screen-challenge-setup .challenge-intro-actions .comic-action-btn {
  min-width: 0;
  width: 100%;
  padding: 9px 12px;
  font-size: 13px;
}
html.is-touch-play:not(.shows-keyboard-hints) #screen-challenge-setup .comic-sticker {
  font-size: 12px;
  padding: 3px 8px 4px;
  right: 10px;
}
html.is-touch-play:not(.shows-keyboard-hints) #screen-challenge-setup .screen-header .btn-back {
  font-size: 13px;
  padding: 6px 10px;
}
html.is-touch-play:not(.shows-keyboard-hints).is-landscape-mobile #screen-challenge-setup .battle-screen-stack {
  max-width: min(280px, 88vw);
}
html.is-touch-play:not(.shows-keyboard-hints).is-landscape-mobile #screen-challenge-setup .challenge-intro-card.quiz-card--comic {
  padding: 10px 12px 8px;
}
html.is-touch-play:not(.shows-keyboard-hints).is-landscape-mobile #screen-challenge-setup .battle-card-title {
  font-size: 18px;
}
html.is-touch-play:not(.shows-keyboard-hints).is-landscape-mobile #screen-challenge-setup .challenge-intro-rules {
  font-size: 11px;
}
html.is-touch-play:not(.shows-keyboard-hints).is-landscape-mobile #screen-challenge-setup .challenge-intro-actions {
  margin-top: 8px;
}

/* 移动端 · 点球射门界面 */
html.is-touch-play:not(.shows-keyboard-hints) #screen-challenge-shoot .shoot-controls {
  padding: 8px 16px max(28px, env(safe-area-inset-bottom, 0px));
  gap: 8px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.62) 0%, rgba(0, 0, 0, 0.34) 48%, transparent 100%);
  position: relative;
  z-index: 6;
}
html.is-touch-play:not(.shows-keyboard-hints) #screen-challenge-shoot .shoot-header {
  position: relative;
  z-index: 6;
  padding-top: max(10px, env(safe-area-inset-top, 0px));
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
html.is-touch-play:not(.shows-keyboard-hints) #screen-challenge-shoot .shoot-header .btn-back {
  min-height: 40px;
  min-width: 72px;
  touch-action: manipulation;
}
html.is-touch-play:not(.shows-keyboard-hints) #screen-challenge-shoot .shoot-hint {
  font-size: 13px;
  line-height: 1.4;
}
html.is-touch-play:not(.shows-keyboard-hints).is-landscape-mobile #screen-challenge-shoot .shoot-controls {
  padding: 6px 14px max(36px, env(safe-area-inset-bottom, 0px));
  gap: 6px;
}
html.is-touch-play:not(.shows-keyboard-hints).is-landscape-mobile #screen-challenge-shoot .shoot-hint {
  font-size: 12px;
  max-width: min(520px, 92vw);
}

/* 移动端 · 点球挑战结算 */
html.is-touch-play:not(.shows-keyboard-hints) #screen-challenge-result {
  align-items: center;
  justify-content: center;
  padding: max(10px, env(safe-area-inset-top, 0px)) 12px max(10px, env(safe-area-inset-bottom, 0px));
}
html.is-touch-play:not(.shows-keyboard-hints) #screen-challenge-result .challenge-result-card.quiz-result-card {
  width: min(300px, 90vw);
  max-width: min(300px, 90vw);
  min-width: 0;
  padding: 14px 14px 12px;
  gap: 6px;
  border-width: 3px;
  box-shadow: var(--comic-shadow-md);
}
html.is-touch-play:not(.shows-keyboard-hints) #screen-challenge-result .challenge-result-card h2 {
  font-size: 20px;
}
html.is-touch-play:not(.shows-keyboard-hints) #screen-challenge-result .challenge-result-icon {
  font-size: 34px;
}
html.is-touch-play:not(.shows-keyboard-hints) #screen-challenge-result .challenge-result-score {
  font-size: 13px;
}
html.is-touch-play:not(.shows-keyboard-hints) #screen-challenge-result .challenge-result-score strong {
  font-size: 22px;
}
html.is-touch-play:not(.shows-keyboard-hints) #screen-challenge-result .challenge-result-score-total {
  font-size: 15px;
}
html.is-touch-play:not(.shows-keyboard-hints) #screen-challenge-result .challenge-result-comment {
  font-size: 12px;
  line-height: 1.45;
  max-width: none;
}
html.is-touch-play:not(.shows-keyboard-hints) #screen-challenge-result .challenge-result-actions {
  gap: 6px;
  margin-top: 2px;
}
html.is-touch-play:not(.shows-keyboard-hints) #screen-challenge-result .challenge-result-actions .comic-action-btn {
  padding: 9px 12px;
  font-size: 13px;
}
html.is-touch-play:not(.shows-keyboard-hints).is-landscape-mobile #screen-challenge-result .challenge-result-card.quiz-result-card {
  width: min(280px, 86vw);
  max-width: min(280px, 86vw);
  max-height: calc(100dvh - 20px);
  overflow-y: auto;
  padding: 12px 12px 10px;
  gap: 5px;
}
html.is-touch-play:not(.shows-keyboard-hints).is-landscape-mobile #screen-challenge-result .challenge-result-card h2 {
  font-size: 18px;
}
html.is-touch-play:not(.shows-keyboard-hints).is-landscape-mobile #screen-challenge-result .challenge-result-icon {
  font-size: 28px;
}
html.is-touch-play:not(.shows-keyboard-hints).is-landscape-mobile #screen-challenge-result .challenge-result-score strong {
  font-size: 20px;
}

/* 横屏 · 自定义球队弹窗（双栏紧凑） */
html.is-landscape-mobile .modal--battle-comic .modal-battle-stack {
  max-height: calc(100dvh - 8px);
}
html.is-landscape-mobile .team-customize-modal.battle-modal-card {
  display: grid;
  grid-template-columns: 92px 1fr;
  column-gap: 10px;
  row-gap: 5px;
  align-items: start;
  max-height: calc(100dvh - 44px);
  overflow-y: auto;
  padding: 10px 12px 8px;
}
html.is-landscape-mobile .team-customize-modal .battle-card-title {
  grid-column: 1 / -1;
  grid-row: 1;
  font-size: 18px;
  margin-bottom: 0;
}
html.is-landscape-mobile .team-customize-modal .team-customize-desc {
  grid-column: 1 / -1;
  grid-row: 2;
  font-size: 11px;
  line-height: 1.35;
  margin-bottom: 2px;
}
html.is-landscape-mobile .team-customize-modal label.team-custom-label {
  grid-column: 2;
  grid-row: 3;
  margin: 0;
  font-size: 11px;
}
html.is-landscape-mobile .team-customize-modal .team-custom-name-row {
  grid-column: 2;
  grid-row: 4;
}
html.is-landscape-mobile .team-customize-modal .team-custom-preview-wrap {
  grid-column: 1;
  grid-row: 3 / 9;
  margin: 0;
  align-self: center;
  justify-content: center;
}
html.is-landscape-mobile .team-customize-modal #team-custom-preview {
  width: 80px;
  height: 80px;
}
html.is-landscape-mobile .team-customize-modal p.team-custom-label {
  grid-column: 2;
  grid-row: 5;
  margin: 0;
  font-size: 11px;
}
html.is-landscape-mobile .team-customize-modal .team-custom-patterns {
  grid-column: 2;
  grid-row: 6;
}
html.is-landscape-mobile .team-customize-modal .team-custom-colors {
  grid-column: 2;
  grid-row: 7;
  margin-top: 0;
  gap: 6px;
}
html.is-landscape-mobile .team-customize-modal .team-custom-random-kit {
  grid-column: 2;
  grid-row: 8;
  margin-top: 0;
  padding: 7px 10px;
  font-size: 12px;
}
html.is-landscape-mobile .team-customize-modal .team-customize-actions {
  grid-column: 1 / -1;
  grid-row: 9;
  margin-top: 4px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
html.is-landscape-mobile .team-customize-modal .team-custom-input {
  padding: 7px 10px;
  font-size: 14px;
}
html.is-landscape-mobile .team-customize-modal .team-custom-mini {
  padding: 7px 8px;
  font-size: 12px;
}
html.is-landscape-mobile .team-customize-modal .team-pattern-btn {
  padding: 6px 4px;
  font-size: 11px;
}
html.is-landscape-mobile .team-customize-modal .team-color-field {
  font-size: 11px;
  gap: 4px;
}
html.is-landscape-mobile .team-customize-modal .team-color-field input[type="color"] {
  height: 32px;
}
html.is-landscape-mobile .team-customize-modal .team-customize-actions .comic-action-btn {
  margin: 0;
  padding: 8px 10px;
  font-size: 13px;
}

/* ========== 手柄模式对战 UI（仅 has-gamepad-p1 / p2 时） ========== */
.battle-move-hud {
  position: relative;
  flex-shrink: 0;
  width: 168px;
  height: var(--battle-input-h, 118px);
  box-sizing: border-box;
}

html.shows-keyboard-hints .battle-hud-local2p .battle-move-hud {
  width: 184px;
}

.battle-stick-hud {
  display: none;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(100%, calc(var(--battle-input-h, 118px) - 8px));
  aspect-ratio: 1;
  height: auto;
  pointer-events: none;
}

.battle-stick-base {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.28));
  border: 2px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 3px 10px rgba(0, 0, 0, 0.4);
}

.battle-stick-knob {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 38%;
  aspect-ratio: 1;
  height: auto;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.42), rgba(160, 160, 160, 0.2));
  border: 2px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.45);
  transition: transform 0.04s linear;
}

html.has-gamepad-p1 .battle-move-hud.is-pad-ui.is-stick-mode,
html.has-gamepad-p2 .battle-move-hud.is-pad-ui.is-stick-mode {
  width: var(--battle-input-h, 118px);
  height: var(--battle-input-h, 118px);
}

.battle-stick-hud--pk {
  width: min(100%, 88px) !important;
}

.battle-stick-hud--pk .battle-stick-base {
  inset: 0;
  border-radius: 50%;
}

html.has-gamepad-p1 #battle-move-hud-home.is-pad-ui.is-stick-mode .battle-stick-hud,
html.has-gamepad-p1 #battle-move-hud-home-local2p.is-pad-ui.is-stick-mode .battle-stick-hud,
html.has-gamepad-p1 #battle-move-hud-pk-home.is-pad-ui.is-stick-mode .battle-stick-hud {
  display: block;
}

html.has-gamepad-p2 #battle-move-hud-away.is-pad-ui.is-stick-mode .battle-stick-hud {
  display: block;
}

html.has-gamepad-p1 #battle-move-hud-home.is-pad-ui.is-stick-mode .battle-dir-pad,
html.has-gamepad-p1 #battle-move-hud-home-local2p.is-pad-ui.is-stick-mode .battle-dir-pad,
html.has-gamepad-p1 #battle-move-hud-pk-home.is-pad-ui.is-stick-mode .battle-dir-pad {
  visibility: hidden;
  pointer-events: none;
}

html.has-gamepad-p2 #battle-move-hud-away.is-pad-ui.is-stick-mode .battle-dir-pad {
  visibility: hidden;
  pointer-events: none;
}

/* 手柄模式 — LB 左上 + Y/X/B/A 十字（+）形面键 */
html.shows-keyboard-hints.has-gamepad-p1 #battle-hud-bottom-single:not(.hidden) .action-bar,
html.shows-keyboard-hints.has-gamepad-p1 #battle-hud-bottom-local2p:not(.hidden) .battle-side-home .action-bar,
html.shows-keyboard-hints.has-gamepad-p2 #battle-hud-bottom-local2p:not(.hidden) .battle-side-away .action-bar {
  --battle-pad-action-size: calc(var(--battle-input-h, 118px) + 16px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 3px;
  width: var(--battle-pad-action-size);
  max-width: var(--battle-pad-action-size);
  height: var(--battle-pad-action-size);
  padding: 3px;
  align-items: center;
  justify-items: center;
  box-sizing: border-box;
}

html.shows-keyboard-hints.has-gamepad-p1 #battle-hud-bottom-single:not(.hidden) .action-row,
html.shows-keyboard-hints.has-gamepad-p1 #battle-hud-bottom-local2p:not(.hidden) .battle-side-home .action-row,
html.shows-keyboard-hints.has-gamepad-p2 #battle-hud-bottom-local2p:not(.hidden) .battle-side-away .action-row {
  display: contents;
}

html.shows-keyboard-hints.has-gamepad-p1 #battle-hud-bottom-single:not(.hidden) .action-bar .act-btn,
html.shows-keyboard-hints.has-gamepad-p1 #battle-hud-bottom-local2p:not(.hidden) .battle-side-home .action-bar .act-btn,
html.shows-keyboard-hints.has-gamepad-p2 #battle-hud-bottom-local2p:not(.hidden) .battle-side-away .action-bar .act-btn {
  width: 100%;
  max-width: 58px;
  height: 100%;
  max-height: 58px;
  min-height: 0;
  aspect-ratio: 1;
  padding: 3px 2px 2px;
  gap: 1px;
  overflow: visible;
  justify-content: center;
  font-size: 10px;
}

/* LB 射门 — 功能区左上（肩键） */
html.shows-keyboard-hints.has-gamepad-p1 #battle-hud-bottom-single:not(.hidden) .act-btn.shoot,
html.shows-keyboard-hints.has-gamepad-p1 #battle-hud-bottom-local2p:not(.hidden) .battle-side-home .act-btn.shoot,
html.shows-keyboard-hints.has-gamepad-p2 #battle-hud-bottom-local2p:not(.hidden) .battle-side-away .act-btn.shoot {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
  align-self: start;
  max-width: 50px;
  max-height: 50px;
}

/* Y 上 */
html.shows-keyboard-hints.has-gamepad-p1 #battle-hud-bottom-single:not(.hidden) .act-btn.switch,
html.shows-keyboard-hints.has-gamepad-p1 #battle-hud-bottom-local2p:not(.hidden) .battle-side-home .act-btn.switch,
html.shows-keyboard-hints.has-gamepad-p2 #battle-hud-bottom-local2p:not(.hidden) .battle-side-away .act-btn.switch {
  grid-column: 2;
  grid-row: 1;
}

/* X 左 */
html.shows-keyboard-hints.has-gamepad-p1 #battle-hud-bottom-single:not(.hidden) .act-btn.pass,
html.shows-keyboard-hints.has-gamepad-p1 #battle-hud-bottom-local2p:not(.hidden) .battle-side-home .act-btn.pass,
html.shows-keyboard-hints.has-gamepad-p2 #battle-hud-bottom-local2p:not(.hidden) .battle-side-away .act-btn.pass {
  grid-column: 1;
  grid-row: 2;
}

/* B 右 */
html.shows-keyboard-hints.has-gamepad-p1 #battle-hud-bottom-single:not(.hidden) .act-btn.tackle,
html.shows-keyboard-hints.has-gamepad-p1 #battle-hud-bottom-local2p:not(.hidden) .battle-side-home .act-btn.tackle,
html.shows-keyboard-hints.has-gamepad-p2 #battle-hud-bottom-local2p:not(.hidden) .battle-side-away .act-btn.tackle {
  grid-column: 3;
  grid-row: 2;
}

/* A 下 */
html.shows-keyboard-hints.has-gamepad-p1 #battle-hud-bottom-single:not(.hidden) .act-btn.dash,
html.shows-keyboard-hints.has-gamepad-p1 #battle-hud-bottom-local2p:not(.hidden) .battle-side-home .act-btn.dash,
html.shows-keyboard-hints.has-gamepad-p2 #battle-hud-bottom-local2p:not(.hidden) .battle-side-away .act-btn.dash {
  grid-column: 2;
  grid-row: 3;
}

html.shows-keyboard-hints.has-gamepad-p1 .battle-side-home .act-key-pad,
html.shows-keyboard-hints.has-gamepad-p2 .battle-side-away .act-key-pad,
html.shows-keyboard-hints.has-gamepad-p1 #battle-hud-bottom-single:not(.hidden) .act-key-pad {
  font-size: 11px;
  font-weight: 800;
  min-width: 0;
  line-height: 1;
  text-align: center;
  padding: 1px 3px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

html.shows-keyboard-hints.has-gamepad-p1 #battle-hud-bottom-single:not(.hidden) .act-btn.shoot .act-key-pad,
html.shows-keyboard-hints.has-gamepad-p1 .battle-side-home .act-btn.shoot .act-key-pad,
html.shows-keyboard-hints.has-gamepad-p2 .battle-side-away .act-btn.shoot .act-key-pad {
  font-size: 10px;
  min-width: 0;
}

html.shows-keyboard-hints.has-gamepad-p1 #battle-hud-bottom-single:not(.hidden) .action-bar .act-label,
html.shows-keyboard-hints.has-gamepad-p1 #battle-hud-bottom-local2p:not(.hidden) .battle-side-home .action-bar .act-label,
html.shows-keyboard-hints.has-gamepad-p2 #battle-hud-bottom-local2p:not(.hidden) .battle-side-away .action-bar .act-label {
  font-size: 10px;
  line-height: 1.05;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0;
  transform: scale(0.95);
  transform-origin: center center;
}

html.shows-keyboard-hints.has-gamepad-p1 #battle-hud-bottom-single:not(.hidden) .act-btn.shoot .act-label,
html.shows-keyboard-hints.has-gamepad-p1 .battle-side-home .act-btn.shoot .act-label,
html.shows-keyboard-hints.has-gamepad-p2 .battle-side-away .act-btn.shoot .act-label {
  font-weight: 600;
}
