/* ---- style.css ---- */
/*
 * Rayne-Lab stylesheet v0.7
 * Modern editorial / research-lab direction.
 * Black × gold base with restrained vermilion seal accents.
 */

/* WEB-177: フォントの読み込みは postprocess_site.py が <head> に入れる <link> へ移した。
   CSS内の @import だと「style.css を取得 → 解析 → フォントCSSを取得 → 書体ファイルを取得」と
   直列3ホップになり、最初の描画がそのぶん遅れる。<link> なら style.css と並行して取りに行ける。
   ここに @import を書き戻さないこと（tests/web-177-font-loading-contract.mjs が検知する）。 */

:root {
  --ink: #09090b;
  --ink-raised: #101013;
  --ink-soft: #151519;
  --panel: rgba(22, 22, 26, 0.72);
  --panel-hover: rgba(27, 27, 32, 0.9);
  --fg: #f0eee9;
  --fg-soft: #ccc8bf;
  --muted: #8e8b84;
  /* WEB-173: #66645f はコントラスト比3.37で、0.62〜0.72remの小さい文字に使っていたためAA(4.5)未達だった。色味は保ったまま明度だけ上げて4.85にした。 */
  --muted-2: #807d77;
  --gold: #d2aa4d;
  --gold-bright: #e3bf68;
  --gold-soft: #927437;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.15);
  --stamp-border: #9f4939;
  --stamp-text: #cf6852;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.28);

  /* Global heading controls. Change these three values to recolor headings site-wide. */
  --heading-h1: var(--fg);
  --heading-h2: var(--fg);
  --heading-h3: var(--fg-soft);

  --gogyo-moku: #6f9457;
  --gogyo-ka: #c65c45;
  --gogyo-do: #b98d4a;
  --gogyo-kin: #c9c9d1;
  --gogyo-sui: #577fad;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--ink);
  color: var(--fg);
  font-family: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Hiragino Sans", sans-serif;
  /* WEB-179: 15px → 16px。390px幅で実測した6サイト（Wikipedia日本語版・サイボウズ式・
     GIGAZINE・note・MDN・16Personalities）はすべて本文16pxで、Rayne-Labだけが小さかった。
     日本語は画数が多いぶん、同じサイズでも英字より潰れて見える。
     字送りも 0.015em → 0.03em。ほぼ0だと字面が締まらない（サイボウズ式は0.6px≒0.0375em）。 */
  font-size: 16px;
  line-height: 1.85;
  letter-spacing: 0.03em;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: rgba(210, 170, 77, 0.28);
  color: #fff;
}

.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 4%, rgba(210, 170, 77, 0.075), transparent 26rem),
    radial-gradient(circle at 92% 28%, rgba(159, 73, 57, 0.055), transparent 24rem),
    linear-gradient(rgba(255,255,255,0.014) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.014) 1px, transparent 1px);
  background-size: auto, auto, 56px 56px, 56px 56px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.75), transparent 88%);
}

h1, h2, h3 {
  font-family: "Shippori Mincho", serif;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-wrap: balance;
}

/* 見出しの改行ルール（2026-09-22）：日本語を単語の途中で折り返さない。
 * 対応ブラウザは文節単位で改行（auto-phrase）、非対応は語をまとめて折り、
 * どうしても入らない時だけ任意位置で折る。 */
h1, h2, h3, h4 {
  word-break: keep-all;
  overflow-wrap: anywhere;
  line-break: strict;
}
@supports (word-break: auto-phrase) {
  h1, h2, h3, h4 { word-break: auto-phrase; overflow-wrap: normal; }
}

h1 { color: var(--heading-h1); }
h2 { color: var(--heading-h2); }
h3 { color: var(--heading-h3); }
a { color: inherit; }

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--gold);
  font-size: 0.69rem;
  font-weight: 600;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: rgba(9, 9, 11, 0.82);
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
}

.header-inner {
  width: min(1180px, calc(100% - 48px));
  height: 74px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  font-family: "Shippori Mincho", serif;
}

.brand-mark {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(210,170,77,.55);
  color: var(--gold-bright);
  font-size: 0.82rem;
  line-height: 1;
  transform: rotate(45deg);
}

.brand-mark::first-letter { transform: rotate(-45deg); }
.brand-name {
  color: var(--fg);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0.07em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.48rem;
}

.site-nav a {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(159,73,57,.8);
  border-radius: 50%;
  color: var(--stamp-text);
  text-decoration: none;
  font-family: "Shippori Mincho", serif;
  font-size: 0.95rem;
  background: rgba(159,73,57,0.02);
  transition: color .18s ease, background-color .18s ease, border-color .18s ease, transform .18s ease;
}

.site-nav a:hover {
  color: #f0d4cd;
  border-color: var(--stamp-text);
  background: rgba(159,73,57,.17);
  transform: translateY(-2px);
}

/* Main shell */
.site-main {
  /* Default (hub / subcategory / article pages, everything except the top page):
     match the article reading column (920px) so the breadcrumb bar and page
     content line up at the same left/right edge site-wide. The home page keeps
     its own wider layout via body.is-home below. */
  width: min(920px, calc(100% - 48px));
  min-height: calc(100vh - 170px);
  margin: 0 auto;
  padding: 72px 0 96px;
}

body.is-home .site-main {
  width: min(1120px, calc(100% - 48px));
}

/* Home */
.home-hero {
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 46px 0 72px;
  border-bottom: 1px solid var(--border);
}

.home-hero h1 {
  margin: 0;
  max-width: 900px;
  font-size: clamp(3.7rem, 8vw, 7.4rem);
  line-height: 0.97;
  letter-spacing: -0.035em;
  font-weight: 600;
}

.home-hero h1 span {
  color: transparent;
  -webkit-text-stroke: 1px rgba(210,170,77,.72);
  text-stroke: 1px rgba(210,170,77,.72);
}

.hero-lead {
  max-width: 720px;
  margin: 2rem 0 0;
  color: var(--fg-soft);
  font-size: clamp(1rem, 1.9vw, 1.16rem);
  line-height: 1.9;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.2rem;
  align-items: center;
  margin-top: 2rem;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .26rem .66rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--fg-soft);
  font-size: .68rem;
  letter-spacing: .12em;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 12px rgba(210,170,77,.7);
}

.home-section,
.hub-section {
  padding-top: 56px;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  align-items: end;
  gap: 2rem;
  margin-bottom: 28px;
}

.section-heading.compact {
  grid-template-columns: 1fr;
  margin-bottom: 18px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.65rem, 3vw, 2.2rem);
}

.section-heading > p {
  margin: 0 0 .15rem;
  color: var(--muted);
  font-size: .9rem;
  text-align: right;
}

.category-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--border);
}

.category-list li { border-bottom: 1px solid var(--border); }
.category-list li:nth-child(odd) { border-right: 1px solid var(--border); }

.category-list a {
  min-height: 150px;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 1.1rem;
  padding: 1.55rem 1.65rem;
  text-decoration: none;
  transition: background-color .2s ease;
}

.category-list a:hover { background: rgba(255,255,255,.025); }

.category-index,
.list-index {
  color: var(--muted-2);
  font: 500 .66rem/1 "Noto Sans JP", sans-serif;
  letter-spacing: .12em;
}

.category-card-main {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.category-card-main strong {
  color: var(--gold-bright);
  font-family: "Shippori Mincho", serif;
  font-size: 2.05rem;
  font-weight: 600;
  line-height: 1.15;
}

.category-card-main small {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 400;
}

.category-card-meta {
  color: var(--fg-soft);
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
}

.category-card-meta em {
  margin-left: .2rem;
  color: var(--muted);
  font-style: normal;
  font-size: .65rem;
}

.category-arrow,
.list-arrow {
  color: var(--muted-2);
  font-size: .92rem;
  transition: color .18s ease, transform .18s ease;
}

.category-list a:hover .category-arrow,
.article-list a:hover .list-arrow {
  color: var(--gold);
  transform: translate(2px,-2px);
}

/* Category hub */
.page-head {
  padding: 26px 0 50px;
  border-bottom: 1px solid var(--border);
}

.page-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
}

.page-head h1 {
  margin: 0;
  font-size: clamp(3.6rem, 8vw, 6.8rem);
  line-height: 1;
  letter-spacing: -.025em;
}

.page-lead {
  max-width: 720px;
  margin: 1.45rem 0 0;
  color: var(--muted);
  /* WEB-179: リード文も本文と同じ16pxへ。カテゴリのハブで最初に読まれる文章が
     本文より小さいのは逆。 */
  font-size: 1rem;
}

.count-badge {
  flex: 0 0 auto;
  margin-bottom: .6rem;
  color: var(--muted);
  /* WEB-195: .68rem(10.88px) → .75rem(12px)。件数はカテゴリの規模を伝える情報。 */
  font-size: .75rem;
  letter-spacing: .12em;
}

.subcategory-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.subcategory-card {
  min-height: 200px;
  display: flex;
  flex-direction: column;
  padding: 1.45rem;
  border: 1px solid var(--border);
  background: linear-gradient(145deg, rgba(255,255,255,.028), rgba(255,255,255,.012));
  text-decoration: none;
  transition: transform .22s ease, border-color .22s ease, background-color .22s ease, box-shadow .22s ease;
}

.subcategory-card:hover {
  transform: translateY(-4px);
  border-color: rgba(210,170,77,.42);
  background: rgba(210,170,77,.035);
  box-shadow: var(--shadow);
}

.subcategory-topline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.subcategory-title {
  color: var(--fg);
  font-family: "Shippori Mincho", serif;
  font-size: 1.2rem;
  font-weight: 600;
}

.subcategory-count {
  color: var(--gold);
  font-size: .68rem;
  white-space: nowrap;
}

.subcategory-desc {
  margin-top: .9rem;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.75;
}

.subcategory-link {
  margin-top: auto;
  padding-top: 1.25rem;
  color: var(--muted-2);
  /* WEB-195: .62rem(9.92px) → .75rem(12px)。
     カテゴリハブのカードで「VIEW INDEX ↗」はそのカテゴリへ入る唯一のCTAなのに
     9.92px で、ページ内で最も小さい文字のひとつだった。押す前提の文字を最小にしない。 */
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .12em;
}

.subcategory-link b {
  color: var(--gold);
  font-weight: 400;
  margin-left: .3rem;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  gap: .45rem;
  align-items: center;
  flex-wrap: wrap;
  margin: 0 0 1.6rem;
  color: var(--muted-2);
  font-size: .72rem;
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}
.breadcrumb a:hover { color: var(--gold); }

/* Article lists */
.article-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--border);
}

.article-list li {
  position: relative;
  padding: 0;
  border-bottom: 1px solid var(--border);
}

.article-list li > a {
  min-height: 72px;
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem .15rem;
  text-decoration: none;
}

.indexed-list li > a {
  grid-template-columns: 42px minmax(0,1fr) auto;
  padding-bottom: .45rem;
}

.list-title {
  color: var(--fg-soft);
  font-family: "Shippori Mincho", serif;
  font-size: 1rem;
  transition: color .18s ease;
}

.article-list a:hover .list-title { color: var(--gold-bright); }

.list-meta {
  margin: 0 0 .7rem 42px;
  /* WEB-184: 9.92px では一覧の更新日が読めなかったため 12px を下限にする */
  font-size: .75rem !important;
  letter-spacing: .08em;
}

.tool-list .meta {
  max-width: 760px;
  margin: -.3rem 0 1rem;
}

.meta {
  color: var(--muted);
  font-size: .78rem;
}

.empty-state {
  margin-top: 48px;
  padding: 56px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.empty-state span { color: var(--gold-soft); font-size: .66rem; letter-spacing: .18em; }
.empty-state p { color: var(--muted); }

/* Article page */
.article-shell {
  width: min(760px, 100%);
  margin: 0 auto;
}

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

.article-header h1 {
  margin: .35rem 0 1.4rem;
  font-size: clamp(2rem, 5.2vw, 3.35rem);
  line-height: 1.32;
  letter-spacing: -.01em;
}

.article-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  color: var(--muted-2);
  /* WEB-194: .65rem(10.4px) → .75rem(12px)。
     実測で記事ページに12px未満のテキストが13箇所あり、そのうち「更新 2026-09-18」は
     読者が記事の鮮度を判断する情報なのに10.4pxだった。12pxを本文周辺テキストの下限とする。 */
  font-size: .75rem;
  letter-spacing: .1em;
}

.article-body {
  padding-top: 42px;
  color: #d8d5ce;
  /* WEB-179: .96rem(15.4px) → 1rem(16px)。行間は 2.05 → 1.85。
     16px で 1.7〜1.9 が読みやすい帯。小さい字に広い行間だと行が離れすぎて、
     目が次の行を探すことになる（note も行間2.0だが本文は16px）。 */
  font-size: 1rem;
  line-height: 1.85;
}

.article-body > p:first-child { margin-top: 0; }

.article-body h2 {
  margin: 3.7rem 0 1.2rem;
  padding-left: 1rem;
  border-left: 2px solid var(--gold-soft);
  /* WEB-179: 本文16pxに対して 1.6〜1.8倍。修正前は 1.45倍しかなく、
     見出しと本文の落差が足りずに記事がのっぺり続いて見えていた。 */
  font-size: clamp(1.6rem, 3.4vw, 1.8rem);
  line-height: 1.45;
}

.article-body h3 {
  margin: 2.6rem 0 .9rem;
  /* WEB-179: 1.06rem(17px) → 1.25rem(20px)。修正前は本文の1.14倍で、
     h3が見出しに見えていなかった（MDN 1.50倍 / 16Personalities 1.38倍）。 */
  font-size: 1.25rem;
  line-height: 1.55;
}

.article-body p { margin: 1.15rem 0; }
.article-body strong { color: #f0e8d5; font-weight: 600; }
.article-body em { color: var(--fg-soft); }

.article-body a {
  color: var(--gold-bright);
  text-decoration-thickness: 1px;
  text-underline-offset: .22em;
  text-decoration-color: rgba(210,170,77,.45);
}
.article-body a:hover { text-decoration-color: var(--gold); }

.article-body ul,
.article-body ol {
  padding-left: 1.35rem;
  margin: 1.25rem 0;
}
.article-body li { padding-left: .15rem; margin: .38rem 0; }
.article-body li::marker { color: var(--gold-soft); }

.article-body blockquote {
  margin: 2rem 0;
  padding: .9rem 1.2rem;
  border-left: 2px solid var(--gold-soft);
  background: rgba(255,255,255,.018);
  color: var(--fg-soft);
}

.article-body hr {
  height: 1px;
  border: 0;
  background: var(--border);
  margin: 3rem 0;
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.8rem 0;
  font-size: .84rem;
}
.article-body th,
.article-body td {
  padding: .75rem .8rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.article-body th { color: var(--gold); font-weight: 500; }

.source-note {
  margin-top: 3rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--border);
  color: var(--muted-2);
  font-size: .7rem;
  line-height: 1.7;
}
.source-note a { color: var(--muted); text-underline-offset: .16em; }
.source-note a:hover { color: var(--gold); }

.article-footer {
  margin-top: 56px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
}

.tags {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}
.tags li {
  padding: .26rem .62rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: .68rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  color: var(--muted-2);
}
.footer-inner {
  width: min(1120px, calc(100% - 48px));
  min-height: 92px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: .62rem;
  letter-spacing: .12em;
}
.footer-rule { flex: 1; height: 1px; background: var(--border); }

@media (max-width: 900px) {
  .subcategory-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .category-list { grid-template-columns: 1fr; }
  .category-list li:nth-child(odd) { border-right: 0; }
  .section-heading { grid-template-columns: 1fr; gap: .7rem; }
  .section-heading > p { text-align: left; }
}

@media (max-width: 680px) {
  /* WEB-179: モバイルだけ14pxまで下げていた。本文は端末を問わず16pxで揃える。 */
  body { font-size: 16px; }
  .header-inner,
  .site-main,
  .footer-inner { width: min(100% - 28px, 1120px); }
  .header-inner { height: 64px; }
  .brand-name { display: none; }
  .brand-mark { width: 27px; height: 27px; }
  .site-nav { gap: .28rem; }
  .site-nav a { width: 31px; height: 31px; font-size: .83rem; }
  .site-main { padding: 50px 0 72px; }
  .home-hero { min-height: 350px; padding: 36px 0 52px; }
  .home-hero h1 { font-size: clamp(3.25rem, 18vw, 5.4rem); }
  .hero-lead { font-size: 1rem; }
  .category-list a { min-height: 118px; grid-template-columns: 24px 1fr auto; padding: 1.2rem .2rem; }
  .category-card-main strong { font-size: 1.7rem; }
  .category-arrow { display: none; }
  .page-head { padding-top: 10px; }
  .page-head-row { display: block; }
  .page-head h1 { font-size: clamp(3.1rem, 18vw, 5rem); }
  .count-badge { display: inline-block; margin-top: 1rem; }
  .subcategory-grid { grid-template-columns: 1fr; }
  .subcategory-card { min-height: 165px; }
  .article-header h1 { font-size: clamp(1.85rem, 9vw, 2.55rem); }
  .article-body { font-size: 1rem; line-height: 1.85; }
  .article-body h2 { margin-top: 3rem; }
  .indexed-list li > a { grid-template-columns: 34px minmax(0,1fr) auto; }
  .list-meta { margin-left: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* === 五行観測モデル シリーズ導線 (WEB-0437〜0446) ============================ */

.series-toc {
  margin: 1.6rem 0 2.2rem;
  padding: 1.1rem 1.3rem 1.3rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.015);
}

.series-list {
  margin: 0;
  padding: 0;
  display: grid;
  gap: .55rem;
}

.series-item {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: .7rem;
  row-gap: .1rem;
  align-items: baseline;
  padding: .4rem .55rem;
  border-radius: 6px;
}

.series-item.is-current {
  background: rgba(210, 170, 77, 0.08);
  border: 1px solid rgba(210, 170, 77, 0.28);
}

.series-badge {
  grid-row: 1 / 3;
  align-self: center;
  min-width: 4.4em;
  padding: .18rem .45rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--gold-soft);
  font-size: .64rem;
  letter-spacing: .04em;
  text-align: center;
  white-space: nowrap;
}

.series-item.is-current .series-badge {
  border-color: var(--gold);
  color: var(--gold);
}

.series-item-title {
  font-size: .87rem;
  line-height: 1.5;
}

.series-item-title a {
  color: var(--fg-soft);
  text-decoration: none;
  text-underline-offset: .2em;
}
.series-item-title a:hover { color: var(--gold-bright); text-decoration: underline; }

.series-item.is-current .series-item-title { color: var(--fg); font-weight: 600; }

.series-item-desc {
  grid-column: 2;
  color: var(--muted-2);
  font-size: .72rem;
  line-height: 1.5;
}

.article-toc {
  margin: 0 0 2.6rem;
  padding: 1rem 1.3rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.article-toc ol {
  list-style: decimal;
  margin: .3rem 0 0;
  padding-left: 1.35rem;
  display: grid;
  gap: .35rem;
  font-size: .82rem;
}

.article-toc a {
  color: var(--fg-soft);
  text-decoration: none;
  text-underline-offset: .2em;
}
.article-toc a:hover { color: var(--gold-bright); text-decoration: underline; }

.series-pager {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: .8rem;
  align-items: stretch;
  margin-top: 2.6rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--border);
}

.series-pager-link {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  padding: .8rem .9rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  color: var(--fg-soft);
}
.series-pager-link:not(.is-disabled):hover {
  border-color: var(--gold-soft);
  color: var(--gold-bright);
}
.series-pager-link.is-disabled {
  color: var(--muted-2);
  cursor: default;
}
.series-pager-next { text-align: right; align-items: flex-end; }

.series-pager-label {
  font-size: .66rem;
  letter-spacing: .08em;
  color: var(--muted);
}
.series-pager-title {
  font-size: .82rem;
  line-height: 1.5;
}

.series-pager-top {
  align-self: center;
  justify-self: center;
  padding: .55rem 1rem;
  border: 1px solid var(--gold-soft);
  border-radius: 999px;
  color: var(--gold);
  font-size: .72rem;
  letter-spacing: .05em;
  text-decoration: none;
  white-space: nowrap;
  text-align: center;
}
.series-pager-top:hover { background: rgba(210, 170, 77, 0.1); }

@media (max-width: 640px) {
  .series-pager {
    grid-template-columns: 1fr;
  }
  .series-pager-next { text-align: left; align-items: flex-start; }
  .series-pager-top { order: -1; }
  .series-item { grid-template-columns: 1fr; }
  .series-badge { justify-self: start; }
  .series-item-desc { grid-column: 1; }
}

/* 2026-09-18 Claude 読者導線の整理:
   最初の画面に「次にどこへ行けばよいか」を1つ置く。
   太極図（.ghost-taiji）は z-index 0、ヒーローの中身は z-index 2 なので重なって見える。 */
.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 0.9rem;
  align-items: center;
  margin: 1.9rem 0 0;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: 0.78rem 1.7rem;
  border: 1px solid rgba(210,170,77,.62);
  background: linear-gradient(145deg, rgba(210,170,77,.14), rgba(210,170,77,.04));
  color: var(--fg);
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.hero-cta:hover,
.hero-cta:focus-visible {
  border-color: rgba(210,170,77,.92);
  background: linear-gradient(145deg, rgba(210,170,77,.22), rgba(210,170,77,.07));
  transform: translateY(-1px);
}

.hero-cta--ghost {
  border-color: var(--border);
  background: none;
  color: var(--fg-soft);
}

.hero-cta--ghost:hover,
.hero-cta--ghost:focus-visible {
  border-color: rgba(210,170,77,.52);
  background: none;
  color: var(--fg);
}

@media (max-width: 560px) {
  .hero-cta { flex: 1 1 auto; justify-content: center; }
}

/* WEB-194: .68rem(10.88px) → .75rem(12px)。MBTI(R)の商標表示という法的な注記が11px未満だった。 */
.footer-note{margin:.5rem auto 0;max-width:720px;padding:0 16px;text-align:center;color:var(--muted);font-size:.75rem;line-height:1.7}

/* WEB-163 2026-09-24: カテゴリトップの記事一覧グループ見出し */
.article-index-group{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin:34px 0 10px;padding-bottom:8px;border-bottom:1px solid var(--border,rgba(255,255,255,.12));font:600 1rem/1.6 "Shippori Mincho","Yu Mincho",serif;letter-spacing:.04em}
.article-index-group a{color:var(--gold-bright,#e3bf68);text-decoration:none}
.article-index-group a:hover,.article-index-group a:focus-visible{text-decoration:underline}
.article-index-group .meta{margin:0;flex:none;font-size:.72rem;letter-spacing:.08em}
#article-index .article-list{margin-top:0}

/* WEB-164 2026-09-24: 記事の共有導線 */
.article-share{margin:52px 0 0;padding:22px 24px;border:1px solid var(--border,rgba(255,255,255,.12));background:linear-gradient(145deg,rgba(255,255,255,.028),rgba(255,255,255,.012))}
.article-share__title{margin:0 0 14px;font:600 .92rem/1.6 "Shippori Mincho","Yu Mincho",serif;letter-spacing:.06em}
.article-share__actions{display:flex;flex-wrap:wrap;align-items:center;gap:12px}
.article-share__btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:0 20px;border:1px solid rgba(210,170,77,.5);background:transparent;color:var(--gold-bright,#e3bf68);font-family:inherit;font-size:.85rem;letter-spacing:.04em;text-decoration:none;cursor:pointer;transition:border-color .18s ease,background .18s ease}
.article-share__btn:hover,.article-share__btn:focus-visible{border-color:rgba(210,170,77,.85);background:rgba(210,170,77,.08)}
.article-share__status{color:var(--muted,#aaa69f);font-size:.76rem;line-height:1.7}
@media(max-width:480px){.article-share__btn{flex:1 1 auto}}
/* ---- breadcrumb-location-v1.css ---- */
/* Rayne-Lab breadcrumb / current-location indicator.
 * Compact hierarchy display that replaces the old large article-return pill.
 * The breadcrumb stays readable while scrolling without letting article text
 * show through or visually collide with it. */

.breadcrumb-location {
  position: sticky;
  top: 74px;
  z-index: 42;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .42rem;
  margin: 0 0 1.35rem;
  padding: .72rem 0 .78rem;
  border-bottom: 1px solid rgba(255,255,255,.075);
  background: var(--ink, #09090b);
  color: var(--muted-2);
  font-size: .7rem;
  line-height: 1.45;
  letter-spacing: .025em;
  isolation: isolate;
}

/* Extend the opaque reading surface slightly beyond the article column so
 * scrolling headings/body copy never peeks around the sticky breadcrumb. */
.breadcrumb-location::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 -18px;
  background: var(--ink, #09090b);
  border-bottom: 1px solid rgba(255,255,255,.055);
  pointer-events: none;
}

.breadcrumb-location::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: -18px;
  right: -18px;
  bottom: -12px;
  height: 12px;
  background: linear-gradient(to bottom, rgba(9,9,11,.92), rgba(9,9,11,0));
  pointer-events: none;
}

.breadcrumb-location a {
  color: var(--muted);
  text-decoration: none;
  transition: color .18s ease;
}

.breadcrumb-location a:hover,
.breadcrumb-location a:focus-visible {
  color: var(--gold-bright);
}

.breadcrumb-location a:focus-visible {
  outline: 1px solid rgba(210,170,77,.65);
  outline-offset: 3px;
}

.breadcrumb-separator {
  color: rgba(142,139,132,.46);
  user-select: none;
}

.breadcrumb-current {
  color: var(--fg-soft);
}

@media (max-width: 680px) {
  .breadcrumb-location {
    top: 64px;
    gap: .34rem;
    margin-bottom: 1.05rem;
    padding: .62rem 0 .68rem;
    font-size: .66rem;
  }

  .breadcrumb-location::before {
    left: -10px;
    right: -10px;
  }

  .breadcrumb-location::after {
    left: -10px;
    right: -10px;
  }
}
/* ---- site-breadcrumb-follow-v1.css ---- */
/* Rayne-Lab パンくず共通ルール v1（2026-09-22 Owner GO / 2026-09-23 整理）
 * 全ページ（カテゴリ・ツール・法務・About・朋・記事）でパンくずの見た目を同じにする。
 *  R1 文字：.72rem / 行間1.5 / 字間.03em。リンクはmuted・下線なし、hoverで金。現在地は本文色。
 *  R2 ページ固有のパンくず装飾（大きい文字・金の下線など）は上書きして無効化する。
 *  R3 位置：読み込み直後からヘッダー直下の全幅帯で固定。スクロールで形は変えない。
 *     帯の高さぶんの余白は .rl-crumb-band-spacer が確保する。
 *     値は site-breadcrumb-follow-v1.js が CSS変数で渡す：
 *       --rl-crumb-top  ヘッダーの高さ / --rl-crumb-band-h  帯の高さ
 * 唯一の所有者はこのCSSと site-breadcrumb-follow-v1.js。
 * 旧方式（スクロールで箱→帯に切り替える is-site-follow-fixed / is-follow-fixed 系）は
 * 形が途中で変わる原因だったため2026-09-23に撤去済み。復活させないこと。
 * 検証：tests/e2e/breadcrumb-rule.spec.js / tests/web-078-079-breadcrumb-follow-source-contract.mjs
 */

/* --- R1：文字と配色（ページ側の装飾より強く当てる必要があるため !important） --- */
html body :is(.site-follow-breadcrumb, .article-shell > .breadcrumb-location) {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: .45rem !important;
  padding: .72rem 0 !important;
  margin-bottom: 1.35rem !important;
  border: 0 !important;
  /* 常に不透明（ページ地色と同色）。固定クラス名が増えても本文が透けない */
  background: var(--ink, #09090b) !important;
  box-shadow: none !important;
  color: var(--muted-2, #6f6f78) !important;
  /* ページ本文のフォント（明朝など）を継承しない。全ページ同じゴシック体に固定 */
  font-family: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif !important;
  font-size: .72rem !important;
  font-weight: 400 !important;
  line-height: 1.5 !important;
  letter-spacing: .03em !important;
}
html body :is(.site-follow-breadcrumb, .article-shell > .breadcrumb-location) * {
  font-size: inherit !important;
  line-height: inherit !important;
  letter-spacing: inherit !important;
  font-weight: inherit !important;
  color: inherit !important;
}
/* 中の要素の高さ・余白もページごとの装飾を無効化（帯の高さを全ページ同じにする） */
html body :is(.site-follow-breadcrumb, .article-shell > .breadcrumb-location) :is(a, span) {
  display: inline !important;
  min-height: 0 !important;
  height: auto !important;
  padding: 0 !important;
  margin: 0 !important;
}
/* WEB-175: 上のリセットで、帯の中のリンクの当たり判定が 25x17 まで潰れていた
   （2026-09-24 に360px幅で実測）。指で押すには小さすぎる。
   帯全体の高さは変えたくないので、帯の上下paddingを削ったぶんをリンクの
   min-height へ振り替える。見た目の帯の高さは据え置きで、当たり判定だけ広がる。 */
html body :is(.site-follow-breadcrumb, .article-shell > .breadcrumb-location) :is(a, .breadcrumb-current) {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 26px !important;
  /* 「知」のような1文字のリンクは幅が12pxしかなかった */
  min-width: 26px !important;
}
html body :is(.site-follow-breadcrumb, .article-shell > .breadcrumb-location) a {
  color: var(--muted, #9a9aa3) !important;
  text-decoration: none !important;
  border: 0 !important;
  background: none !important;
}
html body :is(.site-follow-breadcrumb, .article-shell > .breadcrumb-location) a:hover,
html body :is(.site-follow-breadcrumb, .article-shell > .breadcrumb-location) a:focus-visible {
  color: var(--gold-bright, #e2bf6a) !important;
}
html body :is(.site-follow-breadcrumb, .article-shell > .breadcrumb-location) [aria-current],
html body :is(.site-follow-breadcrumb, .article-shell > .breadcrumb-location) > :last-child:not(a, ol, ul),
html body :is(.site-follow-breadcrumb, .article-shell > .breadcrumb-location) li:last-child:not(:has(a)) {
  color: var(--text, #e8e6e1) !important;
}
html body :is(.site-follow-breadcrumb, .article-shell > .breadcrumb-location)::before,
html body :is(.site-follow-breadcrumb, .article-shell > .breadcrumb-location)::after {
  display: none !important;
}

/* --- R3：ヘッダー直下の全幅帯（唯一の配置ルール） --- */
html body .site-follow-breadcrumb.rl-crumb-band {
  position: fixed !important;
  top: var(--rl-crumb-top, var(--rayne-site-header-height, 74px)) !important;
  left: 0 !important;
  right: 0 !important;
  bottom: auto;
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  z-index: 68;
  box-sizing: border-box;
  flex-wrap: nowrap !important;
  /* 文字の左右位置も全ページ共通：サイト標準の本文幅（920px）の左端に揃える。スマホは左右24px */
  /* WEB-175: 上下は .72rem から .22rem へ。減らしたぶんは中のリンクの min-height:26px が
     受け持つ。帯の高さは 42px → 34px と少し薄くなるが、全ページで同じ高さになる。 */
  padding: .22rem max(24px, calc((100% - 920px) / 2)) !important;
  /* 本文が透けないよう、ほぼ不透明（ヘッダーと同系色） */
  background: rgba(9, 9, 11, .97) !important;
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  backdrop-filter: blur(18px) saturate(1.3);
  border: 0 !important;
  border-bottom: 1px solid rgba(255, 255, 255, .09) !important;
  box-shadow: none !important;
  clip-path: none;
  transform: none;
  visibility: visible;
}
/* 長いページ名は1行に収めて末尾「…」（帯の高さを全ページ同じにする） */
html body .site-follow-breadcrumb.rl-crumb-band > * {
  flex: 0 0 auto;
  white-space: nowrap;
}
html body .site-follow-breadcrumb.rl-crumb-band > :last-child {
  display: block !important;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* WEB-207: 上の `display: block !important` は、末尾「…」のために必要（text-overflow は
   flex コンテナの文字には効かない）。ただしこれが :is(a, .breadcrumb-current) の
   `display: inline-flex` を打ち消すため、最後の要素だけ align-items による中央揃えが外れ、
   min-height:26px の箱の上端に文字が寄っていた。
   390px幅・isMobile の本番実測（2026-09-26）：
     TOP / ／ / 知 / ／ の文字中心 80.88px に対し、現在地だけ 76.52px（4.36px 上）。
   現在地は <span> でタップ対象ではないので、ここだけ当たり判定用の min-height を外し、
   親の `align-items: center` に縦位置を任せる。リンク側の 26px は維持する（WEB-175）。
   実測265ページのうち、パンくずの末尾が <a> のページは0件。:not(a) は将来の保険。 */
html body .site-follow-breadcrumb.rl-crumb-band > :last-child:not(a) {
  min-height: 0 !important;
}
.rl-crumb-band-spacer {
  display: block;
  height: var(--rl-crumb-band-h, 42px);
  pointer-events: none;
}
/* 目次リンク等のジャンプ先がヘッダー＋帯に隠れないようにする */
html {
  scroll-padding-top: calc(var(--rayne-site-header-height, 74px) + var(--rl-crumb-band-h, 0px) + 22px);
}
/* 帯の下の余白も全ページ共通（旧：パンくずの上にあった72px等の余白を詰める） */
html body.has-crumb-band main {
  padding-top: 28px;
}
/* ---- article-sidevoice-v1.css ---- */
/* Rayne-Lab / Rayne × 朔 sidevoice */
.article-view-switch {display:inline-flex;align-items:center;gap:.25rem;margin-top:1.25rem;padding:.25rem;border:1px solid var(--border);border-radius:999px;background:rgba(255,255,255,.018);font-size:.72rem}
.article-view-switch a,.article-view-switch span {display:inline-flex;align-items:center;min-height:34px;padding:.42rem .85rem;border-radius:999px;text-decoration:none;color:var(--muted)}
.article-view-switch a:hover{color:var(--gold-bright)}.article-view-switch .is-current{background:rgba(210,170,77,.11);color:var(--gold-bright);box-shadow:inset 0 0 0 1px rgba(210,170,77,.24)}
.sidevoice-shell{width:min(820px,100%);margin:0 auto}.sidevoice-head{position:relative;padding:18px 0 34px}.sidevoice-head::after{content:"";display:block;width:72px;height:1px;margin-top:1.6rem;background:linear-gradient(90deg,var(--gold-soft),transparent)}.sidevoice-head h1{margin:.3rem 0 .75rem;font-size:clamp(1.8rem,5vw,3rem);line-height:1.35}.sidevoice-lead{max-width:620px;margin:0;color:var(--muted);font-size:.92rem;line-height:1.85}.sidevoice-preview-note{margin:1.1rem 0 0;color:var(--gold-soft);font-size:.68rem;letter-spacing:.06em}.sidevoice-load-status{min-height:1.5em;margin:1.25rem 0 0;color:var(--muted);font-size:.78rem}.sidevoice-load-status[data-kind="preview"]{color:var(--gold-soft)}.sidevoice-load-status[data-kind="error"]{color:#d9a9a9}
.sidevoice-dialogue{display:grid;gap:1.45rem;padding-top:22px}.sidevoice-line{position:relative;border:0;border-radius:0;background:transparent}.sidevoice-line[data-speaker="rayne"],.sidevoice-line[data-speaker="saku"]{margin-inline:0;background:transparent}.sidevoice-line-v2{display:grid;grid-template-columns:84px minmax(0,1fr);grid-template-areas:"portrait body";gap:1.1rem;padding:.45rem .35rem;align-items:center}.sidevoice-line-v2[data-speaker="rayne"]{grid-template-columns:minmax(0,1fr) 84px;grid-template-areas:"body portrait"}.sidevoice-portrait{grid-area:portrait;width:84px;height:102px;display:flex;align-items:flex-end;justify-content:center;overflow:hidden}.sidevoice-portrait[hidden]{display:none}.sidevoice-portrait img{width:100%;height:100%;object-fit:contain;object-position:center bottom;display:block}.sidevoice-line-body{grid-area:body;min-width:0;padding:.8rem 1rem}.sidevoice-line[data-speaker="saku"] .sidevoice-line-body{border-left:1px solid rgba(201,201,209,.24);background:linear-gradient(90deg,rgba(255,255,255,.022),transparent 72%)}.sidevoice-line[data-speaker="rayne"] .sidevoice-line-body{border-right:1px solid rgba(210,170,77,.34);background:linear-gradient(270deg,rgba(210,170,77,.028),transparent 72%)}.sidevoice-speaker{display:flex;align-items:center;gap:.55rem;margin-bottom:.42rem;font-size:.75rem;font-weight:600;letter-spacing:.05em}.sidevoice-line[data-speaker="rayne"] .sidevoice-speaker{justify-content:flex-end;color:var(--gold-bright)}.sidevoice-line[data-speaker="saku"] .sidevoice-speaker{color:#c9c9d1}.sidevoice-line p{margin:0;color:#d8d5ce;font-size:.96rem;line-height:1.95}
.sidevoice-members-gate{margin-top:2rem;padding:1.35rem 1.4rem;border:1px solid rgba(210,170,77,.32);border-radius:14px;background:rgba(210,170,77,.055)}.sidevoice-members-gate[hidden]{display:none}.sidevoice-gate-kicker{margin:0 0 .35rem;color:var(--gold-soft);font-size:.66rem;letter-spacing:.12em}.sidevoice-members-gate h2{margin:0 0 .65rem;font-size:1.05rem;line-height:1.5}.sidevoice-members-gate>p:not(.sidevoice-gate-kicker){margin:0;color:var(--muted);font-size:.84rem;line-height:1.8}.sidevoice-members-gate a{display:inline-flex;margin-top:.9rem;color:var(--gold-bright);font-size:.8rem;text-decoration:none}.sidevoice-members-gate a:hover{text-decoration:underline;text-underline-offset:.2em}.sidevoice-return{margin-top:2.2rem;padding-top:1.3rem;border-top:1px solid var(--border)}.sidevoice-return a{color:var(--gold-bright);text-decoration:none;font-size:.78rem}.sidevoice-return a:hover{text-decoration:underline;text-underline-offset:.2em}
@media(max-width:680px){.article-view-switch{width:100%}.article-view-switch a,.article-view-switch span{flex:1;justify-content:center;padding-inline:.55rem}.sidevoice-line-v2{grid-template-columns:66px minmax(0,1fr);gap:.7rem;padding:.35rem 0;align-items:start}.sidevoice-line-v2[data-speaker="rayne"]{grid-template-columns:minmax(0,1fr) 66px}.sidevoice-portrait{width:66px;height:82px}.sidevoice-line-body{padding:.7rem .75rem}.sidevoice-line p{font-size:.92rem;line-height:1.86}}
@media(max-width:420px){.sidevoice-line-v2{grid-template-columns:54px minmax(0,1fr);gap:.55rem}.sidevoice-line-v2[data-speaker="rayne"]{grid-template-columns:minmax(0,1fr) 54px}.sidevoice-portrait{width:54px;height:70px}.sidevoice-line-body{padding:.62rem .62rem}}
/* ---- ghost-taiji.css ---- */
/*
 * Rayne-Lab Ghost Taiji layer v0.6
 * Uses the same approved Taiji geometry as the TOP opening animation.
 * Minimal line treatment: Taiji outline + one outer orbit only.
 * TOP Taiji remains fixed in the viewport while scrolling.
 * v0.6 caps the landed TOP mark by viewport height as well as width so
 * ultrawide/large desktop screens cannot make the background mark grow huge.
 */

body { overflow-x: hidden; }

.home-hero,
.page-head {
  position: relative;
  isolation: isolate;
}

.home-hero > :not(.ghost-taiji):not(.taiji-opening),
.page-head > :not(.ghost-taiji) {
  position: relative;
  z-index: 2;
}

.ghost-taiji {
  position: absolute;
  width: clamp(620px, min(70vw, 100vh), 980px);
  aspect-ratio: 1;
  pointer-events: none;
  z-index: 0;
  opacity: .78;
  animation: ghost-taiji-settle 1.75s cubic-bezier(.16, .84, .24, 1) both;
}

/* TOP only: keep the landed Taiji in the same viewport position after scroll.
 * Offsets are clamped so the center stays in a predictable upper-right zone
 * instead of drifting farther off-screen as the viewport gets wider/taller. */
.ghost-taiji--home {
  position: fixed;
  top: clamp(-360px, -34vh, -220px);
  right: clamp(-320px, -18vw, -140px);
  will-change: transform;
}

.ghost-taiji--hub {
  width: clamp(560px, 68vw, 980px);
  /* Use viewport-based coordinates, not parent-height percentages, so every category hub lands identically. */
  top: clamp(-430px, -34vw, -340px);
  right: -28%;
  opacity: .44;
  animation-duration: 1.45s;
}

/*
 * Do not clip the Taiji tone at a hard circular boundary.
 * The face now dissolves gradually toward the edge, preventing the huge
 * off-screen disc from reading as a stepped circular gradient.
 */
.ghost-taiji-disc {
  position: absolute;
  inset: 10%;
  overflow: hidden;
  border-radius: 50%;
  border: 0;
  box-shadow: 0 0 150px rgba(210,170,77,.012);
  -webkit-mask-image: radial-gradient(circle at 50% 50%,
    #000 0%,
    #000 68%,
    rgba(0,0,0,.98) 76%,
    rgba(0,0,0,.82) 84%,
    rgba(0,0,0,.48) 92%,
    transparent 100%);
  mask-image: radial-gradient(circle at 50% 50%,
    #000 0%,
    #000 68%,
    rgba(0,0,0,.98) 76%,
    rgba(0,0,0,.82) 84%,
    rgba(0,0,0,.48) 92%,
    transparent 100%);
}

.ghost-taiji-symbol {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.ghost-taiji-lobe--black {
  fill: rgba(0,0,0,.24);
  stroke: rgba(210,170,77,.032);
  stroke-width: .28;
}

.ghost-taiji-lobe--white {
  fill: rgba(210,170,77,.034);
  stroke: rgba(255,255,255,.015);
  stroke-width: .24;
}

.ghost-taiji-seed--white {
  fill: rgba(226,198,126,.068);
}

.ghost-taiji-seed--black {
  fill: rgba(0,0,0,.40);
  stroke: rgba(210,170,77,.024);
  stroke-width: .24;
}

/* Keep only one large orbital line around the Taiji. */
.ghost-orbit {
  position: absolute;
  inset: 3%;
  border-radius: 50%;
  border: 1px solid rgba(210,170,77,.045);
}

/* Remove secondary construction lines and sweep effects. */
.ghost-orbit--inner,
.ghost-orbit::before,
.ghost-orbit::after,
.ghost-sweep {
  display: none !important;
}

.home-hero::after,
.page-head::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: -2px -8vw;
  pointer-events: none;
}

/* More gradual TOP falloff to avoid visible tonal steps in dark areas. */
.home-hero::after {
  background: linear-gradient(90deg,
    rgba(9,9,11,.94) 0%,
    rgba(9,9,11,.92) 14%,
    rgba(9,9,11,.86) 27%,
    rgba(9,9,11,.76) 40%,
    rgba(9,9,11,.61) 52%,
    rgba(9,9,11,.43) 63%,
    rgba(9,9,11,.27) 73%,
    rgba(9,9,11,.14) 82%,
    rgba(9,9,11,.055) 91%,
    transparent 100%);
}

.page-head::after {
  background: linear-gradient(90deg,
    rgba(9,9,11,.92) 0%,
    rgba(9,9,11,.66) 44%,
    transparent 86%);
}

@keyframes ghost-taiji-settle {
  0% {
    opacity: 0;
    transform: translate3d(4.5vw,-2vh,0) rotate(-5deg) scale(1.035);
  }
  38% { opacity: .58; }
  100% {
    opacity: 1;
    transform: translate3d(0,0,0) rotate(0deg) scale(1);
  }
}

@media (max-width: 900px) {
  .ghost-taiji--home {
    width: min(82vw, 760px);
    top: -20%;
    right: -26%;
  }

  .ghost-taiji--hub {
    width: 92vw;
    top: -300px;
    right: -38%;
  }
}

@media (max-width: 680px) {
  .ghost-taiji--home {
    width: min(118vw, 650px);
    top: -5%;
    right: -58%;
    opacity: .56;
  }

  .ghost-taiji--hub {
    width: 120vw;
    top: -235px;
    right: -62%;
    opacity: .34;
  }

  .home-hero::after,
  .page-head::after {
    inset-inline: -14px;
  }

  .home-hero::after {
    background: linear-gradient(90deg,
      rgba(9,9,11,.96) 0%,
      rgba(9,9,11,.89) 30%,
      rgba(9,9,11,.73) 52%,
      rgba(9,9,11,.48) 70%,
      rgba(9,9,11,.22) 86%,
      rgba(9,9,11,.06) 96%,
      transparent 100%);
  }

  .page-head::after {
    background: linear-gradient(90deg,
      rgba(9,9,11,.96) 0%,
      rgba(9,9,11,.74) 64%,
      rgba(9,9,11,.20) 100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ghost-taiji { animation: none !important; }
}
/* ---- ghost-taiji-flat-v1.css ---- */
/* Rayne-Lab Ghost Taiji flat-face override v1
 * Remove large tonal face fills and radial masks that created visible circular bands.
 * Keep only the Taiji geometry strokes, seeds, and the outer orbit.
 */

.ghost-taiji--home .ghost-taiji-disc {
  overflow: visible;
  border: 0;
  box-shadow: none;
  -webkit-mask-image: none !important;
  mask-image: none !important;
}

.ghost-taiji--home .ghost-taiji-lobe--black,
.ghost-taiji--home .ghost-taiji-lobe--white {
  fill: transparent !important;
}

.ghost-taiji--home .ghost-taiji-lobe--black {
  stroke: rgba(210,170,77,.043);
  stroke-width: .30;
}

.ghost-taiji--home .ghost-taiji-lobe--white {
  stroke: rgba(210,170,77,.036);
  stroke-width: .28;
}

.ghost-taiji--home .ghost-taiji-seed--white {
  fill: rgba(226,198,126,.065);
}

.ghost-taiji--home .ghost-taiji-seed--black {
  fill: rgba(0,0,0,.14);
  stroke: rgba(210,170,77,.032);
  stroke-width: .28;
}
/* ---- top-background-clean-v1.css ---- */
/* Rayne-Lab TOP background cleanup v3
 * Keep the page calm: no fine grid. Preserve only one large vertical guide,
 * one large horizontal guide, the Taiji itself, and its outer orbit.
 * v3 softens dark gradient banding with wider falloffs + subtle dithering.
 */

/* Global ambient field: broad, low-contrast light only. No construction grid. */
.ambient-bg {
  background:
    radial-gradient(ellipse 68% 58% at 20% 5%,
      rgba(210,170,77,.060) 0%,
      rgba(210,170,77,.034) 24%,
      rgba(210,170,77,.014) 45%,
      rgba(210,170,77,.004) 61%,
      transparent 78%),
    radial-gradient(ellipse 58% 66% at 94% 27%,
      rgba(159,73,57,.042) 0%,
      rgba(159,73,57,.024) 28%,
      rgba(159,73,57,.010) 49%,
      rgba(159,73,57,.003) 65%,
      transparent 80%),
    linear-gradient(180deg,
      rgba(255,255,255,.006) 0%,
      transparent 34%,
      rgba(0,0,0,.045) 100%) !important;
  background-image:
    radial-gradient(ellipse 68% 58% at 20% 5%,
      rgba(210,170,77,.060) 0%,
      rgba(210,170,77,.034) 24%,
      rgba(210,170,77,.014) 45%,
      rgba(210,170,77,.004) 61%,
      transparent 78%),
    radial-gradient(ellipse 58% 66% at 94% 27%,
      rgba(159,73,57,.042) 0%,
      rgba(159,73,57,.024) 28%,
      rgba(159,73,57,.010) 49%,
      rgba(159,73,57,.003) 65%,
      transparent 80%),
    linear-gradient(180deg,
      rgba(255,255,255,.006) 0%,
      transparent 34%,
      rgba(0,0,0,.045) 100%) !important;
  background-size: auto, auto, auto !important;
}

/* Very fine non-directional grain to break up gradient banding.
 * Kept intentionally faint so it reads as smoothness, not texture. */
.ambient-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .018;
  background-image:
    radial-gradient(circle at 25% 25%, rgba(255,255,255,.34) 0 .35px, transparent .55px),
    radial-gradient(circle at 75% 70%, rgba(255,255,255,.20) 0 .3px, transparent .5px);
  background-size: 3px 3px, 4px 4px;
  background-position: 0 0, 1px 2px;
  mix-blend-mode: soft-light;
}

/* The previous crosshair followed the oversized/off-screen Ghost Taiji center,
 * causing the vertical line to disappear. Disable those generated axes. */
.ghost-taiji--home .ghost-orbit::before,
.ghost-taiji--home .ghost-orbit::after,
.ghost-taiji--hub .ghost-orbit::before,
.ghost-taiji--hub .ghost-orbit::after {
  display: none !important;
}

/* TOP layout guides: fixed to the hero instead of the Taiji geometry. */
.home-hero > .hero-axis {
  position: absolute !important;
  display: block;
  z-index: 0 !important;
  pointer-events: none;
  background: rgba(210, 170, 77, .052);
}

.home-hero > .hero-axis--vertical {
  top: 0;
  bottom: 0;
  right: 5.2%;
  width: 1px;
}

.home-hero > .hero-axis--horizontal {
  left: 0;
  right: 0;
  top: 54%;
  height: 1px;
}

@media (max-width: 900px) {
  .home-hero > .hero-axis--vertical { right: 4%; }
  .home-hero > .hero-axis--horizontal { top: 55%; }
}

@media (max-width: 680px) {
  .home-hero > .hero-axis--vertical { right: 3%; }
  .home-hero > .hero-axis--horizontal { top: 57%; }
}
/* ---- taiji-opening-v11.css ---- */
/* Rayne-Lab TOP opening v0.14 / minimal ambient stage */
.taiji-opening {
  position: fixed;
  inset: 74px 0 0;
  z-index: 38;
  pointer-events: none;
  overflow: hidden;
  /* Opaque stage: keep the page hidden while matching the site's tone. */
  background: var(--ink, #09090b);
  opacity: 0;
  visibility: hidden;
  transition: opacity .34s cubic-bezier(.2,.7,.2,1);
}

/* Minimal ambience only. No grid: the Taiji motion remains the visual focus. */
.taiji-opening::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 4%, rgba(210,170,77,.065), transparent 27rem),
    radial-gradient(circle at 92% 28%, rgba(159,73,57,.045), transparent 25rem);
}

.taiji-opening.is-running { opacity: 1; visibility: visible; }
.taiji-opening.is-fading { opacity: 0; }
.taiji-opening-canvas {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
}

/* Keep the motion path exactly as implemented in JS, but let the black/white
 * Taiji drawing emerge from a faint tone into its full contrast. The timing
 * reaches full density at the end of the convergence phase (~2.32s of 3.4s),
 * then stays at full canvas opacity while the existing landing/fade logic runs. */
.taiji-opening.is-running .taiji-opening-canvas {
  animation: taiji-tone-deepen 3.4s linear both;
}

@keyframes taiji-tone-deepen {
  0%   { opacity: .22; }
  24%  { opacity: .42; }
  46%  { opacity: .68; }
  68%  { opacity: 1; }
  100% { opacity: 1; }
}

.home-hero .ghost-taiji--home,
.home-hero > :not(.ghost-taiji):not(.taiji-opening) {
  transition: opacity .45s ease, transform .45s cubic-bezier(.2,.7,.2,1);
}
body.taiji-opening-running .home-hero .ghost-taiji--home {
  opacity: 0 !important;
  transform: translate(2vw,-.6vh) rotate(-1deg) scale(1.015) !important;
}
body.taiji-opening-running .home-hero > :not(.ghost-taiji):not(.taiji-opening) {
  opacity: 0 !important;
  transform: translateY(5px) !important;
}

@media (max-width: 680px) { .taiji-opening { inset: 64px 0 0; } }
/* ---- site-header-fixed-v1.css ---- */
/* Rayne-Lab fixed site header guard v1
 * Keep the whole header visible while scrolling. Account/menu controls must not float alone.
 */
:root { --rayne-site-header-height: 74px; }

html {
  scroll-padding-top: calc(var(--rayne-site-header-height) + 22px);
}

body {
  padding-top: var(--rayne-site-header-height);
}

.site-header {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 70;
}

.header-inner {
  position: relative;
}

@media (max-width: 680px) {
  :root { --rayne-site-header-height: 64px; }
}
/* ---- mobile-viewport-guard-v1.css ---- */
/* Rayne-Lab mobile viewport guard v1
 * Purpose: keep the page inside the visual viewport on phones.
 * Horizontal movement is allowed only inside components that explicitly opt in.
 */

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

@supports not (overflow: clip) {
  html,
  body {
    overflow-x: hidden;
  }
}

body {
  position: relative;
}

.site-header,
.header-inner,
.site-main,
.site-footer,
.footer-inner,
.page-head,
.article-shell,
.article-body,
.home-hero,
.home-section,
.hub-section,
.subcategory-grid,
.category-list {
  max-width: 100%;
  min-width: 0;
}

img,
video,
canvas,
iframe,
svg {
  max-width: 100%;
}

.article-body,
.article-body p,
.article-body li,
.article-body a,
.page-lead,
.subcategory-desc,
.list-title {
  overflow-wrap: anywhere;
  word-break: normal;
}

/* The off-canvas menu must never expand the document's scrollable width. */
.site-menu-panel {
  max-width: 100vw;
  overflow-x: hidden;
}

body.site-menu-open {
  overflow-x: clip;
}

@supports not (overflow: clip) {
  body.site-menu-open {
    overflow-x: hidden;
  }
}

/* Keep both fixed header controls inside the phone viewport. */
@media (max-width: 680px) {
  .site-menu-toggle {
    right: max(16px, env(safe-area-inset-right, 0px));
  }

  .site-account-icon {
    right: calc(max(16px, env(safe-area-inset-right, 0px)) + 50px);
  }

  .site-search-icon {
    right: calc(max(16px, env(safe-area-inset-right, 0px)) + 100px);
  }

  .header-inner,
  .site-main,
  .footer-inner {
    width: calc(100% - 28px);
    max-width: calc(100% - 28px);
  }
}
/* ---- shi-hub-v1.css ---- */
/* Rayne-Lab / 試 hub v1 — staging */

.shi-page-head {
  padding-top: 30px;
  padding-bottom: 46px;
}

.shi-page-head h1 {
  color: var(--stamp-text);
  text-shadow: 0 0 28px rgba(207, 104, 82, .08);
}

.shi-kicker {
  display: inline-flex;
  align-items: center;
  gap: .8rem;
  margin: 0 0 1.1rem;
  color: var(--fg-soft);
  font-size: .82rem;
  letter-spacing: .08em;
}

.shi-kicker-seal {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--stamp-border);
  border-radius: 50%;
  color: var(--stamp-text);
  background: rgba(159, 73, 57, .035);
  font-family: "Shippori Mincho", serif;
  font-size: 1rem;
}

.shi-intro {
  max-width: 760px;
  margin: 1.5rem 0 0;
  color: var(--fg-soft);
  /* WEB-179: ハブで最初に読まれる文章。本文と同じ帯（15〜16px）へ。 */
  font-size: 1rem;
  line-height: 2;
}

.shi-policy {
  width: min(760px, 100%);
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  margin-top: 1.8rem;
  padding: 1rem 1.2rem;
  border: 1px solid rgba(159, 73, 57, .58);
  background: linear-gradient(90deg, rgba(159, 73, 57, .09), rgba(159, 73, 57, .025));
  color: #d8a092;
  font-size: .79rem;
  line-height: 1.9;
}

.shi-policy-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(207, 104, 82, .62);
  border-radius: 50%;
  color: var(--stamp-text);
  font-family: "Shippori Mincho", serif;
}

.shi-tools {
  padding-top: 50px;
}

.shi-section-label {
  display: flex;
  align-items: center;
  gap: .9rem;
  margin: 0 0 22px;
  color: var(--gold);
  font-family: "Shippori Mincho", serif;
  font-size: .78rem;
  letter-spacing: .22em;
}

.shi-section-label::after {
  content: "";
  width: 72px;
  height: 1px;
  background: linear-gradient(90deg, rgba(210, 170, 77, .6), transparent);
}

.shi-practice-intro {
  max-width: 760px;
  margin: -6px 0 22px;
  color: var(--fg-soft);
  /* WEB-179: ハブで最初に読まれる文章。本文と同じ帯（15〜16px）へ。 */
  font-size: .95rem;
  line-height: 1.95;
}

.shi-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.shi-tool-card {
  min-height: 470px;
  display: flex;
  flex-direction: column;
  padding: 1rem 1rem 1.15rem;
  border: 1px solid rgba(210, 170, 77, .28);
  background:
    radial-gradient(circle at 50% 34%, rgba(210, 170, 77, .035), transparent 44%),
    linear-gradient(145deg, rgba(255,255,255,.025), rgba(255,255,255,.008));
  text-decoration: none;
  overflow: hidden;
  transition: transform .22s ease, border-color .22s ease, background-color .22s ease, box-shadow .22s ease;
}

.shi-tool-card:hover {
  transform: translateY(-4px);
  border-color: rgba(210, 170, 77, .55);
  background-color: rgba(210, 170, 77, .018);
  box-shadow: var(--shadow);
}

.shi-card-topline {
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  margin-bottom: .65rem;
}

.shi-card-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: .15rem .55rem;
  border: 1px solid rgba(159, 73, 57, .64);
  color: var(--stamp-text);
  background: rgba(159, 73, 57, .035);
  font-size: .65rem;
  letter-spacing: .06em;
}

.shi-card-status--gold {
  border-color: rgba(210, 170, 77, .5);
  color: var(--gold-bright);
  background: rgba(210, 170, 77, .035);
}

.shi-card-stage {
  color: var(--muted);
  font-size: .66rem;
  letter-spacing: .04em;
}

.shi-card-visual {
  height: 220px;
  display: grid;
  place-items: center;
  padding: .25rem 0;
}

.shi-card-visual svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.shi-svg-line {
  fill: none;
  stroke: rgba(210, 170, 77, .72);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.shi-svg-line-soft {
  fill: none;
  stroke: rgba(210, 170, 77, .3);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.shi-svg-fill {
  fill: rgba(210, 170, 77, .12);
  stroke: rgba(210, 170, 77, .66);
  stroke-width: 1.35;
  vector-effect: non-scaling-stroke;
}

.shi-svg-stamp {
  fill: rgba(159, 73, 57, .12);
  stroke: rgba(207, 104, 82, .78);
  stroke-width: 1.4;
  vector-effect: non-scaling-stroke;
}

.shi-svg-text {
  fill: rgba(227, 191, 104, .88);
  font-family: "Shippori Mincho", serif;
  font-size: 12px;
}

.shi-tool-card h2 {
  margin: .25rem 0 0;
  color: var(--fg);
  font-size: 1.25rem;
  line-height: 1.45;
  text-align: center;
}

.shi-card-rule {
  width: 40px;
  height: 1px;
  margin: .8rem auto .8rem;
  background: var(--gold-soft);
}

.shi-tool-card p {
  margin: 0 auto;
  max-width: 29em;
  color: var(--muted);
  /* WEB-179: 12px は本文としては小さすぎた。カードの説明文なので14px帯へ。 */
  font-size: .875rem;
  line-height: 1.85;
  text-align: center;
}

.shi-card-arrow {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  margin: auto auto 0;
  border: 1px solid rgba(210, 170, 77, .55);
  border-radius: 50%;
  color: var(--gold-bright);
  font-size: .95rem;
  transition: transform .18s ease, background-color .18s ease;
}

.shi-tool-card:hover .shi-card-arrow {
  transform: translateX(2px);
  background: rgba(210, 170, 77, .08);
}

/* 策：孫子兵法カード。参照画像の黒×金・縦長カードの文法をWeb UIへ移植。 */
.shi-tools[aria-labelledby="shi-practice-heading"] .shi-card-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  align-items: stretch;
}

.shi-tool-card[href="/02_shi/sunzi-art-of-war-introduction.html"] {
  position: relative;
  min-height: 690px;
  padding: 1.55rem 1.55rem 1.7rem;
  border: 1px solid rgba(224, 176, 63, .82);
  background:
    radial-gradient(circle at 50% 31%, rgba(210,170,77,.075), transparent 31%),
    radial-gradient(circle at 50% 72%, rgba(210,170,77,.025), transparent 34%),
    linear-gradient(145deg, rgba(255,255,255,.018), rgba(255,255,255,.003)),
    #0b0b0c;
  box-shadow: inset 0 0 0 1px rgba(210,170,77,.06), 0 24px 70px rgba(0,0,0,.28);
}

.shi-tool-card[href="/02_shi/sunzi-art-of-war-introduction.html"]::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(210,170,77,.18);
  pointer-events: none;
}

.shi-tool-card[href="/02_shi/sunzi-art-of-war-introduction.html"] .shi-card-topline {
  position: relative;
  z-index: 1;
  min-height: 58px;
  margin-bottom: .7rem;
  align-items: flex-start;
}

.shi-tool-card[href="/02_shi/sunzi-art-of-war-introduction.html"] .shi-card-status {
  min-height: 46px;
  padding: .45rem .85rem;
  border-color: rgba(224,176,63,.88);
  color: var(--gold-bright);
  background: rgba(12,12,13,.66);
  font-family: "Shippori Mincho", serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: .06em;
}

.shi-tool-card[href="/02_shi/sunzi-art-of-war-introduction.html"] .shi-card-stage {
  padding-top: .35rem;
  color: #aaa59b;
  font-family: "Shippori Mincho", serif;
  font-size: 1rem;
  letter-spacing: .06em;
}

.shi-tool-card[href="/02_shi/sunzi-art-of-war-introduction.html"] .shi-card-visual {
  height: 300px;
  margin: .2rem 0 .5rem;
  padding: 0;
}

.shi-tool-card[href="/02_shi/sunzi-art-of-war-introduction.html"] .shi-card-visual svg {
  width: 94%;
  filter: drop-shadow(0 0 8px rgba(210,170,77,.12));
}

.shi-tool-card[href="/02_shi/sunzi-art-of-war-introduction.html"] h2 {
  position: relative;
  z-index: 1;
  margin: .3rem 0 0;
  color: #f3efe5;
  font-size: clamp(2rem, 3vw, 2.7rem);
  line-height: 1.2;
  letter-spacing: .08em;
}

.shi-tool-card[href="/02_shi/sunzi-art-of-war-introduction.html"] .shi-card-rule {
  width: 62px;
  margin: 1.2rem auto 1.15rem;
  background: rgba(224,176,63,.95);
}

.shi-tool-card[href="/02_shi/sunzi-art-of-war-introduction.html"] p {
  position: relative;
  z-index: 1;
  max-width: 31em;
  color: #aaa59b;
  font-family: "Shippori Mincho", serif;
  font-size: .86rem;
  line-height: 2.05;
  letter-spacing: .04em;
}

.shi-tool-card[href="/02_shi/sunzi-art-of-war-introduction.html"] .shi-card-arrow {
  position: relative;
  z-index: 1;
  width: 58px;
  height: 58px;
  margin-top: 1.45rem;
  border-color: rgba(224,176,63,.86);
  color: var(--gold-bright);
  background: rgba(210,170,77,.018);
  font-size: 1.35rem;
}

.shi-tool-card[href="/02_shi/sunzi-art-of-war-introduction.html"]:hover {
  border-color: rgba(235,190,76,.98);
  box-shadow: inset 0 0 0 1px rgba(210,170,77,.09), 0 30px 90px rgba(0,0,0,.36), 0 0 34px rgba(210,170,77,.08);
}

@media (max-width: 940px) {
  .shi-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .shi-tool-card:last-child {
    grid-column: 1 / -1;
  }

  .shi-tools[aria-labelledby="shi-practice-heading"] .shi-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .shi-tools[aria-labelledby="shi-practice-heading"] .shi-tool-card:last-child {
    grid-column: auto;
  }
}

@media (max-width: 680px) {
  .shi-page-head {
    padding-top: 18px;
    padding-bottom: 38px;
  }

  .shi-intro {
    /* WEB-179: スマホだけ .9rem(14.4px) へ落としていた。本文と同じ16pxにそろえる。 */
    font-size: 1rem;
  }

  .shi-policy {
    grid-template-columns: 1fr;
    gap: .65rem;
    padding: .9rem 1rem;
  }

  .shi-card-grid,
  .shi-tools[aria-labelledby="shi-practice-heading"] .shi-card-grid {
    grid-template-columns: 1fr;
  }

  .shi-tool-card,
  .shi-tool-card:last-child,
  .shi-tools[aria-labelledby="shi-practice-heading"] .shi-tool-card:last-child {
    min-height: 440px;
    grid-column: auto;
  }

  .shi-card-visual {
    height: 205px;
  }

  .shi-tool-card[href="/02_shi/sunzi-art-of-war-introduction.html"] {
    min-height: 650px;
    padding: 1.25rem 1.15rem 1.35rem;
  }

  .shi-tool-card[href="/02_shi/sunzi-art-of-war-introduction.html"] .shi-card-visual {
    height: 270px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .shi-tool-card,
  .shi-card-arrow {
    transition: none;
  }
}
/* ---- shi-sunzi-card-size-v1.css ---- */
/* 孫子兵法カードのサイズと外枠を診断カードと統一し、黒×金の意匠だけ残す */

.shi-tools[aria-labelledby="shi-practice-heading"] .shi-card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.shi-tool-card[href="/02_shi/sunzi-art-of-war-introduction.html"] {
  min-height: 470px;
  padding: 1rem 1rem 1.15rem;
  border: 1px solid rgba(210, 170, 77, .28);
}

/* 参照画像用に付けた二重枠は、他カードと太さが揃わないため無効化 */
.shi-tool-card[href="/02_shi/sunzi-art-of-war-introduction.html"]::before {
  display: none;
}

.shi-tool-card[href="/02_shi/sunzi-art-of-war-introduction.html"]:hover {
  border-color: rgba(210, 170, 77, .55);
}

.shi-tool-card[href="/02_shi/sunzi-art-of-war-introduction.html"] .shi-card-topline {
  min-height: 30px;
  margin-bottom: .65rem;
  align-items: center;
}

.shi-tool-card[href="/02_shi/sunzi-art-of-war-introduction.html"] .shi-card-status {
  min-height: 26px;
  padding: .15rem .55rem;
  font-size: .65rem;
}

.shi-tool-card[href="/02_shi/sunzi-art-of-war-introduction.html"] .shi-card-stage {
  padding-top: 0;
  font-size: .66rem;
}

.shi-tool-card[href="/02_shi/sunzi-art-of-war-introduction.html"] .shi-card-visual {
  height: 220px;
  margin: 0;
  padding: .25rem 0;
}

.shi-tool-card[href="/02_shi/sunzi-art-of-war-introduction.html"] .shi-card-visual svg {
  width: 100%;
}

.shi-tool-card[href="/02_shi/sunzi-art-of-war-introduction.html"] h2 {
  margin: .25rem 0 0;
  font-size: 1.25rem;
  line-height: 1.45;
  letter-spacing: .03em;
}

.shi-tool-card[href="/02_shi/sunzi-art-of-war-introduction.html"] .shi-card-rule {
  width: 40px;
  margin: .8rem auto;
}

.shi-tool-card[href="/02_shi/sunzi-art-of-war-introduction.html"] p {
  max-width: 29em;
  font-family: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Hiragino Sans", sans-serif;
  font-size: .75rem;
  line-height: 1.85;
  letter-spacing: .015em;
}

.shi-tool-card[href="/02_shi/sunzi-art-of-war-introduction.html"] .shi-card-arrow {
  width: 38px;
  height: 38px;
  margin: auto auto 0;
  font-size: .95rem;
}

@media (max-width: 940px) {
  .shi-tools[aria-labelledby="shi-practice-heading"] .shi-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .shi-tools[aria-labelledby="shi-practice-heading"] .shi-card-grid {
    grid-template-columns: 1fr;
  }

  .shi-tool-card[href="/02_shi/sunzi-art-of-war-introduction.html"] {
    min-height: 440px;
    padding: 1rem 1rem 1.15rem;
  }

  .shi-tool-card[href="/02_shi/sunzi-art-of-war-introduction.html"] .shi-card-visual {
    height: 205px;
  }
}
/* ---- spacious-nav-v1.css ---- */
/* Rayne-Lab spacious navigation / TOP spacing v7 */

/*
 * Self-contained header fallback.
 * Some isolated tool pages (notably 六壬神課) receive the shared header/postprocess
 * but do not load static/style.css. Keep the brand usable in that case instead of
 * falling back to an unstyled purple link / rotated bare R.
 * Values intentionally mirror static/style.css and use fallbacks so normal pages
 * that already load style.css render unchanged.
 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border, rgba(255,255,255,.09));
  background: rgba(9,9,11,.82);
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
}

.header-inner {
  width: min(1280px, calc(100% - 72px));
  height: 74px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  color: inherit;
  text-decoration: none;
  font-family: "Shippori Mincho", "Noto Serif JP", serif;
}

.brand-mark {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border: 0;
  color: var(--gold-bright, #e3bf68);
  font-size: .82rem;
  line-height: 1;
  transform: none;
  /* 2026-09-23 brand logo v1.1: 陰陽◇R ロゴ（ファビコンと同一SVG）を表示 */
  background: url("/static/icons/favicon.svg") center / contain no-repeat;
}

/* 旧マーク（回転した文字R）はロゴ画像に置き換えたため非表示。スクリーンリーダー向けの名称は .brand の aria-label が担う */
.brand-mark > span { display: none !important; }

.brand-name {
  color: var(--fg, #f0eee9);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: .07em;
}

.site-nav { display: none !important; }

/* Global fixed menu trigger: always stays at the upper-right on every page. */
.site-menu-toggle {
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid rgba(159,73,57,.52);
  border-radius: 50%;
  background: rgba(9,9,11,.76);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  position: fixed;
  top: 14px;
  right: 24px;
  z-index: 72;
  box-shadow: 0 8px 28px rgba(0,0,0,.18);
  backdrop-filter: blur(12px) saturate(120%);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
  transition: border-color .25s ease, background .25s ease, transform .25s ease;
}

.site-menu-toggle span {
  width: 17px;
  height: 1px;
  background: rgba(207,104,82,.88);
  transform-origin: center;
  transition: transform .28s cubic-bezier(.2,.7,.2,1), opacity .2s ease;
}

.site-menu-toggle:hover {
  border-color: rgba(207,104,82,.86);
  background: rgba(18,14,14,.88);
}

body.site-menu-open .site-menu-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
body.site-menu-open .site-menu-toggle span:nth-child(2) { opacity: 0; }
body.site-menu-open .site-menu-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Global fixed account icon: sits just left of the menu trigger, always visible. */
.site-account-icon {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(159,73,57,.52);
  border-radius: 50%;
  background: rgba(9,9,11,.76);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 14px;
  right: 80px;
  z-index: 72;
  box-shadow: 0 8px 28px rgba(0,0,0,.18);
  backdrop-filter: blur(12px) saturate(120%);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
  color: rgba(207,104,82,.88);
  text-decoration: none;
  overflow: hidden;
  transition: border-color .25s ease, background .25s ease, transform .25s ease;
}

.site-account-icon:hover {
  border-color: rgba(207,104,82,.86);
  background: rgba(18,14,14,.88);
}

.site-account-icon__body {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.site-account-icon__glyph {
  width: 22px;
  height: 22px;
}

.site-account-icon__avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.site-account-icon__dot {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(210,170,77,.92);
  border: 1.5px solid rgba(9,9,11,.9);
  display: none;
}

.site-account-icon[data-auth="in"] .site-account-icon__dot { display: block; }

/* WEB-083: search icon, same fixed-position design as the account icon, one slot
   to its left (account right:80 + width46 + 10px gap = 136). */
.site-search-icon {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(159,73,57,.52);
  border-radius: 50%;
  background: rgba(9,9,11,.76);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 14px;
  right: 136px;
  z-index: 72;
  box-shadow: 0 8px 28px rgba(0,0,0,.18);
  backdrop-filter: blur(12px) saturate(120%);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
  color: rgba(207,104,82,.88);
  text-decoration: none;
  transition: border-color .25s ease, background .25s ease, transform .25s ease;
}

.site-search-icon:hover {
  border-color: rgba(207,104,82,.86);
  background: rgba(18,14,14,.88);
}

.site-search-icon__glyph {
  width: 20px;
  height: 20px;
}

.site-menu-backdrop {
  position: fixed;
  inset: 74px 0 0;
  z-index: 68;
  background: rgba(0,0,0,.48);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .32s ease, visibility .32s ease;
}

.site-menu-panel {
  position: fixed;
  top: 74px;
  right: 0;
  bottom: 0;
  z-index: 70;
  width: min(230px, 78vw);
  padding: 38px 34px;
  /* JMG-007: 神々を追加しても小さな画面で会員・朋・想・お問い合わせまで辿れる。 */
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  background:
    radial-gradient(circle at 100% 0%, rgba(159,73,57,.06), transparent 20rem),
    linear-gradient(180deg, rgba(16,16,19,.99), rgba(9,9,11,.995));
  border-left: 1px solid rgba(210,170,77,.07);
  box-shadow: -30px 0 90px rgba(0,0,0,.32);
  transform: translateX(102%);
  visibility: hidden;
  transition: transform .42s cubic-bezier(.16,.84,.24,1), visibility .42s ease;
}

body.site-menu-open { overflow: hidden; }
body.site-menu-open .site-menu-backdrop {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
body.site-menu-open .site-menu-panel {
  transform: translateX(0);
  visibility: visible;
}

.site-menu-kicker {
  margin: 0 0 1.45rem;
  color: rgba(210,170,77,.58);
  font-size: .55rem;
  font-weight: 600;
  letter-spacing: .20em;
  white-space: nowrap;
}

/* Vermilion stamps in a single calm vertical line. */
.site-menu-list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 13px;
}

.site-menu-list a {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  border: 1px solid rgba(159,73,57,.72);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: rgba(9,9,11,.34);
  box-shadow: inset 0 0 0 1px rgba(207,104,82,.025);
  transition: border-color .22s ease, background .22s ease, transform .22s ease;
}

.site-menu-list a:hover {
  border-color: rgba(207,104,82,.96);
  background: rgba(56,20,17,.17);
  transform: translateX(-3px);
}

.site-menu-label {
  color: rgba(207,104,82,.92);
  font-family: "Shippori Mincho", serif;
  font-size: .86rem;
  line-height: 1;
  letter-spacing: .03em;
}

.site-menu-index,
.site-menu-count { display: none !important; }

/* TOP: treat the first view as an intentional canvas, not a dashboard. */
.home-hero {
  min-height: calc(100svh - 74px);
  padding-top: clamp(120px, 17vh, 210px) !important;
  padding-bottom: clamp(130px, 18vh, 220px) !important;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.home-hero .eyebrow { margin-bottom: 1.35rem; }
.home-hero h1 { margin-top: 0; margin-bottom: 1.7rem; }
.home-hero .hero-lead { max-width: 760px; margin-bottom: 0; }
.home-hero .hero-meta { margin-top: 2.35rem; }

.home-section {
  padding-top: clamp(120px, 16vh, 210px) !important;
  padding-bottom: clamp(120px, 16vh, 210px) !important;
}

.home-section .section-heading {
  margin-bottom: clamp(64px, 8vw, 110px) !important;
}

/* 知: Rayne-Lab独自の中核モデルだけ、他の理論カードより一段強く見せる。 */
.subcategory-card[href="/01_chi/rayne-model/"] {
  position: relative;
  border-color: rgba(210,170,77,.55);
  background:
    radial-gradient(circle at 92% 12%, rgba(210,170,77,.10), transparent 9rem),
    linear-gradient(145deg, rgba(210,170,77,.085), rgba(159,73,57,.025) 58%, rgba(255,255,255,.014));
  box-shadow:
    inset 0 1px 0 rgba(227,191,104,.10),
    0 18px 48px rgba(0,0,0,.20);
}

.subcategory-card[href="/01_chi/rayne-model/"]::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 22px;
  right: 22px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(227,191,104,.92), transparent);
}

.subcategory-card[href="/01_chi/rayne-model/"] .subcategory-title {
  color: var(--gold-bright);
}

.subcategory-card[href="/01_chi/rayne-model/"]:hover {
  border-color: rgba(227,191,104,.78);
  background:
    radial-gradient(circle at 92% 12%, rgba(210,170,77,.16), transparent 10rem),
    rgba(210,170,77,.055);
}

@media (max-width: 680px) {
  .header-inner { width: calc(100% - 32px); height: 64px; }
  .site-menu-backdrop { top: 64px; }
  .site-menu-panel {
    top: 64px;
    width: min(190px, 76vw);
    padding: 32px 28px;
  }
  .site-menu-toggle {
    width: 42px;
    height: 42px;
    top: 11px;
    right: 16px;
  }
  .site-account-icon {
    width: 42px;
    height: 42px;
    top: 11px;
    right: 66px;
  }
  .site-account-icon__glyph { width: 19px; height: 19px; }
  .site-account-icon__dot { width: 9px; height: 9px; }
  .site-search-icon {
    width: 42px;
    height: 42px;
    top: 11px;
    right: 118px;
  }
  .site-search-icon__glyph { width: 18px; height: 18px; }
  .site-menu-list { gap: 11px; }
  .site-menu-list a {
    width: 50px;
    height: 50px;
    flex-basis: 50px;
  }
  .site-menu-label { font-size: .82rem; }
  .home-hero {
    min-height: calc(100svh - 64px);
    padding-top: 92px !important;
    padding-bottom: 108px !important;
  }
  .home-section {
    padding-top: 96px !important;
    padding-bottom: 96px !important;
  }
}


/* Global Observation AI Lite entry point. Hidden on the chat page itself by JS. */
.observation-ai-float {
  position: fixed;
  right: 24px;
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  z-index: 64;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid rgba(210,170,77,.58);
  border-radius: 18px 18px 4px 18px;
  background:
    radial-gradient(circle at 100% 0%, rgba(210,170,77,.13), transparent 7rem),
    rgba(13,13,16,.92);
  color: var(--fg, #f0eee9);
  text-decoration: none;
  box-shadow: 0 14px 42px rgba(0,0,0,.36), inset 0 1px 0 rgba(255,255,255,.035);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.observation-ai-float::after {
  content: "";
  position: absolute;
  right: -1px;
  bottom: -8px;
  width: 12px;
  height: 12px;
  border-right: 1px solid rgba(210,170,77,.58);
  background: rgba(13,13,16,.96);
  clip-path: polygon(0 0, 100% 0, 100% 100%);
}

.observation-ai-float:hover {
  transform: translateY(-2px);
  border-color: rgba(227,191,104,.9);
  background: rgba(24,20,17,.96);
}

.observation-ai-float:focus-visible {
  outline: 2px solid var(--gold-bright, #e3bf68);
  outline-offset: 4px;
}

.observation-ai-float__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  flex: none;
  line-height: 0;
}

.observation-ai-float__icon svg {
  display: block;
}

.observation-ai-float__label {
  font-family: "Shippori Mincho", serif;
  font-size: .88rem;
  line-height: 1;
  letter-spacing: .06em;
}

/* プラン表示。文字の高さが違うので、上揃えではなく中央でそろえる。 */
.observation-ai-float__lite {
  align-self: center;
  color: var(--gold-soft, #d2aa4d);
  font-size: .62rem;
  line-height: 1;
  letter-spacing: .08em;
  text-transform: uppercase;
}

@media (max-width: 680px) {
  .observation-ai-float {
    right: 14px;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    min-height: 44px;
    padding: 0 14px;
  }
}

@media print {
  .observation-ai-float { display: none !important; }
}

/* パンくず（postprocess_site.py が入れる .breadcrumb-page）。
   文字は小さいままで、指が当たる高さだけ確保する。 */
.breadcrumb-page {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 .35rem;
}
.breadcrumb-page a,
.breadcrumb-page .breadcrumb-current {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
}
@media (max-width: 680px) {
  .breadcrumb-page a,
  .breadcrumb-page .breadcrumb-current { min-height: 44px; }
}

/* ------------------------------------------------------------------
 * WEB-175: 指で押す領域の最低サイズ
 *
 * 2026-09-24、360px幅で実際に描画して測った結果にもとづく。
 * 指の腹はおよそ9〜10mm（CSSピクセルで44前後）ある。
 *
 *   a.brand                     30x30  テンプレートページのロゴ
 *   .topbar .brand              93x25 / 130x30  ツールページのロゴ
 *   追従パンくずの a            25x17  「TOP」など（全ツールページ）
 *   button.v10-calendar-retry   84x27  六壬の「暦を再読み込み」
 *   a.diag-back / a.about-back  77x25 / 74x25
 *   a.article-favorite         243x32
 *
 * このファイルはテンプレートページ（bundle-core経由）と、
 * postprocess_site.py が差し込む手書きツールページの両方が読むので、
 * ここに置けば1箇所で両方に効く。
 *
 * ロゴは見た目の高さを変えたくないので、当たり判定だけを擬似要素で広げる。
 * それ以外は min-height で素直に確保する（文字サイズは変えない）。
 * ------------------------------------------------------------------ */
html body .brand { position: relative; }
html body .brand::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(100%, 44px);
  height: 44px;
  transform: translate(-50%, -50%);
}

html body .v10-calendar-retry {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: .9rem;
}

html body .diag-back,
html body .about-back,
html body .article-favorite {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

/* 「戻る」は左端に寄っているため、余白は右と縦だけに足す */
html body .diag-back,
html body .about-back { padding: .55rem .75rem .55rem 0; }

/* WEB-237: 「動きを減らす」設定を無視して共通ヘッダーが動いていた（2026-09-30 実測）。
   サイト全体のガードは style.css（= bundle-core-v1.css）の * ルール1本だけだが、
   bundle-core を読まないページが15本ある（404 / 暦ツール6本 / 御札ギャラリー /
   朔のゲーム5本 / 六壬2本）。この15本では固定メニュー・アイコン・ドロワー・
   観測AIフロートのトランジションがそのまま残り、ドロワーは0.42秒スライドしていた。
   残り288ページでは同じ要素が .01ms に潰れている＝15ページだけがルールから漏れていた。
   共通navに自前のガードを置いて挙動をそろえる。* の全体ガードを足す形にしないのは、
   ページ側が reduced-motion 時に意図して残している opacity フェードを消さないため。 */
@media (prefers-reduced-motion: reduce) {
  .site-menu-toggle,
  .site-menu-toggle span,
  .site-account-icon,
  .site-search-icon,
  .site-menu-backdrop,
  .site-menu-panel,
  .site-menu-list a,
  .observation-ai-float {
    transition: none;
  }
}
