:root {
  --bg: #f6f5f2;
  --card-bg: #ffffff;
  --border: #e6e2da;
  --label: #2b2620;
  --secondary: #8a8175;
  --accent: #b8763e;
  --accent-dark: #96602f;
  --error: #b3261e;
  --error-tint: #ffe8e6;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--label);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  display: flex;
  justify-content: center;
  padding: 32px 16px 64px;
}
.card {
  width: 100%;
  max-width: 480px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
h1 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.subtitle {
  font-size: 14px;
  color: var(--secondary);
  margin: 0 0 16px;
  line-height: 1.5;
}
h2.section {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--secondary);
  margin: 18px 0 4px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
form > h2.section:first-child { border-top: none; padding-top: 0; margin-top: 0; }

.welcome-back { margin-bottom: 20px; }
label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin: 16px 0 6px;
}
label .optional {
  font-weight: 400;
  color: var(--secondary);
}
select, input, textarea {
  width: 100%;
  padding: 11px 12px;
  font-size: 15px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--label);
  font-family: inherit;
}
select, input:not([type="checkbox"]) {
  height: 44px;
}
select {
  appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a8175' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
}
select:disabled, input:disabled {
  background: #f2f0eb;
  color: var(--secondary);
}
input[type="date"] {
  -webkit-appearance: none;
  appearance: none;
  line-height: 20px;
}
select:focus, input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(184, 118, 62, 0.15);
}
textarea { resize: vertical; min-height: 64px; }
.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}
.retreat-meta {
  font-size: 13px;
  color: var(--secondary);
  margin-top: 6px;
  min-height: 18px;
}
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--secondary);
}
.checkbox-row input { width: auto; }

button {
  width: 100%;
  padding: 13px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease;
}
button.primary { color: #fff; background: var(--accent); margin-top: 28px; }
button.primary:hover:not(:disabled) { background: var(--accent-dark); }
button:disabled { opacity: 0.55; cursor: default; }

.link-btn {
  display: inline-block;
  width: auto;
  padding: 0;
  background: none;
  color: var(--accent);
  font-weight: 600;
  font-size: 13.5px;
  text-decoration: none;
}
.link-btn:hover { text-decoration: underline; }

.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #fff;
  color: var(--label);
  border: 1px solid var(--border) !important;
  font-weight: 600;
}
.google-btn:hover:not(:disabled) { background: #faf9f6; }
.google-btn svg { width: 18px; height: 18px; }

.signed-in-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f2f0eb;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13.5px;
  margin-bottom: 20px;
}
.signed-in-row .email { font-weight: 600; color: var(--label); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.signed-in-row button {
  width: auto;
  padding: 4px 10px;
  font-size: 12.5px;
  font-weight: 600;
  background: transparent;
  color: var(--secondary);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.gate {
  text-align: center;
  padding: 8px 0 4px;
}
.gate p { font-size: 14px; color: var(--secondary); margin: 0 0 18px; line-height: 1.5; }

fieldset { border: none; padding: 0; margin: 0; }
fieldset[disabled] { opacity: 0.45; pointer-events: none; }

.error-banner {
  display: none;
  margin-top: 16px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--error-tint);
  color: var(--error);
  font-size: 13.5px;
  line-height: 1.4;
}
.error-banner.visible { display: block; }

.success { display: none; text-align: center; padding: 12px 0 4px; }
.success.visible { display: block; }
.success .icon {
  width: 48px; height: 48px; margin: 0 auto 16px; border-radius: 50%;
  background: #e3f5e7; color: #1e8e3e; display: flex; align-items: center; justify-content: center; font-size: 26px;
}
.success h2.title { font-size: 19px; margin: 0 0 8px; border: none; text-transform: none; letter-spacing: normal; padding: 0; color: var(--label); }
.success p { font-size: 14px; color: var(--secondary); line-height: 1.5; margin: 0; }

.hidden { display: none !important; }
