html, body {
  height: 100%;
  margin: 0;
  background: #090a09;
  color: #f4f7f2;
  font-family: "Segoe UI", sans-serif;
}

body {
  min-height: 100%;
  overflow: hidden;
}

button, canvas, img {
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

.pair {
  box-sizing: border-box;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4vh 6vw 6vh;
}

.pair-kicker {
  margin: 1.5vh 0 0;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: clamp(12px, 1.6vw, 20px);
  color: #c5cdc0;
}

.pair-layout {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 6vw;
}

.pair-copy {
  min-width: 0;
}

.pair-code {
  margin: 1vh 0;
  font-size: clamp(72px, 14vw, 240px);
  line-height: 0.95;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #c8ff2f;
  font-variant-numeric: tabular-nums;
}

.pair-status,
.pair-help,
.pair-note {
  margin: 0 auto;
  max-width: 46rem;
}

.pair-status {
  font-size: clamp(18px, 2.2vw, 34px);
}

.pair-help {
  margin-top: 1.4vh;
  font-size: clamp(16px, 1.7vw, 26px);
  color: #d5ddd0;
}

.pair-note {
  margin-top: 2vh;
  font-size: clamp(14px, 1.3vw, 20px);
  color: #8b9584;
}

.pair-qr {
  width: min(280px, 32vw);
  height: min(280px, 32vw);
  background: #c8ff2f;
  border-radius: 12px;
}

.pair-retry {
  margin-top: 2vh;
  min-height: 64px;
  padding: 12px 28px;
  border: 0;
  border-radius: 8px;
  background: #c8ff2f;
  color: #10233f;
  font: inherit;
  font-size: clamp(18px, 2vw, 28px);
  font-weight: 700;
}

.pair-retry:focus {
  outline: 3px solid #fff;
  outline-offset: 4px;
}

.stage {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

.canvas {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  overflow: hidden;
  background: #090a09;
  color: #fff;
}

.tile {
  position: absolute;
  overflow: hidden;
  background: #151714;
  border-radius: 10px;
}

.tile iframe {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
  opacity: 0;
}

.tile iframe.is-shown {
  opacity: 1;
}

.shield {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
}

.empty,
.canvas-error {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 24px;
  text-align: center;
  font-size: clamp(18px, 2.4vw, 32px);
}

.offline,
.fullscreen-hint {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  max-width: calc(100% - 32px);
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  text-align: center;
  font-size: clamp(14px, 1.6vw, 22px);
}

.offline {
  top: 12px;
}

.fullscreen-hint {
  bottom: 16px;
}

.blank {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 6;
  background: #000;
}

html.is-idle,
html.is-idle * {
  cursor: none;
}

@media (max-width: 800px) {
  .pair-layout {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tile iframe {
    transition: none;
  }
}
