:root {
  --green: #00984a;
  --green-dark: #007a3d;
  --green-deep: #005141;
  --yellow: #fff2c4;
  --yellow-line: #ffe100;
  --text: #111111;
  --muted: #333333;
  --border: #00984a;
  --required: #d8333f;
  --optional: #0086c9;
  --soft-gray: #f7f8f7;
  --radius: 8px;
  --page-max: 480px;
  --form-max: 560px;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: #ffffff;
  font-family:
    "Zen Kaku Gothic Antique",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Hiragino Sans",
    "Yu Gothic",
    "YuGothic",
    "Noto Sans JP",
    sans-serif;
  line-height: 1.8;
  letter-spacing: 0;
}

[hidden] {
  display: none !important;
}

a {
  color: inherit;
}

img,
svg {
  max-width: 100%;
}

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

mark {
  background: linear-gradient(transparent 58%, var(--yellow-line) 58%);
  padding: 0 0.08em;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-top: 16px solid var(--green);
  background: #ffffff;
}

.site-header__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 720px;
  min-height: 72px;
  margin: 0 auto;
  padding: 12px 20px;
}

.home-link {
  display: inline-flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--green);
  text-decoration: none;
}

.home-icon {
  position: relative;
  display: block;
  width: 34px;
  height: 28px;
  background: currentColor;
  clip-path: polygon(
    50% 0,
    100% 42%,
    84% 42%,
    84% 100%,
    60% 100%,
    60% 68%,
    40% 68%,
    40% 100%,
    16% 100%,
    16% 42%,
    0 42%
  );
}

.site-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: 178px;
  height: auto;
}

.menu-button {
  display: inline-flex;
  width: 48px;
  height: 48px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 2px solid var(--green);
  border-radius: 999px;
  background: #ffffff;
  color: var(--green);
  cursor: pointer;
}

.menu-button span {
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

.menu-button[aria-expanded="true"] {
  background: var(--green);
  color: #ffffff;
}

.menu-button[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.menu-button[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-button[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.global-nav {
  position: absolute;
  top: calc(100% + 8px);
  right: 16px;
  left: 16px;
  display: none;
  padding: 12px;
  border: 2px solid var(--green);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.16);
}

.global-nav.is-open {
  display: grid;
  gap: 4px;
}

.global-nav a {
  display: block;
  padding: 12px 14px;
  border-radius: var(--radius);
  color: var(--green-dark);
  font-weight: 700;
  line-height: 1.45;
  text-decoration: none;
}

.global-nav a:hover,
.global-nav a:focus-visible,
.global-nav a[aria-current="page"] {
  background: var(--yellow);
  outline: none;
}

.page {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 20px;
}

.page--form {
  max-width: var(--form-max);
}

.page--wide {
  max-width: 720px;
}

.page--long {
  max-width: 720px;
}

.section {
  padding: 56px 0;
}

.hero {
  padding-top: 22px;
  text-align: center;
}

.small-note {
  margin: 0 auto 28px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.8;
  text-align: center;
}

.small-note--left {
  max-width: 390px;
  margin-top: 24px;
  text-align: left;
}

.prefecture-title {
  margin: 0 0 4px;
  color: var(--green);
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1.35;
}

.hero-title {
  margin: 0 0 24px;
  color: var(--green);
  font-size: clamp(1.75rem, 7.2vw, 2.2rem);
  font-weight: 700;
  line-height: 1.35;
}

.hero-illustration {
  display: block;
  margin: 0 auto 20px;
}

.hero-illustration img {
  display: block;
  width: min(100%, 330px);
  height: auto;
  margin: 0 auto;
}

.hero-copy {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.9;
}

.hero-copy p {
  margin: 0 0 24px;
}

.hero-copy p:last-child {
  font-size: 1.35rem;
}

.notice-box,
.warning-box {
  margin: 28px 0;
  padding: 18px 20px;
  border-radius: 8px;
  background: var(--yellow);
  color: var(--text);
}

.notice-box p,
.warning-box p {
  margin: 0;
}

.button-stack {
  display: grid;
  gap: 14px;
  margin: 28px auto 0;
}

.primary-button,
.secondary-button,
.outline-button {
  display: inline-flex;
  min-height: 64px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 14px 18px;
  border-radius: 16px;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.primary-button {
  border: 3px solid var(--green);
  background: var(--green);
  color: #ffffff;
}

.secondary-button {
  border: 3px solid var(--green-dark);
  background: var(--green-dark);
  color: #ffffff;
}

.outline-button {
  border: 3px solid var(--green);
  background: #ffffff;
  color: var(--green-dark);
}

.button-icon {
  display: inline-block;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.button-icon.paper {
  background-image: url("../sozai/icon_hikouki.svg");
}

.button-icon.memo {
  background-image: url("../sozai/icon_memo.svg");
}

.section-title {
  margin: 0 0 20px;
  font-size: clamp(1.45rem, 6.3vw, 1.85rem);
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
}

.lead {
  margin: 0 auto 28px;
  font-size: 1.02rem;
  font-weight: 500;
  line-height: 1.9;
  text-align: center;
}

.lead p {
  margin: 0 0 24px;
}

.card-panel {
  display: grid;
  gap: 20px;
  padding: 24px;
  border-radius: 18px;
  background: var(--yellow);
}

.feature-card h3,
.emergency-card h3,
.contact-card h4 {
  margin: 0 0 12px;
  padding: 8px 12px;
  border-radius: 7px;
  background: var(--green);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
}

.card-panel--dark-head .feature-card h3 {
  background: var(--green-deep);
}

.feature-card p,
.emergency-card p,
.contact-card p {
  margin: 0;
  line-height: 1.85;
}

.emergency-section {
  max-width: none;
  margin-right: -20px;
  margin-left: -20px;
  padding: 56px 28px;
  background: var(--yellow);
}

.emergency-card,
.contact-card {
  display: grid;
  gap: 24px;
  margin: 28px auto;
  padding: 24px;
  border-radius: 18px;
  background: #ffffff;
}

.emergency-card h3,
.contact-card h4 {
  background: #333333;
}

.subsection-title {
  margin: 42px 0 22px;
  font-size: 1.55rem;
  font-weight: 700;
  text-align: center;
}

.contact-card {
  text-align: center;
}

.contact-card p {
  font-size: 1.02rem;
}

.contact-card strong {
  font-size: 1.2rem;
}

.beta-section {
  text-align: center;
}

.site-footer {
  margin-top: 48px;
  text-align: center;
}

.footer-brand {
  display: inline-flex;
  margin-bottom: 24px;
  text-decoration: none;
}

.footer-logo {
  display: block;
  width: 174px;
  height: auto;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 20px;
  margin-bottom: 20px;
}

.footer-nav a {
  color: var(--text);
  text-decoration: none;
}

.copyright {
  margin: 0;
  padding: 20px;
  background: var(--green);
  color: #ffffff;
}

.apply-intro {
  padding-top: 22px;
  text-align: center;
}

.form-logo {
  margin: 0 0 32px;
}

.form-logo img {
  display: block;
  width: min(100%, 220px);
  height: auto;
  margin: 0 auto;
}

.application-form {
  padding-bottom: 8px;
}

.step {
  padding: 42px 0 18px;
}

.step + .step {
  margin-top: 32px;
}

.step-badge {
  display: grid;
  width: 80px;
  height: 80px;
  place-items: center;
  margin: 0 auto 18px;
  border-radius: 999px;
  background: var(--green);
  color: #ffffff;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}

.step-badge span {
  display: block;
  margin-bottom: -6px;
  font-size: 1rem;
}

.step-title {
  margin: 0 0 14px;
  color: var(--green);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
}

.form-group {
  min-width: 0;
  margin: 28px 0 0;
  padding: 0;
  border: 0;
}

.form-label {
  display: block;
  margin: 0 0 8px;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.45;
}

.label-required,
.label-optional {
  display: inline-flex;
  min-width: 44px;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 700;
  vertical-align: 0.06em;
}

.label-required {
  background: var(--required);
}

.label-optional {
  background: var(--optional);
}

.form-help {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.85;
}

.form-help.centered,
.submit-note {
  text-align: center;
}

.page-intro {
  padding-top: 42px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="url"],
select,
textarea {
  display: block;
  width: 100%;
  min-height: 50px;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  color: var(--green-dark);
  font-size: 1.05rem;
}

select {
  appearance: none;
  padding-right: 46px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--green) 50%),
    linear-gradient(135deg, var(--green) 50%, transparent 50%);
  background-position:
    calc(100% - 25px) 21px,
    calc(100% - 14px) 21px;
  background-size:
    12px 12px,
    12px 12px;
  background-repeat: no-repeat;
}

textarea {
  min-height: 132px;
  resize: vertical;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--yellow-line);
  outline-offset: 3px;
}

.checkbox-list,
.radio-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.checkbox-list label,
.radio-list label,
.confirmation-box label {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 16px;
  align-items: center;
  min-height: 46px;
  color: var(--green);
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.55;
  cursor: pointer;
}

input[type="checkbox"],
input[type="radio"] {
  appearance: none;
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-content: center;
  margin: 0;
  border: 2px solid var(--green);
  background: #ffffff;
}

input[type="checkbox"] {
  border-radius: 3px;
}

input[type="radio"] {
  border-radius: 999px;
}

input[type="checkbox"]::before {
  content: "";
  width: 18px;
  height: 18px;
  transform: scale(0);
  background: var(--green);
  clip-path: polygon(14% 44%, 0 60%, 42% 100%, 100% 16%, 84% 0, 38% 66%);
}

input[type="radio"]::before {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 999px;
  transform: scale(0);
  background: var(--green);
}

input[type="checkbox"]:checked::before,
input[type="radio"]:checked::before {
  transform: scale(1);
}

.confirmation-box {
  margin-top: 18px;
  padding: 24px 20px;
  border-radius: 8px;
  background: var(--yellow);
}

.confirmation-box label {
  color: var(--text);
  font-weight: 700;
}

.submit-note {
  margin: 46px 0 14px;
  color: var(--muted);
}

.submit-button {
  display: flex;
  width: min(100%, 320px);
  margin-right: auto;
  margin-left: auto;
  border-radius: 16px;
  font-size: 1.35rem;
  margin-top: 2rem;
}

.form-error {
  margin: 0 auto 16px;
  padding: 14px 16px;
  border: 2px solid var(--required);
  border-radius: 8px;
  background: #fff5f6;
  color: var(--required);
  font-weight: 700;
  line-height: 1.7;
}

.success-box {
  margin: 28px 0 16px;
  padding: 18px 20px;
  border: 2px solid var(--green);
  border-radius: 8px;
  background: #eefaf3;
  color: var(--green-dark);
  font-weight: 700;
  line-height: 1.8;
}

.success-box p {
  margin: 0;
}

.office-preview {
  margin-top: 18px;
  padding: 18px;
  border: 2px solid var(--green);
  border-radius: 8px;
  background: #f7fff9;
}

.office-preview h3 {
  margin: 0 0 12px;
  color: var(--green-dark);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.45;
}

.office-preview__name {
  margin: 0 0 10px;
  font-weight: 700;
  line-height: 1.6;
}

.office-preview dl,
.office-card__details {
  display: grid;
  gap: 8px;
  margin: 0;
}

.office-preview dl div,
.office-card__details div {
  display: grid;
  gap: 2px;
}

.office-preview dt,
.office-card__details dt {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.office-preview dd,
.office-card__details dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  line-height: 1.65;
}

.office-preview a,
.office-card a {
  color: var(--green-dark);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.office-list-section {
  padding-top: 28px;
}

.office-list {
  display: grid;
  gap: 20px;
  margin-top: 24px;
}

.office-card {
  padding: 20px;
  border: 2px solid var(--green);
  border-radius: 8px;
  background: #ffffff;
}

.office-card__municipality {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.35;
}

.office-card__name {
  margin: 0 0 16px;
  color: var(--text);
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.55;
}

.office-card__note {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--yellow);
  line-height: 1.7;
}

.office-card__source {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.7;
}

.correction-form {
  padding-bottom: 56px;
}

.text-section {
  padding-top: 18px;
}

.text-section h2 {
  margin: 36px 0 12px;
  color: var(--green-dark);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.45;
}

.text-section p {
  margin: 0 0 16px;
  line-height: 1.85;
}

.text-section ul {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
  padding-left: 1.4em;
  line-height: 1.8;
}

.result-section {
  padding-top: 56px;
}

.result-notice {
  text-align: left;
}

.result-title {
  margin: 36px 0 14px;
  color: var(--green-dark);
  font-size: 1.22rem;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
}

.result-text {
  display: block;
  width: 100%;
  overflow: visible;
  min-height: 360px;
  margin: 0;
  padding: 18px;
  border: 2px solid #d7d7d7;
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.85;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  resize: none;
}

.copy-status {
  min-height: 1.8em;
  margin: 12px 0 0;
  color: var(--green-dark);
  font-weight: 700;
  text-align: center;
}

.result-actions {
  display: grid;
  gap: 14px;
  margin: 26px auto 0;
}

.result-actions .primary-button,
.result-actions .outline-button {
  min-height: 58px;
  border-radius: 14px;
  font-size: 1.05rem;
}

.result-actions .primary-button::before,
.result-actions .outline-button::before {
  content: "";
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.result-actions [data-action^="copy-"]::before {
  background-image: url("../sozai/copy_icon.svg");
}

.result-actions [data-action^="print-"]::before {
  background-image: url("../sozai/print_icon.svg");
}

.result-actions [data-action^="edit-"]::before,
.result-actions a[href="resend.html"]::before {
  background-image: url("../sozai/pen_icon.svg");
}

.result-actions a[href="offices.html"]::before {
  background-image: url("../sozai/list_icon.svg");
}

.emergency-note {
  margin-top: 28px;
  border: 2px solid var(--yellow-line);
  font-weight: 700;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (min-width: 720px) {
  .site-header__inner {
    width: 90%;
    max-width: none;
    min-height: 84px;
    padding-right: 0;
    padding-left: 0;
  }

  .home-link {
    display: none;
  }

  .brand-logo {
    width: 220px;
  }

  .menu-button {
    display: none;
  }

  .global-nav {
    position: static;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 2px;
    flex: 1;
    max-width: none;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .global-nav a {
    padding: 6px 8px;
    font-size: 0.86rem;
  }

  .global-nav a[href="index.html"],
  .global-nav a[href="policy.html"],
  .global-nav a[href="privacy.html"] {
    display: none;
  }

  .page {
    max-width: 640px;
    padding-right: 24px;
    padding-left: 24px;
  }

  .page--form {
    max-width: 600px;
  }

  .page--wide {
    max-width: 720px;
  }

  .page--long {
    max-width: 700px;
  }

  .section {
    padding-top: 68px;
    padding-bottom: 68px;
  }

  .button-stack {
    max-width: 420px;
  }

  .result-actions {
    max-width: 420px;
  }

  .emergency-section {
    margin-right: 0;
    margin-left: 0;
    border-radius: 0;
  }

  .hero-illustration img {
    width: 360px;
  }
}

@media print {
  @page {
    size: A4;
    margin: 16mm;
  }

  html,
  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 12pt;
    line-height: 1.65;
  }

  body * {
    visibility: hidden !important;
  }

  .print-target,
  .print-target * {
    visibility: visible !important;
  }

  .print-target {
    position: absolute;
    top: 0;
    left: 0;
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #ffffff !important;
    color: #000000 !important;
    box-shadow: none !important;
    font-size: 12pt !important;
    line-height: 1.65 !important;
    white-space: pre-wrap !important;
    overflow: visible !important;
    overflow-wrap: break-word !important;
  }

  a::after {
    content: "" !important;
  }
}
