:root {
  --bg: oklch(1.000 0 0);
  --surface: oklch(0.964 0 0);
  --fg: oklch(0.182 0 0);
  --muted: oklch(0.573 0 0);
  --border: oklch(0.805 0 0);
  --accent: oklch(0.435 0.080 229);
  --inverse: oklch(0.371 0.053 180);
  --danger: oklch(0.55 0.18 25);
  --ok: oklch(0.55 0.12 155);
  --radius: 2px;
  --shadow-btn: 0 1px 2px color-mix(in oklch, var(--fg) 12%, transparent),
                0 4px 12px color-mix(in oklch, var(--accent) 18%, transparent);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: Archivo, system-ui, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 64px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
  background: color-mix(in oklch, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
}
.topbar-inner {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo {
  font-family: Syne, sans-serif;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
}
.logo span { color: var(--accent); }
.back-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.15s ease;
}
.back-link:hover { color: var(--fg); }
.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
}
.lang-switch button {
  font-family: inherit;
  font-size: inherit;
  font-weight: 600;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 2px;
  line-height: 1;
}
.lang-switch button:hover { color: var(--fg); }
.lang-switch button.is-active { color: var(--accent); }
.lang-switch .sep { color: var(--border); user-select: none; }
.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 24px 72px;
}
.steps {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
  list-style: none;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.steps li {
  display: flex;
  align-items: center;
  gap: 8px;
}
.steps li:not(:last-child)::after {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--border);
  margin-left: 4px;
}
.steps .dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  display: grid;
  place-items: center;
  font-size: 11px;
}
.steps .done .dot {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.steps .current {
  color: var(--fg);
}
.steps .current .dot {
  border-color: var(--accent);
  color: var(--accent);
}
h1 {
  font-family: Syne, sans-serif;
  font-weight: 800;
  font-size: clamp(28px, 4vw, 36px);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 8px;
}
.lead {
  color: var(--muted);
  margin-bottom: 36px;
  max-width: 48ch;
}
.form-card {
  border: 1px solid var(--border);
  background: var(--bg);
  padding: 28px 28px 8px;
}
fieldset {
  border: none;
  margin: 0 0 28px;
  padding: 0;
}
legend {
  font-family: Syne, sans-serif;
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}
.field { margin-bottom: 18px; }
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}
.req { color: var(--accent); }
input, select, textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  font-size: 15px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
textarea { min-height: 96px; resize: vertical; }
input:hover, select:hover, textarea:hover {
  border-color: color-mix(in oklch, var(--fg) 35%, var(--border));
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--accent) 22%, transparent);
}
.field.error input,
.field.error select,
.field.error textarea {
  border-color: var(--danger);
}
.error-text {
  display: none;
  font-size: 12px;
  color: var(--danger);
  margin-top: 6px;
}
.field.error .error-text { display: block; }
.season-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.season-option {
  position: relative;
}
.season-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.season-option label {
  margin: 0;
  min-height: 52px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.season-option input:focus-visible + label {
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--accent) 22%, transparent);
}
.season-option input:checked + label {
  border-color: var(--accent);
  background: color-mix(in oklch, var(--accent) 8%, white);
  color: var(--accent);
}
.hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}
.session-block.is-disabled {
  opacity: 0.55;
}
.session-block.is-disabled select {
  pointer-events: none;
  background: var(--surface);
}
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0 28px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 28px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  transition: background 0.15s ease, transform 0.15s ease;
}
.btn-primary:hover {
  background: color-mix(in oklch, var(--accent) 88%, black);
  transform: translateY(-1px);
}
.btn-ghost {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 8px;
  background: transparent;
  border: none;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s ease;
}
.btn-ghost:hover { color: var(--fg); }
.banner {
  display: none;
  padding: 12px 14px;
  margin-bottom: 20px;
  border: 1px solid var(--danger);
  background: color-mix(in oklch, var(--danger) 8%, white);
  color: var(--danger);
  font-size: 14px;
  font-weight: 500;
}
.banner.show { display: block; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
/* --- account bar --------------------------------------------------- */
.account {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.account-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
}
.account-name {
  font-weight: 600;
  max-width: 14ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.btn-google {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.btn-google:hover { border-color: var(--accent); }
.btn-google:disabled { opacity: 0.55; cursor: progress; }
/* --- consent + submit state ---------------------------------------- */
.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 18px;
}
.consent input {
  width: 18px;
  height: 18px;
  min-height: 0;
  flex: 0 0 auto;
  margin-top: 2px;
  accent-color: var(--accent);
}
.consent label {
  font-size: 13px;
  font-weight: 400;
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}
.btn-primary[aria-busy="true"] { opacity: 0.7; cursor: progress; }
.spinner {
  width: 15px;
  height: 15px;
  margin-right: 8px;
  border: 2px solid color-mix(in oklch, #fff 40%, transparent);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 2s; }
}
.banner.ok-banner {
  border-color: var(--ok);
  background: color-mix(in oklch, var(--ok) 8%, white);
  color: var(--ok);
}
@media (max-width: 640px) {
  .field-row, .season-grid { grid-template-columns: 1fr; }
  .steps { flex-wrap: wrap; }
  .steps li:not(:last-child)::after { display: none; }
  .topbar-inner { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 10px; }
  .topbar { height: auto; }
}

[hidden] { display: none !important; }
button { font-family: inherit; }
.btn-primary:disabled { opacity: 0.7; cursor: progress; }
.topbar-right { flex-wrap: wrap; }
.login-card { padding-bottom: 28px; }
.login-tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.login-tab { padding: 0 0 12px; background: none; border: none; border-bottom: 2px solid transparent; color: var(--muted); font-size: 14px; font-weight: 600; cursor: pointer; }
.login-tab[aria-pressed="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.login-submit, .login-google { width: 100%; min-height: 48px; justify-content: center; }
.login-submit { margin-top: 8px; }
.auth-divider { display: flex; align-items: center; gap: 16px; margin: 24px 0; color: var(--muted); font-size: 12px; }
.auth-divider::before, .auth-divider::after { content: ""; height: 1px; flex: 1; background: var(--border); }
.login-info { padding: 18px; margin-top: 24px; border: 1px solid var(--border); background: var(--surface); font-size: 13px; color: var(--muted); }
.login-info strong { display: block; margin-bottom: 4px; color: var(--fg); font-weight: 600; }
.login-note { margin-top: 12px; font-size: 12px; color: var(--muted); }
@media (max-width: 640px) { .form-card { padding: 20px 18px 8px; } .login-card { padding-bottom: 20px; } .topbar-right { gap: 10px; } .steps { letter-spacing: 0; } }
