/* 新遊戲外殼；首頁樣式仍完全由 index.html 既有 CSS 控制。 */
.station-game-screen {
  position: fixed;
  z-index: 60;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #101820;
  overscroll-behavior: none;
  touch-action: none;
}

.station-game-screen[hidden],
.station-game-loading[hidden] { display: none !important; }

.game-shell.station-game-active {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  aspect-ratio: auto;
  overflow: hidden;
  background: #101820;
}

.station-game-frame {
  display: block;
  width: min(100vw, calc(100dvh * 941 / 1672));
  height: min(100dvh, calc(100vw * 1672 / 941));
  border: 0;
  background: #101820;
  box-shadow: 0 0 48px rgba(0, 0, 0, .45);
  image-rendering: pixelated;
}

@media (orientation: landscape) {
  .station-game-frame {
    width: min(100vw, calc(100dvh * 16 / 9));
    height: min(100dvh, calc(100vw * 9 / 16));
  }
}

.station-game-loading {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  color: #fff;
  background: #101820;
}

.station-game-loading span {
  width: 42px;
  height: 42px;
  border: 4px solid rgba(255, 255, 255, .18);
  border-top-color: #ffd45c;
  border-radius: 50%;
  animation: station-game-spin .8s linear infinite;
}

.station-game-loading strong { font-size: 14px; letter-spacing: .08em; }

@keyframes station-game-spin { to { transform: rotate(1turn); } }

/* 玩家點擊開始後才顯示的 Veo 前導。外層保持 9:16，桌機只在兩側留深色安全區。 */
.station-intro {
  position: absolute;
  z-index: 5;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #fff;
  background: #071019;
  font-family: "LINE Seed TW", sans-serif;
  /* 僅使用已載入的 LINE Seed TW 正式字重，禁止瀏覽器人工合成。 */
  font-synthesis: none;
  isolation: isolate;
}

.station-intro[hidden] { display: none !important; }

.station-intro-stage {
  position: relative;
  width: min(100vw, calc(100dvh * 9 / 16));
  height: min(100dvh, calc(100vw * 16 / 9));
  overflow: hidden;
  background: #0b1116;
  box-shadow: 0 0 54px rgba(0, 0, 0, .55);
  container-type: size;
}

.station-intro-video,
.station-intro-scrim {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.station-intro-video {
  z-index: 0;
  display: block;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.035);
  transition: opacity .58s ease, filter .58s ease, transform .58s ease;
}

/* 第一支影片稍微提亮並降低模糊，保留情境細節，同時弱化 Veo 偶發的假字。 */
.station-intro-video-social {
  filter: blur(1.8px) brightness(.64) saturate(.86);
}

.station-intro-video-station {
  filter: brightness(.82) saturate(.9);
  transform: scale(1.012);
}

.station-intro[data-phase="clip-one"] .station-intro-video-social { opacity: 1; }
.station-intro[data-phase="clip-two"] .station-intro-video-station,
.station-intro[data-phase="leaving"] .station-intro-video-station { opacity: 1; }

.station-intro-scrim {
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(5, 11, 16, .52) 0%, rgba(5, 11, 16, .03) 22%, rgba(5, 11, 16, .08) 64%, rgba(5, 11, 16, .62) 100%),
    radial-gradient(circle at 50% 43%, rgba(7, 14, 20, 0) 28%, rgba(7, 14, 20, .24) 100%);
  transition: opacity .55s ease;
}

/* 第一段保留較輕的遮罩，讓背景更清楚；文字區仍由漸層維持足夠對比。 */
.station-intro[data-phase="clip-one"] .station-intro-scrim { opacity: .88; }

.station-intro[data-phase="clip-two"] .station-intro-scrim,
.station-intro[data-phase="leaving"] .station-intro-scrim { opacity: .36; }

/* 前導影片右下角的品牌徽章：實色底板可完整遮住生成影片原有浮水印。 */
.station-intro-brand-mark {
  position: absolute;
  z-index: 4;
  right: max(12px, env(safe-area-inset-right));
  bottom: max(12px, env(safe-area-inset-bottom));
  box-sizing: content-box;
  width: clamp(60px, 17cqw, 82px);
  height: auto;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, .82);
  border-radius: 14px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 5px 16px rgba(0, 0, 0, .3);
  pointer-events: none;
  user-select: none;
}

.station-intro-toolbar {
  position: absolute;
  z-index: 8;
  top: max(18px, env(safe-area-inset-top));
  left: 18px;
  right: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.station-intro-warning {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(255, 193, 84, .62);
  border-radius: 999px;
  color: #ffe2a3;
  background: rgba(24, 17, 8, .78);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .22);
  font-size: clamp(11px, 3cqw, 14px);
  font-weight: 700;
  letter-spacing: .04em;
  backdrop-filter: blur(8px);
}

.station-intro-warning i {
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: #ffb936;
  box-shadow: 0 0 10px rgba(255, 185, 54, .75);
}

.station-intro-skip {
  min-width: 88px;
  min-height: 44px;
  padding: 0 15px;
  border: 1px solid rgba(255, 255, 255, .34);
  border-radius: 999px;
  color: #fff;
  background: rgba(8, 14, 20, .66);
  font: inherit;
  font-size: clamp(12px, 3.2cqw, 14px);
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-tap-highlight-color: transparent;
}

.station-intro-skip:focus-visible {
  outline: 3px solid #ffd25c;
  outline-offset: 3px;
}

.station-intro-opening,
.station-intro-question,
.station-intro-entering,
.station-intro-media-loading {
  position: absolute;
  z-index: 6;
  pointer-events: none;
  opacity: 0;
  transform: translateY(20px) scale(.96);
  transition: opacity .44s ease, transform .55s cubic-bezier(.22, 1, .36, 1);
}

.station-intro-opening {
  top: 18%;
  left: 8%;
  right: 8%;
  text-align: center;
}

.station-intro-opening span,
.station-intro-question > span {
  display: inline-block;
  margin-bottom: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  color: #13212b;
  background: #ffd45c;
  font-size: clamp(12px, 3.6cqw, 17px);
  font-weight: 700;
  letter-spacing: .06em;
}

.station-intro-opening strong {
  display: block;
  text-wrap: balance;
  font-size: clamp(25px, 8cqw, 40px);
  font-weight: 700;
  line-height: 1.34;
  letter-spacing: .01em;
}

.station-intro[data-beat="opening"] .station-intro-opening,
.station-intro[data-beat="question"] .station-intro-question,
.station-intro[data-beat="station"] .station-intro-entering,
.station-intro[data-beat="loading"] .station-intro-media-loading {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.station-rumor-deck {
  position: absolute;
  z-index: 5;
  inset: 13% 5.5% 14%;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.station-rumor-card {
  grid-area: 1 / 1;
  width: 100%;
  max-height: 100%;
  padding: 7px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: clamp(14px, 4cqw, 22px);
  opacity: 0;
  color: #fff;
  background: #10171d;
  box-shadow: 0 22px 60px rgba(0, 0, 0, .55);
  transform: translateY(42px) scale(.92);
  filter: blur(9px);
  transition:
    opacity .32s ease,
    transform .52s cubic-bezier(.22, 1, .36, 1),
    filter .38s ease;
  will-change: transform, opacity, filter;
}

.station-rumor-card.is-active {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

.station-rumor-card img {
  display: block;
  width: 100%;
  max-height: min(66cqh, 660px);
  object-fit: contain;
  border-radius: calc(clamp(14px, 4cqw, 22px) - 6px);
  background: #050709;
}

.station-rumor-card p {
  margin: 0;
  padding: 13px 12px 12px;
  text-align: left;
  text-wrap: balance;
  font-size: clamp(17px, 5.1cqw, 24px);
  font-weight: 400;
  line-height: 1.42;
  letter-spacing: .01em;
}

.station-intro-question {
  top: 24%;
  left: 7%;
  right: 7%;
  padding: 28px 20px 25px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 24px;
  text-align: center;
  background: rgba(7, 14, 20, .88);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .52);
  backdrop-filter: blur(12px);
}

.station-intro-question h2 {
  margin: 0;
  font-size: clamp(30px, 9.2cqw, 48px);
  font-weight: 400;
  line-height: 1.24;
  letter-spacing: -.01em;
  text-wrap: balance;
}

.station-intro-question h2 em {
  color: #ffd45c;
  font-style: normal;
  font-weight: 700;
}

.station-intro-question p {
  margin: 18px 0 0;
  color: rgba(255, 255, 255, .82);
  font-size: clamp(14px, 4.2cqw, 19px);
  font-weight: 400;
  line-height: 1.55;
  text-wrap: balance;
}

.station-intro-entering {
  left: 50%;
  bottom: 8%;
  display: flex;
  align-items: center;
  width: max-content;
  max-width: 90%;
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(6, 13, 18, .78);
  font-size: clamp(15px, 4.2cqw, 19px);
  font-weight: 400;
  line-height: 1.35;
  text-align: center;
  transform: translate(-50%, 20px) scale(.96);
  backdrop-filter: blur(8px);
}

.station-intro-entering span {
  width: 8px;
  height: 8px;
  margin-right: 9px;
  border-radius: 50%;
  background: #ffd45c;
}

.station-intro-entering strong { font-weight: 700; }

.station-intro[data-beat="station"] .station-intro-entering {
  transform: translate(-50%, 0) scale(1);
}

.station-intro-media-loading {
  top: 50%;
  left: 50%;
  display: grid;
  justify-items: center;
  gap: 13px;
  width: max-content;
  transform: translate(-50%, -50%) scale(.96);
}

.station-intro-media-loading span {
  width: 38px;
  height: 38px;
  border: 3px solid rgba(255, 255, 255, .2);
  border-top-color: #ffd45c;
  border-radius: 50%;
  animation: station-game-spin .8s linear infinite;
}

.station-intro-media-loading strong {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
}

.station-intro[data-beat="loading"] .station-intro-media-loading {
  transform: translate(-50%, -50%) scale(1);
}

.station-intro.is-leaving {
  opacity: 0;
  transition: opacity .62s ease;
}

.station-intro.is-static .station-intro-video { display: none; }
.station-intro.is-static .station-intro-scrim {
  opacity: 1;
  background:
    linear-gradient(180deg, rgba(5, 11, 16, .5), rgba(5, 11, 16, .86)),
    radial-gradient(circle at 50% 34%, #263947, #071019 72%);
}

@media (max-width: 370px) {
  .station-intro-toolbar { left: 12px; right: 12px; }
  .station-intro-warning { padding: 0 9px; letter-spacing: 0; }
  .station-intro-skip { min-width: 78px; padding: 0 12px; }
  .station-rumor-deck { inset-inline: 4%; }
  .station-intro-question { left: 5%; right: 5%; padding-inline: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .station-game-loading span { animation-duration: 2s; }
  .station-intro *,
  .station-intro *::before,
  .station-intro *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
