/* =========================================================
  KIGENNAVI / TOSHINAVI - style.css (CLEAN COMPLETE)
  - 優しい白背景
  - ロゴ中央 + メニュー下
  - スマホはハンバーガー開閉（common.js想定: #siteNav data-open）
  - 現在ページハイライト (.menu-item.is-active)
  - 入力UI / 結果UI / フッター白中央
========================================================= */

:root{
  --bg:#ffffff;           /* 完全白 */
  --card:#ffffff;
  --text:#111827;
  --muted:#6b7280;

  --border:#e5eaf2;

  --primary:#2563eb;
  --primarySoft:#eef4ff;

  --toolSoft:#eef4ff;     /* ツール枠 */
  --guideSoft:#ecfdf3;    /* 解説枠 */
  --guide:#16a34a;

  --danger:#dc2626;

  --radius:18px;
}

*{ box-sizing:border-box; }

html, body{
  height:100%;
}

body{
  margin:0;
  font-family:"Noto Sans JP",system-ui,-apple-system,"Segoe UI",sans-serif;
  background:var(--bg);
  color:var(--text);
  line-height:1.8;
  font-size:18px;
}

/* ページ幅 */
.wrap{
  max-width:760px;
  margin:0 auto;
  padding:28px 18px;
}

/* タイポ */
h1{
  margin:26px 0 10px;
  font-size:30px;
  font-weight:900;
  letter-spacing:.01em;
}

h2{
  margin:0 0 12px;
  font-size:18px;
  font-weight:900;
}

.lead{
  margin:0 0 18px;
  font-size:16px;
  color:var(--muted);
}

.muted{ color:var(--muted); }

/* =========================================================
  CARD
========================================================= */
.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:26px;
  margin:18px 0;
  box-shadow:0 14px 40px rgba(15,23,42,.08);
}

/* ツール / 解説の見分け（index用など） */
.card-tool{
  border-left:6px solid var(--primary);
  background:linear-gradient(180deg, #ffffff 0%, var(--toolSoft) 180%);
}

.card-article{
  border-left:6px solid var(--guide);
  background:linear-gradient(180deg, #ffffff 0%, var(--guideSoft) 180%);
}

/* =========================================================
  HEADER
========================================================= */
.site-header{
  position:sticky;
  top:0;
  z-index:50;
  background:#fff;
  border-bottom:1px solid var(--border);
}

/* ロゴ中央＋メニュー下 */
.header-stack{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:12px;
  padding:14px 0;
}

.brand-center{
  display:flex;
  justify-content:center;
  align-items:center;
  text-decoration:none;
}

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

/* ========== PC: メニュー（シンプル2本） ========== */
.pc-nav{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:center;
  align-items:center;
}

/* PCボタン（ツール/解説） */
.dropbtn,
.pc-link{
  font-size:15px;
  font-weight:900;
  padding:10px 14px;
  border-radius:999px;
  border:1px solid var(--border);
  background:#fff;
  color:var(--text);
  cursor:pointer;
  text-decoration:none;
  transition:.15s ease;
}

.dropbtn:hover,
.pc-link:hover{
  border-color:var(--primary);
  box-shadow:0 0 0 3px rgba(37,99,235,.12);
}

/* =========================================================
   PCドロップダウン（hover切れ完全対策版）
========================================================= */
.dropdown{
  position:relative;
}

/* ★ hover橋（ボタンとメニューの空白を埋める） */
.dropdown::after{
  content:"";
  position:absolute;
  left:-16px;
  right:-16px;
  top:100%;
  height:18px;               /* ここを広くして消え防止 */
  background:transparent;
}

/* メニュー本体 */
.dropmenu{
  display:none;
  position:absolute;

  /* ★ ボタン直下基準に変更 */
  top:calc(100% + 10px);
  left:50%;
  transform:translateX(-50%);

  min-width:240px;
  padding:14px;
  border:1px solid var(--border);
  border-radius:16px;
  background:#ffffff;
  box-shadow:0 22px 48px rgba(0,0,0,.14);
  z-index:999;               /* 重なり事故防止 */
}

/* リンク */
.dropmenu a{
  display:block;
  padding:12px 14px;
  border-radius:12px;
  text-decoration:none;
  font-weight:900;
  color:var(--text);
  transition:.15s ease;
}

.dropmenu a:hover{
  background:var(--primarySoft);
  color:var(--primary);
}

/* hover維持 */
.dropdown:hover .dropmenu,
.dropdown:focus-within .dropmenu{
  display:block;
}

/* ========== スマホ: ハンバーガー ========== */
.nav-toggle{
  display:none; /* スマホだけ表示 */
  width:46px;
  height:42px;
  border-radius:12px;
  border:1px solid var(--border);
  background:#fff;
  cursor:pointer;
}

.nav-toggle-lines{
  display:block;
  width:22px;
  height:2px;
  background:var(--text);
  position:relative;
  margin:0 auto;
}

.nav-toggle-lines::before,
.nav-toggle-lines::after{
  content:"";
  position:absolute;
  left:0;
  width:22px;
  height:2px;
  background:var(--text);
}

.nav-toggle-lines::before{ top:-7px; }
.nav-toggle-lines::after{ top:7px; }

/* スマホメニュー本体 */
.site-nav{
  width:100%;
  display:flex;
  flex-direction:column;
  gap:12px;
}

.nav-group{
  background:#fff;
  border:1px solid var(--border);
  border-radius:16px;
  padding:12px;
}

.nav-label{
  font-size:12px;
  font-weight:900;
  color:var(--muted);
  margin:0 0 10px;
  letter-spacing:.02em;
}

.nav-items{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  justify-content:center;
}

/* メニューアイテム */
.menu-item{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  font-size:14px;
  font-weight:900;
  color:var(--text);
  padding:10px 12px;
  border-radius:999px;
  background:#fff;
  border:1px solid var(--border);
  transition:.15s ease;
}

.menu-item:hover{
  border-color:var(--primary);
  box-shadow:0 0 0 3px rgba(37,99,235,.12);
}

/* 解説っぽいメニュー（任意でclass付けてる場合） */
.menu-item-article{
  background:#f9fafb;
  border-color:#cfe9d8;
}

/* 現在ページハイライト */
.menu-item.is-active{
  border-color:var(--primary);
  background:var(--primarySoft);
  color:var(--primary);
  box-shadow:0 0 0 3px rgba(37,99,235,.12);
}

/* =========================================================
  TOOL FORM UI（全ページ共通で効かせる）
========================================================= */

/* ラベル/フィールド */
.label,
.card-title{
  font-weight:900;
}

.field{
  display:flex;
  flex-direction:column;
  gap:8px;
}

/* グリッド系（既存HTMLが .grid を使う想定） */
.grid{
  display:grid;
  gap:14px;
}

/* 入力（text/number/date） */
input[type="text"],
input[type="number"],
input[type="date"],
input[type="search"],
select{
  width:100%;
  padding:14px 16px;
  font-size:17px;
  border-radius:14px;
  border:1px solid var(--border);
  background:#ffffff;
  color:var(--text);
  outline:none;
  transition:.15s ease;
}

input[type="text"]::placeholder,
input[type="number"]::placeholder{
  color:#9ca3af;
  font-weight:700;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
select:focus{
  border-color:var(--primary);
  box-shadow:0 0 0 3px rgba(37,99,235,.15);
}

/* 年月日入力（既存: .ymd3 + .ymd-unit） */
.ymd3{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.ymd3 input{
  width:120px;
  text-align:center;
  font-weight:900;
  letter-spacing:.02em;
}

.ymd-unit{
  font-size:14px;
  font-weight:900;
  color:var(--muted);
  margin-right:4px;
}

/* ボタンエリア */
.actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:14px;
}

.btn,
button{
  padding:12px 16px;
  font-size:15px;
  font-weight:900;
  border-radius:14px;
  border:1px solid var(--border);
  background:#fff;
  color:var(--text);
  cursor:pointer;
  transition:.15s ease;
}

.btn:hover,
button:hover{
  transform:translateY(-1px);
  box-shadow:0 8px 20px rgba(0,0,0,.08);
}

.btn:active,
button:active{
  transform:translateY(0);
}

/* 主要ボタン */
.btn-primary,
button[type="submit"],
button.primary{
  background:var(--primary);
  border-color:var(--primary);
  color:#fff;
}

.btn-primary:hover,
button[type="submit"]:hover,
button.primary:hover{
  box-shadow:0 10px 24px rgba(37,99,235,.28);
}

/* ゴースト */
.btn-ghost{
  background:#fff;
}

/* トグル（含む/含まない等で使ってる場合） */
.toggle-row{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.toggle-btn{
  padding:12px 14px;
  border-radius:999px;
  border:1px solid var(--border);
  background:#fff;
  font-weight:900;
  cursor:pointer;
}

.toggle-btn.is-active{
  border-color:var(--primary);
  background:var(--primarySoft);
  color:var(--primary);
  box-shadow:0 0 0 3px rgba(37,99,235,.12);
}

/* =========================================================
  RESULT UI
========================================================= */
.result{
  background:var(--primarySoft);
  border:1px solid #dbeafe;
  border-radius:16px;
  padding:22px;
  text-align:center;
}

.result-main{
  font-size:24px;
  font-weight:900;
  color:var(--primary);
}

.result-sub{
  margin-top:8px;
  font-size:15px;
  color:var(--muted);
  font-weight:800;
}

.note{
  margin-top:12px;
  font-size:14px;
  color:var(--muted);
}

/* =========================================================
  NOTE LIST SPACING（箇条書きだけ整える）
  - UIのリスト（ナビ/カード/一覧）には影響させない
========================================================= */
ul.note,
ol.note{
  margin:12px 0;
  padding-left:1.2em;
}

ul.note li,
ol.note li{
  margin:.45em 0;
  line-height:1.75;
}

/* 追加情報の小さな表（使ってる場合） */
.mini-table{
  margin-top:18px;
  border-radius:16px;
  overflow:hidden;
  border:1px solid var(--border);
  background:#fff;
}

.mini-row{
  display:flex;
  justify-content:space-between;
  padding:14px 16px;
  border-top:1px solid var(--border);
  font-size:15px;
}

.mini-row:first-child{ border-top:none; }

.mini-key{
  color:var(--muted);
  font-weight:800;
}

.mini-val{
  font-weight:900;
}

/* エラー */
.error{
  margin-top:12px;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid #fecaca;
  background:#fff1f2;
  color:var(--danger);
  font-weight:900;
}

/* =========================================================
  LINKS
========================================================= */
.links{
  list-style:none;
  padding:0;
  margin:0;
}

.links li{ margin:10px 0; }

.links a{
  font-size:16px;
  font-weight:900;
  color:var(--primary);
  text-decoration:none;
}

.links a:hover{ text-decoration:underline; }

/* ===============================
  FOOTER（白背景・縦並び整列）
=============================== */

.site-footer{
  background:#ffffff;
  border-top:1px solid var(--border);
  padding:40px 20px;
  margin-top:60px;
}

.site-footer .footer-inner{
  max-width:760px;
  margin:0 auto;
  text-align:center;
}

/* リンク縦並び */
.site-footer .footer-links{
  display:flex;
  flex-direction:column;      /* ← 縦並び */
  align-items:center;
  gap:10px;
  margin-bottom:20px;
}

.site-footer a{
  font-size:15px;
  font-weight:800;
  text-decoration:none;
  color:var(--primary);
  padding:6px 0;
  transition:.15s ease;
}

.site-footer a:hover{
  text-decoration:underline;
  color:#1d4ed8;
}

/* コピーライト */
.site-footer p{
  font-size:13px;
  color:var(--muted);
  margin:0;
}


/* =========================================================
  RESPONSIVE
========================================================= */

/* PCではスマホメニュー隠す */
@media (min-width:641px){
  .nav-toggle{ display:none !important; }
  /* PCは site-nav を使わない設計なら非表示にしてOK
     ただ「PCでも下にメニュー出したい」なら次行を消す */
  .site-nav{ display:none !important; }
}

/* スマホではPCメニュー隠す + ハンバーガー開閉 */
@media (max-width:640px){
  body{ font-size:17px; }
  .wrap{ padding:22px 14px; }

  h1{ font-size:26px; }

  .card{
    padding:20px;
    margin:16px 0;
    border-radius:16px;
  }

  .brand-logo-lg{ height:44px; }

  .pc-nav{ display:none; }

  .nav-toggle{
    display:inline-flex !important;
    align-items:center;
    justify-content:center;
  }

  /* common.js が data-open を切り替える想定 */
  .site-nav{
    display:none;
  }
  .site-nav[data-open="true"]{
    display:flex;
  }

  .nav-items{ justify-content:flex-start; }

  .site-nav .menu-item{
    flex:1 1 auto;
    justify-content:center;
  }

  /* 年月日は縦のほうが見やすい（ここが嫌ならコメントアウト） */
  .ymd3{
    flex-direction:column;
    align-items:stretch;
    gap:12px;
  }
  .ymd3 input{
    width:100%;
  }

  .actions .btn,
  .actions button{
    flex:1 1 auto;
  }

  .result-main{ font-size:22px; }

  /* ===============================
   スマホ：ロゴとハンバーガー横並び
=============================== */

  .header-stack{
    flex-direction:row !important;   /* 縦 → 横 */
    justify-content:space-between;
    align-items:center;
    padding:12px 16px;
  }

  .brand-center{
    justify-content:flex-start;
  }

  .nav-toggle{
    display:flex !important;
    align-items:center;
    justify-content:center;
  }
}

/* ===============================
   FIX: スマホの 年/月/日 を入力の横に
   =============================== */

/* いまスマホで .ymd3 を縦にしてる指定を上書きして横に戻す */
@media (max-width:640px){
  .ymd3{
    flex-direction:row !important;
    align-items:center !important;
    gap:10px !important;
    flex-wrap:wrap !important;
  }
  .ymd3 input{
    width:auto !important;
    flex:1 1 0 !important;
    min-width:96px;          /* 入力が潰れない最低幅 */
  }
  .ymd-unit{
    margin:0 6px 0 0 !important;
    white-space:nowrap;
  }
}

/* ===============================
   FIX: 含む/含まないが入力に被らない
   =============================== */

/* トグル行に確実に余白を作る */
.toggle-row{
  margin-top:12px !important;
  padding-top:6px !important;
  gap:10px !important;
}

/* もしラベルが近すぎる場合の保険（「今日を含む？」みたいな行） */
.toggle-row::before{
  content:"";
  display:block;
  width:100%;
  height:2px;
}

/* ===============================
   FIX: トップのカード（ツール/解説）グラデ無し、色だけ
   =============================== */

.card-tool{
  background:#ffffff !important;
  border-left:6px solid var(--primary) !important;
}

.card-article{
  background:#ffffff !important;
  border-left:6px solid var(--guide) !important;
}

/* ===============================
   スマホ：メニュー開いた時を綺麗に（縦・全幅）
=============================== */

@media (max-width:640px){

  /* メニューはヘッダーの下に全幅で出す */
  .site-nav{
    width:100%;
    margin-top:12px;
  }

  .nav-group{
    padding:14px;
  }

  /* ボタンを横並びにしない：縦並びに統一 */
  .nav-items{
    display:flex !important;
    flex-direction:column !important;
    gap:10px !important;
    justify-content:flex-start !important;
    align-items:stretch !important;
  }

  .site-nav .menu-item{
    width:100% !important;
    border-radius:14px !important;
    padding:14px 14px !important;
    justify-content:flex-start !important;
    font-size:15px !important;
  }

  /* ツールと解説の見出しを少し強く */
  .nav-label{
    font-size:12px !important;
    font-weight:900 !important;
    color:var(--muted) !important;
    margin-bottom:12px !important;
    text-align:left;
  }
}

/* ===============================
   スマホ：ヘッダー内で伸びない「下シート」メニュー
=============================== */

@media (max-width:640px){

  /* ヘッダーは常に上に固定 */
  .site-header{
    position:sticky;
    top:0;
    z-index:300;
    background:#ffffff;
  }

  .header-stack{
    flex-direction:row !important;
    justify-content:space-between;
    align-items:center;
    padding:12px 14px;
  }

  /* メニューはヘッダーの“下から”出す */
  .site-nav{
    position:fixed;
    top:72px;              /* ← ロゴ高さに合わせる */
    left:0;
    right:0;
    bottom:0;
    padding:16px;
    overflow-y:auto;
    background:transparent;
    display:none;
    z-index:250;
  }

  .site-nav[data-open="true"]{
    display:block;
  }

  /* シートカード */
  .site-nav .nav-group{
    background:#ffffff;
    border-radius:18px;
    border:1px solid var(--border);
    box-shadow:0 24px 60px rgba(0,0,0,.15);
    padding:14px;
    margin-bottom:12px;
  }

}

/* =========================================================
  mini-table（用途で探す）をスマホで見やすく
  ※ .btn が入ってる行（日数で探す）は除外して壊さない
========================================================= */
@media (max-width: 560px){

  /* 「用途で探す」など：.btn が無い行だけ縦積みにする */
  .mini-row:not(:has(.btn)){
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  /* 左カラム（リンク）を押しやすい“ボタン風”に */
  .mini-row:not(:has(.btn)) .mini-key{
    color: var(--text);
    font-weight: 900;
  }

  .mini-row:not(:has(.btn)) .mini-key a.menu-item{
    display: block;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    text-decoration: none;
    color: var(--text);
    box-shadow: 0 6px 16px rgba(0,0,0,.06);
  }

  /* 右カラム（説明）は読みやすい文として整える */
  .mini-row:not(:has(.btn)) .mini-val{
    width: 100%;
    font-weight: 700;
    color: var(--muted);
    line-height: 1.8;
    font-size: 14px;
  }
}

/* =========================================================
  関連リンク（common.js生成）の見た目を整理
  - 箇条書きの • を消す
  - リンクが無い行（/ だけ等）を非表示
  - リンクを押しやすいカードにする
========================================================= */

.related-links ul,
.related-links ol{
  list-style:none;
  padding-left:0;
  margin:0;
  display:grid;
  gap:10px;
}

/* “/だけ”みたいに a が無い li を消す（これが効く） */
.related-links li:not(:has(a)){
  display:none;
}

.related-links li{
  margin:0;
}

.related-links a.menu-item{
  display:block;
  width:100%;
  padding:12px 14px;
  border:1px solid var(--border);
  border-radius:14px;
  background:#fff;
  color:var(--text);
  text-decoration:none;
  box-shadow:0 6px 16px rgba(0,0,0,.06);
}

.related-links a.menu-item:hover{
  text-decoration:none;
  box-shadow:0 10px 24px rgba(0,0,0,.08);
}

/* =========================================================
  リンクカードの「A / B」を“ペア”表示にする（/行を消す）
  - HTMLは触らない
  - / はテキストノードなので li{font-size:0} で消す
  - a は font-size を戻して表示
========================================================= */

/* まず：リンク用リストは箇条書きを消す（•も消える） */
ul.links,
.related-links ul,
.related-links ol{
  list-style:none;
  padding-left:0;
  margin:0;
  display:grid;
  gap:10px;
}

/* li 内の「/」などテキストノードを消す（←これが本命） */
ul.links li,
.related-links li{
  font-size:0;
  margin:0;
}

/* リンクは文字サイズを戻してカード化 */
ul.links a.menu-item,
.related-links a.menu-item{
  font-size:15px;
  display:block;
  width:100%;
  padding:12px 14px;
  border:1px solid var(--border);
  border-radius:14px;
  background:#fff;
  color:var(--text);
  text-decoration:none;
  box-shadow:0 6px 16px rgba(0,0,0,.06);
}

ul.links a.menu-item:hover,
.related-links a.menu-item:hover{
  text-decoration:none;
  box-shadow:0 10px 24px rgba(0,0,0,.08);
}

/* 2つ以上リンクが入ってる li は “2列ペア” にする */
ul.links li:has(a:nth-of-type(2)),
.related-links li:has(a:nth-of-type(2)){
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}

/* 1つしかリンクがない li は1列のまま */
ul.links li:not(:has(a:nth-of-type(2))),
.related-links li:not(:has(a:nth-of-type(2))){
  display:block;
}

/* スマホは2列が窮屈なら縦に落とす（見やすさ優先） */
@media (max-width: 420px){
  ul.links li:has(a:nth-of-type(2)),
  .related-links li:has(a:nth-of-type(2)){
    grid-template-columns:1fr;
  }
}


/* =========================================================
  FINAL FIXES (TOP + RELATED)
  - index.html の / は <span class="sep">/</span> にする前提
  - common.js は related-links を <div class="rl-grid"><a>...</a></div> で出す前提
========================================================= */



/* =========================================================
  FINAL FIXES（競合ゼロ版）
  目的：
  - 「期限計算（◯日前・◯日後）一覧」だけ、スマホで必ず横2列＆同サイズ
  - 入力=赤 / 結果=青（ラベル重複なし）
  - YMD「日」ズレ防止（スマホはグリッド固定）
  - 関連リンクの「親：」「/」など文字ノードを消してチップだけに
========================================================= */

/* ---------- 共通：古いセパレータは非表示 ---------- */
.sep{ display:none !important; }

/* =========================================================
  1) 入力 / 結果（色分け）  ※IDベースで全ページ自動
========================================================= */

/* 入力カード（赤） */
.card:has(#calcBtn){
  position:relative;
  background:linear-gradient(180deg, #ffffff 0%, #fff6f6 100%);
  border-left:6px solid #ef4444;
}
.card:has(#calcBtn)::before{
  content:"入力欄";
  position:absolute;
  top:-12px;
  left:16px;
  font-size:12px;
  font-weight:900;
  color:#ef4444;
  background:#ffffff;
  padding:4px 10px;
  border-radius:999px;
  border:1px solid #fecaca;
  letter-spacing:.02em;
}
/* 入力欄の枠をほんのり赤（強すぎない） */
.card:has(#calcBtn) input[type="text"],
.card:has(#calcBtn) input[type="number"],
.card:has(#calcBtn) input[type="date"],
.card:has(#calcBtn) input[type="search"],
.card:has(#calcBtn) select{
  border-color:#fed7d7;
}
.card:has(#calcBtn) input[type="text"]:focus,
.card:has(#calcBtn) input[type="number"]:focus,
.card:has(#calcBtn) input[type="date"]:focus,
.card:has(#calcBtn) input[type="search"]:focus,
.card:has(#calcBtn) select:focus{
  border-color:#ef4444;
  box-shadow:0 0 0 3px rgba(239,68,68,.14);
}

/* 結果カード（青） */
.card:has(#resultBox){
  position:relative;
  background:linear-gradient(180deg, #ffffff 0%, #f1f7ff 100%);
  border-left:6px solid var(--primary);
}
.card:has(#resultBox)::before{
  content:"結果";
  position:absolute;
  top:-12px;
  left:16px;
  font-size:12px;
  font-weight:900;
  color:var(--primary);
  background:#ffffff;
  padding:4px 10px;
  border-radius:999px;
  border:1px solid #dbeafe;
  letter-spacing:.02em;
}
/* 結果ボックス */
.card:has(#resultBox) .result{
  background:#eef5ff;
  border:1px solid #cfe0ff;
  border-radius:16px;
}
/* 結果見出しの重複を防止（カード内の最初のタイトル系を隠す） */
.card:has(#resultBox) > h2:first-child,
.card:has(#resultBox) > .card-title:first-child,
.card:has(#resultBox) > .label:first-child{
  display:none;
}
/* もし .result 側に擬似ラベルが残っていたら消す */
.card:has(#resultBox) .result::before{
  content:none !important;
  display:none !important;
}

/* =========================================================
  2) YMD（年/月/日）「日」ズレ対策：スマホはグリッド固定
========================================================= */
@media (max-width:520px){
  .ymd3{
    display:grid !important;
    grid-template-columns:1fr auto 1fr auto 1fr auto; /* [年][年][月][月][日][日] */
    gap:10px 8px !important;
    align-items:center !important;
  }
  .ymd3 input{
    width:100% !important;
    min-width:0 !important;
    height:54px !important;
    line-height:54px !important;
    padding:0 14px !important;
  }
  .ymd3 .ymd-unit{
    white-space:nowrap !important;
    height:54px !important;
    line-height:54px !important;
    margin:0 !important;
    display:inline-flex !important;
    align-items:center !important;
  }
}
@media (max-width:360px){
  .ymd3{ gap:8px 6px !important; }
  .ymd3 input{ padding:0 10px !important; }
}

/* =========================================================
  3) 関連リンク：チップだけにする（親：や / を消す）
========================================================= */
.related-links{
  display:flex !important;
  flex-wrap:wrap !important;
  gap:10px !important;
  align-items:center !important;
  font-size:0 !important;            /* 文字ノード（親：/）を消す */
  margin-top:14px !important;
}
.related-links::before{
  content:none !important;
  display:none !important;
}
.related-links a,
.related-links a.menu-item{
  font-size:14px !important;         /* ここで復活 */
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  padding:10px 12px !important;
  border-radius:999px !important;
  border:1px solid var(--border) !important;
  background:#fff !important;
  color:var(--text) !important;
  text-decoration:none !important;
  font-weight:900 !important;
  box-shadow:none !important;
  white-space:nowrap !important;
}
.related-links .rl-grid{
  width:100% !important;
  display:grid !important;
  grid-template-columns:1fr 1fr !important;
  gap:10px !important;
  font-size:0 !important;
}
@media (max-width:520px){
  .related-links .rl-grid{ grid-template-columns:1fr !important; }
}

/* =========================================================
  4) 期限計算 一覧（◯日前・◯日後）スマホ完全固定
  条件：mini-row の左右にリンク（menu-item）がある行だけ適用
  → 説明文系の mini-row は崩さない
========================================================= */
@media (max-width:560px){

  /* “左右どっちもリンク”の行だけ2列固定 */
  .mini-table .mini-row:has(.mini-key a):has(.mini-val a){
    display:grid !important;
    grid-template-columns:1fr 1fr !important;
    gap:14px !important;
    align-items:stretch !important;
  }

  .mini-table .mini-row:has(.mini-key a):has(.mini-val a) .mini-key,
  .mini-table .mini-row:has(.mini-key a):has(.mini-val a) .mini-val{
    width:100% !important;
    margin:0 !important;
  }

  /* ボタン完全統一 */
  .mini-table .mini-row:has(.mini-key a):has(.mini-val a) a.menu-item,
  .mini-table .mini-row:has(.mini-key a):has(.mini-val a) a{
    width:100% !important;
    height:56px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    padding:0 14px !important;
    border-radius:14px !important;
    box-sizing:border-box !important;
  }
}

/* 以上：FINAL FIXES */

/* =========================================================
   TOP ONLY: 左ラインを消して、タイトル下にアクセントライン
   - 他ページは一切変更しない
========================================================= */

/* トップだけ card の左ラインを消す */
body.home .card{ border-left:none !important; }

/* トップだけ タイトルにアンダーライン */
body.home .card-title{
  position:relative;
  display:inline-block;
  padding-bottom:10px;
}

body.home .card-title::after{
  content:"";
  position:absolute;
  left:0;
  bottom:0;
  width:64px;
  height:4px;
  border-radius:3px;
  background:var(--border);
  opacity:1;
}

/* 色アクセント（トップだけ） */
body.home .card-title.accent-blue::after{ background:#2f5fd0; }
body.home .card-title.accent-green::after{ background:#2e9d5b; }
body.home .card-title.accent-purple::after{ background:#7a4bd0; }
body.home .card-title.accent-orange::after{ background:#d67a2f; }
body.home .card-title.accent-gray::after{ background:#9aa3af; }
