:root {
  --navy: #0f2744;
  --navy-soft: #1c3d66;
  --gold: #c4a35a;
  --bg: #f4f5f7;
  --card: #ffffff;
  --ink: #12171d;
  --muted: #6b7280;
  --line: #e7e9ee;
  --red: #c24141;
  --radius: 12px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font: "Plus Jakarta Sans", "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  padding-bottom: calc(88px + var(--safe-bottom));
}

img {
  max-width: 100%;
  height: auto;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.ribbon {
  height: 3px;
  background: linear-gradient(90deg, #7b1fa2, #f59e0b, #e53935, #6a1b9a);
}

.top {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 18px 20px;
}

.top-inner {
  width: min(640px, 100%);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}

.logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 14px;
  background: #fff;
}

.brand p {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--gold);
}

.brand h1 {
  margin: 2px 0 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--navy);
}

.wrap {
  width: min(640px, calc(100% - 24px));
  margin: 20px auto 0;
}

.panel {
  background: var(--card);
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: 0 8px 30px rgba(15, 39, 68, 0.05);
  padding: 22px 18px 24px;
}

.steps {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  margin: 0 0 22px;
  padding: 0;
}

.steps-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
}

.steps-item span {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  font-size: 0.72rem;
}

.steps-item.is-active {
  color: var(--navy);
}

.steps-item.is-active span {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.steps-item.is-done span {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--navy);
}

h2 {
  margin: 0 0 18px;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
  color: var(--navy);
}

.lead {
  margin: -10px 0 16px;
  color: var(--muted);
  font-size: 0.9rem;
}

.field {
  margin-bottom: 14px;
}

.field label,
.field .label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
}

abbr {
  text-decoration: none;
  color: var(--red);
}

.optional {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.75rem;
}

input[type="text"],
input[type="tel"],
input[type="email"],
input[type="search"],
input[type="password"],
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 13px;
  font-size: 16px;
  color: var(--ink);
  background: #fff;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

textarea {
  resize: vertical;
  min-height: 88px;
}

input:focus,
select:focus,
textarea:focus,
.combo-trigger:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(15, 39, 68, 0.12);
}

.select-wrap {
  position: relative;
}

.select-wrap::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--navy);
  border-bottom: 1.5px solid var(--navy);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

select {
  appearance: none;
  padding-right: 38px;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.segmented-opt {
  cursor: pointer;
}

.segmented-opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented-opt span {
  display: block;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 8px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--navy);
  background: #fff;
}

.segmented-opt input:checked + span {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.grid-2 {
  display: grid;
  gap: 0 12px;
}

.combo-trigger {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 13px;
  background: #fff;
  color: var(--ink);
  font-size: 16px;
  cursor: pointer;
}

.combo-trigger svg {
  width: 16px;
  height: 16px;
  color: var(--muted);
}

.combo-placeholder {
  color: #9aa1ad;
}

.combo-trigger.has-value #cityTriggerText {
  color: var(--ink);
}

.error {
  margin: 6px 0 0;
  color: var(--red);
  font-size: 0.78rem;
}

.form-alert {
  margin: 12px 16px 0;
  padding: 10px 12px;
  background: #fef2f2;
  border-radius: 10px;
}

.field.has-error input,
.field.has-error select,
.field.has-error .combo-trigger {
  border-color: var(--red);
}

.full-pass {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 12px 14px;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  margin-bottom: 14px;
}

.full-pass.is-on {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.program {
  display: grid;
  gap: 10px;
}

.day-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.day-card.is-active {
  border-color: var(--navy);
}

.day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px 4px;
}

.day-head h4 {
  margin: 0;
  font-size: 0.92rem;
  color: var(--navy);
  line-height: 1.25;
}

.day-head p {
  margin: 2px 0 0;
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 500;
}

.day-all {
  border: 0;
  background: transparent;
  color: var(--navy);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
}

.sessions {
  padding: 4px 8px 8px;
}

.session {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
  border-radius: 8px;
  cursor: pointer;
}

.session > span:first-of-type {
  flex: 1;
  min-width: 0;
}

.session-time {
  margin-left: auto;
  flex-shrink: 0;
  color: var(--navy);
  font-size: 0.85rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.session:hover,
.session:has(input:checked) {
  background: #f6f7fa;
}

.session input {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 1.5px solid #c5cad3;
  border-radius: 5px;
  margin: 0;
  flex-shrink: 0;
  background: #fff;
  display: grid;
  place-items: center;
}

.session input:checked {
  background: var(--navy);
  border-color: var(--navy);
}

.session input:checked::after {
  content: "";
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-0.5px, -1px);
}

.recap {
  background: #f7f8fa;
  border-radius: 12px;
  padding: 4px 14px 14px;
  margin-bottom: 16px;
}

.recap h4 {
  margin: 12px 0 6px;
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.recap dl {
  margin: 0;
}

.recap div {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}

.recap dt {
  color: var(--muted);
  font-size: 0.82rem;
}

.recap dd {
  margin: 0;
  font-weight: 600;
}

.recap ul {
  margin: 0;
  padding-left: 16px;
}

.counter {
  margin: 4px 0 0;
  text-align: right;
  color: var(--muted);
  font-size: 0.72rem;
}

.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  line-height: 1.45;
  font-size: 0.84rem;
  cursor: pointer;
}

.consent input {
  margin-top: 3px;
  accent-color: var(--navy);
  flex-shrink: 0;
}

.nav-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  gap: 8px;
  padding: 12px 16px calc(12px + var(--safe-bottom));
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  z-index: 20;
}

.btn {
  flex: 1;
  min-height: 48px;
  border-radius: 12px;
  border: 0;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
}

.btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

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

.btn-primary:hover {
  background: var(--navy-soft);
}

.btn-ghost {
  background: #fff;
  color: var(--navy);
  border: 1px solid var(--line);
}

html.overlay-open,
html.overlay-open body {
  overflow: hidden;
  height: 100%;
}

.city-sheet {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.city-sheet[hidden] {
  display: none !important;
}

.city-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 39, 68, 0.45);
}

.city-sheet-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-height: min(70dvh, 580px);
  background: #fff;
  border-radius: 20px 20px 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 -12px 40px rgba(15, 39, 68, 0.16);
}

.city-sheet-panel.is-compact {
  max-height: min(62dvh, 480px);
}

.city-sheet-panel::before {
  content: "";
  display: block;
  width: 36px;
  height: 4px;
  margin: 10px auto 0;
  border-radius: 999px;
  background: #d5dae3;
  flex-shrink: 0;
}

.city-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 20px 4px;
}

.city-sheet-head h3 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--navy);
}

.icon-btn {
  border: 0;
  background: var(--bg);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  color: var(--navy);
  flex-shrink: 0;
}

.city-search {
  padding: 8px 20px 16px;
}

.city-search input {
  width: 100%;
  min-height: 48px;
  font-size: 16px;
}

.city-list {
  list-style: none;
  margin: 0;
  padding: 4px 12px calc(20px + var(--safe-bottom));
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.city-sheet-panel:has(.picker-foot) .city-list {
  padding-bottom: 8px;
}

.city-list li button {
  width: 100%;
  min-height: 52px;
  text-align: left;
  border: 0;
  background: #f7f8fb;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 1.02rem;
  line-height: 1.35;
  cursor: pointer;
  color: var(--ink);
  font-weight: 500;
}

.city-list li button:hover,
.city-list li button[aria-selected="true"] {
  background: #eef2f7;
}

.city-preferred {
  margin: 0;
}

.city-preferred button,
.city-preferred button strong {
  font-weight: 700;
}

.city-other {
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.city-other button {
  background: #fff;
  color: var(--navy);
  font-weight: 700;
  box-shadow: inset 0 0 0 1px var(--line);
}

.city-empty {
  padding: 20px 16px;
  text-align: center;
  color: var(--muted);
}

.success {
  text-align: center;
  padding: 36px 20px;
}

.success-badge {
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--navy);
  color: #fff;
  font-size: 1.4rem;
}

.success-lead {
  color: var(--muted);
  margin: 0 0 18px;
  line-height: 1.5;
}

.reg-id {
  display: inline-block;
  margin: 0 0 10px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #f7f8fa;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--navy);
  font-size: 0.85rem;
}

.success-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-gold {
  background: var(--gold);
  color: var(--navy);
}

.btn-gold:hover {
  filter: brightness(1.06);
}

.btn-pulse {
  animation: pulseGlow 1.5s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(15, 39, 68, 0.35);
  }
  50% {
    transform: scale(1.035);
    box-shadow: 0 0 0 12px rgba(15, 39, 68, 0);
  }
}

.intro {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 24px 72px;
  background:
    radial-gradient(circle at 50% 30%, rgba(196, 163, 90, 0.18), transparent 42%),
    #0f2744;
  color: #fff;
  text-align: center;
}

.intro.is-leaving {
  animation: introOut 0.4s ease forwards;
  pointer-events: none;
}

@keyframes introOut {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

.intro-inner {
  width: min(420px, 100%);
}

.intro-logo {
  width: 140px;
  height: 140px;
  object-fit: contain;
  background: #fff;
  border-radius: 28px;
  padding: 10px;
  margin-bottom: 22px;
  animation: introLogo 1s ease both;
}

@keyframes introLogo {
  from {
    opacity: 0;
    transform: scale(0.82) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.intro-kicker {
  margin: 0;
  letter-spacing: 0.28em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gold);
  animation: fadeUp 0.7s 0.25s ease both;
}

.intro h1 {
  margin: 8px 0 0;
  font-size: clamp(2rem, 8vw, 2.6rem);
  letter-spacing: -0.04em;
  animation: fadeUp 0.7s 0.4s ease both;
}

.intro-tagline {
  margin: 12px 0 28px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.5;
  animation: fadeUp 0.7s 0.55s ease both;
}

.intro .btn {
  width: 100%;
  animation: fadeUp 0.7s 0.7s ease both;
}

.intro-edit {
  margin-top: 10px;
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.intro-edit:hover {
  background: rgba(255, 255, 255, 0.08);
}

#introLookup {
  text-align: left;
}

.intro-lookup-lead {
  margin: 0 0 16px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.88rem;
  line-height: 1.45;
  text-align: center;
}

#introLookup input {
  width: 100%;
  margin-bottom: 10px;
  background: #fff;
  color: var(--navy);
}

.intro-lookup-error {
  margin: 0 0 10px;
}

.edit-banner {
  margin: 0 16px 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f4f0e4;
  color: var(--navy);
  font-size: 0.82rem;
  font-weight: 600;
}

.intro-admin {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 22px;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.28);
  text-decoration: none;
  font-weight: 600;
}

.intro-admin:hover,
.intro-admin:focus {
  color: rgba(255, 255, 255, 0.5);
}

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

body.on-intro {
  overflow: hidden;
}

body.on-intro .nav-bar {
  display: none !important;
}

.site-footer {
  width: min(640px, calc(100% - 24px));
  margin: 18px auto 8px;
  text-align: center;
}

.site-footer a {
  color: var(--muted);
  font-size: 0.78rem;
  text-decoration: none;
}

body.page-admin {
  padding-bottom: 28px;
}

.admin-table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

@media (min-width: 720px) {
  body {
    padding-bottom: 32px;
  }

  .top-inner {
    flex-direction: row;
    text-align: left;
    gap: 14px;
  }

  .logo {
    width: 72px;
    height: 72px;
  }

  .panel {
    padding: 28px 32px 32px;
  }

  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }

  .nav-bar {
    position: static;
    background: transparent;
    border: 0;
    padding: 18px 0 0;
  }

  .city-sheet {
    align-items: center;
    padding: 24px;
  }

  .city-sheet-panel {
    width: min(420px, 100%);
    max-height: min(64vh, 560px);
    border-radius: 16px;
  }

  .city-sheet-panel::before {
    display: none;
  }

  .city-list {
    padding-bottom: 16px;
  }

  .success-actions {
    flex-direction: row;
  }

  .recap div {
    grid-template-columns: 140px 1fr;
  }
}
