* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #07183a;
  color: #fff;
  font-family: "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

button,
input {
  font: inherit;
}

.app {
  width: 100%;
  min-height: 100vh;
}

.screen {
  position: relative;
  width: min(100vw, 480px);
  margin: 0 auto;
  overflow: hidden;
  background: #0c438b;
}

.screen.long {
  overflow: visible;
}

.bg {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  pointer-events: none;
}

.asset,
.tap,
.field,
.label-text,
.qr-wrap,
.video-box {
  position: absolute;
}

.tap {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.tap:disabled {
  pointer-events: none;
  opacity: 0.55;
}

.fixed-back,
.fixed-back-document {
  position: fixed;
  z-index: 20;
  left: calc(50% - min(100vw, 480px) / 2 + var(--fixed-x) * min(100vw, 480px)) !important;
  width: calc(var(--fixed-w) * min(100vw, 480px)) !important;
  height: calc(var(--fixed-ratio) * var(--fixed-w) * min(100vw, 480px)) !important;
  opacity: 0.72;
}

.fixed-back {
  top: min(calc(var(--fixed-y) * 100vh), calc(100vh - var(--fixed-ratio) * var(--fixed-w) * min(100vw, 480px) - 18px)) !important;
}

.fixed-back-document {
  top: min(calc(var(--fixed-y) * min(100vw, 480px)), calc(100vh - var(--fixed-ratio) * var(--fixed-w) * min(100vw, 480px) - 18px)) !important;
}

.fixed-back:active,
.fixed-back-document:active {
  opacity: 0.92;
}

.tap img,
.asset {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.field {
  border: 0;
  outline: 0;
  color: #23639a;
  background: transparent;
  padding: 0 7%;
  font-size: clamp(16px, 4vw, 22px);
}

.field::placeholder {
  color: rgba(78, 103, 125, 0.36);
}

.modal-image {
  position: fixed;
  z-index: 50;
  inset: 0;
  width: min(100vw, 480px);
  height: auto;
  margin: 0 auto;
}

.guest-name {
  width: 52%;
  text-align: center;
  color: #fff;
  font-size: clamp(28px, 9vw, 46px);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.1;
  text-shadow: 0 2px 10px rgba(24, 80, 140, 0.22);
}

.guest-company {
  width: 56%;
  text-align: center;
  color: #fff;
  font-size: clamp(22px, 7vw, 34px);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.1;
}

.seat-text {
  width: 38%;
  text-align: center;
  color: #0d3374;
  font-size: clamp(14px, 4.3vw, 22px);
  font-weight: 700;
  line-height: 1.2;
}

.qr-wrap {
  display: grid;
  place-items: center;
  background: #fff;
}

.qr-wrap img,
.qr-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}

.video-box {
  overflow: hidden;
  background: #000;
}

.video-box video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.verify-body {
  background:
    radial-gradient(circle at 20% 0%, rgba(84, 213, 255, 0.32), transparent 32rem),
    linear-gradient(160deg, #0b2f77, #07183a 62%, #020918);
}

.verify-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.verify-panel {
  width: min(92vw, 520px);
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.verify-panel h1 {
  margin: 0 0 8px;
  font-size: 28px;
}

.verify-panel p {
  margin: 0 0 16px;
  color: rgba(255, 255, 255, 0.72);
}

#scannerVideo {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.34);
  object-fit: cover;
}

.verify-actions,
.manual-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.manual-box {
  grid-template-columns: 1fr auto;
}

.verify-panel button,
.manual-box input {
  min-height: 44px;
  border: 0;
  border-radius: 6px;
}

.verify-panel button {
  color: #073174;
  font-weight: 700;
  background: linear-gradient(180deg, #eaf7ff, #8dd7ff);
  cursor: pointer;
}

.manual-box input {
  width: 100%;
  padding: 0 12px;
  color: #072a5c;
}

.verify-result {
  min-height: 96px;
  margin-top: 16px;
  padding: 14px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  line-height: 1.7;
}

.verify-result.ok {
  background: rgba(23, 136, 82, 0.32);
}

.verify-result.fail {
  background: rgba(174, 42, 60, 0.34);
}
