* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

.poster-body {
  background:
    radial-gradient(circle at 50% 0%, rgba(38, 215, 255, 0.18), transparent 34%),
    #061631;
  color: #ffffff;
  font-family: Arial, Helvetica, sans-serif;
}

.poster-toolbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  gap: 10px;
  justify-content: center;
  padding: 12px;
  background: rgba(2, 8, 20, 0.88);
  backdrop-filter: blur(10px);
}

.poster-button {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: #ffdd3d;
  color: #061631;
  cursor: pointer;
  min-height: 40px;
  padding: 0 18px;
  font-weight: 900;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.poster-button.ghost {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.poster-button:disabled {
  cursor: wait;
  opacity: 0.54;
  filter: grayscale(1);
}

.poster-page {
  position: relative;
  width: 210mm;
  height: 297mm;
  margin: 18px auto;
  overflow: hidden;
  padding: 13mm 14mm 16mm;
  background:
    linear-gradient(180deg, rgba(7, 27, 61, 0.96), rgba(2, 8, 20, 0.98)),
    #061631;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.poster-page::before {
  content: "";
  position: absolute;
  inset: auto -40mm 20mm -40mm;
  height: 130mm;
  background:
    radial-gradient(circle at 50% 50%, rgba(38, 215, 255, 0.16), transparent 56%),
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.07), transparent);
  transform: rotate(-8deg);
  pointer-events: none;
}

.poster-banner {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 38mm;
  object-fit: contain;
  object-position: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
}

.poster-main {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  margin-top: 18mm;
  text-align: center;
}

.poster-kicker {
  margin: 0 0 5mm;
  color: #26d7ff;
  font-size: 11pt;
  font-weight: 900;
  letter-spacing: 0;
}

.poster-main h1 {
  margin: 0;
  color: #ffffff;
  font-size: 42pt;
  line-height: 0.95;
  letter-spacing: 0;
  text-transform: uppercase;
}

.poster-client {
  min-height: 10mm;
  margin: 6mm 0 8mm;
  color: rgba(255, 255, 255, 0.72);
  font-size: 15pt;
  font-weight: 900;
  text-transform: uppercase;
}

.poster-qr-wrap {
  position: relative;
  width: 104mm;
  height: 104mm;
  display: grid;
  place-items: center;
  border: 3mm solid #ffffff;
  border-radius: 9mm;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.38);
}

.poster-qr {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.poster-shield {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 23mm;
  height: 23mm;
  border: 1.8mm solid #ffffff;
  border-radius: 50%;
  background: #ffffff;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 0.7mm rgba(6, 22, 49, 0.14);
}

.poster-shield img {
  width: 78%;
  height: 78%;
  object-fit: contain;
}

.poster-url {
  max-width: 150mm;
  margin: 8mm 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 10pt;
  overflow-wrap: anywhere;
}

.poster-footer {
  position: absolute;
  left: 14mm;
  right: 14mm;
  bottom: 13mm;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 3mm;
}

.poster-footer p {
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 10pt;
  font-weight: 900;
  text-transform: uppercase;
}

.poster-footer img {
  width: 86mm;
  max-height: 24mm;
  object-fit: contain;
}

.poster-error {
  width: min(680px, calc(100vw - 28px));
  margin: 18px auto;
  border: 1px solid rgba(255, 67, 101, 0.42);
  border-radius: 8px;
  background: rgba(255, 67, 101, 0.16);
  color: #ffffff;
  padding: 16px;
  font-weight: 800;
  text-align: center;
}

@media screen and (max-width: 900px) {
  .poster-page {
    width: min(210mm, calc(100vw - 24px));
    height: auto;
    aspect-ratio: 210 / 297;
  }
}

@media print {
  @page {
    size: A4 portrait;
    margin: 0;
  }

  html,
  body {
    width: 210mm;
    height: 297mm;
    background: #061631;
  }

  .poster-toolbar,
  .poster-error {
    display: none !important;
  }

  .poster-page {
    width: 210mm;
    height: 297mm;
    margin: 0;
    box-shadow: none;
  }
}
