/* Runner Pass — mobile-first */
* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: #0f172a;
  color: #e2e8f0;
  font-family: 'Sarabun', 'Prompt', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

.rp-page {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 16px;
  padding-top: env(safe-area-inset-top);
  padding-bottom: calc(40px + env(safe-area-inset-bottom));
}

.rp-header {
  padding: 24px 0 16px;
  text-align: center;
}
.rp-header h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #f8fafc;
}
.rp-subtitle { color: #94a3b8; font-size: 14px; margin-top: 6px; }

.rp-header-back {
  display: flex; align-items: center;
  text-align: left;
  gap: 12px;
}
.rp-header-back h1 { flex: 1; font-size: 22px; }
.rp-back {
  display: inline-flex;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  border-radius: 50%;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 28px;
  background: rgba(255,255,255,0.08);
}

.rp-main { padding: 8px 0 32px; }
.rp-main h2 { font-size: 18px; font-weight: 600; margin-bottom: 16px; color: #f1f5f9; }

.rp-empty {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
}
.rp-empty p { margin: 6px 0; }
.rp-muted { color: #94a3b8; }
.rp-small { font-size: 13px; }

.rp-event-list { display: flex; flex-direction: column; gap: 12px; }
.rp-event-card {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 12px;
  text-decoration: none; color: inherit;
  transition: background 0.15s, transform 0.15s;
}
.rp-event-card:active { transform: scale(0.98); background: rgba(99,102,241,0.15); }
.rp-event-img {
  width: 64px; height: 64px;
  border-radius: 10px;
  background-size: cover; background-position: center;
  flex-shrink: 0;
}
.rp-event-img-placeholder {
  background: linear-gradient(135deg, #1e293b, #0f172a);
}
.rp-event-info { flex: 1; min-width: 0; }
.rp-event-name { font-weight: 600; color: #f1f5f9; font-size: 15px; margin-bottom: 2px; }
.rp-event-date { color: #94a3b8; font-size: 13px; }
.rp-event-arrow { color: #64748b; font-size: 28px; flex-shrink: 0; }

.rp-event-banner {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 20px;
}
.rp-event-banner .rp-event-name { font-size: 17px; }
.rp-event-banner .rp-event-date { font-size: 14px; }

.rp-instruction {
  margin: 16px 0 20px;
  color: #cbd5e1;
  font-size: 15px;
}

.rp-form { display: flex; flex-direction: column; gap: 16px; }
.rp-field { display: flex; flex-direction: column; gap: 6px; }
.rp-field label {
  font-size: 13px;
  color: #94a3b8;
  font-weight: 500;
  letter-spacing: 0.3px;
}
.rp-field input[type="text"],
.rp-field input[type="tel"],
.rp-field input[type="email"],
.rp-field input[type="date"] {
  width: 100%;
  padding: 14px 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  color: #f1f5f9;
  font-size: 16px;
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
}
.rp-field input:focus {
  outline: none;
  border-color: #6366f1;
  background: rgba(99,102,241,0.06);
}

.rp-error {
  background: rgba(239,68,68,0.12);
  border: 1px solid rgba(239,68,68,0.4);
  color: #fca5a5;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
}

.rp-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%;
  padding: 16px 20px;
  border-radius: 12px;
  font-size: 16px; font-weight: 600;
  font-family: inherit;
  border: none; cursor: pointer; text-decoration: none;
  transition: transform 0.1s, opacity 0.15s, background 0.15s;
}
.rp-btn:active { transform: scale(0.98); }
.rp-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.rp-btn-primary {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  box-shadow: 0 4px 12px rgba(99,102,241,0.4);
}
.rp-btn-ghost {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: #cbd5e1;
}

.rp-multi-list { display: flex; flex-direction: column; gap: 12px; }
.rp-multi-item {
  display: block; width: 100%; text-align: left;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  padding: 16px 20px;
  color: inherit;
  font-family: inherit; cursor: pointer;
  transition: background 0.15s;
}
.rp-multi-item:active { background: rgba(99,102,241,0.15); }
.rp-multi-bib { color: #facc15; font-weight: 700; font-size: 22px; }
.rp-multi-name { font-size: 16px; margin-top: 4px; color: #f1f5f9; }
.rp-multi-range { font-size: 13px; color: #94a3b8; margin-top: 2px; }

/* Selfie page */
.rp-greeting { margin-bottom: 16px; }
.rp-greet-name { font-size: 22px; font-weight: 700; color: #f1f5f9; }
.rp-greet-bib { font-size: 14px; color: #facc15; margin-top: 4px; }

.rp-photo-picker {
  display: block;
  cursor: pointer;
  margin: 24px auto;
}
.rp-photo-preview {
  width: 240px; height: 240px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.04);
  margin: 0 auto;
  display: flex; align-items: center; justify-content: center;
}
.rp-photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.rp-photo-placeholder {
  display: flex; flex-direction: column; gap: 8px;
  color: #64748b; font-size: 14px; text-align: center;
}
.rp-photo-icon { font-size: 48px; }

/* Pass view */
.rp-card-wrap {
  max-width: 360px;
  margin: 16px auto 24px;
}
.rp-card-image {
  width: 100%;
  border-radius: 16px;
  box-shadow: 0 12px 36px rgba(0,0,0,0.5);
  display: block;
}
.rp-actions {
  display: flex; flex-direction: column; gap: 10px;
  margin-top: 20px;
}

.rp-footer {
  text-align: center; padding: 24px 0;
  color: #64748b; font-size: 12px;
}
