/*
Theme Name: Kadence Child — Thai Food Guide JP
Theme URI: https://thai.anabaoffjapan.com
Description: Child theme for Kadence. Thai-language typography, URL rewrite support and migration parity for the Thai Food Guide JP WordPress migration (docs/wordpress-migration-plan.md section 8.2).
Author: Thai Food Guide JP team
Template: kadence
Version: 0.1.0
Text Domain: tfg
*/

/* ─── Thai variable font (self-hosted, subset-split like the Astro original) ─── */
@font-face {
  font-family: 'Noto Sans Thai Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('fonts/noto-sans-thai-thai-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+02D7,U+0303,U+0331,U+0E01-0E5B,U+200C-200D,U+25CC;
}
@font-face {
  font-family: 'Noto Sans Thai Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('fonts/noto-sans-thai-latin-ext-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Noto Sans Thai Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('fonts/noto-sans-thai-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* ─── Thai typography baseline (5.5: line-height for vowel/tone marks) ─── */
html[lang='th'] body,
body:lang(th) {
  font-family: 'Noto Sans Thai Variable', 'Sarabun', 'Prompt', sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

html[lang='th'] h1,
html[lang='th'] h2,
html[lang='th'] h3,
html[lang='th'] h4,
html[lang='th'] h5,
html[lang='th'] h6 {
  font-family: 'Noto Sans Thai Variable', 'Sarabun', 'Prompt', sans-serif;
  line-height: 1.4;
  overflow-wrap: break-word;
}

html[lang='th'] p,
html[lang='th'] li {
  overflow-wrap: break-word;
}

/* Long Thai tokens (no word boundaries) must wrap instead of overflowing. */
html[lang='th'] .entry-content,
html[lang='th'] .wp-block-post-content,
html[lang='th'] .tfg-content {
  word-break: normal;
  overflow-wrap: anywhere;
}

/* Admin editor font (wp-admin) — 5.5 #4 */
.admin-bar body,
#wpbody-content {
  font-family: 'Noto Sans Thai Variable', 'Sarabun', 'Prompt', sans-serif;
}

/* ─── Migration parity helpers ─── */
.tfg-meta-table {
  border-collapse: collapse;
  width: 100%;
  margin: 1rem 0;
  font-size: 0.95rem;
}
.tfg-meta-table th,
.tfg-meta-table td {
  border: 1px solid #e5e7eb;
  padding: 0.5rem 0.75rem;
  text-align: left;
  vertical-align: top;
}
.tfg-meta-table th {
  background: #f9fafb;
  font-weight: 600;
  white-space: nowrap;
}

/* Images: prevent overflow, rounded like the Astro card look */
.tfg-content img,
.entry-content img,
.wp-block-image img {
  max-width: 100%;
  height: auto;
  border-radius: 1rem;
}

/* Tables: allow horizontal scroll instead of layout break (CWV/UX parity) */
.entry-content table,
.tfg-content table,
.wp-block-table {
  max-width: 100%;
}
.wp-block-table,
.entry-content .wp-block-table {
  overflow-x: auto;
  display: block;
}

/* Lightbox gallery (shop pages) */
.tfg-lightbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}
.tfg-lightbox-grid img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 1rem;
  cursor: zoom-in;
}

/* ─── Dark mode (html.tfg-dark) — parity with the Astro dark: classes ───
 *
 * The Astro site used Tailwind dark: variants (slate surfaces on a dark
 * background). main.js toggles html.tfg-dark; these rules remap Kadence's
 * palette variables and override the tfg-* components that hardcode light
 * surfaces so the whole site renders in dark mode. */
html.tfg-dark {
  color-scheme: dark;
  /* Kadence palette remap (light → dark slate) */
  --global-palette9: #0f172a;   /* body background (slate-900) */
  --global-palette8: #1e293b;   /* section surface (slate-800) */
  --global-palette7: #334155;   /* borders (slate-700) */
  --global-palette3: #e2e8f0;   /* primary text (slate-200) */
  --global-palette4: #cbd5e1;   /* headings (slate-300) */
  --global-palette5: #94a3b8;   /* muted text (slate-400) */
  --global-palette6: #64748b;   /* faint text (slate-500) */
  --global-palette1: #f97316;   /* brand accent (orange-500, Astro primary) */
  --global-palette2: #ea580c;   /* brand hover (orange-600) */
}
html.tfg-dark body,
html.tfg-dark .site,
html.tfg-dark .site-container {
  background-color: var(--global-palette9);
  color: var(--global-palette3);
}
html.tfg-dark .site-header {
  background: rgba(15, 23, 42, 0.95);
  border-bottom-color: #334155;
}
html.tfg-dark .site-header .main-navigation > ul > li > a,
html.tfg-dark .site-header .main-navigation .menu-toggle {
  color: var(--global-palette4);
}

/* Cards, content surfaces, tables */
html.tfg-dark .tfg-card,
html.tfg-dark .tfg-search-empty {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}
html.tfg-dark .tfg-card p,
html.tfg-dark .tfg-search-empty p {
  color: #94a3b8;
}
html.tfg-dark .tfg-card h3,
html.tfg-dark .tfg-archive-header h1 {
  color: #e2e8f0;
}
html.tfg-dark .tfg-card-meta {
  color: #64748b;
}
html.tfg-dark .tfg-card-badge {
  background: #7c2d12;
  color: #fdba74;
}
html.tfg-dark .tfg-meta-table th {
  background: #1e293b;
  color: #cbd5e1;
}
html.tfg-dark .tfg-meta-table td,
html.tfg-dark .tfg-meta-table th {
  border-color: #334155;
}
html.tfg-dark .entry-content,
html.tfg-dark .wp-block-post-content {
  color: #cbd5e1;
}
html.tfg-dark .entry-content h1,
html.tfg-dark .entry-content h2,
html.tfg-dark .entry-content h3,
html.tfg-dark .entry-content h4 {
  color: #e2e8f0;
}

/* Search form */
html.tfg-dark .tfg-search-form input[type='search'],
html.tfg-dark .tfg-search-wrap input {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}
html.tfg-dark .tfg-search-form input::placeholder,
html.tfg-dark .tfg-search-wrap input::placeholder {
  color: #64748b;
}

/* Pagination */
html.tfg-dark .tfg-archive-pagination .page-numbers {
  border-color: #334155;
  color: #cbd5e1;
  background: #1e293b;
}
html.tfg-dark .tfg-archive-pagination a.page-numbers:hover {
  border-color: #f97316;
  color: #f97316;
}
html.tfg-dark .tfg-archive-pagination .page-numbers.current {
  background: #c2410c;
  border-color: #c2410c;
  color: #fff;
}

/* Footer */
html.tfg-dark .site-footer {
  background: #020617;
  color: #94a3b8;
}
html.tfg-dark .site-footer h1,
html.tfg-dark .site-footer h2,
html.tfg-dark .site-footer h3,
html.tfg-dark .site-footer a {
  color: #e2e8f0;
}

/* ─── Dark mode toggle button (fixed, header right edge) ─── */
.tfg-dark-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 9999;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: none;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.9);
  color: #6b7280;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  transition: background 0.2s, color 0.2s;
}
.tfg-dark-toggle:hover {
  background: #f3f4f6;
  color: #c2410c;
}
.tfg-dark-toggle svg {
  width: 1.25rem;
  height: 1.25rem;
}
/* Icon switching is CSS-driven: show the sun in light mode, the moon in dark
 * mode (mirrors Header.astro's sun/moon swap without JS icon management). */
.tfg-dark-moon {
  display: none;
}
html.tfg-dark .tfg-dark-sun {
  display: none;
}
html.tfg-dark .tfg-dark-moon {
  display: inline-block;
}
html.tfg-dark .tfg-dark-toggle {
  background: rgba(30, 41, 59, 0.95);
  color: #94a3b8;
}
html.tfg-dark .tfg-dark-toggle:hover {
  background: #334155;
  color: #f97316;
}

/* ─── Search suggestions dropdown (parity with SearchBar.astro) ─── */
.tfg-suggest-wrap {
  position: relative;
}
.tfg-suggest-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  right: 0;
  z-index: 50;
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid #f3f4f6;
  background: #fff;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}
html.tfg-dark .tfg-suggest-dropdown {
  border-color: #334155;
  background: #1e293b;
}
.tfg-suggest-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}
.tfg-suggest-item:hover {
  background: #f9fafb;
}
html.tfg-dark .tfg-suggest-item:hover {
  background: #334155;
}
.tfg-suggest-icon {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}
.tfg-suggest-icon-shop {
  background: #dbeafe;
}
html.tfg-dark .tfg-suggest-icon-shop {
  background: #1e3a8a;
}
.tfg-suggest-icon-article {
  background: #ffedd5;
}
html.tfg-dark .tfg-suggest-icon-article {
  background: #7c2d12;
}
.tfg-suggest-body {
  min-width: 0;
  flex: 1;
}
.tfg-suggest-title {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
html.tfg-dark .tfg-suggest-title {
  color: #e2e8f0;
}
.tfg-suggest-sub {
  display: block;
  font-size: 0.75rem;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
html.tfg-dark .tfg-suggest-sub {
  color: #94a3b8;
}
.tfg-suggest-badge {
  flex-shrink: 0;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 0.5rem;
}
.tfg-suggest-badge-shop {
  background: #dbeafe;
  color: #1d4ed8;
}
html.tfg-dark .tfg-suggest-badge-shop {
  background: #1e3a8a;
  color: #93c5fd;
}
.tfg-suggest-badge-article {
  background: #ffedd5;
  color: #9a3412;
}
html.tfg-dark .tfg-suggest-badge-article {
  background: #7c2d12;
  color: #fdba74;
}
.tfg-suggest-empty {
  padding: 1.5rem 1rem;
  text-align: center;
  font-size: 0.875rem;
  color: #6b7280;
}
html.tfg-dark .tfg-suggest-empty {
  color: #94a3b8;
}

/* ─── Shared archive/search card grid (home / category / search templates) ─── */
.tfg-archive { max-width: 1200px; margin: 0 auto; padding: 2.5rem 1.25rem; }
.tfg-archive-header { margin-bottom: 2rem; }
.tfg-archive-header h1 { font-size: clamp(1.5rem, 4vw, 2.25rem); font-weight: 700; margin: 0 0 0.5rem; line-height: 1.25; }
.tfg-archive-header p { color: #6b7280; font-size: 0.95rem; margin: 0; }

.tfg-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; }
.tfg-card {
  background: #fff; border: 1px solid #f3f4f6; border-radius: 1rem; overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06); transition: transform 0.2s, box-shadow 0.2s;
  display: flex; flex-direction: column; text-decoration: none; color: inherit;
}
.tfg-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.1); }
.tfg-card img { width: 100%; height: 180px; object-fit: cover; }
.tfg-card-body { padding: 1rem 1.1rem 1.25rem; display: flex; flex-direction: column; gap: 0.35rem; flex: 1; }
.tfg-card-badge { align-self: flex-start; font-size: 0.72rem; font-weight: 600; padding: 0.2rem 0.6rem; border-radius: 0.5rem; background: #ffedd5; color: #9a3412; }
.tfg-card h3 { font-size: 1.05rem; font-weight: 700; margin: 0; line-height: 1.4; }
.tfg-card p { font-size: 0.88rem; color: #6b7280; margin: 0; line-height: 1.55; }
.tfg-card-meta { font-size: 0.8rem; color: #9ca3af; margin-top: auto; padding-top: 0.4rem; }

.tfg-archive-pagination { margin-top: 2.5rem; display: flex; justify-content: center; gap: 0.5rem; }
.tfg-archive-pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center; min-width: 2.5rem; height: 2.5rem;
  padding: 0 0.75rem; border: 1px solid #e5e7eb; border-radius: 0.75rem; text-decoration: none;
  color: #374151; font-weight: 600; transition: all 0.15s;
}
.tfg-archive-pagination a.page-numbers:hover { border-color: #c2410c; color: #c2410c; }
.tfg-archive-pagination .page-numbers.current { background: #c2410c; border-color: #c2410c; color: #fff; }

/* Search page specifics */
.tfg-search-form { margin-top: 1rem; display: flex; gap: 0.5rem; max-width: 560px; }
.tfg-search-form input[type='search'] {
  flex: 1; padding: 0.75rem 1rem; border: 2px solid #e5e7eb; border-radius: 1rem; font-size: 1rem;
}
.tfg-search-form button {
  padding: 0.75rem 1.5rem; background: #c2410c; color: #fff; border: none;
  border-radius: 1rem; font-weight: 600; cursor: pointer;
}
.tfg-card .tfg-badge-shop { background: #dbeafe; color: #1d4ed8; }
.tfg-search-empty {
  background: #fff; border: 1px solid #f3f4f6; border-radius: 1rem;
  padding: 3rem 2rem; text-align: center;
}
.tfg-search-empty-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.tfg-search-empty p { color: #6b7280; font-size: 0.9rem; margin: 0.25rem 0; }
.tfg-search-empty p:first-of-type { font-size: 1.05rem; font-weight: 600; color: #374151; }

/* Breadcrumbs (Rank Math, restored 2026-08-15 - session 301) */
.tfg-breadcrumbs {
  margin-bottom: 1rem;
  font-size: 0.85rem;
  line-height: 1.6;
}
.tfg-breadcrumbs .rank-math-breadcrumb p { margin: 0; }
.tfg-breadcrumbs a { color: #c2410c; text-decoration: none; }
.tfg-breadcrumbs a:hover { text-decoration: underline; }
.entry-header .tfg-breadcrumbs { margin-bottom: 0.75rem; }


/* ===== 関連ショップ・関連記事セクション（旧 Astro の relatedShops/relatedArticles 復元） ===== */
.tfg-related-section { margin-top: 2rem; }
.tfg-related-h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: 1rem; color: #111827; }
.tfg-related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.tfg-related-card { display: flex; flex-direction: column; border: 1px solid #e5e7eb; border-radius: 0.75rem; overflow: hidden; text-decoration: none; background: #fff; transition: box-shadow 0.2s ease; }
.tfg-related-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.tfg-related-card img { width: 100%; height: 120px; object-fit: cover; display: block; }
.tfg-related-thumb { width: 100%; height: 120px; background: #f3f4f6; display: block; }
.tfg-related-body { padding: 0.75rem 1rem; display: flex; flex-direction: column; gap: 0.25rem; }
.tfg-related-badge { display: inline-block; width: fit-content; font-size: 0.7rem; font-weight: 500; color: #1d4ed8; background: #dbeafe; border-radius: 9999px; padding: 0.1rem 0.6rem; }
.tfg-related-title { font-size: 0.9rem; font-weight: 600; color: #111827; line-height: 1.4; }
.tfg-related-card:hover .tfg-related-title { color: #c2410c; }

/* ===== シェアボタン（旧 Astro の ShareButtons 復元: LINE / Facebook / X / Instagram） ===== */
.tfg-share-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid #e5e7eb; }
.tfg-share-label { font-size: 0.875rem; color: #6b7280; margin-right: 0.25rem; }
.tfg-share-btn { display: inline-flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; border-radius: 9999px; text-decoration: none; transition: filter 0.2s ease; }
.tfg-share-btn:hover { filter: brightness(1.15); }
.tfg-share-line { background: #06C755; color: #0A3D2B; }
.tfg-share-fb { background: #1877F2; color: #0B2A52; }
.tfg-share-x { background: #000000; color: #ffffff; }
.tfg-share-ig { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); color: #ffffff; }

/* === 記事内 目次（สารบัญ）スタイル（セッション 317 復元） === */
.tfg-toc {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  padding: 1.25rem;
  margin: 0 0 2rem;
}
.tfg-toc summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  list-style: none;
  font-size: 0.875rem;
  font-weight: 700;
  color: #111827;
  user-select: none;
}
.tfg-toc summary::-webkit-details-marker { display: none; }
.tfg-toc-icon { width: 1rem; height: 1rem; flex-shrink: 0; }
.tfg-toc-chevron { width: 1rem; height: 1rem; margin-left: auto; color: #9ca3af; transition: transform 0.2s; }
.tfg-toc[open] .tfg-toc-chevron { transform: rotate(180deg); }
.tfg-toc-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0.75rem 0 0;
  border-top: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.tfg-toc-list li { margin: 0; }
.tfg-toc-list a {
  display: block;
  font-size: 0.875rem;
  padding: 0.25rem 0;
  border-radius: 0.25rem;
  color: #374151;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s;
}
.tfg-toc-list a:hover { color: #dc2626; }
.tfg-toc-list li.tfg-toc-h3 a { padding-left: 1rem; color: #6b7280; font-weight: 400; }

/* === 読書進捗バー（セッション 317 復元） === */
.tfg-reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: transparent;
  z-index: 50;
  pointer-events: none;
}
#tfg-reading-progress-bar {
  height: 100%;
  width: 0%;
  background: #dc2626;
  transition: width 0.15s ease-out;
}

/* === 上に戻るボタン + 進捗リング（セッション 318 復元） === */
#tfg-back-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 30;
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  background: #ffffff;
  color: #dc2626;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(1rem);
  transition: all 0.3s ease-out;
  padding: 0;
}
#tfg-back-to-top:hover { background: #dc2626; color: #ffffff; box-shadow: 0 20px 25px -5px rgba(220,38,38,0.2); }
#tfg-back-to-top:active { transform: scale(0.9); }
#tfg-back-to-top.tfg-btt-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.tfg-btt-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.tfg-btt-ring-track { color: #e5e7eb; }
.tfg-btt-ring-progress { color: #dc2626; transition: stroke-dashoffset 0.3s ease-out; }
.tfg-btt-arrow { width: 1.25rem; height: 1.25rem; position: relative; z-index: 1; }

/* === 記事内 アフィリエイト商品カード（AffiliateLink 復元・セッション 320） === */
.tfg-aff-section {
  margin-top: 2.5rem;
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
  background: linear-gradient(135deg, #fff1f2, #fff7ed, #fffbeb);
  border: 2px solid #fecdd3;
  border-radius: 1rem;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}
.tfg-aff-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 0.25rem;
  background: linear-gradient(90deg, #fb7185, #fb923c, #fbbf24);
}
.tfg-aff-header { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.tfg-aff-badge {
  display: inline-flex; align-items: center; gap: 0.375rem;
  font-size: 0.75rem; font-weight: 700; color: #fff;
  background: #c93a3f; padding: 0.25rem 0.75rem; border-radius: 9999px;
}
.tfg-aff-pay {
  display: inline-flex; align-items: center; gap: 0.375rem;
  font-size: 0.75rem; color: #047857;
  background: #ecfdf5; padding: 0.25rem 0.625rem; border-radius: 9999px;
}
.tfg-aff-h2 { font-size: 1.5rem; font-weight: 700; color: #111827; margin: 0.5rem 0 0.25rem; width: 100%; }
.tfg-aff-sub { font-size: 0.875rem; color: #6b7280; margin: 0 0 1rem; }
.tfg-aff-group { margin-bottom: 1.25rem; }
.tfg-aff-group:last-child { margin-bottom: 0; }
.tfg-aff-group-head { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; }
.tfg-aff-group-emoji { font-size: 1.125rem; }
.tfg-aff-group-title {
  font-size: 0.875rem; font-weight: 600; color: #374151;
  text-transform: uppercase; letter-spacing: 0.05em; margin: 0;
}
.tfg-aff-group-count { margin-left: auto; font-size: 0.75rem; color: #9ca3af; }
.tfg-aff-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 640px) { .tfg-aff-grid { grid-template-columns: 1fr 1fr; } }
.tfg-aff-card {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid #f3f4f6; border-radius: 1rem;
  overflow: hidden; text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.tfg-aff-card:hover { transform: translateY(-4px); box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1); }
.tfg-aff-thumb {
  aspect-ratio: 16/9; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #f9fafb, #f3f4f6);
}
.tfg-aff-emoji { font-size: 3.5rem; line-height: 1; }
.tfg-aff-body { padding: 1rem; display: flex; flex-direction: column; gap: 0.375rem; }
.tfg-aff-title { font-size: 0.875rem; font-weight: 700; color: #111827; margin: 0; }
.tfg-aff-desc { font-size: 0.75rem; color: #6b7280; margin: 0; }
.tfg-aff-cta-row { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-top: 0.375rem; }
.tfg-aff-cta {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700; color: #fff;
  background: #c93a3f; border-radius: 0.75rem; padding: 0.5rem 1rem;
  flex: 1; text-align: center;
}
.tfg-aff-card:hover .tfg-aff-cta { box-shadow: 0 10px 15px -3px rgba(201,58,63,0.3); }
.tfg-aff-price {
  font-size: 0.75rem; font-weight: 700; color: #374151;
  background: #f9fafb; border-radius: 0.5rem; padding: 0.375rem 0.625rem; white-space: nowrap;
}
.tfg-aff-trust {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem;
  font-size: 0.625rem; color: #6b7280; margin-top: 0.25rem;
}
.tfg-aff-trust .tfg-aff-aff { margin-left: auto; }

/* === 記事内 mid CTA + モバイル固定 CTA（旧 Astro mid-article CTA / mobile-sticky-cta 復元・セッション 321） === */
/* mid CTA（本文直後） */
.tfg-aff-mid {
  margin-top: 2rem;
  padding: 1.25rem;
  background: linear-gradient(135deg, #fff1f2, #fff7ed);
  border: 1px solid #fecdd3;
  border-radius: 1rem;
  position: relative;
  overflow: hidden;
}
.tfg-aff-mid::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 0.25rem;
  background: linear-gradient(90deg, #fb7185, #fb923c, #fbbf24);
}
.tfg-aff-mid-h3 { font-size: 1rem; font-weight: 700; color: #111827; margin: 0.5rem 0 0.25rem; }
.tfg-aff-mid-grid { display: grid; grid-template-columns: 1fr; gap: 0.75rem; margin-top: 0.75rem; }
@media (min-width: 640px) { .tfg-aff-mid-grid { grid-template-columns: 1fr 1fr; } }
.tfg-aff-mid-card {
  display: flex; align-items: center; gap: 0.75rem;
  background: #fff; border: 1px solid #ffe4e6; border-radius: 0.75rem;
  padding: 0.75rem; text-decoration: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.tfg-aff-mid-card:hover { border-color: #fda4af; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.07); }
.tfg-aff-mid-emoji { font-size: 1.5rem; flex-shrink: 0; }
.tfg-aff-mid-body { min-width: 0; flex: 1; }
.tfg-aff-mid-title { display: block; font-size: 0.875rem; font-weight: 600; color: #111827; line-height: 1.3; }
.tfg-aff-mid-price { display: block; font-size: 0.75rem; color: #e11d48; margin-top: 0.125rem; }
.tfg-aff-mid-arrow { color: #d1d5db; flex-shrink: 0; font-size: 1rem; }
.tfg-aff-mid-card:hover .tfg-aff-mid-arrow { color: #c93a3f; transform: translateX(2px); }
.tfg-aff-mid-foot {
  margin-top: 0.75rem; padding-top: 0.75rem;
  border-top: 1px solid #ffe4e6;
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap;
  font-size: 0.75rem; color: #9ca3af;
}
.tfg-aff-mid-all { color: #c93a3f; font-weight: 500; text-decoration: none; flex-shrink: 0; }
.tfg-aff-mid-all:hover { text-decoration: underline; }

/* モバイル固定 CTA（下部固定バー） */
.tfg-sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 99990;
  background: rgba(255,255,255,0.97);
  border-top: 1px solid #e5e7eb;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
  padding: 0.625rem 0.75rem calc(0.625rem + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  transform: translateY(100%);
  visibility: hidden;
  transition: opacity 0.3s ease-out, transform 0.3s ease-out, visibility 0.3s;
}
@media (min-width: 768px) { .tfg-sticky-cta { display: none; } }
.tfg-sticky-cta.tfg-sticky-visible { opacity: 1; transform: translateY(0); visibility: visible; }
.tfg-sticky-cta-close {
  flex-shrink: 0;
  width: 1.75rem; height: 1.75rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 9999px;
  background: #f3f4f6; color: #9ca3af;
  border: none; cursor: pointer;
  font-size: 0.875rem;
}
.tfg-sticky-cta-btn {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  color: #fff; font-size: 0.875rem; font-weight: 700;
  border-radius: 0.75rem;
  padding: 0.625rem 0.75rem;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.tfg-sticky-cta-btn:active { transform: scale(0.97); }
.tfg-sticky-cta-icon { flex-shrink: 0; }
.tfg-sticky-cta-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tfg-sticky-cta-savings {
  font-size: 0.6875rem;
  background: rgba(255,255,255,0.2);
  padding: 0.125rem 0.5rem;
  border-radius: 0.375rem;
  flex-shrink: 0;
}

/* === 記事内 Smart Travel Hero バナー（旧 Astro Region hero 復元・セッション 322） === */
.tfg-art-hero {
  position: relative;
  margin: 0 0 2rem;
  border-radius: 1rem;
  border: 2px solid;
  overflow: hidden;
  padding: 0;
}
.tfg-art-hero-accent {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0.375rem;
}
.tfg-art-hero-body { padding: 1.25rem 1.5rem 1.25rem 1.75rem; }
@media (min-width: 768px) { .tfg-art-hero-body { padding: 1.5rem 1.5rem 1.5rem 1.75rem; } }
.tfg-art-hero-header {
  display: flex; align-items: flex-start; gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.tfg-art-hero-emoji { font-size: 1.5rem; line-height: 1.2; }
.tfg-art-hero-badge {
  display: inline-block;
  font-size: 0.75rem; font-weight: 700;
  color: #fff;
  padding: 0.125rem 0.625rem;
  border-radius: 9999px;
  margin-bottom: 0.25rem;
}
.tfg-art-hero-message {
  font-size: 0.875rem;
  margin: 0.375rem 0 0;
  line-height: 1.625;
}
.tfg-art-hero-message strong { font-weight: 700; }
.tfg-art-hero-trust {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 0.5rem; margin-bottom: 1rem;
}
.tfg-art-hero-trust-item {
  display: inline-flex; align-items: center;
  font-size: 0.75rem;
  background: rgba(255,255,255,0.85);
  border-radius: 9999px;
  padding: 0.25rem 0.625rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
  white-space: nowrap;
}
.tfg-art-hero-trust-save {
  background: #ecfdf5; color: #047857; font-weight: 500;
}
.tfg-art-hero-cta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem;
}
.tfg-art-hero-cta-main {
  display: inline-flex; align-items: center; gap: 0.5rem;
  color: #fff; font-size: 0.875rem; font-weight: 700;
  border-radius: 0.75rem;
  padding: 0.625rem 1.25rem;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  transition: box-shadow 0.2s, transform 0.2s;
}
.tfg-art-hero-cta-main:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.2); transform: translateY(-2px); }
.tfg-art-hero-cta-main:active { transform: scale(0.97); }
.tfg-art-hero-cta-esim {
  display: inline-flex; align-items: center; gap: 0.375rem;
  font-size: 0.875rem; font-weight: 500;
  color: #4b5563;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 0.5rem 0.875rem;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}
.tfg-art-hero-cta-esim:hover { border-color: #d1d5db; color: #111827; }
.tfg-art-hero-note {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 0.5rem 1rem;
  font-size: 0.75rem;
  color: #9ca3af;
  margin-top: 0.75rem;
}
.tfg-art-hero-note-item { display: inline-flex; align-items: center; gap: 0.375rem; }
.tfg-art-hero-pulse {
  width: 0.5rem; height: 0.5rem;
  border-radius: 9999px;
  background: #f87171;
  animation: tfg-art-hero-pulse 1.5s ease-in-out infinite;
}
@keyframes tfg-art-hero-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
/* 地域別配色 */
.tfg-art-hero-kanagawa {
  background: linear-gradient(135deg, #eff6ff, #f0f9ff 30%, #eef2ff);
  border-color: #bfdbfe;
}
.tfg-art-hero-kanagawa .tfg-art-hero-accent { background: linear-gradient(to bottom, #3b82f6, #4f46e5); }
.tfg-art-hero-kanagawa .tfg-art-hero-badge { background: #f43f5e; }
.tfg-art-hero-kyoto {
  background: linear-gradient(135deg, #faf5ff, #fdf4ff 30%, #eef2ff);
  border-color: #e9d5ff;
}
.tfg-art-hero-kyoto .tfg-art-hero-accent { background: linear-gradient(to bottom, #a855f7, #4f46e5); }
.tfg-art-hero-kyoto .tfg-art-hero-badge { background: #a855f7; }
.tfg-art-hero-osaka {
  background: linear-gradient(135deg, #fff1f2, #fff7ed 30%, #fffbeb);
  border-color: #fecdd3;
}
.tfg-art-hero-osaka .tfg-art-hero-accent { background: linear-gradient(to bottom, #f43f5e, #f59e0b); }
.tfg-art-hero-osaka .tfg-art-hero-badge { background: #f43f5e; }
.tfg-art-hero-hokkaido {
  background: linear-gradient(135deg, #eef2ff, #eff6ff 30%, #ecfeff);
  border-color: #c7d2fe;
}
.tfg-art-hero-hokkaido .tfg-art-hero-accent { background: linear-gradient(to bottom, #6366f1, #06b6d4); }
.tfg-art-hero-hokkaido .tfg-art-hero-badge { background: #6366f1; }
.tfg-art-hero-general {
  background: linear-gradient(135deg, #eff6ff, #f0f9ff 30%, #eef2ff);
  border-color: #bfdbfe;
}
.tfg-art-hero-general .tfg-art-hero-accent { background: linear-gradient(to bottom, #3b82f6, #4f46e5); }
.tfg-art-hero-general .tfg-art-hero-badge { background: #3b82f6; }
@media (prefers-color-scheme: dark) {
  .tfg-art-hero-message { color: #94a3b8; }
  .tfg-art-hero-note { color: #475569; }
  .tfg-art-hero-trust-item { background: rgba(30,41,59,0.85); color: #cbd5e1; }
  .tfg-art-hero-cta-esim { color: #94a3b8; border-color: #334155; }
  .tfg-art-hero-cta-esim:hover { color: #e2e8f0; border-color: #475569; }
}

/* === 記事ヘッダー シーンチップ + dietary バッジ（セッション 324） === */
.tfg-article-badges { align-items: center; }
.tfg-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.6;
  white-space: nowrap;
}
.tfg-badge-dietary {
  background: #ecfccb;
  color: #4d7c0f;
}
.tfg-badge-scene {
  background: #f5f3ff;
  color: #7c3aed;
  border: 1px solid #ede9fe;
}
@media (prefers-color-scheme: dark) {
  .tfg-badge-dietary { background: rgba(77,124,15,0.25); color: #bef264; }
  .tfg-badge-scene { background: rgba(124,58,237,0.2); color: #c4b5fd; border-color: rgba(124,58,237,0.4); }
}

/* === 前後記事ナビ（セッション 324） === */
.tfg-pn-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  border-color: rgba(220,38,38,0.35);
}
@media (prefers-color-scheme: dark) {
  .tfg-pn-card { background: #1f2937; border-color: #374151; }
  .tfg-pn-title { color: #f3f4f6; }
  .tfg-pn-label, .tfg-pn-meta { color: #9ca3af; }
}

/* === 記事内 広告スロット（旧 Astro AdSlots 復元・セッション 325） === */
.tfg-ad-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1.5rem 0;
  background: #f9fafb;
  border-radius: 0.75rem;
  color: #6b7280;
  font-size: 0.75rem;
  text-align: center;
}
.tfg-ad-slot-banner {
  min-height: 90px;
  margin: 0 0 1.25rem;
}
.tfg-ad-slot-in-article {
  min-height: 250px;
  margin-top: 2rem;
}
@media (prefers-color-scheme: dark) {
  .tfg-ad-slot { background: rgba(30,41,59,0.3); color: #64748b; }
}

/* === Travelpayouts ウィジェット復元（旧 Astro TravelpayoutsWidget / FlightSearchWidget / HotelSearchWidget・セッション 327） === */
.tfg-tpw { max-width: 48rem; margin: 2.5rem auto; }
.tfg-tpw-box {
  background: linear-gradient(135deg, #eff6ff, rgba(238,242,255,.3), #fff);
  border: 1px solid #dbeafe; border-radius: 1rem; padding: 1.5rem;
}
.dark .tfg-tpw-box { background: linear-gradient(135deg, #1e293b, rgba(30,41,59,.5), #0f172a); border-color: #334155; }
.tfg-tpw-head { display: flex; align-items: flex-start; gap: .75rem; margin-bottom: 1rem; }
.tfg-tpw-icon { font-size: 1.5rem; line-height: 1; }
.tfg-tpw-title { font-size: 1.125rem; font-weight: 700; color: #111827; margin: 0; }
.dark .tfg-tpw-title { color: #f1f5f9; }
.tfg-tpw-desc { font-size: .875rem; color: #6b7280; margin: .125rem 0 0; }
.dark .tfg-tpw-desc { color: #94a3b8; }
.tfg-tpw-badge {
  margin-left: auto; flex-shrink: 0; font-size: .75rem; font-weight: 700;
  color: #0369a1; background: #f0f9ff; border: 1px solid #bae6fd;
  padding: .375rem .75rem; border-radius: 9999px; white-space: nowrap;
}
.dark .tfg-tpw-badge { color: #7dd3fc; background: #082f49; border-color: #075985; }
.tfg-tpw-trust { display: flex; flex-wrap: wrap; gap: .5rem; font-size: .75rem; color: #6b7280; margin-bottom: 1rem; }
.dark .tfg-tpw-trust { color: #94a3b8; }
.tfg-tpw-trust span { color: #d1d5db; }
.dark .tfg-tpw-trust span { color: #475569; }
.tfg-tpw-selector { margin-bottom: 1.5rem; }
.tfg-tpw-selector-label { font-size: .875rem; font-weight: 500; color: #374151; margin-bottom: .75rem; }
.dark .tfg-tpw-selector-label { color: #cbd5e1; }
.tfg-tpw-routes { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; }
@media (min-width: 640px) { .tfg-tpw-routes { grid-template-columns: repeat(3, 1fr); } }
.tfg-tpw-routes-4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .tfg-tpw-routes-4 { grid-template-columns: repeat(4, 1fr); } }
.tfg-tpw-route {
  display: flex; align-items: center; gap: .5rem; padding: .75rem 1rem;
  border-radius: .75rem; font-size: .875rem; font-weight: 500;
  background: #fff; border: 2px solid #e5e7eb; color: #374151;
  text-decoration: none; transition: all .2s;
}
.dark .tfg-tpw-route { background: #1e293b; border-color: #475569; color: #cbd5e1; }
.tfg-tpw-route:hover { border-color: #7dd3fc; background: #f0f9ff; color: #0369a1; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.dark .tfg-tpw-route:hover { background: #334155; border-color: #38bdf8; color: #7dd3fc; }
.tfg-tpw-route-emoji { font-size: 1.125rem; }
.tfg-tpw-route-name { display: flex; flex-direction: column; flex: 1; text-align: left; font-weight: 600; }
.tfg-tpw-route-name small { font-size: .75rem; color: #9ca3af; font-weight: 400; }
.dark .tfg-tpw-route-name small { color: #64748b; }
.tfg-tpw-route-arrow { color: #d1d5db; font-size: 1rem; }
.dark .tfg-tpw-route-arrow { color: #475569; }
.tfg-tpw-inner {
  background: #fff; border: 1px solid #f3f4f6; border-radius: .75rem; padding: 1rem;
}
.dark .tfg-tpw-inner { background: #1e293b; border-color: #334155; }
.tfg-tpw-label { display: flex; align-items: center; gap: .5rem; margin-bottom: .75rem; font-size: .875rem; font-weight: 500; color: #374151; }
.dark .tfg-tpw-label { color: #cbd5e1; }
.tfg-tpw-sub { font-size: .75rem; color: #9ca3af; }
.dark .tfg-tpw-sub { color: #64748b; }
.tfg-tpw-tips { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; margin-top: 1rem; }
@media (min-width: 768px) { .tfg-tpw-tips { grid-template-columns: repeat(4, 1fr); } }
.tfg-tpw-tip {
  background: #fff; border: 1px solid #f3f4f6; border-radius: .75rem; padding: .75rem;
  transition: border-color .2s;
}
.dark .tfg-tpw-tip { background: #1e293b; border-color: #334155; }
.tfg-tpw-tip:hover { border-color: #bae6fd; }
.tfg-tpw-tip p { font-size: .75rem; color: #6b7280; margin: 0 0 .25rem; }
.dark .tfg-tpw-tip p { color: #94a3b8; }
.tfg-tpw-tip strong { font-size: 1.125rem; font-weight: 700; color: #059669; display: block; }
.tfg-tpw-tip:nth-child(2) strong { color: #d97706; }
.tfg-tpw-tip:nth-child(3) strong { color: #2563eb; }
.tfg-tpw-tip:nth-child(4) strong { color: #7c3aed; }
.tfg-tpw-tip small { font-size: .75rem; color: #9ca3af; }
.dark .tfg-tpw-tip small { color: #64748b; }
.tfg-tpw-cta { margin-top: 1.25rem; text-align: center; }
.tfg-tpw-cta a {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  background: linear-gradient(90deg, #0ea5e9, #2563eb); color: #fff; font-weight: 700;
  padding: .875rem 2rem; border-radius: .75rem; text-decoration: none;
  box-shadow: 0 4px 12px rgba(0,0,0,.15); transition: all .2s;
}
.tfg-tpw-cta a:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.2); }
.tfg-hotel-search .tfg-tpw-cta a { background: linear-gradient(90deg, #f43f5e, #db2777); }
.tfg-tpw-note { font-size: .75rem; color: #9ca3af; text-align: center; margin-top: 1rem; }
.dark .tfg-tpw-note { color: #64748b; }

/* flights/hotels ページ ヒーロー */
.tfg-tpw-hero {
  position: relative; overflow: hidden; border-radius: 1rem; padding: 2rem 1.5rem;
  color: #fff; margin-bottom: 2rem;
}
.tfg-tpw-hero-flights { background: linear-gradient(135deg, #0284c7, #2563eb 60%, #4f46e5); }
.tfg-tpw-hero-hotels { background: linear-gradient(135deg, #e11d48, #db2777 60%, #7e22ce); }
.tfg-tpw-hero-badge {
  display: inline-block; background: rgba(255,255,255,.2); color: #fff;
  font-size: .75rem; font-weight: 500; padding: .25rem .75rem; border-radius: 9999px; margin-bottom: 1rem;
}
.tfg-tpw-hero h1 { font-size: 1.875rem; font-weight: 700; color: #fff; margin: 0 0 .75rem; line-height: 1.2; }
@media (min-width: 768px) { .tfg-tpw-hero h1 { font-size: 2.5rem; } }
.tfg-tpw-hero-desc { color: rgba(255,255,255,.8); font-size: 1.125rem; margin: 0 0 1.5rem; max-width: 42rem; }
.tfg-tpw-hero-items { display: flex; flex-wrap: wrap; gap: 1rem; }
.tfg-tpw-hero-items span { display: flex; align-items: center; gap: .5rem; color: rgba(255,255,255,.8); font-size: .875rem; }
.tfg-tpw-hero-items span::before { content: "✔"; color: #86efac; }
/* ─── フッター 4カラム構造（セッション 328: 旧 Astro Footer.astro 復元） ─── */
.tfg-footer-columns { background: #0f172a; color: #cbd5e1; padding: 3rem 1.5rem 2rem; }
.tfg-footer-columns-inner { max-width: 1290px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2.5rem; }
.tfg-footer-col h2 { color: #fff; font-size: .8125rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 1rem; }
.tfg-footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .625rem; }
.tfg-footer-col a { color: #cbd5e1; text-decoration: none; font-size: .875rem; line-height: 1.5; transition: color .2s; }
.tfg-footer-col a:hover { color: #fff; }
.tfg-footer-brand .tfg-footer-logo { display: inline-flex; align-items: center; gap: .5rem; color: #fff; font-weight: 700; font-size: 1.125rem; text-decoration: none; margin-bottom: 1rem; }
.tfg-footer-brand p { font-size: .875rem; line-height: 1.7; margin: 0; max-width: 22rem; }
.tfg-footer-affiliate { max-width: 1290px; margin: 2rem auto 0; border-top: 1px solid rgba(148,163,184,.2); padding-top: 1.25rem; }
.tfg-footer-affiliate p { font-size: .75rem; color: #94a3b8; line-height: 1.6; margin: 0; }
@media (max-width: 782px) {
  .tfg-footer-columns-inner { grid-template-columns: repeat(2, 1fr); gap: 1.75rem; }
}
@media (max-width: 480px) {
  .tfg-footer-columns-inner { grid-template-columns: 1fr; }
}
/* ─── ガイド 4 ページ復元（セッション 329: 旧 Astro guides/*.astro 再現）─── */
.tfg-guide-page { max-width: 1200px; margin: 0 auto; padding: 2rem 1.25rem; }
.tfg-guide-h2 { font-size: 1.5rem; font-weight: 700; color: #111827; margin: 0 0 0.25rem; }
html.tfg-dark .tfg-guide-h2 { color: #f1f5f9; }
.tfg-guide-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; margin: 1.5rem 0 3rem; }
.tfg-guide-card { display: block; background: #fff; border-radius: 0.75rem; border: 1px solid rgba(0,0,0,0.06); box-shadow: 0 1px 3px rgba(0,0,0,0.08); overflow: hidden; transition: transform 0.2s, box-shadow 0.2s; }
html.tfg-dark .tfg-guide-card { background: #1e293b; border-color: #334155; }
.tfg-guide-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.12); }
.tfg-guide-card-img { height: 160px; background-size: cover; background-position: center; }
.tfg-guide-card-body { padding: 1.25rem; }
.tfg-guide-card-badge { display: inline-block; font-size: 0.75rem; font-weight: 500; padding: 0.2rem 0.6rem; border-radius: 9999px; margin-bottom: 0.6rem; }
.tfg-guide-card-body h3 { font-size: 1.125rem; font-weight: 600; color: #111827; margin: 0 0 0.4rem; }
html.tfg-dark .tfg-guide-card-body h3 { color: #f1f5f9; }
.tfg-guide-card-body p { font-size: 0.875rem; color: #6b7280; margin: 0 0 0.75rem; line-height: 1.6; }
html.tfg-dark .tfg-guide-card-body p { color: #94a3b8; }
.tfg-guide-card-meta { display: flex; gap: 1rem; font-size: 0.8rem; color: #9ca3af; }
.tfg-guide-cats-section { margin-top: 2rem; }
.tfg-guide-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; margin-top: 1.25rem; }
.tfg-guide-cat { display: flex; align-items: center; gap: 0.9rem; padding: 1.1rem 1.25rem; background: #fff; border-radius: 0.75rem; border: 1px solid rgba(0,0,0,0.06); box-shadow: 0 1px 3px rgba(0,0,0,0.06); transition: transform 0.2s, box-shadow 0.2s; }
html.tfg-dark .tfg-guide-cat { background: #1e293b; border-color: #334155; }
.tfg-guide-cat:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.1); }
.tfg-guide-cat-emoji { font-size: 1.75rem; flex-shrink: 0; }
.tfg-guide-cat-body { flex: 1; min-width: 0; }
.tfg-guide-cat-body h3 { font-size: 1.05rem; font-weight: 600; color: #111827; margin: 0 0 0.2rem; }
html.tfg-dark .tfg-guide-cat-body h3 { color: #f1f5f9; }
.tfg-guide-cat-body p { font-size: 0.8rem; color: #6b7280; margin: 0 0 0.3rem; line-height: 1.5; }
html.tfg-dark .tfg-guide-cat-body p { color: #94a3b8; }
.tfg-guide-cat-count { display: inline-block; font-size: 0.7rem; font-weight: 500; padding: 0.15rem 0.5rem; border-radius: 9999px; background: #f3f4f6; color: #4b5563; }
html.tfg-dark .tfg-guide-cat-count { background: #334155; color: #cbd5e1; }
.tfg-guide-cat-arrow { width: 1.25rem; height: 1.25rem; color: #d1d5db; flex-shrink: 0; }
.tfg-guide-all { margin-top: 2.5rem; text-align: center; }
.tfg-guide-all-btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1.5rem; background: #f3f4f6; color: #374151; border-radius: 9999px; font-weight: 500; transition: background 0.2s; }
html.tfg-dark .tfg-guide-all-btn { background: #334155; color: #cbd5e1; }
.tfg-guide-all-btn:hover { background: #e5e7eb; }
html.tfg-dark .tfg-guide-all-btn:hover { background: #475569; }
.tfg-guide-article { max-width: 48rem; margin: 0 auto; }
.tfg-guide-badge { display: inline-block; background: #dbeafe; color: #1d4ed8; font-size: 0.75rem; font-weight: 500; padding: 0.25rem 0.75rem; border-radius: 9999px; margin-bottom: 1rem; }
html.tfg-dark .tfg-guide-badge { background: rgba(59,130,246,0.2); color: #93c5fd; }
.tfg-guide-title { font-size: 1.875rem; font-weight: 700; color: #111827; margin: 0 0 1.5rem; line-height: 1.3; }
html.tfg-dark .tfg-guide-title { color: #f1f5f9; }
.tfg-guide-sec { font-size: 1.25rem; font-weight: 600; color: #111827; margin: 1.5rem 0 0.5rem; }
html.tfg-dark .tfg-guide-sec { color: #f1f5f9; }
.tfg-guide-article p { color: #374151; line-height: 1.8; margin: 0 0 1rem; }
html.tfg-dark .tfg-guide-article p { color: #cbd5e1; }
.tfg-guide-article ul { margin: 0 0 1rem 1.25rem; list-style: disc; }
.tfg-guide-article li { color: #374151; line-height: 1.8; margin-bottom: 0.4rem; }
html.tfg-dark .tfg-guide-article li { color: #cbd5e1; }
@media (max-width: 640px) {
  .tfg-guide-cards, .tfg-guide-cats { grid-template-columns: 1fr; }
  .tfg-guide-title { font-size: 1.5rem; }
}
/* ===== /sitemap/ HTML サイトマップ（旧 Astro sitemap.astro 復元・セッション 333） ===== */
.tfg-smap-h1{font-size:1.875rem;font-weight:700;color:#111827;margin-bottom:0.5rem}
.dark .tfg-smap-h1{color:#f1f5f9}
.tfg-smap-desc{color:#6b7280;margin-bottom:2rem}
.dark .tfg-smap-desc{color:#64748b}
.tfg-smap-sec{margin-bottom:2.5rem}
.tfg-smap-h2{font-size:1.25rem;font-weight:700;color:#111827;margin-bottom:1rem;padding-bottom:0.5rem;border-bottom:1px solid #f3f4f6}
.dark .tfg-smap-h2{color:#f1f5f9;border-bottom-color:#334155}
.tfg-smap-grid{display:grid;grid-template-columns:repeat(1,minmax(0,1fr));gap:0.75rem}
@media(min-width:640px){.tfg-smap-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(min-width:1024px){.tfg-smap-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
.tfg-smap-card{display:block;padding:0.75rem;background:#fff;border-radius:0.75rem;border:1px solid #f3f4f6;color:#374151;font-weight:500;transition:all 0.15s}
.dark .tfg-smap-card{background:#1e293b;border-color:#334155;color:#cbd5e1}
.tfg-smap-card:hover{border-color:#c2185b;box-shadow:0 1px 2px rgba(0,0,0,0.05);color:#c2185b}
.dark .tfg-smap-card:hover{color:#f9a8d4}
.tfg-smap-list{display:flex;flex-direction:column;gap:0.5rem}
.tfg-smap-link{display:flex;align-items:center;justify-content:space-between;padding:0.75rem;background:#fff;border-radius:0.75rem;border:1px solid #f3f4f6;color:#374151;transition:all 0.15s;gap:0.75rem}
.dark .tfg-smap-link{background:#1e293b;border-color:#334155;color:#cbd5e1}
.tfg-smap-link:hover{border-color:#c2185b;box-shadow:0 1px 2px rgba(0,0,0,0.05)}
.tfg-smap-title{display:flex;align-items:center;gap:0.5rem;font-weight:500;color:#374151;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dark .tfg-smap-title{color:#cbd5e1}
.tfg-smap-link:hover .tfg-smap-title{color:#c2185b}
.dark .tfg-smap-link:hover .tfg-smap-title{color:#f9a8d4}
.tfg-smap-meta{flex-shrink:0;font-size:0.75rem;color:#6b7280}
.dark .tfg-smap-meta{color:#64748b}
.tfg-smap-new{flex-shrink:0;display:inline-flex;align-items:center;gap:0.25rem;padding:0.125rem 0.375rem;background:#dcfce7;color:#166534;border-radius:0.25rem;font-size:0.75rem;font-weight:500;border:1px solid #bbf7d0}
.dark .tfg-smap-new{background:#14532d;color:#86efac;border-color:#166534}
.tfg-smap-upd{flex-shrink:0;font-size:0.75rem;color:#6b7280}
.dark .tfg-smap-upd{color:#64748b}
/* ===== 検索 6 フィルタ UI（旧 Astro search.astro 復元・セッション 342） ===== */
.tfg-search-filters{display:flex;flex-wrap:wrap;align-items:center;gap:0.5rem;margin-bottom:1.5rem;padding:0.75rem;background:#f9fafb;border:1px solid #f3f4f6;border-radius:0.75rem}
.dark .tfg-search-filters{background:#1e293b;border-color:#334155}
.tfg-search-filters select{max-width:100%;padding:0.5rem 0.75rem;background:#fff;border:1px solid #e5e7eb;border-radius:0.5rem;font-size:0.875rem;color:#374151;outline:none;transition:border-color 0.15s}
.dark .tfg-search-filters select{background:#0f172a;border-color:#334155;color:#cbd5e1}
.tfg-search-filters select:focus{border-color:#c2185b}
.tfg-search-filters-apply{padding:0.5rem 1rem;background:#c2185b;color:#fff;border-radius:0.5rem;font-size:0.875rem;font-weight:500;border:none;cursor:pointer;transition:background 0.15s}
.tfg-search-filters-apply:hover{background:#a3124c}
.tfg-search-filters-reset{padding:0.5rem 0.75rem;font-size:0.875rem;color:#6b7280;text-decoration:none}
.dark .tfg-search-filters-reset{color:#94a3b8}
.tfg-search-filters-reset:hover{color:#c2185b}
.tfg-search-recommend{margin-bottom:2rem}
.tfg-search-recommend-title{font-size:1.25rem;font-weight:700;color:#111827;margin:1.5rem 0 1rem}
.dark .tfg-search-recommend-title{color:#f1f5f9}
.tfg-search-popular{display:flex;flex-wrap:wrap;gap:0.5rem}
.tfg-search-popular-chip{display:inline-flex;align-items:center;padding:0.375rem 0.875rem;background:#fff;border:1px solid #e5e7eb;border-radius:9999px;font-size:0.875rem;color:#374151;text-decoration:none;transition:all 0.15s}
.dark .tfg-search-popular-chip{background:#1e293b;border-color:#334155;color:#cbd5e1}
.tfg-search-popular-chip:hover{border-color:#c2185b;color:#c2185b}
.dark .tfg-search-popular-chip:hover{color:#f9a8d4}

/* ===== 記事一覧フィルタ UI（旧 Astro [...]page].astro 復元・セッション 345） ===== */
.tfg-archive-filters{margin-bottom:1.5rem}
.tfg-archive-filters .flex{display:flex}
.tfg-archive-filters .flex-wrap{flex-wrap:wrap}
.tfg-archive-filters .gap-2{gap:0.5rem}
.tfg-archive-filters .gap-3{gap:0.75rem}
.tfg-archive-filters .items-center{align-items:center}
.tfg-archive-filters .mb-4{margin-bottom:1rem}
.tfg-archive-filters .mb-6{margin-bottom:1.5rem}
.tfg-archive-filters .ml-auto{margin-left:auto}
.tfg-archive-filters .text-xs{font-size:0.75rem}
.tfg-archive-filters .text-gray-400{color:#9ca3af}
/* カテゴリバッジ（旧 Astro area-badge 相当） */
.area-badge{display:inline-flex;align-items:center;gap:0.375rem;padding:0.375rem 0.875rem;background:#fff;border:1px solid #e5e7eb;border-radius:9999px;font-size:0.875rem;color:#374151;text-decoration:none;transition:all 0.15s;cursor:pointer}
.area-badge:hover{border-color:#c2410c;color:#c2410c}
.area-badge.active{background:#c2410c;border-color:#c2410c;color:#fff}
.dark .area-badge{background:#1e293b;border-color:#334155;color:#cbd5e1}
.dark .area-badge:hover{border-color:#f97316;color:#fdba74}
.dark .area-badge.active{background:#c2410c;border-color:#c2410c;color:#fff}
/* ダイエタリ/価格帯 select */
.tfg-article-filter-select{padding:0.5rem 0.875rem;background:#fff;border:1px solid #e5e7eb;border-radius:0.75rem;font-size:0.875rem;color:#374151;outline:none;transition:border-color 0.15s}
.tfg-article-filter-select:focus{border-color:#c2410c;box-shadow:0 0 0 2px rgba(194,65,12,0.1)}
.dark .tfg-article-filter-select{background:#1e293b;border-color:#334155;color:#cbd5e1}

