/* ============================================================
   ヤマガタン 特注スタイル
   スコープ: [data-template="custom-yamagatan"] / .ygt- プレフィックス
   パレット: 花笠の赤 × 紅花イエロー × 山形グリーン × 生成りベージュ
   ============================================================ */

[data-template="custom-yamagatan"] {
  /* メイン = 花笠くん（hanagasa-kun.svg）の実色: 赤 #bf1a20 / 笠の黄 #e9b31b */
  --ygt-red:    #bf1a20;
  --ygt-yellow: #e9b31b;
  --ygt-green:  #2f5233;
  --ygt-ink:    #444444;
  --ygt-sub:    #777777;
  --ygt-cream:  #ffffff;
  --ygt-paper:  #ffffff;
  --ygt-line:   #e5e5e5;

  background: var(--ygt-cream);
  color: var(--ygt-ink);
  font-feature-settings: "palt";
  line-height: 1.8;
  min-height: 100vh;
}

[data-template="custom-yamagatan"] a { text-decoration: none; color: inherit; }
[data-template="custom-yamagatan"] img { max-width: 100%; height: auto; }

/* ───────── Header（旧 ver10 と同型: 左上余白ゼロの赤帯ロゴ） ───────── */
.ygt-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0;
  background: #ffffff;
  border-bottom: 1px solid var(--ygt-line);
}
.ygt-logo {
  display: inline-block;
  background: var(--ygt-red); color: #ffffff !important;
  font-size: 18px; font-weight: 700; letter-spacing: 0.1em;
  padding: 10px 0; width: 230px; text-align: center;
}
.ygt-nav-cta {
  background: var(--ygt-red); color: #fff !important;
  padding: 10px 18px; border-radius: 999px; font-weight: 700; text-align: center;
}
.ygt-nav-cta:hover { opacity: 0.85; }
.ygt-menu-btn {
  display: inline-flex; flex-direction: column; gap: 5px;
  background: none; border: none; padding: 10px; margin-right: 14px; cursor: pointer;
}
.ygt-menu-btn span {
  width: 29px; height: 2px; background: var(--ygt-ink); border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
/* 開いている間は三本線をバッテンに（aria-expanded で状態連動） */
.ygt-menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.ygt-menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.ygt-menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ハンバーガーメニュー（全デバイス共通・旧 ver10 流儀＝濃いグレー地に赤▶） */
.ygt-menu {
  position: absolute; top: 100%; right: 0; z-index: 60;
  display: flex; flex-direction: column;
  width: min(320px, 100vw);
  background: #3d3d3d;
  padding: 10px 16px 16px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.25);
}
.ygt-menu > a {
  color: #ffffff; font-weight: 700; font-size: 14px; letter-spacing: 0.06em;
  padding: 13px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}
.ygt-menu > a::before { content: '▶'; color: var(--ygt-red); font-size: 11px; margin-right: 10px; }
.ygt-menu > a:hover { color: var(--ygt-yellow); }
.ygt-menu > .ygt-nav-cta {
  margin-top: 14px; border-bottom: none;
}
.ygt-menu > .ygt-nav-cta::before { content: none; }
/* 事業者向け導線（メニュー最下部・白枠ピル） */
.ygt-menu > .ygt-nav-biz {
  margin-top: 10px; border-bottom: none;
  border: 1.5px solid rgba(255, 255, 255, 0.65);
  border-radius: 999px; text-align: center;
  padding: 9px 18px; font-size: 13px;
}
.ygt-menu > .ygt-nav-biz::before { content: none; }
.ygt-menu > .ygt-nav-biz:hover { border-color: var(--ygt-yellow); }
.ygt-menu-lang { margin-top: 12px; display: flex; justify-content: flex-end; }

/* ───────── Hero（マスコットのみ） ───────── */
.ygt-hero { background: #ffffff; padding: 40px 20px 8px; }
.ygt-hero-mascot { display: flex; justify-content: center; line-height: 0; }
.ygt-float { animation: ygt-float 3.2s ease-in-out infinite; }
@keyframes ygt-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}

/* ───────── Sections（TOP 5構成: チャット/ウィキ/マップ/ニュース/メルマガ） ───────── */
.ygt-section { max-width: 1000px; margin: 0 auto; padding: 40px 20px 48px; }

.ygt-section + .ygt-section { border-top: 1px solid var(--ygt-line); }
/* ニュース＋ブログの2カラムラッパー（PCで左右に並べる）。区切り線も引き継ぐ */
.ygt-section + .ygt-two-col,
.ygt-two-col + .ygt-two-col,
.ygt-tri-col + .ygt-two-col,
.ygt-tri-col + .ygt-section,
.ygt-section + .ygt-tri-col,
.ygt-two-col + .ygt-section { border-top: 1px solid var(--ygt-line); }
.ygt-section-en {
  text-align: center; margin: 0 0 4px;
  font-size: 12px; font-weight: 800; letter-spacing: 0.28em;
  color: var(--ygt-red); text-transform: uppercase;
}
.ygt-section-title {
  font-size: 26px; font-weight: 800; letter-spacing: 0.05em;
  text-align: center; margin: 0 0 8px;
}
.ygt-section-lead { text-align: center; color: var(--ygt-sub); font-size: 14px; margin: 0 0 30px; }
.ygt-home-more { text-align: center; margin-top: 26px; }
.ygt-home-more a,
.ygt-home-more button {
  display: inline-block; border: 2px solid var(--ygt-red); color: var(--ygt-red);
  background: #fff; cursor: pointer;
  font-size: 15px; font-family: inherit;
  border-radius: 999px; padding: 10px 30px; font-weight: 700;
}
.ygt-home-more a:hover,
.ygt-home-more button:hover { background: var(--ygt-red); color: #ffffff; }

/* ───────── チャット：TOPのメッセージ入力＋チャットをひらく（/chatの入力行と同じUI） ───────── */
.ygt-chat-form { max-width: 640px; width: 100%; margin: 0 auto; }
.ygt-chat-row { display: flex; align-items: center; gap: 0.75rem; }
.ygt-chat-form input {
  flex: 1; min-width: 0; min-height: 48px;
  padding: 0.75rem 1rem; font-size: 0.875rem; line-height: 1.6;
  border: 1px solid #e8e8e0; border-radius: 0.75rem;
  background: #fafaf8; color: #1a1a1a; outline: none;
  font-family: inherit;
}
.ygt-chat-form input:focus { border-color: var(--ygt-red); }
.ygt-chat-send {
  width: 48px; height: 48px; flex-shrink: 0;
  border: none; border-radius: 50%;
  background: var(--ygt-red); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; transition: opacity 0.15s ease;
}
.ygt-chat-send:hover { opacity: 0.85; }

/* ───────── ウィキ：TOP 検索フォーム ───────── */
.ygt-wiki-home-search {
  display: flex; gap: 10px;
  max-width: 520px; margin: 0 auto;
}
.ygt-wiki-home-search input {
  flex: 1; min-width: 0;
  padding: 12px 18px; font-size: 16px;
  border: 2px solid var(--ygt-line); border-radius: 999px;
  background: #fff; color: var(--ygt-ink); outline: none;
}
.ygt-wiki-home-search input:focus { border-color: var(--ygt-red); }
.ygt-wiki-home-search button {
  border: none; background: var(--ygt-red); color: #fff;
  font-size: 15px; font-weight: 700; padding: 0 26px; border-radius: 999px; cursor: pointer;
}
.ygt-wiki-home-search button:hover { opacity: 0.88; }

/* ───────── マップ：エリア凡例 ───────── */
.ygt-map-areas { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.ygt-map-area {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--ygt-line); border-radius: 999px;
  padding: 7px 16px; font-size: 13px; font-weight: 700; background: #fff;
}
.ygt-map-area::before {
  content: ''; width: 10px; height: 10px; border-radius: 50%;
  background: var(--ac, var(--ygt-red));
}

/* ───────── ニュース：アンテナ収集の公式最新情報 ───────── */
.ygt-news-list { list-style: none; margin: 0 auto; padding: 0; max-width: 760px; }
.ygt-news-list li { border-bottom: 1px solid var(--ygt-line); }
.ygt-news-list li:first-child { border-top: 1px solid var(--ygt-line); }
.ygt-news-list a {
  display: flex; flex-direction: column; gap: 3px;
  padding: 14px 6px;
  transition: background 0.15s ease;
}
.ygt-news-list a:hover { background: #faf6f6; }
.ygt-news-meta { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--ygt-sub); }
.ygt-news-meta em {
  font-style: normal; font-size: 11px; font-weight: 700; color: var(--ygt-red);
  border: 1px solid currentColor; border-radius: 4px; padding: 1px 7px;
}
.ygt-news-title { font-size: 15px; font-weight: 700; line-height: 1.6; }
@media (min-width: 700px) {
  .ygt-news-list a { flex-direction: row; align-items: flex-start; gap: 14px; }
  /* 日付の下に情報源バッジを改行して重ねる */
  .ygt-news-meta { flex: none; width: 190px; flex-direction: column; align-items: flex-start; gap: 4px; }
  /* ブログ列は日付だけなので幅を詰める */
  .ygt-blog-list .ygt-news-meta { width: auto; }
  /* 情報源バッジは折り返さない。列に収まらない長い名前は「…」で省略 */
  .ygt-news-meta em {
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    max-width: 180px;
  }
  .ygt-news-title { flex: 1; }
}

/* ───────── メルマガ ───────── */
.ygt-newsletter { max-width: 520px; margin: 0 auto; }

/* ───────── 山形用語集（/wiki クロス検索） ───────── */
.ygt-wiki-page { max-width: 960px; margin: 0 auto; padding: 40px 20px 72px; }
.ygt-wiki-head { text-align: center; margin-bottom: 28px; }
.ygt-wiki-head h1 { font-size: 28px; font-weight: 800; letter-spacing: 0.05em; margin: 0 0 8px; }
.ygt-wiki-head p { color: var(--ygt-sub); font-size: 14px; margin: 0; }
.ygt-wiki-apply { margin: 10px 0 0; font-size: 13px; }
.ygt-wiki-apply a { color: var(--ygt-red); font-weight: 700; text-decoration: underline; }
.ygt-wiki-search { max-width: 520px; margin: 0 auto 18px; }
.ygt-wiki-search input {
  width: 100%; padding: 12px 18px; font-size: 15px;
  border: 2px solid var(--ygt-line); border-radius: 999px;
  background: #fff; color: var(--ygt-ink); outline: none;
}
.ygt-wiki-search input:focus { border-color: var(--ygt-red); }
.ygt-wiki-filter { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 10px; }
.ygt-wiki-filter button {
  border: 1px solid var(--ygt-line); background: #fff; color: var(--ygt-ink);
  font-size: 13px; font-weight: 600; padding: 6px 14px; border-radius: 999px; cursor: pointer;
}
.ygt-wiki-filter button.is-active { background: var(--ygt-red); border-color: var(--ygt-red); color: #fff; }
.ygt-wiki-filter-cat button { font-size: 12px; padding: 5px 12px; }
.ygt-wiki-count { text-align: center; color: var(--ygt-sub); font-size: 12px; margin: 14px 0 22px; }
.ygt-wiki-empty { text-align: center; color: var(--ygt-sub); padding: 32px 0; }
.ygt-wiki-group { margin-bottom: 28px; }
.ygt-wiki-group h2 {
  font-size: 14px; font-weight: 800; color: var(--ygt-red);
  border-bottom: 2px solid var(--ygt-red); padding-bottom: 4px; margin: 0 0 12px;
}
.ygt-wiki-group ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
@media (min-width: 700px) { .ygt-wiki-group ul { grid-template-columns: 1fr 1fr; } }
.ygt-wiki-card {
  display: flex; flex-direction: column; gap: 4px;
  background: #fff; border: 1px solid var(--ygt-line); border-radius: 12px; padding: 12px 14px;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.ygt-wiki-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08); }
.ygt-wiki-term { font-size: 15px; font-weight: 700; }
.ygt-wiki-term small { font-size: 11px; font-weight: 400; color: var(--ygt-sub); margin-left: 6px; }
.ygt-wiki-tags { display: flex; gap: 6px; }
.ygt-wiki-tags em {
  font-style: normal; font-size: 10px; font-weight: 700; color: #fff;
  background: var(--ygt-red); border-radius: 4px; padding: 2px 6px;
}
.ygt-wiki-tags em.ygt-wiki-area { background: var(--ygt-green); }
.ygt-wiki-def { font-size: 12px; color: var(--ygt-sub); line-height: 1.6; }

/* ───────── 用語詳細（/wiki/[slug] 読み物ページ） ───────── */
.ygt-wikid { max-width: 720px; margin: 0 auto; padding: 40px 20px 72px; }
.ygt-wikid-breadcrumb { font-size: 12px; color: var(--ygt-sub); margin: 0 0 18px; }
.ygt-wikid-breadcrumb a { color: var(--ygt-red); }
.ygt-wikid-head h1 { font-size: 32px; font-weight: 800; margin: 0 0 4px; letter-spacing: 0.03em; }
.ygt-wikid-reading { color: var(--ygt-sub); font-size: 14px; margin: 0 0 10px; }
.ygt-wikid-tags { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 0 6px; }
.ygt-wikid-tags em {
  font-style: normal; font-size: 11px; font-weight: 700; color: #fff;
  background: var(--ygt-red); border-radius: 4px; padding: 3px 8px;
}
.ygt-wikid-tags em.ygt-wikid-area { background: var(--ygt-green); }
.ygt-wikid-aliases { font-size: 12px; color: var(--ygt-sub); }
.ygt-wikid-body {
  margin-top: 22px; font-size: 15.5px; line-height: 2;
  border-top: 2px solid var(--ygt-red); padding-top: 22px;
}
.ygt-wikid-body p { margin: 0 0 1em; }
.ygt-wikid-body img { border-radius: 12px; }
.ygt-wikid-links, .ygt-wikid-related { margin-top: 34px; }
.ygt-wikid-links h2, .ygt-wikid-related h2 {
  font-size: 14px; font-weight: 800; color: var(--ygt-red);
  border-bottom: 2px solid var(--ygt-red); padding-bottom: 4px; margin: 0 0 12px;
}
.ygt-wikid-links ul { margin: 0; padding-left: 1.2em; }
.ygt-wikid-links a { color: var(--ygt-red); text-decoration: underline; }
.ygt-wikid-cta { text-align: center; margin-top: 36px; }
.ygt-wikid-cta a {
  display: inline-block; background: var(--ygt-red); color: #fff;
  font-weight: 700; padding: 12px 28px; border-radius: 999px;
}
.ygt-wikid-cta a:hover { opacity: 0.88; }
.ygt-wikid-related ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ygt-wikid-related a {
  display: inline-block; border: 1px solid var(--ygt-line); border-radius: 999px;
  padding: 6px 14px; font-size: 13px; font-weight: 600; background: #fff;
}
.ygt-wikid-related a:hover { border-color: var(--ygt-red); color: var(--ygt-red); }
.ygt-wikid-related small { font-weight: 400; color: var(--ygt-sub); margin-left: 4px; }

/* ───────── /map 絞り込みチップ（エリア×ジャンル） ───────── */
.ygt-spot-filters { margin-top: 18px; display: grid; gap: 8px; }
.ygt-spot-filter-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.ygt-spot-chip {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--ygt-line); border-radius: 999px;
  background: #fff; color: var(--ygt-ink);
  font-size: 12.5px; font-weight: 700; line-height: 1;
  padding: 8px 14px; cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.ygt-spot-chip:hover { border-color: var(--ygt-red); }
.ygt-spot-chip.is-active { background: var(--ygt-red); border-color: var(--ygt-red); color: #fff; }
.ygt-spot-chip.is-empty { opacity: 0.35; cursor: default; }
.ygt-spot-chip.is-empty:hover { border-color: var(--ygt-line); }
.ygt-spot-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--fc, var(--ygt-red)); }
.ygt-spot-chip.is-active .ygt-spot-dot { background: #fff; }
.ygt-spot-genre {
  align-self: flex-start;
  font-size: 10px; font-weight: 700; color: var(--ygt-red);
  border: 1px solid currentColor; border-radius: 4px; padding: 1px 7px;
}

/* ───────── /map スポット一覧（検索つきカードグリッド） ───────── */
.ygt-spots { margin-top: 44px; }
.ygt-spot-title {
  font-size: 19px; font-weight: 800; text-align: center;
  letter-spacing: 0.05em; margin: 0 0 16px; color: var(--ygt-ink);
}
.ygt-spot-search { max-width: 520px; margin: 0 auto 8px; }
.ygt-spot-search input {
  width: 100%; padding: 12px 18px; font-size: 16px;
  border: 2px solid var(--ygt-line); border-radius: 999px;
  background: #fff; color: var(--ygt-ink); outline: none;
}
.ygt-spot-search input:focus { border-color: var(--ygt-red); }
.ygt-spot-count { text-align: center; font-size: 12px; color: var(--ygt-sub); margin: 6px 0 20px; }
.ygt-spot-empty { text-align: center; color: var(--ygt-sub); padding: 28px 0; }
.ygt-spot-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 600px)  { .ygt-spot-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .ygt-spot-grid { grid-template-columns: repeat(3, 1fr); } }
.ygt-spot-card {
  /* grid アイテムの min-width:auto を殺す（URL 等の改行不能文字列が
     カードの最小幅を押し広げ、列数に関係なくはみ出す事故の根治） */
  min-width: 0; overflow: hidden;
  display: flex; flex-direction: column; gap: 8px;
  background: #fff;
  border: 1px solid var(--ygt-line);
  border-top: 4px solid var(--sc, var(--ygt-red));
  border-radius: 12px; padding: 14px 16px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}
.ygt-spot-head { display: flex; align-items: center; gap: 8px; }
.ygt-spot-carddot {
  width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0;
  background: var(--sc, var(--ygt-red));
}
.ygt-spot-head h3 { margin: 0; font-size: 14.5px; font-weight: 800; line-height: 1.5; }
.ygt-spot-desc { margin: 0; font-size: 12.5px; color: var(--ygt-sub); line-height: 1.8; }
.ygt-spot-card > a {
  margin-top: auto; align-self: stretch;
  font-size: 10.5px; font-weight: 400; color: var(--ygt-sub); text-decoration: underline;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ygt-spot-card > a:hover { opacity: 0.8; }

/* ───────── /about：統計ブロック＋年表 ───────── */
.ygt-about-stats-wrap { margin: -6px 0 44px; }
.ygt-about-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
  max-width: 720px; margin: 0 auto;
}
.ygt-stat {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: #fff; border: 1px solid var(--ygt-line); border-top: 4px solid var(--ygt-red);
  border-radius: 14px; padding: 20px 10px 16px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}
.ygt-stat strong {
  font-size: clamp(28px, 4vw, 44px); font-weight: 800; line-height: 1.1;
  color: var(--ygt-red); font-variant-numeric: tabular-nums; letter-spacing: 0.01em;
}
.ygt-stat-unit { font-size: 14px; font-weight: 700; color: var(--ygt-ink); }
.ygt-stat-label { font-size: 11.5px; color: var(--ygt-sub); }
.ygt-stat-date { text-align: center; font-size: 12px; color: var(--ygt-sub); margin: 12px 0 0; }
@media (max-width: 599px) {
  .ygt-about-stats { grid-template-columns: 1fr; max-width: 320px; }
}
.ygt-timeline {
  list-style: none; margin: 0 auto; padding: 0 0 0 4px; max-width: 680px;
  border-left: 3px solid var(--ygt-red);
}
.ygt-timeline li {
  position: relative; padding: 0 0 22px 22px;
}
.ygt-timeline li::before {
  content: ''; position: absolute; left: -8px; top: 7px;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--ygt-red); border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--ygt-red);
}
.ygt-timeline li:last-child { padding-bottom: 4px; }
.ygt-timeline-year { display: block; font-size: 14px; font-weight: 800; color: var(--ygt-red); margin-bottom: 2px; }
.ygt-timeline-text { display: block; font-size: 13.5px; color: var(--ygt-ink); line-height: 1.9; }

/* ───────── TOP：ビジネス登録セクションの4メリット ───────── */
.ygt-biz-mini {
  list-style: none; margin: 4px auto 24px; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px;
  max-width: 460px; text-align: left;
}
.ygt-biz-mini li {
  position: relative; padding: 10px 12px 10px 34px;
  background: #fff; border: 1px solid var(--ygt-line); border-radius: 10px;
  font-size: 13px; font-weight: 700; color: var(--ygt-ink); line-height: 1.5;
}
.ygt-biz-mini li::before {
  content: ''; position: absolute; left: 12px; top: 50%;
  width: 12px; height: 7px; transform: translateY(-70%) rotate(-45deg);
  border-left: 2.5px solid var(--ygt-red); border-bottom: 2.5px solid var(--ygt-red);
}
@media (max-width: 420px) {
  .ygt-biz-mini { grid-template-columns: 1fr; }
}

/* ───────── /wiki：語数の大型表示 ───────── */
.ygt-wiki-count-big {
  text-align: center; margin: 6px 0 4px;
  font-size: 15px; font-weight: 700; color: var(--ygt-ink);
}
.ygt-wiki-count-big strong {
  font-size: clamp(30px, 4vw, 44px); font-weight: 800; line-height: 1;
  color: var(--ygt-red); font-variant-numeric: tabular-nums;
  margin: 0 4px;
}

/* ───────── /about：マスコット＋共育ちの循環 ───────── */
.ygt-about-mascot { display: flex; justify-content: center; margin: 18px 0 10px; line-height: 0; }
.ygt-mascot-name {
  text-align: center; margin: 0 0 6px;
  color: var(--ygt-red); font-size: 17px; font-weight: 800; letter-spacing: 0.06em;
}
.ygt-mascot-intro {
  max-width: 560px; margin: 0 auto 26px;
  text-align: center; font-size: 13px; color: var(--ygt-sub); line-height: 2;
}
.ygt-cycle {
  list-style: none; margin: 26px auto 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px;
  max-width: 860px; counter-reset: none;
}
.ygt-cycle li {
  position: relative; background: #fff;
  border: 1px solid var(--ygt-line); border-top: 4px solid var(--ygt-red);
  border-radius: 14px; padding: 20px 18px 16px 18px; text-align: left;
}
.ygt-cycle-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--ygt-red); color: #fff; font-weight: 800; font-size: 15px;
  margin-bottom: 8px;
}
.ygt-cycle h3 { margin: 0 0 6px; font-size: 16px; font-weight: 800; }
.ygt-cycle p { margin: 0; font-size: 13px; color: var(--ygt-sub); line-height: 1.8; }
.ygt-cycle-loop {
  text-align: center; font-size: 13px; font-weight: 700; color: var(--ygt-red);
  margin: 18px 0 6px;
}
@media (max-width: 599px) {
  .ygt-cycle { grid-template-columns: 1fr; }
}
@media (min-width: 1000px) {
  .ygt-cycle { grid-template-columns: repeat(4, 1fr); }
}

/* ───────── /about：もらえるパワー8つ ───────── */
.ygt-power-head {
  text-align: center; font-size: 16px; font-weight: 800; letter-spacing: 0.04em;
  margin: 34px 0 4px;
}
.ygt-power {
  display: grid; grid-template-columns: 1fr; gap: 12px;
  max-width: 980px; margin: 16px auto 0;
}
@media (min-width: 600px)  { .ygt-power { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .ygt-power { grid-template-columns: repeat(4, 1fr); } }
.ygt-power-card {
  background: #fff; border: 1px solid var(--ygt-line);
  border-left: 4px solid var(--ygt-red);
  border-radius: 12px; padding: 14px 14px 12px; text-align: left;
}
.ygt-power-card h4 { margin: 0 0 5px; font-size: 14px; font-weight: 800; color: var(--ygt-red); }
.ygt-power-card p { margin: 0; font-size: 12.5px; color: var(--ygt-sub); line-height: 1.8; }

/* ───────── /news：アーカイブのページ送り ───────── */
.ygt-news-pager {
  display: flex; align-items: center; justify-content: center; gap: 18px;
  margin: 28px 0 4px;
}
.ygt-news-pager .ygt-home-more { margin: 0; }
.ygt-news-pageinfo { font-size: 12.5px; color: var(--ygt-sub); }

/* ───────── 文字サイズ切替（メニュー内・小中大） ───────── */
.ygt-menu-lang { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ygt-menu-fontsize { display: inline-flex; align-items: center; gap: 6px; }
.ygt-menu-fontsize span { color: rgba(255, 255, 255, 0.75); font-size: 12px; }
.ygt-menu-fontsize button {
  min-width: 34px; padding: 5px 0; cursor: pointer;
  background: none; color: #ffffff; font-family: inherit; font-size: 13px; font-weight: 700;
  border: 1.5px solid rgba(255, 255, 255, 0.45); border-radius: 8px;
}
.ygt-menu-fontsize button.is-active { background: var(--ygt-red); border-color: var(--ygt-red); }
/* チャット本文は固定高レイアウトのため zoom でなく文字サイズで拡縮 */
.ygt-root[data-fs="l"] .chat-msg-body { font-size: 1.13rem; }
.ygt-root[data-fs="s"] .chat-msg-body { font-size: 0.85rem; }

/* ───────── wiki詳細：マップ導線ピル ───────── */
.ygt-wikid-maplink {
  display: inline-flex; align-items: center; gap: 5px;
  margin-left: 8px; padding: 4px 14px;
  border: 1.5px solid var(--ygt-red); border-radius: 999px;
  color: var(--ygt-red) !important; font-size: 12px; font-weight: 700;
}
.ygt-wikid-maplink::before {
  content: ''; width: 8px; height: 8px; border-radius: 50%;
  background: var(--ygt-red);
}
.ygt-wikid-maplink:hover { background: var(--ygt-red); color: #ffffff !important; }
.ygt-wikid-maplink:hover::before { background: #ffffff; }

/* ───────── チャット本文内リンク（「参考：」出典等）をヤマガタンレッドに ───────── */
[data-template="custom-yamagatan"] .chat-msg-body a,
[data-template="custom-yamagatan"] .chat-refs,
[data-template="custom-yamagatan"] .chat-refs a {
  /* 共有コンポーネントのインライン色（#9a9a9a/inherit）に勝つため !important */
  color: var(--ygt-red) !important;
  text-decoration-color: var(--ygt-red);
}
[data-template="custom-yamagatan"] .chat-msg-body a:hover { opacity: 0.8; }

/* ───────── メルマガ登録ボタンをヤマガタンの赤に（共通フォームの indigo を上書き） ───────── */
[data-template="custom-yamagatan"] button.bg-indigo-600 {
  background-color: var(--ygt-red) !important;
}
[data-template="custom-yamagatan"] button.bg-indigo-600:hover { opacity: 0.88; }

/* ───────── チャット：送信ボタンをヤマガタンの赤に（共通auroraを上書き） ───────── */
[data-template="custom-yamagatan"] .chat-send-aurora {
  background: var(--ygt-red) !important;
  animation: none;
}
[data-template="custom-yamagatan"] .chat-send-aurora:hover { opacity: 0.85; }

/* ───────── Footer ───────── */
.ygt-footer {
  background: #3d3d3d; color: #d9d9d9;
  padding: 28px 20px; text-align: center; font-size: 13px;
}
.ygt-footer-note { margin: 0; font-size: 12px; }
.ygt-footer-note a { text-decoration: underline; }
.ygt-footer-sep { margin: 0 10px; opacity: 0.5; }

/* アクセスカウンター（GA4連動・クラシック桁ボックス風） */
.ygt-access-counter {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  margin: 0 0 18px;
}
.ygt-ac-label { font-size: 11px; letter-spacing: 0.14em; color: #b5b5b5; }
.ygt-ac-digits { display: inline-flex; gap: 3px; }
.ygt-ac-digit {
  display: inline-block; min-width: 20px; padding: 3px 0;
  background: #222222; border: 1px solid #555555; border-radius: 3px;
  color: #ffffff; font-family: "Courier New", monospace;
  font-size: 17px; font-weight: 700; line-height: 1; text-align: center;
  font-variant-numeric: tabular-nums;
}
.ygt-ac-sub { font-size: 12px; color: #d9d9d9; }

/* ───────── ヤマガタンビジネス登録（/contact/business-listing）───────── */
.ygt-biz { max-width: 860px; margin: 0 auto; padding: 48px 20px 72px; }
.ygt-biz-head { text-align: center; margin-bottom: 40px; }
.ygt-biz-head h1 { font-size: 30px; font-weight: 800; letter-spacing: 0.04em; margin: 0; }
.ygt-biz-sub {
  display: inline-block; margin: 10px 0 0;
  background: var(--ygt-red); color: #fff;
  font-size: 13px; font-weight: 700; padding: 4px 16px; border-radius: 999px;
}
.ygt-biz-lead { margin: 18px auto 0; max-width: 620px; font-size: 15px; color: var(--ygt-sub); line-height: 2; }
.ygt-biz-block { margin-bottom: 44px; }
.ygt-biz-block > h2 {
  font-size: 19px; font-weight: 800; text-align: center; margin: 0 0 20px;
}
.ygt-biz-benefits { display: grid; gap: 14px; }
@media (min-width: 700px) { .ygt-biz-benefits { grid-template-columns: 1fr 1fr; } }
.ygt-biz-card {
  background: #fff; border: 1px solid var(--ygt-line); border-left: 6px solid var(--ygt-red);
  border-radius: 12px; padding: 18px 20px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}
.ygt-biz-card h3 { margin: 0 0 6px; font-size: 15.5px; font-weight: 800; }
.ygt-biz-card-link { transition: transform 0.15s ease, box-shadow 0.15s ease; }
.ygt-biz-card-link:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1); }
.ygt-biz-card-link h3 { color: var(--ygt-red); }
.ygt-biz-card p { margin: 0; font-size: 13.5px; color: var(--ygt-sub); line-height: 1.9; }
.ygt-biz-steps { list-style: none; margin: 0 auto; padding: 0; max-width: 620px; display: grid; gap: 14px; }
.ygt-biz-steps li { display: flex; gap: 14px; align-items: flex-start; }
.ygt-biz-num {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%;
  background: var(--ygt-red); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 800;
}
.ygt-biz-steps h3 { margin: 4px 0 4px; font-size: 15px; font-weight: 800; }
.ygt-biz-steps p { margin: 0; font-size: 13.5px; color: var(--ygt-sub); line-height: 1.9; }
.ygt-biz-rules { list-style: disc; margin: 0 auto; padding: 0 0 0 1.4em; max-width: 620px; font-size: 14px; line-height: 2.1; }
.ygt-biz-rules li::marker { color: var(--ygt-red); }
.ygt-biz-note {
  margin: 16px auto 0; max-width: 620px;
  font-size: 12.5px; color: var(--ygt-sub); line-height: 1.9;
  background: #faf6f6; border-radius: 10px; padding: 12px 16px;
}
.ygt-biz-form > h2 { margin-bottom: 24px; }

/* ───────── PC はコンテンツ幅=ブラウザウインドウの80%（SEI指定 2026-09-23） ─────────
   ※ 内側要素の max-width 上書きを含むため、必ずファイル末尾に置くこと（後勝ち） */
@media (min-width: 900px) {
  .ygt-section,
  .ygt-wiki-page,
  .ygt-wikid { max-width: 80%; }
  .ygt-news-list { max-width: none; }

  /* ニュース＋ブログはPCで左右2カラム（片方だけのときは全幅に自動フィット） */
  .ygt-two-col {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 0 48px;
    align-items: start;
    max-width: 80%;
    margin: 0 auto;
  }
  .ygt-two-col > .ygt-section { max-width: none; margin: 0; width: 100%; }
  .ygt-two-col > .ygt-section + .ygt-section { border-top: none; }

  /* ウィキ|チャット|マップの3カラム（DOM順はチャット先頭のまま、表示順だけ入替） */
  .ygt-tri-col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0 40px;
    align-items: start;
    max-width: 80%;
    margin: 0 auto;
  }
  .ygt-tri-col > .ygt-section { max-width: none; margin: 0; width: 100%; }
  .ygt-tri-col > .ygt-section + .ygt-section { border-top: none; }
  .ygt-tri-col > #wiki { order: 1; }
  .ygt-tri-col > #chat { order: 2; }
  .ygt-tri-col > #map  { order: 3; }

  /* /map など汎用レイアウト（Tailwind max-w-5xl）のページもヤマガタンでは80%に */
  [data-template="custom-yamagatan"] .max-w-5xl { max-width: 80%; }

  /* /news /about /contact/business-listing 等の ygt-biz ラッパーも80%に */
  .ygt-biz { max-width: 80%; }
}
