:root {
  --bg: #f3f5f7;
  --surface: #ffffff;
  --surface-soft: #f9fbff;
  --text: #0f1720;
  --muted: #556070;
  --primary: #0057d8;
  --primary-strong: #003f9b;
  --accent: #0ea5a4;
  --success-bg: #e8f9ef;
  --success-text: #1d6c3f;
  --error-bg: #ffecec;
  --error-text: #9a2222;
  --border: #d8dfe7;
  --radius-lg: 18px;
  --radius-md: 12px;
  --shadow-soft: 0 12px 32px rgba(8, 20, 35, 0.08);
  --shadow-hover: 0 16px 42px rgba(0, 42, 110, 0.16);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", "Helvetica Neue", sans-serif;
  background: radial-gradient(circle at 90% -10%, #dbeafe 0%, transparent 38%),
              radial-gradient(circle at -20% 20%, #dff7f6 0%, transparent 32%),
              var(--bg);
  color: var(--text);
}

.page {
  min-height: 100vh;
  padding-bottom: 48px;
}

.container {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  padding: 56px 16px 34px;
}

.hero-inner {
  width: min(1080px, 100%);
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--accent);
  font-size: 12px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.1;
}

.hero-copy {
  max-width: 740px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.notice {
  margin: 0 auto 24px;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  border: 1px solid transparent;
  font-weight: 600;
}

.notice.success {
  background: var(--success-bg);
  color: var(--success-text);
  border-color: #b5e8c8;
}

.notice.error {
  background: var(--error-bg);
  color: var(--error-text);
  border-color: #ffd0d0;
}

.selector h2 {
  margin: 0 0 20px;
  font-size: 28px;
}

.club-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
}

.club-card {
  background: linear-gradient(165deg, #ffffff 0%, #f3f9ff 100%);
  border: 1px solid #c7defd;
  border-radius: var(--radius-lg);
  padding: 18px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.club-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: #8ab7f8;
}

.club-card img {
  width: 100%;
  height: 120px;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #e4ebf3;
}

.club-card h3 {
  margin: 14px 0 4px;
  font-size: 20px;
}

.club-card p {
  margin: 0;
  color: var(--muted);
}

.form-wrap {
  margin-top: 8px;
}

.selected-club {
  display: flex;
  gap: 18px;
  align-items: center;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  padding: 16px;
  margin-bottom: 18px;
}

.selected-club img {
  width: 130px;
  height: 70px;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid #e5ebf1;
  background: #fff;
}

.selected-club h2 {
  margin: 0 0 6px;
}

.selected-club p {
  margin: 0 0 8px;
  color: var(--muted);
}

.back-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.back-link:hover {
  color: var(--primary-strong);
}

.card-form {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  padding: 22px;
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 8px;
}

.field-grid {
  display: grid;
  gap: 12px;
}

.field-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

label,
.legend {
  font-size: 14px;
  font-weight: 700;
  color: #223145;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
select {
  width: 100%;
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid #cfd8e2;
  background: var(--surface-soft);
  color: var(--text);
  padding: 10px 12px;
  font-size: 15px;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
select:focus {
  outline: 2px solid #b9d5ff;
  border-color: #9cc4ff;
}

.radio-row,
.check-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.radio-row label,
.check-row label,
.consent label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: var(--text);
}

.hidden {
  display: none;
}

.preview-container {
  border: 1px dashed #93b9ef;
  background: linear-gradient(180deg, #f8fbff 0%, #edf5ff 100%);
  border-radius: var(--radius-md);
  min-height: 220px;
  padding: 12px;
  display: grid;
  place-items: center;
}

.preview-container.hidden {
  display: none;
}

#video,
#canvas,
#previewImage {
  width: min(100%, 460px);
  border-radius: 10px;
  display: none;
  background: #ffffff;
}

#filename {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  display: none;
}

.photo-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

#captureButton,
#fileInputLabel,
.submit {
  border: 0;
  border-radius: 10px;
  padding: 11px 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

#captureButton,
.submit {
  background: linear-gradient(130deg, var(--primary) 0%, #1973ff 100%);
  color: #fff;
}

#fileInputLabel {
  background: #e7eef7;
  color: #19314f;
}

#captureButton:hover,
#fileInputLabel:hover,
.submit:hover {
  transform: translateY(-1px);
  opacity: 0.95;
}

#fileInput {
  display: none;
}

.submit {
  margin-top: 4px;
  min-height: 48px;
  font-size: 16px;
}

.club-notice {
  border: 1px solid #dbe5f0;
  border-radius: 12px;
  padding: 14px;
  background: #f8fbff;
}

.notice-text {
  color: #25374f;
  line-height: 1.55;
  font-size: 14px;
}

@media (max-width: 900px) {
  .field-grid.two,
  .field-grid.three {
    grid-template-columns: 1fr;
  }

  .selected-club {
    flex-direction: column;
    align-items: flex-start;
  }

  .selected-club img {
    width: 100%;
    height: 96px;
  }
}
