:root {
  --green: #2d6a4f;
  --green-button: #3d8a5e;
  --blue-button: #c0603a;
  --red: #a0390a;
  --text: #111111;
  --line: #d8d8d8;
  --bg: #f5f0ea;
  --panel: #ffffff;
  --soft: #f2f2f2;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 12px;
  background: #f5f0ea;
  color: var(--text);
  font-family: Meiryo, "メイリオ", sans-serif;
  line-height: 1.9;
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  width: min(100%, 1120px);
  margin: 0 auto;
  padding: 56px 46px 56px;
  background: #ffffff;
}

.page-title {
  margin: 6px 0 82px;
  text-align: center;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.35;
  color: #222;
}

.card {
  border: 2px solid var(--green);
  background: var(--panel);
}

.card-header {
  padding: 14px 26px;
  background: var(--green);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
}

.card-body {
  padding: 22px 30px 28px;
}

.notice {
  margin: 0 0 26px;
  padding-left: 28px;
  font-size: 16px;
}

.notice .accent {
  color: #ff144d;
}

.grant-block {
  padding: 18px 0 30px;
}

.grant-block + .grant-block {
  border-top: 3px solid #222;
  padding-top: 34px;
}

.grant-title {
  margin: 0;
  padding: 0 12px 12px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.65;
}

.grant-text {
  margin: 30px 0 0;
  font-size: 16px;
}

.apply-button {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 26px;
  padding: 14px 22px;
  border-radius: 2px;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.apply-button svg {
  flex: 0 0 auto;
}

.button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.button-group .apply-button {
  margin-top: 0;
}

.apply-button.green {
  background: var(--green-button);
}

.apply-button.blue {
  background: var(--blue-button);
}

.apply-button:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
}

.apply-button.green:hover {
  background: #347a52;
}

.apply-button.blue:hover {
  background: #a8522e;
}

.period {
  margin: 26px 0 0;
  font-size: 16px;
}

.section-title {
  margin: 42px 0 0;
  padding: 16px 24px;
  background: #efefef;
  color: #1d1d1d;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
}

.contact-box {
  border: 2px solid var(--red);
  background: var(--panel);
}

.contact-header {
  padding: 14px 26px;
  background: var(--red);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
}

.contact-body {
  padding: 22px 30px 28px;
  font-size: 16px;
}

.contact-body p {
  margin: 0 0 10px;
}

.contact-body .name {
  font-weight: 700;
}

.phone {
  margin: 18px 0 16px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.phone strong {
  font-size: 32px;
  line-height: 1.2;
}

.phone span {
  font-size: 18px;
  font-weight: 400;
}

.mail {
  word-break: break-all;
}

@media (max-width: 900px) {
  body {
    padding: 8px;
  }

  .page {
    width: 100%;
    padding: 24px 20px 36px;
  }

  .page-title {
    margin: 0 0 36px;
    font-size: 24px;
  }

  .card-header,
  .card-body,
  .contact-header,
  .contact-body,
  .section-title {
    padding-left: 20px;
    padding-right: 20px;
  }

  .notice,
  .grant-title,
  .grant-text,
  .period,
  .contact-body {
    font-size: 18px;
  }

  .card-header,
  .contact-header,
  .section-title {
    font-size: 20px;
  }

  .apply-button {
    width: 100%;
    justify-content: center;
    padding: 16px 18px;
    font-size: 20px;
  }

  .phone {
    font-size: 20px;
  }

  .phone strong {
    font-size: 34px;
  }

  .phone span {
    display: block;
    margin-top: 6px;
    font-size: 20px;
  }
}

.notice-red {
  margin: 10px 0 14px;
  color: #a0390a;
  font-size: 13px;
  font-weight: 700;
}

.submit-table-wrap {
  margin-top: 12px;
  overflow-x: auto;
}

.submit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.submit-table th {
  background: #2d6a4f;
  color: #fff;
  padding: 8px 10px;
  text-align: center;
  border: 1px solid #245a40;
  white-space: nowrap;
}

.submit-table td {
  padding: 8px 10px;
  border: 1px solid #b8d4c0;
  vertical-align: top;
}

.submit-table tr:nth-child(even) td {
  background: #f0f7f3;
}

.card-divider {
  border: none;
  border-top: 1px solid #b8d4c0;
  margin: 20px 0;
}

/* 申請の流れ */
.flow-section {
  margin-bottom: 24px;
}

.flow-steps {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.flow-step {
  flex: 1;
  min-width: 80px;
  padding: 10px 6px;
  background: #e0f0e8;
  border: 2px solid #3d8a5e;
  border-radius: 4px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: #1a4a30;
}

.flow-step.current {
  background: #2d6a4f;
  color: #fff;
}

.flow-arrow {
  color: #2d6a4f;
  font-size: 18px;
  font-weight: 700;
  flex: 0 0 auto;
}

.flow-detail-block {
  border: 1px solid #d0d0d0;
  padding: 14px 16px;
  margin-bottom: 12px;
  font-size: 13px;
}

.flow-detail-block p {
  margin: 6px 0 0;
}

.flow-detail-title {
  margin: 0 0 8px;
  font-size: 14px;
  color: #1a4a30;
  border-bottom: 1px solid #d0d0d0;
  padding-bottom: 6px;
}

.flow-meta-row {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  font-size: 12px;
  align-items: flex-start;
}

.flow-label {
  flex: 0 0 auto;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}

.flow-deadline {
  font-size: 16px;
  font-weight: 800;
  color: #c0603a;
}

.deadline-label { background: #c0603a; }
.doc-label      { background: #2d6a4f; }
.submit-label   { background: #2a6ab8; }

.flow-note {
  color: #888;
  font-size: 11px;
}

.flow-notice {
  margin: 12px 0;
  padding: 10px 14px;
  background: #e8f4ff;
  border-left: 4px solid #1a6fc4;
  font-size: 13px;
  font-weight: 700;
  color: #1a4f9c;
}

.flow-list {
  margin: 8px 0 8px 0;
  padding-left: 1.4em;
  line-height: 1.8;
}

.flow-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

@media (max-width: 640px) {
  .flow-steps {
    flex-direction: column;
    align-items: stretch;
  }
  .flow-arrow {
    transform: rotate(90deg);
    text-align: center;
  }
  .flow-detail-grid {
    grid-template-columns: 1fr;
  }
}
