/* ============================================================
   Japonica Lore — サイト全体の土台（全ページ）
   Cocoon 2.4 系・2.9 系のどちらでも効くよう、Cocoon の CSS 変数には依存せず直接上書きする。
   セレクタは body.jl-theme を起点にし、Cocoon の .ff-* / .fz-* より優先させる。
   モバイルを基準に書き、広い画面は min-width で上書きする。
   ============================================================ */

body.jl-theme {
  background-color: var(--jl-kinari);
  color: var(--jl-sumi);
  font-family: var(--jl-font-serif);
  font-size: var(--jl-text);
  line-height: var(--jl-leading);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.jl-theme :lang(ja) {
  font-family: var(--jl-font-ja);
}

.jl-theme ::selection {
  background-color: var(--jl-shu);
  color: var(--jl-paper);
}

/* リンク：朱。下線は常に表示（色だけに頼らない）
   :where() で詳細度を a 要素と同じにし、Cocoon の部品（.a-wrap のカード、.tag-link、
   SNS ボタンなど）がクラスで指定した色は上書きしない。 */
:where(body.jl-theme) a {
  color: var(--jl-shu);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
:where(body.jl-theme) a:hover {
  color: var(--jl-sumi);
}
.jl-theme a:focus-visible {
  outline: 2px solid var(--jl-shu-bright);
  outline-offset: 2px;
}

/* ---------- ヘッダー：墨地で重厚に ---------- */
.jl-theme .header-container,
.jl-theme .header,
.jl-theme .header-in,
.jl-theme .mobile-header-menu-buttons {
  background-color: var(--jl-sumi-deep);
  color: var(--jl-on-sumi);
}
.jl-theme .header-container {
  border-bottom: 3px double var(--jl-shu-bright);
}
.jl-theme .site-name-text,
.jl-theme .logo-text a,
.jl-theme .site-name-text-link {
  color: var(--jl-on-sumi);
  font-family: var(--jl-font-display);
  letter-spacing: 0.06em;
  text-decoration: none;
}
.jl-theme .tagline {
  color: var(--jl-on-sumi-soft);
  font-style: italic;
  letter-spacing: 0.04em;
}
.jl-theme .mobile-header-menu-buttons .menu-button > a,
.jl-theme .mobile-header-menu-buttons .menu-button > label,
.jl-theme .mobile-header-menu-buttons .menu-icon,
.jl-theme .mobile-header-menu-buttons .menu-caption {
  color: var(--jl-on-sumi);
}

/* グローバルナビ */
.jl-theme .navi,
.jl-theme .navi-in > ul,
.jl-theme .navi-in .sub-menu {
  background-color: var(--jl-sumi-deep);
}
.jl-theme .navi-in a {
  color: var(--jl-on-sumi);
  font-family: var(--jl-font-serif);
  letter-spacing: 0.05em;
  text-decoration: none;
}
.jl-theme .navi-in a:hover {
  background-color: transparent;
  color: var(--jl-shu-on-sumi);
}

/* ---------- 本文エリア・サイドバー ---------- */
.jl-theme .content {
  margin-top: var(--jl-space-4);
}
.jl-theme .main,
.jl-theme .sidebar {
  background-color: var(--jl-paper);
  border: 1px solid var(--jl-line);
  border-radius: var(--jl-radius);
}
.jl-theme .sidebar h2,
.jl-theme .sidebar h3,
.jl-theme .widget-sidebar-title {
  background: none;
  color: var(--jl-sumi);
  border-bottom: 1px solid var(--jl-line-strong);
  font-family: var(--jl-font-serif);
  letter-spacing: 0.04em;
  padding: 0 0 var(--jl-space-2);
}

/* パンくず・日付などの補助テキスト */
.jl-theme .breadcrumb,
.jl-theme .date-tags,
.jl-theme .post-date,
.jl-theme .post-update {
  color: var(--jl-sumi-soft);
  font-size: var(--jl-text-xs);
}
.jl-theme .breadcrumb a {
  color: var(--jl-sumi-soft);
}

/* カテゴリーラベル：展示札風 */
.jl-theme .cat-label,
.jl-theme .cat-link {
  background-color: var(--jl-sumi);
  border: none;
  border-radius: 0;
  color: var(--jl-on-sumi);
  font-family: var(--jl-font-ui);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ---------- フッター ---------- */
.jl-theme .footer {
  background-color: var(--jl-sumi-deep);
  color: var(--jl-on-sumi-soft);
  border-top: 3px double var(--jl-shu-bright);
  margin-top: var(--jl-space-7);
}
.jl-theme .footer a,
.jl-theme .footer .navi-footer-in a {
  color: var(--jl-on-sumi);
}
.jl-theme .footer h2,
.jl-theme .footer h3 {
  color: var(--jl-on-sumi);
  background: none;
}
.jl-theme .copyright {
  color: var(--jl-on-sumi-soft);
  letter-spacing: 0.04em;
}

/* 動きを減らす設定のユーザーにはアニメーションを止める */
@media (prefers-reduced-motion: reduce) {
  .jl-theme *,
  .jl-theme *::before,
  .jl-theme *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- 広い画面 ---------- */
@media screen and (min-width: 835px) {
  .jl-theme .content {
    margin-top: var(--jl-space-6);
  }
}
