/* Attendee (mobile) pages: entry form, result, personal pass. */

body.attendee {
  min-height: 100dvh;
  background:
    radial-gradient(120% 60% at 100% 0%, rgba(0, 150, 214, 0.1), transparent 60%),
    radial-gradient(90% 50% at 0% 100%, rgba(0, 150, 214, 0.06), transparent 60%),
    var(--surface);
  display: flex;
  flex-direction: column;
}

.brandbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: max(18px, env(safe-area-inset-top)) 22px 18px;
}

.att-main {
  flex: 1;
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  padding: 18px 22px max(32px, env(safe-area-inset-bottom));
}
.view { min-height: 60dvh; }
.view[data-view='loading'] { display: grid; place-items: center; }

.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brand-700); }
.eyebrow.is-muted { color: var(--muted); }
.att-title { font-size: 32px; line-height: 1.12; font-weight: 700; letter-spacing: -0.025em; margin-top: 10px; }
.att-lead { font-size: 16px; color: var(--ink-2); margin-top: 12px; }
.att-lead strong { color: var(--ink); font-weight: 600; word-break: break-all; }
.fineprint { font-size: 12.5px; color: var(--muted); text-align: center; margin-top: 14px; }
.tip {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--line-2);
  font-size: 13.5px;
  color: var(--ink-2);
}
.tip svg { flex: none; margin-top: 1px; color: var(--brand-700); }

#entry-form { margin-top: 28px; }
#entry-form .btn { margin-top: 6px; }

/* ---- Info states (need scan / expired / closed / error) ----------------- */
.state-icon {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: var(--brand-50);
  color: var(--brand-700);
  margin-bottom: 22px;
}
.state-icon.is-amber { background: var(--amber-50); color: var(--amber-ink); }
.state-icon.is-grey { background: var(--line-2); color: var(--ink-2); }

/* ---- Win: pass card ------------------------------------------------------ */
.win-head { display: flex; align-items: center; gap: 12px; }
.win-check {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
  flex: none;
  animation: pop-in 0.5s var(--ease-spring) both;
}
.win-check path { stroke-dasharray: 24; stroke-dashoffset: 24; animation: draw 0.45s 0.25s var(--ease) forwards; }

.pass-card {
  position: relative;
  margin-top: 22px;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-2);
  overflow: hidden;
}
.pass-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 18px 20px 16px;
  background: linear-gradient(135deg, #062650 0%, #0a3d7a 55%, #0096d6 150%);
  color: #fff;
}
.pass-label { font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.7; }
.pass-seq { font-size: 44px; line-height: 1; font-weight: 700; letter-spacing: -0.03em; margin-top: 6px; }
.pass-status {
  font-size: 12px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(4px);
}
.pass-status.is-collected { background: #fff; color: var(--brand-700); }
.pass-qr { padding: 22px 34px 10px; }
.pass-qr svg { width: 100%; height: auto; aspect-ratio: 1; transition: opacity 0.3s, filter 0.3s; }
.pass-card.is-collected .pass-qr svg { opacity: 0.18; filter: grayscale(1); }
.pass-name { text-align: center; font-weight: 600; font-size: 17px; padding: 4px 20px 20px; }
.pass-perf {
  position: relative;
  height: 0;
  border-top: 2px dashed var(--line);
  margin: 0 18px;
}
.pass-card.is-collected .pass-collected-stamp { display: grid; }
.pass-collected-stamp {
  display: none;
  position: absolute;
  inset: 0;
  place-items: center;
  pointer-events: none;
}
.pass-collected-stamp span {
  margin-top: 60px;
  padding: 10px 18px;
  border: 3px solid var(--brand);
  border-radius: 12px;
  color: var(--brand-700);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.9);
  transform: rotate(-8deg);
}

/* ---- Miss ---------------------------------------------------------------- */
.miss-num {
  font-size: 84px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--line);
  -webkit-text-stroke: 1.5px var(--faint);
  margin-bottom: 18px;
}

/* ---- Confetti (lightweight, CSS-driven, runs once) ------------------------ */
.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 50; }
.confetti i {
  position: absolute;
  top: -12px;
  width: 8px;
  height: 14px;
  border-radius: 2px;
  opacity: 0;
  animation: confetti-fall var(--d, 1.6s) var(--delay, 0s) cubic-bezier(0.25, 0.6, 0.4, 1) forwards;
}
@keyframes confetti-fall {
  0% { opacity: 1; transform: translate3d(0, 0, 0) rotate(0); }
  100% { opacity: 0; transform: translate3d(var(--x, 0), 105vh, 0) rotate(var(--r, 540deg)); }
}
