/* style.css - 豆腐百珍 再発見帖（kashihiden/style.css を複製し、末尾に豆腐百珍用の追加を置いた） */
@import url('https://fonts.googleapis.com/css2?family=Sawarabi+Mincho&display=swap');

:root {
    --primary: #5d4037;
    --bg: #fdfaf5;
    --text: #2c3e50;
    --accent: #4a6741;
    --accent-light: #e8f0e4;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Sawarabi Mincho', serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.9;
    padding-top: 48px;
}

/* ── ヘッダー ── */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--bg);
    border-bottom: 1px solid #e0d8cc;
    padding: 14px 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}
.site-header a {
    text-decoration: none;
    color: var(--primary);
    font-size: 0.9rem;
    opacity: 0.8;
}
.site-header a:hover { opacity: 1; }

/* ── アンカーリンクのスクロール位置補正（固定ヘッダー分） ── */
.section[id] {
    scroll-margin-top: 64px;
}

/* ── ヒーロー ── */
.hero {
    background: linear-gradient(135deg, #e8f0e4 0%, #f5f0e8 100%);
    padding: 60px 24px 50px;
    text-align: center;
    border-bottom: 1px solid #d9e8d3;
}
.hero-badge {
    display: inline-block;
    background: var(--accent);
    color: white;
    font-size: 0.75rem;
    padding: 4px 14px;
    border-radius: 20px;
    margin-bottom: 18px;
    letter-spacing: 0.08em;
}
.hero h1 {
    font-size: 2.4rem;
    color: var(--primary);
    margin: 0 0 8px;
    letter-spacing: 0.15em;
}
.hero .yomi {
    font-size: 1rem;
    color: #7a6a5a;
    margin: 0 0 16px;
    letter-spacing: 0.1em;
}
.hero .source {
    font-size: 0.8rem;
    color: #9a8a7a;
}

/* ── コンテナ ── */
.container {
    max-width: 820px;
    margin: 0 auto;
    padding: 48px 24px 80px;
}

/* ── 挿絵 ── */
.kashi-image {
    width: 100%;
    height: auto;
    border-radius: 12px;
    margin-bottom: 48px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

/* ── 挿絵プレースホルダー ── */
.kashi-image-placeholder {
    width: 100%;
    height: 280px;
    background: linear-gradient(135deg, #d4e8cc, #e8f0e4);
    border-radius: 12px;
    margin-bottom: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 1rem;
    opacity: 0.7;
}

/* ── セクション ── */
.section { margin-bottom: 48px; }
.section-label {
    font-size: 0.72rem;
    letter-spacing: 0.2em;
    color: var(--accent);
    border-left: 3px solid var(--accent);
    padding-left: 10px;
    margin-bottom: 16px;
    font-weight: bold;
}
.section p { margin: 0; font-size: 1rem; }

/* ── 季節タグ ── */
.season-tag {
    display: inline-block;
    background: var(--accent-light);
    color: var(--accent);
    font-size: 0.75rem;
    padding: 3px 12px;
    border-radius: 20px;
    margin-right: 8px;
    margin-bottom: 8px;
}

/* ── 翻刻 ── */
.honkoku-block {
    background: #f5f0e8;
    border: 1px solid #e0d4c0;
    border-radius: 8px;
    padding: 20px 24px;
    font-size: 0.95rem;
    line-height: 2;
    color: #5a4a3a;
}
.honkoku-note { font-size: 0.8rem; color: #8a7a6a; margin: 6px 0 0; }

/* ── レシピテーブル ── */
.recipe-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.recipe-table th {
    width: 30%;
    background: var(--accent-light);
    color: var(--accent);
    font-weight: bold;
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid #d9e8d3;
    vertical-align: top;
    white-space: nowrap;
}
.recipe-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #ece8e0;
    vertical-align: top;
    line-height: 1.75;
}
.recipe-table tr:last-child th,
.recipe-table tr:last-child td { border-bottom: none; }

/* ── 原材料 ── */
.ingredient-section {
    background: white;
    border: 1px solid #d9e8d3;
    border-radius: 12px;
    padding: 20px 24px;
}
.ingredient-intro { font-size: 0.85rem; color: #7a6a5a; margin: 0 0 14px; }
.ingredient-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 12px;
    align-items: flex-start;
}
.ingredient-item { text-align: center; font-size: 0.8rem; color: #666; }
.ingredient-item img { width: 100%; max-width: 120px; height: auto; object-fit: contain; }
.affiliate-note { font-size: 0.72rem; color: #aaa; margin: 0; }

/* ── ほえまる ── */
.hoemaru-block {
    background: white;
    border: 1px solid #d9e8d3;
    border-radius: 12px;
    padding: 24px;
    display: flex;
    gap: 18px;
    align-items: flex-start;
}
.hoemaru-icon {
    width: 72px;
    height: 72px;
    border-radius: 10px;
    flex-shrink: 0;
    object-fit: cover;
}
.hoemaru-text { font-size: 0.95rem; line-height: 1.8; color: #4a3a2a; }
.hoemaru-name { font-size: 0.75rem; color: var(--accent); margin-bottom: 6px; font-weight: bold; }

/* ── カード ── */
.item-card {
    border: 1px solid #e0d8cc;
    border-radius: 10px;
    padding: 20px 24px;
    background: white;
}
.coming-soon { font-size: 0.85rem; color: #aaa; font-style: italic; margin: 0; }
/* 「準備中」のプレースホルダーが残っている間は現代の逸品セクションを出さない。
   script.js が中身を差し込むとプレースホルダーが消えて表示される（JS無効・読み込み失敗時も隠れる）。
   :has() 非対応ブラウザでは script.js 側の display:none が効く */
#section-modern:has(.coming-soon) { display: none; }

/* ── ナビ ── */
.nav-links {
    display: flex;
    justify-content: center;
    margin-top: 64px;
    padding-top: 32px;
    border-top: 1px solid #e0d8cc;
    font-size: 0.85rem;
}
.nav-links a { color: var(--accent); text-decoration: none; }
.nav-links a:hover { text-decoration: underline; }

/* ── フッター ── */
footer {
    padding: 24px 20px;
    text-align: center;
    border-top: 1px solid #eee;
    background: white;
    color: #bbb;
    font-size: 0.8rem;
}

.footer-source {
    margin: 12px auto 0;
    max-width: 640px;
    font-size: 0.72rem;
    line-height: 1.7;
    color: #ccc;
}

.footer-source a {
    color: inherit;
}

/* ── レスポンシブ ── */
@media (max-width: 600px) {
    .hero h1 { font-size: 1.8rem; }
    .hoemaru-block { flex-direction: column; }
    .recipe-table th { white-space: normal; }
}

/* ── 現代の逸品 ── */
.modern-recipe-desc {
    font-size: 0.9rem;
    color: #5a4a3a;
    margin: 0 0 14px;
    line-height: 1.8;
}
.modern-recipe-link {
    display: inline-block;
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--accent);
    padding-bottom: 2px;
}
.modern-recipe-link:hover { opacity: 0.7; }

/* ===== 豆腐百珍で追加 ===== */
.genpon { display:flex; gap:24px; align-items:flex-start; flex-wrap:wrap; }
.genpon figure { margin:0; flex:0 0 auto; max-width:100%; }
.genpon img { height:auto; border:1px solid #e0d8c6; max-width:100%; }
.genpon figcaption { font-size:0.78em; color:#888; margin-top:4px; }
.genpon .honkoku-block { flex:1 1 260px; }
.figure-wide img { width:100%; height:auto; border:1px solid #e0d8c6; }
.figure-wide figcaption { font-size:0.78em; color:#888; margin-top:4px; }
/* 手順図の番号：画像は4コマ（2×2）。各コマの左上に①〜④を重ねる。番号はレシピ表の①〜④と一致させる */
.steps-figure { position:relative; margin:20px 0 0; }
.steps-figure img { display:block; width:100%; height:auto; border-radius:4px; }
.step-no { position:absolute; width:2.1em; height:2.1em; line-height:2.1em; text-align:center; border-radius:50%; background:rgba(93,64,55,0.88); color:#fff; font-weight:bold; font-size:clamp(0.8rem, 2.4vw, 1.1rem); box-shadow:0 1px 3px rgba(0,0,0,0.3); }
.step-no.s1 { left:2%; top:3%; } .step-no.s2 { left:52%; top:3%; }
.step-no.s3 { left:2%; top:53%; } .step-no.s4 { left:52%; top:53%; }
/* 3コマ（横一列）の品は <figure class="steps-figure steps-3"> にする */
.steps-3 .step-no.s1 { left:1.5%; top:3%; } .steps-3 .step-no.s2 { left:35%; top:3%; } .steps-3 .step-no.s3 { left:68.3%; top:3%; }
.grade-note { font-size:0.85em; color:#6d5d4b; }
/* 広告枠：rakuten-banner.js が中身を差し込む。空のときは高さを持たない */
.banner-slot:empty { display:none; }

/* ===== 一覧ページ（tofu.html） ===== */
.intro-text { background:white; border-left:6px solid var(--primary); padding:22px 26px; margin-bottom:48px; font-size:0.95rem; line-height:1.9; border-radius:0 4px 4px 0; }
.intro-text p { margin:0 0 0.8em; }
.intro-text p:last-child { margin-bottom:0; }
.volume-section { margin-bottom:48px; }
.volume-header { display:flex; align-items:baseline; gap:12px; margin-bottom:6px; }
.volume-header h2 { font-size:1.2rem; color:var(--primary); margin:0; white-space:nowrap; }
.volume-header::after { content:''; flex:1; height:1px; background:var(--primary); opacity:0.25; align-self:center; }
.volume-count { font-size:0.8rem; color:#999; white-space:nowrap; }
.volume-section .grade-note { margin:0 0 16px; }
.tofu-list { list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(auto-fill, minmax(230px, 1fr)); gap:8px 16px; }
.tofu-list li { border-bottom:1px dotted #e0d8cc; padding:6px 2px; font-size:0.95rem; }
.tofu-list a { color:var(--primary); text-decoration:none; display:block; }
.tofu-list a:hover { color:var(--accent); }
.tofu-list .no { display:inline-block; min-width:4.6em; font-size:0.78rem; color:#9a8a7a; }
.tofu-list li.unpublished { color:#b5aba0; }
.tofu-list li.unpublished .no { color:#ccc; }
.tofu-list .soon { font-size:0.68rem; color:#bbb; margin-left:6px; }
