:root {
  --beige: #f3efe6;
  --beige-deep: #ebe4d6;
  --beige-line: #ddd4c4;
  --brand: #140b46;
  --yellow: #f5d000;
  --yellow-dark: #d4b400;
  --navy: #1a1464;
  --navy-deep: #140b46;
  --ink: #14121f;
  --muted: #5c5870;
  --line: #e4e1ef;
  --surface: #ffffff;
  --bg: #f4f3f8;
  --danger: #b42318;
  --ok: #067647;
  --radius: 14px;
  --shadow: 0 12px 40px rgba(13, 10, 60, 0.12);
  --font: "Geologica", system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(245, 208, 0, 0.18), transparent 55%),
    radial-gradient(900px 480px at 100% 0%, rgba(26, 20, 100, 0.16), transparent 50%),
    linear-gradient(180deg, #faf9fc 0%, var(--bg) 40%, #eceaf5 100%);
  line-height: 1.5;
}

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

a {
  color: var(--navy);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--yellow);
  color: var(--ink);
  padding: 0.5rem 1rem;
  z-index: 100;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.container {
  width: min(960px, calc(100% - 1.5rem));
  margin-inline: auto;
}

@media (min-width: 640px) {
  .container {
    width: min(960px, calc(100% - 2rem));
  }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--brand);
  border-bottom: 1px solid rgba(245, 208, 0, 0.22);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: #fff;
  min-width: 0;
}

.brand-logo {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.brand-name {
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: clamp(0.78rem, 2.4vw, 0.95rem);
  line-height: 1.2;
  color: #fff;
}

.brand-sub {
  color: var(--yellow);
  font-size: 0.85rem;
  font-weight: 500;
}

.header-actions-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.header-link {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: transparent;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-size: 0.88rem;
  flex-shrink: 0;
}

.header-link:hover {
  border-color: var(--yellow);
  color: var(--yellow);
  background: rgba(245, 208, 0, 0.08);
}

.site-main {
  flex: 1 0 auto;
  width: 100%;
  padding: 1.5rem 0 2rem;
}

@media (min-width: 640px) {
  .site-main {
    padding: 2rem 0 3rem;
  }
}

.site-footer {
  flex-shrink: 0;
  border-top: 1px solid rgba(245, 208, 0, 0.18);
  background: var(--brand);
  padding: 0.95rem 0;
  margin-top: auto;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.85rem 1.25rem;
  flex-wrap: wrap;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.85rem;
}

.footer-club {
  color: rgba(255, 255, 255, 0.82);
}

.footer-powered {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
}

.footer-powered:hover {
  color: var(--yellow);
}

.footer-powered img {
  height: 28px;
  width: auto;
  display: block;
}

@media (max-width: 480px) {
  .footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 0.65rem;
  }

  .footer-powered {
    justify-content: center;
  }
}

.hero {
  text-align: center;
  margin-bottom: 2rem;
  animation: rise 0.55s ease both;
}

.hero-back {
  margin: 0.85rem 0 0;
}

.btn-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--beige-line);
  background: var(--beige);
  color: var(--navy-deep);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.2;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.btn-chip:hover {
  background: #fff;
  border-color: var(--navy);
  color: var(--navy);
}

.btn-chip:active {
  transform: translateY(1px);
}

.hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  color: var(--navy-deep);
}

.hero p {
  margin: 0 auto;
  max-width: 36rem;
  color: var(--muted);
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

@media (max-width: 700px) {
  .choice-grid {
    grid-template-columns: 1fr;
  }

  .brand {
    gap: 0.65rem;
  }

  .brand-logo {
    width: 52px;
    height: 52px;
    padding: 3px;
  }

  .brand-name {
    font-size: 0.72rem;
    letter-spacing: 0.02em;
  }

  .brand-sub {
    font-size: 0.78rem;
  }

  .header-inner {
    padding: 0.55rem 0;
  }

  .footer-powered img {
    height: 24px;
  }

  .choice-card {
    padding: 1.35rem 1.15rem;
  }

  .panel {
    padding: 1.1rem;
    border-radius: 12px;
  }

  .steps {
    gap: 0.4rem;
  }

  .step-pill {
    min-width: 0;
    flex: 1 1 calc(33.33% - 0.4rem);
    padding: 0.45rem 0.4rem;
    font-size: 0.72rem;
    line-height: 1.25;
  }

  .actions {
    flex-direction: column-reverse;
  }

  .actions .btn {
    width: 100%;
  }

  .admin-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }

  .admin-bar-left,
  .admin-bar-right {
    width: 100%;
    justify-content: space-between;
  }

  .admin-bar-right {
    padding-top: 0.55rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
  }

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

  .toolbar-actions {
    width: 100%;
  }

  .toolbar-actions .btn {
    flex: 1;
    justify-content: center;
  }

  .admin-table-desktop {
    display: none;
  }

  .admin-cards {
    display: flex;
  }

  .dl-grid {
    grid-template-columns: 1fr;
    gap: 0.15rem 0;
  }

  .dl-grid dt {
    margin-top: 0.65rem;
    font-size: 0.8rem;
  }

  .dl-grid dt:first-child {
    margin-top: 0;
  }

  .dl-grid dd {
    padding-bottom: 0.35rem;
    border-bottom: 1px solid var(--line);
  }

  .login-wrap {
    margin: 0.75rem auto;
  }

  body.is-admin .panel {
    padding: 1rem;
  }

  .check {
    padding: 0.75rem;
  }

  .check label {
    font-size: 0.9rem;
  }

  table.data th,
  table.data td {
    padding: 0.65rem 0.55rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 380px) {
  .brand-text {
    max-width: 11rem;
  }
}

.choice-card {
  appearance: none;
  border: 2px solid transparent;
  background: var(--surface);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
  padding: 1.75rem 1.5rem;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  animation: rise 0.6s ease both;
}

.choice-card:nth-child(2) {
  animation-delay: 0.08s;
}

.choice-card:hover,
.choice-card:focus-visible {
  transform: translateY(-4px);
  border-color: var(--yellow);
  box-shadow: 0 18px 48px rgba(13, 10, 60, 0.18);
  outline: none;
}

.choice-card .eyebrow {
  color: var(--navy);
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: 0.8rem;
}

.choice-card h2 {
  margin: 0;
  font-size: 1.35rem;
  color: var(--navy-deep);
}

.choice-card .choice-accent {
  color: var(--navy);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-color: var(--yellow);
  text-decoration-thickness: 3px;
  text-underline-offset: 0.18em;
}

.choice-card:hover .choice-accent,
.choice-card:focus-visible .choice-accent {
  text-decoration-color: var(--yellow-dark);
}

.choice-card p {
  margin: 0;
  color: var(--muted);
}

.choice-card .cta {
  margin-top: auto;
  align-self: flex-start;
  background: var(--navy);
  color: #fff;
  font-weight: 600;
  padding: 0.55rem 1rem;
  border-radius: 999px;
}

.panel {
  background: var(--surface);
  border-radius: calc(var(--radius) + 2px);
  box-shadow: var(--shadow);
  padding: clamp(1.25rem, 3vw, 2rem);
  animation: rise 0.45s ease both;
}

.steps {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.step-pill {
  flex: 1;
  min-width: 120px;
  text-align: center;
  padding: 0.55rem 0.75rem;
  border-radius: 999px;
  background: #eeecf6;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.85rem;
}

.step-pill.is-active {
  background: var(--navy);
  color: #fff;
}

.step-pill.is-done {
  background: rgba(245, 208, 0, 0.35);
  color: var(--navy-deep);
}

.form-step {
  display: none;
}

.form-step.is-active {
  display: block;
  animation: rise 0.35s ease both;
}

.section-title {
  margin: 0 0 1rem;
  font-size: 1.15rem;
  color: var(--navy-deep);
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--yellow);
  display: inline-block;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

@media (max-width: 640px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field label {
  font-weight: 600;
  font-size: 0.92rem;
}

.field .hint {
  color: var(--muted);
  font-size: 0.8rem;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="date"],
.field input[type="password"],
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  font: inherit;
  background: #fff;
  color: var(--ink);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid rgba(26, 20, 100, 0.25);
  border-color: var(--navy);
}

.field.is-invalid input,
.field.is-invalid select {
  border-color: var(--danger);
}

.field .error {
  color: var(--danger);
  font-size: 0.82rem;
}

.parent-block {
  margin-top: 1.25rem;
  padding: 1rem;
  border: 1px dashed rgba(26, 20, 100, 0.25);
  border-radius: var(--radius);
  background: #faf9ff;
}

.check {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 0.75rem;
  background: #fff;
}

.check input {
  margin-top: 0.25rem;
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--navy);
  flex-shrink: 0;
}

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

.consent-lead {
  margin: 0 0 1rem;
  color: var(--ink);
  font-size: 1.05rem;
}

.consent-lead strong {
  color: var(--navy);
}

.actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.btn {
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 0.75rem 1.35rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.btn-primary {
  background: var(--yellow);
  color: var(--navy-deep);
}

.btn-primary:hover {
  background: var(--yellow-dark);
}

.btn-secondary {
  background: transparent;
  color: var(--navy);
  border: 1px solid rgba(26, 20, 100, 0.3);
}

.btn-secondary:hover {
  background: #eeecf6;
}

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

.alert {
  padding: 0.85rem 1rem;
  border-radius: 12px;
  margin-bottom: 1rem;
}

.alert-error {
  background: #fef3f2;
  color: var(--danger);
  border: 1px solid #fecdca;
}

.alert-ok {
  background: #ecfdf3;
  color: var(--ok);
  border: 1px solid #abeFC6;
}

.success-card {
  text-align: center;
  padding: 2.5rem 1.5rem;
}

.success-card h1 {
  color: var(--navy-deep);
  margin-top: 0;
}

.admin-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
  padding: 0.7rem 1rem;
  background: var(--navy-deep);
  color: #fff;
  border-radius: 12px;
}

.admin-bar-left,
.admin-bar-right {
  display: flex;
  align-items: center;
  gap: 0.65rem 1rem;
  flex-wrap: wrap;
}

.admin-bar a {
  color: var(--yellow);
  text-decoration: none;
  font-weight: 600;
  margin-right: 0;
  font-size: 0.92rem;
}

.admin-bar .admin-user {
  font-size: 0.85rem;
  opacity: 0.9;
  word-break: break-word;
}

.admin-page-head {
  margin-bottom: 1.1rem;
}

.admin-page-head h1 {
  margin: 0;
  color: var(--navy-deep);
  font-size: clamp(1.25rem, 4vw, 1.75rem);
  line-height: 1.3;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.admin-page-meta {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.admin-back {
  margin: 0 0 0.75rem;
}

.admin-section {
  margin-top: 1.35rem;
}

.admin-section:first-of-type {
  margin-top: 0;
}

.admin-hint {
  color: var(--muted);
  margin-top: 0.75rem;
}

.empty-state {
  color: var(--muted);
  margin: 0.5rem 0 0;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.65rem;
  margin-bottom: 1.1rem;
  align-items: stretch;
}

.toolbar-search,
.toolbar-type {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
  font: inherit;
  width: 100%;
  min-width: 0;
  background: #fff;
}

.toolbar-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.toolbar-actions .btn {
  white-space: nowrap;
}

.table-wrap {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
  -webkit-overflow-scrolling: touch;
}

table.data {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  min-width: 640px;
}

table.data th,
table.data td {
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 0.92rem;
}

table.data th {
  background: #f3f1fa;
  color: var(--navy-deep);
  font-weight: 700;
  white-space: nowrap;
}

table.data tbody tr.is-clickable {
  cursor: pointer;
  transition: background 0.15s ease;
}

table.data tbody tr.is-clickable:hover {
  background: #faf8ff;
}

.admin-cards {
  display: none;
  flex-direction: column;
  gap: 0.65rem;
}

.admin-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  box-shadow: 0 4px 14px rgba(13, 10, 60, 0.05);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.admin-card:hover,
.admin-card:focus-visible {
  border-color: var(--navy);
  outline: none;
}

.admin-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.admin-card-id {
  font-weight: 700;
  color: var(--navy);
  font-size: 0.85rem;
}

.admin-card-name {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--navy-deep);
  margin-bottom: 0.35rem;
  word-break: break-word;
}

.admin-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.admin-card-date {
  margin-top: 0.45rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.badge-minor {
  background: rgba(245, 208, 0, 0.35);
  color: var(--navy-deep);
}

.badge-adult {
  background: rgba(26, 20, 100, 0.12);
  color: var(--navy);
}

.dl-grid {
  display: grid;
  grid-template-columns: minmax(120px, 180px) minmax(0, 1fr);
  gap: 0.5rem 1rem;
}

.dl-grid dt {
  color: var(--muted);
  font-weight: 600;
}

.dl-grid dd {
  margin: 0;
  min-width: 0;
  word-break: break-word;
}

.dd-break {
  overflow-wrap: anywhere;
}

.login-wrap {
  max-width: 420px;
  width: 100%;
  margin: 1.5rem auto;
}

.login-title {
  margin-top: 0;
  color: var(--navy-deep);
}

.login-sub {
  color: var(--muted);
}

.field-spaced {
  margin-bottom: 1rem;
}

.btn-block {
  width: 100%;
}

body.is-admin .container {
  width: min(1100px, calc(100% - 1.5rem));
}

@media (min-width: 640px) {
  body.is-admin .container {
    width: min(1100px, calc(100% - 2rem));
  }
}

.notice-box {
  background: #fff8e1;
  border: 1px solid #f0d98a;
  border-left: 4px solid var(--yellow);
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
  margin: 0 0 1rem;
}

.notice-box p {
  margin: 0;
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.45;
}

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

.slots-wrap.is-invalid {
  outline: 2px solid rgba(180, 35, 24, 0.25);
  outline-offset: 4px;
  border-radius: 12px;
}

.slot-head {
  display: grid;
  grid-template-columns: 1fr 1fr 2.25rem;
  gap: 0.5rem;
  padding: 0 0.15rem 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.slots-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 0.5rem;
}

.slot-row {
  display: grid;
  grid-template-columns: 1fr 1fr 2.25rem;
  gap: 0.5rem;
  align-items: center;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
}

.slot-row .field {
  gap: 0;
}

.slot-row select {
  padding: 0.55rem 0.65rem;
  font-size: 0.92rem;
}

.slot-row .slot-remove {
  appearance: none;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.slot-row .slot-remove:hover {
  border-color: var(--danger);
  color: var(--danger);
  background: #fef3f2;
}

.slots-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.35rem;
}

.slots-actions .btn {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

.slot-list-view {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--ink);
}

.slot-list-view li {
  margin-bottom: 0.35rem;
}

.slot-list-view .slot-num {
  font-weight: 700;
  color: var(--navy);
  margin-right: 0.25rem;
}

@media (max-width: 420px) {
  .slot-head,
  .slot-row {
    grid-template-columns: 1fr 1fr 1.9rem;
    gap: 0.35rem;
  }

  .slot-row select {
    padding: 0.5rem 0.4rem;
    font-size: 0.82rem;
  }

  .slot-row .slot-remove {
    width: 1.9rem;
    height: 1.9rem;
    font-size: 1.1rem;
  }
}

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
