/* =========================================
   Reset & base
========================================= */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --color-bg: #faf7f0;
  --color-bg-alt: #f0ece3;
  --color-dark: #1c1c1c;
  --color-text: #333;
  --color-muted: #6b6b6b;
  --color-accent: #b08d57; /* 金茶色 */
  --max-width: 1200px;
  --gap: 24px;
}

body {
  font-family: "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 64px 24px;
}

.section-title {
  font-size: 1.75rem;
  text-align: center;
  margin-bottom: 8px;
  letter-spacing: 0.05em;
}
.section-title.align-left { text-align: left; }

.section-lead {
  text-align: center;
  color: var(--color-muted);
  margin-bottom: 40px;
}

.section-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 32px;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-outline {
  display: inline-block;
  margin-top: 16px;
  padding: 12px 28px;
  border: 1px solid var(--color-dark);
  font-size: 0.9rem;
  transition: background 0.2s, color 0.2s;
}
.btn-outline:hover { background: var(--color-dark); color: #fff; }
.btn-outline.small { margin-top: 8px; padding: 8px 18px; }

/* =========================================
   Header
========================================= */
.site-header {
  border-bottom: 1px solid #e3ddd0;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 100; /* ドロワーやオーバーレイより手前に表示 */
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--color-accent);
  display: inline-block;
}
.logo-mark.light { border-color: #fff; }
.logo-text { display: flex; flex-direction: column; line-height: 1.3; }
.logo-text strong { font-size: 1rem; }
.logo-text small { font-size: 0.7rem; color: var(--color-muted); }

.global-nav ul {
  display: flex;
  gap: 28px;
  font-size: 0.9rem;
  flex-wrap: wrap;
}

.header-actions { display: flex; gap: 20px; flex-shrink: 0; }
.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--color-dark);
  padding: 4px;
}
.icon-btn .icon { width: 22px; height: 22px; }
.icon-btn .icon-label { font-size: 0.65rem; letter-spacing: 0.05em; }

/* ハンバーガーはモバイル専用。PC表示ではグローバルナビをそのまま表示するため非表示 */
.hamburger { display: none; }

/* --- ハンバーガー: 開いた状態で×に変形 --- */
.hamburger .bar { transform-origin: center; transition: transform 0.25s ease, opacity 0.25s ease; }
.hamburger[aria-expanded="true"] .bar-top    { transform: translateY(5px) rotate(45deg); }
.hamburger[aria-expanded="true"] .bar-mid    { opacity: 0; }
.hamburger[aria-expanded="true"] .bar-bottom { transform: translateY(-5px) rotate(-45deg); }

/* --- 検索パネル --- */
.search-panel {
  border-top: 1px solid #e3ddd0;
  background: #fff;
}
.search-form {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.search-form .icon { width: 20px; height: 20px; color: var(--color-muted); flex-shrink: 0; }
.search-form input {
  flex: 1;
  border: none;
  border-bottom: 1px solid #ccc;
  padding: 8px 4px;
  font-size: 0.9rem;
  background: transparent;
}
.search-form input:focus { outline: none; border-bottom-color: var(--color-accent); }
.search-form .btn-outline { margin: 0; white-space: nowrap; }

/* --- 検索結果ドロップダウン --- */
.search-results {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px 20px;
}

.search-result-list {
  border: 1px solid #e8e2d5;
  background: #fff;
}
.search-result-list li { border-bottom: 1px solid #f0ece3; }
.search-result-list li:last-child { border-bottom: none; }
.search-result-list a {
  display: block;
  padding: 12px 16px;
  font-size: 0.9rem;
}
.search-result-list a:hover {
  background: var(--color-bg-alt);
  color: var(--color-accent);
}

.search-no-result {
  padding: 16px;
  border: 1px solid #e8e2d5;
  background: #fff;
  font-size: 0.85rem;
  color: var(--color-muted);
}

/* --- モバイルナビ用オーバーレイ --- */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 40;
}

/* =========================================
   Hero
========================================= */
.hero {
  position: relative;
  min-height: 70vh;
  background: var(--color-dark); /* 実際は背景写真に差し替え */
  color: #fff;
  display: flex;
  align-items: center;
  padding: 48px 24px;
}

.hero-copy { max-width: 560px; }
.hero-copy h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 20px;
  letter-spacing: 0.03em;
}
.hero-copy p { margin-bottom: 24px; color: #ddd; }
.hero-copy .btn-outline {
  border-color: #fff;
}
.hero-copy .btn-outline:hover { background: #fff; color: var(--color-dark); }

.hero-vertical-copy {
  position: absolute;
  top: 48px;
  right: 40px;
  writing-mode: vertical-rl;
  font-size: 0.95rem;
  letter-spacing: 0.15em;
}

.scroll-indicator {
  position: absolute;
  bottom: 24px;
  right: 40px;
  writing-mode: vertical-rl;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
}

/* =========================================
   Card grids (shared)
========================================= */
.card-grid {
  display: grid;
  gap: var(--gap);
}

.card-grid-6 { grid-template-columns: repeat(6, 1fr); }
.card-grid-5 { grid-template-columns: repeat(5, 1fr); }
.card-grid-4 { grid-template-columns: repeat(4, 1fr); }

/* --- はじめての方へ: アイコンカード --- */
.mini-card {
  background: #fff;
  border: 1px solid #e8e2d5;
  padding: 32px 16px;
  text-align: center;
  transition: box-shadow 0.2s;
}
.mini-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.06); }
.mini-icon {
  display: block;
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  border: 1px solid var(--color-accent);
  border-radius: 50%;
}
.mini-card h3 { font-size: 1rem; margin-bottom: 8px; }
.mini-card p { font-size: 0.8rem; color: var(--color-muted); }

/* --- 画像カード（香木図鑑・文化・コラム共通） --- */
.image-card { background: #fff; }
.image-card-photo {
  aspect-ratio: 4 / 3;
  background: #ddd; /* 実際の写真に差し替え */
}
.image-card h3 { font-size: 0.95rem; margin: 12px 0 4px; }
.image-card p { font-size: 0.8rem; color: var(--color-muted); }
.image-card time {
  display: block;
  font-size: 0.75rem;
  color: var(--color-accent);
  margin-top: 8px;
}

.fragrant-wood, .column { background: var(--color-bg-alt); }
.fragrant-wood .section, .column .section { padding: 0; } /* すでに.sectionが親要素なら不要。二重ラップ回避用の保険 */

/* =========================================
   Footer
========================================= */
.site-footer {
  background: var(--color-dark);
  color: #ddd;
  padding: 64px 24px 24px;
}

.footer-top {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 48px;
  flex-wrap: wrap;
}

.footer-brand { max-width: 320px; }
.footer-brand p { font-size: 0.85rem; color: #aaa; margin-top: 16px; }

.footer-links {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
}

.footer-col h4 { font-size: 0.85rem; margin-bottom: 16px; color: #fff; }
.footer-col ul li { margin-bottom: 10px; font-size: 0.8rem; }
.footer-col ul li a:hover { color: var(--color-accent); }

.footer-bottom {
  max-width: var(--max-width);
  margin: 48px auto 0;
  border-top: 1px solid #444;
  padding-top: 24px;
  text-align: center;
  font-size: 0.75rem;
  color: #888;
}

/* =========================================
   Responsive
========================================= */
@media (max-width: 1024px) {
  .card-grid-6 { grid-template-columns: repeat(3, 1fr); }
  .card-grid-5 { grid-template-columns: repeat(3, 1fr); }
  .card-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .global-nav ul { gap: 16px; font-size: 0.85rem; }
}

@media (max-width: 768px) {
  /* このブレークポイントからハンバーガーを表示 */
  .hamburger { display: flex; }

  /* ナビをドロワー化: 通常は画面外、.is-open で表示 */
  .global-nav {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: min(80%, 320px);
    background: #fff;
    padding: 88px 24px 24px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 50;
    overflow-y: auto;
  }
  .global-nav.is-open { transform: translateX(0); }
  .global-nav ul { flex-direction: column; gap: 0; }
  .global-nav ul li { border-bottom: 1px solid #eee; }
  .global-nav ul li a { display: block; padding: 16px 4px; }

  .header-inner { padding: 12px 16px; }

  .hero { min-height: 60vh; }
  .hero-vertical-copy { display: none; }

  .card-grid-6 { grid-template-columns: repeat(2, 1fr); }
  .card-grid-5 { grid-template-columns: repeat(2, 1fr); }
  .card-grid-4 { grid-template-columns: repeat(2, 1fr); }

  .section { padding: 48px 16px; }
}

/* =========================================
   コンテンツページ共通（例: お香とは）
========================================= */

/* --- パンくず --- */
.breadcrumb {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 24px 0;
  font-size: 0.8rem;
  color: var(--color-muted);
}
.breadcrumb ol { display: flex; gap: 8px; flex-wrap: wrap; }
.breadcrumb li:not(:last-child)::after { content: "›"; margin-left: 8px; }
.breadcrumb a:hover { color: var(--color-accent); }

/* --- ページタイトル --- */
.page-head {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px 24px 48px;
  border-bottom: 1px solid #e8e2d5;
}
.page-eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--color-accent);
  margin-bottom: 8px;
}
.page-head h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); margin-bottom: 16px; }
.page-lead { max-width: 640px; color: var(--color-muted); }

/* --- コラム記事メタ情報（日付・タグ） --- */
.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  font-size: 0.85rem;
  color: var(--color-muted);
}
.article-tag {
  padding: 4px 12px;
  border: 1px solid var(--color-accent);
  color: var(--color-accent);
  border-radius: 999px;
  font-size: 0.75rem;
}

/* --- コラム冒頭の大きい写真 --- */
.article-photo.hero-photo { aspect-ratio: 16 / 7; margin-top: 0; }

/* --- 本文＋目次のレイアウト --- */
.content-layout {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 64px;
  align-items: start;
}

/* --- 目次カラムを持たない1カラム版（例: about-single.html） --- */
.content-layout.single-column {
  grid-template-columns: 1fr;
  max-width: 840px; /* 本文のみなので読みやすい行幅に制限 */
}

.article-section { margin-bottom: 56px; }
.article-section:last-child { margin-bottom: 0; }
.article-section h2 {
  font-size: 1.4rem;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--color-accent);
  display: inline-block;
}
.article-section p { margin-bottom: 16px; color: var(--color-text); }

.article-photo {
  aspect-ratio: 16 / 9;
  background: #ddd; /* 実際の写真に差し替え */
  margin-top: 24px;
}

/* mini-card をリンクなしの静的カードとして使う場合 */
.mini-card.static { cursor: default; }
.mini-card.static:hover { box-shadow: none; }

.card-grid-3 { grid-template-columns: repeat(3, 1fr); }

/* --- テーブル --- */
.table-wrap { overflow-x: auto; }
.content-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 480px;
}
.content-table th,
.content-table td {
  border: 1px solid #e3ddd0;
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
}
.content-table th {
  background: var(--color-bg-alt);
  font-weight: 600;
}

/* 行見出し（左端の th）として使う場合の幅調整 */
.content-table tbody th {
  width: 9em;
  white-space: nowrap;
}

/* --- 画像なしの一覧テーブル（香木一覧など、項目数が多いリスト向け） --- */
.wood-list-table tbody tr:nth-child(even) { background: #faf8f3; }
.wood-list-table td a {
  color: var(--color-accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.wood-list-table td a:hover { color: var(--color-dark); }
.wood-list-table td:first-child { white-space: nowrap; }

/* --- サイドバー目次（PC表示でスクロール追従） --- */
.article-toc {
  position: sticky;
  top: 24px;
  border: 1px solid #e8e2d5;
  padding: 20px;
  font-size: 0.85rem;
}
.toc-label {
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: 0.05em;
}
.article-toc ol { display: flex; flex-direction: column; gap: 10px; }
.article-toc a { color: var(--color-muted); }
.article-toc a:hover { color: var(--color-accent); }

.related { background: var(--color-bg-alt); }

/* --- タイムライン（歴史ページなどで使用） --- */
.timeline {
  position: relative;
  margin-top: 32px;
  padding-left: 28px;
  border-left: 2px solid #e3ddd0;
}

.timeline-item {
  position: relative;
  padding-bottom: 40px;
}
.timeline-item:last-child { padding-bottom: 0; }

.timeline-marker {
  position: absolute;
  top: 4px;
  left: -34px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 0 0 4px var(--color-bg);
}

.timeline-era {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--color-accent);
  margin-bottom: 6px;
}

.timeline-content h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}
.timeline-content p {
  color: var(--color-text);
  margin-bottom: 0;
}

/* --- 番号付きステップ（使い方ガイドなどで使用） --- */
.steps {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.step-item {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.step-number {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-dark);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 600;
}

.step-content h3 { font-size: 1.05rem; margin-bottom: 6px; }
.step-content p { color: var(--color-text); margin-bottom: 0; }

/* --- FAQ（アコーディオン） --- */
.faq-list {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  border: 1px solid #e8e2d5;
  background: #fff;
  padding: 16px 20px;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  position: relative;
  padding-right: 28px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 0;
  font-size: 1.2rem;
  color: var(--color-accent);
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after { content: "−"; }

.faq-item p {
  margin-top: 12px;
  color: var(--color-muted);
  font-size: 0.9rem;
}

/* --- ランキング形式リスト（コラムの「〜選」記事などで使用） --- */
.ranking-list {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.ranking-item {
  display: grid;
  grid-template-columns: auto 160px 1fr;
  gap: 20px;
  align-items: start;
  padding-bottom: 32px;
  border-bottom: 1px solid #e8e2d5;
}
.ranking-item:last-child { border-bottom: none; padding-bottom: 0; }

.ranking-number {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1;
  font-family: Georgia, "Times New Roman", serif;
}

.ranking-photo {
  width: 160px;
  aspect-ratio: 4 / 3;
  background: #ddd; /* 実際の写真に差し替え */
  flex-shrink: 0;
}

.ranking-content h3 { font-size: 1.1rem; margin-bottom: 8px; }
.ranking-content p { color: var(--color-text); margin-bottom: 0; }

@media (max-width: 600px) {
  .ranking-item {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "num photo"
      "content content";
  }
  .ranking-number { grid-area: num; }
  .ranking-photo { grid-area: photo; width: 100%; }
  .ranking-content { grid-area: content; }
}

/* =========================================
   コラム一覧＋タグフィルター（CSSのみで絞り込み）
========================================= */

/* --- フィルターボタン（ラジオボタン＋ラベルの見た目だけ利用） --- */
.tag-filter input[type="radio"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.tag-filter > label {
  display: inline-block;
  padding: 8px 20px;
  margin: 0 8px 24px 0;
  border: 1px solid #d8d1c2;
  border-radius: 999px;
  font-size: 0.85rem;
  cursor: pointer;
  background: #fff;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.tag-filter input:checked + label {
  background: var(--color-dark);
  border-color: var(--color-dark);
  color: #fff;
}

/* キーボード操作時のフォーカスを見えるように */
.tag-filter input:focus-visible + label {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* --- カードグリッド --- */
.column-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}

.column-card {
  display: block;
  background: #fff;
  border: 1px solid #e8e2d5;
}
.column-card-photo {
  aspect-ratio: 4 / 3;
  background: #ddd; /* 実際の写真に差し替え */
}
.column-card-body { padding: 16px; }
.column-card-tag {
  display: inline-block;
  font-size: 0.7rem;
  color: var(--color-accent);
  border: 1px solid var(--color-accent);
  border-radius: 999px;
  padding: 2px 10px;
  margin-bottom: 10px;
}
.column-card-body time {
  display: block;
  font-size: 0.75rem;
  color: var(--color-muted);
  margin-bottom: 6px;
}
.column-card-body h3 { font-size: 0.95rem; margin-bottom: 6px; }
.column-card-body p { font-size: 0.85rem; color: var(--color-muted); margin-bottom: 0; }

/*
  絞り込みロジック（JavaScript不要）:
  各カードは data-tags="タグA タグB" のようにスペース区切りでタグを保持する。
  対応するラジオボタンが選択された(:checked)とき、一般兄弟結合子(~)で
  同じ親を持つ .column-grid 内を検索し、[data-tags~="..."] に一致しない
  カードだけを display:none にする。
  「すべて」が選択されているときは何も非表示にならないため、追加のルールは不要。
*/
#tag-season-pick:checked ~ .column-grid .column-card:not([data-tags~="季節のおすすめ"]) { display: none; }
#tag-season-life:checked ~ .column-grid .column-card:not([data-tags~="季節の過ごし方"]) { display: none; }
#tag-focus:checked ~ .column-grid .column-card:not([data-tags~="集中・仕事"]) { display: none; }
#tag-gift:checked ~ .column-grid .column-card:not([data-tags~="ギフト"]) { display: none; }

@media (max-width: 900px) {
  .column-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .column-grid { grid-template-columns: 1fr; }
}

/* =========================================
   店舗一覧ページ（都道府県フィルター）
========================================= */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}

.shop-card {
  background: #fff;
  border: 1px solid #e8e2d5;
  padding: 20px;
}

.shop-tag {
  display: inline-block;
  font-size: 0.7rem;
  color: var(--color-accent);
  border: 1px solid var(--color-accent);
  border-radius: 999px;
  padding: 2px 10px;
  margin-bottom: 10px;
}

.shop-card h3 { font-size: 0.95rem; margin-bottom: 6px; }
.shop-address { font-size: 0.85rem; color: var(--color-muted); margin-bottom: 0; }

/* 都道府県フィルターの絞り込みロジック（JavaScript不要、column-indexと同じ仕組み） */
#pref-tokyo:checked    ~ .shop-grid .shop-card:not([data-tags~="東京都"])   { display: none; }
#pref-kanagawa:checked ~ .shop-grid .shop-card:not([data-tags~="神奈川県"]) { display: none; }
#pref-saitama:checked  ~ .shop-grid .shop-card:not([data-tags~="埼玉県"])   { display: none; }
#pref-kyoto:checked    ~ .shop-grid .shop-card:not([data-tags~="京都府"])   { display: none; }
#pref-ishikawa:checked ~ .shop-grid .shop-card:not([data-tags~="石川県"])   { display: none; }
#pref-osaka:checked    ~ .shop-grid .shop-card:not([data-tags~="大阪府"])   { display: none; }
#pref-hyogo:checked    ~ .shop-grid .shop-card:not([data-tags~="兵庫県"])   { display: none; }
#pref-oita:checked     ~ .shop-grid .shop-card:not([data-tags~="大分県"])   { display: none; }

@media (max-width: 900px) {
  .shop-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .shop-grid { grid-template-columns: 1fr; }
}

/* 現在地ナビの下線表示 */
.global-nav a.is-current { color: var(--color-accent); border-bottom: 2px solid var(--color-accent); }

/* =========================================
   Responsive（コンテンツページ）
========================================= */
@media (max-width: 900px) {
  .content-layout { grid-template-columns: 1fr; gap: 40px; }
  .article-toc { position: static; }
}

@media (max-width: 600px) {
  .card-grid-3 { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .card-grid-6,
  .card-grid-5,
  .card-grid-4 { grid-template-columns: 1fr; }

  .section-header-row { flex-direction: column; align-items: flex-start; }
}

