@font-face {
  font-family: "Press Start 2P";
  src: url("fonts/press-start-2p.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

.vl-lab-quest-page {
  --vl-game-panel: #0f1620;
  --vl-game-panel-2: #172332;
  --vl-game-frame: #293849;
  --vl-game-frame-light: #5f7387;
  --vl-game-cream: #f3e6c8;
  --vl-game-amber: #e2b95f;
  --vl-game-green: #7cc784;
  --vl-game-red: #c75f54;
  --vl-game-cyan: #68d6ea;
  --vl-game-font: "Press Start 2P", "Courier New", monospace;
  --vl-game-max-width: 724px;
  --vl-game-max-height: 610px;
  --vl-game-min-width: 334px;
  --vl-game-min-height: 480px;
}

body.vl-view-page-lab-game-play,
body.vl-view-page-lab-quest,
body:has(.vl-lab-quest-page) {
  overflow-x: auto;
  overflow-y: auto;
  background: #030506;
}

body.vl-view-page-lab-game-play .vl-site,
body.vl-view-page-lab-quest .vl-site,
body:has(.vl-lab-quest-page) .vl-site {
  min-height: 100dvh;
  background: #030506;
}

body.vl-view-page-lab-game-play .vl-header,
body.vl-view-page-lab-game-play .vl-breadcrumbs,
body.vl-view-page-lab-game-play .vl-footer,
body.vl-view-page-lab-quest .vl-header,
body.vl-view-page-lab-quest .vl-breadcrumbs,
body.vl-view-page-lab-quest .vl-footer,
body:has(.vl-lab-quest-page) .vl-header,
body:has(.vl-lab-quest-page) .vl-breadcrumbs,
body:has(.vl-lab-quest-page) .vl-footer {
  display: none;
}

.vl-main.vl-lab-quest-page {
  width: 100%;
  min-height: 100dvh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  box-sizing: border-box;
  padding: 3px;
  background: #030506;
}

.vl-lab-quest-intro {
  width: 100%;
  max-width: none;
  min-width: var(--vl-game-min-width);
  min-height: max(calc(100dvh - 6px), var(--vl-game-min-height));
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #030506;
  box-shadow: none;
  color: var(--vl-game-cream);
  overflow: visible;
}

.vl-lab-quest-intro .vl-page-head,
.vl-lab-quest-about,
.vl-lab-quest-side,
.vl-lab-quest-intro noscript {
  display: none;
}

.vl-lab-quest-layout {
  width: 100%;
  min-height: inherit;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  position: relative;
}

.vl-lab-quest-stage {
  position: relative;
  width: min(100%, var(--vl-game-max-width));
  height: clamp(var(--vl-game-min-height), calc(100dvh - 6px), var(--vl-game-max-height));
  min-width: var(--vl-game-min-width);
  min-height: var(--vl-game-min-height);
  box-sizing: border-box;
  padding: 0;
  border: 2px solid #05080d;
  border-radius: 5px;
  background:
    linear-gradient(#18222e, #080d13) padding-box,
    linear-gradient(135deg, #4b6277, #070b10) border-box;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 0 1px rgba(95, 115, 135, 0.36);
  overflow: hidden;
}

.vl-lab-quest-loading {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  box-sizing: border-box;
  padding: 24px;
  background: #020304;
  color: #f3e6c8;
  font-family: var(--vl-game-font);
  font-size: 10px;
  line-height: 1.5;
  letter-spacing: 0;
  text-align: center;
}

.vl-lab-quest-loading.is-hidden {
  display: none;
}

.vl-lab-quest-loading__title {
  color: #f0a44a;
  font-size: 12px;
  text-shadow: 2px 2px 0 #2b160c;
}

.vl-lab-quest-loading__track {
  width: min(72%, 460px);
  height: 24px;
  box-sizing: border-box;
  padding: 4px;
  border: 3px solid #7d5935;
  background: #080b0d;
  box-shadow:
    3px 3px 0 #1d110a,
    inset 0 0 0 2px #020304;
}

.vl-lab-quest-loading__bar {
  display: block;
  width: 6%;
  height: 100%;
  background:
    repeating-linear-gradient(
      90deg,
      #4fcf72 0,
      #4fcf72 12px,
      #2f8f50 12px,
      #2f8f50 15px
    );
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.28);
}

.vl-lab-quest-loading__text {
  min-height: 1.5em;
  color: #f3e6c8;
}

.vl-lab-quest-game {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: block;
  box-sizing: border-box;
  background: #050911;
}

.vl-lab-quest-game canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.vl-lab-quest-touchpad {
  display: none;
  position: fixed;
  z-index: 80;
  margin: 0;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  touch-action: none;
  user-select: none;
}

.vl-lab-quest-action-button {
  display: none;
  position: fixed;
  z-index: 82;
  width: 96px;
  height: 96px;
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
  border: 2px solid rgba(243, 230, 200, 0.28);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 38%, rgba(226, 185, 95, 0.18), transparent 46%),
    rgba(15, 22, 32, 0.24);
  color: rgba(248, 238, 203, 0.72);
  box-shadow:
    inset 0 0 0 2px rgba(95, 115, 135, 0.12),
    0 0 18px rgba(0, 0, 0, 0.20);
  font-family: var(--vl-game-font);
  font-size: 10px;
  line-height: 1;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  touch-action: none;
  user-select: none;
  opacity: 0.44;
  cursor: default;
  outline: none;
  transform: translateZ(0);
}

.vl-lab-quest-action-button.is-active {
  border-color: rgba(243, 230, 200, 0.52);
  background:
    radial-gradient(circle at 50% 38%, rgba(226, 185, 95, 0.24), transparent 46%),
    rgba(15, 22, 32, 0.34);
  color: rgba(255, 245, 214, 0.92);
  opacity: 0.66;
}

.vl-lab-quest-touchpad__ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 130px;
  height: 130px;
  border: 2px solid rgba(243, 230, 200, 0.22);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(104, 214, 234, 0.05), transparent 44%),
    rgba(15, 22, 32, 0.28);
  box-shadow:
    inset 0 0 0 1px rgba(95, 115, 135, 0.2),
    0 0 18px rgba(0, 0, 0, 0.22);
  opacity: 0;
  transform: translate(-50%, -50%);
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  touch-action: none;
  user-select: none;
  transition: opacity 120ms ease, border-color 120ms ease, background 120ms ease;
}

.vl-lab-quest-touchpad.is-active .vl-lab-quest-touchpad__ring {
  border-color: rgba(243, 230, 200, 0.44);
  background:
    radial-gradient(circle at 50% 50%, rgba(104, 214, 234, 0.08), transparent 44%),
    rgba(15, 22, 32, 0.36);
  opacity: 0.52;
}

.vl-lab-quest-touchpad__knob {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border: 2px solid rgba(243, 230, 200, 0.36);
  border-radius: 50%;
  background:
    linear-gradient(135deg, rgba(226, 185, 95, 0.38), rgba(104, 214, 234, 0.2)),
    rgba(23, 35, 50, 0.42);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.24);
  opacity: 0;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  touch-action: none;
  user-select: none;
  transition: transform 50ms linear, opacity 120ms ease;
}

.vl-lab-quest-touchpad.is-active .vl-lab-quest-touchpad__knob {
  opacity: 0.7;
  transition: none;
}

.vl-lab-level-dialog {
  --vl-game-cream: #f3e6c8;
  --vl-game-amber: #e2b95f;
  --vl-game-cyan: #68d6ea;
  --vl-game-font: "Press Start 2P", "Courier New", monospace;
  position: fixed;
  left: var(--vl-lab-dialog-left, 0);
  top: var(--vl-lab-dialog-top, 0);
  width: var(--vl-lab-dialog-width, 100vw);
  height: var(--vl-lab-dialog-height, 100dvh);
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: rgba(3, 5, 6, 0.58);
  box-sizing: border-box;
}

.vl-lab-level-dialog.is-open {
  display: flex;
}

.vl-lab-level-dialog__panel {
  position: relative;
  width: min(296px, calc(100vw - 24px));
  aspect-ratio: 191 / 147;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: url("generated/short_menu_3.png") center / 100% 100% no-repeat;
  color: var(--vl-game-cream);
  font-family: var(--vl-game-font);
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.vl-lab-level-dialog__label {
  position: absolute;
  left: 27.2%;
  top: 3.4%;
  width: 45.6%;
  height: 19%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  color: var(--vl-game-amber);
  font-size: 7px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0;
  text-align: center;
  white-space: nowrap;
}

.vl-lab-level-dialog__input {
  position: absolute;
  left: 16.75%;
  top: 30.6%;
  width: 66.5%;
  height: 13%;
  box-sizing: border-box;
  border: 0;
  border-radius: 0;
  background: rgba(5, 18, 12, 0.56);
  color: var(--vl-game-cream);
  font: 400 16px/1 var(--vl-game-font);
  letter-spacing: 0;
  outline: none;
  padding: 0 8px;
  text-align: center;
  -webkit-appearance: none;
  appearance: none;
  -webkit-text-size-adjust: 100%;
}

.vl-lab-level-dialog__input:focus {
  box-shadow: inset 0 0 0 1px rgba(104, 214, 234, 0.42);
}

.vl-lab-level-dialog__actions {
  display: contents;
}

.vl-lab-level-dialog__button {
  position: absolute;
  left: 16.75%;
  top: 46.25%;
  width: 66.5%;
  height: 13%;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--vl-game-cream);
  font-family: var(--vl-game-font) !important;
  font-size: 8px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0;
  -webkit-appearance: none;
  appearance: none;
  -webkit-font-smoothing: none;
  text-rendering: geometricPrecision;
}

.vl-lab-level-dialog__button--ghost {
  top: 61.9%;
}

.vl-lab-level-dialog__button:hover,
.vl-lab-level-dialog__button:focus-visible {
  color: #ffffff;
  background: rgba(104, 214, 234, 0.08);
  outline: none;
}

@media (pointer: coarse), (max-width: 800px) {
  .vl-lab-quest-intro {
    min-height: max(calc(100dvh - 6px), var(--vl-game-min-height));
  }

  .vl-lab-quest-loading {
    gap: 14px;
    padding: 16px;
    font-size: 8px;
  }

  .vl-lab-quest-loading__title {
    font-size: 10px;
  }

  .vl-lab-quest-loading__track {
    width: min(82%, 420px);
    height: 20px;
    padding: 3px;
  }
}

.vl-lab-touch-ui .vl-lab-quest-touchpad {
  display: block;
  left: 40vw;
  right: 0;
  bottom: 0;
  width: 60vw;
  height: 260px;
  height: clamp(190px, 42dvh, 300px);
  padding-bottom: env(safe-area-inset-bottom);
  box-sizing: border-box;
}

.vl-lab-touch-ui .vl-lab-quest-action-button {
  display: block;
  left: clamp(12px, calc(20vw - 48px), 140px);
  bottom: calc(clamp(28px, 8dvh, 68px) + env(safe-area-inset-bottom));
}

.vl-lab-touch-ui .vl-lab-quest-touchpad__ring {
  width: 124px;
  height: 124px;
}

.vl-lab-touch-ui .vl-lab-quest-touchpad__knob {
  width: 42px;
  height: 42px;
  margin: -21px 0 0 -21px;
}

@media (hover: none) and (pointer: coarse), (any-hover: none) and (any-pointer: coarse) {
  .vl-lab-quest-touchpad {
    display: block;
    left: 40vw;
    right: 0;
    bottom: 0;
    width: 60vw;
    height: 260px;
    height: clamp(190px, 42dvh, 300px);
    padding-bottom: env(safe-area-inset-bottom);
    box-sizing: border-box;
  }

  .vl-lab-quest-action-button {
    display: block;
    left: clamp(12px, calc(20vw - 48px), 140px);
    bottom: calc(clamp(28px, 8dvh, 68px) + env(safe-area-inset-bottom));
  }

  .vl-lab-quest-touchpad__ring {
    width: 124px;
    height: 124px;
  }

  .vl-lab-quest-touchpad__knob {
    width: 42px;
    height: 42px;
    margin: -21px 0 0 -21px;
  }
}
