:root {
  --form-green: #78aa2b;
  --form-green-dark: #28674e;
  --form-green-soft: #eef7e2;
  --form-orange: #efa72d;
  --form-blue: #62a8c6;
  --form-ink: #3b2c25;
  --form-line: #c9d9a9;
}

.event-application-page {
  background:
    radial-gradient(circle at 8% 13%, rgba(151, 193, 71, .11), transparent 16rem),
    radial-gradient(circle at 92% 18%, rgba(239, 167, 45, .09), transparent 18rem),
    #fffef9;
}

.application-hero {
  overflow: hidden;
  padding: 48px 0 36px;
  background: linear-gradient(180deg, #fff 0%, #fffef8 100%);
  border-bottom: 1px solid #e5ebdd;
}

.application-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr);
  align-items: center;
  gap: 38px;
}

.application-hero-copy .breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 0 32px;
  padding: 0;
  color: var(--muted);
  font-size: .76rem;
  list-style: none;
}

.application-hero-copy .breadcrumb li {
  display: inline-flex;
  align-items: center;
}

.application-hero-copy .breadcrumb li:not(:last-child)::after {
  margin-left: 7px;
  color: #9baa91;
  content: "›";
}

.application-hero-copy .breadcrumb a {
  color: var(--form-green-dark);
  text-decoration: none;
}

.application-hero-copy .breadcrumb a:hover,
.application-hero-copy .breadcrumb a:focus-visible {
  color: var(--orange);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.application-catch {
  display: inline-block;
  margin: 0 0 12px;
  padding: 0 18px 6px;
  color: var(--form-green-dark);
  border-bottom: 2px dotted #afc77b;
  font-weight: 850;
  letter-spacing: .08em;
}

.application-hero h1 {
  margin: 0 0 18px;
  color: var(--form-ink);
  font-size: clamp(2rem, 5vw, 3.5rem);
  letter-spacing: .06em;
}

.application-hero-copy > p:last-child {
  max-width: 660px;
  margin: 0;
  color: var(--muted);
  line-height: 1.9;
}

.application-illustration {
  width: 100%;
  max-height: 270px;
}

.illustration-leaves circle { fill: #b7d950; }
.illustration-leaves rect { fill: #8b6038; }
.illustration-leaves path { fill: none; stroke: #8b6038; stroke-width: 6; stroke-linecap: round; }
.illustration-tent path:first-child { fill: #f4a64a; stroke: #df8730; stroke-width: 3; }
.illustration-tent path:nth-child(2) { fill: #fff7e8; stroke: #df8730; stroke-width: 3; }
.illustration-tent path:last-child { fill: none; stroke: #df8730; stroke-width: 3; }
.illustration-family circle { fill: #ffd5b1; stroke: #654436; stroke-width: 3; }
.illustration-family path { fill: #8ebc3c; stroke: #654436; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.illustration-family path:nth-of-type(2) { fill: #f1b83e; }
.illustration-family path:nth-of-type(3) { fill: #ef8d44; }
.illustration-family path:nth-of-type(4) { fill: #d8e75e; }
.illustration-family path:last-child { fill: none; }
.illustration-ground path { fill: none; stroke: #88ad48; stroke-width: 5; stroke-linecap: round; }
.illustration-ground circle { fill: #efb33c; }

.application-shell {
  max-width: 1120px;
  padding-block: 52px 90px;
}

.application-notice {
  display: flex;
  margin-bottom: 32px;
  padding: 19px 24px;
  align-items: center;
  gap: 20px;
  background: #f6f9ec;
  border: 1px solid #dbe7c5;
  border-radius: 18px;
}

.application-notice strong {
  flex: 0 0 auto;
  color: var(--form-green-dark);
  font-size: 1.05rem;
}

.application-notice p {
  margin: 0;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.7;
}

.event-form {
  display: grid;
  gap: 28px;
}

.form-section {
  position: relative;
  padding: 36px 30px 30px;
  background: rgba(255, 255, 255, .93);
  border: 1px solid var(--form-line);
  border-radius: 18px;
  box-shadow: 0 12px 36px rgba(54, 91, 52, .07);
}

.form-section h2 {
  display: inline-flex;
  position: absolute;
  top: -18px;
  left: 22px;
  min-height: 38px;
  margin: 0;
  padding: 7px 25px 7px 16px;
  align-items: center;
  gap: 9px;
  color: #fff;
  background: var(--form-green);
  border-radius: 5px 5px 16px 5px;
  font-size: 1.02rem;
  letter-spacing: .04em;
  box-shadow: 4px 5px 0 rgba(105, 153, 40, .15);
}

.form-section h2 span {
  font-size: 1.25rem;
}

.form-section-pair {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 28px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-grid-single {
  grid-template-columns: 1fr;
}

.form-field {
  display: grid;
  align-content: start;
  gap: 8px;
}

.form-field-wide {
  grid-column: 1 / -1;
}

.form-field > span {
  color: var(--form-ink);
  font-size: .84rem;
  font-weight: 850;
}

.form-field em {
  display: inline-block;
  margin-left: 5px;
  padding: 2px 6px;
  color: #fff;
  background: #df704e;
  border-radius: 999px;
  font-size: .6rem;
  font-style: normal;
  vertical-align: 2px;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-width: 0;
  padding: 13px 14px;
  color: var(--text);
  background: #fffef9;
  border: 1px solid #cad8b4;
  border-radius: 11px;
  font: inherit;
  line-height: 1.6;
}

.form-field select {
  min-height: 50px;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--form-green-dark) 50%),
    linear-gradient(135deg, var(--form-green-dark) 50%, transparent 50%);
  background-position:
    calc(100% - 20px) 22px,
    calc(100% - 14px) 22px;
  background-repeat: no-repeat;
  background-size: 6px 6px, 6px 6px;
}

.form-field input {
  min-height: 50px;
}

.form-field textarea {
  resize: vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--form-green);
  outline: 3px solid rgba(120, 170, 43, .16);
}

.form-field [aria-invalid="true"] {
  border-color: #c9533f;
  outline: 3px solid rgba(201, 83, 63, .12);
}

.form-field small,
.character-count {
  color: var(--muted);
  font-size: .7rem;
  line-height: 1.6;
}

.character-count {
  justify-self: end;
}

.photo-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 13px;
}

.photo-list span {
  overflow: hidden;
  padding: 8px 10px;
  color: var(--form-green-dark);
  background: var(--form-green-soft);
  border-radius: 8px;
  font-size: .68rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.form-agreements {
  padding: 26px 30px;
  background: #f4f8ec;
  border: 1px solid #d2e0bc;
  border-radius: 18px;
}

.form-agreements h2 {
  margin: 0 0 17px;
  color: var(--form-green-dark);
  font-size: 1.1rem;
}

.form-agreements label {
  display: flex;
  margin-top: 11px;
  align-items: flex-start;
  gap: 10px;
  color: var(--text);
  font-size: .8rem;
  line-height: 1.7;
}

.form-agreements input {
  width: 20px;
  height: 20px;
  margin-top: 3px;
  accent-color: var(--form-green-dark);
}

.form-agreements a {
  color: var(--form-green-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.form-submit-area {
  padding: 28px;
  text-align: center;
  background: linear-gradient(135deg, #f8f7e9, #eff7de);
  border-radius: 18px;
}

.form-submit-area p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: .8rem;
}

.form-submit-button {
  min-width: min(100%, 360px);
  border: 0;
  cursor: pointer;
}

.form-errors {
  padding: 18px 20px;
  color: #8f2d20;
  background: #fff0ec;
  border: 1px solid #e8b6aa;
  border-radius: 12px;
  font-size: .82rem;
}

.form-errors strong { display: block; margin-bottom: 7px; }
.form-errors ul { margin: 0; padding-left: 1.4em; }
.form-honeypot { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

.confirm-dialog {
  width: min(92vw, 720px);
  max-height: 88vh;
  padding: 30px;
  color: var(--text);
  background: #fffef9;
  border: 0;
  border-radius: 20px;
  box-shadow: 0 24px 90px rgba(24, 68, 49, .28);
}

.confirm-dialog::backdrop {
  background: rgba(17, 45, 35, .58);
  backdrop-filter: blur(3px);
}

.confirm-dialog h2 { margin: 4px 0 20px; color: var(--form-green-dark); }
.dialog-close { position: absolute; top: 10px; right: 13px; width: 38px; height: 38px; color: var(--muted); background: transparent; border: 0; font-size: 1.5rem; cursor: pointer; }
.confirm-content { overflow: auto; max-height: 52vh; border-top: 1px solid var(--line); }
.confirm-row { display: grid; grid-template-columns: 150px 1fr; gap: 15px; padding: 11px 3px; border-bottom: 1px solid var(--line); font-size: .78rem; }
.confirm-row dt { color: var(--form-green-dark); font-weight: 800; }
.confirm-row dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
.dialog-actions .button { justify-content: center; border: 0; cursor: pointer; }
.dialog-actions .button-secondary { color: var(--green-800); background: transparent; border: 1px solid var(--green-800); }
.dialog-actions .button-secondary:hover,
.dialog-actions .button-secondary:focus-visible { color: white; background: var(--green-800); }

body.form-is-sending .form-submit-button,
body.form-is-sending #confirm-send { opacity: .65; pointer-events: none; }

.cgi-result {
  display: grid;
  min-height: 100vh;
  padding: 30px 18px;
  place-items: center;
}

.cgi-result-card {
  width: min(100%, 620px);
  padding: 46px 34px;
  text-align: center;
  background: #fff;
  border: 1px solid var(--form-line);
  border-radius: 24px;
  box-shadow: 0 18px 60px rgba(40, 103, 78, .14);
}

.cgi-result-logo img { width: 190px; height: auto; }
.cgi-result-mark { display: grid; width: 62px; height: 62px; margin: 28px auto 16px; place-items: center; color: #fff; background: var(--form-green); border-radius: 50%; font-size: 1.8rem; font-weight: 900; }
.cgi-result-card h1 { margin: 0 0 14px; color: var(--form-green-dark); font-size: clamp(1.5rem, 4vw, 2.2rem); }
.cgi-result-card p { line-height: 1.8; }
.cgi-result-detail { margin-bottom: 28px; color: var(--muted); font-size: .82rem; }
.cgi-result-card .button { display: inline-flex; width: auto; min-width: min(100%, 280px); justify-content: center; }

@media (max-width: 760px) {
  .application-hero { padding-top: 28px; }
  .application-hero-inner { grid-template-columns: 1fr; gap: 15px; }
  .application-hero-copy .breadcrumb { margin-bottom: 22px; }
  .application-illustration { max-width: 430px; margin: -6px auto -12px; }
  .application-shell { padding-block: 38px 65px; }
  .application-notice { align-items: flex-start; flex-direction: column; gap: 7px; }
  .form-section-pair,
  .form-grid { grid-template-columns: 1fr; }
  .form-field-wide { grid-column: auto; }
  .form-section { padding: 33px 18px 21px; }
  .form-section h2 { left: 14px; font-size: .9rem; }
  .photo-list { grid-template-columns: 1fr; }
  .form-agreements { padding: 22px 18px; }
  .confirm-dialog { padding: 25px 18px 20px; }
  .confirm-row { grid-template-columns: 1fr; gap: 3px; }
}

@media (prefers-reduced-motion: reduce) {
  .confirm-dialog::backdrop { backdrop-filter: none; }
}
