:root {
  color-scheme: light;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans",
    "Noto Sans JP", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  --background: #f4f7fb;
  --surface: #ffffff;
  --surface-muted: #eef3f8;
  --text: #17243b;
  --muted: #5c687b;
  --accent: #176b87;
  --accent-strong: #0c536d;
  --line: #cbd6e2;
  --error: #a82b31;
  --success: #17663d;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 85% 0%, rgba(30, 151, 174, 0.16), transparent 28rem),
    var(--background);
}

.site-header,
.site-footer {
  border-color: var(--line);
  border-style: solid;
  background: rgba(255, 255, 255, 0.88);
}

.site-header {
  border-width: 0 0 1px;
}

.site-footer {
  border-width: 1px 0 0;
}

.header-inner,
.footer-inner,
main {
  width: min(100% - 2rem, 760px);
  margin-inline: auto;
}

.header-inner,
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
}

.brand {
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
}

.language-link,
a {
  color: var(--accent-strong);
  text-underline-offset: 0.2em;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(23, 107, 135, 0.42);
  outline-offset: 3px;
}

main {
  padding-block: clamp(2.5rem, 8vw, 5.5rem);
}

.eyebrow {
  margin: 0;
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1 {
  margin: 0.35rem 0 0;
  font-size: clamp(2.15rem, 8vw, 4.25rem);
  line-height: 1.12;
  letter-spacing: -0.045em;
}

.lead {
  max-width: 42rem;
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 1.06rem;
}

.form-card {
  margin-top: 2rem;
  padding: clamp(1.25rem, 5vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: var(--surface);
  box-shadow: 0 1.2rem 3rem rgba(38, 61, 88, 0.1);
}

.field + .field,
.field + fieldset,
fieldset + .field,
fieldset + fieldset {
  margin-top: 1.25rem;
}

label,
legend {
  font-weight: 750;
}

.required {
  color: var(--error);
  font-size: 0.82rem;
  font-weight: 750;
}

.field-help {
  display: block;
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.88rem;
}

input,
select,
textarea {
  width: 100%;
  margin-top: 0.4rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid #9baabc;
  border-radius: 0.65rem;
  color: var(--text);
  background: #fff;
  font: inherit;
}

select {
  min-height: 3.15rem;
  padding-right: 3.4rem;
  appearance: none;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='m5 8 7 7 7-7' stroke='%230c536d' stroke-width='2.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"),
    linear-gradient(
      to right,
      transparent 0,
      transparent calc(100% - 3.15rem),
      var(--surface-muted) calc(100% - 3.15rem),
      var(--surface-muted) 100%
    );
  background-position: right 0.85rem center, center;
  background-repeat: no-repeat;
  background-size: 1.45rem 1.45rem, 100% 100%;
  cursor: pointer;
}

select:hover {
  border-color: var(--accent);
}

textarea {
  min-height: 11rem;
  resize: vertical;
}

fieldset {
  min-width: 0;
  padding: 0;
  border: 0;
}

.optional-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.optional-grid .field {
  margin-top: 0;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: var(--surface-muted);
}

.check-row input {
  flex: 0 0 auto;
  width: 1.2rem;
  height: 1.2rem;
  margin: 0.18rem 0 0;
}

.check-row label {
  font-weight: 650;
}

.privacy-notice {
  margin-top: 1.5rem;
  padding: 1rem;
  border-left: 4px solid var(--accent);
  border-radius: 0.35rem;
  background: #edf7f8;
  color: #304457;
  font-size: 0.9rem;
}

.privacy-notice p {
  margin: 0;
}

.privacy-notice p + p {
  margin-top: 0.65rem;
}

.privacy-notice + fieldset {
  margin-top: 1.25rem;
}

.actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

button {
  min-height: 3rem;
  padding: 0.65rem 1.25rem;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--accent);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

button:hover {
  background: var(--accent-strong);
}

button:disabled {
  cursor: wait;
  opacity: 0.58;
}

.form-status {
  margin: 0;
  font-weight: 700;
}

.form-status[data-state="error"] {
  color: var(--error);
}

.form-status[data-state="success"] {
  color: var(--success);
}

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

[hidden] {
  display: none !important;
}

.footer-inner {
  color: var(--muted);
  font-size: 0.85rem;
}

@media (max-width: 680px) {
  :root {
    font-size: 16px;
  }

  .optional-grid {
    grid-template-columns: 1fr;
  }

  .actions {
    align-items: stretch;
    flex-direction: column;
  }
}

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

@media (forced-colors: active) {
  select {
    padding-right: 0.85rem;
    appearance: auto;
    background-image: none;
  }
}
