:root {
  color-scheme: light;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  background: #f57a12;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-width: 320px;
  min-height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
}

body.orange-gate {
  background: #f57a12;
}

body.gold-gate {
  background: #d4a112;
  border: 14px solid #050505;
}

.gate-root {
  position: fixed;
  inset: 0;
}

.corner-form {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 5;
  width: min(190px, calc(100vw - 36px));
  height: 40px;
}

.corner-form input,
.pgp-form input {
  width: 100%;
  height: 100%;
  border: 2px solid #050505;
  border-radius: 0;
  background: transparent;
  color: #050505;
  font: inherit;
  outline: none;
  padding: 8px 10px;
  letter-spacing: 0;
}

.corner-form input:focus,
.pgp-form input:focus {
  background: rgba(255, 255, 255, 0.12);
}

.corner-form.input-vanished {
  opacity: 0;
  pointer-events: none;
}

.drift-word {
  position: fixed;
  z-index: 2;
  color: #111;
  font-size: clamp(24px, 6vh, 70px);
  line-height: 1;
  letter-spacing: 0;
  user-select: none;
  white-space: nowrap;
  will-change: left, top;
}

.shake {
  animation: shake-screen 180ms linear 0s 2;
}

body.orange-gate::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  background: #d4a112;
  transform: translateX(-102%);
}

body.orange-gate.wiping::after {
  transition: transform 860ms cubic-bezier(0.78, 0, 0.18, 1);
  transform: translateX(0);
}

.pgp-shell {
  display: grid;
  min-height: calc(100vh - 28px);
  place-items: center;
  padding: 28px;
}

.pgp-box {
  width: min(900px, 92vw);
}

.pgp-box pre {
  width: 100%;
  max-height: min(62vh, 640px);
  margin: 0;
  overflow: auto;
  border: 5px solid #050505;
  background: rgba(255, 255, 255, 0.14);
  color: #050505;
  padding: 18px;
  white-space: pre-wrap;
  word-break: break-word;
  font: 13px/1.35 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  letter-spacing: 0;
}

.pgp-form {
  width: min(520px, 100%);
  height: 42px;
  margin: 18px auto 0;
}

.monitor {
  display: grid;
  min-height: 100vh;
  place-items: center;
  background: #111;
  color: #e7c24b;
  font-size: clamp(18px, 4vw, 42px);
}

@keyframes shake-screen {
  0%,
  100% {
    transform: translate(0, 0);
  }
  20% {
    transform: translate(-4px, 2px);
  }
  40% {
    transform: translate(4px, -1px);
  }
  60% {
    transform: translate(-2px, -2px);
  }
  80% {
    transform: translate(2px, 1px);
  }
}

@media (max-width: 560px) {
  body.gold-gate {
    border-width: 10px;
  }

  .pgp-shell {
    min-height: calc(100vh - 20px);
    padding: 16px;
  }

  .pgp-box pre {
    font-size: 11px;
    padding: 12px;
  }
}
