/* Oracle Park, story mode: the gate by 3rd Street, and the ballpark inside. */
#stGate {
  position: fixed;
  left: 50%;
  bottom: 118px;
  transform: translateX(-50%) translateY(14px);
  z-index: 36;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px 10px 16px;
  border-radius: 14px;
  border: 1px solid rgba(253, 90, 30, .55);
  background: linear-gradient(150deg, rgba(12, 17, 24, .96), rgba(20, 28, 38, .94));
  box-shadow: 0 16px 40px rgba(0, 0, 0, .48), 0 0 0 1px rgba(255, 255, 255, .04) inset;
  color: #f6ecd8;
  font-family: Archivo, system-ui, sans-serif;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
#stGate.on { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
#stGate .stBall {
  width: 38px; height: 38px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fffdf6, #e9e2d0 52%, #bdb39d 100%);
  position: relative; flex: 0 0 auto;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .45);
}
#stGate .stBall::before, #stGate .stBall::after {
  content: ""; position: absolute; inset: 7px 12px; border-radius: 50%;
  border-left: 2px solid #c0392b; border-right: 2px solid #c0392b;
  transform: rotate(18deg);
}
#stGate .stBall::after { transform: rotate(-55deg); opacity: .75; }
#stGate .stCopy { min-width: 0; }
#stGate b {
  display: block; font-size: 15px; letter-spacing: .14em; text-transform: uppercase;
  color: #fff; line-height: 1.15;
}
#stGate small {
  display: block; margin-top: 3px; font-size: 11.5px; color: rgba(246, 236, 216, .72);
  letter-spacing: .06em;
}
#stGate button {
  all: unset; cursor: pointer;
  padding: 10px 16px; border-radius: 10px;
  background: #fd5a1e; color: #160a04;
  font: 800 12px/1 Archivo, sans-serif; letter-spacing: .12em; text-transform: uppercase;
  box-shadow: 0 4px 0 #a93710;
  white-space: nowrap;
}
#stGate button:active { transform: translateY(2px); box-shadow: 0 2px 0 #a93710; }
#stGate kbd {
  font: 700 10px/1 'JetBrains Mono', monospace; color: rgba(246, 236, 216, .55);
  border: 1px solid rgba(246, 236, 216, .22); border-radius: 5px;
  padding: 4px 6px; margin-left: 2px;
}
@media (max-width: 620px) {
  #stGate { bottom: 96px; width: calc(100% - 28px); max-width: 390px; padding: 9px 10px 9px 12px; gap: 9px; }
  #stGate .stBall { width: 32px; height: 32px; }
  #stGate b { font-size: 13px; }
  #stGate small { font-size: 10.5px; }
  #stGate button { padding: 9px 11px; font-size: 11px; }
  #stGate kbd { display: none; }
}

#stChip {
  position: fixed; left: 50%; top: 74px; transform: translateX(-50%);
  z-index: 34; pointer-events: none; opacity: 0; transition: opacity .3s ease;
  display: flex; align-items: center; gap: 8px;
  padding: 7px 13px; border-radius: 999px;
  border: 1px solid rgba(253, 90, 30, .4);
  background: rgba(10, 14, 20, .82);
  color: #f6ecd8; font: 700 10.5px/1 Archivo, sans-serif; letter-spacing: .16em; text-transform: uppercase;
  backdrop-filter: blur(8px);
}
#stChip.on { opacity: 1; }
#stChip i { width: 7px; height: 7px; border-radius: 50%; background: #fd5a1e; box-shadow: 0 0 12px #fd5a1e; }

/* ------------------------------------------------------------ the ballpark */
#stOverlay {
  position: fixed; inset: 0; z-index: 70; display: none;
  background: #06090d; color: #f6ecd8; overflow: hidden;
  font-family: Archivo, system-ui, sans-serif;
  -webkit-user-select: none; user-select: none;
}
#stOverlay.on { display: block; }
body.stadium-on #view, body.stadium-on #hud, body.stadium-on #mini,
body.stadium-on #where, body.stadium-on #touch, body.stadium-on #tbar,
body.stadium-on #menu, body.stadium-on #toast, body.stadium-on #help,
body.stadium-on #pause, body.stadium-on #title, body.stadium-on #mpPanel { visibility: hidden !important; }
body.stadium-on #c { visibility: hidden !important; }
#stCanvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

#stOverlay .stTop {
  position: absolute; inset: 0 0 auto 0; z-index: 3;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
  padding: max(14px, env(safe-area-inset-top)) 18px 0 18px;
  pointer-events: none;
}
#stOverlay .stBrand {
  pointer-events: none;
  padding: 10px 16px 11px; border-radius: 12px;
  border: 1px solid rgba(246, 236, 216, .16);
  background: linear-gradient(160deg, rgba(7, 10, 14, .88), rgba(14, 20, 27, .72));
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}
#stOverlay .stBrand b {
  display: block; font-size: 20px; line-height: 1; letter-spacing: .14em; color: #fff;
}
#stOverlay .stBrand b em { color: #fd5a1e; font-style: normal; }
#stOverlay .stBrand small {
  display: block; margin-top: 4px; font: 600 9.5px/1.2 'JetBrains Mono', monospace;
  letter-spacing: .16em; color: rgba(246, 236, 216, .66); text-transform: uppercase;
}
#stOverlay .stBoard {
  pointer-events: none; margin: 0 auto; padding: 8px 16px 9px; border-radius: 12px;
  border: 1px solid rgba(246, 236, 216, .16);
  background: rgba(7, 10, 14, .84); min-width: 300px; text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}
#stOverlay .stBoard .stLine {
  display: flex; justify-content: center; align-items: center; gap: 16px;
  font: 800 28px/1 Archivo, sans-serif; color: #fff; letter-spacing: .03em;
}
#stOverlay .stBoard .stLine span { color: #fd5a1e; font-size: 12px; letter-spacing: .2em; font-weight: 800; }
#stOverlay .stBoard .stMeta {
  margin-top: 5px; font: 600 10px/1 'JetBrains Mono', monospace; letter-spacing: .12em;
  color: rgba(246, 236, 216, .68); text-transform: uppercase;
}
#stOverlay .stBoard .stDots { display: inline-flex; gap: 4px; margin-left: 6px; vertical-align: 1px; }
#stOverlay .stBoard .stDots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(246, 236, 216, .2); }
#stOverlay .stBoard .stDots i.on { background: #fd5a1e; box-shadow: 0 0 8px rgba(253, 90, 30, .8); }
#stOverlay .stBtns { display: flex; gap: 8px; align-items: flex-start; pointer-events: auto; }
#stOverlay .stBtns button {
  all: unset; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 40px; padding: 0 14px; border-radius: 10px;
  border: 1px solid rgba(246, 236, 216, .2); background: rgba(9, 13, 18, .88);
  color: #f6ecd8; font: 800 10.5px/1 Archivo, sans-serif; letter-spacing: .14em; text-transform: uppercase;
  backdrop-filter: blur(8px);
}
#stOverlay .stBtns button:hover { border-color: rgba(253, 90, 30, .7); }
#stOverlay .stBtns button.orange { background: #fd5a1e; color: #180b04; border-color: #fd5a1e; box-shadow: 0 3px 0 #a93710; }
#stOverlay .stBtns button.off { opacity: .5; }

#stOverlay .stBottom {
  position: absolute; inset: auto 0 0 0; z-index: 3;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  padding: 0 18px max(16px, env(safe-area-inset-bottom)) 18px;
  pointer-events: none;
}
#stOverlay .stTicker {
  flex: 1 1 auto; max-width: 720px;
  padding: 11px 16px; border-radius: 12px;
  border: 1px solid rgba(246, 236, 216, .14);
  background: linear-gradient(160deg, rgba(7, 10, 14, .9), rgba(14, 20, 27, .78));
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}
#stOverlay .stTicker b {
  display: block; font: 800 10px/1 'JetBrains Mono', monospace; letter-spacing: .18em;
  color: #fd5a1e; text-transform: uppercase; margin-bottom: 4px;
}
#stOverlay .stTicker span { display: block; font-size: 14.5px; color: #f6ecd8; line-height: 1.3; }
#stOverlay .stHint {
  flex: 0 0 auto; padding: 8px 13px; border-radius: 10px;
  background: rgba(7, 10, 14, .8); border: 1px solid rgba(246, 236, 216, .13);
  font: 600 10px/1.4 'JetBrains Mono', monospace; letter-spacing: .06em; color: rgba(246, 236, 216, .7);
  text-align: right;
}
#stOverlay .stHint b { color: #f6ecd8; }

#stCurtain {
  position: absolute; inset: 0; z-index: 6; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px; text-align: center;
  background: radial-gradient(circle at 50% 42%, rgba(24, 12, 6, .86), #040507 62%);
  transition: opacity .65s ease, visibility .65s;
  padding: 24px;
}
#stCurtain.gone { opacity: 0; visibility: hidden; }
#stCurtain .stCrest {
  width: 58px; height: 58px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fffdf6, #e9e2d0 52%, #bdb39d 100%);
  position: relative; box-shadow: 0 0 40px rgba(253, 90, 30, .35);
}
#stCurtain .stCrest::before, #stCurtain .stCrest::after {
  content: ""; position: absolute; inset: 11px 19px; border-radius: 50%;
  border-left: 3px solid #c0392b; border-right: 3px solid #c0392b; transform: rotate(18deg);
}
#stCurtain .stCrest::after { transform: rotate(-55deg); opacity: .75; }
#stCurtain b { font-size: 28px; letter-spacing: .18em; color: #fff; text-transform: uppercase; }
#stCurtain b em { color: #fd5a1e; font-style: normal; }
#stCurtain small { font: 600 10px/1.4 'JetBrains Mono', monospace; letter-spacing: .22em; color: rgba(246, 236, 216, .66); text-transform: uppercase; }
#stCurtain .stBar { width: 190px; height: 3px; border-radius: 3px; background: rgba(246, 236, 216, .16); overflow: hidden; margin-top: 6px; }
#stCurtain .stBar i { display: block; height: 100%; width: 38%; background: #fd5a1e; animation: stWalk 1.1s ease-in-out infinite; }
@keyframes stWalk { 0% { transform: translateX(-110%); } 100% { transform: translateX(330%); } }

#stFinal {
  position: absolute; inset: 0; z-index: 5; display: none;
  align-items: center; justify-content: center;
  background: rgba(3, 5, 8, .62); backdrop-filter: blur(7px);
}
#stFinal.on { display: flex; }
#stFinal .stCard {
  width: min(92vw, 420px); padding: 26px 26px 22px; border-radius: 18px;
  border: 1px solid rgba(246, 236, 216, .18);
  background: linear-gradient(155deg, rgba(15, 22, 30, .98), rgba(9, 13, 18, .98));
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6); text-align: center;
}
#stFinal b { display: block; font-size: 13px; letter-spacing: .3em; color: #fd5a1e; text-transform: uppercase; }
#stFinal .stFinalScore { margin: 16px 0 6px; font: 800 40px/1 Archivo, sans-serif; color: #fff; letter-spacing: .04em; }
#stFinal .stFinalScore small { display: block; margin-top: 7px; font: 600 10px/1 'JetBrains Mono', monospace; letter-spacing: .16em; color: rgba(246, 236, 216, .6); }
#stFinal p { margin: 10px 0 18px; font-size: 13px; color: rgba(246, 236, 216, .72); }
#stFinal .stCardBtns { display: flex; gap: 10px; justify-content: center; }
#stFinal button {
  all: unset; cursor: pointer; padding: 12px 18px; border-radius: 10px;
  border: 1px solid rgba(246, 236, 216, .2); background: rgba(246, 236, 216, .06);
  color: #f6ecd8; font: 800 11px/1 Archivo, sans-serif; letter-spacing: .12em; text-transform: uppercase;
}
#stFinal button.orange { background: #fd5a1e; color: #180b04; border-color: #fd5a1e; box-shadow: 0 3px 0 #a93710; }

@media (max-width: 780px) {
  #stOverlay .stTop { padding: max(10px, env(safe-area-inset-top)) 10px 0 10px; gap: 6px; }
  #stOverlay .stBrand { padding: 8px 11px 9px; }
  #stOverlay .stBrand b { font-size: 15px; }
  #stOverlay .stBrand small { font-size: 8px; letter-spacing: .1em; }
  #stOverlay .stBoard { min-width: 0; padding: 6px 10px; }
  #stOverlay .stBoard .stLine { font-size: 21px; gap: 11px; }
  #stOverlay .stBoard .stMeta { font-size: 8.5px; }
  #stOverlay .stBtns button { min-height: 36px; padding: 0 10px; font-size: 9px; }
  #stOverlay .stBtns .stCamLabel { display: none; }
  #stOverlay .stBottom { padding: 0 10px max(10px, env(safe-area-inset-bottom)) 10px; }
  #stOverlay .stTicker { padding: 9px 12px; }
  #stOverlay .stTicker span { font-size: 12.5px; }
  #stOverlay .stHint { display: none; }
  #stCurtain b { font-size: 21px; }
}
@media (max-width: 470px) {
  #stOverlay .stBrand small { display: none; }
  #stOverlay .stBoard .stLine span { display: none; }
  #stOverlay .stBtns button { font-size: 0; width: 40px; padding: 0; }
  #stOverlay .stBtns button svg { width: 18px; height: 18px; }
  #stOverlay .stBtns button#stLeave { font-size: 9px; width: auto; padding: 0 11px; }
}
