* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  min-height: 100%;
  background: #0b0f14;
  color: #f5f7fb;
  font-family: Arial, sans-serif;
}

body {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.flat-page-wrap {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
  gap: 14px;
  width: 100%;
  height: 100%;
  padding: 10px 12px;
}

.flat-shell {
  width: min(100%, 430px);
  height: calc(100vh - 20px);
  height: calc(100dvh - 20px);
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  overflow: hidden;
  background: #000;
}

#mobileFramePool {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  overflow: hidden;
}

.mobile-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}

.mobile-frame:not(.is-active) {
  position: absolute;
  inset: 0;
  visibility: hidden;
  pointer-events: none;
  height: 0 !important;
  min-height: 0 !important;
  overflow: hidden;
}

.mobile-frame.is-active {
  position: relative;
  visibility: visible;
  pointer-events: auto;
}

.flat-qr-side {
  flex: 0 0 auto;
  width: 132px;
  margin-top: 24px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: #121820;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  text-align: center;
}

.flat-qr-side[hidden] {
  display: none !important;
}

.flat-qr-side-label {
  margin: 0 0 8px;
  color: #9aa4b2;
  font-size: 10px;
  line-height: 1.35;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

#flatQrImage {
  display: block;
  width: 112px;
  height: 112px;
  margin: 0 auto 8px;
  padding: 4px;
  border-radius: 6px;
  background: #fff;
  image-rendering: pixelated;
}

.flat-qr-side-url {
  margin: 0 0 6px;
  color: #6b7785;
  font-size: 9px;
  line-height: 1.35;
  word-break: break-all;
}

.flat-qr-side-open {
  display: inline-block;
  color: #6eb6ff;
  font-size: 10px;
  font-weight: 700;
  text-decoration: none;
}

.flat-qr-side-open:hover {
  text-decoration: underline;
}

.flat-qr-side-hint {
  margin: 8px 0 0;
  color: #ed1c24;
  font-size: 9px;
  line-height: 1.35;
}

.flat-qr-side-input {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 4px 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  background: #0b0f14;
  color: #f5f7fb;
  font-size: 9px;
}

.flat-qr-side-btn {
  width: 100%;
  margin-top: 6px;
  padding: 5px 6px;
  border: 0;
  border-radius: 4px;
  background: #ed1c24;
  color: #fff;
  cursor: pointer;
  font-size: 9px;
  font-weight: 700;
}

@media (max-width: 619px) {
  .flat-qr-side {
    display: none !important;
  }

  .flat-page-wrap {
    padding: 0;
  }

  .flat-shell {
    height: 100vh;
    height: 100dvh;
  }
}
