:root {
  --text: #f7fbff;
  --green: #31c34a;
  --red: #ef4444;
  --font: Montserrat, "Segoe UI", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  background: #000;
  color: var(--text);
  font-family: var(--font);
}

html {
  touch-action: none;
}

.scan-shell {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  min-height: 100vh;
  background: #000;
}

h2,
p {
  margin-top: 0;
}

#reader,
#reader video {
  width: 100% !important;
  height: 100% !important;
}

#reader {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

#reader video {
  object-fit: cover;
  object-position: center center;
}

#reader__dashboard,
#reader__scan_region img {
  display: none !important;
}

.result-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 3rem;
  text-align: center;
  z-index: 10;
}

.scan-logo {
  position: absolute;
  top: max(2rem, env(safe-area-inset-top));
  left: 50%;
  width: min(78vw, 980px);
  height: auto;
  transform: translateX(-50%);
}

@media (orientation: landscape) {
  .scan-shell,
  #reader {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
  }

  .result-overlay {
    padding: 7rem 6rem 2rem;
  }

  .result-overlay h2 {
    font-size: clamp(4rem, 8vw, 8rem);
  }

  .result-message {
    max-width: 42rem;
  }

  .attendee-card {
    max-width: 60vw;
  }
}

@media (orientation: portrait) {
  body::before {
    content: "Please rotate iPad to landscape";
    position: fixed;
    inset: 0;
    z-index: 20;
    display: grid;
    place-items: center;
    padding: 2rem;
    background: #000;
    color: #fff;
    text-align: center;
    font-size: clamp(2rem, 8vw, 4rem);
    font-weight: 800;
  }
}

.result-overlay[hidden] {
  display: none;
}

.result-overlay.success {
  background: linear-gradient(160deg, rgba(49, 195, 74, 0.95), rgba(16, 104, 43, 0.95));
}

.result-overlay.error {
  background: linear-gradient(160deg, rgba(239, 68, 68, 0.96), rgba(127, 29, 29, 0.96));
}

.result-kicker {
  margin-bottom: 0.75rem;
  font-size: clamp(1rem, 2.2vw, 1.6rem);
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.result-overlay h2 {
  margin-bottom: 1rem;
  font-size: clamp(4rem, 9vw, 9rem);
  line-height: 0.95;
}

.result-message {
  margin: 0 auto;
  max-width: 22rem;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1.15rem, 2vw, 1.8rem);
  line-height: 1.35;
}

.attendee-card {
  margin-top: 2rem;
  padding: 1.5rem;
  border-radius: 22px;
  background: rgba(0, 0, 0, 0.18);
}

.attendee-name {
  font-size: clamp(2rem, 4.5vw, 4.5rem);
  font-weight: 800;
  line-height: 1.05;
}

.attendee-meta,
.attendee-company {
  margin-top: 0.65rem;
  font-size: clamp(1rem, 2vw, 1.6rem);
  color: rgba(255, 255, 255, 0.86);
}
