* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 42%, #f5f5f7 0%, #dcdce1 48%, #bdbdc4 100%);
  font-family: Tahoma, Verdana, "Segoe UI", sans-serif;
  color: #111;
}

#scene {
  position: fixed;
  inset: 0;
}

#scene .css3d,
#scene .webgl {
  position: absolute;
  inset: 0;
}

#scene .css3d {
  z-index: 0;
  pointer-events: none;
}

#scene .webgl {
  z-index: 1;
  cursor: pointer;
}

#scene.on-screen .webgl {
  pointer-events: none;
  cursor: default;
}

#scene iframe {
  border: 0;
  background: #000;
  pointer-events: none;
}

#scene.on-screen iframe {
  pointer-events: auto;
}

#os-full {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  z-index: 2;
  background: #000;
}

#bios {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  padding: clamp(14px, 3vw, 32px) clamp(14px, 4vw, 44px);
  background: #000;
  color: #c9c9c9;
  font: 15px/1.4 "Courier New", Consolas, monospace;
  transition: opacity 0.7s ease;
}

#bios.gone {
  opacity: 0;
  pointer-events: none;
}

#bios pre {
  margin: 0;
  font: inherit;
  white-space: pre-wrap;
}

.bios-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.bios-logo {
  color: #6fa8ff;
  flex: none;
}

.bios-foot {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.bios-ok {
  color: #fff;
}

#bios-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
}

#bios-start[hidden] {
  display: none;
}

.start-box {
  min-width: min(440px, 100%);
  padding: 22px 28px;
  border: 4px solid #fff;
  background: #000;
  color: #fff;
}

.start-tip {
  margin-top: 6px;
  color: #c9c9c9;
}

#start-btn {
  display: block;
  margin: 18px auto 0;
  padding: 8px 18px;
  border: 3px solid #fff;
  background: #000;
  color: #fff;
  font: inherit;
  cursor: pointer;
}

#start-btn:hover,
#start-btn:focus-visible {
  background: #fff;
  color: #000;
  outline: none;
}

.start-plain {
  display: block;
  margin-top: 14px;
  color: #9a9a9a;
  font-size: 13px;
  text-align: center;
}

.start-plain:hover,
.start-plain:focus-visible {
  color: #fff;
}

#hint {
  position: fixed;
  left: 50%;
  bottom: 7vh;
  z-index: 5;
  transform: translateX(-50%);
  padding: 6px 16px;
  background: #000;
  color: #fff;
  font: 15px "Courier New", Consolas, monospace;
  pointer-events: none;
  animation: blink 1.4s steps(2, jump-none) infinite;
}

#hint[hidden] {
  display: none;
}

@keyframes blink {
  50% {
    opacity: 0.25;
  }
}

#controls {
  position: fixed;
  inset: 14px 14px auto 14px;
  z-index: 6;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  pointer-events: none;
}

.ctl {
  pointer-events: auto;
  padding: 7px 12px;
  border: 0;
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  font: 13px "Courier New", Consolas, monospace;
  cursor: pointer;
}

.ctl:hover,
.ctl:focus-visible {
  background: #000;
  outline: 1px solid #fff;
}

.ctl[hidden] {
  display: none;
}

body.fullscreen-os #controls,
body.on-screen #controls {
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.noscript {
  position: fixed;
  inset: 0;
  z-index: 20;
  padding: 32px;
  background: #fff;
}

@media (prefers-reduced-motion: reduce) {
  #hint {
    animation: none;
  }

  #bios {
    transition: none;
  }
}
