/* ============================================
   アソビノート  -  base style
   ============================================ */

:root {
  --c-accent:   #12a5b8;   /* ターコイズ（海・空） */
  --c-accent-d: #0a8494;
  --c-sub:      #ff9a3c;   /* サンオレンジ（太陽） */
  --c-sub-d:    #e8801f;
  --c-ink:      #24343d;   /* 文字 */
  --c-ink-soft: #62757f;
  --c-line:     #dfeaf0;
  --c-bg:       #f3fafc;   /* 淡いスカイ */
  --c-card:     #ffffff;
  --shadow:     0 8px 24px rgba(24, 70, 88, .10);
  --shadow-lg:  0 16px 40px rgba(24, 70, 88, .16);
  --radius:     4px;
  --container:  1120px;
  --font: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", system-ui, sans-serif;
  --font-round: "M PLUS Rounded 1c", var(--font);
}

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

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  font-family: var(--font);
  color: var(--c-ink);
  background: #fff;
  line-height: 1.8;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; transition: color .2s, opacity .2s; }
a:hover { color: var(--c-accent); }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
}

/* ========== ヘッダー ==========
   左に検索・中央にロゴ。カテゴリーは左サイド／フッターに置いています。 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--c-line);
  transition: box-shadow .3s;
}
.site-header.is-scrolled { box-shadow: 0 2px 10px rgba(24, 70, 88, .07); }
.header-inner {
  display: grid;
  grid-template-columns: 260px 1fr 260px;
  align-items: center;
  height: 76px;
}
.site-title { grid-column: 2; justify-self: center; margin: 0; font-size: inherit; font-weight: inherit; }
.logo { display: flex; align-items: center; gap: 9px; }
.logo-mark { display: block; }
.logo-text {
  font-family: var(--font-round);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: .06em;
}
.header-search { grid-column: 1; position: relative; max-width: 250px; }
.header-search input {
  width: 100%;
  border: 1px solid var(--c-line);
  border-radius: 4px;
  background: var(--c-bg);
  padding: 9px 38px 9px 14px;
  font-size: .84rem;
  font-family: inherit;
}
.header-search input:focus { outline: 2px solid var(--c-accent); }
.header-search input::placeholder { color: #a8bac3; }
.header-search button {
  position: absolute; right: 0; top: 0; bottom: 0;
  width: 38px; display: grid; place-items: center;
  border: none; background: none; color: var(--c-ink-soft); cursor: pointer;
}
.header-search button:hover { color: var(--c-accent); }

/* スマホ用メニュー */
.nav-toggle { display: none; }
.global-nav { display: none; border-top: 1px solid var(--c-line); background: #fff; padding: 16px 0 20px; }
.global-nav.is-open { display: block; }
.nav-heading {
  font-family: var(--font-round); font-weight: 700; font-size: .9rem;
  margin: 16px 0 6px; padding-bottom: 6px; border-bottom: 2px solid var(--c-line);
}
.nav-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.nav-list a { display: block; padding: 11px 2px; font-size: .88rem; border-bottom: 1px solid var(--c-line); }
.nav-list a:hover { color: var(--c-accent); }
.global-nav .search-form { margin-bottom: 4px; }

/* ========== 注目記事（トップ上部の帯） ========== */
.feature-band { background: var(--c-bg); border-bottom: 1px solid var(--c-line); padding: 26px 0 32px; }
.site-lead { font-size: .84rem; color: var(--c-ink-soft); margin-bottom: 16px; text-align: center; }
.feature-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.fcard { background: #fff; border: 1px solid var(--c-line); border-radius: 4px; overflow: hidden; }
.fcard:hover { border-color: var(--c-accent); }
.fcard a { display: block; height: 100%; }
.fcard-thumb { display: block; position: relative; aspect-ratio: 3/2; background: hsl(var(--h, 190) 55% 88%); overflow: hidden; }
.fcard-body { display: block; padding: 14px 16px 18px; }
.fcard-title {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-weight: 700; font-size: 1rem; line-height: 1.55; margin: 6px 0 8px;
}
.fcard:hover .fcard-title { color: var(--c-accent); }
.fcard-excerpt {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-size: .8rem; color: var(--c-ink-soft); line-height: 1.7;
}
.entry-author { display: block; font-size: .76rem; color: var(--c-ink-soft); margin-top: 10px; }
.entry-cat {
  display: inline-block; font-size: .72rem; font-weight: 700;
  color: var(--c-accent-d); letter-spacing: .04em;
}
.entry-area { display: inline-block; font-size: .72rem; color: var(--c-ink-soft); margin-left: 8px; }
.card-area {
  position: absolute; right: 8px; bottom: 8px; z-index: 1;
  background: rgba(255, 255, 255, .92); color: var(--c-ink);
  font-size: .7rem; font-weight: 700; padding: 2px 9px; border-radius: 3px;
}
.card-area::before { content: "📍"; margin-right: 3px; }

/* ========== セクション見出し（太字＋オレンジの下線） ========== */
.section-title {
  position: relative;
  font-family: var(--font-round);
  font-size: 1.15rem;
  font-weight: 700;
  padding-bottom: 10px;
  margin-bottom: 18px;
  border-bottom: 2px solid var(--c-line);
}
.section-title::after {
  content: ""; position: absolute; left: 0; bottom: -2px;
  width: 68px; height: 2px; background: var(--c-sub);
}
.side-nav .section-title,
.section-sub .section-title { font-size: 1rem; }

/* ========== レイアウト（3カラム / 2カラム） ========== */
.layout { display: grid; gap: 30px; padding-top: 32px; padding-bottom: 64px; align-items: start; }
.layout--3col { grid-template-columns: 180px minmax(0, 1fr) 300px; }
.layout--2col { grid-template-columns: minmax(0, 1fr) 300px; }
.layout-main { min-width: 0; }

/* 左の細いナビ */
.side-nav { position: sticky; top: 96px; }
.side-nav .section-title { margin-bottom: 10px; }
.side-nav-list { margin-bottom: 28px; }
.side-nav-list a {
  display: block; padding: 9px 0; font-size: .84rem;
  border-bottom: 1px dotted var(--c-line);
}
.side-nav-list a:hover { color: var(--c-accent); }

/* ========== 記事の横長リスト ========== */
.entry-list { border-top: 1px solid var(--c-line); }
.entry { border-bottom: 1px solid var(--c-line); }
.entry a { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 18px; padding: 18px 0; }
.entry:hover { background: #fbfdfe; }
.entry-thumb {
  display: block; position: relative; overflow: hidden;
  aspect-ratio: 3/2; border-radius: 3px;
  background: hsl(var(--h, 190) 55% 88%);
}
.entry-body { display: block; min-width: 0; }
.entry-terms { display: block; margin-bottom: 4px; }
.entry-title {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-weight: 700; font-size: 1.02rem; line-height: 1.55; margin-bottom: 6px;
}
.entry:hover .entry-title { color: var(--c-accent); }
.entry-excerpt {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-size: .82rem; color: var(--c-ink-soft); line-height: 1.75;
}
.entry-meta {
  display: flex; gap: 12px; align-items: baseline;
  font-size: .74rem; color: var(--c-ink-soft); margin-top: 8px;
}
.entry-meta .entry-author { margin: 0; }
.entry-list--compact .entry a { grid-template-columns: 130px minmax(0, 1fr); gap: 14px; padding: 14px 0; }
.entry-list--compact .entry-excerpt { display: none; }

/* ========== ページネーション ========== */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 32px; }

/* ========== サイドバー（右） ========== */
.section-sub { margin-bottom: 32px; }

/* サイドバーの記事リスト（サムネ＋タイトル） */
.side-list li { border-bottom: 1px solid var(--c-line); }
.side-list li:last-child { border-bottom: none; }
.side-list a { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; align-items: center; padding: 11px 0; }
.side-list a:hover .side-title { color: var(--c-accent); }
.side-thumb {
  display: block; position: relative; overflow: hidden;
  aspect-ratio: 3/2; border-radius: 3px;
  background: hsl(var(--h, 190) 55% 88%);
}
.side-title {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  font-size: .82rem; font-weight: 500; line-height: 1.55;
}
/* 番号つき（アクセスランキング） */
.side-list--rank { counter-reset: rank; }
.side-list--rank li { counter-increment: rank; }
.side-list--rank .side-thumb::before {
  content: counter(rank);
  position: absolute; left: 0; top: 0; z-index: 2;
  width: 22px; height: 22px;
  display: grid; place-items: center;
  background: var(--c-ink); color: #fff;
  font-family: var(--font-round); font-weight: 700; font-size: .72rem;
}
.side-list--rank li:nth-child(1) .side-thumb::before { background: var(--c-sub); }
.side-list--rank li:nth-child(2) .side-thumb::before { background: var(--c-accent); }
.side-list--rank li:nth-child(3) .side-thumb::before { background: #9fb6c0; }

.cat-list a {
  display: flex; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid var(--c-line); font-size: .86rem;
}
.cat-list li:last-child a { border-bottom: none; }
.cat-list span { color: var(--c-ink-soft); font-size: .78rem; }

.area-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.area-chips a {
  display: inline-block; font-size: .8rem;
  background: var(--c-bg); border: 1px solid var(--c-line);
  border-radius: 3px; padding: 5px 11px;
}
.area-chips a:hover { border-color: var(--c-accent); color: var(--c-accent); }

/* ========== フッター ========== */
.site-footer { background: #e7f2f6; padding: 48px 0 0; margin-top: auto; }
.footer-inner {
  display: grid; grid-template-columns: 1.4fr 2fr; gap: 40px; padding-bottom: 40px;
}
.footer-brand p { font-size: .86rem; color: var(--c-ink-soft); margin-top: 10px; max-width: 300px; }
.footer-nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.footer-nav h3 { font-size: .95rem; margin-bottom: 14px; font-family: var(--font-round); }
.footer-nav li { margin-bottom: 10px; }
.footer-nav a { font-size: .86rem; color: var(--c-ink-soft); }
.footer-bottom {
  border-top: 1px solid #cfe2e9; text-align: center;
  padding: 20px; font-size: .8rem; color: var(--c-ink-soft);
}

/* トップへ戻る */
.to-top {
  position: fixed; right: 20px; bottom: 20px;
  width: 48px; height: 48px; border-radius: 50%; border: none;
  background: var(--c-accent); color: #fff; font-size: 1.2rem; cursor: pointer;
  box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: .3s;
  z-index: 90;
}
.to-top.is-visible { opacity: 1; pointer-events: auto; }
.to-top:hover { background: var(--c-accent-d); }

/* ========== サムネイル・タグ・空表示 ========== */
.fcard-thumb, .entry-thumb, .side-thumb, .post-eyecatch { position: relative; overflow: hidden; }
.thumb-art { position: absolute; inset: 0; display: block; transition: transform .4s cubic-bezier(.2,.7,.2,1); }
.thumb-art svg { width: 100%; height: 100%; display: block; }
.fcard:hover .thumb-art,
.entry:hover .thumb-art { transform: scale(1.05); }
.tag {
  display: inline-block; background: var(--c-accent); color: #fff;
  font-size: .7rem; font-weight: 700; padding: 3px 9px; border-radius: 3px;
}
.tag-sub { background: var(--c-bg); color: var(--c-ink-soft); border: 1px solid var(--c-line); }
.tag-area { background: var(--c-sub); color: #fff; }
a.tag { text-decoration: none; }
a.tag:hover { opacity: .85; }
.empty {
  text-align: center; color: var(--c-ink-soft);
  background: var(--c-bg); border: 1px dashed var(--c-line); padding: 48px 20px;
}

/* エリアのボタン（404ページなど） */
.area-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.area-card {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--c-line); border-radius: 4px; padding: 10px 12px;
  font-size: .86rem; font-weight: 700;
}
.area-card:hover { border-color: var(--c-accent); color: var(--c-accent); }
.area-emoji { flex-shrink: 0; }
.block { margin-bottom: 40px; }

/* ========== 固定ページ・サイトマップ ========== */
.page-static { max-width: 820px; margin: 0 auto; padding-bottom: 72px; }
.page-static .post-title { margin-bottom: 28px; }
.sitemap-block { margin-bottom: 8px; }
.sitemap-block h2 { margin-top: 0; }
.sitemap-list { list-style: none; margin: 0 0 28px; padding: 0; }
.sitemap-list li { border-bottom: 1px dashed var(--c-line); }
.sitemap-list a { display: flex; justify-content: space-between; gap: 12px; padding: 10px 4px; }
.sitemap-list a:hover { color: var(--c-accent); }
.sitemap-list .sitemap-cat { color: var(--c-ink-soft); font-size: .82rem; white-space: nowrap; }

/* ========== パンくず ========== */
.breadcrumb { padding: 16px 0; font-size: .82rem; color: var(--c-ink-soft); }
.breadcrumb .container { display: flex; gap: 8px; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--c-accent); }
.breadcrumb span:not(:last-child) { color: var(--c-line); }

/* ========== カテゴリー／エリア／検索の見出し帯 ========== */
.cat-hero, .search-hero {
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-line);
  padding: 30px 0;
  text-align: center;
}
.cat-hero { background: hsl(var(--h, 190) 55% 96%); }
.cat-hero .cat-ico {
  width: 44px; height: 44px; margin: 0 auto 10px;
  display: grid; place-items: center; font-size: 1.4rem;
  border-radius: 50%; background: #fff;
}
.cat-hero h1, .search-hero h1 { font-family: var(--font-round); font-size: 1.6rem; margin-bottom: 8px; }
.cat-hero p { max-width: 620px; margin: 0 auto; color: var(--c-ink-soft); font-size: .86rem; }
.search-form { display: flex; gap: 8px; }
.search-form input {
  flex: 1; border: 1px solid var(--c-line); border-radius: 4px;
  padding: 11px 16px; font-size: .92rem; font-family: inherit; background: #fff;
}
.search-form input:focus { outline: 2px solid var(--c-accent); }
.search-form button {
  border: none; background: var(--c-accent); color: #fff;
  padding: 0 22px; border-radius: 4px; font-weight: 700; cursor: pointer;
  font-family: var(--font-round); white-space: nowrap;
}
.search-form button:hover { background: var(--c-accent-d); }
.search-form--lg { max-width: 620px; margin: 0 auto; }
.search-summary { margin-top: 14px; color: var(--c-ink-soft); font-size: .88rem; }
.search-summary strong { color: var(--c-accent-d); }

/* ========== 記事本文 ========== */
.post { background: none; border: none; padding: 0; }
.sidebar { min-width: 0; }
.post-tags { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.post-title { font-family: var(--font-round); font-size: clamp(1.5rem, 3.4vw, 2.1rem); line-height: 1.5; margin-bottom: 14px; }
.post-meta { display: flex; gap: 16px; font-size: .82rem; color: var(--c-ink-soft); flex-wrap: wrap; }
.post-eyecatch { aspect-ratio: 16/9; border-radius: 4px; background: hsl(var(--h, 190) 55% 88%); margin: 22px 0 30px; }

.post-body { font-size: 1.02rem; counter-reset: asb-head; }
.post-body h2 {
  font-family: var(--font-round); font-size: 1.4rem; margin: 40px 0 18px;
  padding-bottom: 12px; border-bottom: 3px solid var(--c-line); position: relative;
}
.post-body h2::after { content: ""; position: absolute; left: 0; bottom: -3px; width: 80px; height: 3px; background: var(--c-accent); }
.post-body h3 {
  font-family: var(--font-round); font-size: 1.15rem;
  margin: 32px 0 14px; padding-left: 12px;
  border-left: 4px solid var(--c-sub);
}
.post-body h4 {
  font-family: var(--font-round); font-size: 1.02rem;
  margin: 24px 0 10px; color: var(--c-ink);
}
.post-body p { margin-bottom: 20px; }
.post-body h2 + p, .post-body h3 + p, .post-body h4 + p { margin-top: 0; }
.post-body .lead {
  font-size: 1.08rem; font-weight: 500; background: var(--c-bg);
  padding: 20px; border-radius: 12px; margin-bottom: 32px;
}

/* シェアボタン */
.post-share { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 36px; font-size: .85rem; color: var(--c-ink-soft); }
.share-btn {
  display: inline-block; font-size: .8rem; font-weight: 700;
  padding: 7px 18px; border-radius: 999px;
  border: 1.5px solid var(--c-line); background: #fff;
}
.share-btn:hover { border-color: var(--c-accent); color: var(--c-accent); }

/* 著者情報ボックス */
.author-box {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--c-bg); border: 1.5px solid var(--c-line);
  border-radius: var(--radius); padding: 20px; margin-top: 32px;
}
.author-avatar {
  flex: 0 0 64px; width: 64px; height: 64px; border-radius: 50%;
  overflow: hidden; background: #e2f4f8; border: 1.5px solid #b9e2ea;
  display: grid; place-items: center; font-size: 30px;
}
.author-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.author-avatar img[src$=".svg"] { width: 74%; height: 74%; border-radius: 0; }
.author-info { min-width: 0; }
.author-label {
  display: inline-block; font-size: .72rem; font-weight: 700;
  color: #fff; background: var(--c-accent);
  padding: 2px 12px; border-radius: 999px; margin: 0 0 8px;
}
.author-role { font-size: .76rem; color: var(--c-ink-soft); margin: 0; }
.author-name { font-family: var(--font-round); font-weight: 700; font-size: 1.05rem; margin: 0 0 6px; }
.author-bio { font-size: .88rem; color: var(--c-ink-soft); line-height: 1.7; margin: 0; }
.author-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
/* .post-body a の下線を打ち消すため、あえて .post-body 付きで指定しています */
.author-link,
.post-body .author-link {
  font-size: .76rem; font-weight: 700;
  padding: 4px 14px; border-radius: 999px;
  border: 1.5px solid var(--c-line); background: #fff; color: var(--c-ink-soft);
  text-decoration: none;
}
.author-link:hover,
.post-body .author-link:hover { border-color: var(--c-accent); color: var(--c-accent); }
.author-link--instagram::before { content: "📷"; margin-right: 4px; }
.author-link--website::before { content: "🔗"; margin-right: 4px; }
@media (max-width: 600px) {
  .author-box { flex-direction: column; gap: 12px; }
}

/* ========== WordPress 用の調整 ========== */
.asb-thumb-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform .5s cubic-bezier(.2,.7,.2,1);
}
.fcard:hover .asb-thumb-img,
.entry:hover .asb-thumb-img { transform: scale(1.05); }

.custom-logo { width: 36px; height: 36px; display: block; border-radius: 8px; }

.pagination ul.page-numbers { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; padding: 0; list-style: none; }
.pagination .page-numbers {
  min-width: 42px; height: 42px; display: grid; place-items: center;
  border-radius: 3px; border: 1px solid var(--c-line); background: #fff;
  font-weight: 700; padding-inline: 12px; font-family: var(--font-round);
}
.pagination a.page-numbers:hover { border-color: var(--c-accent); color: var(--c-accent); }
.pagination .page-numbers.current { background: var(--c-accent); color: #fff; border-color: var(--c-accent); }
.pagination .page-numbers.dots { border: none; background: transparent; }

.post-body img { border-radius: 12px; height: auto; margin: 8px 0; }
.post-body ul:not([class*="-list"]),
.post-body ol:not([class*="-list"]) { margin: 0 0 20px 1.4em; }
.post-body ul:not([class*="-list"]) { list-style: disc; }
.post-body ol:not([class*="-list"]) { list-style: decimal; }
.post-body li { margin-bottom: 8px; }
.post-body a { color: var(--c-accent-d); text-decoration: underline; }
.post-body blockquote {
  margin: 24px 0; padding: 16px 22px; background: var(--c-bg);
  border-left: 5px solid var(--c-sub); border-radius: 0 12px 12px 0; color: var(--c-ink-soft);
}
.post-body .wp-block-image { margin: 24px 0; }
.post-body figure { margin: 24px 0; }
.post-body figcaption,
.post-body .wp-block-image figcaption { font-size: .82rem; color: var(--c-ink-soft); text-align: center; margin-top: 8px; }
.post-body .aligncenter, .post-body .wp-block-image.aligncenter { margin-left: auto; margin-right: auto; text-align: center; }
.post-body .alignleft  { float: left;  margin: 8px 24px 16px 0; max-width: 50%; }
.post-body .alignright { float: right; margin: 8px 0 16px 24px; max-width: 50%; }
.post-body .alignwide, .post-body .alignfull { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); max-width: 100vw; }
.post-body .wp-block-separator { border: none; border-top: 2px dashed var(--c-line); margin: 40px auto; max-width: 200px; }
.post-body .wp-block-embed, .post-body .wp-block-embed__wrapper { margin: 24px 0; }
.post-body .wp-block-buttons { margin: 24px 0; }
.post-body .wp-block-button__link { border-radius: 999px; background: var(--c-accent); }
.post-body .wp-block-code, .post-body pre {
  background: #eef5f8; border: 1px solid var(--c-line); border-radius: 12px;
  padding: 16px 18px; overflow-x: auto; font-size: .86rem; margin: 24px 0;
}

.search-form button { white-space: nowrap; }

.admin-bar .site-header { top: 32px; }
@media screen and (max-width: 782px) { .admin-bar .site-header { top: 46px; } }

/* ========== アクセシビリティ ========== */
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}
.skip-link:focus {
  position: fixed !important;
  top: 8px; left: 8px;
  width: auto; height: auto;
  clip: auto; clip-path: none;
  z-index: 200;
  padding: 10px 18px;
  background: var(--c-card); color: var(--c-ink);
  border-radius: 10px; box-shadow: var(--shadow);
}
:focus-visible { outline: 3px solid var(--c-sub); outline-offset: 2px; }

.post-body h2, .post-body h3, .post-body h4 { scroll-margin-top: 90px; }
#comments, .related { scroll-margin-top: 90px; }

/* ========== 目次 ========== */
.asb-toc {
  margin: 8px 0 36px;
  padding: 20px 24px;
  background: var(--c-bg);
  border: 1.5px solid var(--c-line);
  border-radius: var(--radius);
}
.asb-toc-title {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-round); font-weight: 700; font-size: 1.05rem;
  margin: 0 0 12px;
}
.asb-toc-title::before { content: "🗺"; }
/* 開閉ボタンだけを右端に寄せる（アイコンと見出しは左でくっつける） */
.asb-toc-toggle { margin-left: auto; }
.asb-toc-toggle {
  font: inherit; font-size: .78rem; font-weight: 500;
  padding: 4px 12px; border-radius: 999px;
  border: 1px solid var(--c-line); background: var(--c-card); color: var(--c-ink-soft);
  cursor: pointer; transition: border-color .2s, color .2s;
}
.asb-toc-toggle:hover { border-color: var(--c-accent); color: var(--c-accent); }
.asb-toc-list { counter-reset: toc; margin: 0; padding: 0; list-style: none; }
.asb-toc.is-closed .asb-toc-list { display: none; }
.asb-toc-list li { margin: 0; line-height: 1.7; }
.asb-toc-list a {
  display: block; padding: 6px 0 6px 30px; position: relative;
  font-size: .92rem; color: var(--c-ink); text-decoration: none;
}
.asb-toc-list a:hover { color: var(--c-accent); }
.asb-toc-list .toc-lv2 { counter-increment: toc; }
.asb-toc-list .toc-lv2 > a { font-weight: 700; }
.asb-toc-list .toc-lv2 > a::before {
  content: counter(toc);
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 21px; height: 21px; border-radius: 50%;
  background: var(--c-accent); color: #fff;
  font-size: .7rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.asb-toc-list .toc-lv3 > a { padding-left: 52px; font-size: .86rem; color: var(--c-ink-soft); }
.asb-toc-list .toc-lv3 > a::before {
  content: ""; position: absolute; left: 32px; top: 50%;
  width: 10px; height: 1px; background: var(--c-line);
}

/* ========== 記事メタ・タグ ========== */
.post-meta .reading-time::before { content: "⏱ "; }
a.tag { text-decoration: none; }
a.tag:hover { opacity: .85; color: #fff; }
.tag-accent { background: var(--c-sub); color: #fff; }

/* ========== 前後の記事 ========== */
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 40px; }
.post-nav-item {
  display: block; padding: 16px 20px;
  background: var(--c-card); border: 1px solid var(--c-line); border-radius: var(--radius);
  transition: border-color .2s, box-shadow .2s;
}
.post-nav-item:hover { border-color: var(--c-accent); box-shadow: var(--shadow); }
.post-nav-next { grid-column: 2; text-align: right; }
.post-nav-label { display: block; font-size: .76rem; color: var(--c-ink-soft); margin-bottom: 6px; }
.post-nav-title {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-size: .9rem; font-weight: 700; line-height: 1.6;
}

/* ========== コメント ========== */
.comments-area { margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--c-line); }
.comment-list, .comment-list .children { list-style: none; margin: 0 0 32px; padding: 0; }
.comment-list .children { margin-left: 24px; padding-left: 20px; border-left: 2px solid var(--c-line); }
.comment-list .comment-body {
  background: var(--c-card); border: 1px solid var(--c-line); border-radius: var(--radius);
  padding: 18px 22px; margin-bottom: 16px;
}
.comment-list .comment-author { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: .92rem; }
.comment-list .comment-author img { border-radius: 50%; }
.comment-list .comment-metadata { font-size: .76rem; color: var(--c-ink-soft); margin: 4px 0 10px; }
.comment-list .comment-content { font-size: .94rem; }
.comment-list .reply { font-size: .82rem; margin-top: 8px; }
.comment-list .reply a { color: var(--c-accent-d); font-weight: 700; }
.comment-respond { background: var(--c-bg); border: 1.5px solid var(--c-line); border-radius: var(--radius); padding: 24px; }
.comment-respond .comment-reply-title { font-family: var(--font-round); font-size: 1.15rem; margin-bottom: 8px; }
.comment-notes, .comment-form-cookies-consent label { font-size: .8rem; color: var(--c-ink-soft); }
.comment-form label { display: block; font-size: .84rem; font-weight: 700; margin-bottom: 6px; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%; font: inherit; font-size: .92rem;
  padding: 10px 14px; margin-bottom: 16px;
  background: var(--c-card); border: 1px solid var(--c-line); border-radius: 10px;
}
.comment-form textarea { resize: vertical; }
.comment-form .comment-submit,
.comment-form input[type="submit"] {
  font: inherit; font-weight: 700; cursor: pointer;
  padding: 12px 32px; border: none; border-radius: 999px;
  background: var(--c-accent); color: #fff; transition: opacity .2s;
}
.comment-form .comment-submit:hover,
.comment-form input[type="submit"]:hover { opacity: .85; }

/* ========== 404 ========== */
.error-code {
  font-family: var(--font-round); font-weight: 700;
  font-size: 3.4rem; line-height: 1; color: var(--c-accent); opacity: .5;
  margin-bottom: 4px;
}
.cat-list--wide { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 24px; }

/* ========== アーカイブ ========== */
.archive-paged { font-size: .84rem; color: var(--c-ink-soft); margin-top: 6px; }

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

/* タブレット：3カラム → 左ナビを畳んで2カラムに */
@media (max-width: 1040px) {
  .layout--3col { grid-template-columns: minmax(0, 1fr) 280px; }
  .layout--2col { grid-template-columns: minmax(0, 1fr) 280px; }
  .side-nav {
    grid-column: 1 / -1;
    position: static;
    display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px;
  }
  .side-nav .section-title { grid-column: 1 / -1; }
  .side-nav-list { margin-bottom: 12px; }
  .side-nav-list a { padding: 8px 0; }
}

/* ヘッダー：中央ロゴ＋ハンバーガー */
@media (max-width: 900px) {
  .header-inner { grid-template-columns: 1fr auto 1fr; height: 62px; }
  .header-search { display: none; }
  .nav-toggle {
    grid-column: 3; justify-self: end;
    display: flex; flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer; padding: 6px;
  }
  .nav-toggle span { width: 22px; height: 2px; background: var(--c-ink); border-radius: 2px; transition: .3s; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .logo-text { font-size: 1.15rem; }
  .feature-row { grid-template-columns: 1fr 1fr; }
  .feature-row .fcard:nth-child(3) { display: none; }
  .footer-nav { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .post-body .alignwide, .post-body .alignfull { margin-left: 0; margin-right: 0; max-width: 100%; }
  .post-body .alignleft, .post-body .alignright { float: none; margin: 24px 0; max-width: 100%; }
}

/* スマホ：1カラム */
@media (max-width: 760px) {
  .layout { grid-template-columns: 1fr !important; gap: 40px; padding-top: 24px; }
  .side-nav { display: block; }
  .side-nav-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; margin-bottom: 24px; }
  .feature-row { grid-template-columns: 1fr; gap: 14px; }
  .feature-row .fcard:nth-child(3) { display: block; }
  .fcard a { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 14px; }
  .fcard-thumb { border-radius: 0; }
  .fcard-body { padding: 12px 14px 12px 0; }
  .fcard-title { font-size: .92rem; margin-top: 2px; }
  .fcard-excerpt, .fcard .entry-author, .fcard .card-area { display: none; }
  .entry a { grid-template-columns: 120px minmax(0, 1fr); gap: 12px; padding: 14px 0; }
  .entry-title { font-size: .92rem; }
  .entry-excerpt { display: none; }
  .area-grid { grid-template-columns: repeat(2, 1fr); }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav-next { grid-column: 1; text-align: left; }
  .post-body .lead { padding: 16px; }
  .entry-list--compact .entry a { grid-template-columns: 100px minmax(0, 1fr); }
}

/* ============================================================
   記事内の装飾パーツ（マーカー・ボックス・吹き出し・リスト・表など）は
   assets/decorations.css にまとめています。
   編集画面とフロントで同じファイルを読み込むことで、
   「書いているときの見た目」と「公開後の見た目」を一致させています。
   ============================================================ */
