/* Participation Record — premium post-screening ritual
   Sections: tokens, gate, steps, variants, form, preview, document layouts, print, responsive. */

:root {
  --pr-gold: #e7d3ae;
  --pr-gold-soft: rgba(231, 211, 174, 0.72);
  --pr-gold-line: rgba(231, 211, 174, 0.28);
  --pr-ivory: #f4ead7;
  --pr-muted: rgba(244, 234, 215, 0.72);
  --pr-dark: #070604;
  --pr-panel: rgba(12, 10, 8, 0.88);
  --pr-radius-xl: 30px;
  --pr-radius-md: 18px;
  --pr-shadow-deep: 0 32px 120px rgba(0, 0, 0, 0.48);
}

.pr-page .vh-hero-media {
  filter: saturate(0.9) contrast(1.08);
}

/* Gate */
.pr-gate,
.pr-generator {
  position: relative;
  border: 1px solid var(--pr-gold-line);
  background:
    radial-gradient(circle at 50% 0%, rgba(218, 190, 132, 0.12), transparent 42%),
    linear-gradient(135deg, rgba(18, 16, 13, 0.92), rgba(7, 6, 5, 0.96));
  box-shadow: var(--pr-shadow-deep);
  border-radius: var(--pr-radius-xl);
  padding: clamp(1.35rem, 3vw, 2.7rem);
  overflow: hidden;
}

.pr-gate::before,
.pr-generator::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(231, 211, 174, 0.09);
  border-radius: calc(var(--pr-radius-xl) - 8px);
  pointer-events: none;
}

.pr-gate[hidden],
.pr-generator[hidden] {
  display: none !important;
}

.pr-access-title {
  margin: 0 0 0.85rem;
  color: var(--pr-gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.9rem, 4vw, 3.25rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.pr-note {
  max-width: 820px;
  color: var(--pr-muted);
  font-size: 0.98rem;
  line-height: 1.75;
}

.pr-access-note {
  margin-top: 1rem;
  color: rgba(244, 234, 215, 0.6);
  font-size: 0.9rem;
  line-height: 1.55;
}

.pr-event-badge {
  display: inline-grid;
  gap: 0.18rem;
  margin: 1rem 0 0.25rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(231, 211, 174, 0.22);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--pr-ivory);
}

.pr-event-badge strong {
  color: var(--pr-gold);
  font-weight: 500;
}

.pr-event-badge span {
  color: rgba(244, 234, 215, 0.66);
  font-size: 0.9rem;
}

/* Steps */
.pr-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.pr-step {
  padding: 1rem;
  border: 1px solid rgba(218, 190, 132, 0.16);
  border-radius: var(--pr-radius-md);
  background: rgba(255, 255, 255, 0.035);
}

.pr-step span {
  display: block;
  color: #d9bd80;
  font-family: Georgia, serif;
  font-size: 1.7rem;
  margin-bottom: 0.35rem;
}

.pr-step p {
  margin: 0;
  color: rgba(245, 234, 210, 0.78);
  font-size: 0.92rem;
  line-height: 1.55;
}

/* Inputs */
.pr-code-row {
  display: flex;
  gap: 0.75rem;
  align-items: end;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}

.pr-code-row label {
  flex: 1 1 280px;
}

.pr-code-row input,
.pr-form input,
.pr-form select {
  width: 100%;
  padding: 0.92rem 1rem;
  border: 1px solid rgba(218, 190, 132, 0.28);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.28);
  color: var(--pr-ivory);
}

.pr-code-row input:focus,
.pr-form input:focus,
.pr-form select:focus {
  outline: 2px solid rgba(218, 190, 132, 0.36);
  outline-offset: 2px;
}

.pr-manual-button {
  font-size: 0.86rem;
  opacity: 0.78;
}

/* Mode and variant cards */
.pr-mode-grid,
.pr-variant-grid {
  display: grid;
  gap: 1rem;
}

.pr-mode-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1.25rem;
}

.pr-mode-card,
.pr-variant-card {
  border: 1px solid rgba(218, 190, 132, 0.18);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.035);
  padding: 1rem;
  position: relative;
  overflow: hidden;
}

.pr-mode-card.is-active,
.pr-variant-card.is-selected {
  border-color: rgba(232, 206, 150, 0.58);
  box-shadow: 0 0 0 1px rgba(232, 206, 150, 0.18), 0 18px 60px rgba(0, 0, 0, 0.25);
}

.pr-mode-card.is-disabled {
  opacity: 0.62;
}

.pr-mode-card h3,
.pr-variant-card h3 {
  margin: 0.25rem 0 0.35rem;
}

.pr-mode-card p,
.pr-variant-card p {
  color: rgba(245, 234, 210, 0.75);
  line-height: 1.6;
}

.pr-variant-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 1rem;
}

.pr-variant-card {
  cursor: pointer;
  text-align: left;
  transition: transform 260ms ease, border-color 260ms ease, box-shadow 260ms ease;
}

.pr-variant-card:hover {
  transform: translateY(-3px);
}

.pr-variant-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pr-variant-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  object-fit: cover;
  background: linear-gradient(135deg, #191716, #050505);
  border: 1px solid rgba(218, 190, 132, 0.18);
  margin-bottom: 0.9rem;
}

.pr-variant-card:focus-within {
  outline: 2px solid rgba(218, 190, 132, 0.5);
  outline-offset: 3px;
}

/* Form */
.pr-workspace {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(360px, 1.2fr);
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: start;
  margin-top: 1.5rem;
}

.pr-form {
  display: grid;
  gap: 1rem;
}

.pr-form label {
  display: grid;
  gap: 0.35rem;
  color: var(--pr-gold);
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}

.pr-form-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.pr-form-actions .vh-button:disabled {
  opacity: 0.62;
  cursor: wait;
}

.pr-status,
.pr-finale {
  min-height: 1.4rem;
  color: #d9bd80;
  line-height: 1.55;
}

.pr-finale[hidden] {
  display: none !important;
}

.pr-privacy,
.pr-print-recommendation {
  border-top: 1px solid rgba(218, 190, 132, 0.16);
  padding-top: 1rem;
  margin-top: 0.25rem;
  color: rgba(245, 234, 210, 0.64);
  font-size: 0.9rem;
  line-height: 1.55;
}

.pr-print-recommendation {
  color: rgba(231, 211, 174, 0.75);
}

/* Preflight */
.pr-preflight {
  border: 1px solid rgba(231, 211, 174, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.95rem 1rem;
  color: rgba(244, 234, 215, 0.72);
  font-size: 0.88rem;
  line-height: 1.5;
}

.pr-preflight strong {
  display: block;
  margin-bottom: 0.55rem;
  color: rgba(231, 211, 174, 0.86);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pr-preflight ul {
  display: grid;
  gap: 0.42rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.pr-preflight li {
  display: flex;
  gap: 0.52rem;
  align-items: flex-start;
}

.pr-preflight li span {
  width: 0.52rem;
  height: 0.52rem;
  border-radius: 99px;
  margin-top: 0.45rem;
  flex: 0 0 auto;
  background: rgba(231, 211, 174, 0.42);
  box-shadow: 0 0 18px rgba(231, 211, 174, 0.12);
}

.pr-preflight li.ok span {
  background: #d9bd80;
}

.pr-preflight li.warn span {
  background: #b88c48;
}

.pr-preflight li.warn {
  color: rgba(244, 234, 215, 0.78);
}

/* Preview as physical object */
.pr-preview-wrap {
  position: sticky;
  top: 110px;
}

.pr-preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
  color: rgba(245, 234, 210, 0.72);
}

.pr-document-surface {
  padding: clamp(1rem, 2.5vw, 2rem);
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 16%, rgba(236, 209, 154, 0.12), transparent 44%),
    linear-gradient(135deg, rgba(5, 4, 3, 0.95), rgba(14, 12, 10, 0.98));
  box-shadow: inset 0 0 0 1px rgba(231, 211, 174, 0.09), 0 40px 130px rgba(0, 0, 0, 0.5);
}

.pr-document {
  position: relative;
  aspect-ratio: 3508 / 2480;
  width: 100%;
  max-width: 860px;
  margin: auto;
  border-radius: 18px;
  overflow: hidden;
  background: #080807;
  box-shadow:
    0 40px 130px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(218, 190, 132, 0.28),
    0 0 42px rgba(218, 190, 132, 0.08);
  transition: opacity 220ms ease, transform 260ms ease;
}

.pr-document.is-switching {
  opacity: 0.58;
  transform: scale(0.992);
}

.pr-document-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.pr-document::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 34%, rgba(255, 240, 200, 0.06), transparent 44%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.22));
  pointer-events: none;
}

/* Document layout */
.pr-document-content {
  position: absolute;
  inset: 8.5% 11%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: #ead8b4;
  font-family: Georgia, "Times New Roman", serif;
}

.pr-project {
  font-size: clamp(0.58rem, 1.1vw, 0.95rem);
  letter-spacing: 0.42em;
  text-transform: uppercase;
  opacity: 0.86;
  margin: 0 0 3.2%;
}

.pr-title {
  font-size: clamp(1.35rem, 3.4vw, 3.2rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin: 0 0 3%;
  font-weight: 500;
  color: #ead39e;
  text-shadow: 0 1px 0 rgba(255,255,255,.16), 0 4px 18px rgba(0,0,0,.38), 0 0 28px rgba(231,211,174,.08);
}

.pr-body {
  max-width: 78%;
  font-size: clamp(0.66rem, 1.16vw, 1.08rem);
  line-height: 1.55;
  color: rgba(244, 232, 205, 0.88);
  margin: 0 auto 2.4%;
}

.pr-for {
  font-size: clamp(0.64rem, 1.1vw, 1rem);
  letter-spacing: 0.1em;
  margin: 1% 0 2%;
  color: #f3dfb7;
}

.pr-fields {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
  width: 82%;
  margin: 2.5% auto;
}

.pr-field {
  border-top: 1px solid rgba(232, 206, 150, 0.38);
  padding-top: 0.5rem;
  min-width: 0;
}

.pr-field span {
  display: block;
  font-family: Arial, sans-serif;
  font-size: clamp(0.42rem, 0.75vw, 0.68rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(232, 206, 150, 0.58);
  margin-bottom: 0.3rem;
}

.pr-field strong {
  font-size: clamp(0.54rem, 1vw, 0.9rem);
  font-weight: 400;
  color: #f2e4c7;
  overflow-wrap: anywhere;
}

.pr-closing {
  margin-top: auto;
  max-width: 76%;
  font-size: clamp(0.55rem, 1vw, 0.93rem);
  line-height: 1.5;
  color: rgba(244, 232, 205, 0.82);
}

.pr-author {
  margin-top: 1.5%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}

.pr-author img {
  width: min(27vw, 260px);
  height: auto;
  max-height: 72px;
  object-fit: contain;
}

.pr-author strong {
  display: none;
}

.pr-author span {
  font-family: Arial, sans-serif;
  font-size: clamp(0.43rem, 0.75vw, 0.68rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(232, 206, 150, 0.62);
}

/* Layout presets */
.pr-document.layout-cinema .pr-document-content { inset: 9.5% 11% 7.2%; }
.pr-document.layout-cinema .pr-title { margin-top: 1.6%; }
.pr-document.layout-cinema .pr-author { margin-top: 2.3%; }
.pr-document.layout-cinema .pr-field:nth-child(3) { opacity: 0.82; }

.pr-document.layout-museum .pr-document-content { inset: 8% 10.5%; }
.pr-document.layout-museum .pr-title { letter-spacing: 0.25em; }
.pr-document.layout-museum .pr-fields { width: 86%; margin-top: 3.2%; }
.pr-document.layout-museum .pr-body { max-width: 74%; }

.pr-document.layout-ceremonial .pr-document-content { inset: 10% 12.5% 8%; }
.pr-document.layout-ceremonial .pr-title { font-size: clamp(1.55rem, 3.75vw, 3.55rem); margin-bottom: 3.6%; }
.pr-document.layout-ceremonial .pr-body { max-width: 72%; }
.pr-document.layout-ceremonial .pr-fields { width: 78%; }
.pr-document.layout-ceremonial .pr-closing { max-width: 68%; }

/* Event-specific premium Participation Record */
.pr-event-specific .pr-generator .vh-section-head .vh-section-title::after {
  content: " · edycja wydarzenia";
  color: rgba(231, 211, 174, 0.58);
  font-size: 0.42em;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.pr-event-specific .pr-step:first-child p {
  font-size: 0;
}

.pr-event-specific .pr-step:first-child p::after {
  content: "Wersja wydarzenia jest ustawiona z linku QR.";
  font-size: 0.92rem;
  line-height: 1.55;
}

.pr-premium-seal {
  width: min(8vw, 72px);
  height: min(8vw, 72px);
  min-width: 38px;
  min-height: 38px;
  object-fit: contain;
  margin: 0 auto 1.5%;
  opacity: 0.95;
  filter: drop-shadow(0 8px 22px rgba(0,0,0,.42));
}

.pr-premium-title-plate {
  display: block;
  width: min(62%, 520px);
  max-height: 92px;
  object-fit: contain;
  margin: 0 auto 2%;
  filter: drop-shadow(0 7px 20px rgba(0,0,0,.36));
}

.pr-premium-title-plate:not([hidden]) + .pr-title {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pr-premium-accent {
  width: min(12vw, 92px);
  max-height: 52px;
  object-fit: contain;
  margin: auto auto 1%;
  opacity: 0.78;
  filter: drop-shadow(0 6px 18px rgba(0,0,0,.32));
}

.pr-premium-microprint {
  max-width: 86%;
  margin: 1.2% auto 0;
  font-family: Arial, sans-serif;
  font-size: clamp(0.36rem, 0.62vw, 0.56rem);
  line-height: 1.45;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(232, 206, 150, 0.42);
}

.pr-event-specific .pr-document.layout-ceremonial .pr-document-content {
  inset: 7.2% 11.8% 6.8%;
}

.pr-event-specific .pr-document.layout-ceremonial .pr-project {
  margin-bottom: 2%;
}

.pr-event-specific .pr-document.layout-ceremonial .pr-body {
  max-width: 76%;
  font-size: clamp(0.58rem, 1.02vw, 0.96rem);
  line-height: 1.44;
}

.pr-event-specific .pr-document.layout-ceremonial .pr-fields {
  margin: 2% auto;
  width: 84%;
}

.pr-event-specific .pr-document.layout-ceremonial .pr-closing {
  max-width: 76%;
  font-size: clamp(0.5rem, 0.9vw, 0.82rem);
}

.pr-event-specific .pr-document.layout-ceremonial .pr-author {
  margin-top: 1%;
}

.pr-event-specific .pr-document.layout-ceremonial .pr-author img {
  width: min(22vw, 220px);
}

/* Print */
.pr-print-stage {
  display: none;
}

.pr-print-page {
  width: 297mm;
  height: 210mm;
  position: relative;
  overflow: hidden;
  background: #080807;
  color: #ead8b4;
}

.pr-print-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pr-print-content {
  position: absolute;
  inset: 24mm 32mm;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  font-family: Georgia, "Times New Roman", serif;
}

.pr-print-content .pr-project { font-size: 12px; }
.pr-print-content .pr-title { font-size: 42px; }
.pr-print-content .pr-body { font-size: 17px; max-width: 205mm; }
.pr-print-content .pr-for { font-size: 15px; }
.pr-print-content .pr-fields { width: 215mm; }
.pr-print-content .pr-field span { font-size: 10px; }
.pr-print-content .pr-field strong { font-size: 14px; }
.pr-print-content .pr-closing { font-size: 14px; max-width: 205mm; }
.pr-print-content .pr-author img { width: 66mm; max-height: 19mm; }
.pr-print-content .pr-author span { font-size: 10px; }
.pr-print-content.layout-cinema { inset: 26mm 32mm 20mm; }
.pr-print-content.layout-museum { inset: 23mm 31mm; }
.pr-print-content.layout-ceremonial { inset: 27mm 36mm 22mm; }
.pr-print-content.layout-ceremonial .pr-title { font-size: 46px; }
.pr-print-content.layout-ceremonial .pr-body { max-width: 190mm; }
.pr-print-content .pr-premium-seal { width: 25mm; height: 25mm; min-width: 0; min-height: 0; margin-bottom: 3mm; }
.pr-print-content .pr-premium-title-plate { width: 152mm; max-height: 25mm; margin-bottom: 5mm; }
.pr-print-content .pr-premium-accent { width: 22mm; max-height: 13mm; margin: auto auto 2mm; }
.pr-print-content .pr-premium-microprint { font-size: 7.6px; max-width: 220mm; margin-top: 2mm; }

@media print {
  body > *:not(.pr-print-stage) { display: none !important; }
  .pr-print-stage { display: block !important; }
  @page { size: A4 landscape; margin: 0; }
  .pr-print-page { page-break-after: avoid; }
}

/* Responsive */
@media (max-width: 900px) {
  .pr-steps,
  .pr-variant-grid,
  .pr-mode-grid {
    grid-template-columns: 1fr;
  }
  .pr-workspace {
    grid-template-columns: 1fr;
  }
  .pr-preview-wrap {
    position: static;
  }
  .pr-fields {
    gap: 0.5rem;
  }
  .pr-document-content {
    inset: 7% 8%;
  }
  .pr-body {
    max-width: 86%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pr-variant-card,
  .pr-document {
    transition: none !important;
  }
  .pr-variant-card:hover {
    transform: none;
  }
}
