/* 申請ナビ。色は statics/brand/guideline.md に従う。 */
/* 幅の段（specs/overview.md「スマホとタブレットでの見せ方」。数値は docs/brand/responsive/NOTES.md）
   スマホ      760px 以下     @media (max-width: 760px)                          1列。下のナビ（.tabbar）を出す。上のメニューは出さない
   タブレット  761〜1000px    @media (max-width: 1000px)                         2列が基本。上のメニューを残す。下のナビは出さない
                              タブレットだけ：@media (min-width: 761px) and (max-width: 1000px)
   パソコン    1001px 以上    条件なし                                           もとの形
   例外：1280px（管理画面の表の余白、.profile-cols。「狭めのパソコン」）。
         1100px（記事を書く画面 .article-cols、一覧の表 .admin-compact の列の幅）、1080px（補助金、許認可、相談の設定の画面 .edit-cols）。どちらも管理画面だけ。左のメニュー（232px）が出ている
         1001px からこの幅までは、2列にすると片方の列が狭すぎるので、1列にする。
         1079px（一覧のカードの値 .card-facts だけ。1080px 以上は、.inner の幅が上限に届いて、1280px と同じ組み方になる。それより狭いパソコンの幅を、タブレットと同じ形にする）。
         360px（幅のごく狭いスマホ。詳細ページの下の帯 .dock の値が切れないように、詰める）。
   640、820、900px は、なくなった（管理画面の指定も、760 か 1000 に寄せた。2026-11-19）。新しく書くときは、使わない。
   管理画面（docs/brand/responsive/NOTES.md の 6）：1000px 以下では、左のメニューが引き出しになり、ヘッダーが上に付いたままになる（高さ 57px）。
   スマホは「見るだけ」（一覧の表は、1件ずつの段。編集の画面は、崩れなければよい。機能は止めない）。タブレットは、編集まで使える。
   公開のページの指定（トップとヒーロー、一覧と検索、詳細・チェック・相談、行政書士検索、解説記事、法務、ログインまわり、エラー）も、760 と 1000 に寄せた（2026-11-19）。
   @media の条件に、カスタムプロパティは使えないので、値は直接書く。
   @container は、1か所だけ（解説記事の本文の表。表を入れる箱が 480px より狭いときだけ、「表は、横に送れます」を出す。画面の幅ではなく、箱の幅で決まるので、@media の段には入れない）。
   画面の下に固定する部品の重なり順（z-index）：.check-float 9、.dock 10、.tabbar 20。
   管理画面：下の帯（.profile-bar、記事の .article-actions）30、.fab 40、.edit-bar 50、ヘッダー 60、引き出しの幕 70、引き出し 80、.toast 900、.busy 1000。 */
:root {
  --blue: #1F56B5;
  --green: #0F8A74;
  --orange: #E07B1A;
  --ink: #1A2433;
  --muted: #5B6678;
  --line: #D9DEE6;
  --bg: #F5F6F8;
  --surface: #FFFFFF;
  --accent: var(--blue);
  --accent-soft: #EAF0FA;
  --accent-text: #1F56B5; /* 白地の上で文字に使える濃さ */
  --accent-strong: #1F56B5; /* 白い文字を載せる面に使える濃さ */
}
.brand-hojokin { --accent: var(--orange); --accent-soft: #FDF1E4; --accent-text: #A8540A; --accent-strong: #B85C0C; }
.brand-kyoninka { --accent: var(--green); --accent-soft: #E6F4F1; --accent-text: #0B6F5D; --accent-strong: #0B6F5D; }

* { box-sizing: border-box; }
/* hidden を付けた部品は、display を指定してあっても、出さない */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  font-size: 16px; line-height: 1.8;
}
a { color: var(--accent-text); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 2px;
}
.inner { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
/* 横向きのスマホでは、左右に切り欠きが来る（viewport-fit=cover）。中身が隠れないように、余白を広げる */
.inner { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.hero, .entries, .empty { max-width: 880px; }
main.inner { padding-top: 24px; padding-bottom: 64px; }
/* 内容が短いページでも、フッターが画面の下に付くようにする。本文が、残りの高さを埋める */
body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
body > main { flex: 1 0 auto; width: 100%; }
body > .site-footer, body > .site-header { flex: none; }

.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header .inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 12px; padding-bottom: 12px; }
.site-header .logo { display: block; line-height: 0; }
.site-header .logo img { height: 36px; width: auto; }
.site-header nav { display: flex; gap: 20px; }
.site-header nav a { font-weight: 700; text-decoration: none; color: var(--ink); font-size: 15px; }
/* タブレット：メニューを1行で残して、押せる高さを 44px に。スマホ：ロゴだけ（ほかのページへは、下のナビとフッターから） */
@media (max-width: 1000px) {
  .site-header nav { gap: 4px; }
  .site-header nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; }
}
@media (max-width: 760px) {
  .site-header nav { display: none; }
  .site-header .inner { padding-top: 10px; padding-bottom: 10px; }
}
/* 共通フッター */
.site-footer { background: var(--ink); color: #C9D1DC; font-size: 14px; }
.site-footer .inner { padding-top: 40px; padding-bottom: 28px; }
.site-footer a { color: #fff; }
.footer-top { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr); gap: 32px 56px; }
.footer-brand img { height: 32px; width: auto; display: block; }
.footer-brand p { margin: 14px 0 0; max-width: 24em; }
.footer-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.footer-nav h2 { font-size: 13px; font-weight: 700; color: #fff; margin: 0 0 8px; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.footer-nav a { text-decoration: none; }
.footer-notes { margin-top: 32px; padding-top: 20px; border-top: 1px solid #3A4558; font-size: 13px; }
.footer-notes p { margin: 0 0 4px; max-width: 60em; }
.footer-copy { margin: 16px 0 0; font-size: 12px; color: #9AA6B8; }
@media (max-width: 1000px) {
  /* タブレットは、上にロゴと説明、下にリンクを幅いっぱいの3列（1列が広くなり、言葉が割れない）。リンクは、押せる高さを 44px に */
  .footer-top { grid-template-columns: 1fr; }
  .footer-nav ul { gap: 0; }
  .footer-nav a { display: inline-flex; align-items: center; min-height: 44px; }
  .footer-nav h2 { margin-bottom: 2px; }
}
@media (max-width: 760px) {
  .footer-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* 3つ目のまとまり（申請ナビ）は、2列ぶんの幅を使う（右は、もともと空いている。320px で「プライバシーポリシー」が割れないように） */
  .footer-nav > div:last-child { grid-column: 1 / -1; }
}

h1 { font-size: 28px; line-height: 1.4; margin: 0 0 12px; }
h2 { font-size: 22px; line-height: 1.4; margin: 0 0 16px; }
h3 { font-size: 17px; margin: 28px 0 10px; }
.hero { padding: 16px 0 24px; }
.hero p { margin: 0; color: var(--muted); max-width: 40em; }

.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 0 10px; border-radius: 4px; line-height: 1.9; white-space: nowrap; }
.badge-open { background: none; color: var(--accent-text); box-shadow: inset 0 0 0 1.5px var(--accent-text); }
.badge-soon { background: #C2331F; color: #fff; }
.badge-before { background: #E8ECF2; color: var(--ink); }
.badge-closed { background: #E8ECF2; color: var(--muted); }
.sub { color: var(--muted); font-size: 13px; font-weight: 400; }
.none { color: var(--muted); margin: 0; }
.hint { color: var(--muted); font-size: 13px; }
.empty { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 24px; }

/* 一覧：カバーつきの箱を、2列に並べる */
.list-head { padding: 0 0 12px; }
.list-head p { margin: 0; color: var(--muted); max-width: 40em; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; max-width: none; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 4px; padding: 2px 14px; text-decoration: none; color: var(--ink); font-size: 14px; }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; max-width: none; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; display: flex; flex-direction: column; }
.card > a { color: var(--ink); text-decoration: none; display: flex; flex-direction: column; flex: 1; }
/* 箱の中身は、行数を決めて高さをそろえる */
.cover { aspect-ratio: 16 / 7; background: #E9EDF2; overflow: hidden; }
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.card-meta { display: flex; flex-wrap: nowrap; gap: 12px; align-items: center; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.card-meta .card-inst { min-width: 0; overflow: hidden; }
.card-meta .card-inst { display: block; text-overflow: ellipsis; }
.card-meta .card-inst i { vertical-align: -2px; margin-right: 4px; }
.card-meta span { display: inline-flex; align-items: center; gap: 4px; }
.card-meta i { font-size: 15px; }
/* 地域。長いときは、幅を縮めて「…」にする（縮まないと、「…」なしで枠の端で切れる） */
.card-meta .card-area { min-width: 0; }
.card-meta .card-area > span { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* 地域のあとに実施機関が並ぶときは、地域は縮めず（「全国」のような短い地域を、欠けさせない）、幅の上限だけを決めて、残りを実施機関に渡す */
.card-meta .card-area:has(+ .card-inst) { flex-shrink: 0; max-width: 55%; }
.card h2 { font-size: 18px; line-height: 1.55; height: 3.1em; margin: 8px 0 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-lead { margin: 10px 0 16px; font-size: 14px; line-height: 1.8; height: 5.4em; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-facts { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 12px; margin: auto 0 0; padding-top: 14px; border-top: 1px solid var(--line); }
.card-facts dt { font-size: 12px; color: var(--muted); }
.card-facts dd { margin: 0; font-weight: 700; font-size: 15px; line-height: 1.5; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-facts > div { min-width: 0; }
.card-facts .left { color: var(--accent-text); margin: 0 0 0 8px; }
/* 狭い画面では、3つを横に並べると値が「…」で切れて読めないので、1つずつ、ラベルと値を横に並べて、値は折り返す。
   1001〜1079px（横向きのタブレットなど。カードの幅が、1280px のときより狭い）も、同じ形にする。1080px 以上は、もとの3列のまま */
@media (max-width: 1079px) {
  .card-facts { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .card-facts > div { display: grid; grid-template-columns: 8.5em minmax(0, 1fr); column-gap: 12px; align-items: baseline; font-size: 12px; }
  .card-facts dt { white-space: nowrap; }
  .card-facts dd { white-space: normal; overflow: visible; overflow-wrap: anywhere; }
  .card-facts .left { display: inline-block; }
}
@media (max-width: 760px) {
  .cards { grid-template-columns: 1fr; gap: 16px; }
  /* 1列のときは、となりのカードと高さをそろえなくてよいので、高さの決めうちを外す（短い題や説明の下に、空白だけが残るため）。行数の上限は、そのまま */
  .card h2, .card-lead { height: auto; }
}

/* トップページのヒーロー。左に文字、右に画像。文字は画像に重ねない */
.hero-area { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 48px; align-items: center; padding: 16px 0 8px; }
.hero-text h1 { font-size: 34px; line-height: 1.45; margin: 0 0 14px; word-break: auto-phrase; }
.hero-text p { margin: 0 0 22px; color: var(--muted); font-size: 17px; word-break: auto-phrase; }
.hero-image { aspect-ratio: 16 / 10; border-radius: 6px; overflow: hidden; background: #E9EDF2; }
.hero-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-area + .entries { margin-top: 32px; max-width: none; }
@media (max-width: 760px) {
  .hero-area { grid-template-columns: 1fr; gap: 20px; }
  .hero-text h1 { font-size: 26px; }
  .hero-text p { font-size: 16px; margin-bottom: 16px; }
}

/* 検索のフォーム。補助金トップと一覧で使う */
.search { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1.4fr) auto; gap: 12px; align-items: end; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 18px 20px 20px; }
.search-field { display: grid; gap: 4px; min-width: 0; }
.search label { font-size: 13px; font-weight: 700; }
.search input, .search select { font: inherit; font-size: 16px; height: 46px; padding: 0 12px; border: 1px solid #8793A6; border-radius: 4px; background: #fff; color: var(--ink); width: 100%; min-width: 0; }
/* ブラウザ標準の見た目をやめて、矢印を自前で置く。標準のままだと、矢印が枠の右端にくっつく */
.search input[type="search"] { -webkit-appearance: none; appearance: none; }
.search select { -webkit-appearance: none; appearance: none; padding-right: 40px; text-overflow: ellipsis; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 6l4.500 4.500L12.500 6' fill='none' stroke='%231A2433' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 14px 14px; }
.search .button { height: 46px; padding: 0 22px; border: 0; font: inherit; font-weight: 700; cursor: pointer; justify-content: center; white-space: nowrap; }
.result-count { margin: 18px 0 14px; font-size: 15px; }
.result-count strong { font-size: 20px; margin-right: 2px; font-variant-numeric: tabular-nums; }
/* 「条件をなくす」。言葉の途中で折り返さない。並びを動かさずに、押せる高さだけを広げる（余白を足して、同じだけ引く） */
.result-count a { display: inline-block; white-space: nowrap; padding: 9px 0; margin: -9px 0 -9px 12px; }
.finder { margin-top: 36px; }
.finder > h2 { font-size: 22px; margin: 0 0 14px; }
.finder-groups { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 20px 40px; margin-top: 22px; }
.finder h3 { font-size: 15px; margin: 0 0 10px; display: flex; align-items: center; gap: 6px; }
.finder h3 i { font-size: 18px; color: var(--muted); }
.finder-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.finder-links a { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); border-radius: 4px; padding: 4px 12px; text-decoration: none; color: var(--ink); font-size: 14px; }
.finder-links span { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 1000px) {
  .search { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .search-q { grid-column: 1 / -1; }
  .search .button { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .search { grid-template-columns: 1fr; padding: 16px; }
  .hero-band h1 { font-size: 26px; }
  .hero-band.has-image { padding-top: 40px; padding-bottom: 40px; }
  .finder-groups { grid-template-columns: 1fr; }
}

/* 補助金トップ：横に送る棚と、新しく追加した補助金のリスト */
/* ヒーローエリア。画面の端から端まで広げる。背景の画像があれば、暗い膜を重ねて白い文字にする */
.hero-band { margin: -24px calc(50% - 50vw) 0; padding: 36px calc(50vw - 50%) 40px; }
.hero-band h1 { font-size: 32px; margin: 0 0 10px; }
.hero-band > p { margin: 0 0 22px; color: var(--muted); max-width: 40em; }
.hero-band > p:last-child { margin-bottom: 0; }
.hero-band.has-image { background: linear-gradient(rgba(26, 36, 51, .66), rgba(26, 36, 51, .66)), var(--hero-image) center / cover no-repeat; padding-top: 64px; padding-bottom: 64px; }
.hero-band.has-image h1 { color: #fff; }
.hero-band.has-image > p { color: #E3E8EF; }
.hero-band + .entries { margin-top: 32px; max-width: none; }
.shelf { margin-top: 40px; }
.shelf-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.shelf-head h2 { font-size: 22px; margin: 0; }
.shelf-head p { margin: 2px 0 0; font-size: 14px; color: var(--muted); }
.shelf-buttons { display: flex; gap: 8px; }
.shelf-buttons button { width: 40px; height: 40px; border: 1px solid var(--line); background: var(--surface); border-radius: 6px; color: var(--ink); font-size: 18px; cursor: pointer; display: grid; place-items: center; }
.carousel { list-style: none; margin: 0; padding: 0 0 8px; display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.pick { flex: 0 0 calc((100% - 40px) / 3); min-width: 250px; scroll-snap-align: start; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.pick a { color: var(--ink); text-decoration: none; display: block; height: 100%; }
.pick-cover { aspect-ratio: 16 / 9; background: #E9EDF2; display: grid; place-items: center; overflow: hidden; }
.pick-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pick-body { padding: 14px 16px 16px; }
.pick h3 { font-size: 16px; line-height: 1.55; height: 3.1em; margin: 6px 0 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pick-deadline { margin: 0; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pick-deadline strong { color: var(--accent-text); margin-left: 8px; }
.newlist { list-style: none; margin: 0; padding: 0; }
.newlist li { display: grid; grid-template-columns: 7em minmax(0, 1fr); gap: 4px 16px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--line); }
.newlist li:first-child { border-top: 1px solid var(--line); }
.newlist time { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.newlist a { color: var(--ink); }
.shelf-more { margin: 14px 0 0; font-weight: 700; }
/* 新しく追加した補助金の名前。並びを動かさずに、押せる高さだけを、行の高さいっぱいに広げる */
.newlist a { padding: 10px 0; margin: -10px 0; }
@media (max-width: 1000px) {
  .shelf-buttons button { width: 44px; height: 44px; }
}
@media (max-width: 760px) {
  .pick { flex-basis: 78%; }
  .newlist li { grid-template-columns: 1fr; gap: 0; }
}

/* トップ */
.entries { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.entry { display: flex; gap: 16px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 20px; text-decoration: none; color: var(--ink); }
.entry h2 { border: 0; padding: 0; margin: 0; font-size: 19px; }
.entry p { margin: 0; color: var(--muted); font-size: 14px; }
.entry.is-disabled { opacity: .6; }

/* 詳細：申請までの道のりを、1枚の準備シートにする（docs/brand/design-rules.md） */
.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 14px; overflow-wrap: anywhere; display: flex; flex-wrap: wrap; gap: 4px 8px; }
.preview-bar { background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 4px; font-size: 14px; }
.preview-bar a { color: #fff; }

.sheet-head { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 28px 28px 24px; margin-bottom: 24px; }
.tags { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 13px; line-height: 1.9; color: var(--ink); display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; }
.tag i { font-size: 15px; color: var(--muted); }
.sheet-head h1 { font-size: 30px; line-height: 1.35; margin: 0 0 8px; text-wrap: balance; word-break: auto-phrase; }
.alias { margin: 0 0 8px; color: var(--muted); font-size: 14px; }
/* 文節の切れ目で折り返す。対応していないブラウザでは、ふつうの折り返しになる */
.lead { margin: 0; font-size: 16px; line-break: strict; word-break: auto-phrase; }

.answers { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 12px; margin-top: 22px; }
.answer { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px 16px; border: 1px solid var(--line); border-radius: 6px; text-decoration: none; color: var(--ink); background: var(--surface); min-width: 0; }
.answer-q { font-size: 13px; font-weight: 700; color: var(--accent-text); display: flex; align-items: center; gap: 6px; }
.answer-q i { font-size: 17px; }
.answer-a { font-size: 21px; font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; }
.answer-sub { font-size: 13px; color: var(--muted); }
.answer-sub strong { color: var(--accent-text); font-size: 15px; margin-left: 4px; }

.sheet-body { display: grid; grid-template-columns: minmax(0, 1fr) 264px; gap: 28px; align-items: start; }
.sheet-main { min-width: 0; display: grid; gap: 24px; }
.block { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 24px 28px; scroll-margin-top: 16px; }
.block > h2, .route-title h2 { font-size: 20px; border: 0; padding: 0; margin: 0 0 14px; }
.sheet h3 { font-size: 15px; margin: 0 0 8px; }
.sheet h4 { font-size: 14px; margin: 22px 0 8px; display: flex; align-items: center; gap: 8px; }
.count { font-size: 13px; font-weight: 400; color: var(--muted); margin-left: 6px; }
.sheet .chip { display: inline-block; font-size: 12px; line-height: 1.8; padding: 0 8px; border: 0; border-radius: 4px; background: #EEF1F5; color: var(--ink); white-space: nowrap; }
.sheet .chip-cond { background: none; color: var(--accent-text); box-shadow: inset 0 0 0 1px var(--accent-text); white-space: normal; }

.money { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.pairs { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pairs li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; font-size: 14px; }
.pairs li span { color: var(--muted); }
.pairs strong { font-size: 16px; font-variant-numeric: tabular-nums; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.marks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 15px; }
.marks li { position: relative; padding-left: 26px; }
.marks li::before { position: absolute; left: 2px; top: 0; font-size: 15px; font-weight: 700; }
.marks.ok li::before { content: "✓"; color: var(--accent-text); }
.marks.ng li::before { content: "×"; color: var(--muted); }

/* 道のり */
.route-title { margin-top: 8px; }
.route-title h2 { margin-bottom: 2px; font-size: 22px; }
.route-title p { margin: 0; color: var(--muted); font-size: 14px; }
.route { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.step { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 16px; position: relative; padding-bottom: 20px; scroll-margin-top: 16px; }
.step::before { content: ""; position: absolute; left: 21px; top: 44px; bottom: 0; width: 2px; background: var(--line); }
.step:last-child { padding-bottom: 0; }
.step:last-child::before { display: none; }
.step-no { width: 44px; height: 44px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); color: var(--accent-text); font-weight: 700; font-size: 18px; line-height: 1; display: flex; align-items: center; justify-content: center; position: relative; z-index: 1; }
.step-goal .step-no { background: var(--accent-strong); border-color: var(--accent-strong); color: #fff; }
.step-body { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 20px 24px 22px; min-width: 0; }
.step-body > h3 { font-size: 19px; margin: 0 0 12px; }
.step-lead { margin: 0 0 12px; font-size: 14px; color: var(--muted); }

.mini { margin: 16px 0 0; display: grid; gap: 0; font-size: 14px; }
.mini > div { display: grid; grid-template-columns: 8em minmax(0, 1fr); gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.mini dt { color: var(--muted); font-weight: 700; }
.mini dd { margin: 0; overflow-wrap: anywhere; }

.fold { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; font-size: 14px; }
.fold summary { cursor: pointer; font-weight: 700; }
.fold p { margin: 8px 0 0; color: var(--muted); }
.src { font-size: 12px; color: var(--muted); margin-top: 4px; }
.src summary { cursor: pointer; display: inline-block; text-decoration: underline; text-underline-offset: 3px; list-style: none; }
.src summary::-webkit-details-marker { display: none; }
.src p { margin: 4px 0 0; }

.todo { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.todo li { padding: 10px 0; border-top: 1px solid var(--line); }
.todo li:first-child { border-top: 0; padding-top: 0; }
.todo-name { font-weight: 700; margin-right: 8px; }

.caution { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px; font-size: 13px; margin: 0 0 16px; }
.caution i { font-size: 18px; margin-top: 2px; }
.caution strong { display: block; }

.doclist { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.doclist li { position: relative; padding: 14px 0 14px 34px; border-top: 1px solid var(--line); }
.doclist li:first-child { border-top: 0; }
/* アイコンは1行目の中央に置く。上の余白 14px + 行の高さ(1.8em)の半分 − アイコンの高さの半分 */
.doc-ico { position: absolute; left: 4px; top: calc(14px + 0.9em - 10px); font-size: 20px; color: var(--accent-text); }
.doc-name { margin: 0; font-weight: 700; }
.check-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.check-meta:empty { display: none; }
.check-how { margin: 4px 0 0; font-size: 13px; color: var(--muted); }

.deadline { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; background: var(--accent-soft); border-radius: 6px; padding: 16px 20px; margin-bottom: 12px; }
.deadline-label { font-size: 12px; font-weight: 700; color: var(--accent-text); letter-spacing: .04em; }
.deadline-date { font-size: 22px; font-weight: 700; line-height: 1.4; }
.deadline-left { font-weight: 700; color: var(--accent-text); white-space: nowrap; }
.deadline-left strong { font-size: 36px; line-height: 1; margin: 0 4px; font-variant-numeric: tabular-nums; }
.cta { margin-top: 18px; }
.cta p { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.button { display: inline-flex; align-items: center; gap: 8px; background: var(--accent-strong); color: #fff; font-weight: 700; text-decoration: none; padding: 12px 24px; border-radius: 4px; }
.button i { font-size: 18px; }
.button:hover { filter: brightness(.94); }

.after { list-style: none; margin: 0; padding: 0; counter-reset: after; display: grid; gap: 0; }
.after li { counter-increment: after; position: relative; padding: 8px 0 8px 34px; font-size: 15px; }
.after li::before { content: counter(after) "."; position: absolute; left: 4px; top: 8px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.after .chip { margin-left: 8px; white-space: normal; }
.later { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.later li { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.later strong { font-weight: 500; }
.source { background: transparent; border-style: dashed; }
.source h2 { font-size: 16px; }

/* 横の締切と目次 */
.sheet-side { position: sticky; top: 16px; }
.side-card { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 18px; display: grid; gap: 16px; }
.side-deadline, .side-progress { display: grid; gap: 2px; }
.side-deadline span, .side-progress span { font-size: 12px; font-weight: 700; color: var(--muted); }
.side-deadline strong { font-size: 18px; line-height: 1.4; }
.side-deadline em { font-style: normal; font-weight: 700; color: var(--accent-text); }
.side-progress strong { font-size: 18px; font-variant-numeric: tabular-nums; }
.side-nav { display: grid; gap: 2px; border-top: 1px solid var(--line); padding-top: 12px; }
.side-nav a { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 6px; text-decoration: none; color: var(--ink); font-size: 14px; }
.side-nav a:hover { background: #EEF1F5; }
.side-nav i { font-style: normal; width: 20px; height: 20px; box-sizing: border-box; border-radius: 50%; border: 2px solid var(--accent); color: var(--accent-text); font-size: 11px; font-weight: 700; line-height: 1; display: inline-flex; align-items: center; justify-content: center; flex: none; font-feature-settings: "lnum"; }

/* 狭い画面では、下の帯に締切と書類の数を出す */
.dock { display: none; }
/* 帯の高さは、いつも 64px ＋ 上の線 1px。値が長くても、折り返さない（上に出す .check-float の位置が、帯の高さで決まるため）。
   詳細ページでは、下のナビ（.tabbar）を出さないので、帯は画面の下の端 */
@media (max-width: 1000px) {
  .sheet-body { grid-template-columns: 1fr; }
  .sheet-side { display: none; }
  .dock { display: flex; align-items: center; gap: 16px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: var(--surface); border-top: 1px solid var(--line); padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
  .dock-item { display: grid; line-height: 1.3; min-width: 0; }
  .dock-item span { font-size: 12px; color: var(--muted); font-weight: 700; white-space: nowrap; }
  .dock-item strong { font-size: 16px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .dock-link { flex: none; margin-left: auto; display: inline-flex; align-items: center; min-height: 44px; background: var(--accent-strong); color: #fff; font-weight: 700; font-size: 14px; text-decoration: none; padding: 0 16px; border-radius: 4px; white-space: nowrap; }
  body:has(.dock) .site-footer { padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
}
/* 3つの答えは、タブレットから1列にする（3列のままだと、値の長い枠だけが何行にも折れるため） */
@media (max-width: 1000px) {
  .answers { grid-template-columns: 1fr; }
  .answer { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
  .answer-q { width: 100%; }
}
@media (max-width: 760px) {
  .sheet-head { padding: 20px 18px; }
  .sheet-head h1 { font-size: 23px; }
  .answer-a { font-size: 19px; }
  .block { padding: 20px 18px; }
  .money { grid-template-columns: 1fr; }
  .step { grid-template-columns: 32px minmax(0, 1fr); gap: 10px; }
  .step::before { left: 15px; top: 32px; }
  .step-no { width: 32px; height: 32px; font-size: 15px; }
  .step-body { padding: 16px 16px 18px; }
  /* 列は、中身の幅より狭くなれるようにする（minmax(0, …)。切れ目のない長い URL で、ページが横にはみ出さないように） */
  .mini > div { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .deadline-date { font-size: 19px; }
  /* 公式ページへのボタンは、幅いっぱいにして、言葉が2行になるときは、行の長さをそろえる（最後の1字だけが落ちないように） */
  .cta .button { width: 100%; justify-content: center; text-wrap: balance; }
}
/* 長い URL や英数字が、枠からはみ出さないように、途中で折り返す（はみ出すと、狭い画面でページ全体が縮む） */
.check-how, .doc-name, .todo li, .plain { overflow-wrap: anywhere; }
/* 幅のごく狭い画面（360px 以下）：帯の値が切れないように、間とボタンの余白を詰めて、値の文字を少し小さくする。補助金の2つ目の値（書類の数）は、出さない（ボタンと本文で分かる） */
@media (max-width: 360px) {
  .dock { gap: 12px; }
  .dock-item strong { font-size: 14px; }
  .dock-link { padding: 0 12px; }
  .dock-item + .dock-item { display: none; }
}
@media print {
  .site-header nav, .sheet-side, .dock, .tabbar, .site-footer, .breadcrumb { display: none; }
  body { background: #fff; }
  .src, .fold { display: none; }
}

/* 管理画面とログイン */
.admin-logo { display: flex !important; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); line-height: 1 !important; }
.admin-logo img { height: 32px; }
.admin-logo span { font-size: 14px; font-weight: 700; color: var(--muted); }
.admin-body .site-header nav { align-items: center; }
.logout { display: flex; align-items: center; gap: 10px; margin: 0; }
.logout button, .admin button { font: inherit; font-size: 13px; padding: 3px 12px; border: 1px solid var(--ink); background: var(--surface); color: var(--ink); border-radius: 4px; cursor: pointer; }
/* 管理画面の2カラム。左にメニュー、右に中身 */
.admin-inner { max-width: none; padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); }
/* 画面の高さにぴったり合わせる。ヘッダーと左のメニューは動かず、右の中身だけがスクロールする */
.admin-app { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.admin-app .site-header { flex: none; }
.admin-shell { flex: 1; min-height: 0; display: grid; grid-template-columns: 232px minmax(0, 1fr); }
.admin-side { background: var(--surface); border-right: 1px solid var(--line); padding: 20px 12px 16px; display: flex; flex-direction: column; min-height: 0; overflow-y: auto; }
.admin-side ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
/* いちばん下に寄せる。名前（押すと設定の画面へ）と、ログアウト */
.admin-side ul { margin-bottom: 16px; }
/* 権限のある人だけに出る、管理のメニュー。細い線で分ける */
.admin-side-manage { padding-top: 16px !important; border-top: 1px solid var(--line); }
.admin-side-bottom { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px; align-items: center; }
.admin-side-bottom form { margin: 0; }
.admin-side .side-user { min-width: 0; font-weight: 700; }
.side-user span:not(.visually-hidden) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-logout { width: 40px; height: 40px; display: grid; place-items: center; border: 0; background: none; border-radius: 6px; color: var(--muted); font-size: 19px; cursor: pointer; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.admin-side a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 6px; text-decoration: none; color: var(--ink); font-size: 15px; }
.admin-side a i { font-size: 19px; color: var(--muted); }
.admin-side a.is-active { background: #EEF1F5; font-weight: 700; }
.admin-side a.is-active i { color: var(--ink); }
.admin-main { min-width: 0; min-height: 0; overflow-y: auto; padding: 32px 40px 64px; }
.admin-main .empty { max-width: 760px; }
.admin-main .empty p { margin: 0 0 6px; }
.field-label { font-size: 14px; font-weight: 700; }
.field-value { margin: 0; }
/* スマホとタブレット（1000px 以下）：左のメニューを、左上のボタンで開く引き出しにする（数値は docs/brand/responsive/NOTES.md の 6）。
   開け閉めは statics/js/admin-menu.js（html と body の is-menu-open）。重なり順：ヘッダー 60、幕 70、引き出し 80
   引き出しにするのは、admin-menu.js が動いたときだけ（html の js-admin-menu。<head> の中で付くので、メニューが一瞬出ることはない）。
   動かなかったとき（JavaScript なし、読み込みの失敗）は、メニューを本文の上にそのまま出す。開くボタン、×、幕は出さない */
.admin-menu-button, .admin-menu-close, .admin-backdrop { display: none; }
@media (max-width: 1000px) {
  /* 高さを固定せず、ページ全体で、ふつうに縦にスクロールする。ヘッダーは、上に付いたまま */
  .admin-app { height: auto; display: block; overflow: visible; }
  .admin-shell { display: block; }
  /* ヘッダーの左右の余白は、ログインまわりの画面も、公開のページ（.inner）と同じ 16px に */
  .admin-inner { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .admin-app .site-header { position: sticky; top: 0; z-index: 60; }
  .admin-app .site-header .inner { justify-content: flex-start; gap: 4px; padding: 6px max(16px, env(safe-area-inset-right, 0px)) 6px max(16px, env(safe-area-inset-left, 0px)); }
  .js-admin-menu .admin-menu-button, .js-admin-menu .admin-menu-close { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--ink); font-size: 24px; cursor: pointer; }
  .js-admin-menu .admin-menu-button { margin-left: -10px; flex: none; }
  .js-admin-menu .admin-menu-close { margin: 0 0 8px auto; font-size: 20px; color: var(--muted); flex: none; }
  /* overscroll-behavior：引き出しの中を端まで送っても、うしろのページへ、スクロールを渡さない */
  .js-admin-menu .admin-side { position: fixed; top: 0; bottom: 0; left: 0; z-index: 80; width: min(300px, 84vw); padding: 8px 12px calc(16px + env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px)); overflow-x: hidden; overscroll-behavior: contain; transform: translateX(-100%); visibility: hidden; transition: transform .2s, visibility 0s .2s; }
  /* admin-menu.js が動かなかったとき：メニューを、本文の上に出す。項目は、入る数だけ横に並べる。下の線は、ヘッダーの下の線と同じ */
  html:not(.js-admin-menu) .admin-side { border-right: 0; border-bottom: 1px solid var(--line); padding: 12px max(16px, env(safe-area-inset-right, 0px)) 12px max(16px, env(safe-area-inset-left, 0px)); overflow: visible; }
  html:not(.js-admin-menu) .admin-side ul { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); }
  .admin-side a { padding: 12px; }
  .side-logout { width: 44px; height: 44px; }
  /* 開くときは、すぐに見える状態にする（× のボタンに、フォーカスを移せるように）。閉じるときは、動きが終わってから隠す */
  .js-admin-menu.is-menu-open .admin-side { transform: none; visibility: visible; transition: transform .2s, visibility 0s; }
  /* touch-action：幕の上をなぞっても、うしろのページを動かさない */
  .js-admin-menu.is-menu-open .admin-backdrop { display: block; position: fixed; inset: 0; z-index: 70; width: 100%; padding: 0; border: 0; border-radius: 0; background: rgba(26, 36, 51, .5); cursor: pointer; touch-action: none; }
  /* 開いている間は、うしろのページをスクロールさせない。html に overflow-x: clip があるので、body だけに書いても画面全体には伝わらない。html にも書く */
  html.is-menu-open, body.is-menu-open { overflow: hidden; }
  /* 下の余白は、右下に浮かせるボタン（.fab）が、最後の行に重ならない分 */
  .admin-main { overflow-y: visible; padding: 20px max(16px, env(safe-area-inset-right, 0px)) 96px max(16px, env(safe-area-inset-left, 0px)); }
}
@media (prefers-reduced-motion: reduce) { .js-admin-menu .admin-side, .js-admin-menu.is-menu-open .admin-side { transition: none; } }
.admin-head { padding: 0 0 20px; }
.admin-head h1 { font-size: 24px; margin: 0 0 6px; }
.admin-head p { margin: 0 0 4px; }

.login { max-width: 420px; margin: 40px auto 0; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 32px; }
.login h1 { font-size: 24px; margin: 0 0 4px; }
.login > p { margin: 0 0 20px; }
.login-wide { max-width: 520px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.login-links { list-style: none; margin: 22px 0 0; padding: 16px 0 0; border-top: 1px solid var(--line); display: grid; gap: 6px; font-size: 14px; }
.login form + form, .login p + form { margin-top: 16px; }
.form { display: grid; gap: 18px; }
.form-wide { max-width: 760px; gap: 24px; }
.form fieldset { border: 1px solid var(--line); border-radius: 6px; background: var(--surface); padding: 20px 24px 24px; margin: 0; display: grid; gap: 18px; min-width: 0; }
.form legend { font-weight: 700; padding: 0 8px; }
.field { display: grid; gap: 4px; min-width: 0; }
.field label { font-size: 14px; font-weight: 700; }
.field input, .field select, .field textarea { font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid #8793A6; border-radius: 4px; background: #fff; color: var(--ink); width: 100%; min-width: 0; }
.field textarea { line-height: 1.7; resize: vertical; }
.field select { -webkit-appearance: none; appearance: none; padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 6l4.5 4.5L12.5 6' fill='none' stroke='%231A2433' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 14px 14px; max-width: 280px; }
.help { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.form .button { border: 0; font: inherit; font-weight: 700; cursor: pointer; justify-content: center; }
.login .button { width: 100%; }
/* 主役でない操作に使う、小さいボタン。上の font: inherit より後ろに置く */
.form .button-small { padding: 5px 14px; font-size: 13px; line-height: 1.6; }
.form-actions { display: flex; align-items: center; gap: 20px; }
.form-error, .form-saved { display: flex; gap: 8px; align-items: flex-start; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); padding: 12px 14px; margin: 0 0 18px; font-size: 14px; }
.form-error { border-color: #C2331F; color: #A12A19; }
.form-error i, .form-saved i { font-size: 18px; margin-top: 3px; }
.with-thumb { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 16px; align-items: start; }
.with-thumb img { width: 160px; height: 100px; object-fit: cover; border-radius: 4px; background: #E9EDF2; }

.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.tabs a { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); border-radius: 4px; padding: 6px 16px; text-decoration: none; color: var(--ink); font-size: 14px; }
.tabs a.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.tabs span { font-size: 12px; font-variant-numeric: tabular-nums; opacity: .8; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
.table-wrap + .hint { margin: 12px 0 0; }
.admin { border-collapse: collapse; width: 100%; font-size: 15px; }
.admin th, .admin td { text-align: left; vertical-align: middle; padding: 18px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; line-height: 1.7; }
.admin th { padding-top: 14px; padding-bottom: 14px; }
.admin td:first-child, .admin th:first-child { padding-left: 24px; }
.admin td:last-child, .admin th:last-child { padding-right: 24px; }
.admin tbody tr:last-child td { border-bottom: 0; }
.admin th { font-size: 12px; color: var(--muted); font-weight: 700; }
.admin .num { font-variant-numeric: tabular-nums; text-align: right; }
/* 補助金名の列が、残りの幅をすべて使う。ほかの列は、中身の幅だけ取る */
.admin-title-cell { width: 100%; white-space: normal !important; min-width: 300px; }
.admin-title { display: flex; gap: 16px; align-items: center; line-height: 1.6; }
.admin-title img { width: 80px; height: 50px; object-fit: cover; border-radius: 4px; flex: none; background: #E9EDF2; }
.admin .inline { display: flex; align-items: center; gap: 12px; margin: 0; }
.admin .inline button { padding: 6px 14px; }
.admin .state { font-weight: 700; color: var(--muted); min-width: 3.5em; }
.admin .state.is-on { color: var(--ink); }
@media (max-width: 760px) {
  .login { padding: 24px 20px; margin-top: 16px; }
  .with-thumb { grid-template-columns: 1fr; }
  .form fieldset { padding: 16px 16px 20px; }
}
/* ログインまわりの文字のリンク。スマホとタブレットでは、押せる高さを 44px に（フッターのリンクと同じ形） */
@media (max-width: 1000px) {
  .login-links { gap: 0; padding-top: 8px; }
  .login-links a { display: inline-flex; align-items: center; min-height: 44px; }
  .login > p > a { padding: 11px 0; margin: -11px 0; }
}

/* 丸の中の数字。
   この書体は、文字の上側の余白が下側より大きい。行の箱で中央にそろえると、数字は約1px下に寄る。
   そこで行の余白を切り落とし、数字そのものの高さ（上端から下端まで）で中央にそろえる。 */
.side-nav i span, .step-no span { display: block; line-height: 1; }
@supports (text-box: trim-both cap alphabetic) {
  .side-nav i span, .step-no span { text-box: trim-both cap alphabetic; }
}
@supports not (text-box: trim-both cap alphabetic) {
  .side-nav i span, .step-no span { position: relative; top: -0.09em; }
}

/* 管理画面の表。画面が狭めのときは、余白と画像を詰めて、横にはみ出さないようにする */
@media (max-width: 1280px) {
  .admin-main { padding-left: 24px; padding-right: 24px; }
  .admin th, .admin td { padding-left: 10px; padding-right: 10px; }
  .admin td:first-child, .admin th:first-child { padding-left: 16px; }
  .admin td:last-child, .admin th:last-child { padding-right: 16px; }
  .admin-title-cell { min-width: 220px; }
  .admin-title { gap: 12px; }
  .admin-title img { width: 56px; height: 35px; }
  .admin .inline { gap: 8px; }
  .admin .inline button { padding: 6px 10px; }
}
/* スマホとタブレットでは、左右の余白を 16px に（上の 24px より後ろに書く） */
@media (max-width: 1000px) {
  .admin-main { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
}

/* 登録情報設定：プロフィール写真、チェック、短い入力欄 */
.photo-row { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 24px; align-items: start; }
.photo-wrap { position: relative; width: 120px; }
.photo { width: 120px; height: 120px; border-radius: 6px; overflow: hidden; background: #E9EDF2; display: grid; place-items: center; }
/* 画像の右上に置く×。保存した写真の削除と、選んだ写真の取り消しに使う */
.photo-x { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 4px; background: rgba(26, 36, 51, .78); color: #fff; font-size: 14px; cursor: pointer; }
.photo-x[hidden], .photo img[hidden] { display: none; }
.photo-note { margin: 6px 0 0; font-size: 12px; color: var(--muted); text-align: center; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo i { font-size: 52px; color: #8793A6; }
.photo-forms { display: grid; gap: 12px; min-width: 0; }
.photo-form { display: grid; gap: 12px; justify-items: start; }
.photo-form .field { width: 100%; }
.field input[type="file"] { padding: 8px; font-size: 14px; }
.plain-button { font: inherit; font-size: 14px; background: none; border: 0; padding: 0; color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.check { display: flex !important; align-items: center; gap: 10px; font-weight: 400 !important; font-size: 16px !important; cursor: pointer; }
.check input { width: 20px !important; height: 20px; padding: 0 !important; accent-color: var(--accent-strong); flex: none; }
.field .input-short { max-width: 200px; }
@media (max-width: 760px) { .photo-row { grid-template-columns: 1fr; } }

.field .input-medium { max-width: 320px; }
.photo i[hidden], #photo-delete[hidden] { display: none; }

/* ---- 補助金管理 ---- */
.admin-head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.admin-head-row .form { flex: none; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.form-note { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 12px 16px; background: #EEF1F5; border-radius: 6px; font-size: 14px; }
.form-note i { font-size: 18px; margin-top: 3px; color: var(--muted); }
.form-note[hidden] { display: none; }
.admin-main > .form-note { max-width: 760px; margin-bottom: 24px; }
/* 行ごとの入力欄。--cols で列の幅を決める */
.row { display: grid; grid-template-columns: var(--cols, 1fr 1fr); gap: 8px; margin-bottom: 4px; }
.row .row-wide { grid-column: 1 / -1; }
.row-block { padding: 12px; background: #F6F8FA; border-radius: 6px; margin-bottom: 8px; }
.field .row input, .field .row select { font-size: 15px; padding: 8px 10px; }
.cover-wrap { width: 160px; }
@media (max-width: 760px) {
  .row { grid-template-columns: 1fr; }
}

/* ---- AI が詳細ページを作っているあいだの覆い。画面全体を操作できなくする ---- */
.busy { position: fixed; inset: 0; z-index: 1000; background: rgba(26, 36, 51, .6); display: grid; place-items: center; padding: 24px; outline: none; }
.busy-box { background: var(--surface); border-radius: 8px; padding: 32px; max-width: 440px; text-align: center; }
.busy-box i { font-size: 32px; color: var(--muted); }
.busy-box p { margin: 8px 0 0; font-size: 14px; }
.busy-box .busy-title { font-size: 18px; font-weight: 700; }
.head-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin: 12px 0 8px; }
.head-actions .button { color: #fff; }

/* ---- 詳細ページを、本番と同じ見え方のまま編集する画面（views/admin/page-edit.ejs） ---- */
.edit-bar { position: fixed; right: 24px; bottom: 24px; z-index: 50; width: 216px; display: grid; gap: 8px; background: var(--ink); color: #fff; padding: 14px; border-radius: 8px; font-size: 13px; box-shadow: 0 6px 20px rgba(26, 36, 51, .3); }
.edit-bar p { margin: 0; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.edit-bar p span { font-size: 12px; opacity: .8; }
.edit-bar .edit-bar-note { display: block; font-size: 12px; line-height: 1.6; opacity: .8; }
.edit-bar button, .edit-bar a { display: flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-size: 13px; padding: 8px 10px; border-radius: 4px; text-decoration: none; cursor: pointer; }
.edit-bar button { font-weight: 700; font-size: 14px; border: 0; background: #fff; color: var(--ink); }
.edit-bar a { color: #fff; border: 1px solid rgba(255, 255, 255, .35); }
.edit-bar i { font-size: 16px; }
/* 本番では、右の列の締切と目次が、スクロールについてくる。編集の画面では、浮いた操作と重なるので、ついてこないようにする */
.editing .sheet-side, .editing .side-card { position: static; }
/* 浮いた操作の下に、ページの最後が隠れないようにする */
.editing { padding-bottom: 40px; }
/* スマホとタブレット：右下の箱をやめて、下に、ボタンを横に並べた帯にする。右の列（締切、目次）がなくなる幅と同じ */
@media (max-width: 1000px) {
  .edit-bar { left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); width: auto; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); padding: 10px; }
  .edit-bar p, .edit-bar .edit-bar-note { display: none; }
  .edit-bar a, .edit-bar button, .edit-bar .edit-bar-sub { min-height: 44px; padding: 4px; font-size: 13px; line-height: 1.4; text-align: center; }
  .editing { padding-bottom: 96px; }
  /* フッターのいちばん下の文が、帯に隠れないようにする */
  body:has(.edit-bar) .site-footer .inner { padding-bottom: calc(108px + env(safe-area-inset-bottom, 0px)); }
}
/* 書きかえられる部分。うすい色を敷いて、ほかと見分ける */
.editing [data-ed], .editing [data-k]:not(select), .editing [data-text] { background: #FDF1DF; border-radius: 3px; padding: 0 4px; min-width: 3em; display: inline-block; vertical-align: top; outline-offset: 1px; cursor: text; }
.editing [data-ed]:empty::before, .editing [data-k]:empty::before, .editing [data-text]:empty::before { content: attr(data-ph); color: #9A7B4F; font-weight: 400; }
.editing .lead [data-ed], .editing .step-lead [data-ed], .editing .check-how [data-k], .editing .mini dd [data-ed], .editing [data-text] { display: block; }
/* 書きこめる欄（contenteditable）は、ブラウザが overflow-wrap を break-word に戻す。長い URL を、欄の中で折り返す */
.editing .mini dd [data-ed] { overflow-wrap: anywhere; }
.editing .marks li, .editing .after li, .editing .pairs strong { display: flex; align-items: flex-start; gap: 6px; }
.editing .marks li [data-text], .editing .after li > [data-k] { flex: 1; }
.editing .pairs li { flex-wrap: nowrap; align-items: flex-start; }
.editing .chip { display: inline-flex; align-items: center; gap: 4px; }
.editing .chip [data-k] { background: none; padding: 0; }
.editing .chip { background: #FDF1DF; }
.editing .src p { margin: 4px 0 0; }
.ed-del { flex: none; width: 22px; height: 22px; display: inline-grid; place-items: center; padding: 0; border: 0; border-radius: 4px; background: none; color: var(--muted); font-size: 13px; cursor: pointer; vertical-align: middle; }
.ed-add { display: inline-flex; align-items: center; gap: 4px; margin: 8px 0 0; padding: 4px 10px; font: inherit; font-size: 13px; border: 1px dashed #8793A6; border-radius: 4px; background: none; color: var(--ink); cursor: pointer; }
.ed-select { font: inherit; font-size: 13px; padding: 2px 6px; border: 1px solid #8793A6; border-radius: 4px; background: #FDF1DF; color: var(--ink); }
.ed-note { margin: 10px 0 0; font-size: 12px; color: var(--muted); }
.editing .doc-name { display: flex; align-items: flex-start; gap: 6px; }
.editing .doc-name [data-k] { flex: 1; }
.editing .check-meta { align-items: center; }
.fold-open { margin-top: 16px; }
.fold-title { margin: 0; font-weight: 700; font-size: 14px; }
.editing .later li { align-items: center; }
.head-actions .button-small { padding: 6px 14px; font-size: 13px; }

/* ---- 補助金管理の一覧。タブと表を、ひとつながりの枠にする ---- */
.panel { margin-top: 8px; }
.panel-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.panel-tabs a { display: flex; align-items: center; gap: 8px; padding: 9px 14px; background: #E4E9F0; border: 1px solid var(--line); border-bottom: 0; border-radius: 6px 6px 0 0; text-decoration: none; color: var(--muted); font-size: 14px; font-weight: 700; min-width: 0; }
.panel-tabs a i { font-size: 17px; flex: none; }
.panel-tab-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.panel-tab-count { flex: none; font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; }
/* 選んでいるタブは、下の表と同じ白にして、境目の線を隠す */
.panel-tabs a.is-active { background: var(--surface); color: var(--ink); position: relative; z-index: 1; margin-bottom: -1px; padding-bottom: 10px; }
.panel-body { background: var(--surface); border: 1px solid var(--line); border-radius: 0 0 6px 6px; }
.panel-table { overflow-x: auto; }
.panel-empty { margin: 0; padding: 28px 20px; color: var(--muted); font-size: 14px; }
/* 行を低く、文字を小さくして、たくさん見えるようにする。列の幅は固定 */
.admin-compact { table-layout: fixed; min-width: 760px; font-size: 13px; }
.admin-compact th, .admin-compact td { padding: 8px 12px; line-height: 1.5; overflow: hidden; text-overflow: ellipsis; }
.admin-compact th { padding-top: 8px; padding-bottom: 8px; font-size: 11px; }
.admin-compact td:first-child, .admin-compact th:first-child { padding-left: 16px; }
.admin-compact td:last-child, .admin-compact th:last-child { padding-right: 16px; }
.admin-compact tbody tr:last-child td { border-bottom: 0; }
.admin-compact .col-status { width: 132px; }
.admin-compact .col-date { width: 104px; }
.admin-compact .col-detail { width: 96px; }
.admin-compact .col-verified { width: 168px; }
.admin-compact .admin-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.admin-compact .admin-title img { width: 48px; height: 30px; flex: none; object-fit: cover; border-radius: 3px; }
.admin-compact .admin-title > div { min-width: 0; }
.admin-compact .admin-title a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.admin-compact .sub { font-size: 11px; color: var(--muted); }
.status-text { font-size: 13px; }
.status-form { margin: 0; }
.status-select { width: 100%; font: inherit; font-size: 13px; padding: 4px 26px 4px 8px; border: 1px solid #B4BDCB; border-radius: 4px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 6l4.5 4.5L12.5 6' fill='none' stroke='%231A2433' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 8px center / 12px; color: var(--ink); -webkit-appearance: none; appearance: none; cursor: pointer; }
/* 右下に浮かせるボタン */
.fab { position: fixed; right: 32px; bottom: 28px; z-index: 40; margin: 0; }
.fab button, .fab a { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-size: 14px; font-weight: 700; padding: 12px 20px; border: 0; border-radius: 6px; background: var(--accent-strong); color: #fff; cursor: pointer; box-shadow: 0 4px 14px rgba(26, 36, 51, .28); }
.fab button i { font-size: 18px; }
@media (max-width: 760px) {
  /* タブ：言葉の下に、件数。4つ並んでも、言葉が「…」にならない */
  .panel-tabs a { flex-direction: column; justify-content: center; gap: 0; min-height: 48px; padding: 4px; font-size: 12px; text-align: center; }
  .panel-tabs a.is-active { padding-bottom: 5px; }
  .panel-tabs a i { display: none; }
  .panel-tab-label { flex: none; max-width: 100%; }
  .fab { right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
}
/* スマホとタブレットでは、文字を 12px より小さくしない */
@media (max-width: 1000px) { .admin-compact th, .admin-compact .sub { font-size: 12px; } }
/* タブレットと、狭めのパソコン（1100px まで。3段の外の例外）：一覧の表を、横に送らずに収める（中身の幅は、768px の画面で 734px、1024px の画面で 742px） */
@media (min-width: 761px) and (max-width: 1100px) {
  .admin-compact { min-width: 720px; }
  .status-select { min-height: 40px; }
  /* 幅の決まった列を、中身が入る分まで詰めて、名前の列を広げる（列が7つある行政書士管理で、名前の列が 44px になるのを防ぐ）。後ろに同じ強さの指定がある列は、table を付けて勝たせる */
  .admin-compact .col-status { width: 116px; }
  .admin-compact .col-date { width: 100px; }
  .admin-compact .col-detail { width: 84px; }
  .admin-compact .col-verified { width: 140px; }
  table.admin-compact .col-kind { width: 76px; }
  table.admin-compact .col-field { width: 120px; }
  table.admin-compact .col-person { width: 160px; }
  .admin-compact td.cell-title { white-space: normal; overflow-wrap: anywhere; }
  /* 名前の列が狭くなるので、名前を2行まで出す */
  .admin-compact .admin-title a { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; white-space: normal; }
}
/* スマホ：一覧の表を、1件ずつの段にする。見出しの行は出さず、項目の名前を、値の上に小さく出す（td の data-label）。
   名前のセル（.cell-title）は、いちばん上に、幅いっぱい。.cell-wide は、幅いっぱい。.cell-c1、.cell-c2 は、置く列を決める */
@media (max-width: 760px) {
  .admin-compact { display: block; min-width: 0; table-layout: auto; }
  .admin-compact colgroup, .admin-compact thead { display: none; }
  .admin-compact tbody { display: block; }
  .admin-compact tr { display: grid; grid-template-columns: 132px minmax(0, 1fr) minmax(0, 1fr); grid-auto-flow: row dense; gap: 10px 14px; align-items: end; padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .admin-compact tbody tr:last-child { border-bottom: 0; }
  .admin-compact tbody td, .admin-compact tbody td:first-child, .admin-compact tbody td:last-child { display: block; padding: 0; border: 0; white-space: normal; overflow: visible; overflow-wrap: anywhere; min-width: 0; }
  .admin-compact td.cell-title { grid-column: 1 / -1; order: -1; }
  .admin-compact td.cell-wide { grid-column: 1 / -1; }
  .admin-compact td.cell-c1 { grid-column: 1; }
  .admin-compact td.cell-c2 { grid-column: 2; }
  .admin-compact td[data-label]::before { content: attr(data-label); display: block; font-size: 12px; color: var(--muted); }
  .admin-compact .admin-title a, .admin-compact .cell-title > a { white-space: normal; }
  .admin-compact .sub { font-size: 12px; }
  .status-select { min-height: 44px; font-size: 16px; }
  /* 表の上の、種別でしぼる行（.panel-filter）と、さがす行（.panel-search）の、押せる高さを広げる指定は、それぞれの、もとの指定のうしろに書いてある（ここに書くと、うしろの指定に負ける） */
}
.admin-main > .form-error { max-width: 760px; margin-bottom: 24px; }

/* ---- この情報を確認した行政書士（補助金の詳細ページ） ---- */
.verifier { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 16px; }
.verifier-photo { width: 72px; height: 72px; border-radius: 4px; overflow: hidden; background: #E9EDF2; display: grid; place-items: center; }
.verifier-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.verifier-photo i { font-size: 32px; color: #8793A6; }
.verifier-body p { margin: 0; }
.verifier-site { display: flex; align-items: center; gap: 6px; font-size: 13px; margin-top: 4px !important; overflow-wrap: anywhere; }
.verifier-site i { font-size: 15px; color: var(--muted); flex: none; }
.verifier-name { font-size: 17px; font-weight: 700; }
.verifier-name span { font-size: 13px; font-weight: 400; color: var(--muted); margin-left: 4px; }
.verifier-meta { font-size: 13px; color: var(--muted); line-height: 1.7; }
.verifier-bio { font-size: 14px; margin-top: 8px !important; }

/* ---- 管理画面：行政書士を検索して選ぶ欄 ---- */
.picked { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 4px; background: #EEF1F5; font-size: 15px; }
.picked[hidden] { display: none; }
.picked i { font-size: 18px; color: var(--muted); }
.picked-text { flex: 1; min-width: 0; font-weight: 700; }
.picked-clear { flex: none; width: 26px; height: 26px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 4px; background: none; cursor: pointer; }
.picker-results { list-style: none; margin: 0; padding: 0; border: 1px solid #8793A6; border-radius: 4px; background: #fff; max-height: 280px; overflow-y: auto; }
.picker-results[hidden] { display: none; }
.picker-results li + li { border-top: 1px solid var(--line); }
.picker-results button { display: grid; gap: 2px; width: 100%; text-align: left; font: inherit; padding: 8px 12px; border: 0; background: none; color: var(--ink); cursor: pointer; }
.picker-results button span, .picker-none { font-size: 13px; color: var(--muted); }
.picker-none { padding: 10px 12px; }

/* ---- トースト。「保存しました」の類を、画面の右上に数秒だけ出す ---- */
.toast { position: fixed; top: 76px; right: 24px; z-index: 900; max-width: min(420px, calc(100vw - 32px)); margin: 0; box-shadow: 0 6px 20px rgba(26, 36, 51, .22); animation: toast 5s ease forwards; }
@keyframes toast {
  0% { opacity: 0; transform: translateY(-8px); }
  6%, 86% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: translateY(-8px); visibility: hidden; }
}
@media (prefers-reduced-motion: reduce) {
  @keyframes toast { 0%, 86% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
}
@media (max-width: 760px) { .toast { top: 12px; right: 16px; } }
/* 管理画面の 1000px 以下では、ヘッダー（57px）が上に付いたままなので、その下に出す */
@media (max-width: 1000px) { .admin-app .toast { top: 69px; right: 16px; } }

/* ---- 補助金1件の設定の画面。2カラム（左：サムネイル、監修者、公開ステータス。右：それ以外） ---- */
.edit-cols { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 24px; align-items: start; max-width: 1180px; margin: 0; }
.edit-side, .edit-main { gap: 24px; min-width: 0; }
.thumb-wrap { width: 100%; }
.thumb-wrap img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 4px; background: #E9EDF2; }
.admin-main > .form-error, .admin-main > .form-note { max-width: 1180px; }
/* めったに使わない操作。小さく、文字だけで置く */
.regenerate { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; max-width: 1180px; margin: 40px 0 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.regenerate button { font: inherit; padding: 0; border: 0; background: none; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
/* 1080px は、3段の外の例外。1001〜1080px で2列のままだと、右の列が 357〜436px しかなくなるので、1列にする */
@media (max-width: 1080px) { .edit-cols { grid-template-columns: 1fr; } }
/* スマホ：横に2つ並べた欄を、1列に。姓と名、ふりがなは、2列のまま */
@media (max-width: 760px) { .admin-main .field-row:not(:has([name^="lastName"])) { grid-template-columns: minmax(0, 1fr); gap: 18px; } }

/* 補助金の設定の画面の見出し。右に「ページの内容を編集する」 */
.admin-head-row { max-width: 1180px; flex-wrap: nowrap; }
.admin-head-row > div { min-width: 0; }
.head-edit { flex: none; color: #fff; padding: 6px 14px; font-size: 13px; }
.admin-head .sub a { color: inherit; }
.admin-head .sub a i { font-size: 13px; margin-left: 2px; vertical-align: -1px; }
@media (max-width: 760px) { .admin-head-row { flex-wrap: wrap; } }

/* 箱ごとのフォーム。中の fieldset が、ほかの箱と同じ間隔で並ぶようにする */
.edit-side > form, .edit-main > form { margin: 0; display: grid; }
.fab a { text-decoration: none; }

/* ---- 補助金の設定の画面：外部サイトの資料 ---- */
.source-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.source-list > li { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.source-thumb { width: 72px; height: 45px; border-radius: 4px; overflow: hidden; background: #E9EDF2; display: grid; place-items: center; }
.source-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.source-thumb i { font-size: 22px; color: #8793A6; }
.source-thumb-large { width: 160px; height: 100px; }
.source-thumb-large i { font-size: 34px; }
.source-body { min-width: 0; }
.source-body p { margin: 0; }
.source-title { display: block; font-weight: 700; font-size: 15px; overflow-wrap: anywhere; }
.source-meta, .source-state, .source-url { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.source-desc { font-size: 13px; margin-top: 4px !important; }
.source-state .is-failed { color: #A12A19; }
.source-actions { display: flex; align-items: center; gap: 10px; }
.source-actions form { margin: 0; }
.source-actions .plain-button { font-size: 13px; }
.source-candidates ul { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 4px; }
.source-candidates li { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; font-size: 13px; }
.source-candidates li span { min-width: 0; overflow-wrap: anywhere; color: var(--muted); }
.source-add { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.source-add .button { border: 0; font: inherit; font-weight: 700; font-size: 13px; padding: 9px 16px; cursor: pointer; }
#source-error { margin: 8px 0 0; }
#source-error[hidden], .source-confirm[hidden] { display: none; }
/* 取得先の確認 */
.source-confirm { margin: 0; padding: 16px; border: 1px solid #8793A6; border-radius: 6px; display: grid; gap: 12px; }
.source-question { margin: 0; font-weight: 700; }
.source-preview { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 16px; align-items: start; }
.source-pdfs ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; max-height: 220px; overflow-y: auto; }
.source-pdfs .check { font-size: 14px !important; align-items: flex-start; }
.source-pdfs .check input { margin-top: 3px; }
.source-reflect { margin: 0; display: grid; gap: 8px; justify-items: start; padding-top: 16px; border-top: 1px solid var(--line); }
@media (max-width: 760px) { .source-preview, .source-list > li { grid-template-columns: 1fr; } }

/* プレビューの上の帯。右に、編集に戻る、公開する */
.preview-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 16px; }
.preview-bar p { margin: 0; }
.preview-bar strong { margin-right: 12px; }
.preview-bar-actions { display: flex; align-items: center; gap: 16px; }
.preview-bar form { margin: 0; }
.preview-bar button { font: inherit; font-size: 14px; font-weight: 700; padding: 6px 20px; border: 0; border-radius: 4px; background: #fff; color: var(--ink); cursor: pointer; }
/* 編集画面の浮いた操作の中の、2つ目のボタン */
.edit-bar .edit-bar-sub { font-weight: 400; font-size: 13px; background: none; color: #fff; border: 1px solid rgba(255, 255, 255, .35); }
/* プレビューでは、上の帯のボタンに重ならないよう、帯の下に出す */
.toast-below { top: 152px; }
@media (max-width: 760px) { .toast-below { top: 12px; } }

/* 詳細ページの「対象になる人」「対象にならない人」。多いときだけ、6件目からを閉じておく */
.more { margin-top: 8px; font-size: 14px; }
.more summary { cursor: pointer; font-weight: 700; color: var(--accent-text); }
.more .marks { margin-top: 8px; }


.button-sub { background: var(--surface); color: var(--ink); border: 1px solid #8793A6; }

/* ---- 対象かどうかの、結果のページ。詳細ページと同じ枠（sheet）を使う ---- */
.verdict-eligible .sheet-head-sub h1 i { color: var(--accent-text); }
.verdict-text { margin: 0; font-size: 15px; line-height: 1.9; }
/* 理由は、1つずつ間をあけて並べる */
.verdict-reasons { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.verdict-reasons li { position: relative; padding-left: 30px; font-size: 16px; line-height: 1.85; }
.verdict-reasons li::before { position: absolute; left: 2px; top: 0; font-weight: 700; content: "・"; color: var(--muted); }
.verdict-eligible .verdict-reasons li::before { content: "✓"; color: var(--accent-text); }
.verdict-not_eligible .verdict-reasons li::before { content: "×"; }
.verdict-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.verdict-actions .button { padding: 14px 28px; font-size: 16px; }
.block[hidden] { display: none; }
@media (max-width: 760px) { .verdict-actions .button { width: 100%; justify-content: center; } }

/* ---- 自分が対象かをチェック ---- */
/* 詳細ページの、ステップ1に置くボタン */
.check-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 0 0 18px; }
.check-cta .button[aria-disabled="true"] { opacity: .5; }
.check-cta p { margin: 0; font-size: 13px; color: var(--muted); flex: 1; min-width: 200px; }
/* 補助金の詳細ページに付く、下のページ（チェック、結果、無料相談）。詳細ページと同じ枠（sheet）を使う */
.sheet-head-sub .sub-name { margin: 0 0 4px; font-size: 14px; display: flex; flex-wrap: wrap; gap: 2px 12px; align-items: baseline; }
.sheet-head-sub .sub-name a { font-weight: 700; }
.sheet-head-sub .sub-name span { color: var(--muted); font-size: 13px; }
.sheet-head-sub h1 { display: flex; align-items: center; gap: 12px; }
.sheet-head-sub h1 i { font-size: 34px; flex: none; color: var(--muted); }
.sheet-head-sub .lead:empty { display: none; }
.side-button { justify-content: center; font-size: 14px; padding: 10px 12px; }
/* 質問に答える枠 */
.quiz-top { display: grid; gap: 8px; }
.quiz-progress { margin: 0; font-size: 13px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.quiz-bar { height: 4px; border-radius: 2px; background: #E4E9F0; overflow: hidden; }
.quiz-bar span { display: block; height: 100%; width: 0; background: var(--accent-strong); }
.quiz-q { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: start; margin: 28px 0 28px; min-height: 5.4em; }
.quiz-q .step-no { position: static; }
.quiz-question { margin: 0; font-size: 20px; font-weight: 700; line-height: 1.8; }
.quiz-answers { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.quiz-answers button { display: flex; align-items: center; justify-content: center; gap: 10px; font: inherit; font-size: 18px; font-weight: 700; padding: 18px 12px; border: 1px solid #8793A6; border-radius: 6px; background: var(--surface); color: var(--ink); cursor: pointer; }
.quiz-answers button i { font-size: 20px; color: var(--muted); }
.quiz-answers .quiz-unknown { grid-column: 1 / -1; font-size: 15px; font-weight: 400; padding: 12px; border-color: var(--line); color: var(--muted); }
.quiz-back { margin: 16px 0 0; min-height: 24px; }
.quiz-back button { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 14px; padding: 10px 0; margin: -10px 0; border: 0; background: none; color: var(--muted); cursor: pointer; } /* 余白を足して、同じだけ引く：並びを動かさずに、押せる高さだけを広げる */
.quiz-back button[hidden] { display: none; }
/* 答えた質問の一覧（チェックのページと、結果のページ） */
.answered { list-style: none; margin: 0; padding: 0; counter-reset: answered; }
.answered li { counter-increment: answered; position: relative; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 12px 0 12px 30px; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.8; }
.answered li:first-child { border-top: 0; padding-top: 0; }
.answered li::before { content: counter(answered) "."; position: absolute; left: 2px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.answered li span { min-width: 0; }
.answered li .chip { flex: none; font-weight: 700; }
.verdict-retry { margin: 16px 0 0; font-size: 14px; }
@media (max-width: 760px) { .quiz-question { font-size: 18px; } .quiz-q { gap: 12px; } }

/* 箱のすぐ下に置く、小さな文字のリンク */
.regenerate-inline { margin: -12px 0 0; padding-top: 0; border-top: 0; }

/* 一覧のカードで、名前の下に小さく出す通称 */
.title-alias { display: block; margin-top: 2px; font-size: 13px; font-weight: 400; color: var(--muted); }

/* ---- 結果のページの、行政書士への相談。ページの中で、いちばん目立たせる ---- */
/* 画像なしのとき：白い枠に、濃い文字と、色のついたボタン */
.consult { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 6px; padding: 32px 32px 30px; }
.consult[hidden] { display: none; }
.consult-kicker { margin: 0 0 6px; display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--accent-text); }
.consult-kicker i { font-size: 18px; }
.sheet .consult h2 { margin: 0; font-size: 28px; line-height: 1.5; }
.consult-text { margin: 10px 0 0; font-size: 16px; line-height: 1.9; }
.consult-points { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 6px; font-size: 15px; }
.consult-points li { display: flex; align-items: flex-start; gap: 8px; }
.consult-points i { font-size: 18px; margin-top: 5px; flex: none; color: var(--accent-text); }
.consult-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 24px; }
.consult-button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 16px 36px; border-radius: 6px; background: var(--accent-strong); color: #fff; font-size: 18px; font-weight: 700; text-decoration: none; }
.consult-button i { font-size: 22px; }
.consult-sub { font-size: 14px; }
/* 画像ありのとき：画像の上に暗い幕を重ねて、白い文字にする。ボタンは、色のついたまま */
.consult.has-image { border: 0; color: #fff; background: linear-gradient(90deg, rgba(20, 28, 40, .86) 0%, rgba(20, 28, 40, .72) 55%, rgba(20, 28, 40, .5) 100%), var(--consult-image) center / cover no-repeat; }
.consult.has-image .consult-kicker, .consult.has-image .consult-points i, .consult.has-image .consult-sub { color: #fff; }
.sheet .consult.has-image h2 { color: #fff; }
.consult.has-image a:focus-visible { outline-color: #fff; }
@media (max-width: 760px) { .consult { padding: 24px 20px; } .sheet .consult h2 { font-size: 22px; } .consult-button { width: 100%; } }

/* ---- 行政書士への無料相談のフォーム ---- */
.consult-form { gap: 18px; }
.consult-form > h2 { margin: 0; }
.consult-form .req { margin-left: 8px; font-size: 11px; font-weight: 700; color: #A12A19; }
@media (max-width: 1000px) { .consult-form .req { font-size: 12px; } } /* スマホとタブレットでは、文字を 12px より小さくしない */
.consult-form .form-actions { margin-top: 4px; }
/* スマホでは、電話番号と都道府県を縦に並べる（2列のままだと、セレクトの文字が切れる） */
@media (max-width: 760px) { .consult-form .field-row { grid-template-columns: minmax(0, 1fr); gap: 18px; } }
.consult-submit { border: 0; font: inherit; font-weight: 700; font-size: 17px; padding: 14px 32px; cursor: pointer; }
/* 人には見えない欄 */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sheet-main > .form-error { margin: 0; }

/* ---- 管理画面：依頼管理 ---- */
.panel-tabs-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.admin-compact .col-person { width: 200px; }
.request-mini { margin-top: 0; }
.request-mini > div:first-child { border-top: 0; padding-top: 0; }
.request-message { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.9; }
.edit-main .answered .chip { display: inline-block; font-size: 12px; line-height: 1.8; padding: 0 8px; border-radius: 4px; background: #EEF1F5; white-space: nowrap; }

/* ---- 管理画面：左のメニューの「依頼管理」に出す、件数 ---- */
.menu-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: #C2331F; color: #fff; font-size: 12px; font-weight: 700; line-height: 20px; text-align: center; font-variant-numeric: tabular-nums; }
.admin-head-row form { margin: 0; }

/* 依頼管理：種別（補助金、許認可）の表示と、しぼり込み */
.kind { display: inline-block; font-size: 12px; font-weight: 700; line-height: 1.8; padding: 0 8px; border-radius: 4px; white-space: nowrap; }
.kind-hojokin { background: #FDF1E4; color: #A8540A; }
.kind-kyoninka { background: #E6F4F1; color: #0B6F5D; }
.kind-other { background: #EEF1F5; color: #3D4758; }
.admin-compact .col-kind { width: 84px; }
.panel-filter { display: flex; align-items: center; gap: 6px; padding: 8px 16px; border-bottom: 1px solid var(--line); font-size: 13px; }
.panel-filter span { color: var(--muted); font-weight: 700; margin-right: 6px; }
.panel-filter a { padding: 2px 12px; border-radius: 4px; text-decoration: none; color: var(--ink); }
.panel-filter a.is-active { background: #EEF1F5; font-weight: 700; }
/* スマホ：押せる高さを広げて、入りきらないときは折り返す（上の .panel-filter a より、うしろに書く。前に書くと、余白が負ける） */
@media (max-width: 760px) {
  .panel-filter { flex-wrap: wrap; }
  .panel-filter a { padding: 9px 12px; }
}

/* ---- 許認可 ---- */
/* さがすフォーム。キーワードと、分野の2つ */
.search-two { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; }
/* タブレット：1行目にキーワード、2行目に、セレクト（残りの幅）とボタン（中身の幅）。解説記事の検索の枠（partials/search-column.ejs）も同じ */
@media (max-width: 1000px) { .search-two { grid-template-columns: minmax(0, 1fr) auto; } .search-two .button { grid-column: auto; } }
@media (max-width: 760px) { .search-two { grid-template-columns: 1fr; } }
.sheet .plain { margin: 0; font-size: 15px; line-height: 1.9; }
.sheet .after-title { margin-top: 22px; }
/* 右の列の、長めの文字（許可までの期間など） */
.side-progress .side-text { font-size: 14px; line-height: 1.6; font-weight: 700; }
.editing .todo li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 8px; align-items: start; }
.editing .todo li .check-how { grid-column: 1 / -1; margin: 0; }
.editing .todo-name [data-k] { display: block; }
.editing .doclist .check-how [data-k], .editing .plain [data-ed], .editing .caution [data-ed], .editing h1 [data-ed] { display: block; }

/* ---- 管理画面：許認可管理 ---- */
.admin-compact .col-field { width: 140px; }
/* 「許認可を足す」。右下のボタンを押すと、枠が開く */
.add-box { max-width: 560px; margin-top: 24px; }
.add-box > summary { list-style: none; cursor: pointer; }
.add-box > summary::-webkit-details-marker { display: none; }
.fab-summary { position: fixed; right: 32px; bottom: 28px; z-index: 40; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; padding: 12px 20px; border-radius: 6px; background: var(--accent-strong); color: #fff; box-shadow: 0 4px 14px rgba(26, 36, 51, .28); }
.fab-summary i { font-size: 18px; }
.add-box[open] > .fab-summary { display: none; }
@media (max-width: 760px) { .fab-summary { right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); } }

/* ---- サイトのトップページ ---- */
.home-hero h1 { font-size: 40px; line-height: 1.4; letter-spacing: .02em; }
.home-hero > p { max-width: 36em; font-size: 16px; line-height: 2; }
.home-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.home-hero-actions .button { padding: 14px 28px; font-size: 16px; }
.home-button-hojokin { background: #B85C0C; }
.home-button-kyoninka { background: #0B6F5D; }
.home-section { margin-top: 56px; }
.hero-band + .home-section { margin-top: 32px; }
.home-section .route-title { margin: 0 0 16px; }
/* 2つの入口。ブランドの色は、記号と、リンクの文字にだけ使う */
.home-entries { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
/* 入口が1つだけのとき（許認可を閉じている間。lib/features.js）は、幅いっぱいに出す（右半分を、空けたままにしない） */
.home-entry:only-child { grid-column: 1 / -1; }
.home-entry { display: grid; gap: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 28px; text-decoration: none; color: var(--ink); }
.home-entry-head { display: flex; align-items: center; gap: 14px; }
.home-entry-head img { flex: none; }
.home-entry h3 { margin: 0; font-size: 24px; line-height: 1.4; }
.home-entry-head p { margin: 0; font-size: 13px; color: var(--muted); }
.home-entry-head strong { font-size: 16px; color: var(--ink); font-variant-numeric: tabular-nums; }
.home-entry-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--accent-text); }
/* 進め方。番号の丸は、詳細ページの道のりと同じ形 */
.home-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
/* 閉じた機能の段を抜いて、3つになったとき（views/home.ejs）。1001px 以上だけ、3列にする（1000px 以下は、下の指定のまま） */
.home-steps-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.home-steps li { display: grid; gap: 12px; align-content: start; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 20px; }
.home-steps .step-no { position: static; border-color: var(--ink); color: var(--ink); }
.home-steps .step-no-goal { background: var(--ink); color: #fff; }
.home-steps h3 { margin: 0 0 4px; font-size: 17px; }
.home-steps p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.8; }
.home-more { margin: 12px 0 0; font-size: 14px; }
/* 情報の作り方 */
.home-about { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
/* 「行政書士が監修する」を出さない間は、2列（lib/site.js の supervision）。1000px 以下は、下の決まりで1列 */
.home-about.home-about-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.home-about h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 16px; }
.home-about h3 i { font-size: 20px; color: var(--muted); }
.home-about p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.9; }
@media (max-width: 1000px) { .home-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } .home-about, .home-about.home-about-2 { grid-template-columns: 1fr; gap: 20px; } }
@media (max-width: 760px) { .home-hero h1 { font-size: 30px; } .home-entries, .home-lists, .home-steps { grid-template-columns: 1fr; } .home-entry { padding: 20px; } .home-section { margin-top: 40px; } }
/* 許認可トップの、カードの2行目 */
.pick-sub { display: block; font-size: 12px; }

/* ---- 運営元、利用規約、プライバシーポリシー ---- */
.doc { max-width: 800px; display: grid; gap: 20px; }
.doc-head h1 { margin: 0 0 8px; font-size: 30px; line-height: 1.4; }
.doc-head p { margin: 0; line-height: 1.9; }
.doc .block > h2 { font-size: 18px; margin-bottom: 12px; }
.doc .block h3 { font-size: 15px; margin: 18px 0 8px; }
.doc .block h3:first-of-type { margin-top: 0; }
.doc .block p { margin: 0 0 8px; font-size: 15px; line-height: 1.9; }
.doc .block p:last-child { margin-bottom: 0; }
.doc .marks { font-size: 15px; gap: 8px; line-height: 1.8; }
.doc-mini { margin-top: 0; font-size: 15px; }
.doc-mini > div { grid-template-columns: 11em minmax(0, 1fr); }
.doc-mini > div:first-child { border-top: 0; padding-top: 0; }
.doc-contact { font-size: 18px !important; font-weight: 700; overflow-wrap: anywhere; }
.doc-date { margin: 0; font-size: 13px; color: var(--muted); }
.doc-links { margin: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 14px; }
@media (max-width: 760px) { .doc-mini > div { grid-template-columns: 1fr; gap: 0; } .doc-head h1 { font-size: 24px; } }

/* 利用規約、プライバシーポリシー。条文の形 */
.law .block { padding: 22px 28px; }
.law .block > h2 { font-size: 16px; margin-bottom: 10px; }
.law ol, .law ul { margin: 0; padding-left: 1.6em; display: grid; gap: 8px; font-size: 15px; line-height: 1.9; }
.law .block > p + ol, .law .block > ol + p { margin-top: 8px; }
/* 号。（1）（2）の形で番号を付ける */
.law ol.law-items { list-style: none; padding-left: 0; counter-reset: gou; }
.law ol.law-items > li { counter-increment: gou; position: relative; padding-left: 2.6em; }
.law ol.law-items > li::before { content: "（" counter(gou) "）"; position: absolute; left: 0; }
.law li > ol, .law li > ul, .law li > dl { margin-top: 8px; }
.law ul { list-style: disc; }
.law .doc-mini > div { grid-template-columns: 15em minmax(0, 1fr); }
.doc-end { font-size: 14px; }
.doc-end p { margin: 0; }
@media (max-width: 760px) { .law .block { padding: 18px 16px; } .law .doc-mini > div { grid-template-columns: 1fr; } }

/* フッターの、管理画面への入口 */
.site-footer li a i { font-size: 15px; margin-right: 4px; vertical-align: -2px; }

/* ---- 補助金と許認可のトップ：検索の枠を、ヒーローの下の端にまたがらせる ---- */
/* ヒーローを高くして、下の余白をなくす。検索の枠は、下に半分ほどはみ出す */
/* flow-root：検索の枠の、下向きの負の余白が、ヒーローの外に抜けないようにする（抜けると、ヒーローが枠の下まで伸びてしまう） */
.hero-band.hero-overlap { display: flow-root; padding-top: 88px; padding-bottom: 0; background-color: #DDE3EB; }
.hero-band.hero-overlap.has-image { padding-top: 96px; padding-bottom: 0; }
.hero-overlap h1 { font-size: 38px; line-height: 1.4; letter-spacing: .02em; }
.hero-overlap > p { margin-bottom: 40px; font-size: 16px; line-height: 1.9; }
.hero-overlap .search { position: relative; z-index: 2; margin-bottom: -58px; border: 0; padding: 22px 24px 24px; box-shadow: 0 12px 32px rgba(26, 36, 51, .18); }
/* はみ出した分だけ、次の段を下げる */
.hero-overlap + .shelf { margin-top: 112px; }
@media (max-width: 1000px) { .hero-overlap .search { margin-bottom: -72px; } .hero-overlap + .shelf { margin-top: 120px; } }
@media (max-width: 760px) {
  .hero-band.hero-overlap, .hero-band.hero-overlap.has-image { padding-top: 48px; padding-bottom: 0; }
  .hero-overlap h1 { font-size: 28px; }
  .hero-overlap > p { margin-bottom: 28px; font-size: 15px; }
  .hero-overlap .search { padding: 16px; margin-bottom: -96px; }
  .hero-overlap + .shelf { margin-top: 136px; }
}

/* ---- 運営元、利用規約、プライバシーポリシー：コンテナの幅いっぱいに広げ、全体を1つの枠にまとめる ---- */
/* 条文ごとの枠はやめて、間隔だけで区切る */
.doc { max-width: none; gap: 32px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 40px 48px 44px; }
.doc .block, .law .block { background: none; border: 0; border-radius: 0; padding: 0; }
.doc-head { padding-bottom: 28px; border-bottom: 1px solid var(--line); }
@media (max-width: 760px) {
  .doc { padding: 24px 20px 28px; gap: 26px; }
  .doc-head { padding-bottom: 20px; }
  .doc-head h1 { font-size: 24px; }
}

/* ==== 解説記事 ==== */
/* ---- 本文の見た目。公開のページと、管理画面のエディタで、同じものを使う（書いたとおりに出る） ---- */
.article-body { font-size: 16px; line-height: 2; overflow-wrap: anywhere; }
.article-body > *:first-child { margin-top: 0; }
.article-body > *:last-child { margin-bottom: 0; }
.article-body p { margin: 0 0 1.2em; }
.article-body h2 { font-size: 23px; line-height: 1.5; margin: 2.2em 0 .7em; padding: 0; border: 0; }
.article-body h3 { font-size: 18px; line-height: 1.6; margin: 1.8em 0 .5em; }
.article-body ul, .article-body ol { margin: 0 0 1.2em; padding-left: 1.6em; }
.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }
.article-body li { margin: .2em 0; }
.article-body li > p { margin: 0; }
.article-body a { color: var(--accent-text); text-decoration: underline; }
.article-body blockquote { margin: 0 0 1.2em; padding: 14px 20px; background: #F1F3F6; border-radius: 4px; color: #3D4758; }
.article-body blockquote p:last-child { margin-bottom: 0; }
.article-body hr { border: 0; height: 1px; background: var(--line); margin: 2.2em 0; }
.article-body img { display: block; max-width: 100%; height: auto; margin: 1.6em auto; border-radius: 4px; }
.article-body .table-scroll { overflow-x: auto; margin: 0 0 1.4em; }
.article-body table { border-collapse: collapse; width: 100%; font-size: 15px; line-height: 1.7; margin: 0 0 1.4em; }
.article-body .table-scroll table { margin: 0; min-width: 480px; }
.article-body th, .article-body td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; vertical-align: top; min-width: 4em; }
.article-body th { background: #EEF1F5; font-weight: 700; }
.article-body th p, .article-body td p { margin: 0; }

/* ---- 公開のページ ---- */
.article { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 44px 48px 48px; }
.article > * { max-width: 780px; margin-left: auto; margin-right: auto; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.article-meta .kind { text-decoration: none; }
.article-head h1 { font-size: 32px; line-height: 1.5; margin: 0 0 14px; text-wrap: balance; word-break: auto-phrase; }
.article-lead-text { margin: 0 0 14px; font-size: 16px; line-height: 1.9; color: #3D4758; }
.article-by { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 14px; color: var(--muted); }
.article-by i { font-size: 16px; }
.article-cover { margin-top: 28px; }
.article-cover img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 4px; background: #E9EDF2; }
.article > .article-body { margin-top: 36px; }
.article-caution { margin-top: 40px; margin-bottom: 0; padding: 14px 18px; background: #F1F3F6; border-radius: 4px; font-size: 13px; line-height: 1.8; color: #3D4758; }
.article > .block { margin-top: 28px; padding: 24px 0 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: none; }
.article-next { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 32px; font-size: 14px; }
.article-related { margin-top: 48px; }
.article-related > h2 { font-size: 22px; margin: 0 0 14px; }
.article-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.article-cards .cover { aspect-ratio: 16 / 10; }
.article-cards .card-lead { margin-bottom: 0; }
.column-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 22px; }
.column-filter a { padding: 6px 18px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--ink); text-decoration: none; font-size: 14px; }
.column-filter a.is-active { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 700; }
.column-pager { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; margin-top: 28px; font-size: 14px; }
.column-pager a { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; text-decoration: none; }
.column-pager > :last-child { justify-self: end; }
.column-pager > span { color: var(--muted); font-variant-numeric: tabular-nums; }
.home-section > .article-cards { margin-top: 4px; }
@media (max-width: 1000px) { .article-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* タブレット（2列）では、各トップの「解説記事」の段（新しい3件）だけ、3枚目を出さない（1枚だけが、次の行に余るため）。一覧のページと、横に送る形（.article-carousel）には、効かせない */
@media (min-width: 761px) and (max-width: 1000px) {
  .home-section > .article-cards > :nth-child(3):last-child,
  .shelf > .article-cards:not(.article-carousel) > :nth-child(3):last-child { display: none; }
}
@media (max-width: 760px) {
  .article { padding: 24px 20px 28px; }
  .article-head h1 { font-size: 25px; }
  .article > .article-body { margin-top: 28px; }
  .article-body h2 { font-size: 20px; }
  .article-cards { grid-template-columns: 1fr; }
}

/* ---- 管理画面：記事を書く画面 ---- */
.article-cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; max-width: 1240px; margin: 0; }
.article-side { display: grid; gap: 24px; min-width: 0; position: sticky; top: 0; }
.article-paper { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 32px 40px 0; }
.article-title, .article-lead { display: block; width: 100%; border: 0; outline: 0; background: none; padding: 0; font: inherit; color: var(--ink); resize: none; overflow: hidden; }
.article-title { font-size: 28px; font-weight: 700; line-height: 1.5; }
.article-lead { margin-top: 10px; font-size: 15px; line-height: 1.9; color: #3D4758; }
.article-title::placeholder, .article-lead::placeholder { color: #A3ACBA; }
.article-title:disabled, .article-lead:disabled { color: var(--ink); -webkit-text-fill-color: currentColor; opacity: 1; }
.rte { margin: 24px -40px 0; border-top: 1px solid var(--line); }
.rte-toolbar { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; padding: 6px 12px; background: #F7F8FA; border-bottom: 1px solid var(--line); }
.rte-toolbar[hidden] { display: none; }
.rte-group { display: flex; align-items: center; gap: 2px; padding: 0 8px; border-right: 1px solid var(--line); }
.rte-group:first-child { padding-left: 0; }
.rte-group-end { margin-left: auto; border-right: 0; padding-right: 0; }
.rte-toolbar button { width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 4px; background: none; color: var(--ink); font-size: 19px; cursor: pointer; }
.rte-toolbar button:hover { background: #E4E9F0; }
.rte-toolbar button.is-active { background: var(--ink); color: #fff; }
.rte-toolbar button:disabled { color: #A3ACBA; cursor: default; background: none; }
.rte-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 16px; background: #F7F8FA; border-bottom: 1px solid var(--line); font-size: 13px; }
.rte-sub[hidden] { display: none; }
.rte-sub label, .rte-sub > span { font-weight: 700; color: var(--muted); }
.rte-sub input { flex: 1; min-width: 200px; font: inherit; font-size: 14px; padding: 6px 10px; border: 1px solid #8793A6; border-radius: 4px; background: #fff; color: var(--ink); }
.rte-sub button { font: inherit; font-size: 13px; padding: 5px 12px; border: 1px solid #8793A6; border-radius: 4px; background: #fff; color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; }
.rte-sub button[data-link="apply"] { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 700; }
.rte-content { padding: 28px 40px 32px; cursor: text; }
.rte-content .ProseMirror { min-height: 420px; outline: 0; }
.rte-content .ProseMirror > *:first-child { margin-top: 0; }
.rte-content p.is-editor-empty:first-child::before { content: attr(data-placeholder); float: left; height: 0; color: #A3ACBA; pointer-events: none; }
.rte-content .ProseMirror-selectednode { outline: 2px solid var(--accent); outline-offset: 2px; }
.rte-content .selectedCell { background: var(--accent-soft); }
.rte-content .tableWrapper { overflow-x: auto; margin: 0 0 1.4em; }
.rte-content .tableWrapper table { margin: 0; }
.rte-foot { display: flex; justify-content: space-between; gap: 16px; padding: 8px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); min-height: 36px; }
.rte-status.is-error, .help.is-error { color: #A12A19; }
.rte-count { margin-left: auto; font-variant-numeric: tabular-nums; }
.article-status { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 14px; color: var(--muted); }
.article-state { font-size: 13px; font-weight: 700; line-height: 1.9; padding: 0 10px; border-radius: 4px; background: #EEF1F5; color: var(--ink); }
.article-state-published { background: var(--ink); color: #fff; }
.article-actions { display: grid; gap: 8px; }
.article-actions .button { justify-content: center; border: 1px solid transparent; font: inherit; font-weight: 700; font-size: 15px; padding: 11px 16px; cursor: pointer; }
.article-actions .button-sub { border-color: #8793A6; font-size: 14px; padding: 9px 16px; }
.article-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; font-size: 14px; }
.article-links a { display: inline-flex; align-items: center; gap: 4px; }
.article-return { max-width: 1240px !important; }
.article-return p { margin: 4px 0 0; white-space: pre-wrap; }
.article-delete { margin: 28px 0 0; }
.article-delete button { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; font: inherit; font-size: 13px; color: #A12A19; cursor: pointer; }
/* 1100px は、3段の外の例外。1001〜1100px で2列のままだと、本文を書く紙が 377〜476px しかなくなるので、1列にする */
@media (max-width: 1100px) {
  .article-cols { grid-template-columns: minmax(0, 1fr); }
  .article-side { position: static; }
}
/* 1000px 以下では、ページ全体がスクロールして、ヘッダー（57px）が上に付いたまま。ツールバーは、その下に付ける */
@media (max-width: 1000px) { .rte-toolbar { top: 57px; } }
/* タブレット：本文が長いと、保存と公開のボタンまでが遠い。ボタン（.article-actions）を、画面の下に固定した帯にする（上の端は、1px の灰色の線）。
   スマホは「見るだけ」なので、帯にしない（ボタンが3つ以上あると、1行に入らない） */
@media (min-width: 761px) and (max-width: 1000px) {
  .article-side .article-actions:has(.button) { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; gap: 8px; padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); background: var(--surface); border-top: 1px solid var(--line); }
  .article-side .article-actions .button, .article-side .article-actions .button-sub { flex: 1 1 0; min-width: 0; min-height: 44px; padding: 4px 10px; font-size: 14px; line-height: 1.4; }
}
@media (max-width: 760px) {
  .article-paper { padding: 20px 16px 0; }
  .rte { margin: 18px -16px 0; }
  .rte-content { padding: 20px 16px 24px; }
  .article-title { font-size: 22px; }
  /* ツールバーは、折り返さずに1行で、横に送る */
  .rte-toolbar { flex-wrap: nowrap; overflow-x: auto; }
  .rte-group { flex: none; }
  .rte-group-end { margin-left: 0; }
  .rte-toolbar button { width: 40px; height: 40px; flex: none; }
}

/* ---- 記事を書く画面：自動保存 ---- */
.rte-save { margin-left: auto; }
.rte-save.is-error { color: #A12A19; }
.rte-save + .rte-count { margin-left: 0; }
.article-pending { max-width: 1240px !important; margin-bottom: 24px !important; }
.article-pending button { margin-left: 10px; padding: 0; border: 0; background: none; font: inherit; color: var(--accent-text); text-decoration: underline; cursor: pointer; }

/* ==== サイトのトップ（2026-11-16 に作り直した）と、まとめてさがすページ ==== */
/* ヒーロー。写真が見えるように、左を濃く、右を薄くした幕を重ねる */
.hero-band.home-hero.has-image { background: linear-gradient(90deg, rgba(20, 29, 44, .86) 0%, rgba(20, 29, 44, .62) 52%, rgba(20, 29, 44, .30) 100%), var(--hero-image) center / cover no-repeat; padding-top: 104px; }
.home-hero h1 { font-size: 44px; margin-bottom: 14px; }
.home-hero > p { margin-bottom: 44px; }
.home-search { grid-template-columns: minmax(0, 1fr) auto; }
.home-search .search-q label { font-size: 15px; }
.home-search .search-q input { font-size: 17px; padding-top: 12px; padding-bottom: 12px; }
.home-search .button { padding: 13px 30px; font-size: 16px; }
.home-search-hints { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; margin: 0; font-size: 13px; }
.home-search-hints span { color: var(--muted); }
.hero-overlap .home-search { margin-bottom: -72px; }
.hero-band + .home-after-hero { margin-top: 124px; }
.home-title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.home-title-row > a { flex: none; font-size: 14px; font-weight: 700; }
.home-title-row strong { color: var(--ink); font-variant-numeric: tabular-nums; }

/* 締切が近い補助金と、カレンダー */
.home-deadline { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.home-deadline .block { padding: 20px 24px; }
.deadline-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.deadline-table th { text-align: left; font-size: 12px; font-weight: 400; color: var(--muted); padding: 0 12px 8px 0; white-space: nowrap; }
.deadline-table td { padding: 13px 12px 13px 0; border-top: 1px solid var(--line); vertical-align: baseline; white-space: nowrap; font-variant-numeric: tabular-nums; }
.deadline-table td:first-child { white-space: normal; font-weight: 700; line-height: 1.6; }
.deadline-table td:first-child a { color: var(--ink); text-decoration: none; }
.deadline-table th:last-child, .deadline-table td:last-child { text-align: right; padding-right: 0; }
.deadline-table .is-soon { color: #A8540A; font-weight: 700; }
.deadline-alias { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.home-calendar { display: grid; gap: 18px; }
.calendar { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 13px; font-variant-numeric: tabular-nums; }
.calendar caption { caption-side: top; padding-bottom: 6px; font-size: 14px; font-weight: 700; text-align: left; }
.calendar caption span:last-child { float: right; font-size: 12px; font-weight: 400; color: var(--muted); }
.calendar th { padding: 2px 0; font-size: 11px; font-weight: 400; color: var(--muted); text-align: center; }
.calendar td { padding: 1px 0; text-align: center; }
.cal-day { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: var(--ink); text-decoration: none; position: relative; }
.cal-day.is-past { color: #A3ACBA; }
.cal-day.is-today { box-shadow: inset 0 0 0 1px var(--ink); font-weight: 700; }
.cal-day.has-deadline { background: var(--accent-strong); color: #fff; font-weight: 700; } /* カレンダーはサイトのトップにあるので、補助金の橙ではなく、そのページの色（青） */
.cal-day sup { position: absolute; top: -4px; right: -6px; min-width: 15px; height: 15px; border-radius: 8px; background: var(--ink); color: #fff; font-size: 10px; line-height: 15px; }
.calendar-note { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 12px; color: var(--muted); }
.calendar-note .cal-day { width: 12px; height: 12px; }
.calendar-note .cal-day.is-today { margin-left: 12px; }

/* やりたいこと、業種の入口 */
.home-themes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.home-themes a { display: grid; gap: 4px; height: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 18px 20px; text-decoration: none; color: var(--ink); }
.home-themes i { font-size: 26px; margin-bottom: 6px; }
.home-themes img { display: block; width: 56px; height: 56px; margin-bottom: 6px; }
.home-theme-label { font-size: 17px; font-weight: 700; line-height: 1.5; }
.home-theme-count { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
/* 「補助金 3」を、ひとかたまりで折り返す（数字だけが次の行に落ちないように） */
.home-theme-count span { white-space: nowrap; }
.home-themes a.is-current, .home-industries a.is-current { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.home-industries { display: flex; align-items: baseline; gap: 20px; margin-top: 20px; }
.home-industries h3 { flex: none; margin: 0; font-size: 15px; }
.home-industries ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.home-industries a { display: inline-flex; align-items: baseline; gap: 8px; padding: 6px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; text-decoration: none; color: var(--ink); font-size: 14px; }
.home-industries a span { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* 更新履歴 */
.home-updates { list-style: none; margin: 0; padding: 8px 24px; }
.home-updates li { display: flex; align-items: baseline; gap: 14px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 15px; }
.home-updates li:first-child { border-top: 0; }
.home-updates time { flex: none; width: 6.2em; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.home-updates .kind { flex: none; min-width: 5.2em; text-align: center; }
.home-update-text { min-width: 0; }

/* まとめてさがすページ */
.search-all { grid-template-columns: minmax(0, 1fr) auto; }
.search-results { display: grid; gap: 20px; }
.search-results h2 { display: flex; align-items: center; gap: 8px; }
.search-results h2 i { font-size: 22px; }
.search-results h2 span { font-size: 13px; font-weight: 400; color: var(--muted); }
.search-list { list-style: none; margin: 0; padding: 0; }
.search-list li { padding: 14px 0; border-top: 1px solid var(--line); }
.search-list li:last-child { padding-bottom: 0; }
.search-list a { font-size: 17px; font-weight: 700; }
.search-list p { margin: 4px 0 0; font-size: 14px; line-height: 1.8; color: #3D4758; }
.search-list .search-meta { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 13px; color: var(--muted); }
.search-meta span { display: inline-flex; align-items: center; gap: 4px; }
/* 一覧の名前。並びを動かさずに、押せる範囲だけを広げる（締切の表は、名前のマスいっぱい。まとめてさがすの結果は、上下に 10px ずつ） */
.deadline-table td:first-child { position: relative; }
.deadline-table td:first-child a::after { content: ""; position: absolute; inset: 0; }
.search-list a { display: inline-block; max-width: 100%; padding: 10px 0; margin: -10px 0; }
.home-search-hints a { padding: 11px 0; margin: -11px 0; }
@media (max-width: 1000px) {
  .home-deadline { grid-template-columns: 1fr; }
  .home-calendar { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 28px; }
  .calendar-note { grid-column: 1 / -1; }
  .home-themes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-overlap .home-search { margin-bottom: -80px; }
  .hero-band + .home-after-hero { margin-top: 128px; }
  /* カレンダー：日付を、押しやすい大きさに（40px。マスが 40px より狭い幅では、マスの幅に合わせる）。曜日と、件数の印の文字は 12px に */
  .calendar th { font-size: 12px; }
  .cal-day { width: min(40px, 100%); height: auto; aspect-ratio: 1; }
  .cal-day sup { top: -3px; right: -4px; min-width: 16px; height: 16px; font-size: 12px; line-height: 16px; }
}
@media (max-width: 760px) {
  .hero-band.home-hero.has-image { padding-top: 52px; background: linear-gradient(rgba(20, 29, 44, .72), rgba(20, 29, 44, .72)), var(--hero-image) center / cover no-repeat; }
  .home-hero h1 { font-size: 30px; }
  .home-hero > p { margin-bottom: 28px; }
  .home-search, .search-all { grid-template-columns: 1fr; }
  .home-search .button, .search-all .button { justify-content: center; }
  .hero-overlap .home-search { margin-bottom: -150px; }
  .hero-band + .home-after-hero { margin-top: 190px; }
  .home-title-row { align-items: flex-start; flex-direction: column; gap: 6px; }
  .home-deadline .block { padding: 16px; }
  .deadline-table th:nth-child(2), .deadline-table td:nth-child(2) { display: none; }
  .home-calendar { grid-template-columns: 1fr; }
  .home-themes { gap: 10px; }
  .home-themes a { padding: 14px; }
  .home-theme-label { font-size: 15px; }
  .home-industries { flex-direction: column; gap: 10px; }
  .home-updates { padding: 4px 16px; }
  .home-updates li { flex-wrap: wrap; gap: 4px 10px; }
  .home-update-text { flex-basis: 100%; }
  /* 「よくさがされている」の言葉が折り返すとき、行の間を空ける（押せる範囲が、上下の行で重ならないように。行の高さ 23px ＋ 間 22px が、押せる高さ 45px と同じになる） */
  .home-search-hints { row-gap: 22px; }
}

/* ==== 行政書士をさがす、行政書士のプロフィール ==== */
/* 写真がないときに、名前の1文字を出す */
.avatar-initial { display: grid; place-items: center; width: 100%; height: 100%; background: #DDE3EB; color: #3D4758; font-size: 28px; font-weight: 700; }
.search-person { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1.2fr) auto; }
.person-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.person-card > a { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 4px 16px; height: 100%; align-content: start; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 22px 24px; text-decoration: none; color: var(--ink); }
.person-photo { width: 72px; height: 72px; border-radius: 6px; overflow: hidden; background: #E9EDF2; }
.person-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.person-body { min-width: 0; align-self: center; }
.person-card h2 { margin: 0; font-size: 19px; line-height: 1.5; }
.person-card h2 span { margin-left: 8px; font-size: 12px; font-weight: 400; color: var(--muted); }
.person-meta { display: flex; flex-wrap: wrap; gap: 2px 14px; margin: 0; font-size: 13px; color: var(--muted); line-height: 1.7; }
.person-meta span { display: inline-flex; align-items: center; gap: 4px; }
.person-bio { grid-column: 1 / -1; margin: 10px 0 0; font-size: 14px; line-height: 1.8; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.person-tags { grid-column: 1 / -1; list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.person-tags li { font-size: 12px; line-height: 1.9; padding: 0 9px; border-radius: 4px; background: #EEF1F5; color: var(--ink); white-space: nowrap; }
.person-note { margin-top: 28px; }
.person-dummy { margin-bottom: 16px; }
/* プロフィール。全体を、1つの枠にまとめる */
.person { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 40px 48px 44px; }
.person-head { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 28px; align-items: center; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.person-photo-large { width: 120px; height: 120px; }
.person-photo-large .avatar-initial { font-size: 48px; }
.person-role { margin: 0 0 2px; font-size: 13px; font-weight: 700; color: var(--muted); }
.person-head h1 { margin: 0; font-size: 32px; line-height: 1.4; }
.person-head h1 span { margin-left: 12px; font-size: 14px; font-weight: 400; color: var(--muted); }
.person-office { margin: 4px 0 0; font-size: 15px; }
.person-lead { margin: 12px 0 0; font-size: 15px; line-height: 1.9; color: #3D4758; max-width: 44em; }
.person-cols { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: start; padding-top: 32px; }
.person-main { display: grid; gap: 32px; min-width: 0; }
.person-main h2, .person-consult h2 { margin: 0 0 12px; padding: 0; border: 0; font-size: 18px; }
.person-tags-large { margin: 0; gap: 8px; }
.person-tags-large li { padding: 0; background: none; }
.person-tags-large a { display: block; font-size: 14px; line-height: 2.2; padding: 0 14px; border-radius: 4px; background: #EEF1F5; color: var(--ink); text-decoration: none; }
.person-text { margin: 0; font-size: 15px; line-height: 2; white-space: pre-wrap; }
.person-links { list-style: none; margin: 0; padding: 0; }
.person-links li { display: flex; align-items: baseline; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 15px; }
.person-links li:first-child { border-top: 0; padding-top: 0; }
.person-links .kind { flex: none; min-width: 4.6em; text-align: center; }
.person-links a { min-width: 0; }
.person-links time { margin-left: auto; flex: none; font-size: 12px; color: var(--muted); }
.person-facts { margin: 0; font-size: 14px; }
.person-facts > div { grid-template-columns: 1fr; gap: 2px; }
.person-facts > div:first-child { border-top: 0; padding-top: 0; }
.person-facts dd { overflow-wrap: anywhere; }
.person-side-note { margin: 16px 0 0; font-size: 12px; line-height: 1.8; color: var(--muted); }
.person-consult { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 36px; padding: 24px 28px; background: #F1F3F6; border-radius: 6px; }
.person-consult p { margin: 0; font-size: 14px; line-height: 1.8; color: #3D4758; }
.person-consult-links { display: flex; flex: none; gap: 10px; }
.person-consult-links .button { padding: 10px 18px; font-size: 14px; }
.person-back { margin: 20px 0 0; font-size: 14px; }
.person-back a { display: inline-flex; align-items: center; gap: 6px; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px 16px; }
.site-header nav { flex-wrap: wrap; justify-content: flex-end; row-gap: 4px; }
@media (max-width: 1000px) {
  .search-person { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .person-cols { grid-template-columns: 1fr; gap: 32px; }
  .person-consult { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 760px) {
  .search-person { grid-template-columns: 1fr; }
  .person-cards { grid-template-columns: 1fr; }
  .person-card > a { padding: 18px 16px; }
  .person { padding: 24px 20px 28px; }
  .person-head { grid-template-columns: 80px minmax(0, 1fr); gap: 16px; align-items: start; padding-bottom: 24px; }
  .person-photo-large { width: 80px; height: 80px; }
  .person-photo-large .avatar-initial { font-size: 32px; }
  .person-head h1 { font-size: 24px; }
  .person-head h1 span { display: block; margin: 0; }
  .person-lead { grid-column: 1 / -1; }
  .person-consult { padding: 20px; }
  .person-consult-links { flex-direction: column; width: 100%; }
  .person-consult-links .button { justify-content: center; }
}

/* ---- 行政書士のプロフィール（2026-11-16 に、項目を足して作り直した）：注力分野、対応体制、料金表、アクセス ---- */
.person-focus { grid-column: 1 / -1; display: flex; gap: 10px; margin: 12px 0 0; font-size: 14px; line-height: 1.7; }
.person-focus dt { flex: none; font-size: 12px; font-weight: 700; color: var(--muted); padding-top: 1px; }
.person-focus dd { margin: 0; font-weight: 700; }
.person-card .person-bio { margin-top: 8px; }
.person-features { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: #3D4758; }
.person-card .person-features { grid-column: 1 / -1; }
.person-features li { display: inline-flex; align-items: center; gap: 4px; }
.person-features i { font-size: 14px; color: var(--accent-text); }
.person-head { grid-template-columns: 140px minmax(0, 1fr) 260px; align-items: start; }
.person-photo-large { width: 140px; height: 140px; }
.person-office span { display: inline-flex; align-items: center; gap: 4px; margin-left: 14px; font-size: 13px; color: var(--muted); }
.person-focus-box { margin: 0; padding: 18px 20px; background: #F1F3F6; border-radius: 6px; }
.person-focus-box dt { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 8px; }
.person-focus-box dd { margin: 0; }
.person-focus-box ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.person-focus-box a { display: block; padding: 8px 12px; background: var(--surface); border-radius: 4px; color: var(--ink); font-size: 15px; font-weight: 700; text-decoration: none; }
.person-nav { display: flex; flex-wrap: wrap; gap: 4px 28px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 700; }
.person-nav a { color: var(--ink); text-decoration: none; }
.person-main section { scroll-margin-top: 16px; }
.person-main h3 { margin: 22px 0 8px; font-size: 15px; }
.person-career { font-size: 14px; line-height: 1.9; }
.person-fields { margin: 0; display: grid; gap: 10px; font-size: 15px; }
.person-fields > div { display: grid; grid-template-columns: 11em minmax(0, 1fr); gap: 16px; }
.person-fields dt { font-size: 13px; font-weight: 700; color: var(--muted); padding-top: 2px; }
.person-fields dd { margin: 0; line-height: 1.8; }
.fee-table { width: 100%; border-collapse: collapse; margin: 0 0 18px; font-size: 15px; }
.fee-table caption { text-align: left; font-size: 14px; font-weight: 700; padding: 0 0 6px; }
.fee-table th, .fee-table td { border: 1px solid var(--line); padding: 10px 14px; vertical-align: top; line-height: 1.7; }
.fee-table th { font-weight: 400; text-align: left; background: #F7F8FA; }
.fee-table th span { display: block; font-size: 12px; color: var(--muted); }
.fee-table td { width: 32%; text-align: right; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.person-note-text { margin: 8px 0 0; font-size: 12px; line-height: 1.8; color: var(--muted); white-space: pre-wrap; }
.person-office-list { margin: 0; font-size: 15px; }
.person-office-list > div { grid-template-columns: 9em minmax(0, 1fr); }
.person-office-list > div:first-child { border-top: 0; padding-top: 0; }
.person-map { display: inline-flex; align-items: center; gap: 4px; margin-left: 14px; font-size: 13px; }
.person-link-kind { margin-left: auto; flex: none; font-size: 12px; color: var(--muted); }
.person-side { display: grid; gap: 20px; position: sticky; top: 16px; }
.person-side .person-consult { display: grid; gap: 10px; margin: 0; padding: 22px; }
.person-side .person-consult h2 { margin: 0; font-size: 17px; }
.person-side .person-consult p { font-size: 13px; }
.person-side .person-consult .button { justify-content: center; padding: 11px 16px; font-size: 14px; }
.person-quick { margin: 0; display: grid; gap: 12px; font-size: 14px; }
.person-quick dt { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.person-quick dt i { font-size: 15px; }
.person-quick dd { margin: 2px 0 0; line-height: 1.7; }
.profile-form { max-width: 860px; }
.profile-form .form-actions { display: flex; align-items: center; gap: 20px; }
@media (max-width: 1000px) {
  .person-head { grid-template-columns: 120px minmax(0, 1fr); }
  .person-photo-large { width: 120px; height: 120px; }
  .person-focus-box { grid-column: 1 / -1; }
  .person-focus-box ul { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .person-side { position: static; }
}
@media (max-width: 760px) {
  .person-head { grid-template-columns: 80px minmax(0, 1fr); }
  .person-photo-large { width: 80px; height: 80px; }
  .person-office span { display: flex; margin: 2px 0 0; }
  .person-head-body .person-features { grid-column: 1 / -1; }
  .person-focus-box ul { grid-template-columns: 1fr; }
  .person-nav { gap: 4px 18px; font-size: 13px; }
  .person-fields > div, .person-office-list > div { grid-template-columns: 1fr; gap: 2px; }
  .fee-table { font-size: 14px; }
  .fee-table th, .fee-table td { padding: 8px 10px; }
  .fee-table td { width: 38%; white-space: normal; }
  .person-map { margin-left: 0; display: flex; }
}

/* プロフィールの、電話番号（本人が出すと決めたときだけ出る） */
.person-phone { padding: 18px 22px; border: 1px solid var(--line); border-radius: 6px; }
.person-phone-label { display: flex; align-items: center; gap: 6px; margin: 0 0 2px; font-size: 12px; font-weight: 700; color: var(--muted); }
.person-phone-label i { font-size: 15px; }
.person-phone a { font-size: 24px; font-weight: 700; color: var(--ink); text-decoration: none; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.person-phone-hours { margin: 4px 0 0; font-size: 12px; line-height: 1.7; color: var(--muted); }

/* プロフィールの、事務所の地図（Google マップ） */
.person-map-frame { display: block; width: 100%; height: 320px; margin: 16px 0 0; border: 1px solid var(--line); border-radius: 6px; }
@media (max-width: 760px) { .person-map-frame { height: 260px; } }

/* 行政書士管理 */
.gs-state { display: inline-block; font-size: 12px; font-weight: 700; line-height: 1.8; padding: 0 8px; border-radius: 4px; background: #EEF1F5; color: var(--ink); white-space: nowrap; }
.gs-state-listed { background: var(--ink); color: #fff; }
.gs-state-suspended { background: #FBE9E6; color: #A12A19; }
.panel-search { gap: 8px; }
.panel-search label { color: var(--muted); font-weight: 700; margin-right: 4px; }
.panel-search input[type="search"] { flex: 0 1 340px; min-width: 0; font: inherit; font-size: 13px; padding: 5px 10px; border: 1px solid #8793A6; border-radius: 4px; background: #fff; color: var(--ink); }
.panel-search button { font: inherit; font-size: 13px; padding: 5px 14px; border: 1px solid #8793A6; border-radius: 4px; background: #fff; color: var(--ink); cursor: pointer; }
/* スマホ：押せる高さを広げる。入力の文字は 16px（上の .panel-search の指定より、うしろに書く。前に書くと、負ける） */
@media (max-width: 760px) {
  .panel-search input[type="search"] { flex: 1 1 160px; font-size: 16px; padding: 9px 10px; }
  .panel-search button { padding: 9px 14px; }
}

/* ---- 行を足す、消すことができる欄（プロフィールの、料金表、経歴、資格） ---- */
.rows { display: grid; gap: 8px; min-width: 0; }
.rows + .rows { margin-top: 10px; padding-top: 22px; border-top: 1px solid var(--line); }
.rows > .help { margin: 0 0 4px; }
.rows-head, .rows-row { display: grid; gap: 8px; align-items: center; }
.rows-head { font-size: 12px; font-weight: 700; color: var(--muted); }
.rows-body { display: grid; gap: 8px; }
.rows-fee { grid-template-columns: 170px minmax(0, 1.5fr) minmax(0, 1fr) 36px; }
.rows-career { grid-template-columns: 110px minmax(0, 1fr) 36px; }
.rows-qual { grid-template-columns: minmax(0, 1fr) 170px 36px; }
.rows-row.rows-fee { padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.rows-row .rows-note { grid-column: 2 / 4; font-size: 14px; }
.rows-row input, .rows-row select { font: inherit; font-size: 15px; height: 42px; padding: 0 12px; border: 1px solid #8793A6; border-radius: 4px; background: #fff; color: var(--ink); width: 100%; min-width: 0; }
.rows-row select { -webkit-appearance: none; appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 6l4.5 4.5L12.5 6' fill='none' stroke='%231A2433' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 14px; }
.rows-del { width: 36px; height: 42px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 4px; background: none; color: var(--muted); font-size: 16px; cursor: pointer; }
.rows-add { justify-self: start; display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 14px; font-weight: 700; padding: 8px 14px; border: 1px solid #8793A6; border-radius: 4px; background: #fff; color: var(--ink); cursor: pointer; }
.rows-add:disabled { color: #A3ACBA; border-color: var(--line); cursor: default; }
select.input-short { max-width: 200px; }
/* 公開のページ：経歴と資格 */
.person-career { margin: 0; display: grid; gap: 6px; font-size: 14px; line-height: 1.8; white-space: normal; }
.person-career > div { display: grid; grid-template-columns: 4.6em minmax(0, 1fr); gap: 14px; }
.person-career dt { color: var(--muted); font-variant-numeric: tabular-nums; }
.person-career dd { margin: 0; }
.person-quals { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; line-height: 1.8; }
.person-quals span { margin-left: 10px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 760px) {
  .rows-head { display: none; }
  .rows-fee { grid-template-columns: minmax(0, 1fr) 36px; }
  .rows-row.rows-fee > select, .rows-row.rows-fee > input { grid-column: 1; }
  .rows-row.rows-fee > .rows-del { grid-column: 2; grid-row: 1; }
  .rows-career { grid-template-columns: 100px minmax(0, 1fr) 36px; }
  .rows-qual { grid-template-columns: minmax(0, 1fr) 36px; }
  .rows-row.rows-qual > select { grid-column: 1; }
  .rows-row.rows-qual > .rows-del { grid-column: 2; grid-row: 1; }
}

/* ---- プロフィール設定：自動保存と、公開中・編集中の内容 ---- */
.rows-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.rows-row input.is-tidied { background: #F2F6FC; }
.profile-form + .profile-form, .profile-draft-note + .profile-form { margin-top: 24px; }
.profile-draft-note { max-width: 860px !important; margin: 24px 0 0 !important; }

/* ---- プロフィール設定：右の列に、自動保存の状態とボタンを出す（パソコンでは、下の帯にしない。2026-11-16） ---- */
.profile-cols { display: grid; grid-template-columns: minmax(0, 860px) 300px; gap: 24px; align-items: start; }
.profile-main { display: grid; gap: 24px; min-width: 0; }
.profile-main .profile-draft-note { margin: 0 !important; max-width: none !important; }
.profile-side { display: grid; gap: 24px; min-width: 0; position: sticky; top: 0; }
.profile-side > form { margin: 0; display: grid; }
.profile-save-state { margin: 0; font-size: 13px; line-height: 1.7; color: var(--muted); }
.profile-save-state.is-error { color: #A12A19; }
.profile-discard { padding: 0; border: 0; background: none; font: inherit; font-size: 14px; color: #A12A19; text-decoration: underline; cursor: pointer; }
@media (max-width: 1280px) { .profile-cols { grid-template-columns: minmax(0, 1fr) 280px; } }
/* 自動保存の状態と、「サイトに反映する」「プレビュー」「編集中の内容を捨てる」のまとまり。パソコンでは、箱の中に、そのまま並ぶ（まとまりの枠は、ないものとして扱う） */
.profile-bar { display: contents; }
.profile-where-bar { display: none; }
@media (max-width: 1000px) {
  .profile-cols { grid-template-columns: 1fr; }
  /* 幅が狭いときは、右の列（説明と、公開の設定）を、欄の上に出す */
  .profile-side { position: static; order: -1; }
  /* スマホとタブレット：右の列がなくなるので、状態とボタンを、画面の下に固定した帯にする（2026-11-19、利用者の指示）。
     上の端は、1px の灰色の線。影は付けない。長い欄を直したあと、上まで戻らなくてよい */
  .profile-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; align-items: center; gap: 8px 20px; padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); background: var(--surface); border-top: 1px solid var(--line); }
  .profile-bar .profile-save-state { flex: 1 1 0; min-width: 0; line-height: 1.6; }
  .profile-bar .article-links { order: 1; flex: none; gap: 0 18px; }
  .profile-bar .article-links a, .profile-bar .profile-discard { min-height: 44px; display: inline-flex; align-items: center; }
  .profile-bar .article-actions { order: 2; flex: none; }
  .profile-bar .article-actions .button { min-height: 44px; padding-top: 8px; padding-bottom: 8px; }
  .profile-where-side { display: none; }
  .profile-where-bar { display: inline; }
}
@media (max-width: 760px) {
  /* スマホ：1行に入らないので、上に状態、下に、文字のリンクとボタン */
  .profile-bar { flex-wrap: wrap; }
  .profile-bar .profile-save-state { flex: 1 1 100%; }
  .profile-bar .article-links { flex: 1 1 0; min-width: 0; }
  /* 帯（状態が2行のとき 約 150px）に、ページの最後が隠れないようにする */
  body:has(.profile-bar) .admin-main { padding-bottom: 184px; }
}

/* ---- 行政書士をさがす：左半分に「地図からさがす」、右半分に「注力分野からさがす」 ---- */
.finder { margin-top: 36px; scroll-margin-top: 16px; }
.finder .route-title { margin: 0 0 14px; }
.finder-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: stretch; margin-top: 20px; }
/* ヒーローの下に、はみ出した検索の枠の分だけ、下げる */
.hero-overlap + .finder-cols { margin-top: 112px; }
.finder-all { margin: 20px 0 0; text-align: right; font-size: 14px; font-weight: 700; }
.finder-all a { display: inline-flex; align-items: center; gap: 6px; }
/* 左右の枠の高さを、そろえる。中身は、枠の高さいっぱいに広げる（地図は、まんなかに置く。注力分野は、行の高さを均等にする） */
.finder-cols .finder { margin-top: 0; padding: 24px 28px 26px; display: flex; flex-direction: column; }
/* 右半分は、上に登録の募集、下に注力分野。合わせた高さを、左の地図の枠とそろえる */
.finder-right { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.finder-right .jp-focus { flex: 1; }
/* 行政書士の登録の募集 */
.recruit { display: grid; gap: 4px; padding: 22px 28px 24px; border-radius: 6px; background: var(--ink); color: #fff; text-decoration: none; }
.recruit-label { font-size: 12px; font-weight: 700; color: #C9D3E1; }
.recruit strong { font-size: 20px; line-height: 1.5; }
.recruit-text { font-size: 14px; line-height: 1.7; color: #E3E8EF; }
.recruit-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 14px; font-weight: 700; }
.finder-cols .jp-svg { margin: auto; }
.finder-cols .focus-tiles { flex: 1; grid-auto-rows: 1fr; }
.finder-cols .focus-tiles a { align-items: center; }
.finder-cols h2 { margin: 0 0 14px; padding: 0; border: 0; font-size: 19px; }
.jp-lead { margin: 0 0 12px; font-size: 14px; line-height: 1.7; color: var(--muted); }
.jp-crumb { margin: 0 0 8px; font-size: 13px; }
.jp-crumb { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; }
.jp-crumb a { display: inline-flex; align-items: center; gap: 4px; }
/* 地図。どこも同じ色。カーソルを当てたところと、選んでいるところだけ、色が変わる。--u は、大きく映したときの、線と文字の倍率 */
.jp-svg { display: block; width: 100%; max-width: 380px; height: auto; margin: 0 auto; --u: 1; }
.jp-p { fill: #C9D3E1; stroke: var(--surface); stroke-width: calc(.9px * var(--u)); stroke-linejoin: round; }
.jp-out { fill: #EEF1F5; }
.jp-svg a { cursor: pointer; }
.jp-svg a:focus-visible { outline: none; }
.jp-svg a:hover .jp-p, .jp-svg a.is-hover .jp-p, .jp-svg a:focus-visible .jp-p { fill: var(--accent-strong); }
.jp-svg a.is-current .jp-p { fill: var(--ink); }
.jp-inset { fill: none; stroke: #C5CDD9; stroke-width: calc(1px * var(--u)); }
.jp-name { font-size: calc(21px * var(--u)); font-weight: 700; fill: var(--ink); dominant-baseline: middle; pointer-events: none; paint-order: stroke; stroke: var(--surface); stroke-width: calc(5px * var(--u)); stroke-linejoin: round; }
.jp-name.is-light, .jp-name.is-hover { fill: #fff; stroke: none; }
/* 地図の下の一覧。地図と同じものを、名前で選べる */
.jp-chips { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.jp-chips a { display: block; padding: 4px 12px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--ink); font-size: 13px; line-height: 1.7; text-decoration: none; }
.jp-chips a:hover, .jp-chips a.is-hover, .jp-chips a:focus-visible { background: var(--accent-strong); border-color: var(--accent-strong); color: #fff; outline: none; }
.jp-chips a.is-current { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 700; }
.jp-chips .jp-chip-all { border-style: dashed; }
/* 注力分野の入口 */
.focus-tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.focus-tiles a { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; height: 100%; padding: 13px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; color: var(--ink); text-decoration: none; }
.focus-tiles span { font-size: 15px; font-weight: 700; }
.focus-tiles b { flex: none; font-size: 12px; font-weight: 400; color: var(--muted); font-variant-numeric: tabular-nums; }
.focus-tiles a.is-current { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.jp-focus .focus-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.jp-focus .focus-tiles a { padding: 11px 14px; }
.jp-focus .focus-tiles span { font-size: 14px; }
@media (max-width: 1000px) {
  /* 幅が狭いときは、地図を上、注力分野を下に並べる */
  .finder-cols { grid-template-columns: 1fr; }
  .hero-overlap + .finder-cols { margin-top: 124px; }
}
@media (max-width: 760px) {
  .hero-overlap + .finder-cols { margin-top: 200px; }
  .hero-overlap .search-person { margin-bottom: -170px; }
  .finder-cols .finder { padding: 16px; }
  .recruit { padding: 18px 16px 20px; }
  .recruit strong { font-size: 18px; }
  .jp-svg { max-width: 340px; }
}

/* ---- バナー：画像のバナーと、管理画面（バナー管理）での見え方 ---- */
.recruit-image { padding: 0; overflow: hidden; background: #E9EDF2; }
.recruit-image img { display: block; width: 100%; height: auto; }
.banner-image-box { display: grid; gap: 10px; justify-items: start; }
.banner-image-box[hidden] { display: none; }
.banner-image-box img { display: block; max-width: 100%; max-height: 220px; border-radius: 6px; border: 1px solid var(--line); }
.banner-preview h2 { margin: 0 0 10px; padding: 0; border: 0; font-size: 15px; }

/* 横に並べた欄は、上をそろえる（片方にだけ説明の文があっても、入力の欄の高さと位置が、ずれないようにする） */
.field-row { align-items: start; }
.field { align-content: start; }
/* バナー管理：フォームの下の「サイトでの見え方」。幅は、サイトで出るときと同じ（行政書士検索のトップの、右半分。パソコンの幅で 514px） */
.banner-preview { max-width: 514px; margin-top: 32px; }
.banner-preview .recruit { cursor: default; }
.banner-preview [hidden] { display: none; }

/* 解説記事のカードの下：書いた人（顔写真、名前、所属） */
.article-cards .card-lead { margin-bottom: 14px; }
.card-by { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); min-width: 0; }
.card-by-photo { flex: none; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; background: #E9EDF2; }
.card-by-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.card-by-photo .avatar-initial { font-size: 16px; }
.card-by-text { display: grid; min-width: 0; line-height: 1.5; }
.card-by-name { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-by-office { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ==== ヒーローエリアのイラスト（2026-11-17） ====
   ごく薄い色の地の右に、検索の枠の上に立たせて出す。絵は lib/site.js の heroIllust。写真（has-image）のときの暗い幕と白い文字は、使わない */
/* 地は、ブランドの色を、ごく薄くした色（--accent-soft）。白い検索の枠が、地の上で浮いて見え、ヒーローの下の端をまたいでも、切れ目がはっきりする。
   絵は、背景が透明の PNG。犬の白い所は、白のまま出る */
.hero-band.hero-overlap.has-illust { background-color: var(--accent-soft); padding-top: 120px; } /* 絵の上に、40px より広い余白が残る高さ */
.hero-band.home-hero.has-illust { padding-top: 124px; }
.hero-illust { position: relative; height: 0; pointer-events: none; user-select: none; }
/* 絵の足もとと、検索の枠の間を、少し空ける（枠や、枠の影に、絵が重ならないように） */
.hero-illust img { position: absolute; right: 24px; bottom: 20px; height: 220px; width: auto; display: block; }
.home-hero .hero-illust img { height: 244px; }
.hero-band.has-illust > h1, .hero-band.has-illust > p { max-width: calc(100% - 500px); }
.hero-band.has-illust > p { min-height: 3.8em; }
@media (max-width: 1000px) {
  .hero-illust img, .home-hero .hero-illust img { height: 168px; right: 16px; bottom: 16px; }
  .hero-band.has-illust > h1, .hero-band.has-illust > p { max-width: calc(100% - 370px); }
}
@media (max-width: 760px) {
  .hero-band.hero-overlap.has-illust, .hero-band.home-hero.has-illust { padding-top: 40px; }
  .hero-illust img, .home-hero .hero-illust img { height: 108px; right: 12px; bottom: 12px; }
  .hero-band.has-illust > h1, .hero-band.has-illust > p { max-width: none; }
  .hero-band.has-illust > p { min-height: 0; margin-bottom: 136px; }
}

/* 中くらいの幅では、トップの見出しを少し小さくする（絵の分だけ幅が狭くなり、最後の1字だけが次の行に落ちるため） */
@media (min-width: 761px) and (max-width: 1000px) { .home-hero.has-illust h1 { font-size: 32px; } }
/* 中くらいの幅では、絵が小さくなるので、ヒーローの上の余白を詰める（広い画面と同じ余白だと、見出しの上が空きすぎる） */
@media (min-width: 761px) and (max-width: 1000px) { .hero-band.hero-overlap.has-illust, .hero-band.home-hero.has-illust { padding-top: 80px; } }

/* ==== トップ：やりたいことからさがす（2026-11-17） ====
   絵を左に、名前と件数を右に置く（絵の下に文字を置くと、カードの右が空くため）。/search の同じ並びにも効く */
.home-themes a { grid-template-columns: auto minmax(0, 1fr); column-gap: 14px; row-gap: 2px; align-items: center; padding: 16px 18px; }
.home-themes img, .home-themes i { grid-row: 1 / span 2; margin-bottom: 0; }
.home-themes i { width: 56px; text-align: center; font-size: 30px; }
.home-theme-label { align-self: end; }
.home-theme-count { align-self: start; }
/* スマホ：2列は、カードの幅が 172px 以上あるときだけ（画面の幅 386px から）。それより狭い画面では、1列にする。
   172px は、絵（36px）の右に、いちばん長い名前（7文字、15px）が1行で入る幅。これより狭いと、名前が1〜2字ずつ折れる */
@media (max-width: 760px) {
  .home-themes { grid-template-columns: repeat(auto-fit, minmax(max(172px, calc(50% - 5px)), 1fr)); }
  .home-themes a { column-gap: 8px; padding: 12px 10px; }
  .home-themes img { width: 36px; height: 36px; }
  .home-themes i { width: 36px; font-size: 24px; }
}

/* ==== トップ：許認可と補助金の入口のバナー（2026-11-17） ====
   薄い色の地に、右下に、物だけの絵（犬は入れない）。ボタンは、ほかのボタンと同じ形 */
.home-entry { position: relative; overflow: hidden; grid-template-rows: auto 1fr auto; background: var(--accent-soft); border: 0; border-radius: 16px; padding: 28px 28px 28px 32px; }
.home-entry > * { position: relative; z-index: 1; }
.home-entry .home-entry-illust { position: absolute; z-index: 0; right: 28px; bottom: 24px; height: 128px; width: auto; }
.home-entry .marks { max-width: calc(100% - 150px); }
.home-entry .marks li { word-break: auto-phrase; }
.home-entry-link { justify-self: start; margin-top: 4px; padding: 10px 20px; background: var(--accent-strong); color: #fff; border-radius: 4px; }
/* タブレットとスマホ：絵を右上に小さく置いて、箇条書きを幅いっぱいに使う（絵をよけると、箇条書きが細かく折れるため） */
@media (max-width: 1000px) {
  .home-entry .home-entry-illust { height: 72px; top: 18px; bottom: auto; right: 18px; }
  .home-entry .marks { max-width: none; }
}
@media (max-width: 760px) {
  .home-entry { padding: 22px 20px; min-height: 0; }
  /* 幅の狭い画面では、絵を小さくする（左の件数の文字に、重ならないように。320px で 58px） */
  .home-entry .home-entry-illust { height: clamp(56px, 18vw, 72px); }
}

/* ==== トップ：申請までの進め方（2026-11-17） ====
   段ごとに、犬の絵を出す。絵は、薄い青の面の上に置く */
.home-steps li { border-radius: 16px; padding: 16px 16px 22px; }
.home-steps .step-illust { display: grid; place-items: center; background: var(--accent-soft); border-radius: 10px; padding: 16px 12px 12px; }
.home-steps .step-illust img { height: 132px; width: auto; max-width: 100%; object-fit: contain; display: block; }
.home-steps li > .step-no { margin-top: -30px; margin-left: 8px; background: var(--surface); position: relative; z-index: 1; }
.home-steps li > .step-no-goal { background: var(--ink); }
.home-steps li > div:last-child { padding: 0 6px; }
@media (max-width: 760px) {
  .home-steps .step-illust img { height: 112px; }
}

/* ==== 詳細ページの右下に出す、チェックへの入口（2026-11-17） ====
   犬の顔と、吹き出し。許認可と補助金で同じ（views/partials/check-float.ejs）。狭い画面では、下の帯（.dock）の上に出す */
/* 初めは見えない。statics/js/check-float.js が、スクロールしたら is-shown を付け、フッターが見えたら外す */
.check-float { position: fixed; right: 20px; bottom: 20px; z-index: 9; opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s; }
.check-float.is-shown { opacity: 1; visibility: visible; }
@media (prefers-reduced-motion: reduce) { .check-float { transition: none; } }
.check-float-link { display: flex; align-items: flex-end; gap: 10px; text-decoration: none; color: var(--ink); }
.check-float-link img { flex: none; width: 84px; height: 64px; filter: drop-shadow(0 4px 10px rgba(26, 36, 51, .18)); }
.check-float-bubble { position: relative; display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px; padding: 11px 16px; background: var(--surface); border: 2px solid var(--accent-text); border-radius: 14px; box-shadow: 0 6px 20px rgba(26, 36, 51, .14); /* 枠線は、犬の輪郭線と同じ色（許認可は濃い緑、補助金は濃い橙） */ font-size: 15px; font-weight: 700; line-height: 1.5; }
.check-float-bubble i { color: var(--accent-text); font-size: 16px; }
/* 吹き出しのしっぽ（犬のほうを向く） */
.check-float-bubble::after { content: ""; position: absolute; right: -7px; bottom: 12px; width: 10px; height: 10px; background: var(--surface); border-right: 2px solid var(--accent-text); border-bottom: 2px solid var(--accent-text); transform: rotate(-45deg); }
.check-float-close { position: absolute; left: -10px; top: -10px; width: 26px; height: 26px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--muted); font-size: 13px; cursor: pointer; }
@media (max-width: 1000px) { /* 下の帯（.dock）が出る幅と、同じにする。帯（65px）の上に 8px 空ける */
  /* 幅の上限：左に 12px 残す（× は、左上に 10px はみ出して置いてある。狭い画面で吹き出しが2行になっても、× が画面の中に収まる） */
  .check-float { right: max(12px, env(safe-area-inset-right, 0px)); bottom: calc(73px + env(safe-area-inset-bottom, 0px)); max-width: calc(100vw - 24px - env(safe-area-inset-right, 0px)); }
  .check-float-link img { width: 63px; height: 48px; }
  .check-float-bubble { padding: 9px 12px; font-size: 13px; margin-bottom: 8px; }
}
@media print { .check-float { display: none; } }

/* ==== トップ：締切が近い補助金（2026-11-17） ====
   左の一覧と、右のカレンダーの、高さをそろえる。一覧の行は、枠の高さいっぱいに、同じ間で並べる。
   補助金名と通称は、1行に収まらないときは、終わりを「…」にする（全部の名前は、リンクの title に入っている） */
.home-deadline { align-items: stretch; }
.home-deadline-list { display: flex; flex-direction: column; }
.home-deadline-list .deadline-table { flex: 1; height: 100%; }
.deadline-table td { vertical-align: middle; }
.deadline-table td:first-child { width: 100%; max-width: 0; }
.deadline-table td:first-child a, .deadline-alias { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 狭い画面では、1行だと名前がほとんど読めないので、2行まで出して、その先を「…」にする */
@media (max-width: 760px) {
  .deadline-table td:first-child a { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; white-space: normal; }
}

/* 補助金のトップの「締切が近い補助金」。サイトのトップと同じ部品（partials/deadline-board）を、棚（shelf）の中に置く */
.shelf-head .shelf-link { flex: none; font-size: 14px; font-weight: 700; }
.shelf-head p strong { color: var(--ink); font-variant-numeric: tabular-nums; }
@media (max-width: 760px) {
  .shelf-head:has(.shelf-link) { align-items: flex-start; flex-direction: column; gap: 6px; }
}

/* 許認可のトップの「やりたいことからさがす」。サイトのトップと同じカードを、1行に5つ（タブレットは3つ）並べる。
   スマホ（760px 以下）には、何も書かない。サイトのトップの .home-themes の指定が、そのまま当たる（2列。狭い画面は1列） */
@media (min-width: 761px) {
  .home-themes-row { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
  .home-themes-row a { column-gap: 12px; padding: 14px 16px; }
  .home-themes-row img { width: 48px; height: 48px; }
  .home-themes-row .home-theme-label { font-size: 16px; }
}
@media (min-width: 761px) and (max-width: 1000px) { .home-themes-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ログイン、新規登録、メールを送ったあとの画面の、犬の絵。見出しの上の真ん中に置く */
.login-illust { display: block; height: 132px; width: auto; margin: 0 auto 18px; }

/* 「行政書士に相談してみる」の枠。イラストありのとき：地を、ブランドのごく薄い色にして、右下に絵を置く。文字は濃いまま */
.consult.has-illust { position: relative; overflow: hidden; border: 0; background: var(--accent-soft); padding-right: 300px; }
.consult-illust { position: absolute; right: 28px; bottom: 24px; height: 200px; width: auto; }
@media (max-width: 1000px) {
  .consult.has-illust { padding-right: 32px; }
  .consult-illust { position: static; display: block; height: 150px; margin: 0 0 14px auto; }
}
@media (max-width: 760px) { .consult.has-illust { padding-right: 20px; } .consult-illust { height: 130px; margin-left: auto; margin-right: auto; } }

/* ---- やりたいこと別トップ、業種別トップ、まとめてさがす（views/search.ejs）のヒーロー。4つのトップと同じ作り ---- */
.theme-hero .breadcrumb { margin-bottom: 18px; }
.hero-band.theme-hero.has-illust > p { min-height: 0; }
/* 入口の絵は、4つのトップの絵より横に長い（いちばん長い「荷物を運ぶ」で、高さ 220px のとき幅 513px、168px のとき幅 392px）。
   見出しと説明が絵にかからないように、文の幅を、いちばん長い絵の幅＋絵の右の余白＋間 24px だけ狭める。絵の大きさと置き場は、4つのトップと同じまま */
.hero-band.theme-hero.has-illust > h1, .hero-band.theme-hero.has-illust > p { max-width: calc(100% - 561px); }
@media (max-width: 1000px) { .hero-band.theme-hero.has-illust > h1, .hero-band.theme-hero.has-illust > p { max-width: calc(100% - 432px); } }
@media (max-width: 760px) { .hero-band.theme-hero.has-illust > h1, .hero-band.theme-hero.has-illust > p { max-width: none; } }
.hero-overlap + .search-body { margin-top: 104px; }
.search-body:empty { margin-top: 72px !important; }
.search-body .result-count { margin-top: 0; }
@media (max-width: 1000px) { .hero-overlap + .search-body { margin-top: 112px; } }
@media (max-width: 760px) { .hero-overlap + .search-body { margin-top: 128px; } .theme-hero .breadcrumb { margin-bottom: 12px; } }

/* 業種からさがす。バッジの形（丸い端、薄い色の地、件数は白い丸の中） */
.home-industries { align-items: center; }
.home-industries a { align-items: center; gap: 8px; padding: 5px 6px 5px 14px; border: 0; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); font-size: 14px; font-weight: 700; line-height: 1.6; }
.home-industries a span { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; background: var(--surface); color: var(--accent-text); font-size: 12px; font-weight: 700; }
.home-industries a.is-current { background: var(--accent-strong); color: #fff; box-shadow: none; }
/* 当てはまるものが 0件の入口（「準備中」）。リンクにしない（href のない a）。色を薄くして、押せないことを示す。サイトのトップと、入口のページ・検索のページで共通 */
.home-themes a.is-empty, .home-industries a.is-empty { cursor: default; }
.home-themes a.is-empty { color: var(--muted); background: transparent; }
.home-themes a.is-empty img, .home-themes a.is-empty i { opacity: .45; }
.home-industries a.is-empty { background: transparent; box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); }
.home-industries a.is-empty span { background: transparent; color: var(--muted); padding: 0 4px 0 0; }
/* スマホとタブレットでは、押せる高さを 44px に */
@media (max-width: 1000px) { .home-industries a { padding: 10px 10px 10px 16px; } }
@media (max-width: 760px) { .home-industries { align-items: flex-start; } }

/* やりたいこと別トップ、業種別トップの、許認可と補助金。それぞれのトップと同じカード（.pick）を、3つずつ並べる */
.pick-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.pick-grid .pick { min-width: 0; }
.search-cards > h2 { margin: 0 0 14px; font-size: 20px; }
.search-results:has(.search-cards) { gap: 36px; }
@media (max-width: 1000px) { .pick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* 1列のときは、題の高さの決めうちを外す（横に送る棚 .carousel の中は、となりと高さをそろえるので、そのまま） */
@media (max-width: 760px) { .pick-grid { grid-template-columns: 1fr; gap: 14px; } .pick-grid .pick h3 { height: auto; } }

/* 解説記事のカードの題。長いときは、折り返さずに、1行で「…」にする（全部の題は、title に入れてある） */
.article-cards .card h2 { display: block; height: auto; white-space: nowrap; text-overflow: ellipsis; }
/* 更新履歴の題も、1行で「…」にする */
.home-update-text { display: flex; align-items: baseline; flex: 1; }
.home-update-text a { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding: 11px 0; margin: -11px 0; } /* 余白を足して、同じだけ引く：並びを動かさずに、押せる高さだけを広げる */
.home-update-text > span { flex: none; }
/* スマホでは、題を次の行に落として、幅いっぱいに使う（上の flex: 1 が、前に書いた flex-basis: 100% を打ち消すので、ここで書き直す） */
@media (max-width: 760px) { .home-update-text { flex-basis: 100%; } }

/* やりたいこと別トップ、業種別トップ、まとめてさがすの、見つかった件数。白い枠に、全体の数（大きく）と、種類ごとのバッジ */
.result-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin: 0 0 28px; padding: 16px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
.result-total { display: flex; align-items: baseline; gap: 6px; margin: 0; font-size: 15px; }
.result-total strong { font-size: 34px; line-height: 1; color: var(--accent-text); font-variant-numeric: tabular-nums; }
.result-kinds { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.result-kind { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px 8px 12px; border-radius: 999px; font-size: 14px; font-weight: 700; text-decoration: none; }
.result-kind strong { margin-left: 2px; font-size: 18px; line-height: 1; font-variant-numeric: tabular-nums; }
.result-kind i { font-size: 18px; }
.search-cards, .search-results .block { scroll-margin-top: 20px; }
@media (max-width: 1000px) { .result-kind { min-height: 44px; } }
@media (max-width: 760px) { .result-summary { padding: 14px 16px; gap: 10px 20px; } .result-total strong { font-size: 28px; } .result-kind { padding: 6px 12px 6px 10px; } }
/* 解説記事の一覧の、検索の枠 */
.list-head + .search { margin-top: 8px; margin-bottom: 4px; }

/* ---- 解説記事の「いいね」 ---- */
:root { --like: #D6336C; }
.article-like { display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; margin-top: 20px; margin-bottom: 0; padding: 20px 24px; background: var(--accent-soft); border-radius: 6px; scroll-margin-top: 24px; }
.like-text { min-width: 0; }
.like-title { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.6; }
.like-note { margin: 2px 0 0; font-size: 13px; color: #3D4758; line-height: 1.7; }
.like-button { flex: none; display: inline-flex; align-items: center; gap: 10px; padding: 12px 24px; border: 1px solid #C5CDD9; border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; box-shadow: 0 2px 6px rgba(26, 36, 51, .08); }
.like-button i { font-size: 22px; color: var(--like); }
.like-button strong { min-width: 1.2em; font-size: 18px; font-variant-numeric: tabular-nums; }
.like-button.is-liked { border-color: var(--like); background: var(--like); color: #fff; }
.like-button.is-liked i { color: #fff; }
.like-button:disabled { opacity: .6; cursor: default; }
.article-likes { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; color: var(--muted); text-decoration: none; font-variant-numeric: tabular-nums; }
.article-likes i { font-size: 16px; color: var(--like); }
.article > .article-like + .block { margin-top: 32px; }
@media (max-width: 760px) { .article-like { flex-direction: column; align-items: stretch; text-align: center; padding: 18px 16px; } .like-button { justify-content: center; } }
.card-likes { display: inline-flex; align-items: center; gap: 3px; margin-left: auto; font-variant-numeric: tabular-nums; }
.card-likes i { font-size: 15px; color: var(--like); }

/* ---- 解説記事のトップの、ランキング ---- */
.rankings { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: start; }
.ranking { padding: 20px 22px 12px; }
.ranking h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 16px; }
.ranking h3 i { font-size: 20px; color: var(--accent-text); }
.ranking ol { list-style: none; margin: 0; padding: 0; }
.ranking li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 15px; }
.ranking li:first-child { border-top: 0; }
.ranking li > a { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--ink); font-weight: 700; text-decoration: none; }
.rank { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #EEF1F5; color: #3D4758; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rank-1 { background: var(--accent-strong); color: #fff; }
.rank-2, .rank-3 { background: var(--accent-soft); color: var(--accent-text); }
.rank-num { flex: none; display: inline-flex; align-items: center; gap: 3px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.rank-num i { font-size: 15px; color: var(--like); }
.rank-photo { flex: none; width: 36px; height: 36px; border-radius: 50%; overflow: hidden; background: #DDE3EB; display: grid; place-items: center; font-weight: 700; color: #3D4758; }
.rank-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rank-person { flex: 1; min-width: 0; display: grid; line-height: 1.5; }
.rank-person a { color: var(--ink); font-weight: 700; text-decoration: none; }
.rank-person > a, .rank-person > span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.rank-person > span { font-size: 12px; color: var(--muted); }
@media (max-width: 1000px) { .rankings { grid-template-columns: minmax(0, 1fr); } }
.rank-none { margin: 6px 0 10px; font-size: 13px; line-height: 1.8; color: var(--muted); }

/* ---- 解説記事のトップ：カードを横に送る形（5件まで。それより多ければ、最後に「もっと見る」） ---- */
.article-carousel { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; padding-bottom: 8px; }
.article-carousel > .card { flex: 0 0 calc((100% - 40px) / 3); min-width: 260px; scroll-snap-align: start; }
.card-more > a { align-items: center; justify-content: center; gap: 6px; min-height: 220px; padding: 24px; background: var(--accent-soft); color: var(--accent-text); font-size: 17px; font-weight: 700; text-align: center; }
.card-more i { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 6px; border-radius: 50%; background: var(--surface); font-size: 24px; }
.card-more-sub { font-size: 13px; font-weight: 400; color: #3D4758; }
.shelf-side { display: flex; align-items: center; gap: 18px; flex: none; }
.shelf-brand { display: flex; align-items: center; gap: 10px; }
.shelf-brand img { flex: none; }
@media (max-width: 760px) {
  .article-carousel > .card { flex-basis: 82%; }
  .shelf-head:has(.shelf-side) { align-items: flex-start; flex-direction: column; gap: 8px; }
  .shelf-side { width: 100%; justify-content: space-between; }
}
/* ランキングの3つの欄。高さをそろえる（欄を同じ高さに伸ばし、行の高さも同じにする） */
.rankings { align-items: stretch; }
.ranking li { min-height: 62px; padding-top: 8px; padding-bottom: 8px; }

/* ---- スマホとタブレットの、共通の土台（2026-11-19。specs/overview.md、docs/brand/responsive/NOTES.md） ---- */
/* 文字だけのリンクは、並びを動かさずに、押せる高さだけを 44px ほどに広げる（余白を足して、同じだけ引く。見た目は変わらない） */
.breadcrumb a, .home-title-row > a, .shelf-head .shelf-link, .shelf-more a, .home-more a, .finder-all a { padding: 11px 0; margin: -11px 0; }
.fold summary, .more summary { padding: 9px 0; margin: -9px 0; }
.src summary { padding: 10px 8px 10px 0; margin: -10px 0; }
/* ヒーローの見出しが2行になるとき、最後の1字だけが次の行に落ちないように、行の長さをそろえる（対応していないブラウザでは、もとのまま） */
@media (max-width: 1000px) { .hero-band h1 { text-wrap: balance; } }

/* 下のナビ（views/partials/tabbar.ejs）。スマホだけに出す。高さは 60px ＋ 上の線 1px ＋ 端末の下の余白。
   地は白、上の端に 1px の灰色の線（.dock と同じ扱い）。影、ホバーの効果は付けない。
   いまいる場所は、薄い色の面、文字の色、太さで示す（一辺だけの色つきの線は使わない）。色は body の .brand-* で変わる */
.tabbar { display: none; }
@media (max-width: 760px) {
  .tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--surface); border-top: 1px solid var(--line); padding: 4px max(8px, env(safe-area-inset-right, 0px)) calc(4px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px)); }
  .tabbar a { display: grid; justify-items: center; align-content: center; gap: 2px; min-height: 52px; border-radius: 6px; text-decoration: none; color: var(--ink); font-size: 12px; font-weight: 500; line-height: 1.3; white-space: nowrap; }
  .tabbar i { font-size: 24px; color: var(--muted); }
  .tabbar a[aria-current] { background: var(--accent-soft); color: var(--accent-text); font-weight: 700; }
  .tabbar a[aria-current] i { color: var(--accent-text); }
  /* フッターが、ナビの下に隠れないように */
  body:has(.tabbar) .site-footer { padding-bottom: calc(61px + env(safe-area-inset-bottom, 0px)); }
}

/* ---- スマホとタブレット：詳細・チェック・相談、行政書士検索、解説記事、エラーのページ（2026-11-19。docs/brand/responsive/NOTES.md の 5-3〜5-5） ---- */
/* 文字だけのリンク。並びを動かさずに、押せる高さだけを広げる（余白を足して、同じだけ引く） */
.verdict-retry a, .consult-sub, .article-next > a:not(.button), .person-back a, .person-links a, .person-map, .person-office-list a[href^="tel:"], .error-links a, .sheet-head-sub .sub-name a, .jp-crumb a, .person-note a, .mini dd a { padding-top: 11px; padding-bottom: 11px; margin-top: -11px; margin-bottom: -11px; }
/* 44px に 1〜2px 足りなかったもの。「もう一度チェックする」と、事務所の電話番号は、12px ずつ。
   プロフィールの「監修・記事」の並びは、行の間（48px）と同じ高さにする（上下の行で、押せる範囲が重ならない） */
.verdict-retry a, .person-office-list a[href^="tel:"] { padding-top: 12px; padding-bottom: 12px; margin-top: -12px; margin-bottom: -12px; }
.person-links a { padding-top: 10.5px; padding-bottom: 10.5px; margin-top: -10.5px; margin-bottom: -10.5px; }
.person-phone a { padding: 5px 0; }
/* 解説記事のトップのランキング。行のどこを押しても、その記事（行政書士）へ行く。見た目は変えない */
.ranking { min-width: 0; }
.ranking li { position: relative; }
.ranking li > a::after, .rank-person > a::after { content: ""; position: absolute; inset: 0; }
@media (max-width: 1000px) {
  /* 解説記事の一覧の、ページ送り */
  .column-pager a { min-height: 44px; }
  /* プロフィールの、ページの中の目次。押せる高さを 44px に（上下の余白は、その分だけ詰める）。スマホでは、2行になる */
  .person-nav { row-gap: 0; padding: 3px 0; }
  .person-nav a { display: inline-flex; align-items: center; min-height: 44px; }
}
@media (max-width: 760px) {
  /* 幅の狭い画面で、ボタンの言葉が2行になるとき、文節の切れ目で折り返す（「チ／ェック」と割れないように）。相談のボタンは、左右の余白を詰めて、1行に収める */
  .check-cta .button, .cta .button { word-break: auto-phrase; }
  .consult-button { padding-left: 20px; padding-right: 20px; }
  /* 注力分野の入口。名前の下に、人数を置く（横に並べると、名前が1〜2字で割れるため）。2列のまま */
  .jp-focus .focus-tiles a { flex-direction: column; align-items: flex-start; justify-content: center; gap: 0; }
  .jp-focus .focus-tiles span { word-break: auto-phrase; }
  /* 地図の中の名前を、大きくする（地図の中の単位で 21 → 26。画面の上で 13px ほど）。
     地図は、画面の幅 − 66px に縮んで出る（地図の中の単位で、幅 640）。362px より狭い画面では、縮んだあとも 12px を下回らないように、単位のほうを大きくする。
     ただし、28.3 より大きくはしない（それより大きいと、340px より狭い画面で、甲信越・北陸の「石川」と「富山」が重なる。320px では 11.2px になる） */
  .jp-name { font-size: calc(max(26px, min(63.1px - 10.24vw, 28.3px)) * var(--u)); }
  /* 解説記事の本文の表。スマホでは、横に送って読む（表の幅は 480px より狭くならない）。送れることを、表の上に小さく書く。
     本文の見た目は、公開のページ（.table-scroll）と、エディタ（.tableWrapper）で同じにする。
     書くのは、送れるときだけ（表を入れる箱の幅が、480px より狭いとき）。箱の幅で決めるので、@media ではなく @container を使う（箱そのものを、幅を測る入れ物にする） */
  .article-body .table-scroll, .rte-content .tableWrapper { container-type: inline-size; }
  @container (max-width: 479.98px) {
    .article-body .table-scroll::before, .rte-content .tableWrapper::before { content: "表は、横に送れます"; display: block; position: sticky; left: 0; margin-bottom: 4px; font-size: 12px; line-height: 1.6; color: var(--muted); }
  }
  .rte-content .tableWrapper table { min-width: 480px !important; } /* エディタの表は、幅を要素に直接書くので、!important で公開のページと同じ下限にそろえる */
}

/* エラーのページ（views/error.ejs）。戻るリンクは、主（ブランドのトップ）、副（サイトのトップ）の順 */
.error-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
/* 404 だけ、犬の絵を出す（絵は lib/site.js の notFoundIllust）。絵、見出し、リンクを、まんなかにそろえる。絵の下の余白は、ログインの画面の絵と同じ */
.error-page.has-illust { margin: 0 auto; padding-top: 32px; text-align: center; }
.error-page.has-illust .error-links { justify-content: center; max-width: none; }
.error-illust { display: block; width: 220px; height: auto; margin: 0 auto 18px; }
@media (max-width: 760px) {
  .error-page.has-illust { padding-top: 16px; }
  .error-illust { width: 200px; }
}

/* ---- スマホとタブレット：QA で見つかった、小さな直し（2026-11-19） ---- */
/* 最後の1字だけが、次の行に落ちないようにする（言葉は変えない）。見出しは、行の長さをそろえて、文節の切れ目で折り返す。
   説明の文は、最後の行が短くなりすぎない折り返しにする。どちらも、対応していないブラウザでは、もとのまま。パソコンの幅には、効かせない */
@media (max-width: 1000px) {
  .shelf-head h2, .list-head h1, .home-about h3, .step-body > h3, .article-body h2, .recruit strong, .sheet-head-sub .sub-name a { text-wrap: balance; word-break: auto-phrase; }
  .hero-band > p { text-wrap: pretty; }
}
@media (max-width: 760px) {
  /* 記事の表のマス。中身が4字ぶん入る幅より、狭くしない（もとの 4em は、左右の余白 24px を含むので、中身は2字と少ししか入らず、
     幅の狭い列で「出す／先」「警察／署」と、1字だけ落ちていた）。表が箱より広くなったら、横に送って読む */
  .article-body th, .article-body td { min-width: calc(4em + 25px); }
  /* 犬の入口の吹き出し */
  .check-float-bubble { text-wrap: balance; word-break: auto-phrase; }
  /* パンくずと、地図の上の「全国の地図に戻る」の並び。2行に折れたとき、下の行のリンクの押せる範囲が、上の行の文字にかからないように、
     行の間を 4px 広げて、上へ広げる量を減らす（減らした分は、下へ広げる。押せる高さは、同じ 45px ほど） */
  .breadcrumb, .jp-crumb { row-gap: 8px; }
  .breadcrumb a, .jp-crumb a { padding-top: 9px; margin-top: -9px; padding-bottom: 13px; margin-bottom: -13px; }
  /* カレンダーの件数の印。日付の丸の外へ出さない（幅の狭い画面では、丸どうしの間がなく、右隣の日付にかかるため） */
  .cal-day sup { right: 0; }
}
/* 「解説記事の一覧を見る」。押せる高さを 44px に */
.home-more a { padding: 12px 0; margin: -12px 0; }
/* まとめてさがすの、0件のときの文の中のリンク（「許認可の一覧」「補助金の一覧」）。言葉の途中で折り返さない。
   押せる範囲は、1つ目は上へ、2つ目は下へだけ広げる（狭い画面では、2つが上下の行に並ぶので、間へ広げると重なる）。並びは動かさない */
.search-body > .empty a { display: inline-block; white-space: nowrap; }
.search-body > .empty a:first-of-type { padding-top: 10px; margin-top: -10px; }
.search-body > .empty a:last-of-type { padding-bottom: 10px; margin-bottom: -10px; }
/* 犬の入口の ×。見た目（26px の丸）は変えずに、押せる範囲だけを、左と上へ広げる（44px 四方。右と下は、吹き出しのリンクなので、広げない） */
.check-float-close::before { content: ""; position: absolute; right: 0; bottom: 0; width: 44px; height: 44px; }

/* ---- 管理画面：X への投稿（補助金管理の一覧の上の枠と、設定の画面の箱。owner だけ。見本と数値は sns/x/card/） ----
   枠は、白い面に、四方の細い線（色つきの線は使わない）。幅の段は、760px と 1000px だけ */
.x-queue { margin: 0 0 20px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.x-queue-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; padding: 12px 16px 10px; border-bottom: 1px solid var(--line); }
.x-queue-head h2 { margin: 0; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.x-queue-head h2 i { font-size: 18px; color: var(--muted); }
.x-queue-head p { margin: 0; font-size: 12px; color: var(--muted); }
.x-queue .admin-compact .col-xkind { width: 104px; }
.x-queue .admin-compact .col-xdate { width: 176px; }
.x-queue .admin-compact .col-xact { width: 176px; }
.x-queue .left { color: var(--accent-text); font-weight: 700; margin-left: 6px; white-space: nowrap; }
.x-queue .admin-compact .x-queue-warn { color: var(--ink); white-space: normal; }
.x-queue-warn i { margin-right: 4px; vertical-align: -1px; }
.x-post-form { margin: 0; }
/* 表の中のボタンは、.admin button（枠だけのボタン）の指定に負けないように、セレクタを重ねてある */
.x-post-button, .admin button.x-post-button { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 13px; font-weight: 700; line-height: 1.6; padding: 5px 14px; border: 0; border-radius: 4px; background: var(--accent-strong); color: #fff; text-decoration: none; cursor: pointer; white-space: nowrap; }
.x-post-button i { font-size: 15px; }
.x-post-button:disabled { opacity: .55; cursor: default; }
.x-post-button-sub { padding: 4px 13px; border: 1px solid #8793A6; background: var(--surface); color: var(--ink); }
.x-post-done { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0; font-size: 13px; }
.x-post-done span { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; white-space: nowrap; }
.x-post-done i { font-size: 15px; color: var(--muted); }
/* 下書きを作ったあと：下書きの状態の札（.xdraft-state）と、下書きへのリンク、X の投稿へのリンク */
.x-post-done .xdraft-state i, .x-post-made .xdraft-state i { font-size: 14px; color: inherit; margin-top: 0; }
/* 記録の行の中の札は、アイコンと字を、縦のまん中でそろえる（.x-post-log span の「上にそろえる」を、札には当てない） */
.x-post-log .xdraft-state { align-items: center; gap: 5px; }
/* 作り直しが要る下書きの知らせ（画像の日数が古い、など）。字の色と太さだけで出す */
.x-post-remake, .x-post-done span.x-post-remake { display: inline-flex; align-items: flex-start; gap: 4px; font-size: 12px; font-weight: 700; color: #A12A19; white-space: normal; }
.x-post-remake i, .x-post-done .x-post-remake i, .x-post-log .x-post-remake i { font-size: 14px; margin-top: 2px; color: inherit; flex: none; }
.x-post-log .x-post-remake { flex-basis: 100%; }
.xdraft-list .xdraft-remake { color: #A12A19; font-weight: 700; }
.x-post-done a { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.x-post-log .x-post-made { align-items: center; gap: 10px; flex-wrap: wrap; }
.x-post-made a { white-space: nowrap; }
/* 記録の行の地（薄い灰色）の上では、「下書き」の札の地を白にする（同じ色で、札に見えなくなるため） */
.x-post-log .xdraft-state-draft { background: var(--surface); }
.x-post-preview { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; border: 1px solid var(--line); border-radius: 4px; background: #E9EDF2; }
.x-post-kind { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.x-post-text { margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 4px; background: #F5F6F8; font: inherit; font-size: 13px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.x-post-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.x-post-log { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 0; padding: 8px 12px; border-radius: 4px; background: #EEF1F5; font-size: 13px; }
.x-post-log span { display: inline-flex; align-items: flex-start; gap: 6px; }
.x-post-log i { font-size: 16px; margin-top: 3px; color: var(--muted); }
.x-post-undo, .admin button.x-post-undo { font: inherit; font-size: 13px; padding: 0; border: 0; background: none; color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; white-space: nowrap; }
.x-post .form-note { font-size: 13px; }
@media (max-width: 1000px) {
  .x-post-button, .x-post-undo { min-height: 40px; }
}
@media (max-width: 760px) {
  .x-queue .admin-compact tr { grid-template-columns: 104px minmax(0, 1fr); }
}

/* ---- X の投稿（手で作る投稿。owner だけ。specs/x-post.md）。見本と数値は sns/x/post-admin/ ---- */
/* 状態の札。6つを、色だけでなく、面の形（塗り／枠）と、アイコンと、言葉で分ける。一辺だけの線は、使わない */
.xdraft-state { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; line-height: 1.9; padding: 0 9px 0 7px; border-radius: 4px; white-space: nowrap; }
.xdraft-state i { font-size: 14px; }
.xdraft-state-draft { background: #EEF1F5; color: var(--ink); }
.xdraft-state-ready { color: var(--accent-text); box-shadow: inset 0 0 0 1.5px var(--accent-text); }
.xdraft-state-posting { color: var(--muted); box-shadow: inset 0 0 0 1.5px #8793A6; }
.xdraft-state-posted { background: var(--ink); color: #fff; }
.xdraft-state-failed { background: #C2331F; color: #fff; }
.xdraft-state-unknown { color: #A12A19; box-shadow: inset 0 0 0 1.5px #C2331F; }

/* 一覧 */
.xdraft-list .admin-compact .col-xdstate { width: 116px; }
.xdraft-list .admin-compact .col-xdmedia { width: 112px; }
.xdraft-list .admin-compact .col-xddate { width: 176px; }
.xdraft-list .admin-compact .col-xdlink { width: 120px; }
.xdraft-list .cell-title > a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.xdraft-media, .xdraft-out { display: inline-flex; align-items: center; gap: 5px; }
.xdraft-media i, .xdraft-out i { font-size: 15px; }
.xdraft-media i { color: var(--muted); }
.xdraft-list .form-note { margin: 0 0 14px; }
.xdraft-list .form-note a { font-weight: 700; }
@media (max-width: 760px) {
  /* 1件ずつの段：上に本文の頭、次の行に 状態／付けたもの／X の投稿、その下に日時 */
  .xdraft-list .cell-title > a { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; white-space: normal; }
  .xdraft-list .admin-compact tr { grid-template-columns: 116px minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
}

/* 作る、直す画面。左に入れる欄、右に「X での見え方」と状態（.article-cols の 320px の列） */
/* 右の列は、左の2つ（入れる欄、記録）の高さにまたがる。1列になる幅（1100px 以下）では、入れる欄、見え方と状態、記録の順 */
.xdraft-side { position: static; grid-row: span 2; max-width: 560px; }
.xdraft-cols .article-delete { margin: 0; }
.xdraft-text { min-height: 220px; }
.xdraft-text:disabled, .xdraft-url:disabled { background: #F5F6F8; color: var(--ink); -webkit-text-fill-color: currentColor; opacity: 1; }
/* 本文の下：左に数え方、右に残りの数 */
.xdraft-count { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap; }
.xdraft-count .help { margin: 0; flex: 1 1 260px; }
.xdraft-left { display: inline-flex; align-items: baseline; gap: 6px; margin-left: auto; font-size: 13px; color: var(--muted); white-space: nowrap; }
.xdraft-left strong { font-size: 18px; line-height: 1.4; color: var(--ink); font-variant-numeric: tabular-nums; }
.xdraft-left i { display: none; font-size: 16px; align-self: center; }
.xdraft-left.is-over, .xdraft-left.is-over strong { color: #A12A19; }
.xdraft-left.is-over i { display: inline; }
/* 動画か、画像か、付けないか */
.xdraft-kind { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.xdraft-file { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; font-size: 14px; }
.xdraft-file > i { font-size: 20px; color: var(--muted); }
.xdraft-file-name { flex: 1; min-width: 0; overflow-wrap: anywhere; font-weight: 700; }
.xdraft-file-name span { display: block; font-size: 13px; font-weight: 400; color: var(--muted); }
.xdraft-thumbs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.xdraft-thumbs li { display: grid; gap: 6px; justify-items: start; min-width: 0; }
.xdraft-thumbs img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border: 1px solid var(--line); border-radius: 4px; background: #E9EDF2; }
@media (max-width: 760px) { .xdraft-thumbs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* X での見え方。X のロゴ、色、反応のボタンは、まねない。白い箱に、アイコン、名前、本文、動画か画像だけ */
.xdraft-look { display: grid; gap: 8px; min-width: 0; }
.xdraft-look h2 { margin: 0; padding: 0; border: 0; font-size: 15px; }
.xdraft-look .help { margin: 0; }
.xdraft-preview { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 0 10px; padding: 14px 16px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
.xdraft-preview-icon { width: 40px; height: 40px; border-radius: 50%; display: block; }
.xdraft-preview-who { display: flex; flex-wrap: wrap; gap: 0 6px; margin: 0; font-size: 14px; line-height: 1.5; }
.xdraft-preview-who span { color: var(--muted); }
.xdraft-preview-text { margin: 2px 0 0; font-size: 15px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.xdraft-preview-text .is-url { color: var(--accent-text); }
.xdraft-preview-text.is-empty { color: #A3ACBA; }
.xdraft-preview-media { margin-top: 10px; display: grid; gap: 2px; aspect-ratio: 16 / 9; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #E9EDF2; }
.xdraft-preview-media img, .xdraft-preview-media video { display: block; width: 100%; height: 100%; min-height: 0; object-fit: cover; }
.xdraft-preview-media[data-count="2"], .xdraft-preview-media[data-count="3"], .xdraft-preview-media[data-count="4"] { grid-template-columns: 1fr 1fr; }
.xdraft-preview-media[data-count="3"], .xdraft-preview-media[data-count="4"] { grid-template-rows: 1fr 1fr; }
.xdraft-preview-media[data-count="3"] > :first-child { grid-row: 1 / 3; }

/* 状態の箱（右の列）。上から、状態の札、説明、ボタン。押せないボタンは、灰色の面にして、すぐ下に理由を書く */
.xdraft-status .article-status { flex-wrap: wrap; gap: 4px 10px; font-size: 13px; }
.xdraft-status .article-status span { white-space: nowrap; }
.xdraft-status-text { margin: 0; font-size: 14px; line-height: 1.75; }
.xdraft-status .article-actions .button:disabled { background: #E4E9F0; border-color: #E4E9F0; color: var(--muted); cursor: default; filter: none; }
.xdraft-status .article-actions + .help, .xdraft-status .article-actions .help { margin: 0; }
.xdraft-status .form-note, .xdraft-status .form-error { margin: 0; font-size: 13px; }
.xdraft-status .form-error { align-items: flex-start; }
.xdraft-status .form-error strong { display: block; }
/* 要確認：2つの道を、細い灰色の線で分ける。URL の欄とボタンは横に並べ、説明は、並びの下 */
.xdraft-resolve { display: grid; gap: 10px; margin: 0; padding-top: 16px; border-top: 1px solid var(--line); }
.xdraft-resolve h3 { margin: 0; font-size: 14px; }
.xdraft-resolve .help { margin: 0; }
.xdraft-resolve .button { justify-self: start; }
/* 白いボタンの枠。.form .button の border: 0 に負けないように、ここで付ける */
.xdraft-file .button-sub, .xdraft-thumbs .button-sub, .xdraft-resolve .button-sub { border: 1px solid #8793A6; }
.xdraft-posted-url { margin: 0; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }

/* 確かめの画面（「X に投稿する」を押したあと。もう一度押して、送る） */
.xdraft-confirm { max-width: 560px; }
.xdraft-facts { margin: 0; display: grid; grid-template-columns: 7em minmax(0, 1fr); gap: 8px 16px; font-size: 14px; }
.xdraft-facts dt { color: var(--muted); font-weight: 700; }
.xdraft-facts dd { margin: 0; }
.xdraft-warn { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 12px 14px; border: 1px solid #C2331F; border-radius: 6px; background: var(--surface); color: #A12A19; font-size: 14px; }
.xdraft-warn i { font-size: 18px; margin-top: 3px; }
.xdraft-warn strong { display: block; font-size: 15px; }
.xdraft-confirm .form-actions { flex-wrap: wrap; }

/* 記録（いつ、誰が、何をしたか）。新しいものが上 */
.xdraft-log { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.xdraft-log li { display: grid; grid-template-columns: 148px minmax(0, 1fr); gap: 0 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.xdraft-log li:first-child { padding-top: 0; }
.xdraft-log li:last-child { padding-bottom: 0; border-bottom: 0; }
.xdraft-log time { font-size: 13px; line-height: 1.95; color: var(--muted); font-variant-numeric: tabular-nums; }
.xdraft-log-what { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; font-weight: 700; }
.xdraft-log-what i { font-size: 15px; color: var(--muted); }
.xdraft-log-what span { font-weight: 400; color: var(--muted); font-size: 13px; }
.xdraft-log-note { margin: 0; grid-column: 2; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
@media (max-width: 760px) { .xdraft-log li { grid-template-columns: minmax(0, 1fr); } .xdraft-log-note { grid-column: 1; } }

/* 続きの投稿（もとの投稿への返信を1つ。specs/x-post.md の 5a）。2026-11-21 に足した（見本の patch には、ない） */
/* 欄：もとの本文より、低くする */
.xdraft-reply-text { min-height: 132px; } /* 補助金の続きの投稿（4行）が、動かさずに全部見える高さ */
/* 見え方：もとの投稿の下に、同じ箱の中で、細い灰色の線でつないで出す（線は、アイコンの下から、次のアイコンの上まで。色つきの線は、使わない） */
.xdraft-preview-icon { grid-area: 1 / 1; }
.xdraft-preview-main { grid-area: 1 / 2; min-width: 0; }
.xdraft-preview-line { grid-area: 1 / 1; justify-self: center; width: 2px; margin: 44px 0 -8px; border-radius: 1px; background: var(--line); }
.xdraft-preview-reply-icon { grid-area: 2 / 1; margin-top: 12px; }
.xdraft-preview-reply { grid-area: 2 / 2; min-width: 0; margin-top: 12px; }
/* 一覧：続きの投稿があることの印（言葉つき） */
.xdraft-reply-mark { display: flex; align-items: center; gap: 4px; margin-top: 2px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.xdraft-reply-mark i { font-size: 13px; }
/* 補助金管理から作った下書きの印（一覧の本文の下と、編集の画面の見出しの下）。補助金名は、長いと折り返す */
.xdraft-source { display: flex; align-items: flex-start; gap: 4px; margin: 2px 0 0; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.xdraft-source i { font-size: 13px; margin-top: 3px; flex: none; }
/* 一覧では、1行に収める（長い補助金名は「…」で切る） */
.xdraft-list .xdraft-source > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xdraft-source-head { margin: 0 0 16px; font-size: 13px; }
.xdraft-source-head i { font-size: 15px; margin-top: 3px; }
/* 状態の箱の中の、続きの投稿の結果。フォームのボタンは、左に寄せる */
.xdraft-resolve > form:not(.xdraft-resolve) { margin: 0; }
.xdraft-resolve > .button { justify-self: start; }
.xdraft-resolve .article-status { font-size: 13px; }
/* 小さいボタン（「投稿済みにする」「出ていた」「出ていなかった」「続きの投稿を、もう一度送る」「外す」など）は、タブレットとスマホで、指で押せる高さにする（補助金の .x-post-button と同じ考え） */
@media (max-width: 1000px) {
  .xdraft-status .button-small, .xdraft-file .button-small, .xdraft-thumbs .button-small { min-height: 40px; }
}
