:root {
  --bg: #faf5f8;
  --card: #ffffff;
  --primary: #b871a5;
  --primary-dark: #9a5486;
  --accent: #9a5486;
  --text: #2b1f28;
  --muted: #7d6e78;
  --border: #ecdde7;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: linear-gradient(180deg, #faf5f8 0%, #f3e6ef 100%);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 24px 16px 60px;
}

.app {
  width: 100%;
  max-width: 480px;
}

.app-header {
  text-align: center;
  margin-bottom: 28px;
}

.badge {
  font-size: 40px;
  line-height: 1;
  margin-bottom: 6px;
}

.church-logo {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 10px;
  box-shadow: 0 4px 14px rgba(154, 84, 134, 0.25);
}

.app-header h1 {
  margin: 0;
  font-size: 24px;
  color: var(--primary-dark);
}

.subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin: 0 0 14px;
  font-size: 13px;
  min-height: 18px;
}

.breadcrumb:empty {
  display: none;
}

.breadcrumb .crumb-sep {
  color: var(--muted);
  opacity: 0.6;
}

.breadcrumb button.crumb {
  background: none;
  border: none;
  padding: 0;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

.breadcrumb button.crumb:hover {
  color: var(--primary-dark);
}

.breadcrumb .crumb-current {
  color: var(--muted);
  font-weight: 700;
}

.view {
  display: none;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  box-shadow: 0 4px 18px rgba(180, 130, 60, 0.08);
}

.view.active {
  display: block;
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.view h2 {
  margin: 0 0 18px;
  font-size: 18px;
  text-align: center;
  color: var(--text);
}

.button-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.class-btn {
  padding: 18px 10px;
  border: 2px solid var(--primary);
  background: #fff;
  color: var(--primary-dark);
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease, color 0.12s ease;
}

.class-btn:active {
  transform: scale(0.97);
}

.class-btn:hover {
  background: var(--primary);
  color: #fff;
}

.back-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 0 0 14px;
  display: block;
}

.selected-label {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  margin-top: -6px;
  margin-bottom: 18px;
}

#reg-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.field-group input,
.field-group select,
.field-group textarea {
  padding: 12px 14px;
  border: 2px solid var(--border);
  border-radius: 12px;
  font-size: 16px;
  outline: none;
  font-family: inherit;
  background: #fff;
  color: var(--text);
}

.field-group textarea {
  resize: vertical;
}

.field-group input:focus,
.field-group select:focus,
.field-group textarea:focus {
  border-color: var(--primary);
}

.field-group input:disabled {
  background: var(--bg);
  color: var(--muted);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

.section-note {
  font-size: 12px;
  color: var(--accent);
  margin: -6px 0 0;
  font-weight: 600;
}

.form-error {
  color: #c0392b;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  margin: 0;
  min-height: 16px;
}

.okay-btn {
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: block;
}

.okay-btn:active {
  transform: scale(0.98);
}

.okay-btn:disabled {
  background: var(--border);
  color: var(--muted);
  cursor: not-allowed;
}

.done-icon {
  text-align: center;
  font-size: 44px;
  margin-bottom: 6px;
}

#view-done h2 {
  text-align: center;
}

.done-note {
  color: var(--muted);
  font-size: 14px;
  text-align: center;
  margin-bottom: 20px;
}

#start-over-btn {
  width: 100%;
  text-align: center;
}
