:root {
  --porcelain: #F4F5F5;
  --dusty-teal: #3E6060;
  --blue-mist: #8DACB7;
  --ink: #0B0B0B;
  --stone: #CEBFB2;
  --danger: #8B3A3A;
  --radius: 14px;
  --shadow: 0 8px 28px rgba(11, 11, 11, 0.08);
  font-size: 18px;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--porcelain);
  color: var(--ink);
  font-family: "Lato", system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  overscroll-behavior: none;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

input, textarea, select, button, label {
  -webkit-user-select: text;
  user-select: text;
  font: inherit;
}

.header {
  display: flex;
  justify-content: center;
  padding: 1.25rem 1rem 0.5rem;
}

.logo-wrap img {
  height: 56px;
  width: auto;
  display: block;
  pointer-events: none;
}

.main {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 0.5rem 1.25rem 2rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.screen {
  width: min(560px, 100%);
  background: #fff;
  border: 1px solid var(--blue-mist);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem 1.5rem;
}

.screen h1, .screen h2 {
  font-family: "Poppins", "Lato", sans-serif;
  font-weight: 700;
  margin: 0 0 0.75rem;
  color: var(--dusty-teal);
  font-size: 1.55rem;
  line-height: 1.25;
}

.screen p {
  margin: 0 0 1rem;
  line-height: 1.45;
}

.field {
  margin-bottom: 1rem;
}

.field label.lbl {
  display: block;
  font-family: "Poppins", "Lato", sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
  color: var(--dusty-teal);
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field select {
  width: 100%;
  padding: 0.85rem 0.9rem;
  border: 1.5px solid var(--blue-mist);
  border-radius: 10px;
  background: var(--porcelain);
  color: var(--ink);
  font-size: 1.05rem;
  outline: none;
}

.field input:focus,
.field select:focus {
  border-color: var(--dusty-teal);
  box-shadow: 0 0 0 3px rgba(62, 96, 96, 0.18);
}

.check {
  min-height: 48px;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin: 1rem 0;
  padding: 0.85rem 0.9rem;
  border: 1.5px solid var(--blue-mist);
  border-radius: 10px;
  background: #fff;
}

.check input {
  width: 1.35rem;
  height: 1.35rem;
  margin-top: 0.1rem;
  flex-shrink: 0;
  accent-color: var(--dusty-teal);
}

.check label {
  line-height: 1.4;
  font-size: 0.95rem;
}

.privacy {
  margin-top: 1rem;
  font-size: 0.8rem;
  line-height: 1.4;
  color: #333;
}

.error {
  color: var(--danger);
  font-size: 0.9rem;
  margin: 0.5rem 0 0;
  min-height: 1.2em;
}

.btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.95rem 1.1rem;
  border: none;
  border-radius: 999px;
  background: var(--dusty-teal);
  color: #fff;
  font-family: "Poppins", "Lato", sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  cursor: pointer;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-ghost {
  background: transparent;
  color: var(--dusty-teal);
  border: 1.5px solid var(--blue-mist);
}

.btn-danger {
  background: var(--danger);
}

.hidden { display: none !important; }

.staff {
  position: fixed;
  inset: 0;
  background: rgba(11, 11, 11, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 1rem;
}

.staff[hidden] { display: none !important; }

.staff-card {
  width: min(420px, 100%);
  background: #fff;
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid var(--blue-mist);
}

.staff-card h2 {
  font-family: "Poppins", sans-serif;
  color: var(--dusty-teal);
  margin: 0 0 0.5rem;
}

.staff-note { font-size: 0.85rem; color: #444; }

.staff-stats {
  display: grid;
  gap: 0.5rem;
  margin: 1rem 0;
  font-size: 1.05rem;
}

.staff-actions .btn { margin-top: 0.5rem; }

.accent-bar {
  height: 4px;
  width: 64px;
  background: var(--stone);
  border-radius: 2px;
  margin-bottom: 1rem;
}

.screen[data-screen="form"] {
  margin-top: 0;
  margin-bottom: 2rem;
  /* leave room so Submit stays above iPad keyboard when scrolled */
  padding-bottom: 1.5rem;
}

.screen[data-screen="form"] #btn-submit {
  position: sticky;
  bottom: 0.25rem;
  z-index: 2;
  box-shadow: 0 -8px 16px rgba(244, 245, 245, 0.9);
}

.header {
  flex-shrink: 0;
}

.field input[type="password"] {
  width: 100%;
  padding: 0.85rem 0.9rem;
  border: 1.5px solid var(--blue-mist);
  border-radius: 10px;
  background: var(--porcelain);
  color: var(--ink);
  font-size: 1.05rem;
  outline: none;
  letter-spacing: 0.2em;
  margin-bottom: 0.75rem;
}

.staff-deadline {
  margin: 0.75rem 0 0;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  border: 1.5px solid var(--blue-mist);
  background: #fff8e8;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
}
.staff-deadline.is-overdue {
  border-color: var(--danger);
  background: #f8e8e8;
  color: var(--danger);
}

.form-section {
  margin: 1rem 0;
  padding: 0.9rem 0.95rem;
  border: 1.5px solid var(--blue-mist);
  border-radius: 12px;
  background: #fff;
}
.form-section-title {
  font-family: "Poppins", "Lato", sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--dusty-teal);
  margin: 0 0 0.35rem;
}
.form-section-helper {
  margin: 0 0 0.85rem;
  font-size: 0.88rem;
  line-height: 1.4;
  color: #444;
}
.form-section.is-disabled {
  opacity: 0.45;
  background: #eef1f1;
  pointer-events: none;
}
.form-section.is-disabled input,
.form-section.is-disabled select {
  background: #e4e8e8;
}
.adult-fields.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}
.adult-fields.is-disabled input {
  background: #e4e8e8;
}
.staff-preview-banner {
  margin: 0.5rem 0 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  border: 1.5px dashed var(--dusty-teal);
  background: #eef6f6;
  color: var(--dusty-teal);
  font-weight: 600;
  font-size: 0.9rem;
}
