:root {
  --primary: #2f766d;
  --primary-dark: #235e57;
  --accent: #dceee8;
  --surface: rgba(255, 255, 255, 0.91);
  --text: #18312e;
  --muted: #5f716e;
  --border: rgba(47, 118, 109, 0.22);
  --danger: #a83232;
  --shadow: 0 24px 70px rgba(24, 49, 46, 0.18);
  --radius-large: 28px;
  --radius-medium: 16px;
  --background-image: none;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #e9f3f0;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family:
    "Hiragino Sans",
    "Yu Gothic",
    "Meiryo",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  line-height: 1.7;
}

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

button,
select,
label,
input[type="checkbox"] {
  cursor: pointer;
}

.page-background,
.page-overlay {
  position: fixed;
  inset: 0;
}

.page-background {
  z-index: -2;
  background:
    var(--background-image),
    radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.9), transparent 36%),
    linear-gradient(145deg, #dceee8 0%, #eff7f3 48%, #cfe4df 100%);
  background-position: center;
  background-size: cover;
}

.page-overlay {
  z-index: -1;
  background: linear-gradient(
    180deg,
    rgba(239, 247, 243, 0.18),
    rgba(239, 247, 243, 0.5)
  );
}

.page-shell {
  width: min(100% - 28px, 760px);
  margin: 0 auto;
  padding: 48px 0;
}

.form-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius-large);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.hero {
  position: relative;
  min-height: 220px;
  display: grid;
  align-items: end;
  padding: 40px;
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.54), transparent 28%),
    linear-gradient(135deg, var(--accent), rgba(255, 255, 255, 0.72));
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-image:not([hidden]) + .hero-copy {
  padding: 24px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(10px);
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: fit-content;
  max-width: 100%;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}

h1,
h2,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 7vw, 3.65rem);
  line-height: 1.1;
  letter-spacing: 0.02em;
}

.subtitle {
  margin: 12px 0 0;
  color: var(--muted);
  font-weight: 600;
}

.event-info {
  margin: 32px 40px 0;
  padding: 18px 20px;
  border-left: 4px solid var(--primary);
  border-radius: 0 12px 12px 0;
  background: rgba(220, 238, 232, 0.56);
  white-space: pre-line;
}

form {
  padding: 38px 40px 42px;
}

.field {
  margin-bottom: 25px;
}

.field-row {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
  gap: 18px;
}

label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-weight: 700;
}

.required,
.optional {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 0.68rem;
}

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

.optional {
  color: var(--muted);
  background: rgba(95, 113, 110, 0.1);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--text);
  outline: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

input,
select {
  min-height: 52px;
  padding: 0 15px;
}

textarea {
  min-height: 116px;
  padding: 13px 15px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(47, 118, 109, 0.12);
}

[aria-invalid="true"] {
  border-color: var(--danger);
}

.field-help,
.field-meta,
.submit-note {
  margin: 7px 2px 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.field-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.field-meta p {
  margin: 0;
}

.field-error {
  min-height: 1.3em;
  margin: 5px 2px 0;
  color: var(--danger);
  font-size: 0.8rem;
  font-weight: 600;
}

.price-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 3px 0 27px;
  padding: 18px 20px;
  border-radius: var(--radius-medium);
  background: linear-gradient(135deg, var(--accent), rgba(255, 255, 255, 0.88));
}

.price-panel span {
  color: var(--muted);
  font-weight: 700;
}

.price-panel strong {
  font-size: clamp(1.45rem, 5vw, 2rem);
  line-height: 1;
}

.consent {
  align-items: flex-start;
  margin: 0;
  font-size: 0.9rem;
  font-weight: 500;
}

.consent input {
  flex: 0 0 auto;
  width: 19px;
  min-height: auto;
  height: 19px;
  margin-top: 4px;
  accent-color: var(--primary);
}

.form-message {
  margin: 20px 0 0;
  padding: 14px 16px;
  border: 1px solid rgba(168, 50, 50, 0.22);
  border-radius: 12px;
  color: var(--danger);
  background: rgba(168, 50, 50, 0.07);
  font-size: 0.9rem;
  font-weight: 600;
}

.submit-button,
.secondary-button {
  width: 100%;
  min-height: 56px;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  transition:
    transform 140ms ease,
    opacity 140ms ease,
    box-shadow 140ms ease;
}

.submit-button {
  position: relative;
  margin-top: 28px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 12px 26px rgba(47, 118, 109, 0.26);
}

.submit-button:hover:not(:disabled),
.secondary-button:hover {
  transform: translateY(-1px);
}

.submit-button:active:not(:disabled),
.secondary-button:active {
  transform: translateY(0);
}

.submit-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.spinner {
  display: none;
  width: 21px;
  height: 21px;
  margin: auto;
  border: 3px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

.submit-button.is-loading .button-label {
  display: none;
}

.submit-button.is-loading .spinner {
  display: block;
}

.submit-note {
  text-align: center;
}

.honeypot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.success-view {
  padding: 52px 40px;
  text-align: center;
}

.success-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin: 0 auto 24px;
  border-radius: 50%;
  color: #fff;
  background: var(--primary);
  font-size: 2rem;
  font-weight: 900;
}

.success-view h2 {
  margin: 0;
  font-size: clamp(1.5rem, 5vw, 2.1rem);
}

.success-view > p:not(.eyebrow) {
  margin: 12px auto 0;
  color: var(--muted);
}

.reservation-summary {
  margin: 30px 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  text-align: left;
}

.reservation-summary div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  padding: 15px 18px;
  background: rgba(255, 255, 255, 0.66);
}

.reservation-summary div + div {
  border-top: 1px solid var(--border);
}

.reservation-summary dt {
  color: var(--muted);
  font-weight: 600;
}

.reservation-summary dd {
  margin: 0;
  font-weight: 800;
}

.secondary-button {
  color: var(--primary-dark);
  background: var(--accent);
}

footer {
  padding: 20px 30px 25px;
  color: var(--muted);
  text-align: center;
  font-size: 0.75rem;
}

footer p {
  margin: 0;
}

[hidden] {
  display: none !important;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 620px) {
  .page-shell {
    width: min(100% - 18px, 760px);
    padding: 18px 0;
  }

  .form-card {
    border-radius: 22px;
  }

  .hero {
    min-height: 185px;
    padding: 28px 24px;
  }

  .hero-image:not([hidden]) + .hero-copy {
    padding: 18px;
  }

  .event-info {
    margin: 24px 22px 0;
  }

  form,
  .success-view {
    padding: 30px 22px 34px;
  }

  .field-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
