/* =====================================================================================
   Trips Proof · "Post a journey" — a full-screen, native-app style flow.
   Phones: the flow brings its own glass header (close/back, step title, segmented
   progress) and a glass action bar pinned to the bottom. Desktop: a two-column studio
   (visual stage left, details right) under a sticky glass header, next to the sidebar.
   ===================================================================================== */

/* Opacity-only page entrance on this route (a transform would break the fixed bars). */
body[data-route='post'] .page--enter {
  animation-name: fade-in;
}

@media (max-width: 1023.98px) {
  body[data-route='post'] .topbar,
  body[data-route='post'] .tabbar {
    display: none !important;
  }
  body[data-route='post'] .main {
    padding: 0;
  }
  body[data-route='post'] .toasts {
    bottom: calc(var(--safe-b) + 112px);
  }
}

/* ---------- Root ---------- */
.pf {
  --pf-max: 560px;
  --pf-head-h: 70px;
  position: relative;
  max-width: var(--pf-max);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: calc(var(--safe-t) + var(--pf-head-h) + 16px) calc(16px + var(--safe-r)) calc(var(--safe-b) + 150px) calc(16px + var(--safe-l));
  overflow-x: clip;
}
.pf--done {
  padding-bottom: calc(var(--safe-b) + 120px);
}

/* ---------- Header: close/back · title · segmented progress ---------- */
.pf-head {
  position: fixed;
  z-index: 60;
  top: 0;
  left: 0;
  right: 0;
  padding: var(--safe-t) calc(6px + var(--safe-r)) 0 calc(6px + var(--safe-l));
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--line);
}
.pf-head__row {
  max-width: var(--pf-max);
  height: 54px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 8px;
}
.pf-iconbtn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  transition:
    background-color var(--dur-2) var(--ease),
    transform var(--dur-1) var(--ease),
    opacity var(--dur-2) var(--ease);
}
.pf-iconbtn:hover:not(:disabled) {
  background: var(--surface-2);
}
.pf-iconbtn:active:not(:disabled) {
  transform: scale(0.9);
}
.pf-iconbtn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.pf-head__spacer {
  width: 44px;
}
.pf-head__title {
  display: grid;
  justify-items: center;
  min-width: 0;
  line-height: 1.2;
  text-align: center;
}
.pf-head__title h1 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.012em;
  white-space: nowrap;
}
.pf-head__title h1:focus {
  outline: none;
}
.pf-head__sub {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 650;
  color: var(--text-3);
  white-space: nowrap;
}
.pf-head__timer {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
  transition: color var(--dur-3) var(--ease);
}
.pf-head__timer::before {
  content: '·';
  margin-right: 2px;
  color: var(--text-3);
}
.pf-head__timer.is-low {
  color: var(--warn);
}

.pf-progress {
  max-width: var(--pf-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  padding: 2px 10px 11px;
}
.pf-progress span {
  position: relative;
  height: 3px;
  border-radius: 3px;
  overflow: hidden;
  background: var(--surface-3);
}
.pf-progress span::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  /* One gradient across all four segments. */
  background: var(--brand);
  background-size: 400% 100%;
  background-position: calc(var(--seg) * 33.333%) 0;
  transform: scaleX(0);
  transform-origin: left center;
}
.pf-progress .is-done::after,
.pf-progress .is-current::after {
  transform: none;
}
.pf-progress .is-fill::after {
  animation: pf-seg 720ms var(--ease) 120ms both;
}
@keyframes pf-seg {
  from {
    transform: scaleX(0);
  }
}

/* ---------- Typography ---------- */
.pf-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 10px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.pf-kicker--danger {
  color: var(--danger);
}
.pf-kicker--ok {
  color: var(--ok);
}
.pf-hero {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(38px, 11vw, 46px);
  line-height: 1;
  letter-spacing: -0.018em;
  text-wrap: balance;
}
.pf-hero em {
  font-style: italic;
  padding-right: 0.06em;
  background: var(--brand-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.pf-lead {
  margin: 0 0 20px;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--text-2);
  text-wrap: pretty;
}
.pf-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-2);
}
.pf-note > .icon {
  margin-top: 1px;
  color: var(--text-3);
}
.pf-note--center {
  display: block;
  text-align: center;
}
.pf-note--center > .icon {
  display: inline-block;
  margin: -2px 6px 0 0;
  vertical-align: middle;
}
.pf-flag {
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
  font-style: normal;
  margin-right: 2px;
}
.pf-grow {
  flex: 1 1 0;
  min-width: 0;
}

/* ---------- Layout: stage (visual) + panel (details) ---------- */
.pf-split {
  display: grid;
  gap: 22px;
}
.pf-stage {
  position: relative;
  min-width: 0;
}
.pf-panel {
  min-width: 0;
}

/* ---------- Cards, pills ---------- */
.pf-card {
  margin: 0 0 14px;
  padding: 16px 18px;
  border-radius: var(--radius-l);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-1), var(--highlight);
}
.pf-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.pf-card__head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 750;
}
.pf-card--problems {
  border-color: color-mix(in srgb, var(--danger) 28%, var(--line));
  background:
    linear-gradient(var(--danger-soft), var(--danger-soft)),
    var(--surface);
}
.pf-card--problems .checks {
  margin: 0;
}
.pf-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}
.pf-pill--ok {
  background: var(--ok-soft);
  color: var(--ok);
  border-color: color-mix(in srgb, var(--ok) 24%, transparent);
}
.pf-glasschip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid rgb(255 255 255 / 0.2);
  background: rgb(16 16 22 / 0.42);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}
.pf-details {
  margin: 10px 0 0;
  padding-top: 6px;
  border-top: 1px solid var(--line);
}
.pf-details summary {
  font-size: 13.5px;
  color: var(--text-2);
}
.pf-details .checks {
  margin-top: 4px;
}

/* ---------- Action bar (pinned on phones) ---------- */
.pf-cta {
  position: fixed;
  z-index: 55;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  gap: 4px;
  padding: 12px max(calc(16px + var(--safe-r)), calc((100% - var(--pf-max)) / 2 + 16px)) calc(12px + var(--safe-b))
    max(calc(16px + var(--safe-l)), calc((100% - var(--pf-max)) / 2 + 16px));
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border-top: 1px solid var(--line);
}
.pf-cta__row {
  display: flex;
  gap: 10px;
}
.pf-cta .btn--secondary {
  padding-inline: 20px;
}
.pf-skip {
  justify-self: center;
  min-height: 38px;
  font-size: 14px;
  color: var(--text-2);
}
.pf-skip:hover:not(:disabled) {
  color: var(--text);
}
.pf-file {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  pointer-events: none;
}
label.btn:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* =====================================================================================
   Step 1 · Location
   ===================================================================================== */
.pf-stage--sky {
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 0.8;
  overflow: hidden;
  isolation: isolate;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background:
    radial-gradient(120% 80% at 50% 115%, rgb(207 32 162 / 0.26), transparent 58%),
    radial-gradient(80% 70% at 50% 45%, rgb(114 22 181 / 0.12), transparent 70%),
    var(--surface);
  box-shadow: var(--shadow-1), var(--highlight);
}
.pf-stage--alert {
  background:
    radial-gradient(120% 80% at 50% 115%, rgb(248 113 113 / 0.26), transparent 58%),
    var(--surface);
}

/* Radar: concentric rings, outward pulses, a rotating sweep and a gradient pin. */
.pf-radar {
  --r: min(62vw, 250px);
  position: relative;
  display: grid;
  place-items: center;
  width: var(--r);
  aspect-ratio: 1;
}
.pf-radar > * {
  grid-area: 1 / 1;
}
.pf-radar__grid {
  position: absolute;
  inset: -12%;
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle closest-side, transparent 0 24.4%, var(--line-2) 24.6% 25%),
    linear-gradient(var(--line), var(--line)) center / 1px 100% no-repeat,
    linear-gradient(var(--line), var(--line)) center / 100% 1px no-repeat;
  -webkit-mask: radial-gradient(closest-side, #000 72%, transparent 100%);
  mask: radial-gradient(closest-side, #000 72%, transparent 100%);
}
.pf-radar__sweep {
  position: absolute;
  inset: -12%;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 250deg, rgb(207 32 162 / 0.3) 356deg, rgb(255 170 230 / 0.95) 359.4deg, transparent 360deg);
  -webkit-mask: radial-gradient(closest-side, #000 70%, transparent 100%);
  mask: radial-gradient(closest-side, #000 70%, transparent 100%);
  animation: pf-spin 2.4s linear infinite;
}
.pf-radar__pulse {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 30%;
  height: 30%;
  border-radius: 50%;
  border: 1.5px solid rgb(207 32 162 / 0.6);
  background: radial-gradient(circle, rgb(207 32 162 / 0.12), transparent 70%);
  opacity: 0;
  animation: pf-pulse 3.3s var(--ease) var(--d, 0s) infinite;
}
.pf-radar--scan .pf-radar__pulse {
  animation-duration: 2.2s;
  border-color: rgb(207 32 162 / 0.75);
}
.pf-radar--fail .pf-radar__pulse {
  border-color: rgb(248 113 113 / 0.55);
  background: radial-gradient(circle, rgb(248 113 113 / 0.1), transparent 70%);
  animation-duration: 4.4s;
}
@keyframes pf-pulse {
  0% {
    transform: scale(0.7);
    opacity: 0;
  }
  14% {
    opacity: 1;
  }
  100% {
    transform: scale(3.4);
    opacity: 0;
  }
}
.pf-radar__blip {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-1);
  box-shadow:
    0 0 0 4px rgb(240 100 200 / 0.18),
    0 0 14px rgb(240 100 200 / 0.85);
  opacity: 0;
  animation: pf-blip 2.4s var(--ease) var(--d) infinite;
}
@keyframes pf-blip {
  0%,
  100% {
    opacity: 0;
    transform: scale(0.4);
  }
  10% {
    opacity: 1;
    transform: scale(1);
  }
  48% {
    opacity: 0;
    transform: scale(0.8);
  }
}
.pf-radar__halo {
  width: 52%;
  height: 52%;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(173 26 201 / 0.34), transparent 66%);
}
.pf-radar__pin {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  color: #fff;
  background: var(--brand);
  box-shadow:
    0 0 0 6px color-mix(in srgb, var(--surface) 70%, transparent),
    0 0 0 7px var(--line),
    var(--shadow-brand),
    inset 0 1px 0 rgb(255 255 255 / 0.35);
}
.pf-radar__pin::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 25%, rgb(255 255 255 / 0.4), transparent 52%);
}
.pf-radar--scan .pf-radar__pin {
  animation: pf-bob 1.5s ease-in-out infinite;
}
.pf-radar--fail .pf-radar__pin {
  background: linear-gradient(135deg, #ff9a7a, #f05252 55%, #c2185b);
  box-shadow:
    0 0 0 6px color-mix(in srgb, var(--surface) 70%, transparent),
    0 0 0 7px var(--line),
    0 12px 28px -10px rgb(240 82 82 / 0.75);
}
.pf-radar--fail .pf-radar__halo {
  background: radial-gradient(circle, rgb(248 113 113 / 0.32), transparent 66%);
}
@keyframes pf-bob {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-5px) scale(1.04);
  }
}
@keyframes pf-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Intro: what we check */
.pf-features {
  list-style: none;
  display: grid;
  margin: 0 0 4px;
  padding: 4px 16px;
  border-radius: var(--radius-l);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-1), var(--highlight);
}
.pf-features li {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 12px 0;
}
.pf-features li + li {
  border-top: 1px solid var(--line);
}
.pf-features__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  color: var(--accent);
  background: var(--brand-soft), var(--surface-2);
  border: 1px solid var(--line);
}
.pf-features strong {
  display: block;
  font-size: 14.5px;
  font-weight: 750;
}
.pf-features div > span {
  display: block;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-2);
}
.pf-panel .alert {
  margin: 16px 0 0;
}

/* Busy: live scan status */
.pf-panel--status {
  text-align: center;
}
.pf-scan {
  list-style: none;
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  text-align: left;
}
.pf-scan__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-m);
  border: 1px solid var(--line);
  background: var(--surface);
  transition:
    border-color var(--dur-3) var(--ease),
    opacity var(--dur-3) var(--ease);
}
.pf-scan__item.is-wait {
  opacity: 0.6;
}
.pf-scan__item.is-active {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
}
.pf-scan__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: var(--text-3);
  background: var(--surface-2);
}
.pf-scan__item.is-active .pf-scan__icon {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  animation: pf-breathe 1.4s ease-in-out infinite;
}
.pf-scan__item.is-done .pf-scan__icon {
  color: var(--ok);
  background: var(--ok-soft);
}
.pf-scan__label {
  flex: 1;
  font-size: 14px;
  font-weight: 650;
}
.pf-scan__state {
  font-size: 12px;
  font-weight: 750;
  color: var(--text-3);
}
.pf-scan__item.is-active .pf-scan__state {
  color: var(--accent);
}
.pf-scan__item.is-done .pf-scan__state {
  color: var(--ok);
}
/* Busy: GPS listening for a precise fix */
.pf-gps {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin: -8px 0 18px;
}
.pf-gps__bar {
  position: relative;
  display: block;
  justify-self: stretch;
  height: 4px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface-2);
}
.pf-gps__bar > span {
  position: absolute;
  inset: 0;
  transform-origin: left;
  transform: scaleX(0);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-1), var(--brand-2));
  animation-name: pf-gps-fill;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}
.pf-gps__hint {
  font-size: 13px;
  color: var(--text-3);
}
.pf-gps .pf-skip {
  justify-self: auto;
  padding-inline: 0;
}
.pf-gps .pf-skip[hidden] {
  display: none;
}
@keyframes pf-gps-fill {
  to {
    transform: scaleX(1);
  }
}
@media (prefers-reduced-motion: reduce) {
  .pf-gps__bar > span {
    animation: none;
    transform: scaleX(0.5);
    opacity: 0.5;
  }
}

/* Rough location: tips for a precise fix */
.pf-tips {
  margin-bottom: 8px;
}
.pf-tips li {
  align-items: start;
}

@keyframes pf-breathe {
  0%,
  100% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 40%, transparent);
  }
  50% {
    box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 0%, transparent);
  }
}

/* Reveal: the place as a dusk postcard */
.pf-postcard {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  container-type: inline-size;
  aspect-ratio: 1 / 1.04;
  border-radius: var(--radius-xl);
  color: #fff;
  background: linear-gradient(180deg, #0f0716 0%, #1c0b2e 28%, #4a1466 50%, #a8179e 68%, #e04a8e 84%, #ffb0c8 100%);
  box-shadow:
    var(--shadow-2),
    inset 0 0 0 1px rgb(255 255 255 / 0.06);
}
.pf-postcard__stars {
  position: absolute;
  inset: 0 0 45% 0;
  z-index: -1;
  background-image:
    radial-gradient(1.2px 1.2px at 12% 22%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 28% 8%, #fff 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 46% 30%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 63% 12%, #fff 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 78% 26%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 90% 6%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 8% 48%, #fff 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 86% 52%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 36% 54%, #fff 50%, transparent 51%);
  opacity: 0.55;
  animation: pf-twinkle 5s ease-in-out infinite;
}
@keyframes pf-twinkle {
  50% {
    opacity: 0.85;
  }
}
.pf-postcard__sun {
  position: absolute;
  z-index: -1;
  left: 34%;
  top: 38%;
  width: 72%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(
    circle closest-side,
    #fff2f8 0 11%,
    #ffd0ea 15%,
    rgb(255 150 215 / 0.55) 22%,
    rgb(240 100 190 / 0.22) 42%,
    rgb(220 80 180 / 0.08) 66%,
    transparent 100%
  );
}
.pf-ridges {
  position: absolute;
  z-index: -1;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 46%;
  max-width: none;
}
.pf-ridges__far {
  fill: #d86fb0;
  opacity: 0.72;
}
.pf-ridges__snow {
  fill: rgb(255 240 248 / 0.55);
}
.pf-ridges__mid {
  fill: #33144d;
  opacity: 0.92;
}
.pf-ridges__near {
  fill: #140818;
}
.pf-postcard__content {
  position: relative;
  padding: 24px 22px;
}
.pf-postcard__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgb(255 255 255 / 0.78);
}
.pf-postcard__place {
  margin: 10px 0 10px;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(28px, calc(165cqi / var(--len)), 78px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  overflow-wrap: break-word;
  text-shadow: 0 2px 30px rgb(0 0 0 / 0.35);
}
.pf-postcard__sub {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 650;
  color: rgb(255 255 255 / 0.92);
}
.pf-postcard__time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: rgb(255 255 255 / 0.7);
}
.pf-postcard__seal {
  position: absolute;
  left: 18px;
  bottom: 18px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px 7px 9px;
  border-radius: 999px;
  border: 1px solid rgb(255 255 255 / 0.22);
  background: rgb(255 255 255 / 0.12);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  font-size: 12.5px;
  font-weight: 750;
}
.pf-postcard__seal .icon {
  color: #7cf0c4;
}

/* Verification summary: three rows that tick themselves off */
.pf-groups {
  list-style: none;
  display: grid;
  margin: 0;
  padding: 0;
}
.pf-group {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
}
.pf-group + .pf-group {
  border-top: 1px solid var(--line);
}
.pf-group__text {
  display: grid;
  gap: 1px;
  min-width: 0;
}
.pf-group__text strong {
  font-size: 14.5px;
  font-weight: 700;
}
.pf-group__text span {
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--text-2);
}
.pf-group__icon {
  color: var(--text-3);
}
.pf-tick {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: var(--ok);
  background: var(--ok-soft);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 22%, transparent);
}
.pf-tick svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pf-group--warn .pf-tick {
  color: var(--warn);
  background: var(--warn-soft);
}
.pf-group--fail .pf-tick {
  color: var(--danger);
  background: var(--danger-soft);
}
.pf-group--skip .pf-tick {
  color: var(--text-3);
  background: var(--surface-2);
}
.pf.is-enter .pf-tick {
  animation: pf-pop 560ms var(--ease-spring) both;
  animation-delay: calc(420ms + var(--i) * 300ms);
}
.pf.is-enter .pf-tick path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: pf-draw 420ms var(--ease) forwards;
  animation-delay: calc(600ms + var(--i) * 300ms);
}
.pf.is-enter .pf-group__text {
  animation: pf-rise 460ms var(--ease) both;
  animation-delay: calc(380ms + var(--i) * 300ms);
}
.pf-warnline {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 8px 0 0;
  padding: 10px 12px;
  border-radius: var(--radius-m);
  background: var(--warn-soft);
  color: var(--warn);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.4;
}
.pf-warnline .icon {
  margin-top: 1px;
}

/* Badges waiting to be earned */
.pf-earn {
  background:
    radial-gradient(120% 90% at 50% 0%, rgb(242 195 91 / 0.08), transparent 62%),
    var(--surface);
}
.pf-medals {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 22px 30px;
  padding: 12px 0 2px;
}
.pf-medals .badge figcaption {
  max-width: 132px;
}

/* =====================================================================================
   Step 2 · Photos
   ===================================================================================== */
.pf-drop {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  width: 100%;
  aspect-ratio: 1;
  padding: 24px;
  border-radius: var(--radius-xl);
  border: 1.5px dashed var(--line-2);
  background:
    radial-gradient(90% 60% at 50% 105%, rgb(207 32 162 / 0.12), transparent 70%),
    radial-gradient(60% 50% at 50% 30%, rgb(114 22 181 / 0.08), transparent 70%),
    var(--surface);
  color: var(--text);
  text-align: center;
  cursor: pointer;
  transition:
    border-color var(--dur-2) var(--ease),
    transform var(--dur-2) var(--ease);
}
.pf-drop:hover {
  border-color: color-mix(in srgb, var(--accent) 65%, transparent);
}
.pf-drop:active {
  transform: scale(0.99);
}
.pf-drop:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.pf-drop__orb {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  margin-bottom: 8px;
  border-radius: 26px;
  color: #fff;
  background: var(--brand);
  box-shadow:
    var(--shadow-brand),
    inset 0 1px 0 rgb(255 255 255 / 0.3);
  transform: rotate(-6deg);
  transition: transform var(--dur-3) var(--ease-spring);
}
.pf-drop:hover .pf-drop__orb {
  transform: rotate(0deg) scale(1.05);
}
.pf-drop strong {
  font-size: 17px;
  font-weight: 750;
  letter-spacing: -0.01em;
}
.pf-drop__hint {
  max-width: 260px;
  font-size: 13.5px;
  color: var(--text-2);
}
.pf-drop__btn {
  margin-top: 8px;
  pointer-events: none;
}

.pf-preview {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--surface-2);
  box-shadow: var(--shadow-2);
}
.pf-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pf.is-enter .pf-preview img,
.pf-preview img {
  animation: pf-fade 320ms var(--ease) both;
}
.pf-preview__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgb(0 0 0 / 0.3), transparent 22%, transparent 68%, rgb(0 0 0 / 0.45));
  pointer-events: none;
}
.pf-preview .pf-glasschip {
  position: absolute;
}
.pf-preview__cover {
  top: 14px;
  left: 14px;
}
.pf-preview__count {
  top: 14px;
  right: 14px;
  font-variant-numeric: tabular-nums;
}
.pf-preview__place {
  left: 14px;
  bottom: 14px;
  max-width: calc(100% - 28px);
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 639.98px) {
  .pf-preview {
    margin-top: -16px;
    margin-inline: calc(-16px - var(--safe-l)) calc(-16px - var(--safe-r));
    border-radius: 0;
    box-shadow: none;
  }
}

.pf-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0 0 10px;
}
.pf-section-head h3 {
  margin: 0;
  font-size: 15px;
}
.pf-count {
  font-size: 12.5px;
  font-weight: 750;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.pf-thumbs {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 22px;
  padding: 0;
}
.pf-thumb {
  position: relative;
  aspect-ratio: 1;
}
.pf-thumb__img {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  background: var(--surface-2);
  transition:
    box-shadow var(--dur-2) var(--ease),
    transform var(--dur-1) var(--ease);
}
.pf-thumb__img:active {
  transform: scale(0.95);
}
.pf-thumb__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pf-thumb.is-active .pf-thumb__img {
  box-shadow:
    0 0 0 2px var(--bg),
    0 0 0 4px var(--accent);
}
.pf-thumb__cover {
  position: absolute;
  left: 4px;
  bottom: 4px;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgb(0 0 0 / 0.58);
  color: #fff;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  pointer-events: none;
}
.pf-thumb__remove {
  position: absolute;
  top: 4px;
  right: 4px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid rgb(255 255 255 / 0.3);
  border-radius: 50%;
  background: rgb(12 12 16 / 0.62);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #fff;
  transition: transform var(--dur-1) var(--ease);
}
/* A 44px tap target around the small visual button. */
.pf-thumb__remove::before {
  content: '';
  position: absolute;
  inset: -10px;
}
.pf-thumb__remove:hover {
  background: rgb(220 38 38 / 0.85);
}
.pf-thumb__remove:active {
  transform: scale(0.88);
}
.pf-thumb__add {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  border: 1.5px dashed var(--line-2);
  color: var(--text-2);
  font-size: 11.5px;
  font-weight: 750;
  cursor: pointer;
  transition:
    color var(--dur-2) var(--ease),
    border-color var(--dur-2) var(--ease),
    background-color var(--dur-2) var(--ease);
}
.pf-thumb__add:hover {
  color: var(--text);
  border-color: var(--accent);
  background: var(--surface-2);
}
.pf-thumb__add:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.pf-caption {
  margin: 0 0 12px;
}
.pf-caption__label {
  margin: 0 0 8px;
}
.pf-caption__box {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  padding: 12px 14px 8px;
  border-radius: var(--radius-l);
  border: 1px solid var(--line);
  background: var(--surface);
  transition:
    border-color var(--dur-2) var(--ease),
    box-shadow var(--dur-2) var(--ease);
}
.pf-caption__box:focus-within {
  border-color: color-mix(in srgb, var(--accent) 60%, transparent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent);
}
.pf-caption__box textarea,
.pf-caption__box textarea:focus,
.pf-caption__box textarea:hover {
  min-height: 88px;
  padding: 6px 0 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  resize: none;
}
.pf-caption__foot {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.pf-caption__foot .is-near {
  color: var(--warn);
}
.pf-locrow {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-l);
  border: 1px solid var(--line);
  background: var(--surface);
}
.pf-locrow__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: var(--accent);
  background: var(--brand-soft), var(--surface-2);
}
.pf-locrow__text {
  display: grid;
  flex: 1;
  min-width: 0;
}
.pf-locrow__text strong {
  font-size: 14.5px;
  font-weight: 750;
}
.pf-locrow__text span {
  overflow: hidden;
  font-size: 12.5px;
  color: var(--text-2);
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* =====================================================================================
   Step 3 · Video proof
   ===================================================================================== */
.pf-split--video .pf-stage {
  order: 2;
}
.pf-split--video.has-clip .pf-stage {
  order: -1;
}
.pf-compare {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 8px 0 0;
}
.pf-compare__opt {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 4px;
  padding: 24px 12px 16px;
  border-radius: var(--radius-l);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-1), var(--highlight);
  text-align: center;
}
.pf-compare__opt .badge {
  margin-bottom: 10px;
}
.pf-compare__opt .badge figcaption {
  display: none;
}
.pf-compare__opt strong {
  font-size: 14.5px;
  font-weight: 800;
}
.pf-compare__desc {
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--text-2);
}
.pf-compare__opt--gold {
  border-color: rgb(242 195 91 / 0.45);
  background:
    radial-gradient(120% 80% at 50% 0%, rgb(242 195 91 / 0.16), transparent 65%),
    var(--surface);
  box-shadow:
    0 0 0 1px rgb(242 195 91 / 0.1),
    0 16px 36px -20px rgb(242 195 91 / 0.6),
    var(--highlight);
}
.pf-compare__opt--gold strong {
  color: var(--gold-text);
}
.pf-compare.is-chosen .pf-compare__opt:not(.pf-compare__opt--gold) {
  opacity: 0.55;
}
.pf-compare__ribbon {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  padding: 3px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold-1), var(--gold-2) 50%, #d99a33);
  box-shadow: 0 6px 14px -6px rgb(242 195 91 / 0.8);
  color: #3b2606;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}
.pf-compare__or {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: var(--bg);
  color: var(--text-3);
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
}

/* The one-time code as a boarding-pass style ticket */
.pf-ticket {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-2), var(--highlight);
}
.pf-ticket__top {
  position: relative;
  padding: 22px 18px 24px;
  text-align: center;
  background:
    radial-gradient(120% 120% at 50% -10%, rgb(207 32 162 / 0.16), transparent 60%),
    radial-gradient(80% 90% at 100% 110%, rgb(114 22 181 / 0.14), transparent 60%),
    var(--surface-2);
  border-bottom: 2px dashed var(--line-2);
}
.pf-ticket__top::before,
.pf-ticket__top::after {
  content: '';
  position: absolute;
  bottom: -12px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--line);
}
.pf-ticket__top::before {
  left: -12px;
}
.pf-ticket__top::after {
  right: -12px;
}
.pf-ticket__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 14px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-2);
}
.pf-ticket__digits {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 0 0 14px;
}
.pf-digit {
  display: grid;
  place-items: center;
  width: 60px;
  height: 74px;
  border-radius: 16px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  box-shadow:
    var(--shadow-1),
    inset 0 1px 0 rgb(255 255 255 / 0.06);
  color: var(--text);
  font-size: 42px;
  font-weight: 800;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}
.pf.is-enter .pf-digit {
  animation: pf-flipdown 620ms var(--ease-spring) both;
  animation-delay: calc(260ms + var(--i) * 90ms);
}
@keyframes pf-flipdown {
  from {
    opacity: 0;
    transform: perspective(300px) rotateX(-85deg);
  }
}
.pf-ticket__valid {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}
.pf-ticket__steps {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 22px 20px 22px;
  list-style: none;
  counter-reset: pf-step;
}
.pf-ticket__steps li {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 12px;
  font-size: 14px;
  line-height: 1.45;
  counter-increment: pf-step;
}
.pf-ticket__steps li::before {
  content: counter(pf-step);
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 800;
}

/* Recorded clip */
.pf-clip {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: #000;
  box-shadow: var(--shadow-2);
}
.pf-clip video {
  width: 100%;
  max-height: 62vh;
  margin: 0 auto;
  background: #000;
}
.pf-clip__tag {
  position: absolute;
  top: 12px;
  left: 12px;
}
.pf-clip__tag .icon {
  color: #7cf0c4;
}

/* Camera: full-bleed live preview in the top layer (<dialog>.showModal()) */
.pf-cam {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #000;
  color: #fff;
  overscroll-behavior: contain;
}
.pf-cam[open] {
  display: block;
  animation: pf-cam-in 320ms var(--ease) both;
}
.pf-cam::backdrop {
  background: #000;
}
@keyframes pf-cam-in {
  from {
    opacity: 0;
    transform: scale(1.03);
  }
}
.pf-cam__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}
.pf-cam[data-facing='user'] .pf-cam__video {
  transform: scaleX(-1);
}
.pf-cam__shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgb(0 0 0 / 0.55), transparent 30%, transparent 58%, rgb(0 0 0 / 0.72));
}
.pf-cam__top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  align-items: center;
  padding: calc(var(--safe-t) + 10px) calc(12px + var(--safe-r)) 0 calc(12px + var(--safe-l));
}
.pf-cam__btn {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgb(255 255 255 / 0.2);
  background: rgb(0 0 0 / 0.34);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  color: #fff;
  transition:
    transform var(--dur-1) var(--ease),
    opacity var(--dur-2) var(--ease),
    background-color var(--dur-2) var(--ease);
}
.pf-cam__btn:hover {
  background: rgb(0 0 0 / 0.5);
}
.pf-cam__btn:active {
  transform: scale(0.9);
}
.pf-cam__status {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgb(255 255 255 / 0.16);
  background: rgb(0 0 0 / 0.4);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  font-size: 13.5px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  transition: background-color var(--dur-3) var(--ease);
}
.pf-cam__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.55);
}
.pf-cam.is-recording .pf-cam__status {
  background: rgb(230 40 60 / 0.88);
  border-color: transparent;
}
.pf-cam.is-recording .pf-cam__dot {
  background: #fff;
  animation: pf-blink 1s steps(2, jump-none) infinite;
}
@keyframes pf-blink {
  50% {
    opacity: 0.2;
  }
}
.pf-cam__code {
  position: absolute;
  top: calc(var(--safe-t) + 74px);
  left: 50%;
  width: min(calc(100% - 32px), 440px);
  transform: translateX(-50%);
  padding: 14px 18px 16px;
  border-radius: 24px;
  border: 1px solid rgb(255 255 255 / 0.16);
  background: rgb(14 14 18 / 0.42);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  backdrop-filter: blur(22px) saturate(160%);
  box-shadow: 0 24px 60px -24px rgb(0 0 0 / 0.7);
  text-align: center;
}
.pf-cam__eyebrow {
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgb(255 255 255 / 0.7);
}
.pf-cam__digits {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 2px 0 0;
  font-size: 54px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 18px rgb(0 0 0 / 0.4);
}
.pf-cam__line {
  margin: 4px 0 0;
  font-size: 13.5px;
  line-height: 1.4;
  color: rgb(255 255 255 / 0.88);
}
.pf-cam__steps {
  display: grid;
  gap: 4px;
  margin: 12px 0 0;
  padding: 12px 0 0 20px;
  border-top: 1px solid rgb(255 255 255 / 0.14);
  font-size: 12.5px;
  line-height: 1.4;
  color: rgb(255 255 255 / 0.8);
  text-align: left;
}
.pf-cam.is-recording .pf-cam__steps {
  display: none;
}
.pf-cam__bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  justify-items: center;
  gap: 18px;
  padding: 0 calc(20px + var(--safe-r)) calc(var(--safe-b) + 28px) calc(20px + var(--safe-l));
}
.pf-cam__hint {
  margin: 0;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgb(0 0 0 / 0.42);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}
.pf-cam__controls {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: min(100%, 420px);
}
.pf-cam__limits {
  justify-self: start;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgb(255 255 255 / 0.72);
}
.pf-cam__flip {
  justify-self: end;
}
.pf-cam.is-recording .pf-cam__flip {
  opacity: 0;
  pointer-events: none;
}
.pf-rec {
  position: relative;
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}
.pf-rec:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 4px;
  border-radius: 50%;
}
.pf-rec__ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  transform: rotate(-90deg);
}
.pf-rec__track {
  fill: none;
  stroke: rgb(255 255 255 / 0.92);
  stroke-width: 5;
  transition: stroke var(--dur-3) var(--ease);
}
.pf-rec__prog {
  fill: none;
  stroke: #ff3b52;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  transition: stroke-dashoffset 120ms linear;
}
.pf-rec__min {
  fill: none;
  stroke: #fff;
  stroke-width: 10;
  stroke-dasharray: 0.7 99.3;
  opacity: 0;
  transition: opacity var(--dur-3) var(--ease);
}
.pf-cam.is-recording .pf-rec__track {
  stroke: rgb(255 255 255 / 0.32);
}
.pf-cam.is-recording .pf-rec__min {
  opacity: 0.95;
}
.pf-rec__core {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff7a86, #ff3b52 45%, #d7193a);
  box-shadow:
    inset 0 -3px 8px rgb(0 0 0 / 0.25),
    0 6px 20px -6px rgb(255 59 82 / 0.7);
  transition:
    width 260ms var(--ease-spring),
    height 260ms var(--ease-spring),
    border-radius 260ms var(--ease-spring),
    transform var(--dur-1) var(--ease),
    opacity var(--dur-2) var(--ease);
}
.pf-rec:hover:not(:disabled) .pf-rec__core {
  transform: scale(0.94);
}
.pf-rec:active:not(:disabled) .pf-rec__core {
  transform: scale(0.86);
}
.pf-cam.is-recording .pf-rec__core {
  width: 32px;
  height: 32px;
  border-radius: 9px;
}
.pf-rec:disabled {
  cursor: not-allowed;
}
.pf-rec:disabled .pf-rec__core {
  opacity: 0.82;
}
.pf-cam.is-min .pf-rec__core {
  animation: pf-ready 1.8s ease-in-out infinite;
}
@keyframes pf-ready {
  50% {
    box-shadow:
      inset 0 -3px 8px rgb(0 0 0 / 0.25),
      0 0 0 8px rgb(255 59 82 / 0.22);
  }
}

/* =====================================================================================
   Step 4 · Review & upload
   ===================================================================================== */
.pf-summary-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  container-type: inline-size;
  margin: 0;
  aspect-ratio: 1;
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, #1c0b2e, #a8179e 70%, #e04a8e);
  box-shadow: var(--shadow-2);
  color: #fff;
}
.pf-summary-card > img {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pf-summary-card__shade {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(180deg, rgb(0 0 0 / 0.5), transparent 26%, transparent 38%, rgb(0 0 0 / 0.8));
}
.pf-summary-card__top {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 750;
  text-shadow: 0 1px 8px rgb(0 0 0 / 0.4);
}
.pf-summary-card figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  gap: 4px;
  padding: 20px;
}
.pf-summary-card__eyebrow {
  font-size: 13px;
  font-weight: 700;
  color: rgb(255 255 255 / 0.86);
}
.pf-summary-card__place {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(28px, calc(160cqi / var(--len)), 72px);
  line-height: 0.98;
  letter-spacing: -0.02em;
  overflow-wrap: break-word;
  text-shadow: 0 2px 24px rgb(0 0 0 / 0.35);
}
.pf-summary-card__caption {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 14px;
  line-height: 1.4;
  color: rgb(255 255 255 / 0.9);
}
.pf-summary-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.pf-tier {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  margin: 0 0 14px;
  padding: 18px;
  border-radius: var(--radius-l);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-1), var(--highlight);
}
.pf-tier__medals {
  display: flex;
  padding: 6px 4px 6px 6px;
}
.pf-tier__medals .badge + .badge {
  margin-left: -14px;
}
.pf-tier .badge figcaption {
  display: none;
}
.pf-tier__text {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.pf-tier__eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}
.pf-tier__text strong {
  font-size: 16.5px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.pf-tier__desc {
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-2);
}
.pf-tier--gold {
  border-color: rgb(242 195 91 / 0.45);
  background:
    radial-gradient(120% 140% at 0% 0%, rgb(242 195 91 / 0.18), transparent 60%),
    var(--surface);
}
.pf-tier--gold strong {
  color: var(--gold-text);
}
.pf-tier--review {
  border-color: color-mix(in srgb, var(--blue) 30%, var(--line));
  background:
    radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--blue) 12%, transparent), transparent 60%),
    var(--surface);
}

.pf-summary {
  margin: 0;
  padding: 2px 16px;
  border-radius: var(--radius-l);
  border: 1px solid var(--line);
  background: var(--surface);
}
.pf-summary > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
}
.pf-summary > div + div {
  border-top: 1px solid var(--line);
}
.pf-summary dt {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-2);
}
.pf-summary dt .icon {
  color: var(--text-3);
}
.pf-summary dd {
  min-width: 0;
  margin: 0;
  font-size: 14px;
  font-weight: 650;
  text-align: right;
}

/* Upload: blurred cover photo behind a magenta progress ring */
.pf-busy {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: calc(100dvh - var(--pf-head-h) - var(--safe-t) - 190px);
  text-align: center;
}
.pf-busy__bg {
  position: fixed;
  z-index: -1;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
  filter: blur(44px) saturate(1.4);
  transform: scale(1.25);
  pointer-events: none;
}
.pf-busy__inner {
  width: 100%;
  max-width: 420px;
}
.pf-ring {
  position: relative;
  width: 180px;
  height: 180px;
  margin: 0 auto 28px;
}
.pf-ring svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  transform: rotate(-90deg);
  filter: drop-shadow(0 0 14px rgb(173 26 201 / 0.35));
}
.pf-ring.is-spinning svg {
  animation: pf-ring-spin 1.15s linear infinite;
}
@keyframes pf-ring-spin {
  from {
    transform: rotate(-90deg);
  }
  to {
    transform: rotate(270deg);
  }
}
.pf-ring__track {
  fill: none;
  stroke: var(--surface-3);
  stroke-width: 7;
}
.pf-ring__bar {
  fill: none;
  stroke-width: 7;
  stroke-linecap: round;
  stroke-dasharray: 100;
  transition: stroke-dashoffset 300ms var(--ease);
}
.pf-ring__center {
  position: absolute;
  inset: 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-1), var(--highlight);
  color: var(--text);
}
.pf-ring__pct {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.pf-phases {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 8px 0 0;
  padding: 0;
}
.pf-phases li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px 5px 5px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-3);
  font-size: 12.5px;
  font-weight: 700;
}
.pf-phases li > span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface-2);
  font-size: 11px;
  font-weight: 800;
}
.pf-phases .is-active {
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
}
.pf-phases .is-active > span {
  background: var(--brand);
  color: #fff;
}
.pf-phases .is-done {
  color: var(--ok);
}
.pf-phases .is-done > span {
  background: var(--ok-soft);
  color: var(--ok);
}

/* =====================================================================================
   Done · celebration
   ===================================================================================== */
.pf-done {
  position: relative;
  isolation: isolate;
  container-type: inline-size;
  display: grid;
  justify-items: center;
  padding-top: 12px;
  text-align: center;
}
.pf-done__glow {
  position: absolute;
  z-index: -1;
  top: -40px;
  left: 50%;
  width: 760px;
  height: 760px;
  transform: translateX(-50%);
  pointer-events: none;
  background: radial-gradient(closest-side, rgb(230 80 200 / 0.18), rgb(173 26 201 / 0.08) 45%, transparent 75%);
}
.pf-done__rays {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, rgb(240 140 220 / 0.14) 0 5deg, transparent 5deg 15deg);
  -webkit-mask: radial-gradient(closest-side, #000 18%, transparent 72%);
  mask: radial-gradient(closest-side, #000 18%, transparent 72%);
  animation: pf-spin 60s linear infinite;
}
.pf-done__place {
  margin: 4px 0 8px;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(30px, calc(175cqi / var(--len)), 96px);
  line-height: 0.95;
  letter-spacing: -0.025em;
  overflow-wrap: break-word;
}
.pf-done__sub {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
  color: var(--text-2);
}
.pf-awards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px 36px;
  margin: 34px 0 28px;
}
.pf-award {
  display: grid;
  justify-items: center;
  gap: 14px;
  perspective: 800px;
}
.pf-award .badge__medal {
  animation: pf-medal-in 1150ms var(--ease-spring) both;
  animation-delay: calc(380ms + var(--i) * 280ms);
}
.pf-award--permanent .badge__medal {
  box-shadow:
    0 0 0 1px rgb(255 241 193 / 0.3),
    0 0 60px -6px rgb(242 195 91 / 0.65),
    0 16px 34px -12px rgb(242 195 91 / 0.7),
    0 3px 6px rgb(0 0 0 / 0.35);
}
.pf-award--permanent .badge__medal::after {
  animation:
    pf-sheen 1.5s var(--ease) calc(1.25s + var(--i) * 0.28s) both,
    medal-sheen 6s var(--ease) 4s infinite;
}
@keyframes pf-sheen {
  from {
    background-position: 130% 0;
  }
  to {
    background-position: -30% 0;
  }
}
@keyframes pf-medal-in {
  0% {
    opacity: 0;
    transform: rotateY(-120deg) scale(0.3);
  }
  40% {
    opacity: 1;
  }
  70% {
    transform: rotateY(16deg) scale(1.08);
  }
  100% {
    transform: none;
  }
}
.pf-award figcaption {
  animation: pf-rise 520ms var(--ease) both;
  animation-delay: calc(820ms + var(--i) * 280ms);
}
.pf-award__change {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 800;
  animation: pf-pop 520ms var(--ease-spring) both;
  animation-delay: calc(1050ms + var(--i) * 280ms);
}
.pf-award__change:empty {
  display: none;
}
.pf-award__change--new {
  border-color: transparent;
  background: var(--brand);
  color: #fff;
  box-shadow: var(--shadow-brand);
}
.pf-award__change--upgraded {
  border-color: transparent;
  background: linear-gradient(135deg, var(--gold-1), var(--gold-2) 50%, #d99a33);
  color: #3b2606;
}
.pf-done__note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 460px;
  margin: 0 0 8px;
  padding: 12px 14px;
  border-radius: var(--radius-m);
  border: 1px solid var(--line);
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  color: var(--text-2);
  font-size: 13.5px;
  line-height: 1.45;
  text-align: left;
}
.pf-done__note .icon {
  flex: none;
  color: var(--accent);
}
.pf-again {
  margin-top: 6px;
  min-height: 44px;
  font-size: 14px;
}
.pf.is-enter .pf-done > .pf-kicker,
.pf.is-enter .pf-done__place,
.pf.is-enter .pf-done__sub {
  animation: pf-rise 600ms var(--ease) both;
}
.pf.is-enter .pf-done__place {
  animation-delay: 80ms;
}
.pf.is-enter .pf-done__sub {
  animation-delay: 160ms;
}
.pf.is-enter .pf-done__note,
.pf.is-enter .pf-done .pf-cta,
.pf.is-enter .pf-again {
  animation: pf-rise 600ms var(--ease) 1.2s both;
}

.pf-confetti {
  position: fixed;
  z-index: 2900;
  inset: 0;
  width: 100vw;
  height: 100vh;
  max-width: none;
  pointer-events: none;
}

/* Discard confirmation sheet */
.pf-discard__text {
  margin: 0 0 18px;
  color: var(--text-2);
}
.pf-discard__actions {
  display: grid;
  gap: 10px;
}

/* ---------- Entrance choreography (only when the screen changes) ---------- */
.pf.is-enter .pf-stage {
  animation: pf-stage-in 620ms var(--ease) both;
}
.pf.is-enter .pf-panel > * {
  animation: pf-rise 520ms var(--ease) both;
}
.pf.is-enter .pf-panel > :nth-child(2) {
  animation-delay: 60ms;
}
.pf.is-enter .pf-panel > :nth-child(3) {
  animation-delay: 120ms;
}
.pf.is-enter .pf-panel > :nth-child(4) {
  animation-delay: 180ms;
}
.pf.is-enter .pf-panel > :nth-child(5) {
  animation-delay: 240ms;
}
.pf.is-enter .pf-panel > :nth-child(n + 6) {
  animation-delay: 300ms;
}
.pf.is-enter .pf-panel > .pf-cta {
  animation-name: pf-fade;
  animation-delay: 120ms;
}
.pf.is-enter .pf-busy__inner {
  animation: pf-stage-in 520ms var(--ease) both;
}
.pf.is-enter .pf-postcard__sun {
  animation: pf-sunrise 1400ms var(--ease) 120ms both;
}
.pf.is-enter .pf-postcard__place {
  animation: pf-rise 760ms var(--ease) 180ms both;
}
@keyframes pf-rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}
@keyframes pf-fade {
  from {
    opacity: 0;
  }
}
@keyframes pf-pop {
  from {
    opacity: 0;
    transform: scale(0.3);
  }
}
@keyframes pf-draw {
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes pf-stage-in {
  from {
    opacity: 0;
    transform: scale(0.97) translateY(8px);
  }
}
@keyframes pf-sunrise {
  from {
    opacity: 0;
    transform: translateY(40%);
  }
}

/* =====================================================================================
   Tablet & desktop
   ===================================================================================== */
@media (min-width: 640px) {
  .pf-drop {
    aspect-ratio: 4 / 4.2;
  }
}

@media (min-width: 1024px) {
  .pf {
    --pf-max: 1040px;
    min-height: 0;
    padding: 0 0 48px;
    overflow-x: visible;
  }
  .pf--done {
    padding-bottom: 48px;
  }
  .pf-head {
    position: sticky;
    top: 0;
    margin: -36px calc(var(--gutter) * -1) 36px;
    padding: 12px var(--gutter) 0;
  }
  .pf-head__title h1 {
    font-size: 17px;
  }
  .pf-progress {
    padding: 4px 0 14px;
  }
  .pf-split {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    align-items: start;
    gap: 56px;
  }
  .pf-split > .pf-stage {
    grid-column: 1;
    grid-row: 1;
    position: sticky;
    top: 112px;
  }
  .pf-split > .pf-panel {
    grid-column: 2;
    grid-row: 1;
    padding-top: 4px;
  }
  .pf-cta {
    position: static;
    margin-top: 22px;
    padding: 0;
    border: 0;
    background: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .pf-hero {
    font-size: 56px;
  }
  .pf-lead {
    font-size: 16px;
  }
  .pf-stage--sky {
    aspect-ratio: 1 / 1.06;
  }
  .pf-radar {
    --r: 320px;
  }
  .pf-panel--status {
    text-align: left;
    align-self: center;
  }
  .pf-split > .pf-panel--status {
    align-self: center;
  }
  .pf-gps {
    justify-items: start;
  }
  .pf-postcard {
    aspect-ratio: 4 / 4.6;
  }
  .pf-postcard__content {
    padding: 32px 30px;
  }
  .pf-postcard__place {
    font-size: clamp(30px, calc(165cqi / var(--len)), 104px);
  }
  .pf-postcard__seal {
    left: 26px;
    bottom: 26px;
  }
  .pf-drop {
    aspect-ratio: 4 / 5;
  }
  .pf-summary-card {
    aspect-ratio: 4 / 5;
  }
  .pf-summary-card figcaption {
    padding: 26px;
  }
  .pf-thumbs {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
  }
  .pf-clip video {
    max-height: 72vh;
  }
  .pf-busy {
    min-height: 64vh;
  }
  .pf-done {
    max-width: 720px;
    margin: 0 auto;
    padding-top: 28px;
  }
  .pf-done .pf-cta {
    width: 100%;
    max-width: 460px;
    margin-top: 26px;
  }
  .pf-award .badge--lg {
    --size: 136px;
  }
  .pf-cam__code {
    top: calc(var(--safe-t) + 84px);
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .pf *,
  .pf *::before,
  .pf *::after,
  .pf-cam,
  .pf-cam * {
    animation-delay: 0s !important;
  }
  .pf-radar__sweep,
  .pf-radar__blip,
  .pf-done__rays,
  .pf-postcard__stars,
  .pf-scan__item.is-active .pf-scan__icon,
  .pf-cam.is-recording .pf-cam__dot,
  .pf-cam.is-min .pf-rec__core,
  .pf-ring.is-spinning svg {
    animation: none !important;
  }
  /* Static rings instead of moving pulses. */
  .pf-radar__pulse {
    animation: none !important;
    opacity: 0.45;
    transform: scale(var(--s, 2));
  }
  .pf-radar__blip {
    opacity: 0.8;
  }
  .pf-award--permanent .badge__medal::after {
    animation: none !important;
  }
}

/* ---------- Simple posting: camera or gallery, map pin, review ---------- */
.pf-source {
  display: grid;
  gap: 10px;
  max-width: 560px;
  margin: 0 auto;
  padding-top: 8px;
}
.pf-source__choices {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}
.pf-source__opt {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line-2);
  background: var(--surface);
  cursor: pointer;
  transition: transform var(--dur-1) var(--ease), border-color var(--dur-2) var(--ease);
}
.pf-source__opt:hover {
  border-color: var(--accent);
}
.pf-source__opt:active {
  transform: scale(0.985);
}
.pf-source__opt:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.pf-source__opt--main {
  color: #fff;
  border-color: transparent;
  background: var(--brand);
  box-shadow: var(--shadow-brand);
}
.pf-source__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  color: var(--accent);
  background: var(--surface-2);
}
.pf-source__opt--main .pf-source__icon {
  color: #fff;
  background: rgb(255 255 255 / 0.18);
}
.pf-source__text {
  display: grid;
  flex: 1;
  min-width: 0;
}
.pf-source__text strong {
  font-size: 17px;
  font-weight: 800;
}
.pf-source__text small {
  font-size: 13.5px;
  opacity: 0.85;
}

.pf-pinmap {
  width: 100%;
  aspect-ratio: 1 / 0.9;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  overflow: hidden;
  background: var(--surface-2);
}
.pf-pinmap__hint {
  position: absolute;
  left: 50%;
  top: 12px;
  z-index: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 7px 12px;
  border-radius: 999px;
  transform: translateX(-50%);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  color: var(--text);
  background: var(--glass-strong);
  box-shadow: var(--shadow-1);
}
.pf-pin span {
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: var(--brand);
  border: 3px solid #fff;
  box-shadow: 0 4px 12px rgb(0 0 0 / 0.35);
}
.pf-locrow__cover {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
}
.pf-review-note {
  display: flex;
  gap: 10px;
  margin: 14px 0;
  padding: 12px 14px;
  border-radius: var(--radius-l);
  color: var(--text);
  background: var(--brand-soft), var(--surface-2);
}
.pf-review-note svg {
  flex: none;
  color: var(--accent);
}
.pf-review-note p {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
}
.pf-panel .field {
  margin-top: 12px;
}
.pf-permanent {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 520px;
  margin: 6px auto 14px;
  padding: 14px;
  border-radius: var(--radius-l);
  border: 1px solid var(--line-2);
  background: var(--surface);
  text-align: left;
}
.pf-permanent__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: var(--gold-text);
  background: var(--surface-2);
}
.pf-permanent__text {
  display: grid;
  flex: 1;
  min-width: 0;
}
.pf-permanent__text small {
  color: var(--text-2);
  font-size: 13px;
}
@media (min-width: 900px) {
  .pf-source {
    padding-top: 32px;
  }
}
