/* JD2026 — illustrated A4 class poster (screen preview + print/PDF) */

.jd-poster-page {
  --jd-poster-navy: #0b1a33;
  --jd-poster-sky: #12284a;
  --jd-poster-cream: #fffdf8;
  --jd-poster-cream-soft: #fbf6ee;
  --jd-poster-gold: #e9a64d;
  --jd-poster-gold-dark: #b87a28;
  --jd-poster-ink: #0b1a33;
  --jd-poster-muted: #3d5278;
  background:
    radial-gradient(ellipse 90% 60% at 50% 0%, #1a3558 0%, #0b1a33 55%, #07101f 100%);
  min-height: 100vh;
  color: var(--jd-poster-ink);
}

.jd-poster-page .jd-print-toolbar {
  max-width: 210mm;
  color: #f7f1e6;
}

.jd-poster-page .jd-print-toolbar a {
  color: #f0d9a8;
}

.jd-poster-page .jd-print-toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.jd-poster-page .jd-print-toolbar button,
.jd-poster-page .jd-print-btn--pdf {
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, #d4a03a 0%, #c4892e 55%, #b87a28 100%);
  color: #1a1208 !important;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.jd-poster-page .jd-print-toolbar button {
  background: #12284a;
  color: #f7f1e6 !important;
  border: 1px solid rgba(233, 166, 77, 0.45);
}

/* —— A4 sheet —— */
.jd-poster-a4 {
  position: relative;
  width: min(100% - 24px, 210mm);
  margin: 0 auto 28px;
  aspect-ratio: 210 / 297;
  border-radius: 10px;
  overflow: hidden;
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(233, 166, 77, 0.25);
  background: var(--jd-poster-navy);
  isolation: isolate;
}

.jd-poster-a4__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.jd-poster-a4__bg picture,
.jd-poster-a4__bg img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.jd-poster-a4__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  padding: 3.4% 7% 20%;
  box-sizing: border-box;
  text-align: center;
  justify-content: flex-start;
}

.jd-poster-a4__top {
  width: 100%;
  max-width: 34ch;
  margin: 0 0 1.4%;
  color: #fffdf8;
  text-shadow: 0 2px 16px rgba(5, 12, 28, 0.65);
}

.jd-poster-a4__brand {
  margin: 0 0 0.25rem;
  font-size: clamp(0.72rem, 1.55vw, 0.85rem);
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--jd-poster-gold);
}

.jd-poster-a4__sparkle {
  margin: 0 0 0.5rem;
  font-size: 0.7rem;
  letter-spacing: 0.4em;
  color: #ffd678;
  line-height: 1;
}

.jd-poster-a4__title {
  margin: 0 0 0.3rem;
  font-size: clamp(1.28rem, 3.3vw, 1.9rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: #fffdf8;
}

.jd-poster-a4__title-lead,
.jd-poster-a4__title-focus {
  display: block;
}

.jd-poster-a4__title-focus {
  color: #ffe2a0;
}

.jd-poster-a4__tagline {
  margin: 0;
  font-size: clamp(0.95rem, 2.2vw, 1.18rem);
  font-style: italic;
  font-weight: 500;
  color: rgba(247, 241, 230, 0.96);
  line-height: 1.3;
}

.jd-poster-a4__identity,
.jd-poster-a4__story {
  width: 100%;
  max-width: 34ch;
  margin: 0 0 1.25%;
  padding: 0.55rem 0.95rem 0.6rem;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.97) 0%, rgba(251, 246, 238, 0.96) 100%);
  border: 1.5px solid rgba(233, 166, 77, 0.72);
  box-shadow: 0 10px 26px rgba(5, 12, 28, 0.24);
}

.jd-poster-a4__identity-label {
  margin: 0 0 0.15rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--jd-poster-gold-dark);
}

.jd-poster-a4__class {
  margin: 0 0 0.12rem;
  font-size: clamp(1.2rem, 3.1vw, 1.65rem);
  font-weight: 800;
  color: var(--jd-poster-navy);
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.jd-poster-a4__school {
  margin: 0;
  font-size: clamp(0.86rem, 2vw, 1.02rem);
  font-weight: 600;
  color: var(--jd-poster-muted);
  overflow-wrap: anywhere;
}

.jd-poster-a4__msg-lead {
  margin: 0 0 0.25rem;
  font-size: clamp(0.95rem, 2.1vw, 1.06rem);
  font-weight: 700;
  color: var(--jd-poster-navy);
  line-height: 1.35;
}

.jd-poster-a4__msg-sub {
  margin: 0 0 0.5rem;
  font-size: clamp(0.84rem, 1.9vw, 0.95rem);
  color: var(--jd-poster-muted);
  line-height: 1.4;
}

.jd-poster-a4__badges {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 0.45rem;
}

.jd-poster-a4__badges li {
  margin: 0;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: #fff3d9;
  border: 1px solid rgba(233, 166, 77, 0.85);
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--jd-poster-navy);
  line-height: 1.25;
}

.jd-poster-a4__qr {
  width: 100%;
  max-width: 17.5rem;
  margin: auto 0 0;
  padding: 0.65rem 0.8rem 0.6rem;
  border-radius: 16px;
  background: #ffffff;
  border: 2px solid #e9a64d;
  box-shadow:
    0 0 0 4px rgba(255, 253, 248, 0.55),
    0 12px 28px rgba(5, 12, 28, 0.28);
}

.jd-poster-a4__qr-cta {
  margin: 0 0 0.5rem;
  font-size: clamp(0.98rem, 2.2vw, 1.1rem);
  font-weight: 800;
  color: var(--jd-poster-navy);
}

.jd-poster-a4__qr-frame {
  display: inline-block;
  padding: 10px;
  border-radius: 10px;
  background: #fff;
  border: 2px solid var(--jd-poster-navy);
}

.jd-poster-a4__qr-frame img {
  display: block;
  width: 210px;
  height: 210px;
  max-width: 100%;
  background: #fff;
}

.jd-poster-a4__url {
  margin: 0.55rem 0 0.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  font-weight: 700;
  color: var(--jd-poster-navy);
  line-height: 1.25;
}

.jd-poster-a4__url-host {
  font-size: clamp(0.88rem, 2vw, 1rem);
  word-break: normal;
  overflow-wrap: normal;
}

.jd-poster-a4__url-path {
  font-size: clamp(0.82rem, 1.9vw, 0.95rem);
  font-weight: 700;
  word-break: break-all;
  overflow-wrap: anywhere;
  max-width: 100%;
}

.jd-poster-a4__qr-hint {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--jd-poster-muted);
}

@media (max-width: 520px) {
  .jd-poster-a4 {
    width: calc(100% - 16px);
    aspect-ratio: auto;
  }

  .jd-poster-a4__inner {
    padding: 1.1rem 1rem 6.5rem;
  }

  .jd-poster-a4__qr-frame img {
    width: 170px;
    height: 170px;
  }

  .jd-poster-a4__badges {
    flex-direction: column;
    align-items: center;
  }
}

@media print {
  .no-print {
    display: none !important;
  }

  .jd-poster-page,
  .jd-poster-pdf-render {
    background: #fff !important;
    min-height: 0;
  }

  .jd-poster-a4 {
    width: 210mm;
    height: 297mm;
    max-width: none;
    margin: 0;
    aspect-ratio: auto;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .jd-poster-a4__inner {
    padding: 9mm 13mm 46mm;
  }

  .jd-poster-a4__title {
    font-size: 21pt;
  }

  .jd-poster-a4__tagline {
    font-size: 12.5pt;
  }

  .jd-poster-a4__class {
    font-size: 17pt;
  }

  .jd-poster-a4__school {
    font-size: 10.5pt;
  }

  .jd-poster-a4__qr-frame img {
    width: 44mm;
    height: 44mm;
  }

  .jd-poster-a4__url-host {
    font-size: 10pt;
  }

  .jd-poster-a4__url-path {
    font-size: 9.5pt;
  }

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