@charset "utf-8";

/* =========================================
   全体設定 (デザインガイドライン対応)
   ========================================= */
:root {
  --bg-color: #fff2df;
  --page-color: #ffffff;
  --frame-color: #fdf3e3;
  --text-color: #72503a;
  
  /* アクセントカラー */
  --accent-red: #f46049;
  --accent-orange: #f49d43;
  --accent-yellow: #ffe66d;
  --accent-green: #6abf4b;
  --accent-blue: #4ea8de;
  --accent-pink: #ffb3c6;
  --accent-purple: #a584c6;

  /* カテゴリー用エイリアス */
  --vege-color: var(--accent-green);
  --fruit-color: var(--accent-pink);
  --protein-color: var(--accent-red);
  --grain-color: var(--accent-yellow);
  --dairy-color: var(--accent-blue);
  --support-color: var(--accent-purple);

  /* カテゴリー用エイリアス (薄い背景用) */
  --vege-color-light: #6abf4b25;
  --fruit-color-light: #ffb3c640;
  --protein-color-light: #f4604920;
  --grain-color-light: #ffe66d50;
  --dairy-color-light: #4ea8de25;
  --support-color-light: #a584c625;
  --new-color-light: #f49d4325;

  /* メーター用カラー */
  --soluble-color: var(--accent-blue);
  --insoluble-color: var(--accent-yellow);
  --remaining-color: #e0e0e0;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Zen Maru Gothic', sans-serif;
  color: var(--text-color);
  background-color: #E8A757;
}

/* =========================================
   背景画像（透過マスク付き）
   ========================================= */
.page-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  z-index: -1;
  pointer-events: none;
  /* 画像の高さに対して下20%を透過させる */
  -webkit-mask-image: linear-gradient(to bottom, black 0%, black 80%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 0%, black 80%, transparent 100%);
}

/* =========================================
   ページ切り替え（アニメーション設定）
   ========================================= */
.book-container {
  position: relative;
  min-height: 100vh;
}
.spread {
  display: none;
  animation: fadeIn 0.4s ease-out;
  min-height: 100vh;
}
.spread.active {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
  box-sizing: border-box;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =========================================
   本のページ基盤・レイアウト（表紙カバー）
   ========================================= */
.wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px 15px 18px 15px;
  flex-wrap: wrap;
  position: relative;
  z-index: 10;

  background:
    linear-gradient(135deg, #e6c229 25px, transparent 25.5px) top left,
    linear-gradient(225deg, #e6c229 25px, transparent 25.5px) top right,
    linear-gradient(315deg, #e6c229 25px, transparent 25.5px) bottom right,
    linear-gradient(45deg, #e6c229 25px, transparent 25.5px) bottom left,
    linear-gradient(to right, #2a5f2a 48%, #153315 50%, #2a5f2a 52%);
  background-size: 50% 50%, 50% 50%, 50% 50%, 50% 50%, 100% 100%;
  background-repeat: no-repeat;
  border-radius: 20px;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4), inset 0 0 15px rgba(0, 0, 0, 0.3);
}

.box1, .box2 {
  width: 50%;
  min-width: 370px;
  max-width: 500px; /* 見開きで最大1000pxになるように変更 */
  min-height: 680px; /* ウィンドウを縮めても中身が潰れないように最低高さを確保 */
  aspect-ratio: 1 / 1.414; /* 白銀比（約1:1.414）を適用 */
  background-color: var(--page-color);
  margin: 0;
  position: relative;
  box-sizing: border-box;
}

/* 左ページ（綴じ目：右） */
.box1 {
  box-shadow:
    -5px 10px 15px -5px rgba(0, 0, 0, 0.15),
    inset -15px 0px 15px -5px rgba(0, 0, 0, 0.05),
    inset -2px 0px 2px 0px rgba(0, 0, 0, 0.03);
  border-radius: 14px 24px 0 10px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-bottom: 8px solid #d3d3d3;
  border-right: none;
  z-index: 2;
}

/* 右ページ（綴じ目：左） */
.box2 {
  box-shadow:
    5px 10px 15px -5px rgba(0, 0, 0, 0.15),
    inset 15px 0px 15px -5px rgba(0, 0, 0, 0.05),
    inset 2px 0px 2px 0px rgba(0, 0, 0, 0.03);
  border-radius: 24px 14px 10px 0;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-bottom: 8px solid #d3d3d3;
  border-left: 1px solid rgba(0, 0, 0, 0.05);
  z-index: 1;
}

.page-content {
  padding: 45px 30px 30px 30px; /* 元の余白に戻す */
  height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 10;
}

/* 右ページ（ページめくりボタンがあるページ）のみ下余白を広くする */
.box2 .page-content {
  padding-bottom: 80px; 
}

/* 右ページの対話UIの余白調整 */
.box2 .dialogue-container {
  margin-top: 5px; /* 帯がない分の余白を詰める */
  margin-left: 0;  /* 左右はpage-contentのpadding(30px)に任せる */
  margin-right: 0;
}

/* =========================================
   左ページコンテンツ
   ========================================= */
/* =========================================
   ページ上部のライン（斜めカット・ボーダー付き）
   ========================================= */
.page-top-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 40px;
  border-radius: 14px 24px 0 0;
  z-index: 0;
  overflow: hidden;
}

.page-top-line::before {
  content: "";
  position: absolute;
  top: 0;
  left: -50px; /* 左端を完全にカバー */
  width: calc(75% + 50px);
  height: 100%;
  background-color: var(--accent-green); /* グラデーションなしのベタ塗り */
  transform: skewX(-45deg);
  transform-origin: bottom left;
}

.page-top-line::after {
  content: "";
  position: absolute;
  top: 0;
  left: 75%; /* 左から3/4の位置 */
  width: 6px; /* ボーダーの太さ */
  height: 100%;
  background-color: var(--accent-green);
  transform: skewX(-45deg);
  transform-origin: bottom left;
  box-shadow: 
    12px 0 0 0 var(--accent-green),
    24px 0 0 0 var(--accent-green);
  margin-left: 6px; /* 本体との隙間 */
}

/* =========================================
   ページ下部のライン（斜めカット・ボーダー付き）
   ========================================= */
.page-bottom-line {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  border-radius: 0 0 10px 0; /* 右ページなので右下のみ丸める */
  z-index: 0;
  overflow: hidden;
}

.page-bottom-line::before {
  content: "";
  position: absolute;
  top: 0;
  right: -50px; /* 右端を完全にカバー */
  width: calc(75% + 50px);
  height: 100%;
  background-color: var(--accent-green);
  transform: skewX(-45deg);
  transform-origin: top right;
}

.page-bottom-line::after {
  content: "";
  position: absolute;
  top: 0;
  right: 75%; /* 右から3/4の位置 */
  width: 6px;
  height: 100%;
  background-color: var(--accent-green);
  transform: skewX(-45deg);
  transform-origin: top right;
  box-shadow: 
    -12px 0 0 0 var(--accent-green),
    -24px 0 0 0 var(--accent-green);
  margin-right: 6px;
}

/* =========================================
   インデックス風タブ (右ページ用)
   ========================================= */
.index-tab {
  position: absolute;
  top: 40px;
  right: 0; /* ページの外にはみ出さず、右端の内側に */
  width: 22px; /* コンテンツに被らないように細く */
  padding: 10px 0; /* 長さも少し短く */
  background-color: var(--accent-green);
  color: white;
  font-weight: bold;
  font-size: 0.85rem; /* 文字も小さく */
  text-align: center;
  writing-mode: vertical-rl;
  text-orientation: upright;
  border-radius: 6px 0 0 6px;
  border: none; /* フチなし */
  box-shadow: none; /* 影なし */
  z-index: 5;
}

/* =========================================
   左ページコンテンツ (タイトル・アイコン)
   ========================================= */
.main-title {
  font-size: 2.6rem;
  text-align: left;
  margin: -30px 0 15px 0; /* アイコンと名前を上の緑ラインにかかるまで上げる */
  color: var(--text-color);
  display: flex;
  align-items: center;
  font-weight: 900;
  position: relative;
  z-index: 11;
  /* 文字に白いフチ（アウトライン）をつける */
  text-shadow: 
    -3px -3px 0 #fff,  
     3px -3px 0 #fff,
    -3px  3px 0 #fff,
     3px  3px 0 #fff,
     0px  4px 0 #fff,
     4px  0px 0 #fff,
     0px -4px 0 #fff,
    -4px  0px 0 #fff;
}
.category-icon {
  width: 3.2rem; /* タイトルより少し大きめ */
  height: 3.2rem;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--accent-green); /* 緑のフチの丸 */
  box-shadow: 0 4px 6px rgba(0,0,0,0.1); /* 少し影をつけると可愛い */
  flex-shrink: 0;
}

.title-icon-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-right: 16px;
  flex-shrink: 0;
}

.title-icon-area .category-icon {
  margin-right: 0;
}

.title-number {
  background-color: var(--badge-bg, var(--text-color));
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 20px;
  margin-top: -8px; /* 上の丸アイコンと少し重ねて合体させる */
  font-family: 'Zen Maru Gothic', sans-serif;
  letter-spacing: 0.02em;
  line-height: 1;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
  border: 1.5px solid #ffffff; /* 白いフチをつけて見やすく */
  z-index: 2;
  text-shadow: none; /* 親のh1から継承された白い文字フチ影をリセット！ */
}

.illustration-area {
  flex: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 180px; /* イラストが小さくなりすぎないように最低高さを保証 */
  margin-bottom: 10px;
}
.illustration-area img {
  max-width: 90%;
  max-height: 100%;
  object-fit: contain;
}

/* =========================================
   関連タグ
   ========================================= */
.tags-area {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-bottom: 12px; /* 基本スペックとの間隔を少し調整 */
}
.tag {
  background-color: var(--frame-color); /* クリーム色 */
  color: var(--text-color);
  padding: 3px 8px; /* 余白を小さく */
  border-radius: 10px;
  font-size: 0.75rem; /* 文字を小さく */
  font-weight: 700;
}

.spec-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

/* =========================================
   ゲームUIフレーム（共通）
   ========================================= */
.game-frame {
  background-color: var(--frame-color);
  border: 3px solid var(--text-color);
  box-shadow: 4px 4px 0 var(--text-color);
  border-radius: 15px;
  position: relative;
  padding: 20px;
  margin-top: 15px;
  margin-bottom: 15px;
}
.game-frame-title {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  padding: 4px 24px;
  border-radius: 15px;
  border: 3px solid var(--text-color);
  font-size: 1.25rem;
  font-weight: 900;
  white-space: nowrap;
}
.bg-green { background-color: var(--accent-green); color: white; }
.bg-blue { background-color: var(--accent-blue); color: white; }
.bg-orange { background-color: var(--accent-orange); color: white; }
.bg-pink { background-color: var(--accent-pink); color: var(--text-color); }
.bg-yellow { background-color: var(--accent-yellow); color: var(--text-color); }
.bg-red { background-color: var(--accent-red); color: white; }
.bg-purple { background-color: var(--accent-purple); color: white; }

.spec-icons {
  list-style: none;
  padding: 0;
  margin: 10px 0 0 0;
  font-size: 0.95rem;
  font-weight: 700;
}
.spec-icons li {
  margin-bottom: 6px;
  display: flex;
  align-items: center; /* changed from flex-end for better icon alignment */
  line-height: 1.3;
  border-bottom: 2px dotted #e0d1c1;
  padding-bottom: 5px;
}
.spec-icons li:last-child {
  border-bottom: none;
  margin-bottom: 0;
}
.spec-icons .emoji {
  margin-right: 8px;
  font-size: 1.1rem;
}
.spec-icons .spec-icon-img {
  width: 1.8rem; /* 大きめに調整 */
  height: 1.8rem;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 8px;
  border: none; /* フチなし */
}

.spec-icons .spec-icon-fa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  background-color: var(--accent-orange, #ff9800); /* オレンジ色 */
  color: white; /* 白色のアイコン */
  margin-right: 8px;
  font-size: 0.95rem; /* 丸の中に収まるサイズ */
  flex-shrink: 0;
}

/* =========================================
   右ページコンテンツ
   ========================================= */
.spec-area {
  margin-top: auto; /* 下部に寄せる */
}

.spec-frame {
  margin-top: 30px; /* タブがはみ出す分の余白を確保 */
  padding: 8px 15px; /* 上下の余白を縮めてテキストに寄せる */
  border-radius: 0 15px 15px 15px; /* 左上を直角にしてタブとシームレスに繋げる */
}

.unified-status-frame {
  margin-top: -5px; /* 左ページのタイトルと高さを合わせるために上に引き上げ */
  padding: 8px 15px; /* 上下の余白を縮めてテキストに寄せる */
  border-radius: 0 15px 15px 15px; /* 左上を直角にしてタブとシームレスに繋げる */
}

.tab-title {
  position: absolute;
  top: -3px; /* 親フレームの境界線の外側に合わせる */
  left: -3px; /* 左端を親フレームに合わせる */
  transform: translateY(-100%); /* 自身の高さ分だけ上に移動させて乗せる */
  background-color: #cc8041; /* 馴染みやすい明るめの茶色に変更 */
  color: white;
  padding: 2px 8px; /* 極限まで余白をなくす */
  font-size: 1rem; /* 通常サイズ */
  font-weight: 900;
  border-radius: 8px 8px 0 0; /* サイズに合わせて角丸も少し小さく */
  border: 3px solid var(--text-color); /* フチは濃い茶色のままキープ */
  border-bottom: none; /* 下の線をなくしてフレームと繋げる */
}

.unified-status-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 10px 12px; /* 横と縦のスペース */
}

.unified-th {
  width: 1rem; /* フォントサイズぴったりに細く */
  padding: 15px 0; 
  font-weight: 900;
  font-size: 1rem; /* タブタイトルと同じサイズに変更 */
  text-align: center;
  vertical-align: middle;
  writing-mode: vertical-rl;
  text-orientation: upright;
  color: white; 
  background-color: #ddbb99; /* より落ち着いた色に変更 */
  border-radius: 20px; 
  border: none; /* フチなしにする */
}

.unified-td {
  padding: 10px 15px;
  vertical-align: middle;
  border: none;
  background-color: white; /* 白いフレーム */
  border-radius: 12px;
}

.divided-table {
  border-collapse: collapse;
}
.divided-table tr:not(:last-child) {
  border-bottom: 1px solid rgba(114, 80, 58, 0.3); /* 線で区切る */
}

/* テーブル内のマイクロバッジ */
.badge-item-mini {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.skill-badge-micro {
  width: 100%;
  max-width: 36px;
  object-fit: contain;
  filter: drop-shadow(1px 1px 0px rgba(114, 80, 58, 0.3));
}

.badge-name-micro {
  font-size: 0.6rem;
  font-weight: 900;
  color: var(--text-color);
  text-align: center;
  white-space: nowrap;
}

.badges-row {
  display: flex;
  flex-wrap: nowrap; /* スマホでも改行させない */
  gap: 8px; /* 隙間を詰める */
  justify-content: flex-start;
}

.badge-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  position: relative;
}

.skill-badge-mini {
  width: 100%;
  max-width: 45px; /* 3つ並べてもはみ出ないように少し小さく */
  object-fit: contain;
  filter: drop-shadow(2px 2px 0px rgba(114, 80, 58, 0.3));
  transition: transform 0.2s;
}

.badge-item:hover .skill-badge-mini {
  transform: scale(1.1) rotate(5deg);
}

.badge-name-mini {
  font-size: 0.65rem;
  font-weight: 900;
  color: var(--text-color);
  text-align: center;
  background-color: rgba(255, 255, 255, 0.8);
  padding: 2px 6px;
  border-radius: 10px;
  border: 1px solid var(--text-color);
  white-space: nowrap;
  box-shadow: 1px 1px 0 var(--text-color);
}

/* ツールチップ（チップメモ） */
.badge-item::after {
  content: attr(data-tooltip);
  position: absolute;
  /* バッジの上、少し隙間を空けた位置を基準にする */
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(10px) scale(0.5);
  transform-origin: bottom center;
  background-color: var(--text-color);
  color: white;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  /* 跳ねるバウンドアニメーション */
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  pointer-events: none;
  z-index: 20;
}

.badge-item::before {
  content: "";
  position: absolute;
  /* 吹き出し(after)の底辺にぴったりくっつく位置 (8px - 高さ7px = 1px) */
  bottom: calc(100% + 1px);
  left: 25%; /* 左寄せ */
  transform: translateX(-50%) translateY(10px) scale(0.5);
  transform-origin: top center;
  /* 下向きの三角形（上ボーダーのみ太さを持ち、下ボーダーは0）を作る */
  border-width: 7px 6px 0 6px;
  border-style: solid;
  border-color: var(--text-color) transparent transparent transparent;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  pointer-events: none;
  z-index: 21; /* 吹き出しと同じか上に配置してOK（根本から外に出るため） */
}

.badge-item:hover::after,
.badge-item:hover::before {
  opacity: 1;
  visibility: visible;
  /* 基準位置にバウンドしながら戻る */
  transform: translateX(-50%) translateY(0) scale(1);
}

.source-text {
  font-size: 0.65rem;
  color: #999;
  text-align: right;
  margin: 5px 0 15px 0;
}
.table-annotation {
  text-align: right;
  font-size: 0.85rem;
  font-weight: bold;
  margin-top: 15px;
  margin-bottom: 2px;
  color: var(--text-color);
}
.status-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.15rem;
  margin-top: 0;
  margin-bottom: 0;
  font-weight: bold;
}
.status-table th, .status-table td {
  padding: 10px 5px;
}
.status-table th {
  text-align: left;
  width: 35%;
}
.status-table td.stars {
  text-align: left;
  font-size: 1.4rem;
  letter-spacing: 2px;
  width: 35%;
}
.status-table td.value {
  text-align: right;
  width: 30%;
}
.star-on { color: var(--accent-yellow); -webkit-text-stroke: 1.5px var(--text-color); }
.star-off { color: #e0d1c1; }

.fiber-section {
  margin-top: 20px;
  text-align: center;
  border-top: 2px dashed #e0d1c1;
  padding-top: 15px;
}
.sub-heading {
  position: relative;
  display: inline-block;
  background-color: white;
  color: var(--accent-orange);
  padding: 6px 20px;
  border-radius: 20px;
  font-size: 1.1rem;
  font-weight: 900;
  margin-bottom: 15px;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.05);
}
.sub-heading::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 8px 8px 0 8px;
  border-style: solid;
  border-color: white transparent transparent transparent;
}
.fiber-subtitle {
  text-align: center;
  font-size: 0.85rem;
  font-weight: bold;
  margin: 5px 0 10px 0;
}
.fiber-meter { width: 100%; }
.fiber-bar {
  height: 24px; /* テキストが入るように少し高く */
  background-color: var(--remaining-color);
  border-radius: 12px;
  border: 2px solid var(--text-color);
  display: flex;
  overflow: hidden;
  margin-bottom: 12px;
}
.soluble, .insoluble {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 900;
  color: white;
}
.insoluble {
  color: var(--text-color); /* 黄色背景なので見やすい茶色に */
}
.soluble { background-color: var(--soluble-color); }
.insoluble { background-color: var(--insoluble-color); }
.remaining { background-color: var(--remaining-color); }

.fiber-legend {
  display: flex;
  flex-wrap: wrap;
  font-size: 0.85rem;
  font-weight: bold;
  justify-content: space-between;
}
.center-legend {
  justify-content: center;
  gap: 20px;
}
.legend-item { display: flex; align-items: center; margin-right: 5px; }
.dot {
  width: 10px; height: 10px; border-radius: 50%;
  display: inline-block; margin-right: 4px;
  border: 1px solid var(--text-color);
}
.soluble-dot { background-color: var(--soluble-color); }
.insoluble-dot { background-color: var(--insoluble-color); }
.remaining-dot { background-color: var(--remaining-color); }

/* =========================================
   解説テキスト (2ページ目)
   ========================================= */
.analysis-text {
  font-size: 1.05rem;
  line-height: 1.7;
  font-weight: 500;
  margin-top: 10px;
}
.analysis-text p {
  margin-top: 0;
  margin-bottom: 5px;
}
ruby { ruby-align: center; }
rt { font-size: 0.55em; color: #777; letter-spacing: 0; }
/* =========================================
   クイズフレーム (背景画像付き)
   ========================================= */
.quiz-summary-bg {
  background-image: url('../images/ui/questionBG.png');
  background-repeat: repeat;
  background-size: 150px; /* パターンの大きさを調整 */
  color: #00479d; /* 濃い青色 */
  text-shadow: 
    2px 2px 0 #fff,
    -2px -2px 0 #fff,
    2px -2px 0 #fff,
    -2px 2px 0 #fff,
    0px 3px 0 #fff,
    0px -3px 0 #fff,
    3px 0px 0 #fff,
    -3px 0px 0 #fff; /* 白い影（フチ取り） */
}

/* =========================================
   クイズ・アコーディオン (豆知識)
   ========================================= */
.quiz-accordion {
  position: relative; /* 絶対配置の基準にする */
}
.quiz-accordion {
  position: relative; /* 絶対配置の基準にする */
}
.quiz-accordion summary {
  list-style: none; /* デフォルトの矢印を消す */
  outline: none;
}
.quiz-accordion summary::-webkit-details-marker {
  display: none;
}
.quiz-arrow::after {
  content: "▼";
  margin-left: 4px;
}
.quiz-accordion[open] .quiz-arrow::after {
  content: "▲";
}
/* 開いた時のレイアウト崩れ防止（全幅になったため絶対配置を解除） */
.quiz-accordion .quiz-content {
  /* position: absolute; は削除 */
  /* z-index: 100; は削除 */
  /* box-shadow: 4px 4px 0 var(--text-color); は削除 */
  /* border: 3px solid var(--text-color); は削除 */
  border-top: 2px dashed var(--text-color);
}
.quiz-accordion[open] {
  /* 開いた時の下部丸み解除は不要になったためコメントアウトまたは削除 */
  /* border-bottom-left-radius: 0; */
  /* border-bottom-right-radius: 0; */

}


/* =========================================
   ボタン
   ========================================= */
.game-btn {
  display: inline-block;
  background-color: #cc8041; /* 指定の色に統一 */
  color: white;
  border: 3px solid var(--text-color);
  border-radius: 20px;
  padding: 10px 20px;
  font-size: 0.95rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--text-color);
  transition: transform 0.1s, box-shadow 0.1s;
  position: relative;
  z-index: 10;
}
.page-btn-wrapper {
  position: absolute;
  bottom: 25px; /* 下から25pxの定位置に固定 */
  left: 0;
  width: 100%;
  text-align: center;
  z-index: 20;
}

.btn-next { /* 旧スタイル削除、ラッパーで制御するため不要に */ }
.btn-prev { /* 同上 */ }
.game-btn:active {
  transform: translateY(2px) translateX(2px);
  box-shadow: 0 0 0 var(--text-color);
}

.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #ffffff; /* 白 */
  color: var(--text-color); /* 茶色のテキストカラー */
  border: 3px solid var(--text-color);
  border-radius: 50px; /* ピル型 */
  padding: 6px 20px; /* 一回り小さく */
  font-size: 0.85rem; /* 一回り小さく */
  font-family: 'Zen Maru Gothic', sans-serif; /* フォント指定 */
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.1s, background-color 0.3s ease;
  position: relative;
  z-index: 10;
}

.btn-pill .arrow {
  display: inline-block;
  margin-left: 8px;
  transition: transform 0.3s ease;
}

.btn-pill:hover {
  background-color: var(--frame-color); /* クリーム色 */
}

.btn-pill:hover .arrow {
  transform: translateX(6px);
}

.btn-pill .arrow-left {
  display: inline-block;
  margin-right: 8px;
  transition: transform 0.3s ease;
}

.btn-pill:hover .arrow-left {
  transform: translateX(-6px);
}

.btn-pill:active {
  transform: translateY(2px) translateX(2px);
}

.btn-small {
  padding: 6px 12px;
  font-size: 0.8rem;
  border-width: 2px;
  box-shadow: 2px 2px 0 var(--text-color);
  border-radius: 12px;
}
.btn-green { background-color: var(--accent-green); }
.btn-blue { background-color: var(--accent-blue); }

/* =========================================
   関連リンク（吹き出しフレーム）
   ========================================= */
.speech-bubble-frame {
  margin-top: 30px;
  position: relative;
  background-color: var(--frame-color); /* クリーム色 */
  border: none; /* 枠線なし */
  border-radius: 10px;
  padding: 30px 15px 15px 15px; /* 上の余白を少し増やす */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15); /* 少し濃くはっきりとしたシャドウ */
}
.speech-bubble-title {
  position: absolute;
  top: -20px;
  left: 20px;
  background-color: white;
  border: 3px solid var(--text-color);
  color: var(--text-color);
  padding: 5px 15px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 5px;
}
/* 吹き出しのしっぽ（外側の茶色線） */
.speech-bubble-title::after {
  content: "";
  position: absolute;
  bottom: -11px;
  left: 20px;
  border-top: 10px solid var(--text-color);
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
}
/* 吹き出しのしっぽ（内側の白） */
.speech-bubble-title::before {
  content: "";
  position: absolute;
  bottom: -7px;
  left: 22px;
  border-top: 8px solid white;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  z-index: 1;
}

.related-dropdowns {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: nowrap; /* ２つ横に並べる */
}

/* セレクトボックスのスタイル */
.selectbox-2 {
    position: relative;
    flex: 1; /* 横幅を均等に */
}

.selectbox-2::before,
.selectbox-2::after {
    position: absolute;
    content: '';
    pointer-events: none;
}

.selectbox-2::before {
    right: 0;
    top: 0;
    height: 100%;
    display: inline-block;
    width: 2.6em; /* ボタンの大きさに合わせて少し調整 */
    border-radius: 0 25px 25px 0;
    background-color: #72503a;
    content: '';
}

.selectbox-2::after {
    position: absolute;
    top: 50%;
    right: 1.2em;
    transform: translate(50%, -50%) rotate(45deg);
    width: 5px;
    height: 5px;
    border-bottom: 3px solid #fff;
    border-right: 3px solid #fff;
    content: '';
}

.selectbox-2 select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 100%; /* 親要素に合わせる */
    min-width: 0;
    height: 2.8em;
    padding: .4em 2.6em .4em .6em; /* 左右の余白を少し詰める */
    border: 2px solid #72503a; /* ボーダーあり */
    border-radius: 25px;
    color: #72503a;
    font-size: 0.9em; /* 少し小さく */
    cursor: pointer;
    font-family: inherit;
    font-weight: bold;
    background-color: #fff; /* 白背景 */
}

.selectbox-2 select:focus {
    outline: none;
}

/* =========================================
   フッター
   ========================================= */
.site-footer {
  width: 100%; padding: 40px 20px 30px 20px; text-align: center;
  font-size: 0.95rem; box-sizing: border-box; font-weight: normal;
  background-color: #2a5f2a;
  color: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
}
.footer-content { max-width: 800px; margin: 0 auto; }
.footer-content p { margin: 0 0 15px 0; color: #ffffff; font-size: 1.05rem; font-weight: bold; }
.footer-content ul {
  list-style: none; padding: 0; margin: 0; display: flex;
  justify-content: center; flex-wrap: wrap; gap: 10px 0;
}
.footer-content li {
  display: flex;
  align-items: center;
}
.footer-content li:not(:last-child)::after {
  content: "|";
  margin: 0 15px;
  color: rgba(255, 255, 255, 0.5);
  font-weight: normal;
}
.footer-content a {
  color: #ffffff; text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-bottom-color 0.2s;
}
.footer-content a:hover { 
  border-bottom: 1px solid #ffffff; 
}
.footer-copyright {
  margin-top: 40px;
  font-size: 0.85rem;
  font-weight: normal;
  opacity: 0.7;
}

/* =========================================
   レスポンシブ対応
   ========================================= */
@media (max-width: 768px) {
  .header-nav ul {
    gap: 5px;
  }
  .header-nav a {
    font-size: 0.85rem;
    padding: 5px 8px;
  }
  .header-search input {
    display: none;
  }
  .header-search {
    width: 40px;
  }
  .header-logo span {
    display: none;
  }
}

/* =========================================
   トップページ：表紙 ＆ コルクボードの2カラムレイアウト
   ========================================= */

.main-top-container {
  display: flex;
  justify-content: center;
  align-items: center; /* 中央に揃える */
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 100px 20px 40px 20px; /* ヘッダーの余白を考慮 */
  box-sizing: border-box;
}

/* 左側：本の表紙エリア */
.top-book-cover-section {
  flex: 1;
  max-width: 515px; /* 表紙のサイズと同一 */
  aspect-ratio: 515 / 710; /* アスペクト比を維持してレスポンシブ縮小可能に */
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  /* 本の立体的な形に合わせて影を落とす */
  filter: drop-shadow(10px 20px 20px rgba(0,0,0,0.4));
}

.top-book-cover-section .top-cover-wrap {
  margin: 0;
  width: 100%;
  height: 100%;
}

.corkboard-section {
  flex: 1;
  width: 100%;
  max-width: 555px; /* 図鑑表紙（555px）と同じ横幅に広げる */
  aspect-ratio: 555 / 780; /* アスペクト比を維持してレスポンシブ縮小可能に */
  height: auto;
  display: flex;
  box-sizing: border-box;
  position: relative;
}

.corkboard-inner {
  width: 100%;
  height: 100%; /* 脚まで含めた1枚の画像にするため、高さを元の100%に戻す */
  display: flex;
  box-sizing: border-box;
  position: relative;
  z-index: 2;
  background: url('../images/ui/blackboard2.png') no-repeat center center;
  background-size: contain;
  border: none;
  box-shadow: none;
}

/* イーゼルの左脚（画像に含まれるため非表示） */
.corkboard-inner::before {
  display: none;
}

/* イーゼルの右脚（画像に含まれるため非表示） */
.corkboard-inner::after {
  display: none;
}

.corkboard-content {
  background: transparent; /* 背景画像が見えるよう透明に */
  padding: 45px 45px 130px 45px; /* 下部の余白を増やし、写真全体が上に持ち上がるように調整 */
  border-radius: 0;
  box-shadow: none;
  width: 100%;
  height: 100%; /* 高さいっぱいに広げる */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 15px; /* タイトルとコンテナの隙間を縮小 */
  box-sizing: border-box;
}

.corkboard-title {
  font-family: 'Zen Maru Gothic', sans-serif;
  font-weight: 900;
  text-align: center;
  margin: 10px 0 0 0; /* マージンを詰めて上に寄せる */
  color: #fdfaf2; /* よりはっきりしたチョークホワイト */
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-shadow: 0 0 3px rgba(255, 255, 255, 0.8), 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.corkboard-title .chalk-icon {
  font-size: 1.2rem;
  margin: 0 12px;
  color: #ffd166; /* チョークの黄色風 */
  opacity: 0.85;
  text-shadow: 0 0 4px rgba(255, 209, 102, 0.8);
}

.corkboard-notes-container {
  display: flex;
  flex-direction: column;
  gap: 15px; /* 豆知識とレシピの間の隙間を縮小 */
  overflow-y: auto; /* 万が一はみ出した場合のスクロールバー */
  overflow-x: hidden;
  flex-grow: 1;
  padding-top: 0;
}

/* スクロールバーのカスタマイズ */
.corkboard-notes-container::-webkit-scrollbar {
  width: 6px;
}
.corkboard-notes-container::-webkit-scrollbar-track {
  background: transparent;
}
.corkboard-notes-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

/* マグネットのグラフィック */
.magnet-graphic {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  z-index: 10;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5), inset 0 -2px 5px rgba(0, 0, 0, 0.4);
}

/* マグネットの光沢（ハイライト） */
.magnet-graphic::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 4px;
  width: 8px;
  height: 6px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  transform: rotate(-30deg);
}

.pin-red {
  background: radial-gradient(circle at 5px 5px, #ff5c77, #d90429);
}

.pin-blue {
  background: radial-gradient(circle at 5px 5px, #4cc9f0, #4361ee);
}

.pin-yellow {
  background: radial-gradient(circle at 5px 5px, #ffb703, #fb8500);
}

/* メモ用紙共通 */
.corkboard-note {
  position: relative;
  box-sizing: border-box;
}

/* 今日の豆知識：手書き風付箋 */
.trivia-note-card {
  position: relative;
  width: 90%;
  max-width: 380px;
  margin: 0 auto 5px auto;
}

/* まめ知識メモを囲む白い枠線 (画像のようなデザイン) */
.trivia-fieldset {
  border: 2px solid rgba(255, 255, 255, 0.7); /* チョーク風の白い線 */
  border-radius: 12px;
  padding: 12px 20px 10px 20px; /* 上下の余白を詰めてコンパクトに */
  margin: 10px auto 0 auto;
  box-sizing: border-box;
  text-align: center;
  background: transparent;
  width: 100%;
}

/* 枠線の上に載る見出し */
.trivia-fieldset legend.note-title {
  font-size: 1.15rem;
  color: #ffd166; /* チョークイエロー */
  text-shadow: 0 0 3px rgba(255, 209, 102, 0.8), 1px 1px 2px rgba(0, 0, 0, 0.7);
  font-weight: bold;
  padding: 0 12px; /* 線の切れ目を調整 */
  margin: 0 auto;  /* 中央寄せ */
  text-align: center;
  float: none;
  width: auto;
  display: inline-block;
}

.trivia-note-card .note-body p {
  font-size: 0.95rem;
  color: #fdfaf2; /* チョークホワイト */
  text-shadow: 0 0 2px rgba(255, 255, 255, 0.6), 1px 1px 2px rgba(0, 0, 0, 0.8);
  line-height: 1.6;
  margin: 0 0 2px 0; /* 段落間の余白を詰める */
}

.trivia-note-card .note-body p:last-child {
  margin-bottom: 0;
}

.trivia-note-card .note-more-link {
  text-align: right;
  margin: 4px 0 0 0 !important; /* 余白を縮めてテキストに寄せる */
}

.trivia-note-card .btn-more {
  display: inline-block;
  background: transparent;
  color: #ffd166; /* チョークイエロー */
  font-family: 'Zen Maru Gothic', sans-serif;
  font-size: 0.9rem;
  font-weight: bold;
  padding: 0;
  border: none;
  border-radius: 0;
  text-decoration: none !important;
  box-shadow: none;
  transition: opacity 0.2s;
  text-shadow: 0 0 3px rgba(255, 209, 102, 0.8), 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.trivia-note-card .btn-more:hover {
  background: transparent;
  opacity: 0.8;
  transform: none;
  text-decoration: underline !important; /* ホバー時に下線を表示 */
}

/* チョーク風の薄いピンクマーカー */
.chalk-marker-pink {
  background: linear-gradient(transparent 65%, rgba(255, 179, 198, 0.45) 65%);
  padding: 0 3px;
  border-radius: 2px;
}


/* レシピカルーセルスライダー */
.recipe-slider-container {
  position: relative;
  width: 100%;
  margin-top: 10px; /* まめ知識メモとの隙間 */
}

.recipe-slider {
  overflow: hidden;
  width: 100%;
  padding: 25px 25px 15px 25px; /* マグネットや吹き出しの見切れを防ぐ */
  box-sizing: border-box;
}

.recipe-slider-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
  width: 100%;
}

.recipe-slide-item {
  flex: 0 0 100%;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
}

/* チョーク風コントロールボタン */
.recipe-slider-btn {
  position: absolute;
  top: 40%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #fdfaf2; /* チョークホワイト */
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
  z-index: 10;
  padding: 10px;
  text-shadow: 0 0 3px rgba(253, 250, 242, 0.8), 1px 1px 2px rgba(0, 0, 0, 0.7);
  transition: opacity 0.2s, transform 0.2s;
  user-select: none;
}

.recipe-slider-btn:hover {
  opacity: 0.8;
  transform: translateY(-50%) scale(1.1);
}

.recipe-slider-btn.prev-btn {
  left: 5px; /* 黒板の内側に入れる */
}

.recipe-slider-btn.next-btn {
  right: 5px;
}

/* ページネーションドット */
.recipe-slider-dots {
  text-align: center;
  margin-top: 10px;
}

.recipe-slider-dots .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin: 0 5px;
  border-radius: 50%;
  border: 1.5px solid #fdfaf2; /* チョークホワイト */
  background: transparent;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
}

.recipe-slider-dots .dot.active {
  background-color: #ffd166; /* アクティブ時はイエロー */
  border-color: #ffd166;
}

/* 新着レシピ：画像付きレシピカード ＋ マイクロアニメーション */
/* ベースとなるコンテナ */
.recipe-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px; /* 写真と文字の間隔 */
  position: relative;
  width: 200px;
  margin: 0;
}

/* ホバーで動く写真部分 */
.recipe-photo-interactive {
  position: relative;
  cursor: pointer;
  transform: rotate(2deg);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.recipe-photo-interactive:hover {
  transform: translateY(-4px) rotate(2deg);
}

.recipe-tag-board {
  position: absolute;
  top: -20px;
  left: 0;
  background: transparent;
  color: #ff9fb8; /* チョークピンク */
  font-size: 1.1rem;
  font-weight: bold;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  transform: rotate(-5deg);
  z-index: 5;
  text-shadow: 0 0 3px rgba(255, 159, 184, 0.8), 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.recipe-photo-interactive .recipe-card-inner {
  background: transparent;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
}

.recipe-photo-interactive .recipe-card-img {
  width: 176px;
  height: 176px;
  background-color: transparent;
  border: 3px solid rgba(253, 250, 242, 0.7); /* 白チョークで囲んだような枠線 */
  border-radius: 6px;
  box-shadow: 0 0 5px rgba(255, 255, 255, 0.4);
  overflow: hidden;
}

.recipe-photo-interactive .recipe-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recipe-card-details {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.recipe-container .recipe-title {
  font-family: 'Zen Maru Gothic', sans-serif;
  font-size: 1.4rem !important;
  color: #fdfaf2; /* チョークホワイト */
  margin: 0;
  font-weight: 700;
  text-shadow: 0 0 3px rgba(255, 255, 255, 0.8), 1px 1px 2px rgba(0, 0, 0, 0.7);
  white-space: nowrap; /* 改行しない */
}

/* --- チョーク風スタイル・装飾追加 --- */
.chalk-font {
  font-family: 'Yomogi', 'Zen Maru Gothic', sans-serif;
  font-weight: 700;
}

.text-center {
  text-align: center !important;
}

.chalk-decoration {
  font-size: 1.5rem !important;
  justify-content: center !important;
}

.chalk-symbol {
  color: #ff9fb8;
  font-size: 1.2rem;
  margin: 0 5px;
}

.chalk-underline {
  border-bottom: 2px dashed rgba(253, 250, 242, 0.7);
  padding-bottom: 3px;
  display: inline-block;
}

.trivia-note-card .note-body p {
  font-size: 1.1rem !important;
}

/* 吹き出しシール */
.recipe-img-wrapper {
  position: relative;
}
.recipe-tag-sticker {
  position: absolute;
  top: -15px;
  left: -20px;
  background: #ffca3a; /* 目立つ明るい黄色 */
  color: #4e3629; /* 濃いめの茶色 */
  font-family: 'Zen Maru Gothic', sans-serif;
  font-size: 0.9rem; /* 少しだけ大きくして目立たせる */
  font-weight: 900;
  padding: 4px 12px;
  border-radius: 50px;
  box-shadow: 2px 3px 6px rgba(0,0,0,0.35); /* 影を強めて立体感をアップ */
  border: 2px solid #4e3629; /* 濃い茶色のフチをつけてステッカーらしくくっきり目立たせる */
  transform: rotate(-8deg);
  z-index: 15;
  text-shadow: none;
}

/* 画像周りの装飾（集中線） */
.chalk-focus {
  position: relative;
  margin-top: 0;
}
.chalk-focus::before,
.chalk-focus::after {
  content: '';
  position: absolute;
  top: 40%;
  transform: translateY(-50%);
  font-family: 'Yomogi', sans-serif;
  color: #ffd166;
  font-size: 1.5rem;
  line-height: 1.2;
  text-align: center;
  text-shadow: 0 0 3px rgba(255, 209, 102, 0.8);
  white-space: pre;
  pointer-events: none;
}
.chalk-focus::before {
  content: "＼\A—\A／";
  left: -40px;
}
.chalk-focus::after {
  content: "／\A—\A＼";
  right: -40px;
}

.recipe-card-note .recipe-title {
  font-size: 1.4rem !important;
}

/* ボタンの下線を消して本来のボタンらしくする */
.btn-pill, a.btn-pill, .btn-prev, a.btn-prev {
  text-decoration: none !important;
  color: var(--text-color) !important;
}

.btn-pill:hover, a.btn-pill:hover, .btn-prev:hover, a.btn-prev:hover {
  text-decoration: none !important;
}

/* レスポンシブ調整 */
@media (max-width: 1100px) {
  .main-top-container {
    gap: 20px;
  }
}

@media (max-width: 900px) {
  .main-top-container {
    flex-direction: column;
    align-items: center;
    gap: 30px;
    padding-top: 80px;
  }

  .top-book-cover-section, 
  .corkboard-section {
    max-width: 515px;
    width: 100%;
    height: auto; /* 縦並びのときは高さをなりゆきに */
    aspect-ratio: auto; /* 縦並びの時はアスペクト比固定を解除 */
  }

  .top-book-cover-section {
    height: 710px; /* 表紙の美しいアスペクト比を維持するためPCと同じ高さに固定 */
  }

  .corkboard-section {
    min-height: 500px;
  }

  .corkboard-inner,
  .corkboard-content {
    height: auto;
  }

  .corkboard-notes-container {
    overflow: visible;
  }
}

@media (max-width: 768px) {
  .spread.active { padding: 80px 10px 20px 10px; }
  .wrap {
    flex-direction: column; padding: 10px;
    background: #2a5f2a; border-radius: 12px;
  }
  .box1, .box2 {
    width: 100%; min-width: 0; max-width: 100%;
    aspect-ratio: auto; min-height: 400px;
  }
  .box1 {
    border-radius: 10px 10px 0 0;
    border-bottom: 1px dashed #ccc; border-right: none;
  }
  .box2 {
    border-radius: 0 0 10px 10px;
    border-left: none;
  }
  rt { display: none; }
}
/* =========================================
   繝ｪ繝輔ぃ繧ｯ繧ｿ繝ｪ繝ｳ繧ｰ逕ｨ 霑ｽ蜉繧ｯ繝ｩ繧ｹ
   ========================================= */

/* 蟇ｾ隧ｱUI (繧ｭ繝｣繝ｩ繧ｯ繧ｿ繝ｼ縺ｮ蜷ｹ縺榊・縺・ */
.dialogue-container {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin: 25px 20px 15px 20px;
}
.dialogue-container.no-margin-top {
  margin-top: 5px;
}

.dialogue-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
}
.dialogue-avatar-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.dialogue-avatar-label {
  position: absolute;
  bottom: -8px;
  color: white;
  font-size: 0.8rem;
  font-weight: 900;
  white-space: nowrap;
  text-shadow: 1.5px 1.5px 0 var(--text-color), -1.5px -1.5px 0 var(--text-color), 1.5px -1.5px 0 var(--text-color), -1.5px 1.5px 0 var(--text-color), 0 1.5px 0 var(--text-color), 0 -1.5px 0 var(--text-color), 1.5px 0 0 var(--text-color), -1.5px 0 0 var(--text-color);
}
.dialogue-bubble {
  position: relative;
  padding: 15px 20px;
  border-radius: 15px;
  flex: 1;
  font-weight: 700;
  color: var(--text-color);
  font-size: 1.05rem;
  line-height: 1.5;
}
.dialogue-bubble.arsa-bg {
  background-color: #e8f4f8;
  font-size: 1.1rem;
  line-height: 1.4;
}
.dialogue-bubble.moz-bg {
  background-color: #fff4e6;
  line-height: 1.6;
}
.dialogue-tail-left {
  position: absolute;
  top: 25px;
  left: -10px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 10px 12px 10px 0;
  border-color: transparent #e8f4f8 transparent transparent;
}
.dialogue-tail-right {
  position: absolute;
  top: 25px;
  right: -10px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 10px 0 10px 12px;
  border-color: transparent transparent transparent #fff4e6;
}

/* 繝槭・繧ｫ繝ｼ */
.marker-yellow { background: linear-gradient(transparent 60%, #ffeb3b 60%); }
.marker-pink { background: linear-gradient(transparent 60%, var(--accent-pink) 60%); }

/* 雎・衍隴倥け繧､繧ｺ */
.quiz-wrapper {
  margin: 15px 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.quiz-accordion-custom {
  margin: 0;
  padding: 0;
  box-shadow: none;
}
.quiz-summary-custom {
  padding: 15px 30px 15px 65px;
  font-weight: 900;
  font-size: 1.15rem;
  position: relative;
  cursor: pointer;
  border-radius: 12px;
}
.quiz-icon {
  position: absolute;
  top: -20px;
  left: -5px;
  width: 75px;
  z-index: 10;
}
.quiz-q-text {
  position: relative;
  z-index: 2;
}
.quiz-q-mark {
  color: #00479d;
  font-size: 1.4rem;
  margin-right: 2px;
}
.quiz-hint {
  font-size: 0.75em;
  display: block;
  margin-top: 8px;
  position: relative;
  z-index: 2;
}
.quiz-content-custom {
  padding: 20px;
  background-color: white;
  border-top: 2px dashed var(--text-color);
  border-radius: 0 0 12px 12px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-color);
  box-shadow: none;
}
.quiz-a-mark {
  color: var(--accent-red);
  font-size: 1.4rem;
  margin-right: 2px;
  font-weight: 900;
}

/* 縺昴・莉也ｴｰ縺九＞隱ｿ謨ｴ */
.align-start { align-items: flex-start; }
.mt-2px { margin-top: 2px; }
.fs-1-3rem { font-size: 1.3rem; }
.lh-1-5 { line-height: 1.5; }
.mt-0 { margin-top: 0; }
.mb-2px { margin-bottom: 2px; }
.w-25 { width: 25%; }
.w-30 { width: 30%; }
.w-45 { width: 45%; }
.p-5px { padding: 5px; }
.fs-1rem { font-size: 1rem; }
.pb-0 { padding-bottom: 0; }
.m-0-5px { margin: 0 0 5px 0; }
.mb-5px { margin-bottom: 5px; }
.h-20px { height: 20px; }
.mb-6px { margin-bottom: 6px; }
.w-29 { width: 29%; }
.w-71 { width: 71%; }
.fs-0-75rem { font-size: 0.75rem; }
.flex-start-gap-15 { justify-content: flex-start; gap: 15px; }
.page-content-p30 { padding: 30px 0 0 0; display: flex; flex-direction: column; height: 100%; }
.page-content-pb20 { display: flex; flex-direction: column; height: 100%; padding-bottom: 20px; }
.illustration-area-custom { flex: 1; display: flex; align-items: flex-start; justify-content: center; margin: 0 0 20px 0; overflow: hidden; }
.w-100-h-100-contain { width: 100%; height: 100%; object-fit: contain; }
.mt-15px-text-center { margin-top: 15px; text-align: center; }

/* =========================================
   TOPページ専用スタイル
   ========================================= */
.top-cover-wrap {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 555px; /* 背表紙や下部の余白も含めて少し幅を調整可能にするため555pxに拡張 */
  min-width: unset; /* レスポンシブ縮小の邪魔をしないようリセット */
  height: 100%;     /* 親の aspect-ratio に追従させる */
  box-sizing: border-box;
  padding: 40px 30px 60px 70px; /* 左の背表紙と下の厚み部分を避けてコンテンツを配置するための余白調整 */
  background: url('../images/ui/book.png') no-repeat center center;
  background-size: contain;
  box-shadow: none;     /* .wrapクラスから継承される影を消す */
  border-radius: 0;     /* .wrapクラスから継承される角丸を消す */
}

/* 下側の白いページの厚み（画像に含まれるため不要に） */
.top-cover-wrap::after {
  display: none;
}

/* 左側の背表紙の厚み（画像に含まれるため不要に） */
.top-cover-wrap::before {
  display: none;
}

.top-cover-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  text-align: center;
}

.top-title-area {
  position: relative;
  margin-bottom: 30px;
  background: transparent;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  border: none;
}

.emblem-container {
  position: relative;
  width: 100%;
  max-width: 380px;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
}

.emblem-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,0.25));
}

.top-title-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -46%); /* 3行構成で「たべもの」が中央にくるように調整 */
  width: 70%; /* 枠内に収まるように */
  text-align: center;
  margin: 0;
}

.top-title-logo .logo-text-small {
  font-size: 1.1rem;
  color: #72503a; /* 全体と合わせたテキストカラー */
  font-weight: bold;
  display: block;
  margin-bottom: -15px; /* 行間をさらに詰めて「たべもの」に寄せる */
  text-shadow: 1px 1px 0px rgba(255, 255, 255, 0.8);
  position: relative;
  z-index: 2;
}

.top-title-logo .logo-text-main {
  font-size: 2.3rem; /* 枠内に収まるように調整 */
  font-weight: 900;
  color: #a23a2b; /* 少し落ち着いたアンティーク調の赤 */
  text-shadow: 1px 1px 0px rgba(255, 255, 255, 0.9);
  letter-spacing: 1px;
  line-height: 1.1; /* 行間を詰めてまとまりを出す */
}

.btn-open-book {
  font-size: 1.5rem;
  padding: 15px 40px;
  background-color: var(--accent-orange);
  color: white;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 6px 15px rgba(244, 157, 67, 0.4);
  transition: all 0.2s ease;
  font-weight: bold;
}

.btn-open-book:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(244, 157, 67, 0.6);
}

/* --- TOPページ：検索＆新着 --- */
.top-search-page .section-title,
.top-new-page .section-title {
  font-size: 1.8rem;
  color: var(--text-color);
  margin-top: 0;
  margin-bottom: 20px;
  border-bottom: 3px dashed var(--remaining-color);
  padding-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-section {
  padding: 15px;
  margin-bottom: 20px;
  background: #fdfaf5;
}

.search-subtitle {
  font-size: 1.1rem;
  margin-top: 0;
  margin-bottom: 10px;
  color: var(--text-color);
}

.search-input-mock {
  display: flex;
  gap: 10px;
}

.search-input-mock input {
  flex: 1;
  padding: 10px 15px;
  border: 2px solid var(--remaining-color);
  border-radius: 20px;
  font-size: 1rem;
  font-family: inherit;
  background: white;
}

.search-btn-mock {
  background: var(--accent-blue);
  color: white;
  border: none;
  border-radius: 20px;
  padding: 0 20px;
  cursor: pointer;
  transition: transform 0.2s;
}

.search-btn-mock:hover {
  transform: scale(1.05);
}

.category-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 15px;
  border: 2px solid transparent;
  border-radius: 20px;
  color: var(--text-color);
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  font-size: 1.05rem;
}

.category-btn img,
.category-btn i {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  border-radius: 50%;
  background-color: white;
  box-sizing: border-box;
  object-fit: cover;
}

/* カテゴリーごとの薄い背景色と、オンマウス(hover)時のフチ */
.new-btn { background-color: #f49d4325; }
.new-btn:hover, .new-btn.active { border-color: var(--accent-orange); }
.new-btn i:not(.accordion-icon) { border: 2px solid var(--accent-orange); color: var(--accent-orange); }

.vege-btn { background-color: #6abf4b25; }
.vege-btn:hover, .vege-btn.active { border-color: var(--accent-green); }
.vege-btn img { border: 2px solid var(--accent-green); }

.fruit-btn { background-color: #ffb3c640; }
.fruit-btn:hover, .fruit-btn.active { border-color: var(--accent-pink); }
.fruit-btn img { border: 2px solid var(--accent-pink); }

.protein-btn { background-color: #f4604920; }
.protein-btn:hover, .protein-btn.active { border-color: var(--accent-red); }
.protein-btn img { border: 2px solid var(--accent-red); }

.grain-btn { background-color: #ffe66d50; }
.grain-btn:hover, .grain-btn.active { border-color: var(--accent-yellow); }
.grain-btn i:not(.accordion-icon) { border: 2px solid var(--accent-yellow); color: #d4a017; } /* 見やすいように暗めの黄色 */

.dairy-btn { background-color: #4ea8de25; }
.dairy-btn:hover, .dairy-btn.active { border-color: var(--accent-blue); }
.dairy-btn i:not(.accordion-icon) { border: 2px solid var(--accent-blue); color: var(--accent-blue); }

.support-btn { background-color: #a584c625; }
.support-btn:hover, .support-btn.active { border-color: var(--accent-purple); }
.support-btn i:not(.accordion-icon) { border: 2px solid var(--accent-purple); color: var(--accent-purple); }

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-mock {
  cursor: pointer;
  transition: all 0.2s ease;
}

.tag-mock:hover {
  background-color: var(--text-color);
  color: white;
}

/* --- 食材カードグリッド --- */
.food-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 15px;
  align-content: start;
  height: calc(100% - 60px);
  overflow-y: auto;
  padding: 5px;
}

.food-card {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text-color);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 3px solid transparent;
  display: flex;
  flex-direction: column;
}

.food-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 12px 20px rgba(0,0,0,0.15);
  border-color: var(--accent-orange);
}

.food-card-img {
  width: 100%;
  height: 100px;
  background: var(--frame-color);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.food-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.food-card:hover .food-card-img img {
  transform: scale(1.1);
}

.food-card-info {
  padding: 10px;
  text-align: center;
}

.food-card-cat {
  font-size: 0.7rem;
  font-weight: bold;
  padding: 2px 8px;
  border-radius: 10px;
  display: inline-block;
  margin-bottom: 5px;
}

.vege-cat { background: #e8f5e9; color: var(--accent-green); }
.fruit-cat { background: #ffebee; color: var(--accent-pink); }
.protein-cat { background: #ffebee; color: var(--accent-red); }
.grain-cat { background: #fffde7; color: var(--accent-yellow); }
.dairy-cat { background: #e3f2fd; color: var(--accent-blue); }
.support-cat { background: #f3e5f5; color: var(--accent-purple); }

.food-card-name {
  margin: 0;
  font-size: 1rem;
  font-weight: bold;
}
/* =========================================
   サイトヘッダー (固定メニュー)
   ========================================= */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background-color: #f7e6c4; /* 古紙のような温かみのある色 */
  border-bottom: 4px solid #72503a; /* 木の枠のような色 */
  z-index: 1000;
  display: flex;
  justify-content: center;
  box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

.header-inner {
  width: 100%;
  max-width: 1200px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.header-logo {
  display: flex;
  align-items: center;
  text-decoration: none !important;
  color: #72503a !important;
  font-weight: 900;
  font-size: 1.2rem;
  transition: transform 0.2s ease;
}

.header-logo:hover {
  transform: scale(1.05);
  text-decoration: none !important;
}

.header-logo img {
  height: 40px;
  margin-right: 10px;
  object-fit: contain;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-nav ul {
  display: flex;
  list-style: none;
  gap: 15px;
  margin: 0;
  padding: 0;
}

.header-nav a {
  text-decoration: none !important;
  color: #5c412f !important;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 20px;
  transition: background-color 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  gap: 5px;
}

.header-nav a:hover {
  background-color: #72503a;
  color: #fff !important;
  text-decoration: none !important;
}

.header-search {
  display: flex;
  align-items: center;
  background: #fff;
  border: 2px solid var(--text-color);
  border-radius: 20px;
  overflow: hidden;
  height: 36px;
}

.header-search input {
  border: none;
  outline: none;
  padding: 0 10px;
  font-family: inherit;
  font-weight: 500;
  color: #333;
  width: 180px;
}

.header-search button {
  background: var(--text-color);
  color: #fff;
  border: none;
  width: 40px;
  height: 100%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 768px) {
  /* スマホ版全体で文字サイズをPC版と同じ比率感になるように縮小 */
  html {
    font-size: 75%;
  }

  .header-nav ul {
    gap: 5px;
  }
  .header-nav a {
    font-size: 0.85rem;
    padding: 5px 8px;
  }
  .header-search {
    display: none;
  }
  .header-logo span {
    display: none;
  }

  /* --- スマホ版レシピカルーセルのレイアウト調整 --- */
  .recipe-photo-interactive .recipe-card-img {
    width: 140px; /* 全体が縮小されたので画像サイズを少し戻す */
    height: 140px;
  }
  
  .recipe-container {
    width: 155px;
  }

  .recipe-container .recipe-title {
    font-size: 1.1rem !important; /* html font-size が小さくなったため相対的に小さくなる */
    white-space: nowrap; /* 自動改行せず、1行で収める */
    padding: 0 5px;
  }

  .recipe-tag-sticker {
    transform: scale(0.85); /* 吹き出しサイズもバランスを取る */
    top: -15px; 
    left: -10px;
  }
  
  .recipe-slider-btn {
    font-size: 1.4rem;
    padding: 5px;
  }
  
  .recipe-slider-btn.prev-btn { left: -5px; }
  .recipe-slider-btn.next-btn { right: -5px; }
  
  .recipe-slider {
    padding: 15px 5px 10px 5px; 
  }

  /* --- トップページの表紙レイアウト調整 --- */
  .top-cover-content {
    padding: 20px 15px; /* 表紙の余白を減らし、絵柄の表示領域を確保 */
  }

  .emblem-container {
    width: 95%; /* スマホ画面で可能な限り絵柄を大きく表示 */
  }

  .top-title-logo .logo-text-main {
    font-size: 2rem; /* 絵柄の縮小に合わせて文字も少し小さく調整 */
  }

  .top-title-logo .logo-text-small {
    font-size: 0.95rem;
    margin-bottom: -28px; /* 「モズの」と「たべもの図鑑」のすき間をさらに狭くする（たべもの図鑑を少し上に） */
  }

  .btn-open-book {
    white-space: nowrap; /* ボタン内のテキスト改行を防止 */
    padding: 12px 30px; /* 余白を調整してスッキリさせる */
  }

  /* --- まめ知識メモのレイアウト調整（黒板ギリギリまで広げ、余白を小さくする） --- */
  .corkboard-content {
    padding: 30px 20px 100px 20px; /* 黒板の木枠の内側いっぱいにするため、左右の余白を45pxから20pxに減らす */
  }

  .trivia-note-card {
    width: 98%; /* 黒板いっぱいに広げる */
    max-width: none;
    margin: 0 auto 5px auto;
  }

  .trivia-fieldset {
    padding: 8px 12px 6px 12px; /* 内側の余白を小さくして、はみ出しを防止 */
    margin: 5px auto 0 auto;
  }

  .trivia-note-card .note-body p {
    line-height: 1.5; /* 行間を少し詰める */
    margin-bottom: 2px;
  }
}

/* =========================================
   目次ページ 新レイアウト (catalog.html)
   ========================================= */
.catalog-page-container {
  max-width: 1200px;
  margin: 80px auto 40px auto; /* ヘッダー分下げる */
  padding: 0 20px;
  min-height: calc(100vh - 120px);
  animation: fadeIn 0.4s ease-out;
}

.breadcrumbs {
  font-size: 0.9rem;
  margin-bottom: 20px;
  color: var(--text-color);
}

.breadcrumbs a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: bold;
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

.catalog-layout {
  display: flex;
  gap: 30px;
  align-items: flex-start;
}

.catalog-sidebar {
  width: 280px;
  flex-shrink: 0;
  padding: 25px 20px 20px 20px;
  margin-top: 35px;
  border-radius: 0 15px 15px 15px !important;
}

.catalog-sidebar .search-section {
  margin-bottom: 25px;
  border-bottom: 2px dashed #e0d1c1;
  padding-bottom: 20px;
  background: transparent; /* 白背景をなくす */
  padding-top: 0;
  padding-left: 0;
  padding-right: 0;
}

.catalog-sidebar .search-section:last-child {
  border-bottom: none;
}

.search-subtitle {
  font-size: 1rem;
  margin-bottom: 10px;
  color: var(--text-color);
}

.search-input-area {
  display: flex;
  align-items: center;
  background: white;
  border-radius: 20px;
  overflow: hidden;
  border: 2px solid var(--text-color);
  padding: 0 15px;
}

.search-input-area .search-icon {
  color: var(--text-color);
  font-size: 1.1rem;
  margin-right: 8px;
}

.search-input-area input {
  flex-grow: 1;
  border: none;
  padding: 10px 0;
  outline: none;
  font-family: inherit;
  background: transparent;
}

/* アコーディオンメニュー */
.accordion-category-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.category-item {
  margin-bottom: 10px;
}

.category-item .category-btn {
  width: 100%;
  justify-content: flex-start;
  position: relative;
}

.accordion-icon {
  position: absolute;
  right: 15px;
  transition: transform 0.3s;
  color: var(--text-color) !important;
  border: none !important;
  background-color: transparent !important;
  width: auto !important;
  height: auto !important;
  font-size: 1.1rem !important;
}

.category-item.open .accordion-icon {
  transform: rotate(180deg);
}

.sub-category-list {
  list-style: none;
  padding: 10px 0 0 15px;
  margin: 0;
  display: none; /* 初期は非表示 */
}

.category-item.open .sub-category-list {
  display: block; /* 開いたら表示 */
}

.sub-category-list li {
  margin-bottom: 5px;
}

.sub-category-btn {
  background: none;
  border: none;
  color: var(--text-color);
  cursor: pointer;
  padding: 8px 10px;
  text-align: left;
  width: 100%;
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 0.2s;
  border-radius: 8px;
}

.sub-category-btn:hover,
.sub-category-btn.active {
  background: white;
  color: var(--text-color);
  font-weight: bold;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* メインエリア */
.catalog-main {
  flex-grow: 1;
  min-height: 500px;
  margin-top: 35px;
  border-radius: 0 15px 15px 15px !important;
  padding: 25px 30px 20px 30px;
  background: var(--frame-color) !important;
  box-shadow: 4px 4px 0 var(--text-color) !important;
}

.catalog-main-header {
  position: relative;
  margin-bottom: 15px;
  margin-top: 0;
}

.catalog-main-header .section-title {
  margin-top: 0;
  margin-bottom: 8px;
}

.catalog-main-header .breadcrumbs {
  margin-top: 0;
  margin-bottom: 0;
}

/* 新しいカードグリッド */
.food-card-grid-new {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}

.food-card-new {
  background: var(--frame-color);
  border-radius: 15px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text-color);
  box-shadow: 0 4px 8px rgba(0,0,0,0.08);
  border: 3px solid transparent; /* ガタつき防止の透明フチ */
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
  position: relative;
  display: flex;
  flex-direction: column;
}

.food-card-new:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0,0,0,0.15);
}

.new-badge {
  position: absolute;
  top: 0;
  left: 0;
  background: var(--accent-orange);
  color: white;
  font-weight: 900;
  padding: 4px 10px;
  font-size: 0.8rem;
  border-bottom-right-radius: 10px;
  z-index: 10;
  box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
}

.card-img-wrapper {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: white;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
  box-sizing: border-box;
  position: relative;
}

.card-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.card-info-row {
  padding: 12px 10px;
  text-align: center;
  background: white;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.card-name {
  margin: 0 0 8px 0;
  font-size: 1.05rem;
  font-weight: bold;
}

.card-icons {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.cat-icon,
.season-icon {
  width: 28px;
  height: 28px;
  object-fit: cover;
  border-radius: 50%;
  background-color: white;
  box-sizing: border-box;
}

/* カテゴリーカラーのフチ */
.food-card-new[data-category="vegetable"] .cat-icon { border: 2px solid var(--vege-color); }
.food-card-new[data-category="fruit"] .cat-icon { border: 2px solid var(--fruit-color); }
.food-card-new[data-category="protein"] .cat-icon { border: 2px solid var(--protein-color); }
.food-card-new[data-category="grain"] .cat-icon { border: 2px solid var(--grain-color); }
.food-card-new[data-category="dairy"] .cat-icon { border: 2px solid var(--dairy-color); }
.food-card-new[data-category="support"] .cat-icon { border: 2px solid var(--support-color); }
.food-card-new[data-category="new"] .cat-icon { border: 2px solid var(--accent-orange); }

.season-icon {
  border: 2px solid white;
}

/* カテゴリー別の名前エリアの背景色と文字色 */
.food-card-new[data-category="vegetable"] .card-info-row { background-color: var(--vege-color-light) !important; color: var(--text-color); }
.food-card-new[data-category="fruit"] .card-info-row { background-color: var(--fruit-color-light) !important; color: var(--text-color); }
.food-card-new[data-category="protein"] .card-info-row { background-color: var(--protein-color-light) !important; color: var(--text-color); }
.food-card-new[data-category="grain"] .card-info-row { background-color: var(--grain-color-light) !important; color: var(--text-color); }
.food-card-new[data-category="dairy"] .card-info-row { background-color: var(--dairy-color-light) !important; color: var(--text-color); }
.food-card-new[data-category="support"] .card-info-row { background-color: var(--support-color-light) !important; color: var(--text-color); }
.food-card-new[data-category="new"] .card-info-row { background-color: var(--new-color-light) !important; color: var(--text-color); }

/* ホバー時のカテゴリーカラーのフチ */
.food-card-new[data-category="vegetable"]:hover { border-color: var(--vege-color); }
.food-card-new[data-category="fruit"]:hover { border-color: var(--fruit-color); }
.food-card-new[data-category="protein"]:hover { border-color: var(--protein-color); }
.food-card-new[data-category="grain"]:hover { border-color: var(--grain-color); }
.food-card-new[data-category="dairy"]:hover { border-color: var(--dairy-color); }
.food-card-new[data-category="support"]:hover { border-color: var(--support-color); }
.food-card-new[data-category="new"]:hover { border-color: var(--accent-orange); }

/* スマホ専用フローティングボタンとドロワー用スタイル */
.mobile-filter-fab {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 50%;
  transform: translateX(50%);
  background-color: var(--accent-orange);
  color: #fff;
  border: none;
  border-radius: 30px;
  padding: 12px 24px;
  font-size: 1rem;
  font-family: inherit;
  font-weight: bold;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  z-index: 1998;
  cursor: pointer;
  align-items: center;
  gap: 8px;
}
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* レスポンシブ対応 (スマホ用) */
@media (max-width: 768px) {
  .catalog-layout {
    flex-direction: column;
    gap: 20px;
  }
  
  /* スマホのサイドバーはドロワー（ボトムシート）になる */
  .catalog-sidebar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 85vh;
    margin: 0;
    border-radius: 20px 20px 0 0;
    z-index: 2000;
    background-color: var(--frame-color);
    overflow-y: auto;
    box-sizing: border-box;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.1, 0.8, 0.2, 1);
    box-shadow: 0 -5px 20px rgba(0,0,0,0.2);
    border-bottom: none;
    border-left: none;
    border-right: none;
  }
  
  .catalog-sidebar.drawer-open {
    transform: translateY(0);
  }
  
  .sidebar-overlay.overlay-open {
    display: block;
    opacity: 1;
  }
  
  .sidebar-mobile-header {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 2px dashed #e0d0c0;
    margin-bottom: 15px;
  }
  .sidebar-mobile-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--text-color);
  }
  .close-sidebar-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-color);
    cursor: pointer;
    padding: 5px;
  }
  
  .mobile-filter-fab {
    display: flex;
  }

  .food-card-grid-new {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
  .catalog-main {
    padding: 15px;
    margin-top: 10px;
  }
}

/* レシピボタンの一時非表示 */
.header-nav ul li:nth-child(2) {
  display: none;
}

/* TOPページ：新着食材ボードのレイアウト */
.new-foods-board {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  width: 100%;
  margin-top: 15px;
  padding: 10px 0;
}

/* スマホ表示での調整 */
@media (max-width: 768px) {
  .new-foods-board {
    gap: 15px;
  }
}

/* 食材図鑑番号（ナンバープレート）のスタイル */
.card-number {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background-color: var(--frame-color);
  color: var(--text-color);
  border: 1.5px solid var(--text-color);
  font-size: 0.7rem;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 4px;
  z-index: 5;
  box-shadow: 1px 1px 3px rgba(0,0,0,0.1);
  font-family: 'Zen Maru Gothic', sans-serif;
}


