:root {
  color-scheme: light;
  --canvas: #fff;
  --surface: hsl(240 10% 95%);
  --surface-elevated: rgba(255, 255, 255, 0.9);
  --frosted: hsl(240 5% 70% / 0.148);
  --frosted-soft: hsl(234 9.8% 60% / 0.06);
  --primary: hsl(225 66.7% 1.2%);
  --contrast-high: hsl(240 7.1% 11% / 0.7);
  --contrast-medium: hsl(240 6.1% 7% / 0.6);
  --border: hsl(234 6% 32.9% / 0.18);
  --border-strong: hsl(240 5.3% 14.9% / 0.34);
  --error: hsl(357 78% 41%);
  --error-low: hsl(357 78% 41% / 0.18);
  --success: hsl(115 77.5% 27.8%);
  --success-low: hsl(115 77.5% 27.8% / 0.18);
  --focus: #1a44ea;
  --shadow: 0 24px 80px rgba(1, 2, 5, 0.14);
  --shadow-soft: 0 14px 38px rgba(1, 2, 5, 0.08);
  font-family:
    "Porsche Next", Arial, "Helvetica Neue", Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  overflow-x: hidden;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--primary);
  background:
    radial-gradient(circle at 16% 18%, hsl(240 5% 70% / 0.22), transparent 34%),
    radial-gradient(circle at 86% 20%, hsl(357 78% 41% / 0.08), transparent 24%),
    linear-gradient(135deg, var(--canvas) 0%, var(--surface) 100%);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  width: 100%;
  min-height: 72px;
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto minmax(120px, 1fr);
  align-items: center;
  gap: 18px;
  padding: 0 clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px);
}

.brand-title {
  grid-column: 2;
  justify-self: center;
  color: var(--primary);
  font-size: clamp(1rem, 2vw, 1.18rem);
  font-weight: 760;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
}

.live-clock {
  grid-column: 3;
  justify-self: end;
  color: var(--contrast-medium);
  font-size: 0.88rem;
  font-weight: 650;
  white-space: nowrap;
}

.site-frame {
  width: min(100%, 1180px);
  min-height: calc(100vh - 72px);
  margin: 0 auto;
  padding: 0 28px 36px;
}

.pickup-layout {
  min-width: 0;
  min-height: calc(100vh - 108px);
  display: grid;
  grid-template-columns: minmax(0, 0.84fr) minmax(380px, 1.16fr);
  gap: clamp(30px, 5vw, 68px);
  align-items: center;
  padding: 38px 0 20px;
}

.pickup-layout.is-handover {
  grid-template-columns: minmax(0, 880px);
  justify-content: center;
  align-items: start;
  padding-top: clamp(30px, 5vw, 58px);
}

.pickup-layout.is-handover .handover {
  width: 100%;
}

.intro {
  min-width: 0;
  display: grid;
  gap: 18px;
  align-content: center;
}

.intro > * {
  min-width: 0;
}

.crest {
  width: 54px;
  height: auto;
  margin-bottom: 4px;
}

.eyebrow,
.section-kicker {
  margin: 0;
  color: var(--contrast-high);
  font-size: 0.75rem;
  font-weight: 760;
  letter-spacing: 0;
  text-transform: uppercase;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.eyebrow span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--error);
  box-shadow: 0 0 0 7px var(--error-low);
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  max-width: 12.5ch;
  font-size: clamp(2.5rem, 4.8vw, 5.05rem);
  line-height: 0.98;
  font-weight: 760;
  hyphens: auto;
  overflow-wrap: break-word;
}

h2 {
  font-size: clamp(1.35rem, 2.1vw, 1.95rem);
  line-height: 1.12;
  overflow-wrap: break-word;
}

.lead {
  min-width: 0;
  max-width: 39rem;
  margin: 0;
  color: var(--contrast-medium);
  font-size: clamp(1rem, 1.8vw, 1.16rem);
  line-height: 1.58;
  overflow-wrap: break-word;
}

.process-strip {
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.process-strip span {
  min-width: 0;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--contrast-high);
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
  font-size: 0.86rem;
  font-weight: 720;
  overflow-wrap: break-word;
}

.contact-strip {
  width: min(100%, 560px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 12px 0 0;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--border);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.contact-strip div {
  min-height: 104px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(12px);
}

.contact-strip dt {
  margin: 0 0 8px;
  color: var(--contrast-medium);
  font-size: 0.78rem;
  font-weight: 740;
  text-transform: uppercase;
}

.contact-strip dd {
  margin: 0;
  line-height: 1.42;
}

.access-panel,
.handover {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--surface-elevated);
  box-shadow: var(--shadow);
  overflow: hidden;
  backdrop-filter: blur(18px);
}

.access-panel {
  display: grid;
  gap: 18px;
  padding: 28px;
}

.access-header {
  display: grid;
  gap: 8px;
}

.access-footer {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  color: var(--contrast-medium);
  font-size: 0.86rem;
  line-height: 1.4;
}

.access-footer span {
  width: 8px;
  height: 8px;
  margin-top: 5px;
  border-radius: 999px;
  background: var(--error);
}

.access-footer p {
  margin: 0;
}

.handover-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 16px;
  align-items: flex-start;
  padding: 24px 24px 20px;
  border-bottom: 1px solid var(--border);
  background:
    linear-gradient(135deg, var(--frosted), transparent 52%),
    rgba(255, 255, 255, 0.88);
}

.handover-title {
  min-width: 0;
}

.handover-crest {
  width: 34px;
  height: auto;
  align-self: center;
  justify-self: center;
}

.status {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid hsl(240 5% 14.9% / 0.14);
  border-radius: 999px;
  color: hsl(240 5% 12%);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(246, 246, 247, 0.66)),
    rgba(255, 255, 255, 0.72);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.86) inset,
    0 10px 24px rgba(1, 2, 5, 0.055);
  font-size: 0.74rem;
  font-weight: 760;
  letter-spacing: 0;
  white-space: nowrap;
  backdrop-filter: blur(14px);
}

.status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.72;
}

.status-stack {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.status[data-kind="error"] {
  color: var(--error);
  border-color: hsl(357 78% 41% / 0.18);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(253, 247, 247, 0.72)),
    rgba(255, 255, 255, 0.78);
}

.status[data-kind="ready"] {
  color: hsl(115 47% 22%);
  border-color: hsl(115 47% 22% / 0.16);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(247, 250, 247, 0.72)),
    rgba(255, 255, 255, 0.78);
}

.validity {
  --progress: 1;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding-left: 9px;
  border-left: 1px solid currentColor;
  color: inherit;
  font-size: 0.72rem;
  font-weight: 760;
  white-space: nowrap;
  opacity: 0.82;
}

.validity-ring {
  width: 17px;
  height: 17px;
  border-radius: 999px;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.96) 0 49%, transparent 52%),
    conic-gradient(currentColor calc(var(--progress) * 1turn), hsl(240 4% 70% / 0.52) 0);
  box-shadow:
    0 0 0 1px hsl(240 5% 40% / 0.08) inset,
    0 2px 5px rgba(1, 2, 5, 0.07);
}

.validity[data-kind="error"] {
  color: var(--error);
}

.validity[data-kind="ready"] {
  color: inherit;
}

.handover-body {
  min-width: 0;
  display: grid;
  gap: 16px;
  padding: 24px;
}

.notice {
  min-width: 0;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: 14px;
  color: var(--primary);
  background: rgba(255, 255, 255, 0.58);
  line-height: 1.45;
  overflow-wrap: break-word;
}

.notice.neutral {
  border-left-color: var(--error);
  color: var(--contrast-high);
  background: var(--frosted-soft);
}

.notice.preview-notice {
  border-color: hsl(42 72% 62% / 0.55);
  border-left-color: hsl(38 92% 48%);
  color: hsl(32 72% 24%);
  background: hsl(46 94% 88% / 0.74);
}

.preview-guide,
.preview-callout {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid hsl(42 72% 62% / 0.55);
  border-left: 3px solid hsl(38 92% 48%);
  border-radius: 14px;
  color: hsl(32 72% 24%);
  background: hsl(46 94% 88% / 0.74);
  line-height: 1.42;
}

.preview-guide strong,
.preview-callout strong {
  color: hsl(32 84% 20%);
  font-size: 0.82rem;
  font-weight: 760;
}

.preview-guide span,
.preview-callout span {
  font-size: 0.9rem;
}

.preview-highlight {
  position: relative;
  border-color: hsl(225 66.7% 1.2% / 0.32);
  box-shadow:
    0 0 0 3px hsl(225 66.7% 1.2% / 0.05),
    0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.field-group.preview-highlight {
  padding: 14px;
  border: 1px solid hsl(225 66.7% 1.2% / 0.22);
  border-radius: 16px;
}

.summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--border);
  overflow: hidden;
}

.summary div {
  min-height: 82px;
  display: grid;
  gap: 6px;
  align-content: center;
  padding: 16px;
  background: rgba(255, 255, 255, 0.72);
}

.label {
  color: var(--contrast-medium);
  font-size: 0.78rem;
  font-weight: 740;
  text-transform: uppercase;
}

.summary strong {
  min-width: 0;
  font-size: 1rem;
  line-height: 1.28;
  overflow-wrap: anywhere;
}

.field-group {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 2px 0 4px;
  border: 0;
}

.panel {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.64);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.field-group legend {
  margin: 0 0 8px;
  padding: 0;
  font-weight: 760;
}

.check-row,
.confirmation {
  min-width: 0;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  color: var(--primary);
  line-height: 1.42;
}

.confirmation {
  padding: 14px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.receipt-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.58);
}

.receipt-controls {
  display: grid;
  gap: 12px;
}

.check-row input,
.confirmation input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--success);
}

.field {
  display: grid;
  gap: 8px;
  padding: 0;
}

.access-field {
  padding: 0;
}

input[type="text"],
select,
textarea {
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 12px;
  color: var(--primary);
  background: rgba(255, 255, 255, 0.86);
}

input[type="text"] {
  min-height: 48px;
}

select {
  min-height: 48px;
  font-family: inherit;
  font-weight: 520;
}

.code-form input[type="text"] {
  text-transform: uppercase;
}

textarea {
  min-height: 88px;
  resize: vertical;
}

.signer-input {
  min-height: 48px;
  line-height: 1.35;
  resize: none;
  overflow: hidden;
}

input[type="text"]:focus,
textarea:focus,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

textarea:disabled,
input:disabled,
select:disabled {
  color: var(--contrast-medium);
  cursor: not-allowed;
}

.field-group:disabled .check-row {
  color: var(--primary);
  cursor: default;
}

.field-group:disabled input {
  cursor: default;
}

.signature-box {
  min-height: 210px;
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px dashed var(--border-strong);
  border-radius: 18px;
  color: var(--contrast-medium);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(240, 240, 242, 0.7)),
    var(--surface);
}

.signature-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.signature-heading span {
  color: var(--primary);
  font-weight: 760;
}

.signature-heading strong {
  font-size: 0.9rem;
  font-weight: 520;
  text-align: right;
  overflow-wrap: break-word;
}

.signature-canvas {
  width: 100%;
  height: 132px;
  display: block;
  border: 1px solid var(--border);
  border-radius: 14px;
  background:
    linear-gradient(to bottom, transparent calc(100% - 30px), hsl(240 6% 30% / 0.22) calc(100% - 29px), transparent calc(100% - 28px)),
    rgba(255, 255, 255, 0.84);
  cursor: not-allowed;
  touch-action: none;
}

.signature-canvas[data-enabled="true"] {
  cursor: crosshair;
}

.signature-actions {
  display: flex;
  justify-content: flex-end;
}

.actions,
.code-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.code-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.button {
  min-height: 46px;
  padding: 0 18px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), hsl(240 7.1% 11% / 0.88));
  font-weight: 720;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(1, 2, 5, 0.16);
}

.button.secondary {
  color: var(--primary);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--border);
  box-shadow: none;
}

.button:not(:disabled):hover {
  background: #313639;
}

.button.secondary:not(:disabled):hover {
  background: #fff;
}

.button.tertiary {
  min-height: 36px;
  padding: 0 12px;
  color: var(--primary);
  background: transparent;
  border: 1px solid var(--border);
  box-shadow: none;
  font-size: 0.86rem;
}

.button.tertiary:not(:disabled):hover {
  background: rgba(255, 255, 255, 0.72);
}

.button:disabled {
  color: #8e9295;
  background: #e5e5e5;
  cursor: not-allowed;
  box-shadow: none;
}

.privacy-note {
  margin: -4px 0 0;
  color: var(--contrast-medium);
  font-size: 0.82rem;
  line-height: 1.4;
}

.completion-panel {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: clamp(46px, 9vw, 76px) 24px;
  text-align: center;
}

.completion-panel h2 {
  max-width: 16ch;
}

.completion-panel p:last-child {
  max-width: 34rem;
  margin: 0;
  color: var(--contrast-medium);
  line-height: 1.55;
}

.tablet-stage {
  width: min(100%, 1180px);
  min-height: calc(100vh - 72px);
  display: grid;
  align-items: center;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 56px);
}

.tablet-stage-idle {
  align-items: stretch;
}

.tablet-idle-panel,
.tablet-card {
  min-width: 0;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.tablet-idle-panel {
  min-height: calc(100vh - 184px);
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 20px;
  padding: clamp(34px, 7vw, 86px);
  border-radius: 28px;
}

.tablet-idle-panel h1 {
  max-width: 11ch;
  font-size: clamp(3rem, 7vw, 7rem);
}

.tablet-idle-copy {
  max-width: 38rem;
  margin: 0;
  color: var(--contrast-medium);
  font-size: clamp(1.05rem, 2.2vw, 1.45rem);
  line-height: 1.48;
}

.tablet-status-line {
  min-width: min(100%, 520px);
  min-height: 58px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding: 0 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--contrast-high);
}

.tablet-status-line span {
  font-weight: 760;
}

.tablet-status-line strong {
  color: var(--success);
}

.tablet-card {
  width: min(100%, 940px);
  display: grid;
  gap: 22px;
  justify-self: center;
  padding: clamp(24px, 4vw, 42px);
  border-radius: 28px;
}

.tablet-card h1 {
  max-width: 13ch;
  font-size: clamp(2.25rem, 5vw, 4.9rem);
}

.tablet-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.tablet-card-crest,
.tablet-crest {
  width: 58px;
  height: auto;
}

.tablet-crest.idle {
  width: clamp(60px, 7vw, 86px);
}

.tablet-secret-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.tablet-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.tablet-choice {
  min-height: 190px;
  display: grid;
  align-content: space-between;
  justify-items: start;
  gap: 18px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--primary);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  text-align: left;
}

.tablet-choice span {
  color: var(--contrast-medium);
  font-size: 0.84rem;
  font-weight: 760;
  text-transform: uppercase;
}

.tablet-choice strong {
  max-width: 13ch;
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  line-height: 1.06;
}

.tablet-choice.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), hsl(240 7.1% 11% / 0.88));
}

.tablet-choice.primary span {
  color: rgba(255, 255, 255, 0.68);
}

.tablet-choice:not(:disabled):hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.tablet-session-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--border);
  overflow: hidden;
}

.tablet-session-summary div {
  min-width: 0;
  min-height: 82px;
  display: grid;
  gap: 6px;
  align-content: center;
  padding: 16px;
  background: rgba(255, 255, 255, 0.74);
}

.tablet-session-summary dt {
  color: var(--contrast-medium);
  font-size: 0.78rem;
  font-weight: 740;
  text-transform: uppercase;
}

.tablet-session-summary dd {
  min-width: 0;
  margin: 0;
  font-weight: 760;
  overflow-wrap: anywhere;
}

.tablet-qr-view {
  justify-items: center;
  text-align: center;
}

.tablet-qr-view .tablet-card-header,
.tablet-qr-view .tablet-session-summary {
  width: 100%;
  text-align: left;
}

.tablet-qr-shell {
  width: min(62vw, 430px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.tablet-qr-canvas {
  width: 100% !important;
  height: 100% !important;
  image-rendering: pixelated;
}

.tablet-muted {
  max-width: 36rem;
  margin: 0;
  color: var(--contrast-medium);
  line-height: 1.5;
}

.tablet-handover-frame {
  padding-top: 24px;
}

.tablet-completed {
  justify-items: center;
  text-align: center;
}

body[data-pdf-render="true"] {
  min-width: 0;
  min-height: auto;
  background: #f7f7f8;
}

body[data-pdf-render="true"] .app-shell,
body[data-pdf-render="true"] .site-frame,
body[data-pdf-render="true"] .pickup-layout {
  min-height: auto;
}

body[data-pdf-render="true"] .topbar {
  display: none;
}

body[data-pdf-render="true"] .site-frame {
  width: 794px;
  margin: 0 auto;
  padding: 22px 0;
}

body[data-pdf-render="true"] .pickup-layout {
  display: block;
  padding: 0;
}

body[data-pdf-render="true"] .handover {
  width: 100%;
  border-radius: 18px;
  box-shadow: none;
  backdrop-filter: none;
}

body[data-pdf-render="true"] .handover-header {
  padding: 20px 24px 18px;
  background: rgba(255, 255, 255, 0.92);
}

body[data-pdf-render="true"] .handover-body {
  gap: 14px;
  padding: 22px 24px;
}

body[data-pdf-render="true"] .summary div {
  min-height: 76px;
}

body[data-pdf-render="true"] .field-group,
body[data-pdf-render="true"] .receipt-panel,
body[data-pdf-render="true"] .signature-box {
  page-break-inside: avoid;
}

body[data-pdf-render="true"] textarea,
body[data-pdf-render="true"] input,
body[data-pdf-render="true"] select {
  opacity: 1;
  -webkit-text-fill-color: currentColor;
}

body[data-pdf-render="true"] textarea {
  resize: none;
}

body[data-pdf-render="true"] .signer-input {
  min-height: 48px;
}

body[data-pdf-render="true"] .signature-rendered-image {
  object-fit: contain;
  padding: 12px 18px;
}

body[data-pdf-render="true"] div.signature-rendered-image {
  display: grid;
  place-items: center;
  color: var(--contrast-medium);
  font-weight: 620;
}

body[data-pdf-render="true"] .actions,
body[data-pdf-render="true"] .signature-actions,
body[data-pdf-render="true"] .completion-panel,
body[data-pdf-render="true"] .preview-guide,
body[data-pdf-render="true"] .preview-callout {
  display: none !important;
}

@media (max-width: 900px) {
  .topbar {
    grid-template-columns: minmax(80px, 1fr) auto minmax(80px, 1fr);
    padding: 0 20px;
  }

  .site-frame {
    width: auto;
    min-height: auto;
    margin: 0 20px;
    padding: 0 0 28px;
  }

  .pickup-layout {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 32px;
    padding-top: 28px;
  }

  h1 {
    max-width: 14ch;
  }

  .tablet-session-summary,
  .tablet-choice-grid,
  .tablet-secret-form {
    grid-template-columns: 1fr;
  }

  .tablet-idle-panel {
    min-height: auto;
  }
}

@media (max-width: 560px) {
  .topbar {
    position: static;
    min-height: 92px;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 14px 16px;
  }

  .brand-title,
  .live-clock {
    grid-column: 1;
    justify-self: center;
  }

  .live-clock {
    font-size: 0.82rem;
  }

  .site-frame {
    width: auto;
    margin: 0 24px;
    padding: 0 0 24px;
  }

  h1 {
    max-width: 100%;
    font-size: 1.9rem;
    line-height: 1.08;
  }

  h2 {
    font-size: 1.55rem;
  }

  .lead,
  .notice {
    font-size: 0.95rem;
  }

  .process-strip {
    display: grid;
    grid-template-columns: 1fr;
  }

  .contact-strip,
  .summary,
  .code-form {
    grid-template-columns: 1fr;
  }

  .access-panel {
    padding: 20px;
  }

  .handover-header,
  .handover-body {
    padding: 18px;
  }

  .handover-header {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .handover-crest {
    justify-self: start;
    width: 30px;
  }

  .status {
    width: fit-content;
  }

  .status-stack {
    justify-items: start;
  }

  .actions {
    display: grid;
  }

  .signature-heading {
    display: grid;
  }

  .signature-heading strong {
    text-align: left;
  }

  .tablet-stage {
    min-height: auto;
    padding: 24px;
  }

  .tablet-card,
  .tablet-idle-panel {
    border-radius: 20px;
    padding: 22px;
  }

  .tablet-card-header {
    display: grid;
  }

  .tablet-card h1,
  .tablet-idle-panel h1 {
    max-width: 100%;
    font-size: 2rem;
  }

  .tablet-choice {
    min-height: 140px;
  }

  .tablet-qr-shell {
    width: min(100%, 360px);
  }
}

.confetti-stage {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  overflow: hidden;
}

.confetti-stage span {
  position: absolute;
  top: -18px;
  left: var(--x);
  width: var(--w);
  height: var(--h);
  border-radius: 2px;
  opacity: var(--opacity);
  box-shadow: 0 2px 8px rgba(1, 2, 5, 0.16);
  animation: confetti-fall var(--duration) cubic-bezier(0.12, 0.78, 0.2, 1) var(--delay) forwards;
}

@keyframes confetti-fall {
  0% {
    transform: translate3d(0, -20px, 0) rotate(0deg);
    opacity: 0;
  }

  12% {
    opacity: 1;
  }

  100% {
    transform: translate3d(var(--dx), calc(100vh + 80px), 0) rotate(var(--rotate));
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .confetti-stage span {
    animation-duration: 0.01ms;
  }
}
