@charset "UTF-8";

/* site.css — UI mock-aligned styles for infra-002 shared layout */

/* Font-size scale — single source of truth for all per-page CSS.
 * Change a value here to update every usage site-wide.
 * Canonical sizes from foundation/_typography.css design tokens.
 * Individual-judgment values (20px, 28px, 26px, 30px, 34px, 36px) are NOT
 * represented here; they remain hardcoded until their mapping is decided.
 */
:root {
  --sjmn-size-12: 12px;
  --sjmn-size-14: 14px;
  --sjmn-size-16: 16px;
  --sjmn-size-18: 18px;
  --sjmn-size-20: 20px;
  --sjmn-size-22: 22px;
  --sjmn-size-24: 24px;
  --sjmn-size-32: 32px;
}

* {
  -webkit-font-smoothing: antialiased;
  box-sizing: border-box;
}

html {
  margin: 0;
  height: 100%;
  font-size: var(--sjmn-size-16);
}

@media (width >= 768px) {
  html {
    font-size: var(--sjmn-size-16);
  }
}

body {
  margin: 0;
  min-height: 100%;
  background-color: var(--sjmn-color-background-application-screen);
  font-family: "Noto Sans JP", sans-serif;
}

a {
  text-decoration: none;
}

body a {
  color: var(--sjmn-color-text-color-link);
}

body a:focus-visible {
  outline: 3px solid var(--sjmn-color-border-color-black);
  outline-offset: 2px;
}

.header-actions a {
  color: var(--sjmn-color-text-color-base);
}

body h1,
body h2,
body h3,
body h4,
body h5,
body h6 {
  color: var(--sjmn-color-text-color-base);
  font-weight: 700;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
  text-align: start;
}

.error-page-body {
  margin: 0;
  min-height: 100vh;
  background: var(--sjmn-color-site-bg-light);
}

.error-page-shell {
  display: flex;
  justify-content: center;
  padding: 2rem 0 3.5rem;
}

.error-page-shell--standalone {
  min-height: 100vh;
  align-items: center;
  padding: 3rem 1.5rem;
}

.error-page-card {
  width: min(100%, 1200px);
  border-radius: 24px;
  background: var(--sjmn-color-base-white);
  box-shadow: 0 18px 50px rgb(from var(--sjmn-color-site-text-dark) r g b / 8%);
  padding: clamp(2.5rem, 5vw, 4.5rem);
  text-align: center;
}

.error-page-card--client {
  border: 1px solid var(--sjmn-color-site-bg-pale);
}

.error-page-card--server {
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.error-page-icon-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.error-page-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  border: 4px solid var(--sjmn-color-site-pink);
  border-radius: 50%;
  color: var(--sjmn-color-site-pink);
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1;
}

.error-page-code,
.error-page-title {
  margin: 0;
  color: var(--sjmn-color-site-pink);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.error-page-code {
  font-size: clamp(2rem, 3.5vw, 3.25rem);
}

.error-page-title {
  font-size: clamp(2rem, 3.25vw, 3rem);
}

.error-page-message,
.error-page-description,
.error-page-guidance {
  margin: 0;
  color: var(--sjmn-color-site-text-deep);
}

.error-page-message {
  font-size: clamp(1.375rem, 2vw, 2rem);
  font-weight: 700;
  line-height: 1.7;
}

.error-page-description,
.error-page-guidance {
  max-width: 48rem;
  margin-inline: auto;
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  line-height: 1.9;
}

.error-page-description {
  margin-top: 0.75rem;
}

.error-page-guidance {
  margin-top: 2rem;
}

.error-page-actions {
  margin-top: 2.5rem;
}

.error-page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 14rem;
  min-height: 3.5rem;
  padding: 0.875rem 1.5rem;
  border: 2px solid var(--sjmn-color-site-text-dark);
  border-radius: 12px;
  color: var(--sjmn-color-site-text-dark);
  background: var(--sjmn-color-base-white);
  font-size: var(--sjmn-size-18);
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.error-page-link:hover,
.error-page-link:focus-visible {
  color: var(--sjmn-color-base-white);
  background: var(--sjmn-color-site-text-dark);
}

.error-page-meta {
  margin-top: 2rem;
  color: var(--sjmn-color-site-text-muted);
  font-size: var(--sjmn-size-16);
  line-height: 1.7;
}

.error-page-meta-id {
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.9em;
  word-break: break-all;
}

@media (width <= 767.98px) {
  .error-page-shell {
    padding: 1.5rem 0 2.5rem;
  }

  .error-page-card {
    padding: 2rem 1.25rem;
    border-radius: 20px;
  }

  .error-page-icon-title {
    gap: 0.75rem;
    margin-bottom: 1.5rem;
  }

  .error-page-icon {
    width: 3.25rem;
    height: 3.25rem;
    font-size: 1.8rem;
  }

  .error-page-link {
    width: 100%;
    min-width: 0;
  }
}

img {
  display: inline-block;
  max-width: 100%;
  height: auto;
}

/* ---- Header ---- */

.header-background {
  background-color: var(--sjmn-color-base-white);
  width: 100%;
  border-bottom: 1px solid var(--sjmn-color-site-bg-gray);
}

.header-background.ver-pc {
  display: block;
  height: 130px;
}

.header-background.ver-sp {
  display: none;
}

.header-container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  background-color: var(--sjmn-color-base-white);
}

.header-inner {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-width: max-content; /* Prevent brand and content from touching; overflow is clipped by .header-background.ver-pc */
  padding: 0 59px 0 68px;
  box-sizing: border-box;
}

.header-brand {
  position: relative;
  width: 454px;
  height: 68px;
}

.brand-label-image {
  position: absolute;
  width: 150px;
  height: 36px;
  top: 15px;
  left: 261px;
}

.brand-logo-image {
  position: absolute;
  width: 225px;
  height: 68px;
  top: 0;
  left: 0;
}

.header-content {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  padding-top: 16px;
  position: relative;
}

.header-nav-search {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 40px;
  position: relative;
}

.header-nav-links a {
  color: var(--sjmn-color-text-color-base);
  text-decoration: none;
}

.header-nav-links {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  position: relative;
}

.nav-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 4px;
  position: relative;
  border-radius: 8px;
}

.nav-label {
  font-size: var(--sjmn-size-16);
  line-height: 24px;
  color: var(--sjmn-color-text-color-base);
  white-space: nowrap;
}

.nav-label:hover {
  color: var(--sjmn-color-app-link);
  text-decoration: underline;
}

/* お知らせ pulldown (正本①) — native <details>/<summary>, no inline JS. */
.nav-oshirase {
  position: relative;
}

.nav-oshirase-summary {
  cursor: pointer;
  list-style: none;
}

.nav-oshirase-summary::-webkit-details-marker {
  display: none;
}

.nav-oshirase-summary::marker {
  content: "";
}

.nav-oshirase-caret {
  width: 12px;
  height: 8px;
  transition: transform 0.15s ease;
}

.nav-oshirase[open] > .nav-oshirase-summary .nav-oshirase-caret {
  transform: rotate(180deg);
}

.nav-oshirase-menu {
  display: flex;
  flex-direction: column;
  min-width: 200px;
  padding: 8px 0;
  background-color: var(--sjmn-color-base-white);
  border: 1px solid var(--sjmn-color-site-bg-gray);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgb(from var(--sjmn-color-basic-black) r g b / 12%);
}

.header-nav-links .nav-oshirase-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 20;
}

.nav-oshirase-menu-item {
  padding: 8px 16px;
  text-decoration: none;
}

.nav-oshirase-menu-item:hover {
  background-color: rgb(from var(--sjmn-color-app-link) r g b / 8%);
}

.nav-site-search {
  cursor: pointer;
}

.icons-ac {
  width: 20px;
  height: 20px;
}

.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 24px;
  position: relative;
  height: 56px;
}

/* Stable flex-item shell for the Google CSE widget (PC header).
   The CSE script targets the inner .gcse-searchbox-only and may resize it or
   apply inline styles; this outer wrapper is unknown to the script and stays
   at exactly 260px so the header buttons never shift when the widget renders. */
.header-search-container {
  width: 244px;
  height: 32px;
  flex-shrink: 0;
}

.action-item {
  display: inline-flex;
  flex-direction: column;
  height: 56px;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.action-item-login {
  display: inline-flex;
  flex-direction: row;
  height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0;
  background-color: transparent;
}

.action-item-register {
  display: inline-flex;
  flex-direction: column;
  height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  background-color: var(--sjmn-color-subsidy-key-color-new-business-frame);
  border: 1px solid var(--sjmn-color-subsidy-key-color-new-business-frame);
  border-radius: 8px;
  margin-bottom: 10px;
}

.hojokin-homepage-goto {
  display: inline-flex;
  flex-direction: row;
  height: 30px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px 16px;
  background-color: var(--sjmn-color-base-white);
  border: 1px solid gray;
  border-radius: 8px;
  margin-bottom: 3px;
}

.hojokin-homepage-goto-text {
  color: var(--sjmn-color-text-color-base);
  font-size: var(--sjmn-size-16);
}

.button-text {
  display: flex;
  height: 56px;
  align-items: center;
  gap: 4px;
  padding: 8px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--sjmn-color-text-color-base);
  border: 0;
  background: transparent;
  font-family: inherit;
  cursor: pointer;
}

.text-wrapper-2 {
  font-weight: 700;
  color: var(--sjmn-color-text-color-base);
  font-size: var(--sjmn-size-18);
  line-height: 18px;
  white-space: nowrap;
}

.text-wrapper-3 {
  font-weight: 700;
  font-size: var(--sjmn-size-18);
  line-height: 18px;
  color: var(--sjmn-color-text-color-base);
  white-space: nowrap;
  display: flex;
  align-items: center;
  height: 56px;
  padding: 8px;
  border-radius: 8px;
  /* Reset native <button> chrome: this class is shared with <button>
     elements that act as logout-modal triggers (see _Layout / _NavigationPartial). */
  border: 0;
  background: transparent;
  font-family: inherit;
  cursor: pointer;
}

.login-text {
  font-weight: 700;
  color: var(--sjmn-color-text-color-base);
  font-size: var(--sjmn-size-16);
  line-height: 16px;
  white-space: nowrap;
  margin-top: 0;
  margin-bottom: 0;
}

.login-text.small {
  font-size: var(--sjmn-size-14);
  line-height: 14px;
}

.register-text {
  font-weight: 700;
  color: var(--sjmn-color-base-white);
  font-size: var(--sjmn-size-16);
  line-height: 16px;
  white-space: nowrap;
  margin-bottom: 0;
}

.register-text.small {
  font-size: var(--sjmn-size-14);
  line-height: 14px;
}

/* ---- Session warning modal ---- */

.session-warning {
  padding: 0;
  border: 0;
  max-width: none;
  max-height: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgb(from var(--sjmn-color-basic-black) r g b / 40%);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
}

.session-warning[open] {
  display: flex;
}

.session-warning-contents {
  width: min(100%, 600px);
  background-color: var(--sjmn-color-base-white);
  border-radius: 12px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.session-extend-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 24px;
  background-color: var(--sjmn-color-text-color-base);
  color: var(--sjmn-color-base-white);
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

/* ---- Logout modal ----
   Implemented as a HTML5 <dialog> element. The browser hides it by default
   when the dialog has no [open] attribute, and renders an opened dialog in
   the top layer with the ::backdrop pseudo-element supplying the overlay.
   We strip the UA <dialog> chrome (border / padding / background) so the
   inner .logout-modal-frame is the visible card. */

.logout-modal {
  width: min(100%, 600px);
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  overflow: visible;
}

.logout-modal::backdrop {
  background-color: rgb(0 0 0 / 30%);
  background-color: rgb(from var(--sjmn-color-basic-black) r g b / 30%);
}

.logout-modal-frame {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 600px;
  align-items: center;
  gap: 0;
  padding: 32px;
  background-color: var(--sjmn-color-base-white);
  border-radius: 12px;
  overflow: hidden;
}

.logout-modal-title {
  display: flex;
  align-items: flex-start;
  width: 100%;
}

.logout-modal-title-text {
  font-size: 20px;
  font-weight: 700;
  color: var(--sjmn-color-text-color-base);
}

.logout-modal-detail-frame {
  width: 100%;
  padding: 16px 0;
}

.logout-modal-body {
  font-size: var(--sjmn-size-16);
  color: var(--sjmn-color-text-color-base);
  line-height: 1.6;
}

.logout-modal-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 16px;
}

.logout-modal-close-button-frame,
.logout-modal-logout-button-frame {
  padding: 8px 24px;
  border-radius: 8px;
  border: 1px solid var(--sjmn-color-text-color-base);
  cursor: pointer;
  font-size: var(--sjmn-size-16);
}

.logout-modal-logout-button-frame {
  background-color: var(--sjmn-color-subsidy-key-color-new-business-frame);
  color: var(--sjmn-color-base-white);
  border-color: var(--sjmn-color-subsidy-key-color-new-business-frame);
}

/* ---- Token error modal ----
   Same rationale as .logout-modal: HTML5 <dialog> + ::backdrop. */

.token-error-modal {
  width: min(100%, 600px);
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  overflow: visible;
}

.token-error-modal::backdrop {
  background-color: rgb(0 0 0 / 30%);
  background-color: rgb(from var(--sjmn-color-basic-black) r g b / 30%);
}

.token-error-modal-frame {
  background-color: var(--sjmn-color-base-white);
  border-radius: 12px;
  padding: 32px;
  width: 100%;
  max-width: 600px;
}

.token-error-modal-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--sjmn-color-text-color-base);
  margin-bottom: 16px;
}

.token-error-modal-body {
  font-size: var(--sjmn-size-16);
  color: var(--sjmn-color-text-color-base);
  line-height: 1.6;
}

.token-error-modal-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 16px;
}

.token-error-modal-close-button-frame {
  padding: 8px 24px;
  border-radius: 8px;
  border: 1px solid var(--sjmn-color-text-color-base);
  cursor: pointer;
  font-size: var(--sjmn-size-16);
}

/* ---- Gbiz account modal ----
Same rationale as .logout-modal: HTML5 <dialog> + ::backdrop. */
.gbiz-account-modal {
  width: min(100%, 600px);
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  overflow: visible;
}

.gbiz-account-modal::backdrop {
  background-color: rgb(0 0 0 / 30%);
  background-color: rgb(from var(--sjmn-color-basic-black) r g b / 30%);
}

.gbiz-account-modal-close-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: min(260px, 100%);
  padding: 8px 24px;
  border-radius: 30px;
  border: 1px solid #2d3657;
  background-color: #fff;
  color: #2d3657;
  cursor: pointer;
  font-size: var(--sjmn-size-16);
}

.gbiz-account-modal-close-button > img {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ---- Login-required modal ----
   Same rationale as .logout-modal: HTML5 <dialog> + ::backdrop. */

.login-required-modal {
  width: min(100%, 600px);
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  overflow: visible;
}

.login-required-modal::backdrop {
  background-color: rgb(0 0 0 / 30%);
  background-color: rgb(from var(--sjmn-color-basic-black) r g b / 30%);
}

.login-required-modal-frame {
  background-color: var(--sjmn-color-base-white);
  border-radius: 12px;
  padding: 32px;
  width: 100%;
  max-width: 600px;
}

.login-required-modal-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--sjmn-color-text-color-base);
  margin-bottom: 16px;
}

.login-required-modal-body {
  font-size: var(--sjmn-size-16);
  color: var(--sjmn-color-text-color-base);
  line-height: 1.6;
}

.login-required-modal-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 16px;
}

.login-required-modal-close-button-frame {
  padding: 8px 24px;
  border-radius: 8px;
  border: 1px solid var(--sjmn-color-text-color-base);
  cursor: pointer;
  font-size: var(--sjmn-size-16);
}

.dynamic-form-modal-close-btn {
  padding: 8px 24px;
  border-radius: 20px;
  border: 1px solid var(--sjmn-color-text-color-base);
  cursor: pointer;
  font-size: var(--sjmn-size-16);
}

/* ---- SP header ---- */

.menu {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.menu-icon {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.menu-icon span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--sjmn-color-text-color-base);
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}

/* ハンバーガーメニュー開時：× アイコン表示 */
.menu.active .menu-icon span:nth-child(1) {
  transform: rotate(45deg) translateY(10px);
}

.menu.active .menu-icon span:nth-child(2) {
  opacity: 0;
}

.menu.active .menu-icon span:nth-child(3) {
  transform: rotate(-45deg) translateY(-10px);
}

.sp-menu-back {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background-color: var(--sjmn-color-base-white);
  z-index: 100;
  box-shadow: 0 4px 8px rgb(from var(--sjmn-color-basic-black) r g b / 10%);
}

.sp-menu-back:not([hidden]) {
  display: block;
}

.sp-menu-content {
  padding: 16px;
}

.header-nav-links-sp,
.header-actions-sp {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.nav-item-sp,
.nav-item-sp-last {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 20px 8px;
}

.action-item-sp {
  padding: 20px 8px;
}

.action-item-sp .text-wrapper-2 {
  margin: 0;
}

/* SP drawer: remove PC-header fixed height from the logout <button> */
.header-actions-sp .text-wrapper-3 {
  height: auto;
  padding: 0;
  display: block;
  align-items: unset;
  border-radius: 0;
  text-align: left;
}

/* SP drawer: action-item with right-side nav caret (ログイン / マイページ) */
.action-item-sp-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* SP drawer: row dividers — top frame + between items */
.header-actions-sp {
  border-top: 1px solid var(--sjmn-color-border-color-gray);
}

.header-actions-sp > *,
.header-nav-links-sp > * {
  border-bottom: 1px solid var(--sjmn-color-border-color-gray);
}

/* SP drawer: 補助金ホームページ standalone button section */
.sp-menu-hojokin-home {
  padding: 16px 0;
}

.action-item-search-sp {
  padding-bottom: 4px;
}

/* SP drawer: お知らせ summary — caret right-aligned */
.nav-oshirase-sp .nav-oshirase-summary {
  justify-content: space-between;
}

/* SP drawer: お知らせ sub-menu — flat inline accordion (not PC floating dropdown) */
.nav-oshirase-sp .nav-oshirase-menu {
  position: static;
  border: none;
  border-radius: 0;
  box-shadow: none;
  min-width: unset;
  padding: 0;
  background-color: transparent;
}

/* SP drawer: お知らせ sub-items */
.nav-oshirase-menu-item-sp-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 8px 16px 16px;
  text-decoration: none;
}

/* divider between sub-items */
.nav-oshirase-menu-item-sp-inner:not(:last-child) {
  border-bottom: 1px solid var(--sjmn-color-border-color-gray);
}

/* nav-item-sp 右アイコン右寄せ */
.nav-item-sp-icon-right {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* nav-item-sp ボタン UI — text centered, icon pinned right */
.nav-item-sp-button {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 8px 40px;
  border: 1px solid #b2b5c8;
  border-radius: 7.5px;
  background-color: var(--sjmn-color-base-white);
}

.nav-item-sp-button .icons-ac {
  position: absolute;
  right: 12px;
}

/* PC header search box — Figma: 244×32px, border-radius 16px, border var(--sjmn-color-border-color-gray) */
.nav-site-search-form {
  display: inline-flex;
  align-items: center;
  width: 244px;
  height: 32px;
  border: 1px solid var(--sjmn-color-border-color-gray);
  border-radius: 16px;
  background: var(--sjmn-color-base-white);
  padding: 0 10px 0 16px;
  box-sizing: border-box;
  gap: 4px;
  flex-shrink: 0;
}

.nav-site-search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: var(--sjmn-size-12);
  color: var(--sjmn-color-text-color-gray);
  min-width: 0;
  padding: 0;
  margin: 0;
  appearance: none;
}

.nav-site-search-input::placeholder {
  color: var(--sjmn-color-text-color-gray);
}

.nav-site-search-input::-webkit-search-decoration,
.nav-site-search-input::-webkit-search-cancel-button,
.nav-site-search-input::-webkit-search-results-button,
.nav-site-search-input::-webkit-search-results-decoration {
  display: none;
}

.nav-site-search-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* SP menu search */
.nav-sp-search-form {
  margin: 0;
  padding: 0;
}

.nav-sp-search-btn {
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  width: 100%;
  color: inherit;
  font: inherit;
}

/* ---- Main content ---- */

main {
  min-height: calc(100vh - 263px);
  padding: 24px;
}

/* ---- Footer ---- */

.footer-container {
  width: 100%;
  padding: 32px 0;
  background-color: var(--sjmn-color-site-main-color-main-color);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}

.footer-links-block {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}

.footer-links-row {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
}

.footer-link-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 4px;
  border-radius: 8px;
}

.footer-link-text {
  font-size: var(--sjmn-size-16);
  line-height: 24px;
  color: var(--sjmn-color-background-application-screen);
  text-decoration: none;
  white-space: nowrap;
}

.footer-link-text:hover {
  color: rgb(from var(--sjmn-color-base-white) r g b / 70%);
  text-decoration: underline;
}

.footer-copyright {
  font-size: var(--sjmn-size-14);
  color: rgb(from var(--sjmn-color-base-white) r g b / 70%);
  text-align: left;
  line-height: 1.5;
  margin: 0;
}

/* ---- Form focus styles ---- */

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
  box-shadow:
    0 0 0 0.1rem white,
    0 0 0 0.25rem var(--sjmn-color-site-blue);
}

.form-check-input {
  width: 24px;
  height: 24px;
}

@media screen and (width <= 767px) {
  .header-background.ver-pc {
    display: none;
  }

  .header-background.ver-sp {
    display: block;
    height: 122px;
    /* Positioning context for the absolutely positioned .sp-menu-back drawer
       so its `top: 100%` resolves to just below this header (not the viewport). */
    position: relative;
  }

  .header-container {
    width: 100%;
    max-width: 100vw;
  }

  .header-inner {
    width: 100%;
    max-width: 100vw;
    padding: 50px 16px 16px;
  }

  .header-brand {
    width: 234px;
    max-width: 100vw;
    height: 42px;
  }

  .brand-label-image {
    width: 100px;
    height: 27px;
    top: 17px;
    left: 164px;
  }

  .brand-logo-image {
    width: 150px;
    height: 40px;
  }

  .menu {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    position: relative;
    flex: 0 0 auto;
  }

  .menu-icon {
    width: 30px;
    height: 20px;
    justify-content: center;
    align-items: center;
    position: relative;
  }

  .menu-icon span {
    width: 30px;
    height: 3px;
    position: absolute;
  }

  .menu-icon span:nth-child(1) {
    top: 0;
  }

  .menu-icon span:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
  }

  .menu-icon span:nth-child(3) {
    bottom: 0;
  }

  .menu.active .menu-icon span:nth-child(1) {
    transform: translateY(8.5px) rotate(45deg);
  }

  .menu.active .menu-icon span:nth-child(3) {
    transform: translateY(-8.5px) rotate(-45deg);
  }

  .menu-text {
    width: 72px;
    font-size: var(--sjmn-size-18);
    text-align: center;
    line-height: 100%;
    white-space: nowrap;
  }
}

/** 検索窓のカスタマイズ **/

/* 最上位ラッパーのリセット */
.gsc-control-searchbox-only,
.gsc-search-box,
.gsc-search-box-tools {
  height: 32px !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  vertical-align: middle !important;
}

/* 外枠にボーダー + 角丸 + overflow clip でピル形状を実現 */
.gsc-search-box-tools {
  border: 1px solid #d2d2d2 !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  background-color: #fff !important;
}

/* テーブルセルの縦中央揃えとリセット */
.gsc-search-box td {
  height: 100% !important;
  vertical-align: middle !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* 入力セルが残り幅をすべて占有し、ボタンを右端へ押し出す */
.gsc-search-box td.gsc-input {
  flex: 1 !important;
}

/* Remove background image from the CSE input */
.gsc-input-box,
.gsc-input {
  background: none !important;
  height: 32px !important;
  border-radius: 0 !important;
}

/* 左側の検索窓（白背景・高さ統一） */
.gsc-input-box {
  height: 32px !important;
  flex: 1 !important;
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  border-radius: 0 !important;
  padding: 0 10px !important;
  background-color: #fff !important;
  border: none !important;
  box-shadow: none !important;
}

/* 入力欄の基本スタイル（中央揃え + リセット） */
.gsc-input-box input.gsc-input {
  font-size: var(--sjmn-size-16) !important;
  background-color: #fff !important;
  border: none !important;
  box-shadow: none !important;
  height: 100% !important;
  width: 100% !important;
  line-height: 30px !important;
  padding: 0 !important;
  margin: 0 !important;
  outline: none !important;
  display: inline-block !important;
  vertical-align: middle !important;
}

/* 検索ボタンの親セル（縦揃え） */
td.gsc-search-button {
  display: flex !important;
  align-items: center !important;
  vertical-align: middle !important;
  padding: 0 !important;
  margin: 0 !important;
  height: 32px !important;
}

/* 検索ボタン自体（白背景・角丸なしで外枠ピルに委ねる） */
.gsc-search-button-v2,
.gsc-search-button-v2:hover,
.gsc-search-button-v2:focus {
  border-radius: 0 !important;
  background-color: #fff !important;
  padding: 0 12px !important;
  height: 32px !important;
  line-height: 32px !important;
  border: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

button.gsc-search-button-v2 {
  box-sizing: border-box !important;
  max-height: 32px !important;
  margin: 0 !important;
  padding: 0 12px !important;
  border: none !important;
}

/* 検索ボタンを表示する */
.gsc-search-button.gsc-search-button-v2 {
  display: inline-flex !important;
  align-items: center;
}

/* 検索ボタンアイコンのサイズ・色調整 */
.gsc-search-button-v2 svg {
  width: 16px !important;
  height: 16px !important;
  margin: 0 !important;
  fill: #6d6c74 !important;
}

.gsc-search-button-v2 svg path {
  fill: #6d6c74 !important;
}

/* ホバー時の薄くなるエフェクト */
.gsc-search-button-v2:hover {
  opacity: 0.7 !important;
  cursor: pointer !important;
  background-color: #fff !important;
}

/* 検索窓とボタンの間の余白除去 */
table.gsc-search-box td.gsc-input,
table.gsc-search-box td.gsc-search-button {
  padding: 0 !important;
  margin: 0 !important;
}

/* =============================================
   Dynamic Form Engine UI components
   (platform-101 / 応募申請 screen)
   ============================================= */

/* --- Loading overlay --- */
.df-loading-overlay {
  position: fixed;
  inset: 0;
  background: rgb(255 255 255 / 82%);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}

.df-loading-overlay.is-visible {
  display: flex;
}

/* --- Category accordion menu bar --- */
.df-menu-bar .df-category-frame {
  border-bottom: 1px solid rgb(210 210 210 / 100%);
}

.df-menu-bar .df-category-frame summary.df-category-title {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 12px 12px 8px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.df-menu-bar
  .df-category-frame
  summary.df-category-title::-webkit-details-marker {
  display: none;
}

.df-menu-bar .df-category-frame summary.df-category-title:hover {
  background-color: #fff9e6;
}

.df-menu-bar .df-category-name {
  flex: 1;
  font-weight: 700;
  font-size: var(--sjmn-size-14);
  color: rgb(45 54 87 / 100%);
  line-height: 1.4;
  word-break: break-word;
}

.df-menu-bar .df-accordion-icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
  color: #6c757d;
}

.df-menu-bar .df-category-frame[open] .df-accordion-icon {
  transform: rotateX(180deg);
}

.df-menu-bar .df-sub-list {
  padding: 4px 8px 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.df-menu-bar .df-status-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border: 1px solid rgb(210 210 210 / 100%);
  border-radius: 6px;
  cursor: pointer;
  background: #fff;
  font-size: 0.8125rem;
  color: rgb(45 54 87 / 100%);
  transition: border-color 0.15s ease;
}

.df-menu-bar .df-status-item:hover {
  border-color: rgb(239 72 152 / 100%);
}

.df-menu-bar .df-status-item.active {
  background-color: #faf1db;
  border-color: rgb(239 72 152 / 100%);
}

/* --- Step progress bar --- */
.df-step-bar {
  margin-bottom: 1rem;
}

/* --- Navigation buttons (次に進む / 前に戻る) --- */
.df-transition-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.df-back-button {
  min-width: 120px;
}

.df-next-button {
  min-width: 140px;
}

/* ===================================================================
   platform-101: OuboShinsei / TestShinsei design system
   All rules scoped to .div-wrapper to avoid collisions with Bootstrap.
   Source: hojokinshinsei.css (新事業補助金 legacy) + design review.
   =================================================================== */

/* Outer page layout: frame, breadcrumb, title, contents */
.div-wrapper .frame {
  display: flex;
  flex-direction: column;
  width: 1200px;
  align-items: flex-start;
  gap: 24px;
  padding: 16px 0 0;
  margin: 0 auto;
}

.div-wrapper .bread-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  align-self: stretch;
  width: 100%;
}

.div-wrapper .bread-list-text-upper {
  font-size: var(--sjmn-size-14);
  color: #003ad8;
}

.div-wrapper .bread-list-text-upper a {
  color: #003ad8;
  text-decoration: none;
}

.div-wrapper .bread-list-text-upper a:hover {
  text-decoration: underline;
}

.div-wrapper .bread-list-icon {
  width: 16px;
  height: 16px;
}

.div-wrapper .bread-list-text-here {
  font-size: var(--sjmn-size-14);
  color: rgb(89 88 95 / 100%);
  white-space: nowrap;
}

.div-wrapper .title-frame {
  display: flex;
  align-items: center;
  gap: 16px;
}

.div-wrapper .title-img {
  align-self: stretch;
  flex: 0 0 auto;
}

.div-wrapper .title {
  font-size: var(--sjmn-size-32);
  font-weight: 400;
  color: rgb(45 54 87 / 100%);
  line-height: 48px;
  margin: 0;
}

.div-wrapper .contents-frame {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 24px;
  width: 100%;
}

.div-wrapper
  .contents-frame:not(.js-ready)
  #dynamic-form-main-form
  > :not(.df-loading-overlay),
.div-wrapper .contents-frame:not(.js-ready) .df-menu-bar {
  opacity: 0;
}

.div-wrapper
  .contents-frame.js-ready
  #dynamic-form-main-form
  > :not(.df-loading-overlay),
.div-wrapper .contents-frame.js-ready .df-menu-bar {
  transition: opacity 0.15s ease;
}

.div-wrapper .application-form-frame {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
  min-width: 0;
}

/* Required / Optional tags */
.div-wrapper .required-tag {
  display: flex;
  white-space: nowrap;
  flex-shrink: 0;
  align-self: center;
  padding: 3px 6px;
  justify-content: center;
  align-items: center;
  gap: 10px;
  border-radius: 8px;
  border: 1px solid var(--alert-alert, #cc0505);
  background: #fff;
  color: var(--alert-alert, #cc0505);
  font-family: "Noto Sans JP", Meiryo, sans-serif;
  font-size: var(--sjmn-size-14);
  font-style: normal;
  font-weight: 700;
}

.div-wrapper .optional-tag {
  display: flex;
  white-space: nowrap;
  flex-shrink: 0;
  align-self: center;
  padding: 3px 6px;
  justify-content: center;
  align-items: center;
  gap: 10px;
  border-radius: 8px;
  border: 1px solid var(--primary, #2d3657);
  background: #fff;
  font-size: var(--sjmn-size-14);
  font-weight: 700;
  color: rgb(89 88 95 / 100%);
}

/* Form card: groups related form items with white background + rounded corners */
.div-wrapper .form-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  padding: 32px;
  background-color: rgb(255 255 255 / 100%);
  border-radius: 12px;
  width: 100%;
  margin-bottom: 4px;
}

/* Step bar */
.div-wrapper .step-frame {
  align-self: stretch;
  width: 100%;
  margin-bottom: 0;
}

/* Single-row layout: [bar] [入力ステップ N/M] */
.div-wrapper .step-bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.div-wrapper .step-bar-bg {
  width: 100%;
  height: 8px;
  background-color: #ecf2ff;
  border-radius: 4px;
  overflow: hidden;
}

.div-wrapper .step-bar-fill {
  width: 0%;
  height: 100%;
  background-color: #1e02ac;
  transition: width 0.3s ease;
}

.div-wrapper .step-text-ratio {
  font-size: var(--sjmn-size-14);
  font-weight: 700;
  white-space: nowrap;
  background-color: #ecf2ff;
  padding: 2px 10px;
  border-radius: 12px;
}

/* Section title below progress bar */
.div-wrapper .form-title-frame {
  display: flex;
  align-items: center;
  align-self: stretch;
  width: 100%;
  padding: 0;
}

.div-wrapper .form-title-text {
  font-weight: 700;
  color: #1e02ac;
  font-size: var(--sjmn-size-32);
  line-height: 1.4;
  word-break: break-all;
  margin: 0;
  padding-bottom: 16px;
  gap: 24px;
}

/* GビズID fill bar */
.div-wrapper .Gbiz-fill-frame {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
  position: relative;
  align-self: stretch;
  width: 100%;
  flex: 0 0 auto;
  background-color: rgb(235 239 244 / 100%);
}

.div-wrapper .Gbiz-fill-text {
  position: relative;
  flex: 1;
  margin-top: -1px;
  font-weight: 400;
  color: rgb(45 54 87 / 100%);
  font-size: var(--sjmn-size-16);
  letter-spacing: 0;
  line-height: 150%;
}

.div-wrapper .Gbiz-fill-button {
  flex: 0 0 auto;
  display: inline-flex;
  height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  position: relative;
  background-color: #fff;
  border-radius: 8px;
  border: 1px solid rgb(210 210 210 / 100%);
  box-shadow: 0 3px 0 0 rgb(0 0 0 / 20%);
}

.div-wrapper .Gbiz-fill-button:disabled {
  box-shadow: none;
  background-color: #d9d9d9;
  cursor: default;
  border: none;
}

.div-wrapper .Gbiz-fill-button:disabled .Gbiz-fill-button-text {
  color: rgb(45 54 87 / 40%);
}

.div-wrapper .Gbiz-fill-button:not(:disabled):hover {
  border: 1px solid #f5b693;
  background: #faf1db;
  cursor: pointer;
  box-shadow: none;
}

.file-item-frame .upload-btn:disabled,
.file-item-frame .upload-btn[disabled],
.file-item-frame .excelimport-btn:disabled,
.file-item-frame .excelimport-btn[disabled] {
  background: #d9d9d9;
  border-color: #d9d9d9;
  color: #2d365766;
  opacity: 1;
  cursor: not-allowed;
  box-shadow: none;
}

.div-wrapper .Gbiz-fill-button-text {
  width: fit-content;
  font-weight: 700;
  color: rgb(45 54 87 / 100%);
  font-size: var(--sjmn-size-16);
  line-height: 16px;
  white-space: nowrap;
  position: relative;
  letter-spacing: 0;
}

/* Form items */
.div-wrapper .form-item {
  align-self: stretch;
  width: 100%;
  padding-top: 24px;
}

.div-wrapper .form-item + .form-item {
  border-top: 1px solid rgb(210 210 210 / 100%);
}

.div-wrapper .form-item--label + .form-item {
  border-top: none;
}

.div-wrapper .form-item:has(.section-header) + .form-item {
  border-top: none;
}

.div-wrapper .section-header {
  width: 100%;
}

.div-wrapper .section-header__label {
  font-weight: 700;
  font-size: var(--sjmn-size-22);
  color: rgb(45 54 87 / 100%);
  line-height: 1.5;
  word-break: break-all;
}

.div-wrapper .char-count {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  padding: 0 28px 0 0;
  position: relative;
  align-self: stretch;
  width: 100%;
  flex: 0 0 auto;
}

.div-wrapper .char-current,
.div-wrapper .char-label,
.div-wrapper .char-max {
  position: relative;
  width: fit-content;
  text-align: right;
  font-family: "Noto Sans JP", sans-serif;
  font-weight: 400;
  color: rgb(89 88 95 / 100%);
  font-size: var(--sjmn-size-16);
  line-height: 150%;
  white-space: nowrap;
  letter-spacing: 0;
  font-style: normal;
}

.div-wrapper .confirm-empty-message {
  margin: 0;
  font-size: var(--sjmn-size-16);
  color: rgb(89 88 95 / 100%);
}

.div-wrapper .form-filter-frame {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
}

.div-wrapper .form-filter-message {
  align-self: stretch;
  text-align: center;
  font-family: "Noto Sans JP", sans-serif;
  font-weight: 400;
  color: rgb(45 54 87 / 100%);
  font-size: var(--sjmn-size-16);
  line-height: 150%;
}

.div-wrapper .filter-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
  flex-wrap: wrap;
}

.div-wrapper .form-filter-button {
  display: flex;
  height: 48px;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 0 16px;
  position: relative;
  flex: 1 1 180px;
  background-color: #fff;
  border-radius: 8px;
  border: 1px solid rgb(217 217 217 / 100%);
  box-shadow: 0 3px 0 0 rgb(0 0 0 / 20%);
}

.div-wrapper .form-filter-button:hover,
.div-wrapper .form-filter-button.active {
  background-color: #ebeff4;
  border-color: #1e02ac;
  box-shadow: none;
  cursor: pointer;
}

.div-wrapper .filter-button-text {
  font-family: "Noto Sans JP", sans-serif;
  font-weight: 700;
  color: rgb(45 54 87 / 100%);
  font-size: var(--sjmn-size-16);
  line-height: 16px;
  white-space: nowrap;
}

.div-wrapper .lv0-group-frame {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
}

/* Confirm page specific style overrides (moved from inline style) */
body.confirm-page .div-wrapper .step-frame {
  margin-bottom: 0;
}

body.confirm-page .div-wrapper .step-bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

body.confirm-page .div-wrapper .step-bar-bg {
  flex: 1;
  background-color: #ecf2ff;
}

body.confirm-page .div-wrapper .step-bar-fill {
  background-color: #1e02ac;
}

body.confirm-page .div-wrapper .step-text-ratio.confirm-step-ratio {
  white-space: nowrap;
  font-size: var(--sjmn-size-14);
  font-weight: 700;
  color: #2d3657;
  background-color: transparent;
  padding: 0;
  margin: 0;
  flex-shrink: 0;
}

body.confirm-page .div-wrapper .lv0-title-frame {
  margin-bottom: 0;
}

body.confirm-page .div-wrapper .lv0-title {
  margin: 0;
  color: #000;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.5;
}

body.confirm-page .div-wrapper .form-filter-frame {
  border-top: 1px solid #1e02ac;
  border-bottom: 1px solid #1e02ac;
  padding-top: 12px;
  padding-bottom: 12px;
}

body.confirm-page .div-wrapper .category-switch-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

body.confirm-page .div-wrapper .category-switch-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body.confirm-page .div-wrapper .transition-button-frame.mt-4 {
  justify-content: flex-start;
  gap: 16px;
  margin-top: 0;
  min-height: 56px;
}

body.confirm-page .div-wrapper .transition-button-frame.mt-4 .back-button,
body.confirm-page .div-wrapper .transition-button-frame.mt-4 .forward-button {
  display: inline-flex;
  width: 220px;
  height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 24px;
  border-radius: 30px;
  font-size: var(--sjmn-size-18);
  font-weight: 700;
  line-height: 1;
}

body.confirm-page .div-wrapper .transition-button-frame.mt-4 .back-button {
  border: 1px solid rgb(45 54 87 / 100%);
  background-color: #fff;
  color: rgb(45 54 87 / 100%);
}

body.confirm-page
  .div-wrapper
  .transition-button-frame.mt-4
  .back-button
  .back-button-text {
  font-size: var(--sjmn-size-18);
}

body.confirm-page .div-wrapper .transition-button-frame.mt-4 .forward-button {
  margin-left: auto;
}

body.confirm-page
  .div-wrapper
  .transition-button-frame.mt-4
  .forward-button:disabled {
  background-color: #9ca3b8;
  border-color: #9ca3b8;
  cursor: not-allowed;
  box-shadow: none;
}

body.confirm-page .div-wrapper [data-testid="confirm-next-btn"]::after {
  content: "";
  display: inline-block;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  background-image: url("/img/icons/shinsei/icon-forward-button.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

body.confirm-page .div-wrapper .input-item-frame + .input-item-frame {
  border-top: 1px solid rgb(210 210 210 / 100%);
  padding-top: 16px;
}

body.confirm-page .div-wrapper .line-between-item {
  display: none;
}

body.confirm-page .div-wrapper .lv1-title-frame {
  padding-top: 0;
}

body.confirm-page .div-wrapper .lv0-group-frame {
  gap: 12px;
}

.div-wrapper .lv0-group-frame.hidden {
  display: none;
}

.div-wrapper .lv1-title-frame {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  align-self: stretch;
  gap: 10px;
  padding: 16px 0 8px;
  width: 100%;
  border-bottom: 3px solid #1e02ac;
}

.div-wrapper .lv1-title {
  margin: 0;
  font-family: "Noto Sans JP", sans-serif;
  font-weight: 700;
  color: #1e02ac;
  font-size: var(--sjmn-size-22);
  line-height: 33px;
}

.div-wrapper .lv2-frame {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.div-wrapper .lv2-title-frame {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 8px;
  padding: 4px 16px;
  background-color: rgb(45 54 87 / 100%);
}

.div-wrapper .lv2-title {
  margin: 0;
  align-self: stretch;
  font-family: "Noto Sans JP", sans-serif;
  font-weight: 700;
  color: #fff;
  font-size: var(--sjmn-size-22);
  line-height: 33px;
}

.div-wrapper .modify-button-frame {
  display: flex;
  width: 100%;
  height: 40px;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.div-wrapper .modify-link {
  text-decoration: none;
}

.div-wrapper .modify-button {
  display: inline-flex;
  height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  background-color: #fff;
  border-radius: 30px;
  border: 1px solid rgb(45 54 87 / 100%);
}

.div-wrapper .modify-button:hover {
  background-color: rgb(255 200 100 / 20%);
  border-color: #4059fc;
  box-shadow: none;
}

.div-wrapper .modify-img {
  width: 20px;
  height: 20px;
}

.div-wrapper .modify-button-text {
  width: fit-content;
  margin: 0;
  font-family: "Noto Sans JP", sans-serif;
  font-weight: 400;
  color: rgb(45 54 87 / 100%);
  font-size: var(--sjmn-size-18);
  line-height: 100%;
  white-space: nowrap;
}

.div-wrapper .input-item-frame {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
}

.div-wrapper .input-item-title {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 0 0 12px;
  font-family: "Noto Sans JP", sans-serif;
  font-weight: 700;
  color: rgb(45 54 87 / 100%);
  font-size: var(--sjmn-size-22);
  line-height: 33px;
  white-space: normal;
  word-break: break-word;
}

.div-wrapper .input-item-contents {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: flex-start;
  font-family: "Noto Sans JP", sans-serif;
  font-weight: 400;
  color: rgb(45 54 87 / 100%);
  font-size: var(--sjmn-size-18);
  line-height: 150%;
  white-space: pre-wrap;
  word-break: break-word;
}

.div-wrapper .line-between-item {
  position: relative;
  margin: 8px 0 16px;
  align-self: stretch;
  width: 100%;
  height: 1px;
  background-color: rgb(210 210 210 / 100%);
  flex: 0 0 auto;
}

.div-wrapper .form-item .form-label {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  align-content: center;
  margin-bottom: 8px;
}

.div-wrapper .label-help-wrapper {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 8px;
}

.div-wrapper .label-text {
  font-weight: 700;
  font-size: var(--sjmn-size-22);
  color: rgb(45 54 87 / 100%);
  line-height: 1.5;
  white-space: break-spaces;
  word-break: break-all;
}

/* Navigation buttons */
.div-wrapper .transition-button-frame.mt-4 {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 24px;
  position: relative;
  margin-top: 0;
  min-height: 72px;
}

.div-wrapper .subsidy-frame-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: var(--sjmn-size-18);
  font-weight: 700;
  color: rgb(45 54 87 / 100%);
  line-height: 1.4;
}

.div-wrapper .subsidy-frame-value {
  display: flex;
  height: 30px;
  padding: 5px 16px;
  justify-content: center;
  align-items: center;
  gap: 10px;
  border-radius: 5px;
  background: var(--waku-color, #df227d);
  color: #fff;
  font-size: var(--sjmn-size-16);
  line-height: 1;
}

.div-wrapper .forward-button {
  display: inline-flex;
  height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-left: auto;
  padding: 8px 24px;
  background-color: #1e02ac;
  border-radius: 30px;
  box-shadow: 0 3px 0 0 rgb(0 0 0 / 20%);
  border: none;
  cursor: pointer;
}

.div-wrapper [data-testid="dynamic-form__submit-button"]::after {
  content: "";
  display: inline-block;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  background-image: url("/img/icons/shinsei/icon-forward-button.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.div-wrapper .forward-button:hover {
  background-color: #4059fc;
  box-shadow: none;
}

.div-wrapper .forward-button-text {
  font-weight: 700;
  color: #fff;
  font-size: var(--sjmn-size-18);
  white-space: nowrap;
}

.div-wrapper .back-button {
  display: inline-flex;
  height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  background-color: #fff;
  border-radius: 30px;
  border: 1px solid rgb(45 54 87 / 100%);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.div-wrapper [data-testid="dynamic-form__back-button"]::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  background-image: url("/img/icons/shinsei/icon-previous-button.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.div-wrapper .back-button:hover {
  background-color: #4059fc;
  border-color: #4059fc;
}

.div-wrapper .back-button-text {
  white-space: nowrap;
  font-size: var(--sjmn-size-16);
}

.div-wrapper .back-button-icon {
  width: 20px;
  height: 20px;
}

.div-wrapper .final-agreement-frame {
  display: flex;
  flex-direction: column;
  width: 100%;
  align-items: center;
  gap: 24px;
  position: relative;
}

.div-wrapper .final-agreement-text {
  position: relative;
  margin-top: -1px;
  font-family: "Noto Sans JP", sans-serif;
  font-weight: 700;
  color: rgb(45 54 87 / 100%);
  font-size: var(--sjmn-size-18);
  letter-spacing: 0;
  line-height: 100%;
  text-align: center;
}

.div-wrapper .final-agreement-button {
  display: flex;
  width: 230px;
  height: 48px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 8px 24px;
  background-color: rgb(217 217 217 / 100%);
  border: 1px solid rgb(217 217 217 / 100%);
  position: relative;
  border-radius: 30px;
  box-shadow: none;
}

.div-wrapper .final-agreement-button.active {
  background-color: #1e02ac;
  border-color: #1e02ac;
  box-shadow: 0 3px 0 0 rgb(0 0 0 / 20%);
  cursor: pointer;
}

.div-wrapper .final-agreement-button.active:hover {
  background-color: #4059fc;
  border-color: #4059fc;
  box-shadow: none;
}

.div-wrapper .final-agreement-button:disabled {
  cursor: not-allowed;
}

.div-wrapper .final-agreement-button-text {
  position: relative;
  margin: 0;
  font-family: "Noto Sans JP", sans-serif;
  font-weight: 700;
  color: #fff;
  font-size: var(--sjmn-size-18);
  letter-spacing: 0;
  line-height: 100%;
  white-space: nowrap;
}

.confirm-modal.hidden {
  display: none;
}

.confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 1055;
  display: flex;
  align-items: center;
  justify-content: center;
}

.confirm-modal-backdrop {
  position: absolute;
  inset: 0;
  background-color: rgb(0 0 0 / 45%);
}

.modal-dialog-dynamic-form {
  max-width: min(960px, calc(100vw - 32px));
}

@media (width < 576px) {
  /* Bootstrap XS では margin: 0.5rem (8px) が固定のため、
     max-width を利用可能幅にぴったり合わせて左右均等配置にする。 */
  .modal-dialog-dynamic-form {
    max-width: calc(100% - 1rem);
  }
}

.confirm-modal-dialog {
  position: relative;
  z-index: 1060;
  width: min(800px, calc(100vw - 32px));
}

.confirm-modal-content.final-agreement-modal-frame {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 32px;
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgb(0 0 0 / 20%);
}

/* Fallback for stale runtime markup that still uses aria-label instead of title element. */
#final-agreement-modal[data-requires-checklist="true"]
  .confirm-modal-dialog[aria-label]
  .confirm-modal-content.final-agreement-modal-frame::before {
  content: "補助金申請 最終確認";
  display: block;
  align-self: stretch;
  font-family: "Noto Sans JP", sans-serif;
  font-weight: 700;
  color: rgb(45 54 87 / 100%);
  font-size: 36px;
  line-height: 1.4;
}

.final-agreement-modal-title {
  display: flex;
  align-items: flex-start;
  align-self: stretch;
}

.modal-title-img {
  width: 24px;
  height: 24px;
}

.modal-title-text {
  font-family: "Noto Sans JP", sans-serif;
  font-weight: 700;
  color: rgb(45 54 87 / 100%);
  font-size: 36px;
  line-height: 1.4;
}

.final-agreement-modal-heading {
  width: 100%;
  font-size: 30px;
  font-weight: 700;
  color: rgb(45 54 87 / 100%);
  line-height: 1.4;
}

.final-agreement-modal-divider {
  width: 100%;
  height: 1px;
  background-color: rgb(210 210 210 / 100%);
}

.final-agreement-modal-explain {
  width: 100%;
}

.final-agreement-modal-subtitle {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
}

.final-agreement-modal-subtitle-text {
  margin: 0;
  font-family: "Noto Sans JP", sans-serif;
  font-weight: 400;
  color: rgb(45 54 87 / 100%);
  font-size: var(--sjmn-size-18);
  line-height: 150%;
}

.final-agreement-checklist {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}

.final-agreement-check-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: var(--sjmn-size-18);
  line-height: 24px;
  color: rgb(45 54 87 / 100%);
  cursor: pointer;
}

.final-agreement-check-input {
  width: 24px;
  height: 24px;
  margin-top: 0;
  flex: 0 0 auto;
}

.final-agreement-button-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  position: relative;
  align-self: stretch;
  width: 100%;
}

.modal-cancel-button {
  display: flex;
  width: 198px;
  height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  position: relative;
  background-color: #fff;
  border-radius: 30px;
  border: 1px solid rgb(45 54 87 / 100%);
  text-decoration: none;
}

.modal-cancel-button:hover {
  background-color: rgb(255 200 100 / 20%);
  cursor: pointer;
  box-shadow: none;
}

.modal-cancel-button-text {
  font-family: "Noto Sans JP", sans-serif;
  font-weight: 400;
  font-size: var(--sjmn-size-18);
  line-height: 100%;
  color: rgb(45 54 87 / 100%);
}

.submit-apply-button {
  display: flex;
  width: auto;
  min-width: 220px;
  height: 48px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 8px 24px;
  position: relative;
  background-color: rgb(217 217 217 / 100%);
  border-radius: 30px;
  border: 1px solid rgb(217 217 217 / 100%);
  text-decoration: none;
}

.submit-apply-button.active {
  background-color: #1e02ac;
  border-color: #1e02ac;
  box-shadow: 0 3px 0 0 rgb(0 0 0 / 20%);
}

.submit-apply-button.active:hover {
  background-color: #4059fc;
  border-color: #4059fc;
  box-shadow: none;
}

.submit-apply-button:disabled {
  cursor: not-allowed;
  box-shadow: none;
}

.submit-apply-button-text {
  font-family: "Noto Sans JP", sans-serif;
  font-weight: 700;
  font-size: var(--sjmn-size-18);
  line-height: 100%;
  color: rgb(45 54 87 / 40%);
}

.submit-apply-button-text.active {
  color: #fff;
}

@media (width <= 768px) {
  .final-agreement-modal-heading {
    font-size: 26px;
  }

  .final-agreement-check-item {
    font-size: var(--sjmn-size-18);
  }

  .final-agreement-button-frame {
    justify-content: center;
  }

  .submit-apply-button {
    min-width: 198px;
  }
}

/* Sidebar: sticky outer wrapper.
   align-self: stretch makes this flex item span the full .contents-frame cross-axis height
   so the inner sticky element is correctly bounded and never overlaps the footer.
   Inspired by: https://abouolia.github.io/sticky-sidebar/ */
.div-wrapper .sidebar-sticky-outer {
  width: 328px;
  min-width: 328px;
  flex-shrink: 0;
  align-self: stretch;
}

/* Sidebar: application status frame */
.div-wrapper .application-status-frame {
  width: 328px;
  min-width: 328px;
  flex-shrink: 0;
  /* flex-column layout: save-frame is pinned at top, category list scrolls independently.
     overflow-y must NOT be set here — it is set on .category-scroll-area instead.
     Prevent visual overlap with the page footer:
     Calculation: top(10px) + footer(≈133px) + buffer(17px) = 160px. */
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 10px;
  max-height: calc(100vh - 160px);
  background-color: rgb(235 239 244 / 100%);
  border-radius: 12px;
}

/* Scrollable wrapper for the category navigation list.
   flex: 1 + min-height: 0 lets it expand to fill the remaining sidebar height
   while the save-frame above stays always visible. */
.div-wrapper .category-scroll-area {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  padding-bottom: 24px;
  scrollbar-width: none;
}

.div-wrapper .category-scroll-area::-webkit-scrollbar {
  display: none;
}

.div-wrapper .save-frame {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid rgb(210 210 210 / 100%);
  flex-shrink: 0;
}

.div-wrapper .save-button {
  display: flex;
  width: 100%;
  min-height: 44px;
  height: auto;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 8px 12px;
  margin: 0;
  box-sizing: border-box;
  background-color: #fff;
  border-radius: 8px;
  border: 1px solid rgb(210 210 210 / 100%);
  box-shadow: 0 3px 0 0 rgb(0 0 0 / 20%);
  cursor: pointer;
  font-weight: 700;
  flex-wrap: wrap;
}

.div-wrapper .save-button::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  background-image: url("/img/icons/shinsei/icon-save-light.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.div-wrapper .save-button:hover {
  border-color: #1e02ac;
  background-color: #ebeff4;
  box-shadow: none;
}

.div-wrapper .save-button-text {
  font-weight: 700;
  color: rgb(45 54 87 / 100%);
  font-size: var(--sjmn-size-16);
  line-height: 1.4;
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
  text-align: center;
}

.div-wrapper .resume-text {
  font-size: 13px;
  color: rgb(45 54 87 / 100%);
  text-align: center;
  align-self: center;
  width: 100%;
}

/* ====== 入力時の注意事項 divider ====== */
.div-wrapper .input-note-divider {
  height: 1px;
  background-color: rgb(210 210 210 / 100%);
  width: 100%;
  margin: 16px 0;
}

/* ====== 入力時の注意事項 section ======
  Cache-bust marker: 2026-06-25 sidebar-note-spacing-r2 */
.div-wrapper .input-note {
  display: flex;
  flex-direction: column;
  width: 100%;
  align-items: flex-start;
  gap: 8px;
  padding: 0 12px 12px;
  position: relative;
}

.div-wrapper .application-status-frame > .input-note {
  margin-top: 16px;
}

/* ====== 入力時の注意事項 title ====== */
.div-wrapper .input-note__title {
  font-size: var(--sjmn-size-16);
  font-weight: 700;
  color: rgb(45 54 87 / 100%);
  margin: 0;
  line-height: 1.4;
  width: 100%;
}

/* ====== 入力時の注意事項 description ====== */
.div-wrapper .input-note__description {
  font-size: 13px;
  color: rgb(45 54 87 / 100%);
  line-height: 1.5;
  width: 100%;
  margin: 0;
}

.div-wrapper .input-note__description p {
  margin: 0 0 8px;
}

.div-wrapper .input-note__description ul {
  margin: 0;
  padding-left: 20px;
  list-style-type: disc;
}

.div-wrapper .input-note__description li {
  margin-bottom: 4px;
  list-style-type: disc;
}

/* ====== 入力時の注意事項 links ====== */
.div-wrapper .input-note__link {
  color: rgb(0 62 230 / 100%);
  text-decoration: underline;
  cursor: pointer;
}

/* Page-level heading (e.g., 応募申請 title) */
.div-wrapper .page-heading {
  font-size: 26px;
  font-weight: 700;
  color: rgb(45 54 87 / 100%);
  margin: 0;
  line-height: 1.4;
}

/* Category2 label shown below the progress bar inside the form card */
.div-wrapper .form-category-heading {
  font-size: 20px;
  font-weight: 700;
  color: rgb(45 54 87 / 100%);
  margin-bottom: 8px;
  line-height: 1.4;
}

/* Category accordion */
.div-wrapper .category-frame {
  border-bottom: 1px solid rgb(210 210 210 / 100%);
}

.div-wrapper .category-title {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 20px 16px 20px 8px;
  list-style: none;
  cursor: pointer;
}

.div-wrapper .category-title:hover {
  background-color: #ebeff4;
}

.div-wrapper .category-name {
  flex: 1;
  font-weight: 700;
  color: rgb(45 54 87 / 100%);
  font-size: var(--sjmn-size-18);
  line-height: 1.4;
  padding-left: 1.2em;
  text-indent: -1.2em;
}

.div-wrapper .accordion-icon {
  width: 24px;
  height: 24px;
  transition: transform 0.4s ease;
}

.div-wrapper .category-frame[open] .accordion-icon {
  transform: rotateX(180deg);
}

.div-wrapper .sub-category-frame {
  padding: 0 8px 16px 16px;
}

.div-wrapper .sub-category-text {
  padding: 12px 0 4px;
  font-weight: 700;
  color: #1e02ac;
  font-size: var(--sjmn-size-18);
  line-height: 1;
}

.div-wrapper .status-frame {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background-color: #fff;
  border-radius: 8px;
  border: 1px solid rgb(235 239 244 / 100%);
  cursor: pointer;
  margin-bottom: 4px;
  /* Reset <a> tag styles so it looks the same as a <div> */
  text-decoration: none;
  color: inherit;
}

.div-wrapper .status-frame:hover {
  border-color: var(--main-color, #1e02ac);
  text-decoration: none;
}

.div-wrapper .status-frame.active {
  background-color: #ecf2ff;
  border-color: var(--main-color, #1e02ac);
}

/* Category2 sidebar link shown as greyed-out when all its fields are hidden by DSL conditions */
.div-wrapper .status-frame.nav-hidden {
  background-color: rgb(235 239 244 / 60%);
  border-color: rgb(210 210 210 / 60%);
  cursor: not-allowed;
  pointer-events: none;
  opacity: 0.45;
}

.div-wrapper .status-text {
  flex: 1;
  font-size: var(--sjmn-size-16);
  color: rgb(45 54 87 / 100%);
  line-height: 1.4;
  word-break: break-word;
}

/* Sidebar category status icons — hidden by default, shown via .show class set by binder.js */
.div-wrapper .status-frame .status-icon,
.div-wrapper .status-frame .validation-icon {
  display: none;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

.div-wrapper .status-frame .status-icon.show,
.div-wrapper .status-frame .validation-icon.show {
  display: block;
}

/* Category0 (大項目) header check/error icons — hidden by default, shown via .show class set by nav-visibility.js */
.div-wrapper .category-check-icon,
.div-wrapper .category-error-icon {
  display: none;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

.div-wrapper .category-check-icon.show,
.div-wrapper .category-error-icon.show {
  display: block;
}

/* Wrapper that places the checkmark icon and error text side-by-side.
   Reserves min-height so the divider line position stays stable. */
.div-wrapper .field-status-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  margin-top: 4px;
}

/* Field validation status icon — opacity-hidden by default so its space is always reserved. */
.div-wrapper .field-checkmark {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  opacity: 0;
  pointer-events: none;
}

.div-wrapper .field-checkmark.check-valid,
.div-wrapper .field-checkmark.check-error {
  opacity: 1;
  pointer-events: auto;
}

.div-wrapper .field-checkmark .status-icon,
.div-wrapper .field-checkmark .validation-icon {
  display: none;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.div-wrapper .field-checkmark.check-valid .status-icon {
  display: inline-block;
}

.div-wrapper .field-checkmark.check-error .validation-icon {
  display: inline-block;
  width: 24px;
  height: 24px;
}

/* Validation error message area */
.div-wrapper .field-error-area {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Narrow-width input modifier — for short-digit text and small-option selects */
.div-wrapper .form-control--narrow {
  max-width: 192px;
}

/* Date and month inputs are always narrow */
.div-wrapper input[type="date"].form-control {
  max-width: 192px;
}

.div-wrapper input[type="month"].form-control {
  max-width: 192px;
}

/* Format/length hint displayed below the description */
.div-wrapper .form-input-hint {
  color: #6c757d;
  font-family: "Noto Sans JP", Meiryo, sans-serif;
  font-style: normal;
  font-size: var(--sjmn-size-16);
  font-weight: 400;
  margin-top: 2px;
  margin-bottom: 8px;
}

/* Explanation text rendered below each field label */
.div-wrapper .form-description {
  align-self: stretch;
  color: var(--text-primary, #2d3657);
  font-family: "Noto Sans JP", Meiryo, sans-serif;
  font-size: var(--sjmn-size-16);
  font-style: normal;
  font-weight: 400;
  line-height: 170%;
  margin-bottom: 8px;
  word-break: break-all;
}

/* Input/select default state: light background and neutral border */
.div-wrapper .form-control,
.div-wrapper .form-select {
  background-color: #f8f9fb;
  border-color: #d2d2d2;
  border-radius: 8px;
  color: #2d3657;
}

.div-wrapper input.form-control::placeholder,
.div-wrapper textarea.form-control::placeholder {
  color: rgb(45 54 87 / 70%);
}

/* Bootstrap's input-group zeroes right border-radius (specificity 0,6,0) to
   connect inputs to addon boxes. Since item-unit has no border/background,
   the visual connection does not apply — restore full rounded corners. */
.div-wrapper .input-group .form-control {
  border-top-right-radius: 8px !important;
  border-bottom-right-radius: 8px !important;
}

/* Filled state: white background when content is entered */
.div-wrapper input.form-control:not(:placeholder-shown),
.div-wrapper textarea.form-control:not(:placeholder-shown) {
  background-color: #fff;
}

/* Readonly state overrides the filled-state white so locked/gbiz fields look disabled */
.div-wrapper input.form-control[readonly] {
  background-color: #e9ecef;
  color: #6c757d;
}

/* Focus ring for text inputs and selects: purple */
.div-wrapper input.form-control:focus,
.div-wrapper .form-select:focus {
  border-color: #d2d2d2;
  outline: 3px solid #727ce9;
  outline-offset: 2px;
  box-shadow: none;
}

/* Focus ring for textarea: light blue */
.div-wrapper textarea.form-control:focus {
  border-color: #d2d2d2;
  outline: 3px solid #b3e7ff;
  outline-offset: 2px;
  box-shadow: none;
}

/* Auto-resize: JS controls height, so suppress scrollbar and drag handle.
   Excel-import preview textareas are included in JS auto-resize and keep the
   width fixed by the table layout. */
.div-wrapper textarea.form-control {
  min-height: 79px;
  overflow-y: hidden;
  resize: none;
}

.div-wrapper .excel-import-table textarea.form-control {
  overflow-y: auto;
  resize: vertical;
}

/* Radio/checkbox option labels — same colour as description text */
.div-wrapper .form-check {
  display: flex;
  padding: 4px 8px;
  align-items: center;
  gap: 8px;
  align-self: stretch;
  border-radius: 8px;
}

/* Gray background variant for acknowledgement-type checkboxes */
.div-wrapper .form-check.checkbox-gray-bg {
  background-color: var(--sjmn-color-basic-background-color-grayplus1);
  padding: 8px 16px;
}

.div-wrapper .form-check.checkbox-gray-bg:hover {
  background-color: var(--sjmn-color-basic-background-color-grayplus1);
}

/* Radio/checkbox row hover: light blue tint */
.div-wrapper .form-check:hover {
  background-color: #ecf2ff;
  cursor: pointer;
}

.div-wrapper .form-check .form-check-input {
  margin: 0;
  flex: 0 0 auto;
  border-color: #2d3657;
  cursor: pointer;
}

/* Focus ring for radio/checkbox: purple, matching text inputs and selects.
   Bootstrap sets `outline: 0` on :focus, so the indicator is re-added here. */
.div-wrapper .form-check-input:focus {
  box-shadow: none;
}

.div-wrapper .form-check-input:focus-visible {
  outline: 3px solid var(--sjmn-color-app-purple);
  outline-offset: 2px;
}

/* Radio checked: white background with dark navy dot */
.div-wrapper .form-check-input[type="radio"]:checked {
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%232d3657'/%3e%3c/svg%3e");
  border-color: #2d3657;
}

/* Checkbox checked: white background with dark navy checkmark */
.div-wrapper .form-check-input[type="checkbox"]:checked {
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%232d3657' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
  border-color: #2d3657;
}

/* Archive parity: invalid fields use a red border and pale red fill. */
.div-wrapper input.form-control.input-error,
.div-wrapper textarea.form-control.input-error,
.div-wrapper select.form-select.input-error,
.div-wrapper .form-check-input.input-error,
.div-wrapper .file-info-box.input-error {
  background-color: #ffeceb;
  border: 1px solid #cc0505;
}

.div-wrapper input.form-control.input-error:not(:placeholder-shown),
.div-wrapper textarea.form-control.input-error:not(:placeholder-shown),
.div-wrapper input.form-control.input-error[type="file"] {
  background-color: #ffeceb;
}

.div-wrapper .file-info-box.input-error {
  background-color: #ffeceb !important;
  border-color: #cc0505 !important;
}

.div-wrapper .form-check-input.input-error:checked {
  background-color: #ffeceb;
  border-color: #cc0505;
}

.div-wrapper .file-info-box {
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-sizing: border-box;
  min-height: 66px;
  overflow: hidden;
  width: 100%;
}

.div-wrapper .form-control.input-error:focus,
.div-wrapper .form-select.input-error:focus,
.div-wrapper textarea.form-control.input-error:focus {
  border-color: #cc0505;
}

.div-wrapper .form-check-label {
  flex: 1 0 0;
  color: var(--text-primary, #2d3657);
  cursor: pointer;
  font-family: "Noto Sans JP", Meiryo, sans-serif;
  font-size: var(--sjmn-size-16);
  font-style: normal;
  font-weight: 400;
  line-height: 150%;
  margin: 0;
}

.div-wrapper .form-description ol,
.div-wrapper .form-description ul {
  list-style-type: disc;
  padding-left: 1.5em;
  margin-top: 2px;
  margin-bottom: 0;
}

.div-wrapper .form-description li {
  margin-bottom: 0;
  line-height: 1.4;
}

/* Input-example accordion */
.div-wrapper .example-accordion {
  width: 100%;
  margin-bottom: 4px;
}

.div-wrapper .example-summary {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 4px;
  border-radius: 8px;
  cursor: pointer;
  list-style: none;
}

.div-wrapper .example-summary::-webkit-details-marker {
  display: none;
}

.div-wrapper .example-text {
  color: #003ee6;
  font-family: "Noto Sans JP", Meiryo, sans-serif;
  font-size: var(--sjmn-size-16);
  font-weight: 400;
  line-height: 150%;
  text-decoration: underline;
  white-space: nowrap;
}

.div-wrapper .example-accordion-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.div-wrapper .example-accordion[open] .example-accordion-icon {
  transform: rotateX(180deg);
}

.div-wrapper .example-description {
  width: 100%;
  background-color: #ebeff4;
  color: var(--text-primary, #2d3657);
  font-family: "Noto Sans JP", Meiryo, sans-serif;
  font-size: var(--sjmn-size-16);
  font-weight: 400;
  line-height: 150%;
  padding: 12px;
  word-break: break-all;
  white-space: normal;
  margin-top: 4px;
}

/* File upload item */
.div-wrapper .file-item-frame {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.div-wrapper .file-name-display {
  padding: 8px 12px;
  background-color: rgb(245 245 245 / 100%);
  border: 1px solid rgb(210 210 210 / 100%);
  border-radius: 6px;
  font-size: var(--sjmn-size-14);
  color: rgb(89 88 95 / 100%);
  min-height: 38px;
  word-break: break-all;
}

.div-wrapper .file-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.div-wrapper .file-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 14px;
  border-radius: 6px;
  font-size: var(--sjmn-size-14);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid rgb(45 54 87 / 100%);
  background-color: #fff;
  color: rgb(45 54 87 / 100%);
}

.div-wrapper .file-action-button:hover {
  background-color: rgb(45 54 87 / 8%);
}

.div-wrapper .file-action-button.is-disabled,
.div-wrapper .file-action-button:disabled,
.div-wrapper .file-action-button[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.55;
  pointer-events: none;
}

.div-wrapper .file-delete-button {
  border-color: rgb(204 5 5 / 100%);
  color: rgb(204 5 5 / 100%);
}

.div-wrapper .file-delete-button:hover {
  background-color: rgb(204 5 5 / 6%);
}

.div-wrapper .file-download-button {
  border-color: rgb(45 54 87 / 100%);
  background-color: rgb(45 54 87 / 100%);
  color: #fff;
}

.div-wrapper .file-download-button:hover {
  background-color: rgb(45 54 87 / 85%);
  color: #fff;
}

/* Constrain page sections to form-card width so table-item-frame overflow-x:auto works */
.div-wrapper .form-card section[data-page-section] {
  width: 100%;
}

/* Table item */
.div-wrapper .table-section-title {
  font-weight: 700;
  font-size: var(--sjmn-size-22);
  color: rgb(45 54 87 / 100%);
  line-height: 1.5;
  word-break: break-all;
}

.div-wrapper .table-item-frame {
  width: 100%;
}

.div-wrapper .table-item-frame .table-scroll-body {
  width: 100%;
  overflow: auto;
  max-height: 784px;
}

.div-wrapper .table-item-frame .table {
  width: 100%;
  min-width: 100%;
  margin-bottom: 0;
  table-layout: fixed;
}

.div-wrapper .table-item-frame .table-scroll-body .excel-import-table {
  width: max-content;
}

.div-wrapper .table-item-frame th {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  background-color: rgb(235 239 244 / 100%);
  color: rgb(45 54 87 / 100%);
  font-size: var(--sjmn-size-16);
  vertical-align: middle;
  padding: 10px 8px;
}

.div-wrapper .table-row-header-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.div-wrapper .table-row-header-text {
  font-size: var(--sjmn-size-16);
  font-weight: 700;
  line-height: 1.4;
  white-space: break-spaces;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.div-wrapper .table-row-badge {
  margin: 0;
}

.div-wrapper .table-item-frame td {
  vertical-align: middle;
  padding: 8px;
}

.div-wrapper .table-item-frame td .form-control {
  min-width: 120px;
}

.div-wrapper .table-item-frame .excel-import-table,
.div-wrapper .table-item-frame .column-layout-table {
  margin-bottom: 12px;
}

.div-wrapper .table-item-frame .excel-import-table td,
.div-wrapper .table-item-frame .column-layout-table td {
  text-align: left;
}

.div-wrapper .table-item-frame .table td.table-cell-border-hide-left {
  border-left-width: 0 !important;
}

.div-wrapper .table-item-frame .table td.table-cell-border-hide-top {
  border-top: var(--bs-border-width) solid transparent !important;
}

.div-wrapper .table-item-frame .table td.table-cell-border-hide-right {
  border-right-width: 0 !important;
}

.div-wrapper .table-item-frame .table td.table-cell-border-hide-bottom {
  border-bottom: var(--bs-border-width) solid transparent !important;
}

/* Matrix tables keep 190px per data column.
   column-layout-table (both regular and Excel-import) uses colgroup for the header col
   and lets data cols fill remaining space. */
.div-wrapper .table-item-frame .excel-import-table td {
  width: 190px;
  height: auto !important;
  min-height: 61px !important;
  word-break: break-word;
  white-space: normal !important;
  overflow-wrap: break-word;
}

body.confirm-page
  .column-layout-table.confirm-table--single-value
  td.confirm-value-cell--ideal {
  vertical-align: middle;
  width: 568.5px !important;
  min-width: 568.5px;
  padding: 12px 16px;
  opacity: 1;
  border-width: 1px;
}

body.confirm-page
  .column-layout-table.confirm-table--single-value
  col.confirm-single-value-label-col,
body.confirm-page
  .column-layout-table.confirm-table--single-value
  col.confirm-single-value-col {
  width: 568.5px;
}

.div-wrapper .table-item-frame .excel-import-table td .form-control,
.div-wrapper .table-item-frame .column-layout-table td .form-control {
  margin: 0 auto;
  min-width: 0;
  max-width: 100%;
  text-align: left;
  color: inherit;
  font-weight: inherit;
  background-color: transparent;
}

.div-wrapper
  .table-item-frame
  .excel-import-table
  td
  input.form-control.input-error,
.div-wrapper
  .table-item-frame
  .excel-import-table
  td
  textarea.form-control.input-error,
.div-wrapper
  .table-item-frame
  .column-layout-table
  td
  input.form-control.input-error,
.div-wrapper
  .table-item-frame
  .column-layout-table
  td
  textarea.form-control.input-error,
.div-wrapper
  .table-item-frame
  .excel-import-table
  td
  input.form-control.input-error:not(:placeholder-shown),
.div-wrapper
  .table-item-frame
  .excel-import-table
  td
  textarea.form-control.input-error:not(:placeholder-shown),
.div-wrapper
  .table-item-frame
  .column-layout-table
  td
  input.form-control.input-error:not(:placeholder-shown),
.div-wrapper
  .table-item-frame
  .column-layout-table
  td
  textarea.form-control.input-error:not(:placeholder-shown),
.div-wrapper
  .table-item-frame
  .excel-import-table
  td
  input.form-control.input-error[type="file"],
.div-wrapper
  .table-item-frame
  .column-layout-table
  td
  input.form-control.input-error[type="file"] {
  background-color: #ffeceb;
}

/* Narrow inputs inside table cells: same 5-class specificity placed after the broad rule wins via cascade */
.div-wrapper .table-item-frame .excel-import-table td .form-control--narrow,
.div-wrapper .table-item-frame .column-layout-table td .form-control--narrow {
  max-width: 192px;
  min-width: unset;
  margin: 0;
}

.div-wrapper
  .table-item-frame
  .excel-import-table
  td
  .form-control.input-readonly,
.div-wrapper
  .table-item-frame
  .excel-import-table
  td
  .form-control:is([readonly], [disabled]) {
  pointer-events: none;
  cursor: default;
  background-color: transparent;
  border: none;
  box-shadow: none;
}

.div-wrapper
  .table-item-frame
  .column-layout-table
  td
  .form-control.input-readonly,
.div-wrapper
  .table-item-frame
  .column-layout-table
  td
  .form-control:is([readonly], [disabled]) {
  pointer-events: none;
  cursor: default;
  background-color: #e9ecef;
  color: #6c757d;
  box-shadow: none;
}

.div-wrapper
  .table-item-frame
  .excel-import-table
  td
  input.form-control.input-error,
.div-wrapper
  .table-item-frame
  .excel-import-table
  td
  textarea.form-control.input-error,
.div-wrapper
  .table-item-frame
  .excel-import-table
  td
  select.form-select.input-error,
.div-wrapper
  .table-item-frame
  .column-layout-table
  td
  input.form-control.input-error,
.div-wrapper
  .table-item-frame
  .column-layout-table
  td
  textarea.form-control.input-error,
.div-wrapper
  .table-item-frame
  .column-layout-table
  td
  select.form-select.input-error,
.div-wrapper
  .table-item-frame
  .excel-import-table
  td
  input.form-control.input-error:not(:placeholder-shown),
.div-wrapper
  .table-item-frame
  .excel-import-table
  td
  textarea.form-control.input-error:not(:placeholder-shown),
.div-wrapper
  .table-item-frame
  .column-layout-table
  td
  input.form-control.input-error:not(:placeholder-shown),
.div-wrapper
  .table-item-frame
  .column-layout-table
  td
  textarea.form-control.input-error:not(:placeholder-shown),
.div-wrapper
  .table-item-frame
  .excel-import-table
  td
  .form-select.input-error:is([readonly], [disabled]),
.div-wrapper
  .table-item-frame
  .excel-import-table
  td
  .form-control.input-error:is([readonly], [disabled]),
.div-wrapper
  .table-item-frame
  .column-layout-table
  td
  .form-select.input-error:is([readonly], [disabled]),
.div-wrapper
  .table-item-frame
  .column-layout-table
  td
  .form-control.input-error:is([readonly], [disabled]) {
  background-color: #ffeceb !important;
  border: 1px solid #cc0505;
}

.div-wrapper .form-item.is-locked .form-control,
.div-wrapper [data-rule-field].is-locked .form-control,
.div-wrapper [data-rule-field].is-locked .form-select,
.div-wrapper [data-rule-field].is-locked input[readonly],
.div-wrapper [data-rule-field].is-locked textarea[readonly] {
  background-color: #e9ecef;
  color: #6c757d;
}

.div-wrapper [data-rule-field].is-locked .form-check-input {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Divider between numbered table sections (No. 01, No. 02 …) */
.div-wrapper .table-section-separator {
  border: none;
  border-top: 1px solid rgb(210 210 210 / 100%);
  opacity: 1;
  margin: 24px 0;
}

/* Figma-matching column layout styles */
.div-wrapper .table-item-frame .column-layout-table thead .th-table-group {
  background-color: #2d3657;
  color: #fff;
  font-weight: bold;
}

.div-wrapper .table-item-frame .column-layout-table thead th[scope="col"] {
  background-color: #ebeff4;
  text-align: center;
  vertical-align: middle;
}

.div-wrapper
  .table-item-frame
  .column-layout-table
  thead
  th[scope="col"]
  .required-tag,
.div-wrapper
  .table-item-frame
  .column-layout-table
  thead
  th[scope="col"]
  .optional-tag {
  display: inline-flex;
  margin: 0 auto 4px;
}

/* Row header badges: override to inline-flex so badge width = content only */
.div-wrapper
  .table-item-frame
  .column-layout-table
  th[scope="row"]
  .optional-tag,
.div-wrapper
  .table-item-frame
  .column-layout-table
  th[scope="row"]
  .required-tag {
  display: flex;
  width: fit-content;
  margin-bottom: 4px;
}

.div-wrapper .table-item-frame .column-layout-table th[scope="row"] {
  background-color: #ebeff4;
  text-align: left;
  vertical-align: middle;
  padding: 6px 8px;
}

.div-wrapper
  .table-item-frame
  .column-layout-table
  th[scope="row"]
  .form-description {
  color: #6d6c74;
}

.div-wrapper .table-item-frame .column-layout-table .row-label-badge {
  display: inline-block;
  padding: 2px 8px;
  background-color: #fff;
  border: 1px solid #2d3657;
  border-radius: 7.5px;
  font-size: var(--sjmn-size-12);
  white-space: nowrap;
}

/* Column layout: input wrapper — grid layout ensures:
   - success icon (check-valid) stays inline to the RIGHT of the input
   - error icon (check-error) drops BELOW the input
   CSS Grid overrides Bootstrap's width:100% on form-control via grid track sizing. */
.div-wrapper .table-item-frame .column-layout-table td .column-input-wrapper {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 6px;
  place-items: center start;
  text-align: left;
}

.div-wrapper .table-item-frame .column-input-wrapper .form-item {
  width: 100%;
  margin-bottom: 0;
  text-align: left;
}

.div-wrapper .table-item-frame .column-input-wrapper .form-label,
.div-wrapper .table-item-frame .column-input-wrapper .form-description {
  display: none;
}

/* Status row (icon + error text): span all columns and drop to row 2 (below the input) */
.div-wrapper
  .table-item-frame
  .column-layout-table
  td
  .column-input-wrapper
  .field-status-row {
  grid-column: 1 / -1;
  grid-row: 2;
  margin-top: 4px;
}

/* Legacy step label styles */

.div-wrapper .step-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background-color: #ebf0f4;
  border-radius: 30px;
  width: fit-content;
}

.div-wrapper .step-text {
  font-family: "Noto Sans JP", sans-serif;
  font-weight: 400;
  color: #2d3657;
  font-size: var(--sjmn-size-18);
  line-height: 1;
  white-space: nowrap;
  margin: 0;
}

.item-unit {
  background: none;
  border: none;
  padding-left: 4px;
  padding-right: 0;
}

/* ================================================================
   Field guide modal  (PopUpExplanation — help link + modal)
   ================================================================ */

/* Trigger link: icon + "説明" text, inline-flex, link colour */
.guide-help-link {
  all: unset;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  color: var(--sjmn-color-text-color-link);
  font-family: var(--sjmn-font-body-standard-regular-family);
  font-size: var(--sjmn-font-body-standard-regular-size);
  line-height: 1;
  white-space: nowrap;
  vertical-align: middle;
}

.guide-help-link:hover {
  color: var(--sjmn-color-button-main-hover-color);
}

.guide-help-link:focus-visible {
  outline: 3px solid var(--sjmn-color-border-color-black);
  outline-offset: 2px;
}

.guide-help-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.guide-help-text {
  font-size: var(--sjmn-font-body-standard-regular-size);
}

/* Wide dialog: up to 680px on PC, full-width on SP */
.guide-modal-dialog {
  max-width: 680px;
}

/* Card: padding + scroll for long explanations */
.guide-modal-content {
  padding: 32px;
  border-radius: 12px;
  max-height: 80vh;
  overflow-y: auto;
}

/* Title row (no icon — heading only) */
.guide-modal-title {
  margin-bottom: 24px;
}

/* Override site.css modal-title-text size for this modal */
.guide-modal-content .modal-title-text {
  font-family: var(--sjmn-font-pc-heading-mid-bold-family);
  font-size: var(--sjmn-font-pc-heading-mid-bold-size);
  font-weight: var(--sjmn-font-pc-heading-mid-bold-weight);
  line-height: var(--sjmn-font-pc-heading-mid-bold-line-height);
  color: var(--sjmn-color-text-color-primary);
  margin: 0;
}

/* Body text */
.guide-modal-body {
  font-family: var(--sjmn-font-body-standard-regular-family);
  font-size: var(--sjmn-font-body-standard-regular-size);
  font-weight: var(--sjmn-font-body-standard-regular-weight);
  line-height: 1.6;
  color: var(--sjmn-color-text-color-primary);
  margin-bottom: 24px;
}

/* Close button: centre it horizontally */
.guide-modal-close {
  display: flex;
  margin: 0 auto;
}

@media (width <= 767px) {
  .guide-modal-dialog {
    width: calc(100% - 32px);
    margin: auto;
  }

  .guide-modal-content {
    padding: 24px 16px;
  }
}

/* ================================================================
   Excel import table: row header column widths
   ================================================================ */

/* Matrix layout — first thead column (determines table-layout: fixed width) */
.div-wrapper
  .table-item-frame
  .excel-import-table
  thead
  .excel-first-col-header {
  width: 200px;
}

.div-wrapper
  .table-item-frame
  .excel-import-table.excel-table--schedule
  thead
  .excel-first-col-header {
  width: 48px;
}
/* Matrix layout — remaining thead columns */
.div-wrapper
  .table-item-frame
  .excel-import-table
  thead
  th:not(.excel-first-col-header) {
  width: 190px;
}

/* Column layout — first thead column (行区分) */
.div-wrapper
  .table-item-frame
  .column-layout-table
  thead
  th[scope="col"]:first-child {
  width: 200px;
}

.div-wrapper
  .table-item-frame
  .column-layout-table.excel-table--schedule
  thead
  th[scope="col"]:first-child {
  width: 48px;
}
/* Column layout — value column headers */
.div-wrapper
  .table-item-frame
  .column-layout-table
  thead
  th[scope="col"]:not(:first-child) {
  width: 190px;
}

/* Matrix layout: first-column label cells (thead is visually-hidden/position:absolute so
   table-layout:fixed uses the first tbody row — target td directly instead of thead th) */
.div-wrapper .table-item-frame .excel-import-table td.excel-header-col {
  width: 200px;
}

.div-wrapper
  .table-item-frame
  .excel-import-table.excel-table--schedule
  td.excel-header-col {
  width: 48px;
}

/* ================================================================
   Table expand button (大きく表示)
   ================================================================ */

.div-wrapper .table-expand-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 8px 16px;
  border-radius: 8px;
  background-color: #fff;
  border: 1px solid var(--sjmn-color-border-color-gray);
  cursor: pointer;
  font-size: var(--sjmn-size-14);
  white-space: nowrap;
}

.div-wrapper .table-expand-btn:hover {
  background-color: #d9d9d9;
  border-color: #d9d9d9;
}

.div-wrapper .table-expand-btn__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* ================================================================
   Table expand modal (80 % viewport)
   ================================================================ */

.table-expand-modal .modal-dialog {
  width: 80vw;
  max-width: 80vw;
  margin: auto;
}

.table-expand-modal .modal-content {
  height: 80vh;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

.table-expand-modal .modal-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 16px;
}

/* Modal table: don't stretch to fill the wide modal body (min-width: 100% would expand
   columns far beyond their <col> widths on an 80vw modal). Use <col> widths as-is. */
.table-expand-modal .modal-body .table {
  min-width: 0;
}

.table-expand-modal .modal-footer {
  flex-shrink: 0;
  justify-content: center;
}
