:root {
  color-scheme: light;
  --paper: #f7f6f2;
  --white: #fff;
  --ink: #242424;
  --muted: #5f5c66;
  --purple: #4d35a6;
  --purple-dark: #36217e;
  --purple-wash: #f4f1fb;
  --line: #dfdbe6;
  --form-line: #cbc6d5;
  --unit: clamp(1.25rem, 5vw, 4.5rem);
  --wrap: 1184px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  word-break: keep-all;
  line-height: 1.58;
}
button, input, select, textarea { font: inherit; }
button, a, label.role-option, summary { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, dl, dd, figure { margin: 0; }
:focus-visible { outline: 3px solid #744ddd; outline-offset: 3px; }
[id] { scroll-margin-top: 1.5rem; }
.wrap { width: min(var(--wrap), calc(100% - 2 * var(--unit))); margin-inline: auto; }

.site-header { border-bottom: 1px solid #e7e3de; }
.header-inner, .footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.125rem;
}
.header-inner { min-height: 4.65rem; }
.brand { display: inline-flex; align-items: center; min-width: 160px; }
.header-inner nav { display: flex; align-items: center; gap: clamp(1rem, 2.5vw, 2rem); }
.nav-link { font-size: .91rem; font-weight: 650; text-decoration: none; }
.nav-link:hover, .footer-inner a:hover { text-decoration: underline; text-underline-offset: 4px; }
.button {
  min-height: 3.2rem;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  border: 1px solid transparent;
  border-radius: 100px;
  padding: .8rem 1.3rem;
  text-decoration: none;
  font-size: .98rem;
  font-weight: 730;
  cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease;
}
.button span { font-size: 1.15em; line-height: 1; }
.button-small {
  min-height: 2.6rem;
  padding: .47rem .9rem;
  gap: .6rem;
  font-size: .88rem;
  background: transparent;
  border-color: #d5ccd9;
  color: var(--purple-dark);
}
.button-small:hover { background: var(--purple-wash); border-color: var(--purple); }
.button-primary { background: var(--purple); color: var(--white); }
.button-primary:hover { background: var(--purple-dark); }
.button:disabled { cursor: wait; background: #6b59a0; }

.hero {
  display: grid;
  grid-template-columns: .88fr 1.12fr;
  align-items: center;
  gap: clamp(1.5rem, 4.8vw, 4.4rem);
  padding-top: clamp(2.8rem, 6.4vw, 5.7rem);
  padding-bottom: clamp(2.25rem, 4.2vw, 3.7rem);
}
.eyebrow {
  color: var(--purple);
  font-size: .91rem;
  font-weight: 780;
  margin-bottom: 1.05rem;
}
.hero h1 {
  font-size: clamp(2.6rem, 4.65vw, 4.5rem);
  letter-spacing: -.057em;
  line-height: 1.11;
  font-weight: 850;
}
.headline-period { color: var(--purple); }
.hero-intro {
  max-width: 23rem;
  margin: 1.35rem 0 1.65rem;
  color: var(--muted);
  font-size: clamp(.98rem, 1.5vw, 1.13rem);
  line-height: 1.72;
}
.hero-visual {
  overflow: hidden;
  border-radius: 25px;
  background: #e5d1bc;
  height: clamp(23rem, 36vw, 31rem);
}
.hero-visual img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }

.facts {
  margin-bottom: clamp(2.65rem, 5vw, 4.5rem);
  border: 1px solid #e4deeb;
  background: #eeebf5;
  border-radius: 18px;
}
.facts dl { display: grid; grid-template-columns: 1.11fr 1.04fr .9fr; padding: 1.15rem .5rem; }
.facts dl > div { padding: .2rem clamp(1rem, 2.3vw, 2.15rem); }
.facts dl > div + div { border-left: 1px solid #d9d1e6; }
.facts dt { color: var(--purple-dark); font-size: .82rem; font-weight: 760; margin-bottom: .2rem; }
.facts dd { font-size: clamp(.94rem, 1.45vw, 1.15rem); font-weight: 760; letter-spacing: -.022em; }

.application-section { padding-block: clamp(2.4rem, 5.5vw, 5rem); background: var(--purple-wash); border-top: 1px solid #e9e2f2; }
.application-layout { display: grid; grid-template-columns: .66fr 1.34fr; align-items: start; gap: clamp(2rem, 6vw, 6.5rem); }
.apply-intro { padding-top: .4rem; }
.apply-intro h2 { font-size: clamp(2rem, 3.15vw, 3.1rem); font-weight: 820; line-height: 1.14; letter-spacing: -.05em; }
.apply-intro > p { color: var(--muted); margin-top: .9rem; max-width: 18.75rem; }
.participation-steps { list-style: none; margin: 1.8rem 0 0; padding: 0; display: grid; gap: .8rem; }
.participation-steps li { display: flex; align-items: center; gap: .65rem; font-size: .94rem; font-weight: 680; }
.step-marker {
  display: inline-grid;
  place-items: center;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 50%;
  background: #e5ddf4;
  color: var(--purple-dark);
  font-size: .75rem;
  font-variant-numeric: tabular-nums;
}
.application-card {
  background: var(--white);
  border: 1px solid #e1dae9;
  border-radius: 21px;
  padding: clamp(1.125rem, 3.2vw, 2.625rem);
  box-shadow: 0 10px 30px #2918460a;
  min-width: 0;
}
form.application-card { display: grid; gap: 1.15rem; }
.form-group { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; margin-bottom: .65rem; font-weight: 760; }
.role-options { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; }
.role-option {
  display: flex;
  gap: .65rem;
  align-items: start;
  padding: .79rem .85rem;
  border: 1px solid var(--form-line);
  border-radius: 10px;
  cursor: pointer;
}
.role-option:hover { border-color: var(--purple); }
.role-option:has(input:checked) { background: #f3eefc; border-color: var(--purple); }
.role-option input, .consent-choice input { margin: .29rem 0 0; accent-color: var(--purple); width: 1.05rem; height: 1.05rem; flex-shrink: 0; }
.role-option strong, .role-option small { display: block; }
.role-option small { margin-top: .15rem; color: var(--muted); font-size: .79rem; line-height: 1.46; }
.field-row { display: grid; grid-template-columns: 1fr .7fr; gap: .8rem; }
.field { display: grid; gap: .35rem; min-width: 0; }
.field > span { font-weight: 740; font-size: .94rem; }
.field > small { color: var(--muted); font-size: .8rem; line-height: 1.55; }
.field :is(input, select, textarea) {
  width: 100%;
  min-height: 2.875rem;
  border: 1px solid var(--form-line);
  border-radius: 9px;
  padding: .58rem .72rem;
  background: var(--white);
  color: var(--ink);
  font-size: 1rem;
}
.field select { padding-right: .45rem; }
.field textarea { resize: vertical; }
.field ::placeholder { color: #696372; }
.optional {
  color: #625b6d;
  font-size: .75rem;
  margin-inline-start: .25rem;
  white-space: nowrap;
  font-weight: 560;
}
.form-trap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.consent-block { border-top: 1px solid var(--line); padding-top: .9rem; }
.consent-block summary { width: fit-content; min-height: 2rem; padding: .15rem 0; font-size: .85rem; font-weight: 700; cursor: pointer; }
.consent-block dl { padding: .7rem .8rem; margin-block: .25rem .65rem; background: #f6f4fa; border-radius: 8px; font-size: .8rem; }
.consent-block dl > div { display: grid; grid-template-columns: 4.2rem 1fr; gap: .5rem; margin-block: .32rem; }
.consent-block dt { font-weight: 750; }
.consent-block dd { color: var(--muted); }
.consent-choice { display: flex; align-items: start; gap: .55rem; cursor: pointer; font-size: .9rem; font-weight: 650; margin-top: .2rem; }
.submit-button { justify-content: space-between; width: 100%; padding-inline: 1.25rem; border-radius: 11px; }
.form-error { border: 1px solid #e7bec5; border-radius: 8px; padding: .65rem .75rem; background: #fff3f5; color: #8a2436; font-size: .9rem; }
.success-card { padding-block: 3rem; }
.success-mark { display: inline-grid; place-items: center; border-radius: 50%; background: #ece5fb; color: var(--purple-dark); width: 2.65rem; height: 2.65rem; font-size: 1.45rem; font-weight: 800; }
.success-card h3 { margin: .9rem 0 .4rem; font-size: 1.6rem; letter-spacing: -.035em; }
.success-card p { color: var(--muted); }
.success-card a { display: inline-block; margin-top: .9rem; color: var(--purple); font-size: .92rem; font-weight: 680; text-underline-offset: 4px; }

.site-footer { border-top: 1px solid #e5dedc; }
.footer-inner { min-height: 5rem; }
.footer-inner a { color: var(--muted); font-size: .82rem; text-decoration: none; text-align: right; }

.manage-page { max-width: 860px; padding-block: clamp(2.25rem, 6vw, 5rem); }
.back-link { font-size: .91rem; color: var(--purple-dark); text-underline-offset: 4px; }
.manage-page h1 { font-size: clamp(1.85rem, 4vw, 3rem); letter-spacing: -.045em; margin-block: .5rem 1rem; }
.manage-message { color: var(--muted); }
.manage-message .button { margin-top: 1rem; }
.manage-count { margin-bottom: 1rem; color: var(--muted); }
.records { display: grid; gap: .9rem; }
.record-title { display: flex; gap: .75rem; flex-wrap: wrap; justify-content: space-between; align-items: start; margin-bottom: .75rem; }
.record-title h2 { font-size: 1.22rem; overflow-wrap: anywhere; }
.record-title small, .record-title time { color: var(--muted); font-size: .83rem; }
.record-role { display: inline-block; color: var(--purple-dark); font-weight: 720; font-size: .84rem; }
.record dl { display: grid; gap: .45rem; font-size: .9rem; }
.record dl > div { display: grid; grid-template-columns: minmax(6rem, 22%) 1fr; gap: .5rem; }
.record dt { font-weight: 710; }
.record dd { color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; min-width: 0; }
.record-actions { margin-top: .75rem; color: #8a2436; font-size: .82rem; }
.record-actions button {
  padding: .38rem .66rem;
  background: #fff8f8;
  border: 1px solid #e7bbc3;
  border-radius: 7px;
  color: inherit;
  cursor: pointer;
}
.record-actions button:hover { background: #ffeeef; }
.record-actions button:disabled { opacity: .6; cursor: wait; }

@media (max-width: 860px) {
  .hero { grid-template-columns: .94fr 1.06fr; gap: 1.5rem; }
  .hero h1 { font-size: clamp(2.35rem, 5.5vw, 3.35rem); }
  .hero-visual { height: clamp(19rem, 47vw, 28rem); }
  .application-layout { grid-template-columns: 1fr; gap: 1.25rem; }
  .apply-intro > p { max-width: 31rem; }
  .participation-steps { grid-auto-flow: column; justify-content: start; gap: .5rem 1rem; margin-top: 1rem; }
}
@media (max-width: 620px) {
  .header-inner { min-height: 4rem; }
  .header-inner nav .nav-link { display: none; }
  .brand img { width: 160px; }
  .hero { grid-template-columns: 1fr; padding-top: 2.55rem; gap: 1.55rem; }
  .hero h1 { font-size: clamp(2.25rem, 9.2vw, 3.65rem); }
  .hero-break { display: none; }
  .hero-intro { margin-block: .95rem 1.2rem; }
  .hero-visual { height: auto; aspect-ratio: 1.63; border-radius: 17px; }
  .facts dl { grid-template-columns: 1fr; padding: .3rem .9rem; }
  .facts dl > div { padding: .69rem .14rem; }
  .facts dl > div + div { border-left: 0; border-top: 1px solid #d9d1e6; }
  .facts dt { margin-bottom: .05rem; }
  .participation-steps { grid-auto-flow: row; }
}
@media (max-width: 375px) {
  .button-small { padding-inline: .62rem; }
  .application-card { border-radius: 14px; }
  .role-option { padding-inline: .55rem; gap: .38rem; }
  .field-row { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

[hidden] { display: none !important; }
.consent-block details a { color: var(--purple-dark); text-underline-offset: 3px; }
.record-actions form { margin: 0; }
.manage-next { display: inline-block; color: var(--purple-dark); margin-block: 1.1rem 0; }
#submit-text { font-size: 1em; line-height: inherit; }
