#gameIntro {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 20px;
  box-sizing: border-box;
  overflow: auto;
  background: #04070eb3;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  outline: none;
}
#gameIntro[hidden], #gameIntro [hidden], #gameApp[hidden] {
  display: none !important;
}
.intro-tv-stage {
  position: relative;
  width: min(780px, 100%, calc((100dvh - 210px) * 4 / 3 + 160px));
  padding-top: 52px;
  padding-bottom: 16px;
  isolation: isolate;
}
/* Telescoping rabbit ears and the little swivel base. */
.intro-tv-aerial {
  position: absolute;
  top: 34px;
  left: 62%;
  width: 46px;
  height: 22px;
  border-radius: 50% 50% 0 0;
  background: linear-gradient(90deg, #171716, #80796b 40%, #36332c 65%, #141413);
  box-shadow: inset 0 2px 1px #c6bba14d;
}
.intro-tv-aerial::before, .intro-tv-aerial::after {
  content: "";
  position: absolute;
  bottom: 14px;
  left: 20px;
  width: 4px;
  height: 78px;
  border-radius: 4px;
  background: linear-gradient(90deg, #5a5a55, #e4dcc3 45%, #555750);
  transform-origin: bottom;
  transform: rotate(-58deg);
  box-shadow: 1px 0 2px #0008;
}
.intro-tv-aerial::after { transform: rotate(58deg); height: 66px; }
.intro-window {
  position: relative;
  padding: 20px 20px 0;
  border: 2px solid #494334;
  border-radius: 29px 29px 23px 23px;
  background:
    repeating-linear-gradient(0deg, #00000009 0 1px, #ffffff05 1px 3px),
    linear-gradient(135deg, #dbd0ad 0%, #b9ac8c 48%, #9e9175 100%);
  box-shadow:
    inset 0 3px 1px #fff6dc99, inset 3px 0 3px #f1e2bd66,
    inset -6px -7px 2px #423b2d55, 0 7px 0 #312e26,
    0 30px 65px #000b, 0 0 110px #ffc4570b;
}
.intro-window::before, .intro-window::after {
  content: "";
  position: absolute;
  bottom: -17px;
  width: 58px;
  height: 14px;
  background: linear-gradient(#161919, #353733 60%, #101312);
  border-radius: 0 0 5px 5px;
  box-shadow: 0 5px 8px #0008;
  z-index: -1;
}
.intro-window::before { left: 48px; transform: skew(-8deg); }
.intro-window::after { right: 48px; transform: skew(8deg); }
.intro-tv-face { display: grid; grid-template-columns: minmax(0, 1fr) 112px; gap: 18px; }
.intro-tv-bezel {
  display: grid;
  align-items: center;
  padding: 15px;
  border-radius: 50% / 7%;
  border: 2px solid #332f27;
  background: linear-gradient(145deg, #413f36, #161b18 48%, #4f4b3e);
  box-shadow: 0 1px 1px #f8e9c5aa, inset 0 5px 9px #000a, inset -2px -3px 3px #b1a58866;
}
.intro-screen {
  position: relative;
  overflow: hidden;
  border-radius: 48% / 6%;
  background: #070d0b;
  box-shadow: 0 0 0 3px #090d0b, 0 0 15px #d6ff9312;
}
#introVideo {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto;
  object-fit: contain;
  border-radius: inherit;
}
/* Static glass and scanlines keep the film legible without flashing or repainting. */
.intro-crt-glass {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(155deg, #fff8dc12, transparent 32%, transparent 75%, #d4efd708),
    repeating-linear-gradient(0deg, #00000016 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at center, transparent 48%, #07100a55 100%);
  box-shadow: inset 0 0 18px 5px #000a, inset 0 2px 3px #e1f9d92b;
}
.intro-crt-glass::after {
  content: "";
  position: absolute;
  top: 4%;
  left: 5%;
  width: 60%;
  height: 12%;
  border-radius: 50%;
  background: linear-gradient(175deg, #fffce21a, transparent 65%);
  transform: rotate(-4deg);
}
.intro-channel {
  position: absolute;
  top: 7%;
  left: 7%;
  z-index: 2;
  color: #bdfd9aaa;
  font: 700 13px/1 monospace;
  letter-spacing: 0.14em;
  text-shadow: 0 0 5px #91ff7877;
  pointer-events: none;
}
.intro-tv-controls { display: flex; flex-direction: column; align-items: center; gap: 15px; padding: 10px 0 2px; }
.intro-tv-brand {
  color: #37382f;
  font: italic 700 19px/1.1 Georgia, serif;
  text-align: center;
  text-shadow: 0 1px #e5d9b7;
}
.intro-tv-brand > span { display: block; margin-top: 7px; font: 700 7px/1.3 monospace; letter-spacing: 0.18em; }
.intro-tuner { display: grid; justify-items: center; gap: 9px; color: #4a4639; font: 700 8px/1 monospace; letter-spacing: 0.15em; }
.intro-tuner-dial, .intro-volume-dial {
  display: block;
  position: relative;
  width: 59px;
  height: 59px;
  box-sizing: border-box;
  border-radius: 50%;
  border: 5px solid #3e4038;
  background: conic-gradient(from 45deg, #4f544b, #151c19, #66695a, #313932, #4f544b);
  box-shadow: 0 0 0 2px #9b937c, 0 0 0 3px #615d4e, inset 0 0 0 1px #7e8270, 2px 4px 5px #0007;
}
.intro-tuner-dial::after, .intro-volume-dial::after {
  content: "";
  position: absolute;
  top: 5px;
  bottom: 5px;
  left: calc(50% - 4px);
  width: 8px;
  border-radius: 3px;
  background: linear-gradient(90deg, #262e28, #a1a08c 45%, #4d5549 60%);
  box-shadow: 2px 1px 2px #0008;
  transform: rotate(35deg);
}
#gameIntro button {
  color: #f9edcf;
  background: linear-gradient(#55564b, #30372f);
  border: 1px solid #2b3029;
  border-radius: 5px;
  font: 700 11px/1.3 "Space Grotesk", sans-serif;
  letter-spacing: 0.13em;
  cursor: pointer;
  padding: 12px 17px;
  min-height: 44px;
  box-shadow: inset 0 1px #c4c3a555, 0 3px 0 #292e26, 0 4px 6px #0005;
}
#gameIntro button:hover { filter: brightness(1.15); }
#gameIntro button:active { box-shadow: inset 0 2px 4px #0007; }
#gameIntro button:focus-visible { outline: 3px solid #c6ff9c; outline-offset: 4px; }
#gameIntro #introMute {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 0 8px;
  border: 0;
  border-radius: 4px;
  background: none;
  color: #403f33;
  box-shadow: none;
  font: 700 8px/1 monospace;
  letter-spacing: 0.1em;
}
.intro-volume-dial { width: 42px; height: 42px; border-width: 4px; }
.intro-volume-dial::after { width: 5px; left: calc(50% - 2.5px); transition: transform 120ms ease; }
#introMute[aria-pressed="true"] .intro-volume-dial::after { transform: rotate(-45deg); }
.intro-speaker {
  align-self: stretch;
  flex: 1;
  min-height: 36px;
  border-radius: 4px;
  border: 1px solid #8e846e;
  background: repeating-linear-gradient(0deg, #333c34 0 2px, #c0b292 2px 5px, #ddccaa 5px 6px);
  box-shadow: inset 2px 2px 4px #2a302966, 0 1px #e9dabb99;
}
.intro-power { display: flex; align-items: center; gap: 8px; font: 700 8px/1 monospace; letter-spacing: 0.14em; color: #3b4634; }
.intro-power i { width: 7px; height: 7px; border-radius: 50%; background: #c5f09a; border: 1px solid #5f7745; box-shadow: 0 0 7px 2px #b9ff7066, inset 0 1px #edffd0; }
.intro-window-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 3px 17px; }
.intro-tv-badge { color: #353b32; font: 700 11px/1.4 "Space Grotesk", sans-serif; letter-spacing: 0.2em; text-shadow: 0 1px #e9dabc; }
.intro-tv-badge small { display: block; margin-top: 3px; font: 7px/1.4 monospace; letter-spacing: 0.1em; color: #5b5747; }
#gameIntro #introPlay {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 16px 22px;
  font-size: 15px;
  white-space: nowrap;
}
#introProgress {
  position: absolute;
  z-index: 2;
  bottom: 6%;
  left: 7%;
  width: 86%;
  height: 2px;
  border: 0;
  appearance: none;
  background: #c2f2a214;
  color: #c2f2a2;
  opacity: 0.6;
}
#introProgress::-webkit-progress-bar { background: #c2f2a214; }
#introProgress::-webkit-progress-value { background: #c2f2a2; }
#introProgress::-moz-progress-bar { background: #c2f2a2; }
body:has(#gameIntro:not([hidden])) { overflow: hidden; }
@media (max-width: 560px), (max-height: 520px) {
  #gameIntro { padding: 14px; }
  .intro-tv-stage { width: min(620px, 100%, calc((100dvh - 180px) * 4 / 3 + 130px)); padding-top: 40px; }
  .intro-tv-aerial { top: 23px; }
  .intro-tv-aerial::before, .intro-tv-aerial::after { height: 56px; }
  .intro-window { padding: 13px 12px 0; border-radius: 20px; }
  .intro-tv-face { grid-template-columns: minmax(0, 1fr) 74px; gap: 10px; }
  .intro-tv-bezel { padding: 9px; }
  .intro-tv-controls { gap: 12px; padding: 5px 0 0; }
  .intro-tv-brand { font-size: 14px; }
  .intro-tv-brand > span { font-size: 5px; letter-spacing: 0.08em; margin-top: 5px; }
  .intro-tuner { display: none; }
  .intro-volume-dial { width: 36px; height: 36px; }
  .intro-speaker { min-height: 20px; }
  .intro-power { font-size: 7px; gap: 5px; }
  .intro-window-footer { gap: 8px; padding: 12px 0 14px; }
  .intro-tv-badge { font-size: 9px; letter-spacing: 0.1em; }
  .intro-tv-badge small { font-size: 6px; letter-spacing: 0; }
  #gameIntro #introSkip { padding: 10px 12px; font-size: 10px; }
  #gameIntro #introPlay { font-size: 11px; padding: 12px; }
  .intro-channel { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .intro-volume-dial::after { transition: none; }
}
