:root {
  color-scheme: light;
  --primary: #4c6b47;   /* active / sage */
  --pending: #a1502f;   /* pending / clay */
  --ink: #2a2520;
  --ink-soft: #6b6153;
  --paper: #f3ecda;
  --paper-deep: #e7ddc0;
  --gold: #a8822e;
  --gold-deep: #7c611f;
  --error: #8c3b2e;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: 'Source Serif 4', Georgia, serif;
  background-color: #3b4237;
  background-image: url('https://lh3.googleusercontent.com/d/1rKDJhFtVh7aHRrP870GzjXzeZ1X9s6pu');
  background-size: cover;
  background-position: center top;
  background-attachment: fixed;
  background-repeat: no-repeat;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
.app-container {
  width: 100%;
  max-width: 450px;
  padding: 40px 20px 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.top-banner {
  width: 100%;
  max-width: 380px;
  height: auto;
  border-radius: 6px;
  margin-bottom: 34px;
  box-shadow: 0 10px 26px rgba(60, 45, 10, 0.25);
  object-fit: cover;
  display: block;
  filter: sepia(0.12) contrast(1.03);
}
.card-wrapper {
  position: relative;
  width: 100%;
  z-index: 10;
  animation: popIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.card {
  --tooth: 8px;
  background: var(--paper);
  width: 100%;
  padding: 44px 26px 32px;
  text-align: center;
  border-top: 10px solid var(--primary);
  position: relative;
  transition: border-color 0.4s ease;
  filter: drop-shadow(0 18px 32px rgba(50, 38, 12, 0.28));
  clip-path: polygon(
    0 var(--tooth), 5% 0, 10% var(--tooth), 15% 0, 20% var(--tooth), 25% 0, 30% var(--tooth), 35% 0,
    40% var(--tooth), 45% 0, 50% var(--tooth), 55% 0, 60% var(--tooth), 65% 0, 70% var(--tooth), 75% 0,
    80% var(--tooth), 85% 0, 90% var(--tooth), 95% 0, 100% var(--tooth),
    100% calc(100% - var(--tooth)), 95% 100%, 90% calc(100% - var(--tooth)), 85% 100%,
    80% calc(100% - var(--tooth)), 75% 100%, 70% calc(100% - var(--tooth)), 65% 100%,
    60% calc(100% - var(--tooth)), 55% 100%, 50% calc(100% - var(--tooth)), 45% 100%,
    40% calc(100% - var(--tooth)), 35% 100%, 30% calc(100% - var(--tooth)), 25% 100%,
    20% calc(100% - var(--tooth)), 15% 100%, 10% calc(100% - var(--tooth)), 5% 100%, 0 calc(100% - var(--tooth))
  );
}
.cloud-motif {
  position: absolute;
  top: 6px;
  right: 2px;
  width: 84px;
  height: auto;
  opacity: 0.9;
  pointer-events: none;
  z-index: 0;
}
.panda {
  position: absolute;
  width: 90px;
  z-index: 2;
  pointer-events: none;
  filter: sepia(0.25) drop-shadow(0 4px 6px rgba(50, 38, 12, 0.2));
}
.top-panda { top: -46px; right: 15px; }
.bottom-panda {
  bottom: -43px;
  left: 10px;
  transform: scaleY(-1);
  filter: sepia(0.25) drop-shadow(0 4px 6px rgba(50, 38, 12, 0.2)) invert(0);
}
@media (prefers-color-scheme: dark) {
  .panda { filter: sepia(0.25) drop-shadow(0 4px 6px rgba(50, 38, 12, 0.2)) invert(0) !important; }
}

h2 {
  font-family: 'Silkscreen', monospace;
  margin: 0;
  color: var(--ink);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.5px;
  position: relative;
  z-index: 1;
}
p {
  color: var(--ink-soft);
  margin: 10px 0 20px;
  font-size: 16px;
  line-height: 1.55;
}
.perforation {
  border: none;
  border-top: 2px dashed var(--gold);
  opacity: 0.55;
  margin: 26px 0;
}
.btn {
  background: var(--ink);
  color: var(--paper);
  border: none;
  padding: 16px;
  border-radius: 4px;
  font-family: 'Silkscreen', monospace;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  width: 100%;
  transition: 0.2s;
  display: inline-block;
  text-decoration: none;
}
.btn:hover {
  background: #1a1712;
  box-shadow: 0 4px 12px rgba(50, 38, 12, 0.25);
}
.btn:active { transform: scale(0.97); }
.btn:disabled {
  background: #a79a80;
  cursor: not-allowed;
}
.btn-deals-active {
  background: #4c6b47 !important;
  color: #fff8eb !important;
}
.btn-deals-active:hover {
  background: #3a5436 !important;
  box-shadow: 0 4px 14px rgba(76, 107, 71, 0.4) !important;
}
.btn-deals-locked {
  background: #a79a80 !important;
  color: #ede2c8 !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
}
.hidden { display: none !important; }
select {
  width: 100%;
  padding: 16px 45px 16px 16px;
  margin-bottom: 16px;
  font-family: 'Source Serif 4', serif;
  font-size: 16px;
  font-weight: 600;
  border: 2px dashed var(--gold);
  border-radius: 6px;
  background-color: var(--paper-deep);
  color: var(--ink);
  appearance: none;
  cursor: pointer;
  outline: none;
  transition: all 0.2s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%237c611f'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 18px;
}
select:focus {
  border-color: var(--ink);
  background-color: #fbf7ea;
  box-shadow: 0 0 0 4px rgba(42, 37, 32, 0.1);
}
.deal-badge {
  background: var(--paper-deep);
  border: 2px dashed var(--gold);
  padding: 20px;
  border-radius: 6px;
  margin: 20px 0;
  text-align: center;
}
.badge-member {
  font-size: 14px;
  color: var(--ink-soft);
  font-weight: 600;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--gold);
}
.badge-member strong { color: var(--ink); font-weight: 700; }
.loc-name {
  color: var(--ink);
  font-family: 'Silkscreen', monospace;
  font-size: 19px;
  font-weight: 700;
}
.deal-text {
  color: var(--primary);
  font-family: 'Source Serif 4', serif;
  font-style: italic;
  font-size: 16px;
  font-weight: 700;
  margin-top: 6px;
}
.back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 15px;
  color: var(--ink-soft);
  background: var(--paper-deep);
  border: 1px dashed var(--gold);
  text-decoration: none;
  font-family: 'Silkscreen', monospace;
  font-size: 11px;
  cursor: pointer;
  padding: 9px 16px;
  border-radius: 5px;
  transition: all 0.2s ease;
}
.back-link:hover {
  background: #ddd0ab;
  color: var(--ink);
  border-color: var(--gold-deep);
}
#lookup-toggle,
#lookup-kind {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 2px solid var(--gold-deep);
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ink);
}
#lookup-toggle:focus-visible,
#lookup-kind:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}
.website-footer {
  margin-top: 40px;
  font-size: 14px;
  color: #f3ecda;
  font-weight: 600;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}
.website-footer a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s;
}
.website-footer a:hover { border-bottom: 2px solid var(--gold); }
.pulse { animation: pulseAnim 1.5s infinite; }
@keyframes popIn {
  0% { opacity: 0; transform: translateY(20px) scale(0.95); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes pulseAnim {
  0% { opacity: 0.4; }
  50% { opacity: 1; }
  100% { opacity: 0.4; }
}
.text-input {
  width: 100%;
  padding: 14px 16px;
  font-family: 'Source Serif 4', serif;
  font-size: 15px;
  font-weight: 600;
  border: 2px dashed var(--gold);
  border-radius: 6px;
  background-color: var(--paper-deep);
  color: var(--ink);
  outline: none;
  transition: all 0.2s;
  text-align: center;
}
.text-input:focus {
  border-color: var(--ink);
  background-color: #fbf7ea;
  box-shadow: 0 0 0 4px rgba(42, 37, 32, 0.1);
}
/* Recovery screen field labels (same names as the events site's Find my tickets) */
.lookup-label { display: block; text-align: left; font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: -6px; }
.ticket-pill {
  font-family: 'Silkscreen', monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-soft);
  background: var(--paper-deep);
  border: 1px dashed var(--gold);
  padding: 5px 12px;
  border-radius: 5px;
  letter-spacing: 0.5px;
}
.stamp {
  display: inline-block;
  font-family: 'Silkscreen', monospace;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--primary);
  border: 3px solid var(--primary);
  border-radius: 8px;
  padding: 8px 18px;
  transform: rotate(-4deg);
  margin: 4px 0 6px;
}

/* Event tickets under the pass */
.tix-head { font-family: 'Silkscreen', monospace; font-size: 12px; color: var(--ink-soft); text-transform: uppercase; margin-bottom: 10px; }
.tix-hint { font-size: 12px; font-style: italic; color: var(--ink-soft); margin-bottom: 12px; }
.tix-hint a { cursor: pointer; text-decoration: underline; }
.tix-card { background: var(--paper-deep); border: 1px dashed var(--gold); border-radius: 6px; padding: 12px; margin-bottom: 10px; text-align: center; }
.tix-event { font-weight: 700; font-size: 15px; color: var(--ink); }
.tix-meta { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }
.tix-qr { width: 140px; height: 140px; display: block; margin: 10px auto 6px; }
.tix-status { font-family: 'Silkscreen', monospace; font-size: 11px; text-transform: uppercase; color: var(--primary); }
.tix-status.wait { color: var(--pending); }
.tix-open { display: inline-block; margin-top: 6px; font-size: 12px; color: var(--ink-soft); }

/* Panda loader (loading, slow, success, error) */
.pl { text-align: center; padding: 12px 0 8px; color: inherit; }
.pl-stage { position: relative; width: 64px; height: 62px; margin: 0 auto; animation: plBob 2s ease-in-out infinite; }
.pl-img { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); max-width: 100%; max-height: 100%; width: auto; height: auto; }
.pl-frames-2 .pl-f0 { animation: plFrameA .9s steps(1, end) infinite; }
.pl-frames-2 .pl-f1 { animation: plFrameB .9s steps(1, end) infinite; }
@keyframes plFrameA { 0% { opacity: 1; } 50% { opacity: 0; } }
@keyframes plFrameB { 0% { opacity: 0; } 50% { opacity: 1; } }
@keyframes plBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.pl-dots { display: flex; justify-content: center; gap: 6px; height: 12px; margin: 4px 0 3px; }
.pl-dots i { width: 11px; height: 11px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 21C3 9 11 3 21 3c0 10-6 18-18 18z' fill='%236aa84f'/%3E%3Cpath d='M3 21L15 9' stroke='%23467a35' stroke-width='1.6' fill='none'/%3E%3C/svg%3E") center / contain no-repeat; transform: scale(0); animation: plLeaf 1.5s ease-in-out infinite; }
.pl-dots i:nth-child(2) { animation-delay: .25s; }
.pl-dots i:nth-child(3) { animation-delay: .5s; }
@keyframes plLeaf { 0%, 10% { transform: scale(0) rotate(-35deg); opacity: 0; } 35%, 75% { transform: scale(1) rotate(0); opacity: 1; } 100% { transform: scale(1) rotate(0); opacity: 0; } }
.pl-title { margin: 3px 0 1px; font-weight: 700; font-size: 14px; }
.pl-sub { margin: 0; opacity: .7; font-size: 12px; }
.pl-retry { margin-top: 12px; padding: 8px 18px; border-radius: 10px; border: 1px solid currentColor; background: transparent; color: inherit; font: inherit; font-weight: 600; cursor: pointer; }
.pl[data-state="success"] .pl-stage { animation: plHop .7s ease-out 1; }
@keyframes plHop { 0% { transform: translateY(0); } 35% { transform: translateY(-14px); } 60% { transform: translateY(0); } 78% { transform: translateY(-5px); } 100% { transform: translateY(0); } }
.pl-compact .pl-stage { width: 40px; height: 39px; }
.pl-compact .pl-dots { height: 9px; gap: 4px; margin: 3px 0 1px; }
.pl-compact .pl-dots i { width: 8px; height: 8px; }
.pl-compact .pl-title { font-size: 11px; margin: 1px 0 0; }
.pl-compact .pl-sub { display: none; }
.pl-solo { display: block; height: 48px; width: auto; margin: 0 auto 10px; }
.pl-solo.pl-toast { height: 30px; margin: 0 10px 0 0; display: inline-block; vertical-align: middle; }
.pl-leaves { padding: 26px 0 18px; }
.pl-leaves .pl-dots { gap: 16px; height: 34px; margin: 0 0 12px; }
.pl-leaves .pl-dots i { width: 26px; height: 26px; }
.pl-busy .pl-img, .pl-solo { filter: drop-shadow(0 2px 5px rgba(0, 0, 0, .35)); }
.pl-busy .pl-title, .pl-busy .pl-sub { text-shadow: 0 0 6px var(--bg, #fff), 0 0 10px var(--bg, #fff); }
.pl-busy { position: fixed; inset: 0; display: grid; place-items: center; pointer-events: none; z-index: 9999; }
@media (prefers-reduced-motion: reduce) {
  .pl-stage, .pl[data-state="success"] .pl-stage { animation: none; }
  .pl-frames-2 .pl-f0, .pl-frames-2 .pl-f1 { animation: none; }
  .pl-frames-2 .pl-f1 { opacity: 0; }
  .pl-dots i { animation: none; transform: scale(1); opacity: 1; }
}
/* ---------- Events and registration (register.js) ---------- */
.reg-go { padding: 10px 18px; font-size: 14px; }
#register-box label { display: block; font-size: 13px; font-weight: 600; color: var(--ink); margin: 10px 0 4px; text-align: left; }
#register-box .text-input { width: 100%; box-sizing: border-box; }
.reg-person { background: var(--paper-deep); border: 1px dashed var(--gold); border-radius: 6px; padding: 12px; margin-bottom: 10px; text-align: left; }
.reg-guest-head { display: flex; justify-content: space-between; align-items: center; }
.reg-types { margin: 10px 0 4px; }
.reg-type { display: flex !important; align-items: center; gap: 8px; margin: 6px 0 !important; font-weight: 400 !important; }
.reg-type span { flex: 1; }
.reg-total { display: flex; justify-content: space-between; margin: 12px 0; font-size: 16px; }
.reg-error { color: var(--error); font-size: 13px; font-weight: 600; margin: 8px 0; }
.reg-pay { background: var(--paper-deep); border: 2px dashed var(--gold); border-radius: 8px; padding: 8px 14px; margin: 10px 0; text-align: left; }
.reg-pay div { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; }
.reg-pay span { color: var(--ink-soft); }

/* My tickets: cancelled tickets and the 'Missing a ticket?' help */
.tix-status.void { color: var(--ink-soft); }
.tix-card.void { opacity: .75; border-style: solid; }
.tix-note { font-size: 12px; color: var(--ink-soft); margin: 6px 0 0; }
.tix-missing { text-align: left; margin: 14px 0 4px; font-size: 13px; color: var(--ink-soft); }
.tix-missing summary { cursor: pointer; font-weight: 600; color: var(--primary); }
.tix-missing p { margin: 8px 0; line-height: 1.5; }
.tix-missing a { cursor: pointer; text-decoration: underline; }
.tix-error { text-align: center; font-size: 13px; color: var(--ink-soft); margin: 12px 0; }
