/**
 * 9blog theme — Editorial (雑誌スタイル) / 9link DESIGN.md 完全準拠。
 *
 * Direction: editorial — 雑誌マストヘッド + 巻頭言、ナンバリング、太罫の区切り。
 * Color: モノクロ + 1 アクセント (#1a1a1a)。
 * Type: system font、palt 詰め、見出し緊密 / ラベル UPPERCASE 寛い。
 * Shape: 角丸基本 0、pill のみ 100px。
 * Grid: 8px 徹底。
 */

:root {
  /* 9link LP (link.9queue.com) と同方向: 白ベース + terracotta 1 アクセント */
  --9b-text:        #1a1a1a;
  --9b-text-soft:   #555555;
  --9b-muted:       #767676;
  --9b-bg:          #ffffff;
  --9b-bg-soft:     #faf6f0;
  --9b-card:        #ffffff;
  --9b-border:      #ececec;
  --9b-rule:        #c44a2a;
  --9b-accent:      #c44a2a;
  --9b-on-dark:     #ffffff;
  --9b-font: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
}

/* ============================================================
   Base
   ============================================================ */

body {
  background: var(--9b-bg);
  color: var(--9b-text);
  font-family: var(--9b-font);
  font-size: 1rem;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "palt", "pkna";
}

a {
  color: var(--9b-text);
  text-decoration: underline;
  text-decoration-color: var(--9b-border);
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  transition: text-decoration-color 150ms ease;
}
a:hover {
  text-decoration-color: var(--9b-text);
}

h1, h2, h3, h4 {
  font-family: var(--9b-font);
  color: var(--9b-text);
  letter-spacing: -0.01em;
  line-height: 1.4;
}

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

/* ============================================================
   Site shell
   ============================================================ */

.kitsune-site {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--9b-bg);
}

/* ============================================================
   Masthead (header) — 雑誌のマストヘッド風
   ============================================================ */

.kitsune-header {
  background: var(--9b-bg);
  border: none;
  border-bottom: 1px solid var(--9b-border);
  position: static;
  padding: 40px 24px 24px;
  text-align: center;
  display: block;
}

.kitsune-header-image { display: none; }

.kitsune-branding {
  padding: 0;
  text-align: center;
}
.kitsune-logo-link {
  display: inline-block;
  color: inherit;
  text-decoration: none;
}
.kitsune-logo-link:hover { text-decoration: none; opacity: 0.7; }

.kitsune-site-title {
  font-size: clamp(1.5rem, 2.2vw, 1.875rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--9b-text);
  display: block;
}

.kitsune-site-description {
  display: block;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--9b-accent);
  letter-spacing: 0.25em;
  margin-top: 8px;
  text-indent: 0.25em;
}

/* マストヘッド下の volume / tagline (Site.astro が出力する範囲では出ないので、
   index.astro で <p class="masthead-tagline"> を追加する想定。
   ただし出ない場合でも::after で号数の罫線で区切る) */

/* ============================================================
   Navigation — マストヘッド下の 1 行、テキストリンク + 中点
   ============================================================ */

.kitsune-nav {
  border: none;
  padding: 0;
  background: var(--9b-bg);
}
.kitsune-menu {
  display: flex;
  justify-content: center;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0 16px 32px;
  flex-wrap: wrap;
}
.kitsune-menu-item {
  position: relative;
}
.kitsune-menu-item a {
  display: inline-block;
  padding: 0;
  color: var(--9b-text);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-decoration: none;
}
.kitsune-menu-item a:hover {
  text-decoration: underline;
  text-decoration-color: var(--9b-text);
  text-underline-offset: 4px;
}

.kitsune-menu-toggle {
  display: none;
  margin: 8px auto 24px;
  padding: 8px 24px;
  background: transparent;
  border: 1px solid var(--9b-text);
  border-radius: 0;
  color: var(--9b-text);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-transform: uppercase;
}

/* ============================================================
   Content
   ============================================================ */

.kitsune-content {
  flex: 1;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 24px 80px;
  background: var(--9b-bg);
}

.kitsune-main h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--9b-text);
  position: relative;
}

.kitsune-main h2 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-top: 32px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--9b-border);
}

/* ============================================================
   Editorial lede (index.astro で出力する巻頭言ブロック)
   ============================================================ */

.editorial-lede {
  margin: 0 auto;
  padding: 0 0 56px;
  text-align: center;
  max-width: 560px;
}
.editorial-lede .label {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--9b-accent);
  margin-bottom: 16px;
}
.editorial-lede h2 {
  font-size: clamp(1.5rem, 2.5vw, 1.875rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.5;
  margin: 0 0 24px;
  padding: 0;
  border: none;
}
.editorial-lede p {
  font-size: 0.9375rem;
  line-height: 2;
  color: var(--9b-text-soft);
  margin: 0 0 16px;
}
.editorial-lede .signature {
  margin-top: 32px;
  font-size: 0.75rem;
  color: var(--9b-muted);
  letter-spacing: 0.15em;
}

/* セクション区切り — 太罫 + カテゴリラベル */
.editorial-section {
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--9b-border);
}
.editorial-section-label {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--9b-accent);
  margin-bottom: 24px;
}
.editorial-empty {
  font-size: 0.875rem;
  color: var(--9b-muted);
  text-align: center;
  padding: 32px 0;
  letter-spacing: 0.05em;
}

/* ============================================================
   Entry — editorial 記事カード
   ============================================================ */

.kitsune-entry {
  border: none;
  border-bottom: 1px solid var(--9b-border);
  padding: 32px 0;
  margin: 0;
}
.kitsune-entry:last-child { border-bottom: none; }

.kitsune-entry-header { margin-bottom: 16px; }

.kitsune-entry-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.5;
  margin-bottom: 8px;
}
.kitsune-entry-title a {
  color: var(--9b-text);
  text-decoration: none;
}
.kitsune-entry-title a:hover {
  text-decoration: underline;
  text-decoration-color: var(--9b-text);
  text-underline-offset: 4px;
}

.kitsune-entry-meta {
  font-size: 0.6875rem;
  color: var(--9b-muted);
  letter-spacing: 0.15em;
  font-weight: 500;
}

.kitsune-entry-thumbnail {
  margin: 16px 0;
  overflow: hidden;
}
.kitsune-entry-thumbnail img { width: 100%; }

.kitsune-entry-content p {
  font-size: 0.9375rem;
  color: var(--9b-text-soft);
  line-height: 1.95;
  margin-bottom: 8px;
}
.kitsune-entry-content a {
  color: var(--9b-text);
  text-decoration: underline;
  text-decoration-color: var(--9b-text);
  text-underline-offset: 4px;
  font-weight: 500;
}

/* ============================================================
   Form
   ============================================================ */

input[type="search"], input[type="text"] {
  background: var(--9b-bg);
  border: 1px solid var(--9b-text);
  border-radius: 0;
  padding: 8px 16px;
  font-size: 0.9375rem;
  font-family: inherit;
  color: var(--9b-text);
}
input[type="search"]:focus, input[type="text"]:focus {
  outline: 2px solid var(--9b-text);
  outline-offset: -2px;
  border-color: transparent;
}

.kitsune-content button,
.kitsune-content button[type="submit"] {
  background: var(--9b-text);
  color: var(--9b-on-dark);
  border: 0;
  border-radius: 0;
  padding: 8px 24px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  font-family: inherit;
  cursor: pointer;
  text-transform: uppercase;
}
.kitsune-content button:hover { opacity: 0.85; }

/* ============================================================
   Footer — マストヘッドと同色 (#f0f0f0)、太罫上端
   ============================================================ */

.kitsune-footer {
  background: var(--9b-bg);
  border-top: 1px solid var(--9b-border);
  padding: 48px 24px 32px;
  margin-top: 0;
}
.kitsune-footer-inner {
  max-width: 880px;
  margin: 0 auto;
  text-align: center;
}
.kitsune-footer-menu {
  display: flex;
  justify-content: center;
  gap: 24px;
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  flex-wrap: wrap;
}
.kitsune-footer-menu a {
  color: var(--9b-text);
  font-size: 0.8125rem;
  text-decoration: none;
}
.kitsune-footer-menu a:hover {
  text-decoration: underline;
  text-decoration-color: var(--9b-text);
  text-underline-offset: 4px;
}

.kitsune-social {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.kitsune-social-link {
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--9b-text);
  padding: 8px 16px;
  border: 1px solid var(--9b-text);
  border-radius: 0;
  text-decoration: none;
  background: transparent;
}
.kitsune-social-link:hover {
  color: var(--9b-on-dark);
  background: var(--9b-text);
  text-decoration: none;
}

.kitsune-copyright {
  font-size: 0.6875rem;
  color: var(--9b-muted);
  letter-spacing: 0.15em;
}

/* ============================================================
   Sidebar
   ============================================================ */

.kitsune-has-sidebar {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 48px;
}

/* ============================================================
   Responsive (768px breakpoint)
   ============================================================ */

@media (max-width: 768px) {
  .kitsune-header {
    padding: 24px 16px 8px;
  }

  .kitsune-menu {
    padding: 0 16px 16px;
    display: none;
    flex-direction: column;
    gap: 0;
    width: 100%;
    border-top: 1px solid var(--9b-border);
  }
  .kitsune-menu.is-open { display: flex; padding-top: 8px; }

  .kitsune-menu-item a {
    display: block;
    padding: 12px 0;
    text-align: left;
    border-bottom: 1px solid var(--9b-border);
    width: 100%;
  }

  .kitsune-menu-toggle {
    display: inline-flex;
  }

  .kitsune-content {
    padding: 32px 16px 56px;
  }

  .kitsune-has-sidebar { grid-template-columns: 1fr; }

  .editorial-lede { padding: 0 0 32px; }
}

@media (max-width: 380px) {
  .kitsune-site-title { font-size: 1.375rem; }
}
