/* ===== Base ===== */
:root {
  --bs-body-color: #374151;
  --bs-heading-color: #374151;
}

html {
  height: 100%;
  font-size: 13px;
}

@media (min-width: 768px) {
  html {
    /* 全体をやや小さめに（rem基準なのでシステム全体に効く） */
    font-size: 14.5px;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  background-color: #f5f6fa;
  font-family: 'Noto Sans JP', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-weight: 500;
  color: #374151;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: #374151;
}

.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 #258cfb;
}

/* ===== アクセシビリティ基盤 (WCAG 2.2 AA) ===== */

/* キーボードフォーカスの可視化 (2.4.7 / 1.4.11: 背景に対し3:1以上) */
:focus-visible {
  outline: 2px solid #0b5ed7;
  outline-offset: 2px;
}

/* 暗色背景（サイドバー・ログイン画面）では明るいフォーカスリング */
.sidebar :focus-visible,
.topbar :focus-visible,
.login-page :focus-visible {
  outline-color: #0d9aa8;
}

/* sticky ヘッダーにフォーカスが隠れないように (2.4.11) */
:focus {
  scroll-margin-top: 80px;
  scroll-margin-bottom: 40px;
}

/* 動きの抑制設定を尊重 (2.3.3) */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/*
 * ステータスバッジ配色: Bootstrapの塗りつぶし(濃色×白文字)をやめ、
 * 既存の契約状態バッジ(status-active等)と同じ「淡色背景×濃色文字」に統一。
 * 明るい見た目のままコントラストAA(4.5:1以上)を確保できる。
 */
.badge.bg-primary {
  background-color: #dbeafe !important;
  color: #1e40af;
}

.badge.bg-success {
  background-color: #d1fae5 !important;
  color: #065f46;
}

.badge.bg-danger {
  background-color: #fee2e2 !important;
  color: #b91c1c;
}

.badge.bg-warning {
  background-color: #fef3c7 !important;
  color: #92400e;
}

.badge.bg-secondary {
  background-color: #e9ecef !important;
  color: #495057;
}

/* リンク色: #0d6efd(3.7:1)ではAA未達のためわずかに濃く */
a,
.link-primary {
  --bs-link-color: #0b5ed7;
  --bs-link-color-rgb: 11, 94, 215;
  --bs-link-hover-color: #0a53be;
  --bs-link-hover-color-rgb: 10, 83, 190;
}

/* text-muted はゼブラ背景(#F8FAFC)上でも4.5:1を確保 */
.text-muted {
  color: #5c636a !important;
}

/* リンクの下線はホバー時のみ。対象はメインコンテンツ内のリンクだけ（サイドバー・ボタン・メニューは常に下線なし） */
a:not(.btn):not(.dropdown-item):not(.nav-link) {
  text-decoration: none;
}

.main-body a:not(.btn):not(.dropdown-item):not(.nav-link):not(.job-edit-link):hover {
  text-decoration: underline;
}

/*
 * モーダルの登場演出（MoteruATS準拠）:
 * 背景は0.1sの素早いフェード、ダイアログは16px下から0.2sのスプリング系で浮き上がる。
 * Bootstrap既定（0.3sで-50pxスライド）より体感がキビキビしつつ、ちらつかない。
 */
.modal-backdrop.fade {
  transition: opacity 0.1s ease;
}

.modal.fade {
  transition: opacity 0.12s ease;
}

.modal.fade .modal-dialog {
  transform: translateY(16px);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal.show .modal-dialog {
  transform: translateY(0);
}

/* ===== 全体の質感（モダン化） ===== */

/* カードは角ばった形状（信頼感重視） */
.card {
  --bs-card-border-radius: 0.25rem;
  --bs-card-inner-border-radius: calc(0.25rem - 1px);
}

/* モーダル: 角丸+ボーダーレス+深めのシャドウ */
.modal-content {
  border: none;
  border-radius: 0.75rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

/* 細いスクロールバー */
* {
  scrollbar-width: thin;
  scrollbar-color: #c3ccd8 transparent;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-thumb {
  background: #c3ccd8;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8b4c4;
}

::-webkit-scrollbar-track {
  background: transparent;
}

/* テーブルの数値は等幅にして桁を揃える */
.table {
  font-variant-numeric: tabular-nums;
}

/* ===== ローディングオーバーレイ ===== */
.global-loading {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(1px);
}

.global-loading.d-none {
  display: none;
}

.global-loading-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  background: #fff;
  border-radius: 0.5rem;
  padding: 1.25rem 2rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.global-loading-text {
  font-size: 0.85rem;
  color: #5c636a;
  font-weight: 600;
}

/* リスト領域内のローディング表示 */
.list-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 3rem 0;
  color: #5c636a;
  font-size: 0.9rem;
}

/* スクリーンリーダー専用テキスト */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


/* ===== Sidebar ===== */
.sidebar {
  width: 240px;
  min-height: 100vh;
  background-color: #1e2a38;
  color: #cdd5e0;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 1000;
  /* content-visibility導入で本文の再レイアウトが軽くなったため、幅もアニメーションする */
  transition: transform 0.3s ease, width 0.25s ease;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-header {
  padding: 1.25rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.sidebar-brand {
  color: #fff;
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.sidebar-brand:hover {
  color: #90cdf4;
  text-decoration: none;
}

.sidebar-close {
  background: none;
  border: none;
  color: #cdd5e0;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.25rem;
}

.sidebar-close:hover {
  color: #fff;
}

.sidebar-nav {
  list-style: none;
  padding: 0.75rem 0;
  margin: 0;
  flex: 1;
}

.sidebar-nav li a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1.25rem;
  color: #a0aec0;
  text-decoration: none;
  font-size: 1.05rem;
  border-left: 3px solid transparent;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.sidebar-nav li a .sidebar-overdue-badge {
  margin-left: auto;
}

.sidebar-brand-mini {
  display: none;
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
}

.sidebar-nav li a:hover,
.sidebar-nav li a.active {
  background-color: rgba(255, 255, 255, 0.07);
  color: #fff;
  border-left-color: #63b3ed;
}

/* ===== Overlay (mobile) ===== */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 999;
}

/* ===== Main content ===== */
.main-content {
  margin-left: 240px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  width: calc(100% - 240px);
  transition: margin-left 0.25s ease, width 0.25s ease;
}

/* ===== サイドバー折りたたみ: アイコンレール（デスクトップ） ===== */
@media (min-width: 768px) {
  body.sidebar-collapsed .sidebar {
    width: 62px;
  }

  body.sidebar-collapsed .main-content {
    margin-left: 62px;
    width: calc(100% - 62px);
  }

  body.sidebar-collapsed .sidebar-label {
    display: none;
  }

  body.sidebar-collapsed .sidebar-brand-mini {
    display: inline;
  }

  body.sidebar-collapsed .sidebar-header {
    padding: 1.25rem 0.5rem;
    justify-content: center;
  }

  body.sidebar-collapsed .sidebar-nav li a,
  body.sidebar-collapsed .sidebar-settings-btn,
  body.sidebar-collapsed .sidebar-logout-btn,
  body.sidebar-collapsed .sidebar-collapse-toggle {
    justify-content: center;
    padding: 0.7rem 0.25rem;
  }

  body.sidebar-collapsed .sidebar-nav li a i,
  body.sidebar-collapsed .sidebar-settings-btn i,
  body.sidebar-collapsed .sidebar-logout-btn i,
  body.sidebar-collapsed .sidebar-collapse-toggle i {
    font-size: 1.25rem;
  }

  /* 未対応バッジはアイコンの右上に小さく重ねる */
  body.sidebar-collapsed .sidebar-nav li a {
    position: relative;
  }

  body.sidebar-collapsed .sidebar-nav li a .sidebar-overdue-badge {
    position: absolute;
    top: 0.15rem;
    right: 0.3rem;
    margin-left: 0;
    min-width: 1rem;
    height: 1rem;
    padding: 0 0.2rem;
    font-size: 0.75rem;
  }

  body.sidebar-collapsed .sidebar-toggle-ico-collapse {
    display: none;
  }

  body.sidebar-collapsed .sidebar-toggle-ico-expand {
    display: inline;
  }
}

.main-body {
  padding: 1.5rem 2rem;
  flex: 1;
}

/* ===== Topbar (mobile only) ===== */
.topbar {
  padding: 0.6rem 1rem;
  background: #1e2a38;
  border-bottom: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-title {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

.sidebar-toggle-btn {
  background: none;
  border: none;
  padding: 0.4rem 0.5rem;
  cursor: pointer;
}

.sidebar-toggle-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.hamburger-icon {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 22px;
  height: 16px;
}

.hamburger-icon span {
  display: block;
  height: 2px;
  width: 100%;
  background-color: #fff;
  border-radius: 2px;
}

/* ===== Responsive ===== */
@media (max-width: 767.98px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.show {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
    width: 100%;
  }

  .main-body {
    padding: 1rem;
  }
}

/* ===== Form helpers ===== */
.form-floating>.form-control-plaintext::placeholder,
.form-floating>.form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating>.form-control-plaintext:focus::placeholder,
.form-floating>.form-control:focus::placeholder {
  text-align: start;
}

/* ===== Login page =====
   明るい背景の中央に白カードを置くシンプルな構成（ロゴは元の配色のまま使う） */
body.login-page {
  display: block;
  min-height: 100vh;
  background: #ffffff;
}

.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.login-card {
  position: relative;
  width: 100%;
  max-width: 400px;
  padding: 2rem 2.25rem;
  animation: login-rise 0.55s ease both;
}

@keyframes login-rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

/* ロゴはカードの上に浮かせ、入力欄（カード本体）が画面の縦中央に来るようにする */
.login-logo {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  text-align: center;
  margin-bottom: 0.25rem;
}

/* 縦が短い画面ではロゴを通常フローに戻し、上にはみ出さないようにする */
@media (max-height: 560px) {
  .login-logo {
    position: static;
    margin-bottom: 1.5rem;
  }
}

.login-logo img {
  display: block;
  margin: 0 auto;
  max-width: 280px;
  height: auto;
}

/* ロゴの下に出す、システムの名前。同じ FRUOR のロゴを使う複数のシステムを、ログイン画面で見分けるためのもの。
   文字はロゴに合わせた丸ゴシック */
.login-product {
  margin-top: -1.2rem;
  padding-bottom: 1.4rem;
  font-family: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", "Yu Gothic UI", "Meiryo", sans-serif;
  line-height: 1.3;
}

.login-product-name {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #2b2d33;
}

@media (max-height: 560px) {
  .login-product {
    padding-bottom: 0;
  }
}

/* アイコン付き入力欄 */
.login-field {
  position: relative;
}

.login-field-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: #9aa3af;
  pointer-events: none;
  font-size: 0.95rem;
}

.login-card .form-control {
  background: #fbfcfe;
  border: 1px solid #d9dee6;
  border-radius: 10px;
  padding: 0.65rem 0.9rem 0.65rem 2.5rem;
}

.login-card .form-control:focus {
  background: #fff;
  border-color: #0d9aa8;
  box-shadow: 0 0 0 3px rgba(13, 154, 168, 0.15);
}

/* パスワード表示切替 */
.login-eye {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #9aa3af;
  padding: 0.3rem 0.55rem;
  border-radius: 8px;
  line-height: 1;
}

.login-eye:hover {
  color: #374151;
}

.login-card .btn-primary {
  background: linear-gradient(135deg, #1a6fa8, #0d9aa8);
  border: none;
  border-radius: 10px;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 0.65rem;
  transition: transform 0.15s, box-shadow 0.15s;
}

.login-card .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(13, 154, 168, 0.35);
}

.login-submit .bi {
  vertical-align: -0.15em;
  margin-left: 0.15rem;
}

.login-footnote {
  text-align: center;
  color: #b3bac4;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  margin-top: 2rem;
}


/* ===== Sidebar logout ===== */
.sidebar-footer {
  padding: 0.75rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.sidebar-footer form {
  margin: 0;
}

.sidebar-settings-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.7rem 1.25rem;
  background: transparent;
  border: none;
  border-left: 3px solid transparent;
  color: #a0aec0;
  font-size: 1.05rem;
  font-weight: inherit;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.sidebar-settings-btn:hover {
  background-color: rgba(255, 255, 255, 0.07);
  color: #fff;
  border-left-color: #63b3ed;
}

.sidebar-logout-btn,
.sidebar-collapse-toggle {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.7rem 1.25rem;
  background: transparent;
  border: none;
  border-left: 3px solid transparent;
  color: #a0aec0;
  font-size: 1.05rem;
  font-weight: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.sidebar-logout-btn:hover,
.sidebar-collapse-toggle:hover {
  background-color: rgba(255, 255, 255, 0.07);
  color: #fff;
  border-left-color: #63b3ed;
}

.sidebar-collapse-toggle {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 0.25rem;
}

.sidebar-toggle-ico-expand {
  display: none;
}


/* ===== フォーム全体の調整 ===== */
/* フォーカスリングをシステム全体で細く（Bootstrap既定の0.25remは太すぎる） */
.btn:focus,
.btn:focus-visible,
.btn-check:focus + .btn,
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 2px rgba(93, 112, 150, 0.25) !important;
}

/* チェック・スイッチとラベルの間に余白 */
.form-check .form-check-label {
  padding-left: 0.4rem;
}

/* メインコンテンツ見出し: h2既定(約2rem)は大きすぎるため縮小 */
.page-header h2 {
  color: #6b7280;
  font-weight: 600;
  font-size: 1.35rem;
  margin-bottom: 0;
}

.page-header {
  margin-bottom: 1rem !important;
}

/* データ一覧系テーブルは本文よりさらに一段小さく */
.main-body .table {
  font-size: 0.9rem;
}

/* ===== 状態バッジ（FruorCS と共通） ===== */
.contract-badge {
  display: inline-block;
  padding: 0.25em 0.8em;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

.status-before {
  background: #e9ecef;
  color: #495057;
}

.status-active {
  background: #d1fae5;
  color: #065f46;
}

.status-paused {
  background: #fef3c7;
  color: #92400e;
}

.status-ended {
  background: #fee2e2;
  color: #991b1b;
}

.status-running {
  background: #dbeafe;
  color: #1e40af;
}

/* 自動化ステータスバッジ */
.auto-badge {
  display: inline-block;
  padding: 0.2em 0.75em;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}

.auto-badge.is-auto {
  background: #d1fae5;
  color: #065f46;
}

.auto-badge.is-manual {
  background: #fef3c7;
  color: #92400e;
}

/* ---- テーブルをremind-listと同じ見た目にするクラス ---- */
.tbl-remind tbody tr {
  border-bottom: 1px solid #e9ecef;
}

.tbl-remind tbody tr:last-child {
  border-bottom: none;
}

.tbl-remind tbody tr:nth-child(even)>td {
  background: #F8FAFC;
}

.tbl-remind tbody tr:hover>td {
  background: #e8f4fd !important;
}

.tbl-remind thead th {
  font-weight: 600;
  font-size: 0.72rem; /* レポート管理画面のヘッダー文字サイズに統一 */
  color: #ffffff;
  background: #5d7096; /* 白文字と4.5:1以上 */
  border-bottom: 2px solid #47597c;
  padding: 0.3rem 0.75rem;
  white-space: nowrap;
}

.tbl-remind tbody td {
  font-size: 0.9rem;
  padding: 0.55rem 0.75rem;
  border: none;
  color: #374151;
}

.filter-card .form-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 0.25rem;
}

.filter-card .form-control,
.filter-card .form-select {
  font-size: 1rem;
}

.filter-card .btn-sm {
  font-size: 0.82rem;
}

/* ===== 一覧テーブル: 見出し固定 ===== */
.list-table-wrap {
  overflow-y: auto;
}

.list-table-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

/* 詳細行（開閉）を挟む表は、行の縞を自前のクラスで付ける */
.tbl-remind.tbl-rows-manual tbody tr:nth-child(even)>td {
  background: transparent;
}

.tbl-remind.tbl-rows-manual tbody tr.row-alt>td {
  background: #F8FAFC;
}

.tbl-remind.tbl-rows-manual tbody tr.row-detail>td {
  background: #f8f9fa !important;
}

/* ===== 編集画面（FruorCS の企業編集と同じ構成） ===== */
.edit-page-wrap {
  max-width: 100%;
  width: 100%;
}

/* 区分のナビ（左）と、選んだ区分の内容（右）。選択中は背景 + 左アクセントライン + 文字色で示す */
.section-layout {
  flex-wrap: nowrap;
}

.section-nav {
  flex: 0 0 250px;
  position: sticky;
  top: 1rem;
}

.section-body {
  min-width: 0;
}

.section-nav-list {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
}

.section-nav-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1rem;
  border-left: 3px solid transparent;
  color: #374151;
  text-decoration: none;
}

.main-body a.section-nav-item:hover {
  background: #f8f9fa;
  color: #374151;
  text-decoration: none !important;
}

.main-body a.section-nav-item.selected,
.main-body a.section-nav-item.selected:hover {
  background: transparent;
  color: #1d4ed8;
  font-weight: 600;
}

/* 選択中の背景と左の線。区分を移るとき、この目印が前の項目から次の項目へ滑って動く */
.section-nav-item {
  position: relative;
}

.section-nav-item > :not(.section-nav-indicator) {
  position: relative;
  z-index: 1;
}

.section-nav-indicator {
  position: absolute;
  inset: 0 0 0 -3px;
  background: #eef4ff;
  border-left: 3px solid #2563eb;
  view-transition-name: section-nav-active;
}

.section-nav-item.disabled {
  color: #6b7280;
  cursor: not-allowed;
}

.section-nav-label {
  flex: 1;
  min-width: 0;
}

.section-nav-foot {
  padding: 0.75rem 1rem;
  border-top: 1px solid #f1f3f5;
}

@media (max-width: 900px) {
  .section-layout {
    flex-direction: column;
  }

  .section-nav {
    flex: 1 1 auto;
    width: 100%;
    position: static;
  }

  .section-body {
    width: 100%;
  }
}

/* 曜日の選択（FruorCS のサイクル選択と同じトグル） */
.cycle-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cycle-option {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 38px;
  border: 2px solid #dee2e6;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  color: #6c757d;
  background: #fff;
  transition: all .18s ease;
  user-select: none;
}

.btn-check:checked + .cycle-option {
  border-color: #0d6efd;
  background: #0d6efd;
  color: #fff;
  box-shadow: 0 2px 8px rgba(13, 110, 253, .35);
}

.cycle-option:hover {
  border-color: #0d6efd;
  color: #0d6efd;
}

/* 検索ワードの一覧 */
.keyword-list-wrap {
  max-height: 32rem;
  overflow-y: auto;
}

.keyword-order {
  display: inline-block;
  min-width: 1.6rem;
  color: #6b7280;
  font-variant-numeric: tabular-nums;
}

/* ===== 入力欄を1行に1つずつ縦に並べるフォーム ===== */
.form-stack {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.form-field {
  width: 100%;
}

.form-field.field-sm {
  max-width: 10rem;
}

.form-field.field-md {
  max-width: 28rem;
}

.form-field.field-lg {
  max-width: 40rem;
}

.section-body {
  max-width: 60rem;
}

/* ===== プレースホルダー: 入力済みの文字と見分けがつくよう、薄い色にする ===== */
.form-control::placeholder,
.form-select::placeholder {
  color: #a8b0bd;
  opacity: 1;
}

/* ===== 区分を移るときの切り替え（企業編集） =====
   ページ間トランジション（@view-transition。企業編集の画面でだけ有効にしている）で、
   内容は「前の区分が少し上へ消える → 次の区分が下からふわっと入る」、左ナビの目印は滑って動く。 */
.section-body {
  view-transition-name: section-body;
}

@keyframes section-out {
  to {
    opacity: 0;
    transform: translateY(-8px);
  }
}

@keyframes section-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

::view-transition-old(section-body) {
  animation: section-out 180ms cubic-bezier(0.4, 0, 1, 1) both;
}

::view-transition-new(section-body) {
  animation: section-in 380ms cubic-bezier(0.16, 1, 0.3, 1) 90ms both;
}

::view-transition-group(section-body) {
  animation-duration: 380ms;
  animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}

::view-transition-group(section-nav-active) {
  animation-duration: 380ms;
  animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ページ間トランジションが使われなかったとき（未対応のブラウザなど）は、開いたときに内容をふわっと出すだけにする */
.section-enter .section-body {
  animation: section-in 380ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* 動きの抑制設定を尊重 */
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}

/* ===== 検索ワードの候補（企業サイトの調査から） ===== */
.suggestion-box {
  padding: 0.9rem 1rem;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  background: #f8fafc;
}

.suggestion-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 0.35rem 1.5rem;
}

/* ===== 記事プレビュー（ブログの記事として読んだときの見え方に近づける） ===== */
.preview-wrap {
  max-width: 54rem;
}

.preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
}

.preview-meta dt {
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7280;
}

.preview-meta dd {
  margin: 0;
}

.article-preview {
  max-width: 44rem;
  margin: 0.5rem auto 1rem;
  font-size: 1rem;
  line-height: 1.9;
  color: #1f2937;
}

.article-preview h1 {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.5;
  margin: 0 0 1rem;
}

.article-preview-description {
  padding: 0.75rem 1rem;
  border-left: 4px solid #cbd5e1;
  background: #f8fafc;
  color: #4b5563;
  font-size: 0.9rem;
}

.article-preview h2 {
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.5;
  margin: 2.5rem 0 1rem;
  padding: 0.5rem 0.9rem;
  border-left: 5px solid #5d7096;
  background: #f1f5f9;
}

.article-preview h3 {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.5;
  margin: 2rem 0 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid #e2e8f0;
}

.article-preview p {
  margin: 0 0 1.1rem;
}

.article-preview ul,
.article-preview ol {
  margin: 0 0 1.1rem;
  padding-left: 1.5rem;
}

.article-preview .wp-block-table {
  margin: 0 0 1.1rem;
  overflow-x: auto;
}

.article-preview table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.article-preview th,
.article-preview td {
  padding: 0.5rem 0.75rem;
  border: 1px solid #cbd5e1;
  text-align: left;
  vertical-align: top;
}

.article-preview th {
  background: #f1f5f9;
  font-weight: 600;
}

.article-preview blockquote {
  margin: 0 0 1.1rem;
  padding: 0.5rem 1rem;
  border-left: 4px solid #cbd5e1;
  color: #4b5563;
}
