/* Coordinates follow the source artwork through cover scaling. */
#gate {
  --art-width: max(100vw, 179.166667svh);
  --art-height: max(100svh, 55.813954vw);
  position: relative;
  isolation: isolate;
  display: block;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #101924;
  box-shadow: none;
  text-align: center;
  color-scheme: light;
}
#gate.hide, #gate .hide { display: none !important; }
#gate .gate-art {
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 50svh;
  width: var(--art-width);
  height: var(--art-height);
  max-width: none;
  transform: translate(-50%, -50%);
  object-fit: cover;
  pointer-events: none;
  user-select: none;
}
#gate .gate-controls {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: calc(50svh + var(--art-height) * .095);
  width: max(264px, calc(var(--art-width) * .174));
  margin: 0;
  padding: 0;
  transform: translateX(-50%);
}
#gate #gbtn {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: max(64px, calc(var(--art-height) * .072));
  min-height: 64px;
  overflow: visible;
  border: 1px solid #79c7eb;
  border-radius: 9px;
  background: linear-gradient(145deg, #30485d, #192c40 60%, #253b4d);
  box-shadow: 0 0 0 2px #132336, 0 0 16px #65c4f34d, 0 8px 22px #00000066, inset 0 1px 0 #ffffff30;
}
#gate .gate-feedback {
  box-sizing: border-box;
  position: relative;
  width: min(360px, calc(100vw - 32px));
  max-height: max(90px, calc(50svh - var(--art-height) * .167 - 76px));
  margin: 12px 0 0;
  left: 50%;
  transform: translateX(-50%);
  padding: 14px 16px;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #ffffffb3;
  border-radius: 10px;
  background: #f8fafcf7;
  box-shadow: 0 10px 30px #00000050;
  color: #334155;
}
#gate .gate-feedback:not(:has(#gateWhy:not(:empty):not(.hide), #gateNote:not(:empty):not(.hide), #gateFunds:not(:empty):not(.hide), #gateBack:not(.hide))) { display: none; }
#gate #gateWhy, #gate #gateNote, #gate #gateBack {
  margin: 0;
  color: #334155;
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
#gate #gateWhy:empty, #gate #gateNote:empty { display: none; }
#gate #gateWhy:not(:empty) { margin-bottom: 8px; }
#gate #gateNote.gate-busy { color: #2367be; font-size: 12px; font-weight: 500; }
#gate #gateFunds { margin: 8px 0; color: #334155; font-size: 12px; }
#gate #gateFunds p { color: inherit; }
#gate #gateFunds button, #gate #backIn { max-width: 100%; background: #fff; color: #334155; white-space: normal; overflow-wrap: anywhere; }
#gate #gateBack:not(.hide) { margin-top: 8px; }
#gate button:focus-visible, #gate a:focus-visible { outline: 3px solid #2c7eea; outline-offset: 4px; }
#gate .gate-footer {
  position: absolute;
  z-index: 1;
  bottom: 12px;
  left: 12px;
  right: 12px;
  color: #fff;
  font-size: 10px;
  text-shadow: 0 1px 4px #000, 0 1px 10px #000;
}
#gate .gate-footer p { margin: 5px 0; color: inherit; }
#gate .gate-footer a, #gate .gate-footer .lang-link { color: inherit; font-size: 10px; text-underline-offset: 3px; }
#gate .gate-footer .lang-link { padding: 2px 7px; }
@media (max-height: 500px) {
  #gate .gate-feedback {
    position: absolute;
    bottom: calc(100% + 10px);
    max-height: max(70px, calc(50svh + var(--art-height) * .095 - 24px));
    margin-top: 0;
  }
  #gate .gate-footer { bottom: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  #gate #gateNote.gate-busy::before { animation: none; }
}
#gate #gateFunds .hint { color: #526174; }
