/* ============================================
   主選單 Hero — nico's nextbots 風格
   ============================================ */

/* ---- 電視雜訊全屏 ---- */
.menu-tv-overlay {
  position: fixed;
  inset: 0;
  z-index: 10025;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

body.is-menu-loading .menu-tv-overlay,
body.is-menu-ready .menu-tv-overlay {
  opacity: 1;
  visibility: visible;
}

.menu-tv-noise {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.14;
  mix-blend-mode: soft-light;
}

.menu-tv-scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0) 0,
    rgba(0, 0, 0, 0) 2px,
    rgba(0, 0, 0, 0.18) 2px,
    rgba(0, 0, 0, 0.18) 3px
  );
  opacity: 0.55;
  animation: tvScanDrift 10s linear infinite;
}

@keyframes tvScanDrift {
  from { transform: translateY(0); }
  to { transform: translateY(6px); }
}

.menu-tv-glitch {
  position: absolute;
  inset: 0;
  opacity: 0;
  background:
    linear-gradient(90deg, rgba(255, 0, 0, 0.04), rgba(0, 255, 255, 0.04)),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 96px,
      rgba(255, 255, 255, 0.06) 96px,
      rgba(255, 255, 255, 0.06) 98px
    );
  mix-blend-mode: screen;
  animation: tvGlitchBurst 7s steps(1) infinite;
}

@keyframes tvGlitchBurst {
  0%, 92%, 100% { opacity: 0; transform: translateX(0); }
  93% { opacity: 0.65; transform: translateX(-4px); }
  94% { opacity: 0.35; transform: translateX(5px); }
  95% { opacity: 0.5; transform: translateX(-2px); }
  96% { opacity: 0; transform: translateX(0); }
}

/* ---- Logo 飛行 ---- */
.menu-logo-fly {
  position: fixed;
  z-index: 10035;
  width: clamp(96px, 18vw, 140px);
  height: auto;
  border-radius: 14px;
  object-fit: cover;
  pointer-events: none;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 0 32px rgba(255, 255, 255, 0.14));
  will-change: transform, left, top, width;
}

.menu-logo-fly.is-spinning {
  animation: menuLogoSpinFly 2.4s linear infinite;
}

@keyframes menuLogoSpinFly {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.menu-logo-fly.is-flying {
  animation: none;
  transform: translate(-50%, -50%);
  transition:
    left 0.85s cubic-bezier(0.34, 1.1, 0.64, 1),
    top 0.85s cubic-bezier(0.34, 1.1, 0.64, 1),
    width 0.85s cubic-bezier(0.34, 1.1, 0.64, 1),
    border-radius 0.85s ease,
    filter 0.85s ease;
}

.menu-logo-fly[hidden] {
  display: none !important;
}

.menu-logo-fly.is-settled {
  position: static;
  z-index: auto;
  width: 100%;
  height: 100%;
  transform: none;
  will-change: auto;
  filter: drop-shadow(0 10px 32px rgba(0, 0, 0, 0.5));
}

.hero-menu-icon-slot .menu-logo-fly {
  display: block;
}

.menu-loader-logo-spacer {
  width: clamp(96px, 18vw, 140px);
  height: clamp(96px, 18vw, 140px);
}

.menu-loader.is-exiting {
  background: transparent;
  pointer-events: none;
}

.menu-loader.is-exiting .menu-loader-vignette,
.menu-loader.is-exiting .menu-loader-foot {
  opacity: 0;
  transition: opacity 0.45s ease;
}

.hero-menu-icon-slot {
  flex-shrink: 0;
  width: clamp(64px, 9vw, 88px);
  height: clamp(64px, 9vw, 88px);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.hero-menu-icon-slot.is-visible {
  opacity: 1;
}

.hero-menu-nav--hidden,
.hero-menu-scroll--hidden {
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}

.hero-menu-nav.is-revealed,
.hero-menu-scroll.is-revealed {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  transition:
    opacity 0.55s ease 0.15s,
    transform 0.55s cubic-bezier(0.34, 1.2, 0.64, 1) 0.15s;
}

.hero-menu-title.is-revealed {
  animation: titleReveal 0.6s cubic-bezier(0.34, 1.2, 0.64, 1) forwards;
}

@keyframes titleReveal {
  from {
    opacity: 0;
    transform: translateX(-12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---- 音訊控制 ---- */
.menu-audio-panel {
  position: fixed;
  right: clamp(16px, 3vw, 28px);
  bottom: clamp(16px, 3vw, 28px);
  z-index: 10050;
  display: flex;
  align-items: center;
  flex-direction: row-reverse;
  gap: 10px;
}

.menu-audio-btn {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.55);
  color: rgba(255, 255, 255, 0.88);
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition:
    background 0.25s ease,
    border-color 0.25s ease,
    transform 0.25s ease;
}

.menu-audio-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.32);
  transform: scale(1.04);
}

.menu-audio-icon {
  width: 22px;
  height: 22px;
}

.menu-audio-icon--off {
  display: none;
}

.menu-audio-btn.is-muted .menu-audio-icon--on {
  display: none;
}

.menu-audio-btn.is-muted .menu-audio-icon--off {
  display: block;
}

.menu-audio-volume {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(10px);
  cursor: default;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(10px);
  transition:
    opacity 0.22s ease,
    visibility 0.22s ease,
    transform 0.22s ease;
}

.menu-audio-panel:hover .menu-audio-volume,
.menu-audio-panel:focus-within .menu-audio-volume {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
}

.menu-audio-volume-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
  user-select: none;
}

.menu-audio-volume input[type='range'] {
  width: clamp(72px, 12vw, 110px);
  height: 4px;
  margin: 0;
  appearance: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  cursor: pointer;
}

.menu-audio-volume input[type='range']::-webkit-slider-thumb {
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.9);
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.menu-audio-volume input[type='range']::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.9);
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.menu-audio-volume input[type='range']::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.menu-audio-panel.is-muted .menu-audio-volume {
  opacity: 0;
  visibility: hidden;
}

.menu-audio-panel.is-muted:hover .menu-audio-volume,
.menu-audio-panel.is-muted:focus-within .menu-audio-volume {
  opacity: 0.55;
  visibility: visible;
  pointer-events: auto;
}

@media (max-width: 640px) {
  .menu-audio-panel {
    flex-direction: column-reverse;
    align-items: flex-end;
    gap: 8px;
  }

  .menu-audio-volume {
    height: auto;
    padding: 8px 12px;
    transform: translateY(8px);
  }

  .menu-audio-panel:hover .menu-audio-volume,
  .menu-audio-panel:focus-within .menu-audio-volume {
    transform: translateY(0);
  }

  .menu-audio-volume input[type='range'] {
    width: 96px;
  }
}

/* ---- 點擊開始 ---- */
.menu-gate {
  position: fixed;
  inset: 0;
  z-index: 10040;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 24px;
  background: rgba(0, 0, 0, 0.92);
  cursor: pointer;
  text-align: center;
  user-select: none;
}

.menu-gate.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.menu-gate-text {
  margin: 0;
  font-size: clamp(15px, 2.5vw, 18px);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.82);
}

.menu-gate-hint {
  margin: 0;
  font-size: clamp(13px, 2vw, 15px);
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.42);
  animation: menuGatePulse 2.4s ease-in-out infinite;
}

@keyframes menuGatePulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}

/* ---- 載入 ---- */
.menu-loader {
  position: fixed;
  inset: 0;
  z-index: 10030;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.menu-loader[hidden] {
  display: none !important;
}

.menu-loader-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 18%, rgba(0, 0, 0, 0.88) 72%, #000 100%);
  pointer-events: none;
}

.menu-loader-center {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
}

@keyframes menuLogoSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.menu-loader-foot {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: min(280px, 72vw);
}

.menu-loader-bar {
  flex: 1;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.menu-loader-bar-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0.95));
  transition: width 0.08s linear;
}

.menu-loader-pct {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.55);
  font-variant-numeric: tabular-nums;
  min-width: 2ch;
}

/* ---- 主選單 Hero ---- */
.hero-menu {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  isolation: isolate;
  opacity: 0;
  visibility: hidden;
}

body.is-menu-ready .hero-menu {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.5s ease;
}

.hero-menu[aria-hidden="true"] {
  pointer-events: none;
}

body.is-menu-ready .hero-menu {
  pointer-events: auto;
}

.hero-menu-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #0a0a0c;
}

.hero-menu-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  transform: scale(1.02);
  opacity: 0;
  will-change: transform, opacity, filter;
}

.hero-menu-bg-img:not(.is-active):not(.is-incoming) {
  opacity: 0;
  visibility: hidden;
  z-index: 0;
}

.hero-menu-bg-img.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}

.hero-menu-bg.is-tv-switching .hero-menu-bg-img.is-active {
  z-index: 1;
  animation: tvBgRollOut 0.65s ease forwards;
}

.hero-menu-bg.is-tv-switching .hero-menu-bg-img.is-incoming {
  z-index: 2;
  visibility: visible;
  animation: tvBgRollIn 0.65s ease forwards;
}

@keyframes tvBgRollOut {
  0% { transform: scale(1.02) translateY(0); filter: none; opacity: 1; }
  15% { transform: scale(1.04) translateY(-4%); filter: brightness(1.8) contrast(1.3) saturate(0.2); opacity: 0.9; }
  35% { transform: scale(1.06) translateY(5%); filter: brightness(0.35) contrast(1.5) saturate(0); opacity: 0.55; }
  55% { transform: scale(1.03) translateY(-2%); filter: brightness(1.4) hue-rotate(12deg); opacity: 0.35; }
  100% { transform: scale(1.02) translateY(0); filter: brightness(0.2) blur(1px); opacity: 0; }
}

@keyframes tvBgRollIn {
  0% { transform: scale(1.12) translateY(6%); filter: brightness(2) contrast(1.4) blur(3px); opacity: 0; }
  20% { transform: scale(1.07) translateY(-3%); filter: brightness(0.45) contrast(1.35) saturate(0.1); opacity: 0.7; }
  45% { transform: scale(1.04) translateY(2%); filter: brightness(1.5) hue-rotate(-10deg); opacity: 0.95; }
  100% { transform: scale(1.02) translateY(0); filter: none; opacity: 1; }
}

/* ---- 老電視換台特效（hero 層級，在背景之上） ---- */
.hero-tv-switch {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
}

.hero-tv-switch.is-active {
  visibility: visible;
  animation: tvSwitchOverlay 0.65s ease forwards;
}

@keyframes tvSwitchOverlay {
  0% { opacity: 0; }
  8% { opacity: 1; }
  92% { opacity: 1; }
  100% { opacity: 0; }
}

.hero-tv-switch-noise {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.75;
  mix-blend-mode: overlay;
}

.hero-tv-switch-flash {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.92);
  opacity: 0;
}

.hero-tv-switch.is-active .hero-tv-switch-flash {
  animation: tvSwitchFlash 0.65s ease;
}

@keyframes tvSwitchFlash {
  0%, 100% { opacity: 0; }
  12% { opacity: 0.55; }
  22% { opacity: 0.08; }
  38% { opacity: 0.35; }
  52% { opacity: 0; }
}

.hero-tv-switch-roll {
  position: absolute;
  left: -4%;
  right: -4%;
  height: 18%;
  background:
    linear-gradient(
      180deg,
      transparent 0%,
      rgba(255, 255, 255, 0.15) 30%,
      rgba(255, 255, 255, 0.45) 50%,
      rgba(255, 255, 255, 0.15) 70%,
      transparent 100%
    );
  box-shadow: 0 0 40px rgba(255, 255, 255, 0.25);
}

.hero-tv-switch.is-active .hero-tv-switch-roll {
  animation: tvRollSweep 0.65s linear;
}

@keyframes tvRollSweep {
  0% { top: -20%; opacity: 0; }
  5% { opacity: 1; }
  95% { opacity: 1; }
  100% { top: 110%; opacity: 0; }
}

.hero-tv-switch-rgb {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 0, 0, 0.22), transparent 28%, transparent 72%, rgba(0, 255, 255, 0.22)),
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.08) 0,
      rgba(255, 255, 255, 0.08) 1px,
      transparent 1px,
      transparent 4px
    );
  mix-blend-mode: screen;
  opacity: 0;
}

.hero-tv-switch.is-active .hero-tv-switch-rgb {
  animation: tvRgbBurst 0.65s steps(4) forwards;
}

@keyframes tvRgbBurst {
  0%, 100% { opacity: 0; transform: translateX(0); }
  15% { opacity: 1; transform: translateX(-10px); }
  35% { opacity: 0.85; transform: translateX(8px); }
  55% { opacity: 0.7; transform: translateX(-5px); }
  75% { opacity: 0.4; transform: translateX(3px); }
}

.hero-menu-bg:has(.hero-menu-bg-img:not([hidden])) {
  background: #0a0a0c;
}

.hero-menu-vhs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: 0.45;
  background: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.04) 0,
    rgba(255, 255, 255, 0.04) 1px,
    transparent 1px,
    transparent 4px
  );
  mix-blend-mode: overlay;
  animation: menuVhsFlicker 6s steps(2) infinite;
}

@keyframes menuVhsFlicker {
  0%, 96%, 100% { opacity: 0.28; }
  97% { opacity: 0.42; }
  98% { opacity: 0.22; }
}

.hero-menu-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.35) 42%, rgba(0, 0, 0, 0.15) 100%),
    radial-gradient(ellipse at 80% 50%, transparent 20%, rgba(0, 0, 0, 0.55) 100%);
}

.hero-menu-content {
  position: relative;
  z-index: 6;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: clamp(72px, 12vh, 120px) clamp(28px, 6vw, 80px);
  max-width: 640px;
}

.hero-menu-header {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.5vw, 24px);
  margin-bottom: clamp(32px, 6vh, 56px);
}

.hero-menu-icon {
  width: 100%;
  height: 100%;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.5);
}

.hero-menu-title {
  margin: 0;
  font-family: 'Inter', sans-serif;
  font-size: clamp(2.2rem, 6.5vw, 3.75rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: rgba(255, 255, 255, 0.96);
  text-transform: lowercase;
  opacity: 0;
  text-shadow:
    0 0 1px rgba(255, 255, 255, 0.8),
    2px 0 rgba(255, 0, 0, 0.08),
    -2px 0 rgba(0, 255, 255, 0.08);
}

.hero-menu-title span {
  font-weight: 700;
  color: rgba(255, 255, 255, 0.72);
}

.hero-menu-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.hero-menu-item {
  appearance: none;
  border: none;
  background: transparent;
  padding: 8px 0;
  font-family: 'Inter', sans-serif;
  font-size: clamp(1.15rem, 2.8vw, 1.45rem);
  font-weight: 500;
  letter-spacing: 0.01em;
  text-transform: lowercase;
  color: rgba(255, 255, 255, 0.88);
  cursor: pointer;
  transition:
    color 0.2s ease,
    transform 0.25s ease,
    text-shadow 0.25s ease;
}

.hero-menu-item:hover,
.hero-menu-item:focus-visible {
  color: #fff;
  transform: translateX(6px);
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.25);
  outline: none;
}

.hero-menu-item--deco:hover {
  transform: translateX(4px);
}

.hero-menu-item.is-active {
  color: #fff;
  text-shadow: 0 0 24px rgba(255, 255, 255, 0.35);
}

.hero-menu-scroll {
  margin-top: clamp(32px, 6vh, 56px);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: lowercase;
  color: rgba(255, 255, 255, 0.38);
  transition: color 0.2s ease;
}

.hero-menu-scroll:hover {
  color: rgba(255, 255, 255, 0.72);
}

/* ---- 右下角託管商品卡 ---- */
.hero-host-card {
  position: absolute;
  right: clamp(22px, 5vw, 72px);
  bottom: clamp(72px, 9vh, 104px);
  z-index: 6;
  width: min(22vw, 210px);
  min-width: 155px;
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 11px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 14px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.025)),
    rgba(0, 0, 0, 0.44);
  color: #fff;
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  transform-style: preserve-3d;
  perspective: 900px;
  opacity: 0;
  transform: translateY(18px) scale(0.96);
  transition:
    opacity 0.55s ease 0.25s,
    transform 0.55s cubic-bezier(0.34, 1.2, 0.64, 1) 0.25s,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

body.is-menu-ready .hero-host-card {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.hero-host-card:hover {
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow:
    0 34px 90px rgba(0, 0, 0, 0.58),
    0 0 36px rgba(34, 211, 238, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.hero-host-card::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  pointer-events: none;
}

.hero-host-card-kicker {
  position: relative;
  z-index: 2;
  align-self: flex-start;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.hero-host-card-frame {
  position: relative;
  z-index: 1;
  width: min(58%, 110px);
  margin: 0 auto;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  transform-style: preserve-3d;
}

.hero-host-card-frame::after {
  content: '';
  position: absolute;
  inset: 8%;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.34), transparent 64%);
  filter: blur(16px);
  transform: translateZ(-28px);
}

.hero-host-card-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 999px;
  transform-style: preserve-3d;
  animation: hostProductSpin 5.2s linear infinite;
  filter:
    drop-shadow(0 16px 24px rgba(0, 0, 0, 0.42))
    drop-shadow(0 0 18px rgba(34, 211, 238, 0.14));
}

.hero-host-card:hover .hero-host-card-img {
  animation-duration: 3.4s;
}

@keyframes hostProductSpin {
  0% { transform: rotateY(0deg) rotateX(8deg) translateZ(24px); }
  50% { transform: rotateY(180deg) rotateX(-8deg) translateZ(24px); }
  100% { transform: rotateY(360deg) rotateX(8deg) translateZ(24px); }
}

.hero-host-card-text,
.hero-host-card-brand {
  position: relative;
  z-index: 2;
  display: block;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.65);
}

.hero-host-card-text {
  margin-top: auto;
  font-size: clamp(10px, 1.2vw, 11px);
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.72);
}

.hero-host-card-brand {
  margin-top: 3px;
  font-size: clamp(13px, 1.6vw, 16px);
  line-height: 1.15;
  color: rgba(255, 255, 255, 0.96);
}

/* 主選單期間隱藏頂部導覽 */
body.is-menu-gate .nav,
body.is-menu-loading .nav {
  opacity: 0;
  pointer-events: none;
}

body.is-menu-ready .nav {
  transition: opacity 0.4s ease;
}

body.is-menu-ready:not(.nav-visible) .nav {
  opacity: 0;
  pointer-events: none;
}

body.nav-visible .nav {
  opacity: 1;
  pointer-events: auto;
}

/* ---- Play 3D 面板 ---- */
.play-panel {
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.play-panel[hidden] {
  display: none !important;
}

.play-panel-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.38s ease;
}

.play-panel.is-open .play-panel-backdrop {
  opacity: 1;
}

.play-panel-card {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  padding: clamp(24px, 4vw, 32px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(12, 12, 14, 0.92);
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transform-style: preserve-3d;
  opacity: 0;
  transform: perspective(800px) rotateX(14deg) translateY(28px) scale(0.92);
  transition:
    opacity 0.42s cubic-bezier(0.34, 1.1, 0.64, 1),
    transform 0.42s cubic-bezier(0.34, 1.1, 0.64, 1);
}

.play-panel.is-open .play-panel-card {
  opacity: 1;
  transform: perspective(800px) rotateX(0deg) translateY(0) scale(1);
}

.play-panel-kicker {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
}

.play-panel-title {
  margin: 0 0 20px;
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.35rem, 3vw, 1.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.play-panel-version {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.play-panel-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.play-panel-value {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  font-weight: 700;
  color: rgba(255, 255, 255, 0.94);
}

.play-panel-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.play-panel-item {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  padding: 16px 18px;
  text-align: left;
  color: inherit;
  cursor: pointer;
  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    background 0.25s ease,
    box-shadow 0.25s ease;
}

.play-panel-item:hover {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}

.play-panel-item.copied {
  animation: copyPop 0.4s ease;
  border-color: rgba(255, 255, 255, 0.34);
}

.play-panel-meta {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}

.play-panel-hint {
  display: block;
  margin-top: 8px;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.32);
}

.play-panel-back {
  appearance: none;
  margin-top: 22px;
  border: none;
  background: transparent;
  padding: 4px 0;
  font-family: inherit;
  font-size: 1rem;
  text-transform: lowercase;
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
}

.play-panel-back:hover {
  color: #fff;
  transform: translateX(-4px);
}

@media (max-width: 640px) {
  .hero-menu-content {
    max-width: none;
    padding-top: 96px;
  }

  .hero-host-card {
    right: 16px;
    bottom: 72px;
    width: 132px;
    min-width: 0;
    padding: 9px;
  }

  .hero-host-card-frame {
    width: 54%;
  }

  .hero-host-card-text {
    font-size: 9px;
  }

  .hero-host-card-brand {
    font-size: 12px;
  }

  .play-panel {
    align-items: flex-end;
    padding: 16px;
  }

  .play-panel-card {
    width: 100%;
    border-radius: 20px 20px 12px 12px;
  }
}
