:root {
  --team-primary: #62b7ff;
  --team-secondary: #ffffff;
  --ink: #172217;
  --muted: #5f6d56;
  --panel: rgba(255, 255, 248, 0.94);
  --panel-border: rgba(255, 255, 255, 0.42);
  --court-image: url("../image/court/%E4%BF%AF%E8%A7%862.png");
  --penalty-court-image: url("../image/court/%E6%9C%89%E8%A7%82%E4%BC%97/%E7%82%B9%E7%90%83_%E6%97%A0%E7%90%83%E7%89%882.png");
  --soccer-image: url("../image/soccer/%E8%B6%B3%E7%90%833.svg");
  --figure-stand-front: url("../image/figure/%E5%88%9D%E5%A7%8B%E4%BA%BA%E7%89%A9/%E4%BA%BA%E8%AE%BE%E5%9B%BE_%E7%AB%99%E7%AB%8B%E6%AD%A3%E9%9D%A2.png");
  --figure-stand-back: url("../image/figure/%E5%88%9D%E5%A7%8B%E4%BA%BA%E7%89%A9/%E4%BA%BA%E8%AE%BE%E5%9B%BE_%E7%AB%99%E7%AB%8B%E8%83%8C%E5%BD%B1.png");
  --gesture-coach-left: 420px;
  --gesture-coach-top: 136px;
  --gesture-coach-width: 282px;
  --gesture-arrow-left: -172px;
  --gesture-arrow-top: 20px;
  --gesture-arrow-width: 156px;
  --gesture-arrow-height: 96px;
  --gesture-arrow-rotate: -2deg;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  background: #12382e;
}

button {
  font: inherit;
}

.app-shell,
.game-stage {
  min-height: 100vh;
}

.game-stage {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #12382e;
}

.stadium-bg,
.stadium-vignette,
.stadium-lights {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.stadium-bg {
  z-index: -4;
  background-image: var(--court-image);
  background-position: center;
  background-size: cover;
  filter: saturate(1.08) contrast(1.04);
  transform: scale(1.03);
}

.is-walkout .stadium-bg,
.is-stadiumIntro .stadium-bg,
.is-penalty .stadium-bg {
  background-image: var(--penalty-court-image);
}

.is-start .stadium-bg {
  filter: saturate(1.12) contrast(1.03) brightness(1.1);
  transform: scale(1.01);
}

.is-start .stadium-vignette {
  background:
    radial-gradient(circle at 48% 46%, rgba(255, 244, 115, 0.12), transparent 36%),
    linear-gradient(90deg, rgba(1, 64, 35, 0.28), transparent 28%, transparent 72%, rgba(1, 64, 35, 0.14)),
    linear-gradient(180deg, rgba(8, 25, 23, 0.06), rgba(8, 25, 23, 0.02) 34%, rgba(8, 25, 23, 0.1));
}

.stadium-vignette {
  z-index: -3;
  background:
    linear-gradient(180deg, rgba(8, 25, 23, 0.46), rgba(8, 25, 23, 0.04) 34%, rgba(8, 25, 23, 0.34)),
    radial-gradient(circle at 50% 48%, rgba(255, 240, 165, 0.2), transparent 36%);
}

.stadium-lights {
  z-index: -2;
  opacity: 0.72;
  background:
    radial-gradient(ellipse at 20% -8%, rgba(255, 245, 210, 0.48), transparent 29%),
    radial-gradient(ellipse at 80% -8%, rgba(255, 245, 210, 0.38), transparent 29%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.25), transparent 18%, transparent 82%, rgba(0, 0, 0, 0.25));
}

.flashbulb-layer {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 4;
  height: 44vh;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
}

.is-penalty .flashbulb-layer,
.is-result .flashbulb-layer {
  opacity: 1;
}

.is-result .flashbulb-layer {
  z-index: 24;
}

.flashbulb {
  position: absolute;
  left: var(--flash-x);
  top: var(--flash-y);
  width: var(--flash-size);
  height: var(--flash-size);
  background:
    linear-gradient(90deg, transparent 0 42%, rgba(255, 255, 255, 0.95) 49% 51%, transparent 58% 100%),
    linear-gradient(0deg, transparent 0 42%, rgba(255, 255, 255, 0.95) 49% 51%, transparent 58% 100%),
    linear-gradient(45deg, transparent 0 45%, rgba(210, 236, 255, 0.72) 49% 51%, transparent 55% 100%),
    linear-gradient(-45deg, transparent 0 45%, rgba(210, 236, 255, 0.72) 49% 51%, transparent 55% 100%),
    radial-gradient(circle, #fff 0 7%, rgba(232, 245, 255, 0.95) 8% 13%, rgba(255, 255, 255, 0.34) 14% 22%, transparent 24%);
  filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.9)) drop-shadow(0 0 5px rgba(164, 214, 255, 0.62));
  transform: translate(-50%, -50%) rotate(var(--flash-rotate)) scale(0.45);
  mix-blend-mode: screen;
  animation: flashbulbPop var(--flash-duration) ease-out forwards;
}

.flashbulb::before,
.flashbulb::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.flashbulb::before {
  width: 18%;
  height: 18%;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 3px rgba(255, 255, 255, 0.95), 0 0 7px rgba(169, 220, 255, 0.68);
}

.flashbulb::after {
  width: 110%;
  height: 110%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0 5%, transparent 34%);
}

@keyframes flashbulbPop {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(var(--flash-rotate)) scale(0.35);
  }
  12% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(var(--flash-rotate)) scale(1.08);
  }
  26% {
    opacity: 0.88;
    transform: translate(-50%, -50%) rotate(var(--flash-rotate)) scale(0.92);
  }
  58% {
    opacity: 0.38;
    transform: translate(-50%, -50%) rotate(var(--flash-rotate)) scale(0.72);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(var(--flash-rotate)) scale(0.55);
  }
}

.hidden {
  display: none !important;
}

.screen-layer {
  position: absolute;
  inset: 0;
  z-index: 20;
  padding: 28px;
}

.start-screen {
  display: grid;
  align-content: center;
  justify-items: start;
  padding-left: clamp(28px, 8vw, 132px);
  color: #fff;
  overflow: hidden;
}

.start-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 74% 58%, rgba(255, 248, 164, 0.16), transparent 26%),
    linear-gradient(90deg, rgba(5, 70, 34, 0.34), rgba(22, 121, 38, 0.1) 46%, rgba(5, 80, 34, 0.16)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 42%);
}

.start-content {
  position: relative;
  z-index: 2;
  width: min(860px, 55vw);
  transform: translateY(-2vh);
}

.start-year {
  position: absolute;
  left: 32%;
  top: 12%;
  z-index: 0;
  color: rgba(255, 246, 128, 0.2);
  font-size: clamp(140px, 23vw, 370px);
  font-weight: 950;
  font-style: italic;
  line-height: 0.8;
  pointer-events: none;
  user-select: none;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  color: #fff7c7;
  font-size: 13px;
  font-weight: 900;
  background: rgba(21, 84, 50, 0.58);
  backdrop-filter: blur(10px);
}

.start-screen h1 {
  display: grid;
  gap: 4px;
  margin: 22px 0 0;
  font-size: clamp(40px, 5.2vw, 92px);
  font-style: italic;
  font-weight: 950;
  line-height: 0.78;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow: 0 7px 0 rgba(0, 0, 0, 0.22), 0 22px 30px rgba(0, 0, 0, 0.28);
}

.start-screen h1 span:first-child {
  color: #fff;
}

.start-screen h1 span:last-child {
  color: #ffe72e;
  text-shadow: 0 6px 0 rgba(85, 82, 0, 0.26), 0 18px 28px rgba(0, 0, 0, 0.34);
}

.start-screen p {
  width: min(760px, 88vw);
  margin: 20px 0 30px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(17px, 1.7vw, 23px);
  font-weight: 700;
  line-height: 1.55;
}

.start-points {
  display: grid;
  gap: 12px;
  margin: clamp(20px, 3vw, 36px) 0 clamp(20px, 3vw, 34px);
  padding: 0;
  list-style: none;
}

.start-points li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: clamp(16px, 1.7vw, 26px);
  font-weight: 950;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.38);
}

.start-points li img {
  display: block;
  flex: 0 0 auto;
  width: clamp(28px, 2.5vw, 40px);
  height: clamp(28px, 2.5vw, 40px);
  object-fit: contain;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.22));
}

.mega-button {
  min-height: 62px;
  padding: 0 30px;
  border: 0;
  border-radius: 8px;
  color: #172217;
  font-size: 21px;
  font-weight: 900;
  background: linear-gradient(180deg, #fff3a3, #ffbf3f);
  box-shadow: inset 0 -7px 0 rgba(145, 83, 0, 0.22), 0 16px 34px rgba(0, 0, 0, 0.28);
  cursor: pointer;
}

.mega-button:hover {
  filter: brightness(1.05);
}

.mega-button.small {
  min-height: 50px;
  padding: 0 22px;
  font-size: 17px;
}

.start-button-art {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: clamp(9px, 1.1vw, 16px);
  width: min(373px, 34.7vw);
  min-height: auto;
  aspect-ratio: 1080 / 296;
  margin: clamp(-22px, -1.4vw, -10px) 0 0 clamp(-24px, -1.8vw, -10px);
  padding: 0 8%;
  color: #20251e;
  font-size: clamp(15px, 1.8vw, 29px);
  font-style: italic;
  text-transform: uppercase;
  white-space: nowrap;
  background: url("../image/start-screen/%E6%8C%89%E9%92%AE%E7%B4%A0%E6%9D%90.png") center / 100% 100% no-repeat;
  box-shadow: none;
  filter: drop-shadow(0 18px 20px rgba(42, 67, 0, 0.34));
}

.start-button-art .start-button-ball,
.start-button-art span {
  transform: translateX(clamp(-20px, -1.4vw, -10px));
}

.start-button-art:hover {
  filter: brightness(1.04) drop-shadow(0 18px 20px rgba(42, 67, 0, 0.34));
}

.start-button-ball {
  flex: 0 0 auto;
  width: clamp(29px, 2.9vw, 48px);
  height: clamp(29px, 2.9vw, 48px);
  object-fit: contain;
}

.start-button-art span {
  white-space: nowrap;
}

.start-player {
  position: absolute;
  right: clamp(18px, 6vw, 132px);
  bottom: clamp(70px, 7vw, 116px);
  z-index: 2;
  width: min(70.5vw, 1035px);
  filter: saturate(1.08) contrast(1.04) drop-shadow(0 26px 28px rgba(0, 0, 0, 0.36));
  pointer-events: none;
  user-select: none;
}

.team-screen {
  display: grid;
  place-items: center;
  background: rgba(7, 24, 20, 0.4);
  backdrop-filter: blur(1px);
}

.team-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 16px;
  width: min(1180px, 96vw);
  height: min(780px, calc(100vh - 48px));
}

.team-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  color: #fff;
}

.team-hero h2 {
  margin: 10px 0 0;
  font-size: clamp(34px, 4.5vw, 62px);
  line-height: 1;
  text-shadow: 0 16px 34px rgba(0, 0, 0, 0.34);
}

.team-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 16px;
  min-height: 0;
}

.panel,
.hud {
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(12px);
}

.panel-title {
  margin-bottom: 12px;
  color: #2b4c31;
  font-size: 14px;
  font-weight: 900;
}

.select-panel,
.select-board {
  min-height: 0;
  padding: 16px;
  overflow: hidden;
}

.select-board {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  max-height: calc(100% - 30px);
  overflow: auto;
  padding-right: 4px;
}


.team-card {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 50px;
  padding: 7px 9px;
  border: 1px solid rgba(29, 62, 38, 0.14);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
  cursor: pointer;
}

.team-card:hover,
.team-card.active {
  border-color: rgba(255, 184, 43, 0.95);
  background: #fff8df;
  box-shadow: inset 0 -4px 0 rgba(255, 184, 43, 0.35);
}

.team-card span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 900;
}

.flag-img {
  display: inline-block;
  width: 34px;
  height: 26px;
  object-fit: contain;
  vertical-align: middle;
  border-radius: 4px;
  background: transparent;
  box-shadow: none;
}

.flag-img.large {
  width: 62px !important;
  height: 46px !important;
}

.flag-img.mini {
  width: 22px !important;
  height: 16px !important;
}



.selected-card {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding: 12px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, rgba(23, 73, 45, 0.95), rgba(21, 43, 36, 0.95));
}

.selected-card span {
  display: block;
  color: #fff1a0;
  font-size: 12px;
  font-weight: 900;
}

.selected-card strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 26px;
  line-height: 1.1;
}

.player-art-card {
  display: grid;
  gap: 10px;
  min-height: 0;
  overflow: hidden;
}

.player-art-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  min-height: 0;
  border-radius: 8px;
  background: #d8dbd6;
  filter: saturate(1.05) contrast(1.02);
}

.player-art-card img + img {
  object-position: center 38%;
}

.leaderboard-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.leaderboard-list.compact {
  max-height: calc(100% - 288px);
  overflow: auto;
}

.result-screen {
  display: grid;
  place-items: center;
  color: #fff;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(0, 55, 34, 0.18), rgba(6, 66, 23, 0.22)),
    url("../image/court/%E6%9C%89%E8%A7%82%E4%BC%97/%E7%82%B9%E7%90%83_%E6%97%A0%E7%90%83%E7%89%882.png") center / cover no-repeat,
    #0b562b;
}

.result-shell {
  display: grid;
  grid-template-rows: auto;
  align-content: center;
  gap: 16px;
  width: min(1120px, 96vw);
  min-height: min(780px, calc(100vh - 24px));
  padding: 18px 0;
}

.result-shell.show-board {
  grid-template-rows: minmax(0, 1fr);
  align-content: stretch;
  width: min(1180px, 96vw);
  height: min(920px, calc(100vh - 48px));
  min-height: 0;
  padding: 0;
}

.result-shell.show-board .result-head {
  display: none;
}

.result-head {
  position: relative;
  min-height: min(700px, calc(100vh - 42px));
  overflow: hidden;
  padding: clamp(34px, 5vw, 58px) clamp(22px, 4vw, 52px) 24px;
  text-align: center;
  isolation: isolate;
}

.result-head h2 {
  margin: 0;
  color: #202128;
  font-size: clamp(52px, 8vw, 122px);
  font-weight: 950;
  line-height: 0.9;
  text-shadow: 0 3px 0 #f6c23b, 0 7px 0 rgba(255, 255, 255, 0.42), 0 12px 18px rgba(65, 38, 0, 0.42);
}

.result-head p {
  margin: 0;
  color: #4b2519;
  font-size: clamp(18px, 2vw, 30px);
  font-weight: 900;
}

.result-actions {
  position: absolute;
  left: 50%;
  bottom: 14px;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 28px);
  width: min(980px, 88vw);
  transform: translateX(-50%);
}

.result-button {
  min-height: clamp(58px, 7vw, 82px);
  border: 0;
  border-radius: 8px;
  color: #fff;
  font-size: clamp(17px, 2.2vw, 27px);
  font-weight: 950;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: inset 0 -6px 0 rgba(0, 0, 0, 0.24), 0 12px 18px rgba(0, 0, 0, 0.28);
}

.result-button-gold {
  color: #2b2414;
  background: linear-gradient(#ffd94a, #f3a914);
}

.result-button-blue {
  background: linear-gradient(#2d94ff, #075bd8);
}

.result-button-dark {
  background: linear-gradient(#203764, #0b1735);
}

.result-banner {
  position: absolute;
  left: 50%;
  top: clamp(-158px, -13vh, -102px);
  z-index: 1;
  width: min(1000px, 90vw);
  transform: translateX(-50%);
  mix-blend-mode: screen;
  filter: saturate(1.16) contrast(1.12) drop-shadow(0 18px 22px rgba(50, 30, 0, 0.38));
  pointer-events: none;
  user-select: none;
}

.result-banner-copy {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: min(860px, 80vw);
  margin: 0 auto;
  min-height: clamp(230px, 30vw, 360px);
  padding-top: clamp(92px, 12vw, 150px);
  transform: translateY(-43px);
}

.result-banner-copy h2 {
  display: flex;
  justify-content: center;
  gap: 0.01em;
  max-width: 100%;
  white-space: nowrap;
  transform: perspective(720px) rotateX(8deg) scaleX(var(--title-fit, 1)) scaleY(0.94);
  transform-origin: center bottom;
}

.arc-letter {
  display: inline-block;
  transform: translateY(var(--arc-y)) rotate(var(--arc-rotate));
  transform-origin: center 80%;
}

.result-thanks {
  position: relative;
  z-index: 4;
  margin-top: clamp(0px, 1vw, 8px);
  letter-spacing: 1px;
  text-shadow: 0 2px 0 rgba(255, 218, 74, 0.38);
  display: flex;
  justify-content: center;
  gap: 0.01em;
  transform: translateY(-36px) perspective(620px) rotateX(-7deg) scaleX(0.96);
  transform-origin: center top;
}

.result-stats {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 2.2vw, 28px);
  margin-top: clamp(12px, 2.2vw, 30px);
  transform: translateY(-54px);
  color: #fff;
  text-shadow: 0 4px 0 rgba(0, 0, 0, 0.3), 0 10px 22px rgba(0, 0, 0, 0.28);
}

.result-stats div:not(.result-stat-divider) {
  display: grid;
  gap: 4px;
  min-width: 150px;
}

.result-stats strong {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.12em;
  font-size: clamp(72px, 9.8vw, 136px);
  font-weight: 950;
  line-height: 0.9;
  min-width: 2.8em;
}

.result-stat-small,
.result-stat-plus {
  font: inherit;
  line-height: inherit;
}

.result-stats span {
  font-size: clamp(22px, 2.6vw, 34px);
  font-weight: 950;
}

.result-stats div:last-child strong {
  color: #ffd735;
}

.result-stat-divider {
  width: 3px;
  height: clamp(76px, 9vw, 116px);
  background: rgba(255, 255, 255, 0.46);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.28);
}

.result-celebrator {
  position: absolute;
  left: clamp(-42px, 0.8vw, 16px);
  bottom: clamp(92px, 12vw, 132px);
  z-index: 20;
  width: clamp(230px, 30vw, 410px);
  mix-blend-mode: normal;
  filter: saturate(1.08) contrast(1.08) brightness(1.12) drop-shadow(0 18px 22px rgba(0, 0, 0, 0.38));
  opacity: 1;
  pointer-events: none;
  user-select: none;
}

/* max-width: 820px — 结算界面由 JS scaleResultHead() 处理，此处不覆盖 */

.ghost-button {
  min-height: 50px;
  padding: 0 20px;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 8px;
  color: #fff;
  font-size: 17px;
  font-weight: 900;
  background: rgba(13, 49, 36, 0.68);
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.result-board {
  position: relative;
  display: grid;
  grid-template-rows: auto auto clamp(270px, 24vw, 330px) minmax(0, 1fr);
  gap: 14px;
  min-height: 0;
  padding: 18px;
  overflow: hidden;
  color: var(--ink);
}

.result-shell:not(.show-board) .result-board {
  display: none;
}

.rankings-close {
  position: sticky;
  top: 0;
  justify-self: end;
  z-index: 5;
  width: 40px;
  height: 40px;
  margin: -6px -6px -42px 0;
  border: 0;
  border-radius: 50%;
  color: #18311f;
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
  cursor: pointer;
}

.support-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.support-head .panel-title {
  margin-bottom: 5px;
}

.support-head strong {
  display: block;
  font-size: 28px;
  line-height: 1;
}

.support-legend {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.podium-list {
  position: relative;
  min-height: 0;
  height: 100%;
  overflow: visible;
  isolation: isolate;
}

.podium-list::before {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 0;
  height: 60%;
  content: "";
  background: url("../image/other/podium.svg") center bottom / 100% 100% no-repeat;
}

.podium-card {
  position: absolute;
  z-index: 1;
  bottom: 59%;
  left: 50%;
  width: min(16%, 135px);
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  gap: 4px;
  min-height: 0;
  padding: 8px 10px 10px;
  border: 1px solid rgba(28, 86, 52, 0.1);
  border-radius: 8px;
  text-align: center;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 26px rgba(28, 86, 52, 0.12);
  backdrop-filter: blur(8px);
}

.podium-card.first {
  background: rgba(255, 250, 217, 0.9);
  box-shadow: 0 14px 30px rgba(120, 84, 0, 0.16);
}

.podium-card.second {
  bottom: 45%;
  left: 16.7%;
}

.podium-card.third {
  bottom: 41%;
  left: 83.3%;
}

.podium-card.active {
  border-color: rgba(255, 184, 43, 0.95);
}

.podium-medal {
  display: none;
}

.podium-card.first .podium-medal {
  display: none;
}

.podium-flag {
  width: 32px;
  height: 32px;
}

.podium-card strong {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.podium-card small {
  display: none;
}

.podium-card em {
  color: #155e35;
  font-size: 22px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
}

.podium-step {
  display: none;
}

.podium-card.first .podium-step {
  display: none;
}

.podium-card.second .podium-step {
  display: none;
}

.support-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-content: start;
  gap: 10px;
  min-height: 0;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: auto;
  list-style: none;
}

.leaderboard-item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 50px;
  padding: 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.66);
  box-shadow: inset 0 -3px 0 rgba(64, 120, 30, 0.1);
}

.leaderboard-item.active {
  background: #fff3c2;
}

.rank {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  background: #235c3b;
}

.leader-team {
  min-width: 0;
}

.leader-team strong,
.leader-team small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leader-team strong {
  font-size: 14px;
}

.leader-team small {
  color: var(--muted);
  font-size: 11px;
}

.score {
  color: #185a32;
  font-size: 22px;
  font-weight: 900;
}

.walkout-screen {
  display: grid;
  place-items: center;
  pointer-events: none;
}

.walkout-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(8, 20, 18, 0.7), transparent 32%, transparent 68%, rgba(8, 20, 18, 0.7)),
    radial-gradient(circle at 50% 65%, rgba(255, 216, 90, 0.26), transparent 30%);
}

.walkout-copy {
  display: none;
  align-items: center;
  gap: 14px;
  margin-bottom: 10vh;
  padding: 14px 18px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 8px;
  color: #fff;
  font-size: clamp(20px, 3vw, 34px);
  font-weight: 900;
  background: rgba(10, 33, 27, 0.76);
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(12px);
}

.walkout-countdown {
  max-width: min(1360px, 96vw);
  color: #fff8c9;
  font-size: clamp(44px, 6.1vw, 102px);
  font-weight: 950;
  line-height: 1.02;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 6px 0 rgba(24, 91, 43, 0.6), 0 20px 40px rgba(0, 0, 0, 0.42);
  transition: opacity 260ms ease, transform 260ms ease;
}

.walkout-countdown span {
  display: block;
  white-space: nowrap;
}

.walkout-countdown.hide {
  opacity: 0;
  transform: translateY(-14px) scale(0.96);
}

.is-stadiumIntro .stadium-bg {
  animation: cameraSweep 1.9s ease-in-out both;
}

@keyframes cameraSweep {
  0% {
    transform: scale(1.16) translateX(3vw);
  }
  48% {
    transform: scale(1.16) translateX(-3vw);
  }
  100% {
    transform: scale(1.03) translateX(0);
  }
}

.game-ui {
  opacity: 0;
  pointer-events: none;
  transition: opacity 260ms ease;
}

.is-penalty .game-ui,
.is-stadiumIntro .goal-scene {
  opacity: 1;
  pointer-events: auto;
}

.is-result .game-ui {
  opacity: 0;
  pointer-events: none;
}

.is-start .goal-scene,
.is-teamSelect .goal-scene {
  display: none;
}

.hud-score {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 66px;
  padding: 10px 16px;
}

.hud-label {
  display: block;
  color: #5f6d56;
  font-size: 12px;
  line-height: 1;
}

.hud strong {
  font-size: 30px;
  line-height: 1;
}

.shot-timer {
  min-width: 78px;
}

.shot-timer.warning strong {
  color: #f05a28;
  animation: timerPulse 520ms ease-in-out infinite alternate;
}

@keyframes timerPulse {
  to {
    transform: scale(1.08);
    text-shadow: 0 0 16px rgba(240, 90, 40, 0.48);
  }
}

.team-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 150px;
  font-weight: 900;
}

.leaderboard {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 5;
  width: min(330px, calc(100vw - 36px));
  padding: 14px;
}

.camera-panel {
  position: absolute;
  top: 102px;
  left: 18px;
  z-index: 5;
  width: 250px;
  padding: 10px;
}

/* ── 手势引导卡片（无全屏蒙版，贴 camera-panel 下方） ── */
.gesture-onboard-overlay {
  position: absolute;
  inset: 0;
  z-index: 55;
  /* 全屏半透明黑色蒙版 */
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 260ms ease, visibility 260ms ease;
}

.gesture-onboard-overlay.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* 蒙版显示时，球门区和射击按钮浮到蒙版之上，保持可点击 */
.is-penalty .gesture-onboard-overlay.show ~ .goal-scene,
.is-penalty .gesture-onboard-overlay.show ~ .control-dock {
  z-index: 60;
  pointer-events: auto;
}

/* 黄色高亮描边 camera-panel */
.is-penalty .camera-panel.onboard-highlight {
  z-index: 60;
  box-shadow: 0 0 0 3px rgba(255, 220, 60, 0.95),
              0 0 18px rgba(255, 220, 60, 0.45);
  border-radius: 10px;
  transition: box-shadow 240ms ease;
}

/* 引导卡片：黄色圆角样式（参考图1） */
.gesture-onboard-card {
  position: absolute;
  left: 18px;
  top: 374px;
  z-index: 61;
  width: 250px;
  padding: 13px 15px 12px;
  border-radius: 10px;
  background: linear-gradient(160deg, #ffe234 0%, #f5b800 100%);
  box-shadow: 0 4px 18px rgba(180, 120, 0, 0.38),
              inset 0 -3px 0 rgba(0,0,0,0.10);
  /* 只有卡片本身接收点击，不拦截游戏其他区域 */
  pointer-events: auto;
}

.gesture-onboard-card h3 {
  margin: 0 0 5px;
  font-size: 14px;
  font-weight: 900;
  color: #1a1a00;
  display: flex;
  align-items: center;
  gap: 5px;
  line-height: 1.2;
}

.gesture-onboard-card p {
  margin: 0 0 11px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
  color: rgba(30, 24, 0, 0.82);
}

.gesture-onboard-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.onboard-btn {
  min-height: 34px;
  border: 0;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  transition: filter 140ms, transform 100ms;
}

.onboard-btn:hover  { filter: brightness(1.08); }
.onboard-btn:active { transform: scale(0.97); }

.onboard-btn-gesture {
  background: linear-gradient(180deg, #2d7a3a, #1a5226);
  color: #fff;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,0.22);
}

.onboard-btn-click {
  background: rgba(0, 0, 0, 0.14);
  border: 1.5px solid rgba(0,0,0,0.22);
  color: #1a1a00;
}

/* 倒计时圆圈 */
.gesture-onboard-timer {
  position: absolute;
  top: -12px;
  right: 10px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #f05a28;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.28);
}

/* 移动端横屏：卡片移到底部居中 */
@media (max-height: 500px) {
  .gesture-onboard-card {
    left: 50%;
    top: auto;
    bottom: 60px;
    transform: translateX(-50%);
    width: min(320px, 68vw);
  }
}

.gesture-coach {
  position: absolute;
  left: var(--gesture-coach-left);
  top: var(--gesture-coach-top);
  z-index: 8;
  display: none;
  gap: 2px;
  width: var(--gesture-coach-width);
  padding: 10px 14px;
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: 8px;
  color: #2b2414;
  background: linear-gradient(180deg, #ffec66, #ffc72e);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.28), inset 0 -4px 0 rgba(150, 94, 0, 0.22);
  font-weight: 950;
  pointer-events: none;
}

.gesture-coach.show {
  display: grid;
  opacity: 1;
}

.gesture-coach span {
  font-size: 13px;
  line-height: 1.25;
}

.gesture-coach-arrow {
  position: absolute;
  left: var(--gesture-arrow-left);
  top: var(--gesture-arrow-top);
  width: var(--gesture-arrow-width);
  height: var(--gesture-arrow-height);
  background: url("../image/other/arrow.png") center / contain no-repeat;
  filter: drop-shadow(0 0 10px rgba(255, 221, 46, 0.85));
  transform: rotate(var(--gesture-arrow-rotate));
  transform-origin: right center;
}

.camera-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-weight: 900;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: #235c3b;
  cursor: pointer;
}

.camera-view {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid rgba(49, 91, 31, 0.18);
  border-radius: 8px;
  background: #193b16;
}

.camera-view video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

.camera-view canvas {
  display: none;
}

.camera-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 14px;
  color: #e7ffd1;
  text-align: center;
  font-size: 13px;
}

.camera-view.has-video .camera-fallback {
  display: none;
}

.gesture-status {
  display: none;
}

.goal-scene {
  position: absolute;
  left: 50%;
  top: 54%;
  z-index: 3;
  width: min(760px, 76vw);
  height: min(610px, 78vh);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.goal-frame {
  position: absolute;
  left: 50%;
  top: 0;
  width: min(560px, 72vw);
  height: 250px;
  transform: translateX(-50%) perspective(560px) rotateX(-7deg);
  border: 12px solid #f9fff0;
  border-bottom-width: 9px;
  border-radius: 8px;
  background: rgba(15, 95, 46, 0.26);
  box-shadow: 0 16px 0 rgba(27, 79, 38, 0.22), 0 20px 46px rgba(0, 0, 0, 0.25);
  pointer-events: auto;
}

.is-walkout .goal-frame,
.is-stadiumIntro .goal-frame,
.is-penalty .goal-frame {
  top: 70px;
  width: min(560px, 54vw);
  height: 150px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.net {
  position: absolute;
  inset: 0;
  opacity: 0.9;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.62) 2px, transparent 2px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.62) 2px, transparent 2px);
  background-size: 34px 28px;
}

.is-walkout .net,
.is-stadiumIntro .net,
.is-penalty .net {
  display: none;
}

.target-zone {
  position: absolute;
  display: none;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.38);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.74);
  background: rgba(47, 109, 24, 0.08);
  cursor: crosshair;
}

.aim-curve {
  position: absolute;
  inset: 0;
  z-index: 5;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.aim-curve path {
  fill: none;
  stroke: rgba(255, 243, 95, 0.92);
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-dasharray: 4 3;
  filter: drop-shadow(0 0 5px rgba(255, 243, 95, 0.8));
}

.wall-line {
  position: absolute;
  left: 50%;
  top: 36%;
  z-index: 5;
  width: min(560px, 60vw);
  height: 150px;
  transform: translateX(-50%);
  pointer-events: none;
}

.wall-player {
  position: absolute;
  bottom: 0;
  width: clamp(62px, 8.2vw, 96px);
  height: clamp(96px, 12.8vw, 150px);
  transform: translateX(-50%);
  transform-origin: center bottom;
}

.wall-player img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  mix-blend-mode: normal;
  pointer-events: none;
  user-select: none;
}

.target-zone span {
  opacity: 0;
  font-size: 11px;
  font-weight: 900;
  text-shadow: 0 2px 0 rgba(24, 61, 12, 0.5);
}

.target-zone:hover span,
.target-zone.active span {
  opacity: 1;
}

.target-zone.active {
  border-color: #ffd85a;
  background: radial-gradient(circle, rgba(255, 216, 90, 0.58), rgba(255, 216, 90, 0.08) 70%);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.28), 0 0 24px rgba(255, 216, 90, 0.6);
}

.zone-left-top {
  left: 2%;
  top: 3%;
  width: 31%;
  height: 45%;
}

.zone-center-top {
  left: 34.5%;
  top: 3%;
  width: 31%;
  height: 45%;
}

.zone-right-top {
  right: 2%;
  top: 3%;
  width: 31%;
  height: 45%;
}

.zone-left-low {
  left: 7%;
  bottom: 5%;
  width: 38%;
  height: 42%;
}

.zone-right-low {
  right: 7%;
  bottom: 5%;
  width: 38%;
  height: 42%;
}

.aim-reticle {
  position: absolute;
  z-index: 5;
  width: 34px;
  height: 34px;
  transform: translate(-50%, -50%);
  border: 3px solid #fff35f;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(255, 243, 95, 0.24), 0 0 24px rgba(255, 243, 95, 0.58);
  pointer-events: none;
  transition: left 120ms linear, top 120ms linear;
}

.aim-reticle::before,
.aim-reticle::after {
  content: "";
  position: absolute;
  background: #fff35f;
}

.aim-reticle::before {
  left: 50%;
  top: -8px;
  width: 3px;
  height: 46px;
  transform: translateX(-50%);
}

.aim-reticle::after {
  left: -8px;
  top: 50%;
  width: 46px;
  height: 3px;
  transform: translateY(-50%);
}

.keeper {
  position: absolute;
  left: 50%;
  bottom: -24px;
  z-index: 4;
  width: clamp(48px, 6.8vw, 70px);
  height: clamp(72px, 10.2vw, 105px);
  transform: translateX(-50%);
  transition: left 60ms linear, transform 260ms cubic-bezier(.2, .9, .2, 1.1), width 180ms ease, height 180ms ease;
  will-change: left, transform;
}

.keeper-frame {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  mix-blend-mode: normal;
  pointer-events: none;
  user-select: none;
}

.keeper.save-leftTop,
.keeper.save-rightTop {
  bottom: -24px;
}

.keeper.save-leftTop {
  transform: translateX(-82%) translateY(-11px) rotate(-8deg);
}

.keeper.save-leftTop .keeper-frame,
.keeper.save-leftLow .keeper-frame {
  transform: scaleX(-1);
}

.keeper.save-rightTop {
  transform: translateX(-18%) translateY(-11px) rotate(8deg);
}

.keeper.save-centerTop {
  bottom: -24px;
  transform: translateX(-50%) translateY(-19px);
}

.keeper.save-centerTop .keeper-frame {
  transform: scale(1.25);
  transform-origin: center bottom;
}

.keeper.save-leftLow,
.keeper.save-rightLow {
  bottom: -24px;
}

.keeper.save-leftLow {
  transform: translateX(-86%) translateY(6px) rotate(-8deg);
}

.keeper.save-rightLow {
  transform: translateX(-14%) translateY(6px) rotate(8deg);
}

.head,
.striker-head {
  position: absolute;
  left: 50%;
  width: 42px;
  height: 42px;
  transform: translateX(-50%);
  border: 4px solid #46321d;
  border-radius: 50%;
  background:
    radial-gradient(circle at 36% 42%, #1d170f 0 3px, transparent 4px),
    radial-gradient(circle at 64% 42%, #1d170f 0 3px, transparent 4px),
    radial-gradient(circle at 50% 64%, #b56c45 0 4px, transparent 5px),
    #f2b27d;
}

.keeper-body,
.jersey {
  position: absolute;
  left: 50%;
  top: 42px;
  width: 58px;
  height: 52px;
  transform: translateX(-50%);
  border: 4px solid #293719;
  border-radius: 14px 14px 10px 10px;
  background: var(--team-primary);
  box-shadow: inset 0 -13px 0 var(--team-secondary);
}

.keeper-body {
  background: #ffe56d;
  box-shadow: inset 0 -13px 0 #50a64a;
}

.keeper-arm,
.keeper-leg,
.leg {
  position: absolute;
  width: 16px;
  height: 48px;
  border: 4px solid #293719;
  border-radius: 12px;
  background: #f2b27d;
}

.arm-left {
  left: 4px;
  top: 44px;
  transform: rotate(40deg);
}

.arm-right {
  right: 4px;
  top: 44px;
  transform: rotate(-40deg);
}

.leg-left {
  left: 25px;
  top: 86px;
  transform: rotate(12deg);
}

.leg-right {
  right: 25px;
  top: 86px;
  transform: rotate(-12deg);
}

.striker-wrap {
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: 7;
  width: 230px;
  height: 260px;
  transform: translateX(-50%);
}

.is-walkout .striker-wrap {
  z-index: 22;
  animation: playerWalkout 1.35s ease-out both;
}

@keyframes playerWalkout {
  0% {
    transform: translateX(-50%) translateY(46vh) scale(1.2);
  }
  72% {
    transform: translateX(-50%) translateY(-8px) scale(1.05);
  }
  100% {
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

.striker {
  position: absolute;
  left: -8px;
  bottom: -50px;
  width: 258px;
  height: 280px;
}



.striker-frame {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  mix-blend-mode: normal;
  pointer-events: none;
  user-select: none;
}

.striker-frame.is-kick-frame {
  /* 不做任何位移，只切换图片 */
}

.striker .shorts {
  position: absolute;
  left: 50%;
  top: 86px;
  width: 50px;
  height: 26px;
  transform: translateX(-50%);
  border: 4px solid #293719;
  border-radius: 8px;
  background: var(--team-secondary);
}

.striker-leg-left {
  left: 25px;
  top: 106px;
  height: 38px;
}

.striker-leg-right {
  right: 17px;
  top: 104px;
  height: 44px;
  transform-origin: 50% 0;
}

.striker.kick .striker-leg-right {
  transform: rotate(-48deg);
}

.ball {
  position: absolute;
  left: 148px;
  bottom: 36px;
  z-index: 8;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--soccer-image) center / contain no-repeat;
  box-shadow: 0 8px 0 rgba(28, 80, 12, 0.25);
  transform-origin: center;
  will-change: transform;
}

.ball.is-aiming {
  animation: ballReady 900ms ease-in-out infinite;
}

.ball.is-shot {
  animation: none;
}

@keyframes ballReady {
  50% {
    translate: 0 -3px;
  }
}

.ball.shoot-leftTop {
  transform: translate(-235px, -480px) scale(0.52) rotate(720deg);
}

.ball.shoot-centerTop {
  transform: translate(-28px, -500px) scale(0.5) rotate(720deg);
}

.ball.shoot-rightTop {
  transform: translate(180px, -480px) scale(0.52) rotate(720deg);
}

.ball.shoot-leftLow {
  transform: translate(-205px, -350px) scale(0.62) rotate(620deg);
}

.ball.shoot-rightLow {
  transform: translate(155px, -350px) scale(0.62) rotate(620deg);
}

.result-burst {
  position: absolute;
  left: 50%;
  top: 230px;
  z-index: 7;
  width: max-content;
  min-width: 360px;
  text-align: center;
  white-space: nowrap;
  transform: translateX(-50%) scale(0.9);
  color: #fff;
  font-size: clamp(44px, 7vw, 84px);
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 5px 0 #2f731e, 0 10px 24px rgba(33, 79, 13, 0.45);
  opacity: 0;
  pointer-events: none;
}

.result-burst.show {
  animation: burst 900ms ease both;
}

@keyframes burst {
  0% {
    opacity: 0;
    transform: translateX(-50%) scale(0.7);
  }
  18%,
  72% {
    opacity: 1;
    transform: translateX(-50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) scale(1.08) translateY(-20px);
  }
}

.control-dock {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 8;
  display: grid;
  grid-template-columns: minmax(150px, 220px) minmax(86px, 120px);
  align-items: center;
  gap: 10px;
  width: min(370px, calc(100vw - 36px));
  padding: 12px;
  transform: translateX(-50%);
}

.game-button {
  min-height: 54px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: inset 0 -6px 0 rgba(0, 0, 0, 0.18), 0 4px 0 rgba(39, 85, 20, 0.28);
}

.shoot-button {
  background: #f05a28;
}

.game-button:disabled {
  cursor: wait;
  filter: grayscale(0.3);
  opacity: 0.72;
}

.aim-status {
  text-align: center;
  font-weight: 900;
}

.aim-status span {
  display: block;
  color: #5f6d56;
  font-size: 12px;
}

.aim-status strong {
  font-size: 22px;
}

.danmaku-layer {
  position: absolute;
  inset: 88px 0 auto 0;
  z-index: 10;
  height: 220px;
  overflow: hidden;
  pointer-events: none;
}

.danmaku {
  position: absolute;
  right: -420px;
  min-width: max-content;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  color: #fff;
  font-weight: 900;
  background: rgba(24, 77, 46, 0.82);
  text-shadow: 0 2px 0 rgba(25, 61, 11, 0.4);
  animation: fly 10.8s linear forwards;
}

.danmaku.goal {
  border-color: rgba(255, 232, 91, 0.95);
  color: #fff8b8;
  background: rgba(36, 105, 56, 0.9);
}

.danmaku.saved {
  border-color: rgba(213, 236, 255, 0.9);
  color: #eaf7ff;
  background: rgba(31, 73, 96, 0.88);
}

@keyframes fly {
  to {
    transform: translateX(calc(-100vw - 460px));
  }
}

@media (max-width: 1080px) {
  .team-layout {
    grid-template-columns: minmax(0, 1fr) 280px;
  }

  .select-board {
    display: grid;
  }

  .team-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .support-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .leaderboard {
    top: 94px;
    right: 12px;
    width: 300px;
  }

  .camera-panel {
    display: block;
    left: 12px;
    top: 104px;
    width: 220px;
  }

  .goal-scene {
    width: 94vw;
  }
}

/* Mobile: hide camera & gesture features */
@media (pointer: coarse) {
  .camera-panel {
    display: none !important;
  }

  .gesture-coach {
    display: none !important;
  }
}

@media (max-width: 720px) {
  body {
    overflow: auto;
  }

  .game-stage {
    min-height: 100svh;
  }

  .screen-layer {
    padding: 16px;
  }

  .start-screen {
    align-content: end;
    padding: 18px;
  }

  .start-content {
    width: 100%;
    transform: translateY(-4vh);
  }

  .start-year {
    left: 4%;
    top: 13%;
    font-size: 34vw;
  }

  .start-screen h1 {
    font-size: clamp(36px, 11.5vw, 70px);
    white-space: normal;
  }

  .start-points {
    gap: 8px;
    margin: 18px 0 18px;
  }

  .start-points li {
    font-size: clamp(14px, 4.1vw, 20px);
  }

  .start-points li img {
    width: clamp(24px, 6.2vw, 34px);
    height: clamp(24px, 6.2vw, 34px);
  }

  .start-button-art {
    width: min(307px, 63vw);
    margin: -8px 0 0 -6px;
    font-size: clamp(13px, 4vw, 20px);
  }

  .start-button-art .start-button-ball,
  .start-button-art span {
    transform: translateX(-6px);
  }

  .start-player {
    right: -30vw;
    bottom: 24vh;
    width: min(117vw, 645px);
    opacity: 0.82;
  }

  .team-shell {
    height: calc(100svh - 32px);
  }

  .team-hero {
    align-items: start;
    flex-direction: column;
  }

  .team-hero .mega-button {
    width: 100%;
  }

  .team-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .team-layout {
    grid-template-columns: 1fr;
  }

  .select-board {
    display: none;
  }

  .result-board {
    grid-template-rows: auto auto 230px minmax(0, 1fr);
  }

  .podium-list {
    height: 230px;
  }

  .podium-card,
  .podium-card.first,
  .podium-card.second,
  .podium-card.third {
    min-height: 0;
    width: 24%;
    padding: 6px 5px 7px;
  }

  .podium-flag {
    width: 28px;
    height: 28px;
  }

  .podium-card strong {
    font-size: 12px;
  }

  .podium-card em {
    font-size: 19px;
  }

  .podium-step,
  .podium-card.first .podium-step,
  .podium-card.second .podium-step {
    display: none;
  }

  .support-grid {
    grid-template-columns: 1fr;
  }

  .support-head {
    align-items: start;
    flex-direction: column;
  }

  .team-card {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .hud-score {
    left: 10px;
    right: 10px;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .hud-score > div {
    min-width: max-content;
  }

  .camera-panel {
    top: 114px;
    left: 10px;
    width: min(220px, calc(100vw - 20px));
  }

  .leaderboard {
    display: none;
  }

  .goal-scene {
    top: 50%;
    height: 520px;
  }

  .goal-frame {
    width: 94vw;
    height: 210px;
  }

  .control-dock {
    grid-template-columns: minmax(0, 1fr) 80px;
    bottom: 10px;
    padding: 9px;
  }

  .game-button {
    min-height: 48px;
    font-size: 15px;
  }
}

/* Landscape / short viewport */
@media (max-height: 500px) {
  .hud-score {
    min-height: 40px;
    padding: 4px 10px;
    gap: 8px;
    top: 8px;
    left: 8px;
  }

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

  .hud-label {
    font-size: 10px;
  }

  .team-pill {
    min-width: 90px;
  }

  .leaderboard {
    display: none;
  }

  .goal-scene {
    top: 46%;
    width: 94vw;
    height: 250px;
  }

  .goal-frame {
    width: 88vw;
    height: 90px;
  }

  .is-walkout .goal-frame,
  .is-stadiumIntro .goal-frame,
  .is-penalty .goal-frame {
    top: 20px;
    width: min(520px, 74vw);
    height: 100px;
  }

  .striker-wrap {
    width: 120px;
    height: 150px;
  }

  .striker {
    width: 125px;
    height: 160px;
    left: -4px;
  }

  .striker-frame.is-kick-frame {
    /* 不做任何位移，只切换图片 */
  }

  .ball {
    width: 38px;
    height: 38px;
    left: 80px;
    bottom: 22px;
  }

  .keeper {
    width: 48px;
    height: 72px;
  }

  .aim-reticle {
    width: 22px;
    height: 22px;
  }

  .aim-reticle::before {
    width: 2px;
    height: 28px;
    top: -4px;
  }

  .aim-reticle::after {
    width: 28px;
    height: 2px;
    left: -4px;
  }

  .wall-line {
    top: 38%;
    height: 70px;
  }

  .wall-player {
    width: 56px;
    height: 82px;
  }

  .control-dock {
    bottom: 4px;
    padding: 5px 8px;
    gap: 6px;
    width: min(320px, calc(100vw - 16px));
  }

  .game-button {
    min-height: 38px;
    font-size: 14px;
  }

  .aim-status strong {
    font-size: 17px;
  }

  .result-burst {
    top: 100px;
    font-size: clamp(28px, 5vw, 48px);
    min-width: 180px;
  }

  .hud-score {
    right: auto;
  }

  .danmaku-layer {
    height: 80px;
    inset: 42px 0 auto 0;
    z-index: 15;
  }

  .danmaku {
    padding: 4px 10px;
    font-size: 13px;
  }

  .gesture-coach {
    display: none !important;
  }

  /* Start screen */
  .start-screen {
    padding: 10px 14px;
  }

  .start-year {
    left: 2%;
    top: 5%;
    font-size: 16vh;
  }

  .start-content {
    width: 55vw;
    transform: translateY(-1vh);
  }

  .start-screen h1 {
    font-size: clamp(24px, 6vw, 42px);
    gap: 2px;
  }

  .start-points {
    gap: 4px;
    margin: 10px 0;
  }

  .start-points li {
    font-size: clamp(12px, 3vw, 16px);
  }

  .start-points li img {
    width: clamp(20px, 4vw, 28px);
    height: clamp(20px, 4vw, 28px);
  }

  .start-button-art {
    width: min(187px, 40vw);
    font-size: clamp(9px, 2.4vw, 13px);
    margin: -4px 0 0 -4px;
  }

  .start-player {
    right: 2vw;
    bottom: 6vh;
    width: min(50vw, 430px);
  }

  /* Team screen */
  .team-shell {
    height: calc(100svh - 12px);
    gap: 4px;
  }

  .team-hero h2 {
    font-size: clamp(18px, 3.5vw, 28px);
    margin-top: 2px;
  }

  .team-hero .mega-button {
    min-height: 32px;
    padding: 0 10px;
    font-size: 13px;
  }

  .team-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 3px;
  }

  .team-card {
    grid-template-columns: 22px minmax(0, 1fr);
    min-height: 30px;
    padding: 3px 5px;
    gap: 4px;
  }

  .team-card span:last-child {
    font-size: 10px;
  }

  .team-card .flag-img {
    width: 22px;
    height: 22px;
  }

  .team-layout {
    grid-template-columns: minmax(0, 1fr) 260px;
  }

  .selected-card {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 8px;
    padding: 8px 10px;
    margin-bottom: 6px;
  }

  .selected-card .flag-img.large {
    width: 42px;
    height: 42px;
  }

  .selected-card strong {
    font-size: 18px;
  }

  .selected-card span {
    font-size: 10px;
  }

  .player-art-card {
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 4px;
    min-height: 0;
    flex: 1;
  }

  /* Result screen — 由文件末尾统一处理 */

  .podium-list {
    height: 140px;
  }

  .podium-card,
  .podium-card.first,
  .podium-card.second,
  .podium-card.third {
    width: 22%;
    padding: 5px 4px 6px;
  }

  .podium-card strong {
    font-size: 11px;
  }

  .podium-card em {
    font-size: 16px;
  }

  .podium-flag {
    width: 24px;
    height: 24px;
  }

  .support-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
  }

  .leaderboard-item {
    min-height: 36px;
    padding: 4px 6px;
    gap: 4px;
  }

  .rank {
    width: 22px;
    height: 22px;
    font-size: 11px;
  }

  .leader-team strong {
    font-size: 12px;
  }

  .score {
    font-size: 16px;
  }
}

@media (max-height: 500px) and (min-width: 900px) {
  .screen-layer {
    padding: 8px 10px;
  }

  .team-shell {
    width: min(1170px, calc(100vw - 20px));
  }

  .team-layout {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 34vw);
    gap: 10px;
  }

  .select-panel,
  .select-board {
    padding: 12px;
  }

  .select-board {
    display: grid;
  }

  .player-art-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: minmax(0, 1fr);
    gap: 6px;
  }

  .player-art-card img {
    object-fit: contain;
    object-position: center bottom;
  }

  .leaderboard {
    display: block;
    top: 8px;
    right: 8px;
    width: min(260px, 27vw);
    padding: 8px;
  }

  .leaderboard .panel-title {
    margin-bottom: 6px;
    font-size: 12px;
  }

  .leaderboard-list {
    gap: 5px;
  }

  .leaderboard-item {
    grid-template-columns: 24px minmax(0, 1fr) auto;
    min-height: 37px;
    padding: 5px 7px;
    gap: 6px;
  }

  .leaderboard-item:nth-child(n + 6) {
    display: none;
  }

  .leaderboard .rank {
    width: 22px;
    height: 22px;
    font-size: 11px;
  }

  .leaderboard .flag-img.mini {
    width: 18px;
    height: 18px;
    margin-right: 4px;
  }

  .leaderboard .leader-team strong {
    font-size: 11px;
  }

  .leaderboard .leader-team small {
    font-size: 9px;
  }

  .leaderboard .score {
    font-size: 16px;
  }

  .hud-score {
    max-width: calc(100vw - min(280px, 29vw) - 28px);
  }

  .goal-scene {
    top: 50%;
    height: min(340px, calc(100svh - 88px));
  }

  .is-walkout .goal-frame,
  .is-stadiumIntro .goal-frame,
  .is-penalty .goal-frame {
    top: 28px;
  }

  /* result: 由文件末尾统一处理 */
}

/* Portrait orientation: ask user to rotate */
.rotate-prompt {
  display: none;
}

@media (orientation: portrait) and (pointer: coarse) {
  .rotate-prompt {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    grid-template-rows: auto auto;
    gap: 28px;
    padding: 24px;
    background: #071a10;
    color: #fff;
    text-align: center;
  }

  .rotate-prompt-icon {
    position: relative;
    width: 52px;
    height: 68px;
    border: 4px solid rgba(255, 255, 255, 0.65);
    border-radius: 10px;
    animation: phoneRotateHint 2.4s ease-in-out infinite;
  }

  .rotate-prompt-icon::before {
    content: "";
    position: absolute;
    bottom: 7px;
    left: 50%;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.65);
    transform: translateX(-50%);
  }

  .rotate-prompt-icon::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 28px;
    height: 3px;
    border-radius: 2px;
    background: rgba(255, 220, 60, 0.9);
    transform: translate(-50%, -50%);
    box-shadow: 0 0 10px rgba(255, 220, 60, 0.6);
  }

  .rotate-prompt p {
    margin: 0;
    font-size: clamp(15px, 4.5vw, 22px);
    font-weight: 700;
    max-width: 260px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.88);
  }

  @keyframes phoneRotateHint {
    0%, 35% {
      transform: rotate(0deg);
    }
    65%, 100% {
      transform: rotate(-90deg);
    }
  }
}

/* ── 移动端结算：scale 整体缩放，100% 还原 PC 端布局 ── */
.result-head.is-scaled {
  transform-origin: top center;
  /* scale 值由 JS scaleResultHead() 动态写入 */
}

/* 缩放后容器高度由 JS 同步设置，防止撑开滚动 */
.result-screen.is-scaled-wrap {
  overflow: hidden;
}
