/* ==========================================================================
   NEFS Design — 共通スタイル
   Design System: NEFS Design System (claude.ai/design, projectId e6008947-3040-4df2-a4a7-ee574adac2b0)
   命名規約: ../../NAMING.md
   ========================================================================== */

/* -- 1. Reset -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img, picture, video, canvas, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--text); }
button { cursor: pointer; }

/* -- 2. デザイントークン（デザイン正本の変数名をそのまま維持） -------------- */
:root,
[data-nefs-theme="light"] {
  --bg: oklch(0.975 0.005 265);
  --surface: oklch(0.945 0.008 265);
  --raise: oklch(0.915 0.01 265);
  --text: oklch(0.19 0.028 265);
  --muted: oklch(0.48 0.02 265);
  --line: oklch(0.87 0.01 265);
  --accent: oklch(0.5 0.1 235);
  --font-display: 'Source Serif 4', Georgia, serif;
  --font-ui: 'IBM Plex Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --nefs-code-string: oklch(0.5 0.12 150);
}

[data-nefs-theme="dark"] {
  --bg: oklch(0.155 0.028 265);
  --surface: oklch(0.195 0.03 265);
  --raise: oklch(0.235 0.032 265);
  --text: oklch(0.95 0.008 265);
  --muted: oklch(0.63 0.025 265);
  --line: oklch(0.28 0.028 265);
  --accent: oklch(0.8 0.13 200);
  --nefs-code-string: oklch(0.78 0.15 140);
}

/* レイアウト専用トークン（デザイン正本に無い値のみ --nefs- プレフィックス） */
:root {
  --nefs-topbar-h: 40px;
  --nefs-tabbar-h: 34px;
  --nefs-statusbar-h: 26px;
  --nefs-sidebar-w: 230px;
  --nefs-content-max: 840px;
}

/* -- 3. ベース -------------------------------------------------------------- */
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  scroll-behavior: smooth;
  min-height: 100vh;
  padding-bottom: var(--nefs-statusbar-h);
}
section[data-nefs-section] { scroll-margin-top: 96px; }
::selection { background: var(--accent); color: var(--bg); }

@keyframes nefsBlink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

/* -- 4. アプリ全体ラッパー ---------------------------------------------------- */
.nefs-app { min-height: 100vh; background: var(--bg); color: var(--text); }

/* -- 5. トップバー ----------------------------------------------------------- */
.nefs-topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 16px;
  height: var(--nefs-topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 5;
}
.nefs-navbtn {
  display: none;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 26px;
  height: 24px;
  font-size: 13px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 2px;
  flex: none;
}
/* タップ領域をモバイルアクセシビリティ基準（44×44px以上）へ拡大する不可視ヒットエリア。
   ボタン自体の見た目のサイズ（26×24px）は変えずトップバー（高さ40px）のレイアウトを保つ。 */
.nefs-navbtn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
}
.nefs-dots { display: flex; gap: 7px; }
.nefs-dot { width: 10px; height: 10px; border-radius: 50%; border: none; padding: 0; cursor: pointer; display: block; transition: transform .12s ease, filter .12s ease; }
.nefs-dot--close { background: #e0605a; }
.nefs-dot--minimize { background: #e6b400; }
.nefs-dot--maximize { background: #3fb968; }
.nefs-dot:hover { filter: brightness(1.2); transform: scale(1.15); }
.nefs-dot:disabled { opacity: 0.35; cursor: default; }
.nefs-dot:disabled:hover { filter: none; transform: none; }
.nefs-dot[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--accent); }
.nefs-dot:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* サイドバー折りたたみ（minimizeドット） */
/* PC幅（901px以上）限定：SP幅ではハンバーガーメニューの開閉ロジックを
   黄ドットが流用するため、この永続折りたたみは適用しない（境界は既存の
   レスポンシブ切り替え900pxに合わせる）。 */
@media (min-width: 901px) {
  body[data-nefs-sidebar="collapsed"] .nefs-shell { grid-template-columns: 0 minmax(0, 1fr); }
  body[data-nefs-sidebar="collapsed"] .nefs-shell__side { display: none; }
}

/* 没入読書モード（maximizeドット） */
body[data-nefs-focus="on"] .nefs-topbar,
body[data-nefs-focus="on"] .nefs-tabbar,
body[data-nefs-focus="on"] .nefs-shell__side,
body[data-nefs-focus="on"] .nefs-statusbar { display: none; }
body[data-nefs-focus="on"] .nefs-shell { grid-template-columns: minmax(0, 1fr); }
body[data-nefs-focus="on"] .nefs-shell__main { grid-column: 1; }

.nefs-focus-exit {
  display: none;
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 50;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  color: var(--text);
  cursor: pointer;
}
body[data-nefs-focus="on"] .nefs-focus-exit { display: inline-flex; align-items: center; gap: 6px; }

.nefs-sidebar-restore {
  display: none;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 50;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  color: var(--text);
  cursor: pointer;
}
@media (min-width: 901px) {
  body[data-nefs-sidebar="collapsed"] .nefs-sidebar-restore { display: inline-flex; align-items: center; gap: 6px; }
}
.nefs-topbar__title { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); letter-spacing: 0.03em; }
.nefs-topbar__spacer { flex: 1; }
.nefs-searchbtn {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 4px 10px;
  border-radius: 2px;
  white-space: nowrap;
  flex: none;
}
.nefs-searchbtn:hover { color: var(--accent); border-color: var(--accent); }
.nefs-themebtn {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  padding: 4px 10px;
  border-radius: 2px;
}
.nefs-themebtn:hover { color: var(--accent); border-color: var(--accent); }

/* -- 6. タブバー -------------------------------------------------------------- */
.nefs-tabbar {
  display: flex;
  height: var(--nefs-tabbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: var(--nefs-topbar-h);
  z-index: 4;
  overflow: auto;
}
.nefs-tabbar__panels { display: flex; }
.nefs-tab {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 16px;
  height: 100%;
  font-family: var(--font-mono);
  font-size: 11.5px;
  border-right: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
}
.nefs-tab:hover { color: var(--text); }
.nefs-tab__icon { opacity: 0.55; }
.nefs-tab.is-active { color: var(--text); }
.nefs-tab.is-active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--accent);
}

/* -- 7. 2カラムシェル（front-page.php・single.php 共通の骨格） -------------- */
.nefs-shell {
  display: grid;
  grid-template-columns: var(--nefs-sidebar-w) minmax(0, 1fr);
  align-items: start;
}
.nefs-shell__side {
  position: sticky;
  top: calc(var(--nefs-topbar-h) + var(--nefs-tabbar-h));
  height: calc(100vh - var(--nefs-topbar-h) - var(--nefs-tabbar-h) - var(--nefs-statusbar-h));
  border-right: 1px solid var(--line);
  padding: 20px 0;
  overflow: auto;
}
.nefs-shell__main {
  grid-column: 2;
  max-width: var(--nefs-content-max);
  padding: 56px 48px calc(120px + var(--nefs-statusbar-h));
}

/* -- 8. 下部ステータスバー --------------------------------------------------- */
.nefs-statusbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: var(--nefs-statusbar-h);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 16px;
  background: var(--surface);
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  z-index: 6;
}
.nefs-statusbar__branch { color: var(--accent); flex: none; }
.nefs-statusbar__spacer { flex: 1; }
.nefs-statusbar__file {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.nefs-statusbar__pos,
.nefs-statusbar__meta,
.nefs-statusbar__privacy {
  flex: none;
}

/* -- 9. 共有サイドバー（Explorer / Now / status、template-parts/sidebar.php） -- */
.nefs-sidebar { font-family: var(--font-mono); font-size: 12.5px; }
.nefs-sidebar__label,
.nefs-sidebar__now-label {
  padding: 0 18px 10px;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.nefs-sidebar__item {
  position: relative;
  display: flex;
  gap: 8px;
  padding: 5px 18px;
  color: var(--text);
}
.nefs-sidebar__item:hover { background: var(--surface); color: var(--accent); }
.nefs-sidebar__item.is-active::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--accent);
}
.nefs-sidebar__icon { color: var(--muted); }
.nefs-sidebar__now-label { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.nefs-sidebar__now { padding: 8px 18px 0; font-size: 11.5px; line-height: 1.9; color: var(--muted); }
.nefs-sidebar__status-link { display: inline-block; color: var(--accent); margin-top: 6px; }
.nefs-sidebar__status-link:hover { color: var(--text); }
.nefs-sidebar__term {
  padding: 18px 18px 0;
  margin-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  line-height: 1.9;
  color: var(--muted);
}
.nefs-sidebar__term-online { color: var(--accent); }
.nefs-sidebar__cursor {
  display: inline-block;
  width: 7px;
  height: 13px;
  margin-left: 4px;
  background: var(--accent);
  vertical-align: -2px;
  animation: nefsBlink 1.1s steps(1, end) infinite;
}

/* -- 10. ⌘K検索パレット -------------------------------------------------------- */
.nefs-palette {
  position: fixed;
  inset: 0;
  background: oklch(0.12 0.02 265 / 0.55);
  z-index: 20;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 14vh;
}
.nefs-palette[hidden] { display: none; }
.nefs-palette__panel {
  width: min(560px, 92vw);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 24px 60px oklch(0.12 0.02 265 / 0.4);
}
.nefs-palette__input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 14px;
  padding: 14px 16px;
  outline: none;
}
.nefs-palette__results { max-height: 320px; overflow: auto; padding: 6px 0; }
.nefs-palette-result {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 9px 16px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text);
}
.nefs-palette-result:hover { background: var(--surface); color: var(--accent); }
.nefs-palette-result__icon { color: var(--muted); }
.nefs-palette-result__label { flex: 1; }
.nefs-palette-result__kind { color: var(--muted); font-size: 11px; }
.nefs-palette__footer {
  display: flex;
  gap: 16px;
  padding: 8px 16px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--muted);
}

/* -- 11. モバイルナビ scrim --------------------------------------------------- */
.nefs-scrim {
  display: none;
  position: fixed;
  inset: 0;
  background: oklch(0.12 0.02 265 / 0.45);
  z-index: 7;
}
body[data-nefs-nav="open"] .nefs-scrim { display: block; }

/* -- 12. レスポンシブ（900px以下） ------------------------------------------- */
@media (max-width: 900px) {
  .nefs-navbtn { display: inline-flex; }
  .nefs-searchbtn__label { display: none; }

  .nefs-shell { grid-template-columns: minmax(0, 1fr); }
  .nefs-shell__main { grid-column: 1; }
  .nefs-shell__side {
    position: fixed;
    top: calc(var(--nefs-topbar-h) + var(--nefs-tabbar-h));
    bottom: var(--nefs-statusbar-h);
    left: 0;
    width: 250px;
    height: auto;
    z-index: 8;
    background: var(--bg);
    border-right: 1px solid var(--line);
    transform: translateX(-102%);
    transition: transform 0.18s ease;
  }
  body[data-nefs-nav="open"] .nefs-shell__side { transform: none; }
  .nefs-shell__main { padding: 36px 22px calc(96px + var(--nefs-statusbar-h)); }

  /* モバイル幅ではファイル名の表示領域を確保するため、副次的な情報を隠す
     （監査#10：長いファイル名がステータスバーの高さからはみ出す問題への対応）。 */
  .nefs-statusbar__pos,
  .nefs-statusbar__meta {
    display: none;
  }
}

@media (min-width: 901px) {
  .nefs-scrim { display: none; }
}

/* -- 13. ページ固有: 疑似ファイルセクション共通（front-page.php・single.php） -- */
.nefs-file { margin-bottom: 64px; }
.nefs-file[hidden] { display: none; }
/* タブ切替時のscrollIntoView()がsticky状態のトップバー・タブバーに隠れないよう
   スクロール到達点をずらす（対象4パネルのみ、監査#52のクリック時スクロール復元）。 */
#readme, #about, #uses, #contact {
  scroll-margin-top: calc(var(--nefs-topbar-h) + var(--nefs-tabbar-h));
}
.nefs-file:last-child { margin-bottom: 0; }
.nefs-file__head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  padding-bottom: 10px;
  margin: 0 0 28px;
  border-bottom: 1px solid var(--line);
}
.nefs-file__icon { opacity: 0.7; }

/* -- 14. README hero -------------------------------------------------------- */
.nefs-hero__title {
  font-family: var(--font-display);
  font-size: clamp(40px, 7vw, 64px);
  font-weight: 700;
  line-height: 1.05;
  margin: 0 0 10px;
}
.nefs-hero__sub {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  margin: 0 0 28px;
}
.nefs-hero__body {
  font-family: var(--font-display);
  font-size: 16.5px;
  line-height: 1.85;
  color: var(--text);
  max-width: 640px;
  margin: 0 0 18px;
}
.nefs-hero__stats {
  display: flex;
  gap: 28px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
}
.nefs-hero__stat { display: flex; flex-direction: column; gap: 4px; }
.nefs-hero__stat-value { font-size: 20px; color: var(--text); }
.nefs-hero__stat-label { font-size: 10.5px; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }

/* -- 15. work ---------------------------------------------------------------- */
.nefs-work { display: flex; flex-direction: column; }
.nefs-work-item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.nefs-work-item:last-child { border-bottom: 0; }
.nefs-work-item__year { font-family: var(--font-mono); font-size: 12px; color: var(--muted); padding-top: 3px; }
.nefs-work-item__title {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 6px;
}
.nefs-work-item__tag {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  color: var(--accent);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 1px 6px;
}
.nefs-work-item__desc { font-size: 13.5px; color: var(--muted); line-height: 1.7; margin: 0 0 8px; }
.nefs-work-item__stack { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); margin: 0; }
.nefs-work-item__title a { color: var(--text); }
.nefs-work-item__title a:hover { color: var(--accent); }
.nefs-work-empty { font-size: 13.5px; color: var(--muted); }
.nefs-work-intro {
  font-family: var(--font-display);
  font-size: 15px;
  line-height: 1.8;
  color: var(--muted);
  max-width: 560px;
  margin: 0 0 32px;
}
.nefs-file__more {
  display: inline-block;
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}
.nefs-file__more:hover { color: var(--accent); }

/* -- 16. writing --------------------------------------------------------------- */
.nefs-writing__list { list-style: none; margin: 0; padding: 0; }
.nefs-writing-item { padding: 18px 0; border-bottom: 1px solid var(--line); }
.nefs-writing-item:last-child { border-bottom: 0; }
.nefs-writing-item__meta {
  display: flex;
  gap: 12px;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 8px;
}
.nefs-writing-item__tag { color: var(--accent); }
.nefs-writing-item__title { font-family: var(--font-ui); font-size: 15.5px; font-weight: 600; margin: 0 0 6px; }
.nefs-writing-item__title a { color: var(--text); }
.nefs-writing-item__title a:hover { color: var(--accent); }
.nefs-writing-item__excerpt { font-size: 13.5px; color: var(--muted); line-height: 1.7; margin: 0; }

/* -- 17. about ------------------------------------------------------------------ */
.nefs-about__body {
  font-family: var(--font-display);
  font-size: 15.5px;
  line-height: 1.85;
  color: var(--text);
  max-width: 640px;
  margin: 0 0 16px;
}
.nefs-about__dl {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 20px;
  row-gap: 8px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12.5px;
}
.nefs-about__dl dt { color: var(--muted); margin: 0; }
.nefs-about__dl dd { color: var(--text); margin: 0; }
.nefs-about__dl dd a { color: var(--accent); }
.nefs-about__dl dd a:hover { color: var(--text); }

/* -- 18. uses --------------------------------------------------------------------- */
.nefs-uses {
  display: grid;
  grid-template-columns: 120px 1fr;
  column-gap: 16px;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12.5px;
}
.nefs-uses dt { color: var(--muted); padding: 9px 0; border-bottom: 1px solid var(--line); margin: 0; }
.nefs-uses dd { color: var(--text); padding: 9px 0; border-bottom: 1px solid var(--line); margin: 0; }
.nefs-uses dt:last-of-type, .nefs-uses dd:last-of-type { border-bottom: 0; }

/* -- 19. contact -------------------------------------------------------------------- */
.nefs-contact__cmd { font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); margin: 0 0 12px; }
.nefs-contact__email {
  font-family: var(--font-mono);
  font-size: 22px;
  color: var(--accent);
  display: inline-block;
  margin-bottom: 24px;
}
.nefs-contact__email:hover { color: var(--text); }
.nefs-contact__links { display: flex; gap: 20px; font-family: var(--font-mono); font-size: 12.5px; }
.nefs-contact__links a { color: var(--muted); }
.nefs-contact__links a:hover { color: var(--accent); }

/* -- 20. レスポンシブ追加（900px以下） ------------------------------------------------- */
@media (max-width: 900px) {
  .nefs-hero__stats { flex-wrap: wrap; row-gap: 16px; }
  .nefs-work-item { grid-template-columns: 1fr; gap: 6px; }
  .nefs-work-item__year { padding-top: 0; }
  .nefs-uses { grid-template-columns: 100px 1fr; }
}

/* -- 21. 個別記事（single.php、ArticleCard準拠） --------------------------------------- */
.nefs-article__meta {
  display: flex;
  gap: 12px;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 14px;
}
.nefs-article__tag { color: var(--accent); }
.nefs-article__title {
  font-family: var(--font-display);
  font-size: clamp(30px, 5vw, 42px);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}
.nefs-article__body {
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.9;
  color: var(--text);
  max-width: 680px;
}
.nefs-article__body p { margin: 0 0 22px; }
.nefs-article__body h2 { font-family: var(--font-ui); font-size: 22px; font-weight: 600; margin: 44px 0 18px; }
.nefs-article__body h3 { font-family: var(--font-ui); font-size: 18px; font-weight: 600; margin: 36px 0 14px; }
.nefs-article__body ul,
.nefs-article__body ol { margin: 0 0 22px; padding-left: 22px; }
.nefs-article__body li { margin-bottom: 8px; }
.nefs-article__body a { text-decoration: underline; text-underline-offset: 2px; }
.nefs-article__body blockquote {
  margin: 0 0 22px;
  padding: 4px 20px;
  border-left: 2px solid var(--accent);
  color: var(--muted);
  font-style: italic;
}
.nefs-article__body code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--surface);
  padding: 2px 6px;
  border-radius: 2px;
}
.nefs-article__body pre {
  margin: 0 0 22px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
}
.nefs-article__body pre code { background: none; padding: 0; }
.nefs-article__body pre .tok-comment { color: var(--muted); font-style: italic; }
.nefs-article__body pre .tok-string { color: var(--nefs-code-string); }
.nefs-article__body pre .tok-keyword { color: var(--accent); font-weight: 600; }
.nefs-article__body pre .tok-tag { color: var(--accent); }
.nefs-article__body img { border-radius: 4px; margin: 8px 0 22px; }
.nefs-article__body hr { border: 0; border-top: 1px solid var(--line); margin: 36px 0; }

/* -- 22. シンプルページ（privacy.php等、VSCode風UIへの翻訳をしないページ用） -------------- */
.nefs-simple { padding: 64px 24px calc(120px + var(--nefs-statusbar-h)); }
.nefs-simple__inner {
  max-width: 640px;
  margin: 0 auto;
  font-family: var(--font-display);
  font-size: 15.5px;
  line-height: 1.9;
  color: var(--text);
}
.nefs-simple__title {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 38px);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 36px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.nefs-simple__inner h2 { font-family: var(--font-ui); font-size: 18px; font-weight: 600; margin: 40px 0 14px; }
.nefs-simple__inner p { margin: 0 0 18px; }
.nefs-simple__inner ul { margin: 0 0 18px; padding-left: 20px; }
.nefs-simple__inner li { margin-bottom: 6px; }
.nefs-simple__inner a { text-decoration: underline; text-underline-offset: 2px; }

/* -- 23. ステータスバー：privacy.phpへの導線リンク -------------------------------------- */
.nefs-statusbar__privacy { color: var(--muted); }
.nefs-statusbar__privacy:hover { color: var(--accent); }

/* -- 24. お問い合わせフォーム（front-page.php #contact） ---------------------------------- */
.nefs-contact__form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 420px;
  margin: 4px 0 28px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
}
.nefs-contact__field { display: flex; flex-direction: column; gap: 6px; }
.nefs-contact__field label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}
.nefs-contact__field input,
.nefs-contact__field textarea {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 8px 10px;
  resize: vertical;
}
.nefs-contact__field input:focus,
.nefs-contact__field textarea:focus { outline: none; border-color: var(--accent); }
.nefs-contact__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.nefs-contact__submit {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--accent);
  border-radius: 2px;
  padding: 8px 18px;
  cursor: pointer;
}
.nefs-contact__submit:hover { background: var(--accent); color: var(--bg); }
.nefs-contact__submit:disabled { opacity: 0.6; cursor: default; }
.nefs-contact__hint { font-family: var(--font-mono); font-size: 11px; color: var(--muted); margin: 0; }
.nefs-contact__notice {
  font-family: var(--font-mono);
  font-size: 12.5px;
  padding: 8px 12px;
  border-radius: 2px;
  margin: 0 0 16px;
  max-width: 420px;
}
.nefs-contact__notice--success { color: var(--accent); border: 1px solid var(--accent); }
.nefs-contact__notice--error { color: var(--text); border: 1px solid var(--line); background: var(--surface); }
.nefs-contact__alt { font-size: 12.5px; color: var(--muted); margin: 0 0 6px; }
.nefs-contact__email--secondary {
  font-size: 14px;
  color: var(--muted);
  display: inline-block;
  margin-bottom: 24px;
}
.nefs-contact__email--secondary:hover { color: var(--accent); }

/* -- 25. workインライン複製CTA（archive-nefs_work.php・single-nefs_work.php本文末尾） -------- */
.nefs-inline-status {
  margin-top: 40px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  max-width: 420px;
}
.nefs-inline-status__link { display: inline-block; margin-top: 6px; color: var(--accent); }
.nefs-inline-status__link:hover { color: var(--text); }

/* -- 26. パンくず（nefs-breadcrumb、VSCode本家のbreadcrumbバー意匠、タブバー直下） ------------ */
.nefs-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 20px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.nefs-breadcrumb__sep { color: var(--line); }
a.nefs-breadcrumb__item { color: var(--muted); }
a.nefs-breadcrumb__item:hover { color: var(--accent); }
.nefs-breadcrumb__item.is-current { color: var(--text); }

/* -- 27. 旧記事フォールバックレンダラー（word_balloon・nlink、inc/legacy-shortcodes.php） --- */
.nefs-balloon {
  margin: 0 0 22px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  border-radius: 4px;
}
.nefs-balloon__name {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 8px;
}
.nefs-balloon__name::before {
  content: '◆';
  margin-right: 6px;
  opacity: 0.6;
}
.nefs-balloon__body {
  font-family: var(--font-display);
  font-size: 15.5px;
  line-height: 1.85;
  color: var(--text);
}
.nefs-balloon__body > *:last-child { margin-bottom: 0; }

.nefs-nlink {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  margin: 4px 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
  text-decoration: none;
}
.nefs-nlink:hover { border-color: var(--accent); color: var(--accent); }
.nefs-nlink__icon { color: var(--muted); }
.nefs-nlink--plain {
  display: inline;
  padding: 0;
  background: none;
  border: 0;
  font-family: inherit;
  font-size: inherit;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.nefs-nlink--plain:hover { color: var(--text); }

/* -- 28. 目次（.nefs-toc、VSCode本家「OUTLINE」パネル意匠、Explorer直後、inc/toc.php） --- */
.nefs-toc {
  font-family: var(--font-mono);
  font-size: 12.5px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.nefs-toc__list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0 18px;
}
.nefs-toc__item { padding: 4px 0; }
.nefs-toc__item a {
  color: var(--muted);
  line-height: 1.5;
}
.nefs-toc__item a:hover { color: var(--accent); }

/* SP専用：記事本文近くの目次トグル（ハンバーガーとは独立、PC幅は非表示） */
.nefs-article-toc { display: none; }
@media (max-width: 900px) {
  .nefs-article-toc {
    display: block;
    margin: 0 0 24px;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
  }
  .nefs-article-toc__toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    background: var(--surface);
    border: none;
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: var(--text);
    cursor: pointer;
  }
  .nefs-article-toc__toggle[aria-expanded="true"] { border-bottom: 1px solid var(--line); }
  .nefs-article-toc__panel { padding: 6px 14px 14px; }
  .nefs-article-toc__panel[hidden] { display: none; }
  .nefs-article-toc__panel .nefs-sidebar__label { display: none; } /* ボタン文言「目次」と重複するため内側のOutlineラベルは隠す */
  .nefs-article-toc .nefs-toc { margin-top: 0; padding-top: 0; border-top: none; } /* 既存.nefs-tocの上罫線・余白はサイドバー文脈専用のため、この文脈では打ち消す */

  /* ハンバーガー内からは目次を除去し、ファイルツリーのみ残す（SP幅限定） */
  .nefs-shell__side .nefs-toc { display: none; }
}

/* -- 29. 旧記事CSSクラス3種（.blue/.yellow・fvbox・memobox、addquicktag等プラグイン由来） --- */
.nefs-article__body .blue { color: #5b9bf0; }
.nefs-article__body .yellow { color: #e0b34d; }
body[data-nefs-theme="light"] .nefs-article__body .blue { color: #1a56db; }
body[data-nefs-theme="light"] .nefs-article__body .yellow { color: #7a5c08; }

.nefs-article__body .fvbox,
.nefs-article__body .memobox {
  margin: 1.5em 0;
  padding: 1em 1.25em;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
}
.nefs-article__body .fvbox-title,
.nefs-article__body .memobox-title {
  font-weight: 600;
  margin-bottom: 0.5em;
  color: var(--accent);
}
.nefs-article__body .fvbox > div:empty {
  display: none;
}
.nefs-article__body .fvbox p:last-child,
.nefs-article__body .memobox p:last-child {
  margin-bottom: 0;
}

/* -- 30. アクセシビリティ改善（監査バッチ#6〜#8,#13〜#17） ------------------------------ */
.nefs-skip-link {
  position: absolute;
  top: -100%;
  left: 8px;
  z-index: 100;
  padding: 8px 14px;
  background: var(--accent);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 12.5px;
  border-radius: 2px;
  transition: top 0.15s ease;
}
.nefs-skip-link:focus {
  top: 8px;
}

.nefs-contact__field-en {
  margin-left: 6px;
  font-size: 10px;
  color: var(--muted);
  text-transform: lowercase;
}

.nefs-contact__field input:focus-visible,
.nefs-contact__field textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* -- 31. writing全記事アーカイブページ（home.php）のページング ------------------------- */
.nefs-writing__pager {
  display: flex;
  justify-content: space-between;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12.5px;
}
.nefs-writing__pager a { color: var(--muted); }
.nefs-writing__pager a:hover { color: var(--accent); }
