:root {
  color-scheme: dark;
  --stage: #010302;
  --bezel: #050706;
  --bezel-line: rgba(255, 255, 255, 0.16);
  --screen: #06100a;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--stage);
}

body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

.scanner-stage {
  display: grid;
  min-height: 100svh;
  place-items: center;
  padding: 32px;
  background: var(--stage);
}

.iphone-frame {
  position: relative;
  width: min(390px, calc(100vw - 48px));
  height: min(844px, calc(100svh - 64px));
  min-height: 620px;
  border: 12px solid var(--bezel);
  border-radius: 48px;
  background: var(--screen);
  box-shadow:
    0 0 0 1px var(--bezel-line),
    0 26px 80px rgba(0, 0, 0, 0.7);
  overflow: hidden;
}

.iphone-speaker {
  position: absolute;
  top: 10px;
  left: 50%;
  z-index: 2;
  width: 86px;
  height: 24px;
  border-radius: 0 0 16px 16px;
  background: var(--bezel);
  transform: translateX(-50%);
}

iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--screen);
}

@media (min-width: 960px) and (min-height: 980px) {
  .iphone-frame {
    width: 780px;
    height: 1688px;
    max-width: calc(100vw - 80px);
    max-height: none;
    border-width: 24px;
    border-radius: 96px;
  }

  .iphone-speaker {
    top: 20px;
    width: 172px;
    height: 48px;
    border-radius: 0 0 32px 32px;
  }
}

@media (max-width: 720px) {
  .scanner-stage {
    display: block;
    min-height: 100svh;
    padding: 0;
  }

  .iphone-frame {
    width: 100vw;
    height: 100svh;
    min-height: 100svh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .iphone-speaker {
    display: none;
  }
}
