#stopcode-overlay,
html.bsod-page,
html.bsod-page body {
  height: 100%;
  background: #0078d7;
  color: #fff;
  font-family: "Segoe UI", "Segoe UI Variable", -apple-system, BlinkMacSystemFont, sans-serif;
  overflow: hidden;
}

#stopcode-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  outline: none;
}

#stopcode-overlay .bsod,
.bsod-page .bsod {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 0 8vw 0 10vw;
}

#stopcode-overlay .bsod {
  min-height: 100%;
  height: 100%;
}

.bsod-content {
  max-width: 960px;
  width: 100%;
}

.sad {
  font-size: clamp(140px, 18vh, 200px);
  font-weight: 300;
  line-height: 1;
  margin-bottom: 36px;
  letter-spacing: 0;
}

.message {
  font-size: clamp(28px, 3.2vh, 36px);
  font-weight: 400;
  line-height: 1.35;
  margin-bottom: 28px;
  max-width: 820px;
}

.progress {
  font-size: clamp(28px, 3.2vh, 36px);
  font-weight: 400;
  line-height: 1.35;
  margin-bottom: 12px;
}

.progress-instructions {
  font-size: clamp(20px, 2.4vh, 28px);
  font-weight: 400;
  line-height: 1.6;
  margin-bottom: 80px;
  max-width: 820px;
  opacity: 0;
  transform: translateY(18px);
}

.progress-instructions[hidden] {
  display: none;
}

.progress-instructions.is-visible {
  animation: stopcode-instructions-in 0.55s ease forwards;
}

.progress-instructions.is-visible .instruction-list li {
  animation: stopcode-step-in 0.5s ease forwards;
}

.progress-instructions.is-visible .instruction-list li:nth-child(1) {
  animation-delay: 0.12s;
}

.progress-instructions.is-visible .instruction-list li:nth-child(2) {
  animation-delay: 0.28s;
}

.progress-instructions.is-visible .instruction-list li:nth-child(3) {
  animation-delay: 0.44s;
}

.instruction-list li {
  opacity: 0;
  transform: translateY(14px);
}

@keyframes stopcode-instructions-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes stopcode-step-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .progress-instructions,
  .instruction-list li {
    opacity: 1;
    transform: none;
    animation: none !important;
  }
}

.instruction-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.instruction-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35em;
}

.instruction-num {
  font-weight: 600;
  margin-right: 0.15em;
}

.kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25em;
  min-width: 2.1em;
  padding: 0.28em 0.65em;
  border: 1px solid #c8c8c8;
  border-bottom-width: 3px;
  border-radius: 6px;
  background: linear-gradient(180deg, #f8f8f8 0%, #e8e8e8 100%);
  color: #1a1a1a;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.88em;
  font-weight: 600;
  line-height: 1.2;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset;
  white-space: nowrap;
}

.kbd-win {
  min-width: auto;
  padding: 0.32em 0.55em;
}

.kbd-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1em;
  height: 1em;
  flex-shrink: 0;
}

.kbd-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.kbd-icon path {
  fill: currentColor;
}

.kbd-plus {
  font-weight: 400;
  opacity: 0.95;
  margin: 0 0.1em;
}

.bsod-footer {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  max-width: 960px;
}

.qr {
  width: 130px;
  height: 130px;
  flex-shrink: 0;
  background: #fff;
  display: block;
}

.footer-text {
  font-size: clamp(16px, 1.8vh, 20px);
  font-weight: 400;
  line-height: 1.45;
  padding-top: 4px;
}

.footer-text a {
  color: #fff;
  text-decoration: underline;
}

.footer-text p + p {
  margin-top: 10px;
}

.stop-code {
  font-weight: 400;
}

@media (max-width: 768px) {
  #stopcode-overlay .bsod,
  .bsod-page .bsod {
    padding: 0 6vw 0 8vw;
  }

  .sad {
    font-size: 100px;
    margin-bottom: 28px;
  }

  .message,
  .progress {
    font-size: 22px;
  }

  .progress-instructions {
    font-size: 18px;
    margin-bottom: 56px;
  }

  .progress {
    margin-bottom: 10px;
  }

  .qr {
    width: 100px;
    height: 100px;
  }

  .footer-text {
    font-size: 15px;
  }
}
