/* ============================================================
   AISAKU資料室 共通スタイルシート
   - 白基調 + グリーン #1FD27B アクセント
   - 本文 16px / 行間 1.9 / 最大幅 720px
   - JS 不使用（WordPress 組込時の事故防止）
   - WP 移行時はテーマの style.css か「追加 CSS」へ移植
   ============================================================ */

:root {
  --accent: #1FD27B;
  --accent-dark: #14A862;
  --accent-pale: #E9FBF2;
  --text: #2b2b2b;
  --text-sub: #6b7280;
  --border: #e5e7eb;
  --bg-soft: #f7faf8;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
  font-size: 1rem;
  line-height: 1.9;
  color: var(--text);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent);
}

/* ---------- レイアウト ---------- */

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- ヘッダー ---------- */

.site-header {
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}

.site-header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.site-logo {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.site-logo a {
  color: var(--text);
  text-decoration: none;
}

.site-logo .logo-accent {
  color: var(--accent-dark);
}

.site-logo .logo-kari {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-sub);
}

.site-nav a {
  font-size: 0.875rem;
  color: var(--text-sub);
  text-decoration: none;
  margin-left: 16px;
}

.site-nav a:hover {
  color: var(--accent-dark);
}

.site-tagline {
  width: 100%;
  font-size: 0.8125rem;
  color: var(--text-sub);
}

/* ---------- スキップリンク ---------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 10000;
  background: var(--accent);
  color: #fff;
  padding: 8px 16px;
  font-size: 0.875rem;
  text-decoration: none;
  border-radius: 0 0 6px 0;
}

.skip-link:focus {
  position: fixed;
  left: 0;
  top: 0;
  width: auto;
  height: auto;
}

/* ---------- パンくず ---------- */

.breadcrumb {
  font-size: 0.8125rem;
  color: var(--text-sub);
  margin: 20px 0 0;
}

.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

.breadcrumb li::after {
  content: ">";
  margin: 0 0.5em;
}

.breadcrumb li:last-child::after {
  content: none;
}

.breadcrumb a {
  color: var(--text-sub);
}

/* ---------- 見出し・記事本文 ---------- */

.article-header {
  margin: 32px 0 40px;
}

.article-header h1 {
  font-size: clamp(1.375rem, 4vw + 0.5rem, 1.75rem);
  line-height: 1.5;
  margin: 12px 0;
}

.article-meta {
  font-size: 0.8125rem;
  color: var(--text-sub);
}

.category-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-dark);
  background: var(--accent-pale);
  border-radius: 999px;
  padding: 2px 12px;
  text-decoration: none;
}

.article-body h2 {
  font-size: clamp(1.125rem, 2vw + 0.5rem, 1.375rem);
  line-height: 1.5;
  margin: 56px 0 20px;
  padding: 8px 0 8px 14px;
  border-left: 5px solid var(--accent);
  border-bottom: 1px solid var(--border);
}

.article-body h3 {
  font-size: 1.125rem;
  line-height: 1.5;
  margin: 36px 0 14px;
  padding-left: 12px;
  border-left: 3px solid var(--accent);
}

.article-body p {
  margin: 0 0 22px;
}

.article-body ul,
.article-body ol {
  margin: 0 0 22px;
  padding-left: 1.6em;
}

.article-body li {
  margin-bottom: 6px;
}

.article-body strong {
  background: linear-gradient(transparent 68%, var(--accent-pale) 68%);
}

.lead {
  color: var(--text);
}

/* 補足・注意ボックス */
.note {
  font-size: 0.875rem;
  color: var(--text-sub);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 18px;
  margin: 0 0 22px;
}

/* ---------- 記事内の図版・引用 ---------- */

.article-figure,
.quote-figure {
  margin: 0 0 24px;
}

.article-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.article-body figcaption {
  font-size: clamp(0.8125rem, 0.6vw + 0.7rem, 0.875rem);
  line-height: 1.7;
  color: var(--text-sub);
  margin-top: 8px;
}

.article-body blockquote {
  margin: 0 0 8px;
  padding: 16px 20px;
  border-left: 4px solid var(--accent);
  background: var(--bg-soft);
  border-radius: 0 8px 8px 0;
}

.article-body blockquote p {
  margin: 0;
  font-size: 0.9375rem;
}

/* ---------- テーブル ---------- */

.table-wrap {
  overflow-x: auto;
  margin: 0 0 22px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

/* キーボード操作で横スクロールできるようにした際のフォーカス表示 */
.table-wrap:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

table caption {
  caption-side: top;
  text-align: left;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-sub);
  padding: 10px 12px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 640px;
  font-size: 0.875rem;
  line-height: 1.6;
}

th, td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

thead th {
  background: var(--accent-pale);
  color: var(--text);
  font-weight: 700;
  white-space: nowrap;
}

tbody th {
  background: var(--bg-soft);
  font-weight: 700;
  white-space: nowrap;
}

.table-caption {
  font-size: 0.8125rem;
  color: var(--text-sub);
  margin: -14px 0 22px;
}

/* ---------- FAQ ---------- */

.faq-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px 20px;
  margin-bottom: 14px;
}

.faq-item h3 {
  border-left: none;
  padding-left: 0;
  margin: 0 0 8px;
  font-size: 1rem;
}

.faq-item h3::before {
  content: "Q. ";
  color: var(--accent-dark);
  font-weight: 700;
}

.faq-item p {
  margin: 0;
  font-size: 0.9375rem;
}

.faq-item p::before {
  content: "A. ";
  color: var(--accent-dark);
  font-weight: 700;
}

/* ---------- 出典 ---------- */

.sources {
  font-size: 0.8125rem;
  color: var(--text-sub);
  background: var(--bg-soft);
  border-radius: 8px;
  padding: 18px 22px;
  margin: 40px 0;
}

.sources h2 {
  font-size: 1rem;
  border: none;
  padding: 0;
  margin: 0 0 10px;
}

.sources ul {
  padding-left: 1.4em;
  margin: 0;
}

.sources li {
  margin-bottom: 4px;
  overflow-wrap: anywhere;
}

/* ---------- CTA ---------- */

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  border-radius: 999px;
  padding: 12px 28px;
  font-size: 0.9375rem;
}

.btn:hover {
  background: var(--accent-dark);
  color: #fff;
}

.btn-outline {
  background: #fff;
  color: var(--accent-dark);
  border: 2px solid var(--accent);
}

.btn-outline:hover {
  background: var(--accent-pale);
  color: var(--accent-dark);
}

/* 記事別 CTA（ホワイトペーパー DL / 資料請求など） */
.cta-box {
  border: 2px solid var(--accent);
  border-radius: 12px;
  padding: 26px 28px;
  margin: 48px 0 24px;
  text-align: center;
  background: #fff;
}

.cta-box .cta-heading {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.cta-box p {
  font-size: 0.9375rem;
  margin-bottom: 16px;
}

/* 全記事共通 CTA（AISAKU 紹介） */
.cta-aisaku {
  background: var(--accent-pale);
  border-radius: 12px;
  padding: 30px 28px;
  margin: 24px 0 48px;
}

.cta-aisaku .cta-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-dark);
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.cta-aisaku .cta-title {
  font-size: 1.25rem;
  line-height: 1.5;
  margin-bottom: 12px;
}

.cta-aisaku p {
  font-size: 0.9375rem;
  margin-bottom: 18px;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.cta-free-tools {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.cta-free-lead {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-secondary, #555);
  margin-bottom: 10px;
}

.cta-free-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.cta-free-list li a {
  display: inline-block;
  font-size: 0.8125rem;
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--accent-dark);
  text-decoration: none;
  transition: background 0.15s;
}

.cta-free-list li a:hover {
  background: var(--accent);
  color: #fff;
}

/* ---------- トップページ ---------- */

.hero {
  padding: 48px 0 8px;
}

.hero h1 {
  font-size: 1.875rem;
  line-height: 1.5;
  margin-bottom: 12px;
}

.hero p {
  color: var(--text-sub);
  font-size: 0.9375rem;
}

.section-title {
  font-size: 1.25rem;
  margin: 48px 0 18px;
  padding-left: 14px;
  border-left: 5px solid var(--accent);
}

.category-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  list-style: none;
  padding: 0;
}

.category-list li {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  background: #fff;
}

.category-list .cat-name {
  display: block;
  font-weight: 700;
  margin-bottom: 4px;
}

.category-list .cat-desc {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-sub);
}

.category-list .cat-coming {
  font-size: 0.75rem;
  color: var(--text-sub);
  font-weight: 400;
}

.article-card {
  display: block;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 22px;
  margin-bottom: 14px;
  text-decoration: none;
  color: var(--text);
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.article-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 10px rgba(31, 210, 123, 0.18);
  color: var(--text);
}

.article-card .card-meta {
  font-size: 0.75rem;
  color: var(--text-sub);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.article-card .card-title {
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.6;
  margin-bottom: 6px;
}

.article-card .card-excerpt {
  font-size: 0.875rem;
  color: var(--text-sub);
  line-height: 1.7;
}

/* ---------- フッター ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 64px;
  padding: 28px 0 40px;
  font-size: 0.8125rem;
  color: var(--text-sub);
}

.site-footer a {
  color: var(--text-sub);
}

.site-footer .footer-links {
  margin-bottom: 10px;
}

.site-footer .footer-links a {
  margin-right: 16px;
}

/* ============================================================
   AISAKU資料室 キーデザイン共通コンポーネント(2026-07-04 追加)
   1. ロゴマーク(フォルダタブ) 2. 持ち帰りボックス
   3. 司書・広瀬(吹き出し/CTA/フッター署名) — 全ページで使用
   ============================================================ */

/* ---------- ロゴマーク(フォルダタブ = 資料室モチーフ) ---------- */

.logo-mark {
  display: inline-block;
  position: relative;
  width: 1em;
  height: 0.78em;
  background: var(--accent);
  border-radius: 2px 3px 3px 3px;
  margin-right: 7px;
  vertical-align: -1px;
}

.logo-mark::before {
  content: "";
  position: absolute;
  top: -0.17em;
  left: 0;
  width: 46%;
  height: 0.2em;
  background: var(--accent);
  border-radius: 2px 2px 0 0;
}

/* ---------- 「この記事の持ち帰り」ボックス(全記事冒頭の看板要素) ---------- */

.takeaway-box {
  position: relative;
  border: 2px dashed var(--accent);
  border-radius: 0 10px 10px 10px;
  background: #fff;
  padding: 16px 20px;
  margin: 54px 0 36px;
}

/* 切り取り線のハサミ(2026-07-04 採用決定) */
.takeaway-box::after {
  content: "✂";
  position: absolute;
  top: -14px;
  right: 18px;
  background: #fff;
  padding: 0 6px;
  color: var(--accent-dark);
  font-size: 1.125rem;
  line-height: 1;
}

.takeaway-box.coming::after {
  color: var(--text-sub);
}

.takeaway-box::before {
  content: "この記事の持ち帰り";
  position: absolute;
  bottom: 100%;
  left: -2px;
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  padding: 7px 16px;
  border-radius: 8px 8px 0 0;
}

.takeaway-box.coming {
  border-color: var(--border);
}

.takeaway-box.coming::before {
  background: var(--text-sub);
}

.tw-item {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.tw-doc {
  flex: none;
  width: 34px;
  height: 44px;
  border: 1px solid var(--border);
  border-top: 4px solid var(--accent);
  border-radius: 3px;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0 6px,
    var(--bg-soft) 6px 10px
  );
}

.takeaway-box.coming .tw-doc {
  border-top-color: var(--border);
  opacity: 0.7;
}

.tw-main {
  flex: 1;
  min-width: 220px;
}

.tw-name {
  display: block;
  font-weight: 700;
  font-size: 0.9375rem;
  line-height: 1.6;
}

.tw-spec {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-sub);
  line-height: 1.7;
}

/* 小型ダウンロードピル(資料ライブラリ・持ち帰りボックス共用) */
.shiryo-dl {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border-radius: 999px;
  padding: 6px 18px;
  text-decoration: none;
}

.shiryo-dl:hover {
  background: var(--accent-dark);
  color: #fff;
}

.shiryo-dl.disabled {
  background: var(--bg-soft);
  color: var(--text-sub);
  border: 1px solid var(--border);
  pointer-events: none;
}

/* ---------- 司書・広瀬(アイコン+吹き出し) ---------- */

.librarian {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin: 40px 0 8px;
}

.librarian img {
  flex: none;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 2.5px solid var(--accent);
  background: #fff;
  object-fit: cover;
}

.librarian .bubble {
  position: relative;
  max-width: 460px;
  background: var(--accent-pale);
  border-radius: 12px;
  padding: 9px 14px;
  font-size: 0.8125rem;
  line-height: 1.7;
  color: var(--text);
  margin: 0;
}

.librarian .bubble::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 50%;
  width: 12px;
  height: 12px;
  background: var(--accent-pale);
  transform: translateY(-50%) rotate(45deg);
}

.librarian .bubble .bubble-name {
  display: block;
  font-weight: 700;
  color: var(--accent-dark);
  font-size: 0.6875rem;
  margin-bottom: 1px;
}

/* CTA内の広瀬 */
.cta-flex {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.cta-flex .cta-body {
  flex: 1;
  min-width: 0;
}

.cta-flex > img {
  flex: none;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 3px solid #fff;
  background: #fff;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(20, 168, 98, 0.25);
}

/* ---------- 固定司書ウィジェット(全ページ右下常駐・JS不使用) ----------
   <details>のCSSのみで開閉。スクロール位置に関係なく広瀬が常に居る =
   「AI社員がいつも隣に居る」体験のデモを兼ねる記憶装置 */

.hirose-fab {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 100;
  animation: fab-in 0.5s ease-out 0.8s both;
}

.hirose-fab summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  animation: fab-nod 9s ease-in-out 4s infinite;
}

.hirose-fab summary::-webkit-details-marker {
  display: none;
}

.hirose-fab .fab-label {
  white-space: nowrap;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-dark);
  padding: 7px 22px 7px 16px;
  margin-right: -14px;
  box-shadow: 0 4px 14px rgba(43, 43, 43, 0.14);
}

.hirose-fab summary img {
  position: relative;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  border: 3px solid var(--accent);
  background: #fff;
  object-fit: cover;
  box-shadow: 0 6px 18px rgba(43, 43, 43, 0.22);
  transition: transform 0.15s ease;
}

.hirose-fab summary:hover img {
  transform: scale(1.06);
}

.hirose-fab[open] .fab-label {
  display: none;
}

.hirose-fab .fab-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);
  width: 264px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(43, 43, 43, 0.2);
  padding: 16px;
}

.fab-panel .fab-hello {
  font-size: 0.8125rem;
  line-height: 1.7;
  margin: 0 0 12px;
}

.fab-panel .fab-hello .bubble-name {
  display: block;
  font-weight: 700;
  color: var(--accent-dark);
  font-size: 0.6875rem;
  margin-bottom: 1px;
}

.fab-panel .shiryo-dl {
  display: block;
  text-align: center;
  margin-bottom: 10px;
}

.fab-panel .fab-sub {
  display: block;
  text-align: center;
  font-size: 0.75rem;
}

/* チャットボット版パネル(Dify iframe埋め込み用。手順: dify-librarian/README-dify-setup.md) */
.fab-panel-chat {
  width: min(370px, calc(100vw - 32px));
  height: min(540px, calc(100vh - 120px));
  padding: 0;
  overflow: hidden;
}

.fab-panel-chat iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

@keyframes fab-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* 9秒に一度、小さくおじぎ */
@keyframes fab-nod {
  0%, 92%, 100% {
    transform: none;
  }
  94% {
    transform: translateY(3px) rotate(-2deg);
  }
  97% {
    transform: translateY(0) rotate(1.5deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hirose-fab,
  .hirose-fab summary {
    animation: none;
  }
}

@media print {
  .hirose-fab {
    display: none;
  }
}

/* ---------- オープニング「ひょっこり広瀬」(2026-07-04 採用・全ページ) ----------
   ページを開くと、フォルダの後ろから司書・広瀬がひょっこり現れ、
   フタが開いて紙(記事)を差し出し、本文へフェードする約1.5秒。
   CSSのみ・本文の読み込みをブロックしない。毎回表示(セッション初回のみに
   する場合は sessionStorage のJS1行が必要 → HANDOVER参照) */

.folder-splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  pointer-events: none;
  animation: splash-out 0.4s ease 1.15s forwards;
}

.fs-stage {
  position: relative;
  width: 160px;
  height: 172px;
}

/* 広瀬: フォルダの後ろからひょっこり(clip用ラッパー) */
.fs-peek {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 74px;
  height: 100px;
  overflow: hidden;
  z-index: 1;
}

.fs-peek img {
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 104px;
  height: 104px;
  object-fit: cover;
  transform: translateX(-50%) translateY(108%);
  animation: fs-peek-up 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.12s forwards;
}

.fs-folder {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 112px;
  height: 74px;
  perspective: 420px;
  z-index: 2;
}

.fs-back {
  position: absolute;
  inset: 0;
  background: var(--accent-dark);
  border-radius: 6px 10px 10px 10px;
}

.fs-back::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 0;
  width: 42%;
  height: 14px;
  background: var(--accent-dark);
  border-radius: 6px 6px 0 0;
}

.fs-paper {
  position: absolute;
  left: 13px;
  right: 13px;
  top: 5px;
  bottom: 8px;
  background: #fff;
  border: 1px solid var(--border);
  border-top: 5px solid var(--accent);
  border-radius: 3px;
  transform: translateY(18px);
  animation: fs-paper-up 0.45s ease-out 0.6s forwards;
}

.fs-front {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 64%;
  background: var(--accent);
  border-radius: 4px 10px 10px 10px;
  transform-origin: bottom;
  animation: fs-flap-open 0.45s ease-in-out 0.55s forwards;
}

.fs-name {
  font-size: 1.1875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin: 0;
}

.fs-name b {
  color: var(--accent-dark);
}

@keyframes fs-peek-up {
  to { transform: translateX(-50%) translateY(6%); }
}

@keyframes fs-flap-open {
  to { transform: rotateX(-78deg); }
}

@keyframes fs-paper-up {
  to { transform: translateY(-26px); }
}

@keyframes splash-out {
  to { opacity: 0; visibility: hidden; }
}

@media (prefers-reduced-motion: reduce) {
  .folder-splash {
    display: none;
  }
}

/* フッターの署名 */
.footer-byline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.footer-byline img {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  background: #fff;
}

/* ---------- レスポンシブ ---------- */

@media (max-width: 560px) {
  .cta-flex {
    gap: 14px;
  }

  .cta-flex > img {
    width: 56px;
    height: 56px;
  }

  .article-header h1 {
    font-size: 1.4375rem;
  }

  .hero h1 {
    font-size: 1.5rem;
  }

  .category-list {
    grid-template-columns: 1fr;
  }

  .cta-actions .btn {
    width: 100%;
    text-align: center;
  }
}


/* ========== AISAKUマガジン拡張(OFFICE演出+2カラム+サイドバー等) ========== */

/* ===== 試作B: 「AISAKU OFFICE」世界観(2026-07-04) =====
   ①稼働ログティッカー ②オフィス線画背景 ③スキャン光エフェクト+Workingバッジ
   全てCSSのみ。採用時: ティッカー=ヘッダーテンプレ/背景・スキャン=フッターテンプレ、CSSはstyle.cssへ移設 */

/* 背景レイヤーを見せるため body を透過 */
html { background: #fff; }
body { background: transparent; }

/* --- ① AI社員 稼働ログティッカー(常時ゆっくり右→左) --- */
.aisaku-ticker {
  position: sticky; top: 0; z-index: 60;
  overflow: hidden; background: var(--accent-pale);
  border-bottom: 1px solid #d7f0e2;
}
.aisaku-ticker .tk-track {
  display: inline-flex; white-space: nowrap;
  animation: tickerMove 34s linear infinite;
}
.aisaku-ticker .tk-seq {
  display: inline-block; padding: 8px 0;
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.75rem; letter-spacing: 0.06em; color: var(--accent-dark);
}
.aisaku-ticker .tk-seq span { padding-right: 2.6em; }
.aisaku-ticker .tk-seq .tk-jp { color: #6b7280; }
@keyframes tickerMove { to { transform: translateX(-50%); } }

/* --- ② オフィス線画背景(薄さは白オーバーレイで約6〜8%に調整) --- */
.office-bg {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.90), rgba(255,255,255,0.94)),
    url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201440%20620%22%20fill%3D%22none%22%20stroke%3D%22%233aa876%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%0A%3Cline%20x1%3D%220%22%20y1%3D%22575%22%20x2%3D%221440%22%20y2%3D%22575%22%2F%3E%0A%3Crect%20x%3D%2270%22%20y%3D%2270%22%20width%3D%22260%22%20height%3D%22320%22%20rx%3D%224%22%2F%3E%0A%3Cline%20x1%3D%22200%22%20y1%3D%2270%22%20x2%3D%22200%22%20y2%3D%22390%22%2F%3E%0A%3Cline%20x1%3D%2270%22%20y1%3D%22230%22%20x2%3D%22330%22%20y2%3D%22230%22%2F%3E%0A%3Cline%20x1%3D%2258%22%20y1%3D%22396%22%20x2%3D%22342%22%20y2%3D%22396%22%2F%3E%0A%3Cpath%20d%3D%22M415%2C520%20C415%2C470%20400%2C450%20385%2C433%22%2F%3E%0A%3Cpath%20d%3D%22M415%2C520%20C415%2C460%20432%2C443%20450%2C427%22%2F%3E%0A%3Cpath%20d%3D%22M415%2C520%20C414%2C480%20415%2C455%20415%2C428%22%2F%3E%0A%3Ccircle%20cx%3D%22383%22%20cy%3D%22429%22%20r%3D%225%22%2F%3E%0A%3Ccircle%20cx%3D%22452%22%20cy%3D%22423%22%20r%3D%225%22%2F%3E%0A%3Ccircle%20cx%3D%22415%22%20cy%3D%22424%22%20r%3D%225%22%2F%3E%0A%3Cpath%20d%3D%22M388%2C520%20L442%2C520%20L436%2C575%20L394%2C575%20Z%22%2F%3E%0A%3Crect%20x%3D%22400%22%20y%3D%22140%22%20width%3D%2272%22%20height%3D%2256%22%20rx%3D%223%22%2F%3E%0A%3Cpath%20d%3D%22M408%2C182%20L428%2C158%20L444%2C172%20L462%2C150%22%2F%3E%0A%3Crect%20x%3D%22520%22%20y%3D%2295%22%20width%3D%22280%22%20height%3D%22205%22%20rx%3D%226%22%2F%3E%0A%3Cline%20x1%3D%22560%22%20y1%3D%22300%22%20x2%3D%22542%22%20y2%3D%22575%22%2F%3E%0A%3Cline%20x1%3D%22760%22%20y1%3D%22300%22%20x2%3D%22778%22%20y2%3D%22575%22%2F%3E%0A%3Cline%20x1%3D%22551%22%20y1%3D%22440%22%20x2%3D%22769%22%20y2%3D%22440%22%2F%3E%0A%3Cline%20x1%3D%22555%22%20y1%3D%22140%22%20x2%3D%22680%22%20y2%3D%22140%22%2F%3E%0A%3Cline%20x1%3D%22555%22%20y1%3D%22172%22%20x2%3D%22762%22%20y2%3D%22172%22%2F%3E%0A%3Cpath%20d%3D%22M560%2C262%20L602%2C226%20L642%2C246%20L692%2C206%20L742%2C232%22%2F%3E%0A%3Crect%20x%3D%22850%22%20y%3D%22150%22%20width%3D%22180%22%20height%3D%22425%22%2F%3E%0A%3Cline%20x1%3D%22850%22%20y1%3D%22290%22%20x2%3D%221030%22%20y2%3D%22290%22%2F%3E%0A%3Cline%20x1%3D%22850%22%20y1%3D%22430%22%20x2%3D%221030%22%20y2%3D%22430%22%2F%3E%0A%3Cline%20x1%3D%22872%22%20y1%3D%22200%22%20x2%3D%22872%22%20y2%3D%22288%22%2F%3E%0A%3Cline%20x1%3D%22888%22%20y1%3D%22210%22%20x2%3D%22888%22%20y2%3D%22288%22%2F%3E%0A%3Cline%20x1%3D%22904%22%20y1%3D%22196%22%20x2%3D%22904%22%20y2%3D%22288%22%2F%3E%0A%3Cline%20x1%3D%22920%22%20y1%3D%22214%22%20x2%3D%22920%22%20y2%3D%22288%22%2F%3E%0A%3Cline%20x1%3D%22936%22%20y1%3D%22206%22%20x2%3D%22936%22%20y2%3D%22288%22%2F%3E%0A%3Cline%20x1%3D%22952%22%20y1%3D%22288%22%20x2%3D%22982%22%20y2%3D%22204%22%2F%3E%0A%3Cpath%20d%3D%22M866%2C428%20L866%2C364%20L886%2C364%20L890%2C372%20L926%2C372%20L926%2C428%20Z%22%2F%3E%0A%3Cpath%20d%3D%22M940%2C428%20L940%2C376%20L958%2C376%20L962%2C383%20L994%2C383%20L994%2C428%20Z%22%2F%3E%0A%3Crect%20x%3D%22872%22%20y%3D%22480%22%20width%3D%2280%22%20height%3D%2295%22%2F%3E%0A%3Cline%20x1%3D%22872%22%20y1%3D%22512%22%20x2%3D%22952%22%20y2%3D%22512%22%2F%3E%0A%3Ccircle%20cx%3D%221120%22%20cy%3D%22110%22%20r%3D%2234%22%2F%3E%0A%3Cline%20x1%3D%221120%22%20y1%3D%22110%22%20x2%3D%221120%22%20y2%3D%2288%22%2F%3E%0A%3Cline%20x1%3D%221120%22%20y1%3D%22110%22%20x2%3D%221137%22%20y2%3D%22117%22%2F%3E%0A%3Crect%20x%3D%221100%22%20y%3D%22438%22%20width%3D%22320%22%20height%3D%2210%22%20rx%3D%223%22%2F%3E%0A%3Cline%20x1%3D%221115%22%20y1%3D%22448%22%20x2%3D%221115%22%20y2%3D%22575%22%2F%3E%0A%3Cline%20x1%3D%221405%22%20y1%3D%22448%22%20x2%3D%221405%22%20y2%3D%22575%22%2F%3E%0A%3Crect%20x%3D%221210%22%20y%3D%22320%22%20width%3D%22130%22%20height%3D%2286%22%20rx%3D%226%22%2F%3E%0A%3Cline%20x1%3D%221275%22%20y1%3D%22406%22%20x2%3D%221275%22%20y2%3D%22430%22%2F%3E%0A%3Cline%20x1%3D%221245%22%20y1%3D%22432%22%20x2%3D%221305%22%20y2%3D%22432%22%2F%3E%0A%3Crect%20x%3D%221140%22%20y%3D%22422%22%20width%3D%2292%22%20height%3D%2212%22%20rx%3D%223%22%2F%3E%0A%3Crect%20x%3D%221362%22%20y%3D%22406%22%20width%3D%2224%22%20height%3D%2228%22%20rx%3D%224%22%2F%3E%0A%3Cpath%20d%3D%22M1386%2C412%20C1398%2C412%201398%2C428%201386%2C428%22%2F%3E%0A%3Crect%20x%3D%221040%22%20y%3D%22360%22%20width%3D%2270%22%20height%3D%2288%22%20rx%3D%2214%22%2F%3E%0A%3Crect%20x%3D%221030%22%20y%3D%22458%22%20width%3D%2290%22%20height%3D%2213%22%20rx%3D%226%22%2F%3E%0A%3Cline%20x1%3D%221075%22%20y1%3D%22471%22%20x2%3D%221075%22%20y2%3D%22518%22%2F%3E%0A%3Cline%20x1%3D%221075%22%20y1%3D%22518%22%20x2%3D%221045%22%20y2%3D%22552%22%2F%3E%0A%3Cline%20x1%3D%221075%22%20y1%3D%22518%22%20x2%3D%221105%22%20y2%3D%22552%22%2F%3E%0A%3Ccircle%20cx%3D%221045%22%20cy%3D%22558%22%20r%3D%225%22%2F%3E%0A%3Ccircle%20cx%3D%221105%22%20cy%3D%22558%22%20r%3D%225%22%2F%3E%0A%3Cline%20x1%3D%22620%22%20y1%3D%220%22%20x2%3D%22620%22%20y2%3D%2246%22%2F%3E%0A%3Cpath%20d%3D%22M600%2C46%20L640%2C46%20L632%2C70%20L608%2C70%20Z%22%2F%3E%0A%3Cline%20x1%3D%221180%22%20y1%3D%220%22%20x2%3D%221180%22%20y2%3D%2240%22%2F%3E%0A%3Cpath%20d%3D%22M1160%2C40%20L1200%2C40%20L1192%2C64%20L1168%2C64%20Z%22%2F%3E%0A%3C%2Fsvg%3E");
  background-size: auto, 1440px auto;
  background-position: 0 0, center bottom;
  background-repeat: no-repeat, repeat-x;
}
@media (max-width: 700px) {
  .office-bg { background-size: auto, 1000px auto; }
}

/* --- ③ 更新スキャン光(7秒に一回、左→右へ薄い緑の帯) --- */
.office-scan {
  position: fixed; top: 0; left: -40%; width: 40%; height: 100%;
  z-index: 90; pointer-events: none;
  background: linear-gradient(90deg, transparent,
    rgba(31, 210, 123, 0.05), rgba(31, 210, 123, 0.10), transparent);
  animation: scanUpdate 7s ease-in-out infinite;
}
@keyframes scanUpdate {
  0%, 65% { transform: translateX(0); opacity: 0; }
  72% { opacity: 1; }
  100% { transform: translateX(350%); opacity: 0; }
}

/* 表は白背景にして線画の透けを防ぐ(可読性優先) */
.table-wrap table { background: #fff; }

/* --- 記事ヘッダーの稼働バッジ --- */
.office-badge {
  display: inline-block; margin-left: 8px; padding: 3px 14px;
  border-radius: 999px; background: var(--accent-pale);
  color: var(--accent-dark); font-size: 0.75rem; font-weight: 700;
  vertical-align: middle;
}
.office-badge .ob-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); margin-right: 7px;
  animation: ob-blink 2.4s ease-in-out infinite;
}
@keyframes ob-blink { 50% { opacity: 0.35; } }

@media (prefers-reduced-motion: reduce) {
  .aisaku-ticker .tk-track { animation: none; }
  .office-scan { display: none; }
  .office-badge .ob-dot { animation: none; }
}
@media print {
  .aisaku-ticker, .office-scan, .office-bg { display: none; }
}

/* === 試作C 追加CSS === */

/* --- タイプライターオープニング --- */
.tw-splash {
  position: fixed; inset: 0; z-index: 9999; background: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; pointer-events: none;
  animation: splash-out 0.4s ease 2.2s forwards;
}
.tw-logo { font-size: 1.1875rem; font-weight: 700; letter-spacing: 0.04em; opacity: 0; animation: fadeUp 0.4s ease 0.1s forwards; }
.tw-logo b { color: var(--accent-dark); }
.tw-type {
  font-size: 1.6rem; font-weight: 800; color: var(--accent-dark); letter-spacing: 0.05em;
  border-right: 3px solid var(--accent); white-space: nowrap;
  width: 0; overflow: hidden;
  animation: typewriter 1.1s steps(10,end) 0.5s forwards, twBlink 0.6s steps(1) 0.5s 5;
}
@keyframes typewriter { to { width: 10em; } }
@keyframes twBlink { 50% { border-color: transparent; } }
.tw-loading {
  display: flex; align-items: baseline; gap: 8px; opacity: 0;
  animation: fadeUp 0.3s ease 1.8s forwards;
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}
.tw-ld-text { font-size: 0.9rem; font-weight: 700; color: var(--accent-dark); letter-spacing: 0.18em; }
.tw-ld-dots { display: inline-flex; gap: 5px; }
.tw-ld-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); opacity: 0.25; animation: ldDot 0.8s ease-in-out infinite; }
.tw-ld-dots i:nth-child(2) { animation-delay: 0.13s; }
.tw-ld-dots i:nth-child(3) { animation-delay: 0.26s; }
@keyframes ldDot { 30% { opacity: 1; transform: translateY(-3px); } }
.tw-status {
  position: relative; height: 1.3em; width: 260px; opacity: 0; animation: fadeUp 0.2s ease 2.0s forwards;
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em;
}
.tw-status span { position: absolute; inset: 0; opacity: 0; display: flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap; }
.tw-status i { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.tw-status .st1 { color: var(--accent-dark); animation: stCyc 0.4s linear 2.0s both; } .tw-status .st1 i { background: var(--accent); }
.tw-status .st2 { color: #b8860b; animation: stCyc 0.4s linear 2.4s both; } .tw-status .st2 i { background: #F0B429; }
.tw-status .st3 { color: #2f6cb3; animation: stLast 0.5s linear 2.8s both; } .tw-status .st3 i { background: #4A90E2; }
@keyframes stCyc { 0%{opacity:0}12%,88%{opacity:1}100%{opacity:0} }
@keyframes stLast { 0%{opacity:0}15%,100%{opacity:1} }
@keyframes fadeUp { from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none} }
@media (prefers-reduced-motion: reduce) { .tw-splash { display: none; } }
@media print { .tw-splash { display: none; } }

/* --- 2カラムレイアウト --- */
.container-wide { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.container-980 { max-width: 980px; }
.container-760 { max-width: 760px; }
.two-col { display: grid; grid-template-columns: 1fr 280px; gap: 36px; align-items: start; }
.col-main { min-width: 0; }
@media (max-width: 860px) {
  .two-col { grid-template-columns: 1fr; }
  .col-side { order: 99; }
}

/* --- サイドバー --- */
.col-side { position: sticky; top: 48px; padding-top: 20px; }
.sb-block { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 16px; margin-bottom: 16px; }
.sb-title { font-size: 0.8125rem; font-weight: 700; color: var(--text); margin-bottom: 10px; display: block; }
.sb-search-wrap { position: relative; }
.sb-search { width: 100%; padding: 8px 34px 8px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 0.8125rem; background: var(--bg-soft); }
.sb-search:focus { outline: 2px solid var(--accent); border-color: transparent; }
.sb-search-icon { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 14px; background: none; border: none; cursor: pointer; padding: 0; }
.sb-toc ol { list-style: none; counter-reset: toc; padding: 0; }
.sb-toc li { counter-increment: toc; }
.sb-toc li::before { content: counter(toc) ". "; color: var(--accent-dark); font-weight: 700; font-size: 0.75rem; }
.sb-toc a { font-size: 0.8125rem; color: var(--text); text-decoration: none; }
.sb-toc a:hover { color: var(--accent-dark); text-decoration: underline; }
.sb-toc li { margin-bottom: 6px; }
.sb-cats { list-style: none; padding: 0; }
.sb-cats li { margin-bottom: 5px; }
.sb-cats a { font-size: 0.8125rem; color: var(--text); text-decoration: none; }
.sb-cats a:hover { color: var(--accent-dark); }
.sb-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.sb-tags a { font-size: 0.6875rem; padding: 3px 10px; border-radius: 999px; background: var(--accent-pale); color: var(--accent-dark); text-decoration: none; font-weight: 600; border: 1px solid transparent; }
.sb-tags a:hover { border-color: var(--accent); }
.sb-banner { padding: 0; overflow: hidden; }
.sb-banner-link { display: block; padding: 20px 16px; background: linear-gradient(135deg, var(--accent), var(--accent-dark)); color: #fff; text-decoration: none; text-align: center; border-radius: 9px; }
.sb-banner-head { font-size: 0.9375rem; font-weight: 800; }
.sb-banner-sub { font-size: 0.75rem; margin: 4px 0 10px; }
.sb-banner-cta { display: inline-block; padding: 6px 18px; background: #fff; color: var(--accent-dark); border-radius: 999px; font-size: 0.75rem; font-weight: 700; }
.sb-banner-link, .sb-banner-link:hover { color: #fff; text-decoration: none; }
.sb-banner-link { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.sb-banner-link:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(20, 168, 98, 0.35); }

/* --- TOC開閉 --- */
.sb-toc-toggle { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; }
.sb-toc-toggle::-webkit-details-marker { display: none; }
.sb-toc-toggle::after { content: "▼"; font-size: 0.6rem; color: var(--text-sub); transition: transform 0.2s; }
.sb-toc[open] .sb-toc-toggle::after { transform: rotate(180deg); }

/* --- 運営元CTA修正(6名キャラ横長画像+白背景) --- */
.cta-aisaku { background: #fff; border: 1px solid var(--border); }
.cta-aisaku .cta-flex { flex-direction: column; align-items: stretch; gap: 0; }
.cta-aisaku .cta-flex > img.cta-hero-img { width: 100%; max-width: 460px; height: auto; border-radius: 0; border: none; box-shadow: none; margin: 0 auto 16px; display: block; background: transparent; object-fit: contain; flex: none; }
.cta-aisaku .cta-title { margin-bottom: 8px; font-size: 1.125rem; }
.cta-aisaku p { margin-bottom: 14px; font-size: 0.875rem; }

/* --- 広瀬のポイント(コールアウト) --- */
.hirose-point { display: flex; gap: 14px; margin: 28px 0; padding: 18px 20px; background: #f0f7ff; border: 2px solid #c5d9f0; border-radius: 14px; }
.hp-icon { flex: none; }
.hp-icon img { border-radius: 50%; border: 2px solid #a3c4e8; }
.hp-label { display: block; font-weight: 800; color: #2563a8; font-size: 0.875rem; margin-bottom: 4px; }
.hp-body p { font-size: 0.875rem; line-height: 1.75; margin: 0; }

/* --- 記事メタ(執筆/監修バッジ) --- */

/* --- フッターメディア概要 --- */
.footer-about { font-size: 0.875rem; line-height: 1.7; margin-bottom: 14px; }
.footer-disclaimer { font-size: 0.8125rem; color: var(--text-sub); }

/* --- カテゴリ+タグバッジ --- */
a.category-badge { text-decoration: none; }
a.category-badge:hover { background: var(--accent); color: #fff; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tag-badge { display: inline-block; font-size: 0.6875rem; padding: 2px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--border); color: var(--text-sub); text-decoration: none; font-weight: 600; }
.tag-badge:hover { border-color: var(--accent); color: var(--accent-dark); }

/* --- ヘッダーnav左寄せ --- */
.site-header .container-wide { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.site-header .site-nav { margin-right: auto; }
.site-header .site-nav a:first-child { margin-left: 0; }

/* --- スローガン --- */
.tagline-slogan { font-style: normal; font-weight: 800; color: var(--accent-dark); letter-spacing: 0.04em; }


/* ========== TOPページ専用(index.htmlから移植) ========== */
/* ===== 「AISAKUマガジン」トップ専用の追加スタイル =====
   WP移行時はこのブロックごと「追加CSS」へ移植 */



/* ロゴマーク・持ち帰りボックス・司書・広瀬・shiryo-dl などの
   キーデザイン共通コンポーネントは style.css 側に定義(2026-07-04) */

/* ---------- ヒーロー ---------- */
.hero-v2 {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 40px;
  align-items: center;
  padding: 56px 0 40px;
}

.hero-v2 .hero-copy .hero-eyebrow {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--accent-dark);
  letter-spacing: 0.14em;
  margin-bottom: 14px;
}

.hero-v2 h1 {
  font-size: clamp(1.5rem, 3vw + 0.75rem, 1.875rem);
  line-height: 1.55;
  margin-bottom: 16px;
  text-wrap: balance;
}

.hero-v2 h1 .hero-underline {
  background: linear-gradient(transparent 62%, var(--accent-pale) 62%);
}

.hero-v2 .hero-copy p {
  color: var(--text-sub);
  font-size: 0.9375rem;
  margin-bottom: 22px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.hero-note {
  width: 100%;
  font-size: 0.75rem;
  color: var(--text-sub);
}

/* ヒーロー右: 資料の実物ミニチュア(CSSのみ) */
.hero-docs {
  display: flex;
  justify-content: center;
  gap: 14px;
  padding: 10px 0;
}

.doc-mini {
  width: 150px;
  background: #fff;
  border: 1px solid var(--border);
  border-top: 6px solid var(--accent);
  border-radius: 6px;
  box-shadow: 0 10px 24px -12px rgba(43, 43, 43, 0.28);
  padding: 14px 14px 16px;
  font-size: 0.75rem;
  line-height: 1.6;
}

.doc-mini:nth-child(1) { transform: rotate(-2.5deg) translateY(8px); }
.doc-mini:nth-child(2) { transform: translateY(-4px); }
.doc-mini:nth-child(3) { transform: rotate(2.5deg) translateY(10px); }

.doc-mini .doc-kind {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--accent-dark);
  background: var(--accent-pale);
  border-radius: 4px;
  padding: 1px 8px;
  margin-bottom: 8px;
}

.doc-mini .doc-name {
  display: block;
  font-weight: 700;
  font-size: 0.8125rem;
  line-height: 1.5;
  margin-bottom: 6px;
}

.doc-mini .doc-lines {
  display: block;
  height: 34px;
  background: repeating-linear-gradient(
    to bottom,
    var(--bg-soft) 0, var(--bg-soft) 5px,
    transparent 5px, transparent 10px
  );
  border-radius: 2px;
  margin-bottom: 8px;
}

.doc-mini .doc-spec {
  display: block;
  color: var(--text-sub);
  font-size: 0.6875rem;
}

/* 司書・広瀬(共通定義は style.css)。ヒーローでは中央寄せ・吹き出し小さめ */
.hero-visual .librarian {
  justify-content: center;
  margin: 24px 0 0;
}

.hero-visual .librarian .bubble {
  max-width: 300px;
  font-size: 0.75rem;
}

/* ---------- 資料ライブラリ ---------- */
.library-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin: 48px 0 6px;
}

.library-head .section-title {
  margin: 0;
}

.library-head .library-lead {
  font-size: 0.8125rem;
  color: var(--text-sub);
}

.library-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 16px;
}

.shiryo-card {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  background: #fff;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.shiryo-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 12px rgba(31, 210, 123, 0.18);
}

/* 資料の表紙サムネ(CSSのみ) */
.shiryo-thumb {
  align-self: start;
  border: 1px solid var(--border);
  border-top: 5px solid var(--accent);
  border-radius: 4px;
  background: #fff;
  min-height: 112px;
  padding: 8px 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.shiryo-thumb i {
  display: block;
  height: 5px;
  border-radius: 2px;
  background: var(--bg-soft);
}

.shiryo-thumb i.w60 { width: 60%; }
.shiryo-thumb i.w85 { width: 85%; }
.shiryo-thumb i.grid {
  height: 42px;
  background:
    repeating-linear-gradient(to right, var(--accent-pale) 0 1px, transparent 1px 14px),
    repeating-linear-gradient(to bottom, var(--accent-pale) 0 1px, transparent 1px 9px),
    var(--bg-soft);
}

.shiryo-card.coming .shiryo-thumb {
  border-top-color: var(--border);
  opacity: 0.7;
}

.shiryo-body .shiryo-kind {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--accent-dark);
  background: var(--accent-pale);
  border-radius: 4px;
  padding: 1px 8px;
  margin-bottom: 6px;
}

.shiryo-card.coming .shiryo-kind {
  color: var(--text-sub);
  background: var(--bg-soft);
}

.shiryo-body .shiryo-name {
  display: block;
  font-weight: 700;
  font-size: 0.9375rem;
  line-height: 1.55;
  margin-bottom: 4px;
}

.shiryo-body .shiryo-desc {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-sub);
  line-height: 1.7;
  margin-bottom: 10px;
}

.shiryo-link {
  font-size: 0.8125rem;
}

/* ---------- 目的別ハブ ---------- */
.purpose-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.purpose-card {
  display: block;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 16px 14px;
  background: #fff;
  text-decoration: none;
  color: var(--text);
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

a.purpose-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 10px rgba(31, 210, 123, 0.18);
  color: var(--text);
}

.purpose-card .purpose-q {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent-dark);
  margin-bottom: 6px;
}

.purpose-card .purpose-name {
  display: block;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 4px;
}

.purpose-card .purpose-desc {
  display: block;
  font-size: 0.75rem;
  color: var(--text-sub);
  line-height: 1.65;
  margin-bottom: 8px;
}

.purpose-card .purpose-count {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--accent-dark);
  background: var(--accent-pale);
  border-radius: 4px;
  padding: 1px 8px;
}

.purpose-card.coming {
  background: var(--bg-soft);
}

.purpose-card.coming .purpose-count {
  color: var(--text-sub);
  background: #fff;
  border: 1px solid var(--border);
}

/* ---------- 記事カードの「持ち帰り」行 ---------- */
.card-takeaway {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 0.75rem;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}

.card-takeaway .tk-label {
  flex: none;
  font-weight: 700;
  color: var(--accent-dark);
  background: var(--accent-pale);
  border-radius: 4px;
  padding: 1px 8px;
}

.card-takeaway .tk-what {
  color: var(--text-sub);
}

.card-takeaway.none .tk-label {
  color: var(--text-sub);
  background: var(--bg-soft);
}

/* ---------- レスポンシブ ---------- */
@media (max-width: 820px) {
  .purpose-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 680px) {
  .hero-v2 {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 40px;
  }

  .hero-v2 h1 {
    font-size: 1.5625rem;
  }

  .library-grid {
    grid-template-columns: 1fr;
  }

  .hero-docs {
    gap: 10px;
  }

  .doc-mini {
    width: auto;
    flex: 1 1 0;
    min-width: 0;
    padding: 10px 10px 12px;
  }

  .doc-mini .doc-name {
    font-size: 0.75rem;
  }
}

@media (max-width: 560px) {
  .purpose-grid {
    grid-template-columns: 1fr;
  }

  .shiryo-card {
    grid-template-columns: 76px 1fr;
    gap: 12px;
  }
}


/* ========== アーカイブ(カテゴリ一覧)ページ(category.htmlから移植) ========== */

/* ===== AISAKUマガジン共通演出CSS ===== */
html { background: #fff; }
body { background: transparent; }
.aisaku-ticker {
  position: sticky; top: 0; z-index: 60;
  overflow: hidden; background: var(--accent-pale);
  border-bottom: 1px solid #d7f0e2;
}
.aisaku-ticker .tk-track {
  display: inline-flex; white-space: nowrap;
  animation: tickerMove 34s linear infinite;
}
.aisaku-ticker .tk-seq {
  display: inline-block; padding: 8px 0;
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.75rem; letter-spacing: 0.06em; color: var(--accent-dark);
}
.aisaku-ticker .tk-seq span { padding-right: 2.6em; }
.aisaku-ticker .tk-seq .tk-jp { color: #6b7280; }
@keyframes tickerMove { to { transform: translateX(-50%); } }
.office-bg {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.90), rgba(255,255,255,0.94)),
    url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201440%20620%22%20fill%3D%22none%22%20stroke%3D%22%233aa876%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%0A%3Cline%20x1%3D%220%22%20y1%3D%22575%22%20x2%3D%221440%22%20y2%3D%22575%22%2F%3E%0A%3Crect%20x%3D%2270%22%20y%3D%2270%22%20width%3D%22260%22%20height%3D%22320%22%20rx%3D%224%22%2F%3E%0A%3Cline%20x1%3D%22200%22%20y1%3D%2270%22%20x2%3D%22200%22%20y2%3D%22390%22%2F%3E%0A%3Cline%20x1%3D%2270%22%20y1%3D%22230%22%20x2%3D%22330%22%20y2%3D%22230%22%2F%3E%0A%3Cline%20x1%3D%2258%22%20y1%3D%22396%22%20x2%3D%22342%22%20y2%3D%22396%22%2F%3E%0A%3Cpath%20d%3D%22M415%2C520%20C415%2C470%20400%2C450%20385%2C433%22%2F%3E%0A%3Cpath%20d%3D%22M415%2C520%20C415%2C460%20432%2C443%20450%2C427%22%2F%3E%0A%3Cpath%20d%3D%22M415%2C520%20C414%2C480%20415%2C455%20415%2C428%22%2F%3E%0A%3Ccircle%20cx%3D%22383%22%20cy%3D%22429%22%20r%3D%225%22%2F%3E%0A%3Ccircle%20cx%3D%22452%22%20cy%3D%22423%22%20r%3D%225%22%2F%3E%0A%3Ccircle%20cx%3D%22415%22%20cy%3D%22424%22%20r%3D%225%22%2F%3E%0A%3Cpath%20d%3D%22M388%2C520%20L442%2C520%20L436%2C575%20L394%2C575%20Z%22%2F%3E%0A%3Crect%20x%3D%22400%22%20y%3D%22140%22%20width%3D%2272%22%20height%3D%2256%22%20rx%3D%223%22%2F%3E%0A%3Cpath%20d%3D%22M408%2C182%20L428%2C158%20L444%2C172%20L462%2C150%22%2F%3E%0A%3Crect%20x%3D%22520%22%20y%3D%2295%22%20width%3D%22280%22%20height%3D%22205%22%20rx%3D%226%22%2F%3E%0A%3Cline%20x1%3D%22560%22%20y1%3D%22300%22%20x2%3D%22542%22%20y2%3D%22575%22%2F%3E%0A%3Cline%20x1%3D%22760%22%20y1%3D%22300%22%20x2%3D%22778%22%20y2%3D%22575%22%2F%3E%0A%3Cline%20x1%3D%22551%22%20y1%3D%22440%22%20x2%3D%22769%22%20y2%3D%22440%22%2F%3E%0A%3Cline%20x1%3D%22555%22%20y1%3D%22140%22%20x2%3D%22680%22%20y2%3D%22140%22%2F%3E%0A%3Cline%20x1%3D%22555%22%20y1%3D%22172%22%20x2%3D%22762%22%20y2%3D%22172%22%2F%3E%0A%3Cpath%20d%3D%22M560%2C262%20L602%2C226%20L642%2C246%20L692%2C206%20L742%2C232%22%2F%3E%0A%3Crect%20x%3D%22850%22%20y%3D%22150%22%20width%3D%22180%22%20height%3D%22425%22%2F%3E%0A%3Cline%20x1%3D%22850%22%20y1%3D%22290%22%20x2%3D%221030%22%20y2%3D%22290%22%2F%3E%0A%3Cline%20x1%3D%22850%22%20y1%3D%22430%22%20x2%3D%221030%22%20y2%3D%22430%22%2F%3E%0A%3Cline%20x1%3D%22872%22%20y1%3D%22200%22%20x2%3D%22872%22%20y2%3D%22288%22%2F%3E%0A%3Cline%20x1%3D%22888%22%20y1%3D%22210%22%20x2%3D%22888%22%20y2%3D%22288%22%2F%3E%0A%3Cline%20x1%3D%22904%22%20y1%3D%22196%22%20x2%3D%22904%22%20y2%3D%22288%22%2F%3E%0A%3Cline%20x1%3D%22920%22%20y1%3D%22214%22%20x2%3D%22920%22%20y2%3D%22288%22%2F%3E%0A%3Cline%20x1%3D%22936%22%20y1%3D%22206%22%20x2%3D%22936%22%20y2%3D%22288%22%2F%3E%0A%3Cline%20x1%3D%22952%22%20y1%3D%22288%22%20x2%3D%22982%22%20y2%3D%22204%22%2F%3E%0A%3Cpath%20d%3D%22M866%2C428%20L866%2C364%20L886%2C364%20L890%2C372%20L926%2C372%20L926%2C428%20Z%22%2F%3E%0A%3Cpath%20d%3D%22M940%2C428%20L940%2C376%20L958%2C376%20L962%2C383%20L994%2C383%20L994%2C428%20Z%22%2F%3E%0A%3Crect%20x%3D%22872%22%20y%3D%22480%22%20width%3D%2280%22%20height%3D%2295%22%2F%3E%0A%3Cline%20x1%3D%22872%22%20y1%3D%22512%22%20x2%3D%22952%22%20y2%3D%22512%22%2F%3E%0A%3Ccircle%20cx%3D%221120%22%20cy%3D%22110%22%20r%3D%2234%22%2F%3E%0A%3Cline%20x1%3D%221120%22%20y1%3D%22110%22%20x2%3D%221120%22%20y2%3D%2288%22%2F%3E%0A%3Cline%20x1%3D%221120%22%20y1%3D%22110%22%20x2%3D%221137%22%20y2%3D%22117%22%2F%3E%0A%3Crect%20x%3D%221100%22%20y%3D%22438%22%20width%3D%22320%22%20height%3D%2210%22%20rx%3D%223%22%2F%3E%0A%3Cline%20x1%3D%221115%22%20y1%3D%22448%22%20x2%3D%221115%22%20y2%3D%22575%22%2F%3E%0A%3Cline%20x1%3D%221405%22%20y1%3D%22448%22%20x2%3D%221405%22%20y2%3D%22575%22%2F%3E%0A%3Crect%20x%3D%221210%22%20y%3D%22320%22%20width%3D%22130%22%20height%3D%2286%22%20rx%3D%226%22%2F%3E%0A%3Cline%20x1%3D%221275%22%20y1%3D%22406%22%20x2%3D%221275%22%20y2%3D%22430%22%2F%3E%0A%3Cline%20x1%3D%221245%22%20y1%3D%22432%22%20x2%3D%221305%22%20y2%3D%22432%22%2F%3E%0A%3Crect%20x%3D%221140%22%20y%3D%22422%22%20width%3D%2292%22%20height%3D%2212%22%20rx%3D%223%22%2F%3E%0A%3Crect%20x%3D%221362%22%20y%3D%22406%22%20width%3D%2224%22%20height%3D%2228%22%20rx%3D%224%22%2F%3E%0A%3Cpath%20d%3D%22M1386%2C412%20C1398%2C412%201398%2C428%201386%2C428%22%2F%3E%0A%3Crect%20x%3D%221040%22%20y%3D%22360%22%20width%3D%2270%22%20height%3D%2288%22%20rx%3D%2214%22%2F%3E%0A%3Crect%20x%3D%221030%22%20y%3D%22458%22%20width%3D%2290%22%20height%3D%2213%22%20rx%3D%226%22%2F%3E%0A%3Cline%20x1%3D%221075%22%20y1%3D%22471%22%20x2%3D%221075%22%20y2%3D%22518%22%2F%3E%0A%3Cline%20x1%3D%221075%22%20y1%3D%22518%22%20x2%3D%221045%22%20y2%3D%22552%22%2F%3E%0A%3Cline%20x1%3D%221075%22%20y1%3D%22518%22%20x2%3D%221105%22%20y2%3D%22552%22%2F%3E%0A%3Ccircle%20cx%3D%221045%22%20cy%3D%22558%22%20r%3D%225%22%2F%3E%0A%3Ccircle%20cx%3D%221105%22%20cy%3D%22558%22%20r%3D%225%22%2F%3E%0A%3Cline%20x1%3D%22620%22%20y1%3D%220%22%20x2%3D%22620%22%20y2%3D%2246%22%2F%3E%0A%3Cpath%20d%3D%22M600%2C46%20L640%2C46%20L632%2C70%20L608%2C70%20Z%22%2F%3E%0A%3Cline%20x1%3D%221180%22%20y1%3D%220%22%20x2%3D%221180%22%20y2%3D%2240%22%2F%3E%0A%3Cpath%20d%3D%22M1160%2C40%20L1200%2C40%20L1192%2C64%20L1168%2C64%20Z%22%2F%3E%0A%3C%2Fsvg%3E");
  background-size: auto, 1440px auto;
  background-position: 0 0, center bottom;
  background-repeat: no-repeat, repeat-x;
}
@media (max-width: 700px) { .office-bg { background-size: auto, 1000px auto; } }
.office-scan {
  position: fixed; top: 0; left: -40%; width: 40%; height: 100%;
  z-index: 90; pointer-events: none;
  background: linear-gradient(90deg, transparent,
    rgba(31, 210, 123, 0.05), rgba(31, 210, 123, 0.10), transparent);
  animation: scanUpdate 7s ease-in-out infinite;
}
@keyframes scanUpdate {
  0%, 65% { transform: translateX(0); opacity: 0; }
  72% { opacity: 1; }
  100% { transform: translateX(350%); opacity: 0; }
}
.tw-splash {
  position: fixed; inset: 0; z-index: 9999; background: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; pointer-events: none;
  animation: splash-out 0.4s ease 2.2s forwards;
}
.tw-logo { font-size: 1.1875rem; font-weight: 700; letter-spacing: 0.04em; opacity: 0; animation: fadeUp 0.4s ease 0.1s forwards; }
.tw-logo b { color: var(--accent-dark); }
.tw-type {
  font-size: 1.6rem; font-weight: 800; color: var(--accent-dark); letter-spacing: 0.05em;
  border-right: 3px solid var(--accent); white-space: nowrap;
  width: 0; overflow: hidden;
  animation: typewriter 1.1s steps(10,end) 0.5s forwards, twBlink 0.6s steps(1) 0.5s 5;
}
@keyframes typewriter { to { width: 10em; } }
@keyframes twBlink { 50% { border-color: transparent; } }
@keyframes fadeUp { from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none} }
@media (prefers-reduced-motion: reduce) { .tw-splash, .office-scan { display: none; } .aisaku-ticker .tk-track { animation: none; } }
@media print { .tw-splash, .aisaku-ticker, .office-scan, .office-bg { display: none; } }
/* 2ページ目以降はオープニングを出さない（header.php がセッション初回を判定して付与） */
.splash-skip .tw-splash { display: none; }
.tagline-slogan { font-style: normal; font-weight: 800; color: var(--accent-dark); letter-spacing: 0.04em; }
.site-header .container-wide { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.site-header .site-nav { margin-right: auto; }
.site-header .site-nav a:first-child { margin-left: 0; }
.footer-about { font-size: 0.875rem; line-height: 1.7; margin-bottom: 14px; }
.table-wrap table { background: #fff; }


/* ===== カテゴリ記事一覧ページ ===== */

.cat-header { margin: 32px 0 8px; }
.cat-header h1 { font-size: 1.5rem; margin-bottom: 6px; }
.cat-header p { font-size: 0.9375rem; color: var(--text-sub); }
.cat-count { font-size: 0.8125rem; color: var(--text-sub); margin: 16px 0 4px; }

/* 記事カードグリッド(1行2記事) */
.post-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-top: 12px;
}
.post-card {
  display: flex; flex-direction: column;
  border: 1px solid var(--border); border-radius: 12px;
  background: #fff; overflow: hidden;
  text-decoration: none; color: var(--text);
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.post-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(31, 210, 123, 0.15);
  color: var(--text);
}
.post-thumb {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
  background: var(--bg-soft); display: block;
}
/* サムネ未設定時のプレースホルダ */
.post-thumb-placeholder {
  width: 100%; aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--accent-pale) 0%, var(--bg-soft) 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: var(--accent); opacity: 0.5;
}
.post-body { padding: 16px 18px 20px; flex: 1; display: flex; flex-direction: column; }
.post-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.post-meta .category-badge { font-size: 0.6875rem; }
.post-date { font-size: 0.75rem; color: var(--text-sub); }
.post-title {
  font-size: 1rem; font-weight: 700; line-height: 1.55;
  margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.post-excerpt {
  font-size: 0.8125rem; color: var(--text-sub); line-height: 1.7;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  margin-bottom: 10px; flex: 1;
}
.post-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.post-tag {
  font-size: 0.75rem; padding: 2px 8px; border-radius: 999px;
  background: var(--accent-pale); color: var(--accent-dark); font-weight: 600;
}

.pagination-wrap { text-align: center; margin: 40px 0; }

@media (max-width: 640px) {
  .post-grid { grid-template-columns: 1fr; }
}


/* ========== ホワイトペーパーDLゲート ========== */

.dl-gate {
  border: 2px solid var(--accent);
  border-radius: 12px;
  padding: 28px;
  margin: 40px 0;
  background: #fff;
}

.dl-gate-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.dl-gate-header .tw-doc {
  width: 42px;
  height: 54px;
}

.dl-gate-info {
  flex: 1;
  min-width: 0;
}

.dl-gate-fields {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.dl-gate-label {
  display: block;
}

.dl-gate-label span {
  display: block;
  font-size: 0.8125rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.dl-gate-label input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9375rem;
  font-family: inherit;
  background: var(--bg-soft);
}

.dl-gate-label input:focus {
  outline: 2px solid var(--accent);
  border-color: transparent;
  background: #fff;
}

.dl-gate-submit {
  width: 100%;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  font-family: inherit;
}

.dl-gate-note {
  font-size: 0.75rem;
  color: var(--text-sub);
  text-align: center;
  margin: 14px 0 0;
}

.dl-gate-email-note {
  font-size: 0.75rem;
  color: var(--text-sub);
  margin: -8px 0 0;
}

.dl-gate-error {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #b91c1c;
  font-size: 0.875rem;
  font-weight: 700;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 18px;
}

/* サンクス表示 */
.dl-gate--thanks {
  text-align: center;
  padding: 40px 28px;
}

.dl-gate-check {
  font-size: 2.5rem;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 12px;
}

.dl-gate-msg {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 22px;
}

.dl-gate--thanks .btn {
  font-size: 1rem;
}

.dl-gate-sub {
  font-size: 0.8125rem;
  color: var(--text-sub);
  margin-top: 18px;
}

@media (max-width: 560px) {
  .dl-gate {
    padding: 20px 16px;
  }

  .dl-gate--thanks {
    padding: 28px 16px;
  }
}


/* ============================================================
   E-E-A-T: 執筆者・監修者
   AI社員(広瀬)= グリーン系、人間の専門家 = ネイビー系で塗り分け、
   「誰が書き、誰が確認したか」を色で判別できるようにする。
   ============================================================ */

:root {
  --expert: #1f3a5f;
  --expert-mid: #41618c;
  --expert-pale: #f2f6fb;
  --expert-border: #d6e0ec;
}

/* 顔写真未設定時のフォールバック(頭文字) */
.expert-avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--expert-pale);
  color: var(--expert);
  font-weight: 800;
  line-height: 1;
}

/* バイライン内の監修者リンク。責任主体が人間側にあることを示すため、
   AI社員(グリーン)より監修者(ネイビー)が主に見えるようにする */
/* ---------- 記事内: 監修者コメント ---------- */

.expert-note {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 32px 0;
}

.expert-note .en-avatar {
  flex: none;
  margin-top: 26px;
}

.expert-note .en-avatar img,
.expert-note .en-avatar .expert-avatar-fallback {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2.5px solid var(--expert);
  background: #fff;
  object-fit: cover;
  font-size: 1.25rem;
}

.expert-note .en-main {
  flex: 1;
  min-width: 0;
}

.expert-note .en-label {
  display: inline-block;
  margin: 0 0 6px;
  padding: 2px 12px;
  border-radius: 999px;
  background: var(--expert);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.7;
}

.expert-note .en-bubble {
  position: relative;
  background: var(--expert-pale);
  border: 1px solid var(--expert-border);
  border-radius: 14px;
  padding: 14px 18px 16px;
}

.expert-note .en-bubble::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 22px;
  width: 12px;
  height: 12px;
  background: var(--expert-pale);
  border-left: 1px solid var(--expert-border);
  border-bottom: 1px solid var(--expert-border);
  transform: rotate(45deg);
}

.expert-note .en-who {
  margin: 0 0 6px;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--expert-border);
  font-size: 0.75rem;
  line-height: 1.6;
}

.expert-note .en-name {
  font-weight: 800;
  color: var(--expert);
  font-size: 0.875rem;
  text-decoration: none;
  border-bottom: 1px solid rgba(31, 58, 95, 0.3);
}

.expert-note .en-name:hover {
  border-bottom-color: var(--expert);
}

.expert-note .en-role {
  display: block;
  color: var(--text-sub);
  font-size: 0.6875rem;
}

.expert-note .en-text p {
  margin: 0 0 8px;
  font-size: 0.9375rem;
  line-height: 1.85;
}

.expert-note .en-text p:last-child {
  margin-bottom: 0;
}

/* ---------- 記事末尾: 監修者プロフィール枠 ---------- */

.expert-box {
  margin: 44px 0 0;
  padding: 24px 26px 20px;
  border: 1px solid var(--expert-border);
  border-top: 3px solid var(--expert);
  border-radius: 4px 4px 14px 14px;
  background: #fff;
}

.expert-box-label {
  margin: 0 0 16px;
  color: var(--expert);
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.expert-box-head {
  display: flex;
  align-items: center;
  gap: 18px;
}

.expert-box-avatar {
  flex: none;
  display: block;
  line-height: 0;
}

.expert-box-avatar img,
.expert-box-avatar .expert-avatar-fallback {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  border: 2px solid var(--expert-border);
  background: #fff;
  object-fit: cover;
  font-size: 1.75rem;
}

.expert-box-id {
  min-width: 0;
}

.expert-kana {
  display: block;
  color: var(--text-sub);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
}

.expert-name {
  margin: 0 0 4px;
  font-size: 1.1875rem;
  font-weight: 800;
  line-height: 1.4;
}

.expert-name a {
  color: var(--expert);
  text-decoration: none;
}

.expert-name a:hover {
  text-decoration: underline;
}

.expert-role {
  margin: 0;
  color: var(--text-sub);
  font-size: 0.8125rem;
  line-height: 1.6;
}

.expert-role a {
  color: var(--text-sub);
}

.expert-sep {
  margin: 0 2px;
  color: var(--border);
}

.expert-creds {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.expert-creds li {
  padding: 3px 11px;
  border: 1px solid var(--expert-border);
  border-radius: 999px;
  background: var(--expert-pale);
  color: var(--expert);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.7;
}

.expert-bio,
.expert-exp {
  margin: 14px 0 0;
  font-size: 0.875rem;
  line-height: 1.85;
}

.expert-exp {
  color: var(--text-sub);
}

.expert-knows {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 14px 0 0;
  font-size: 0.75rem;
}

.expert-knows-label,
.expert-policy-label {
  font-weight: 800;
  color: var(--expert);
}

.expert-knows-tag {
  padding: 2px 9px;
  border-radius: 4px;
  background: #f4f6f9;
  color: var(--text-sub);
  font-size: 0.6875rem;
}

.expert-policy {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-left: 3px solid var(--expert-border);
  background: #fafbfd;
  font-size: 0.8125rem;
  line-height: 1.8;
}

.expert-policy-label {
  display: block;
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
}

.expert-box-more {
  margin: 16px 0 0;
  font-size: 0.8125rem;
}

.expert-box-more a {
  color: var(--expert);
  font-weight: 700;
}

/* 制作体制の下の「編集方針について」リンク1行。
   以前ここにあった散文はdlと重複していたため削除済み。余白もその分詰めている */
.editorial-note {
  margin: 14px 0 0;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  color: var(--text-sub);
  font-size: 0.75rem;
  line-height: 1.8;
}

.editorial-note a {
  color: var(--text-sub);
}

/* ---------- 監修者プロフィールページ ---------- */

.ep-header {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.ep-avatar {
  flex: none;
  line-height: 0;
}

.ep-avatar img,
.ep-avatar .expert-avatar-fallback {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  border: 3px solid var(--expert-pale);
  background: #fff;
  object-fit: cover;
  font-size: 2.5rem;
}

.ep-id {
  min-width: 0;
}

.ep-kana {
  margin: 0 0 2px;
  color: var(--text-sub);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
}

.ep-id h1 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: 0.02em;
}

.ep-en {
  margin: 4px 0 0;
  color: var(--text-sub);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
}

.ep-job {
  margin: 10px 0 0;
  color: var(--expert);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.6;
}

.ep-org {
  margin: 4px 0 0;
  color: var(--text-sub);
  font-size: 0.8125rem;
}

.ep-dept::before {
  content: "／";
  color: var(--border);
}

.ep-knows {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 18px 0 0;
}

.ep-knows-tag {
  padding: 3px 11px;
  border: 1px solid var(--expert-border);
  border-radius: 999px;
  color: var(--expert);
  font-size: 0.75rem;
  font-weight: 700;
}

.ep-body {
  margin-top: 22px;
}

.ep-block {
  margin-top: 34px;
}

.ep-block h2 {
  margin: 0 0 12px;
  padding-left: 12px;
  border-left: 4px solid var(--expert);
  color: var(--expert);
  font-size: 1.0625rem;
  font-weight: 800;
  line-height: 1.5;
}

.ep-block p {
  font-size: 0.9375rem;
  line-height: 1.9;
}

.ep-alumni {
  color: var(--text-sub);
  font-size: 0.8125rem;
}

.ep-list {
  margin: 0;
  padding-left: 1.2em;
}

.ep-list li {
  margin-bottom: 6px;
  font-size: 0.9375rem;
  line-height: 1.8;
}

.ep-creds {
  list-style: none;
  padding-left: 0;
}

.ep-creds li {
  position: relative;
  padding-left: 26px;
}

.ep-creds li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--expert);
  font-weight: 800;
}

.ep-links {
  list-style: none;
  padding-left: 0;
  word-break: break-all;
}

.ep-links li {
  font-size: 0.8125rem;
}

.ep-policy-block p {
  padding: 16px 18px;
  border-radius: 10px;
  background: var(--expert-pale);
  font-size: 0.875rem;
}

.ep-post-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--border);
}

.ep-post-list li {
  border-bottom: 1px solid var(--border);
}

.ep-post-list a {
  display: block;
  padding: 14px 4px;
  text-decoration: none;
  color: var(--text);
}

.ep-post-list a:hover {
  background: var(--bg-soft);
}

.ep-post-title {
  display: block;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.6;
}

.ep-post-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  color: var(--text-sub);
  font-size: 0.6875rem;
}

.ep-post-cat {
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--accent-pale);
  color: var(--accent-dark);
  font-weight: 700;
}

/* ---------- 関連記事 ---------- */

.related-posts {
  margin: 44px 0 0;
}

.related-title {
  margin: 0 0 16px;
  padding-left: 12px;
  border-left: 4px solid var(--accent);
  font-size: 1.125rem;
  font-weight: 800;
  line-height: 1.5;
}

.related-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.related-item a {
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s;
}

.related-item a:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.related-cat {
  color: var(--accent-dark);
  font-size: 0.6875rem;
  font-weight: 700;
}

.related-name {
  flex: 1;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.6;
}

.related-date {
  color: var(--text-sub);
  font-size: 0.6875rem;
}

/* ---------- レスポンシブ ---------- */

@media (max-width: 700px) {
  .related-list {
    grid-template-columns: 1fr;
  }

  .expert-box {
    padding: 20px 18px 18px;
  }

  .expert-box-head {
    gap: 14px;
  }

  .expert-box-avatar img,
  .expert-box-avatar .expert-avatar-fallback {
    width: 68px;
    height: 68px;
    font-size: 1.5rem;
  }

  .expert-name {
    font-size: 1.0625rem;
  }

  .ep-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .ep-avatar img,
  .ep-avatar .expert-avatar-fallback {
    width: 96px;
    height: 96px;
    font-size: 2rem;
  }

  .ep-id h1 {
    font-size: 1.5rem;
  }
}

@media (max-width: 560px) {
  .expert-note {
    gap: 10px;
  }

  .expert-note .en-avatar {
    margin-top: 24px;
  }

  .expert-note .en-avatar img,
  .expert-note .en-avatar .expert-avatar-fallback {
    width: 44px;
    height: 44px;
    font-size: 1rem;
  }

  .expert-note .en-bubble {
    padding: 12px 14px 14px;
  }

  .expert-note .en-text p {
    font-size: 0.875rem;
  }
}

@media print {
  .expert-box,
  .expert-note,
  .related-posts {
    break-inside: avoid;
  }
}

/* ---------- 404 ---------- */

.error-404 {
  padding: 20px 0 40px;
}

.error-code {
  color: var(--accent);
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.06em;
}

.error-404 h1 {
  margin: 10px 0 12px;
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.5;
}

.error-lead {
  color: var(--text-sub);
  font-size: 0.9375rem;
}

.error-search {
  display: flex;
  gap: 8px;
  margin: 24px 0 36px;
}

.error-search input[type="search"] {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9375rem;
}

.error-search .btn {
  flex: none;
}

.error-recent h2 {
  margin: 0 0 10px;
  padding-left: 12px;
  border-left: 4px solid var(--accent);
  font-size: 1.0625rem;
  font-weight: 800;
}

.error-recent ul {
  margin: 0 0 28px;
  padding-left: 1.2em;
}

.error-recent li {
  margin-bottom: 6px;
  font-size: 0.9375rem;
  line-height: 1.8;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* バイライン内の肩書(監修者名の直後)。記事末の制作体制でも同じ見え方にする */
.article-byline .meta-role,
.editorial-flow .meta-role {
  margin-left: 4px;
  color: var(--text-sub);
  font-size: 0.6875rem;
  font-weight: 400;
}

.article-byline .meta-role::before,
.editorial-flow .meta-role::before {
  content: "（";
}

.article-byline .meta-role::after,
.editorial-flow .meta-role::after {
  content: "）";
}

/* ---------- バイライン(複数行) ---------- */

.article-byline {
  margin: 8px 0 0;
  padding: 10px 0 0;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--text-sub);
}

.byline-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.byline-avatars {
  display: flex;
  flex: none;
  gap: 6px;
}

.byline-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--expert-border);
  background: #fff;
  object-fit: cover;
  font-size: 1.125rem;
}

.byline-text {
  min-width: 0;
}

.article-byline .byline-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 0 4px;
  line-height: 1.9;
}

.article-byline .byline-row:last-of-type {
  margin-bottom: 0;
}

.article-byline .byline-sep {
  color: var(--border);
}

/* 制作クレジットの担当者名。
   AI・組織・人物で見た目を変えない。誰が何をしたかは左の役割ラベルが示しており、
   名前側の装飾を変えると3行がバラバラに見えて読みにくくなるため。 */
.article-byline .meta-ai,
.article-byline .meta-org,
.article-byline .meta-person,
.article-byline .meta-human,
.editorial-flow .meta-ai,
.editorial-flow .meta-org,
.editorial-flow .meta-person,
.editorial-flow .meta-human {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--text);
  font-size: inherit;
  font-weight: 700;
}

/* 人物ページへのリンクだけ、リンクだと分かるようにする */
.article-byline .meta-link,
.editorial-flow .meta-link {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--text-sub);
  text-underline-offset: 3px;
}

.article-byline .meta-link:hover,
.editorial-flow .meta-link:hover {
  color: var(--expert);
  text-decoration-color: var(--expert);
}

/* 役割ラベル。上部バイラインと記事末の制作体制で同じ文言を使う。
   min-width は最長ラベル「執筆・編集：」に合わせ、担当者名の開始位置を揃える */
.article-byline .byline-label {
  flex: none;
  min-width: 6em;
  color: var(--text-sub);
  font-weight: 400;
  font-size: 0.75rem;
}

.article-byline .byline-label::after {
  content: "：";
  color: var(--border);
}

/* 執筆者の実名。組織名のあとに続けて置く */
.article-byline .meta-person,
.editorial-flow .meta-person {
  margin-left: 6px;
}

/* 「＋ AI社員・広瀬」のかたまり。途中で折り返さない */
.meta-with-ai {
  white-space: nowrap;
}

/* 人間の担当者とAI社員の区切り「＋」 */
.article-byline .meta-plus,
.editorial-flow .meta-plus {
  margin: 0 6px;
  color: var(--text-sub);
  font-weight: 400;
}

/* ---------- 記事末尾: 編集部名義の制作体制 ---------- */

.expert-box--editorial {
  background: #fcfdfe;
}

.editorial-flow {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 16px;
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.8;
}

.editorial-flow dt {
  color: var(--expert);
  font-weight: 700;
  white-space: nowrap;
}

.editorial-flow dd {
  margin: 0;
  color: var(--text);
}

/* ---------- 編集方針ページ ---------- */

.ep-policy table {
  width: 100%;
  margin: 18px 0;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.ep-policy th,
.ep-policy td {
  padding: 10px 12px;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  line-height: 1.7;
}

.ep-policy thead th {
  background: var(--expert-pale);
  color: var(--expert);
  font-size: 0.8125rem;
  white-space: nowrap;
}

.ep-policy tbody td:first-child {
  width: 8em;
  font-weight: 700;
  color: var(--expert);
  white-space: nowrap;
}

.policy-footer {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-weight: 700;
}

.policy-extra {
  margin-top: 28px;
}

@media (max-width: 560px) {
  .editorial-flow {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .editorial-flow dd {
    margin-bottom: 10px;
  }

  .ep-policy table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .ep-policy td,
  .ep-policy th {
    white-space: normal;
  }
}

@media (max-width: 560px) {
  .byline-main {
    gap: 10px;
  }

  .byline-avatar {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }

  /* 幅が足りないので揃えるのをやめ、ラベルの下に担当者名を折り返す */
  .article-byline .byline-label {
    min-width: 100%;
  }
}
