/* ============================================================================
 * yamagata-med（山形大学医学部附属病院 難病診療連携センター） Layer 2 スタイル
 * saiseikai.gr.jp UI レイアウト + 独自カラーパレット（2026-11-16 SEI 指示）
 *   ヘッダー: 白背景 + テキストロゴ + 右上に電話ボタン + メニュー
 *   グロナビ: 白背景・下部薄グレー線・濃緑文字・ホバーでライム下線
 *   本文: 白背景・本文#222
 *   見出し: 日本語 + 英字小見出し（PICKUP / NEWS）
 *   お知らせ: タブ切替 + リスト型（日付+カテゴリタグ+タイトル）
 * 配色（SEI 指示パレット）:
 *   濃緑 #1F883B（メイン・見出し・リンク）
 *   ライム #A4CC30（アクセント・ホバー下線・kicker英字）
 *   ティール #60C1BD（第三色・タグ・サブリンク）
 *   淡グリーン #F5F8EE（淡色背景・セクション区切り。フッターと同色）
 *   背景は白 #FFFFFF
 * フォント: Noto Sans JP（案B・2026-11-24 杉原様決定）+ Gantari（欧文）
 * ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700;900&family=Gantari:wght@400;500;600;700&display=swap');

[data-template="custom-yamagata-med"] {
  --ym-blue:         #1F883B;  /* メイン：濃緑（旧変数名を踏襲） */
  --ym-blue-ink:     #166230;  /* 濃緑の濃い方（ホバー時など） */
  --ym-accent:       #A4CC30;  /* アクセント：ライム */
  --ym-accent-dark:  #8AB024;
  --ym-link:         #60C1BD;  /* 第三色・リンク：ティール */
  --ym-link-dark:    #45A3A0;
  --ym-slate:        #414851;  /* ダークグレー */
  --ym-red:          #E50012;  /* 重要告知（救急等） */
  --ym-paper:        #ffffff;
  --ym-paper-alt:    #F5F8EE;  /* 淡グリーン（フッターと同色） */
  --ym-cream:        #F5F8EE;
  --ym-lemon:        #F5F8EE;
  --ym-ink:          #222222;  /* 本文テキスト */
  --ym-mute:         #6b6b6b;
  --ym-line:         #E3E3E3;
  --ym-line-strong:  #C2C4C6;
  --ym-maxw:         1456px;

  /* 2026-11-18 杉原様要望：現行 samidare のフォントに戻す（丸ゴ→角ゴUD）
   *   案B（Noto Sans JP 単独）を採用：2026-11-24 医事課 杉原様決定 */
  --ym-font-sans:    'Noto Sans JP', 'ヒラギノ角ゴ ProN W3', 'Hiragino Kaku Gothic ProN', sans-serif;
  --ym-font-head:    'Noto Sans JP', 'ヒラギノ角ゴ ProN W3', 'Hiragino Kaku Gothic ProN', sans-serif;
  --ym-font-en:      'Gantari', 'Noto Sans JP', sans-serif;
}

body:has([data-ymu-root]) {
  font-family: var(--ym-font-sans);
  color: var(--ym-ink);
  background: #fff;
  /* 2026-11-18 杉原様要望：ヘッダー/フッター以外を +2px。既定 19px */
  font-size: 19px;
}
[data-ymu-root], [data-template="custom-yamagata-med"] {
  font-family: var(--ym-font-sans);
  font-size: 19px;
}

/* 2026-11-18 杉原様要望：箇条書きのドットを黄緑（ライム）で統一
 *   tenant_pages 内で2種類のマーカーが混在するため ::marker を強制統一 */
[data-template="custom-yamagata-med"] .ym-main ul li::marker,
[data-template="custom-yamagata-med"] .ym-main ol li::marker,
[data-template="custom-yamagata-med"] .ym-page-body ul li::marker,
[data-template="custom-yamagata-med"] .ym-page-body ol li::marker {
  color: var(--ym-accent);
}

/* 2026-11-19 杉原様2nd要望：::before で黄緑丸ドットを入れているリストで
 *   さらに Tailwind lp-prose 由来の ::marker（◯の黄緑）が重複表示されるのを抑止。
 *   list-style は !important で確実に消し、::marker の中身も空化して二重表示をゼロに。
 *   対象：::before で独自ドットを付けているリスト（checklist / conditions / tellist / linkcards 等） */
[data-template="custom-yamagata-med"] .ym-static__checklist,
[data-template="custom-yamagata-med"] .ym-static__checklist li,
[data-template="custom-yamagata-med"] .ym-static__conditions,
[data-template="custom-yamagata-med"] .ym-static__conditions li,
[data-template="custom-yamagata-med"] .ym-static__tellist,
[data-template="custom-yamagata-med"] .ym-static__tellist li,
[data-template="custom-yamagata-med"] .ym-static__linkcards,
[data-template="custom-yamagata-med"] .ym-static__buslist,
[data-template="custom-yamagata-med"] .ym-static__buslist li {
  list-style: none !important;
}
[data-template="custom-yamagata-med"] .ym-static__checklist li::marker,
[data-template="custom-yamagata-med"] .ym-static__conditions li::marker,
[data-template="custom-yamagata-med"] .ym-static__tellist li::marker,
[data-template="custom-yamagata-med"] .ym-static__buslist li::marker {
  content: '' !important;
  color: transparent !important;
}
[data-template="custom-yamagata-med"] h1,
[data-template="custom-yamagata-med"] h2,
[data-template="custom-yamagata-med"] h3,
[data-template="custom-yamagata-med"] h4 {
  font-family: var(--ym-font-head);
  color: var(--ym-blue);
}

/* ============================================================================
 * フローティング固定ラッパー（ヘッダー+グロナビをスクロール追従させる）
 * ========================================================================== */
.ym-sticky {
  position: sticky; top: 0; z-index: 70;
  box-shadow: 0 2px 4px rgba(128, 128, 128, 0.5);
}

/* ============================================================================
 * ヘッダー（白背景・ロゴ画像・右上MENU）
 * ========================================================================== */
.ym-header {
  position: relative;
  background: #fff;
  border-bottom: 1px solid var(--ym-line);
}
.ym-header__inner {
  max-width: 100%;
  padding: 18px 32px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
}
.ym-header__brand {
  display: flex; align-items: center; gap: 24px;
  text-decoration: none;
}
.ym-header__logo { display: block; height: 92px; width: auto; }
.ym-header__subtitle { display: block; height: 16px; width: auto; position: relative; top: 3px; }
/* テキスト版ロゴ（画像ロゴが届くまでの仮）*/
.ym-header__logo-text {
  display: flex; flex-direction: column; gap: 4px;
  line-height: 1.15;
}
.ym-header__logo-main {
  font-family: var(--ym-font-head);
  font-weight: 700;
  font-size: 21px;
  color: var(--ym-slate);
  letter-spacing: 0.04em;
}
.ym-header__logo-sub {
  font-family: var(--ym-font-head);
  font-weight: 700;
  font-size: 37px;
  color: var(--ym-blue);
  letter-spacing: 0.06em;
}
.ym-header__logo-en {
  font-family: var(--ym-font-en);
  font-weight: 600;
  font-size: 14px;
  color: var(--ym-accent-dark);
  letter-spacing: 0.1em;
  margin-top: 4px;
  line-height: 1.3;
}
@media (max-width: 720px) {
  .ym-header__inner { padding: 12px 16px; gap: 12px; }
  .ym-header__logo { height: 67px; }
  .ym-header__subtitle { display: none; }
  .ym-header__logo-main { font-size: 17px; }
  .ym-header__logo-sub { font-size: 29px; }
  .ym-header__logo-en { font-size: 11px; letter-spacing: 0.06em; }
}
/* 関連バナー：画像ではなくテキスト2段のカードバナー */
.ym-banner {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-decoration: none;
  padding: 24px 20px; min-height: 96px;
  border: 2px solid var(--ym-blue);
  background: #fff;
  color: var(--ym-blue);
  transition: background .2s, color .2s;
  text-align: center;
}
.ym-banner:hover { background: var(--ym-blue); color: #fff; }
.ym-banner__title { font-weight: 700; font-size: 20px; letter-spacing: 0.04em; }
.ym-banner__sub { font-size: 17px; margin-top: 4px; opacity: 0.85; }

.ym-header__hamburger {
  position: relative;
  width: 72px; height: 72px;
  border: 2px solid var(--ym-blue);
  border-radius: 50%;
  background: var(--ym-blue);  /* 通常: 濃緑塗り */
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
  cursor: pointer;
  padding: 0;
  transition: background .2s, border-color .2s;
}
.ym-header__hamburger:hover { background: #fff; }  /* ホバー: 白 */
.ym-header__hamburger span {
  display: block; width: 32px; height: 3px; background: #fff;  /* 通常: 白線 */
  transition: transform .25s, opacity .25s, background .2s;
}
.ym-header__hamburger:hover span { background: var(--ym-blue); }  /* ホバー: 濃緑線 */
.ym-header__hamburger small {
  font-family: var(--ym-font-sans);
  font-weight: 700;
  font-size: 11px; letter-spacing: 0.14em; color: #fff;  /* 通常: 白MENU */
  margin-top: 2px;
  transition: color .2s;
}
.ym-header__hamburger:hover small { color: var(--ym-blue); }  /* ホバー: 濃緑MENU */
.ym-header__hamburger.is-open span:nth-child(1) { transform: translateY(10px) rotate(45deg); }
.ym-header__hamburger.is-open span:nth-child(2) { opacity: 0; }
.ym-header__hamburger.is-open span:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }
/* ハンバーガーはデスクトップでも常時表示（旧 samidare UI 準拠：右上に MENU） */
.ym-header__hamburger { display: flex !important; }

/* ============================================================================
 * グロナビ帯（濃緑帯 + 白文字 / 2026-11-16 SEI 指示）
 * ========================================================================== */
.ym-globalnav {
  display: block !important;
  background: var(--ym-blue) !important;
  position: relative;
  z-index: 1;
  border-top: 2px solid var(--ym-accent);  /* 上辺にライム細線（2026-11-17 SEI 指示） */
  box-shadow:
    0 -3px 6px rgba(164, 204, 48, 0.45),  /* 上に黄緑の光 */
    0 2px 4px rgba(128, 128, 128, 0.5);   /* 下の既存グレーシャドー */
}
.ym-globalnav ul {
  max-width: var(--ym-maxw);
  margin: 0 auto; padding: 0;
  list-style: none;
  display: flex; justify-content: center; align-items: stretch;
  gap: 0;
}
.ym-globalnav li {
  flex: 0 0 auto;
  text-align: center;
  position: relative;
}
.ym-globalnav li + li::before {
  content: '';
  position: absolute; left: 0; top: 28%; bottom: 28%;
  width: 1px; background: rgba(255,255,255,0.22);
}
.ym-globalnav a {
  display: block;
  color: #fff !important;
  text-decoration: none !important;
  padding: 22px 22px 19px;
  min-width: 88px;
  font-family: var(--ym-font-sans);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.06em;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: background .18s, color .18s, border-color .18s;
}
/* ホバー：フッターと同じ #F5F8EE 背景 + 濃緑文字 */
.ym-globalnav a:hover {
  background: #F5F8EE;
  color: var(--ym-blue-ink) !important;
  text-decoration: none !important;
  border-bottom-color: var(--ym-accent);
}
/* 現在ページ：濃緑の濃い方 + 白文字 + 下にライム線で現在地を明示 */
.ym-globalnav a[aria-current="page"] {
  background: var(--ym-blue-ink);
  color: #fff !important;
  text-decoration: none !important;
  border-bottom-color: var(--ym-accent);
}
@media (max-width: 899px) {
  .ym-globalnav { display: none !important; }
}

/* ============================================================================
 * ドロワー（モバイル専用）
 * ========================================================================== */
.ym-drawer-modal {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(14, 60, 28, 0.45);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.ym-drawer-modal.is-open { opacity: 1; pointer-events: auto; }

/* ドロワー本体：フッターと同じ淡グリーン地・左にライムの縦ライン（2026-11-17 SEI 指示） */
.ym-drawer {
  position: fixed; top: 0; right: 0; height: 100vh; height: 100dvh;
  width: min(400px, 88vw);
  z-index: 85;
  background: #F5F8EE;
  color: var(--ym-ink);
  border-left: 4px solid var(--ym-accent);
  box-shadow: -12px 0 32px rgba(0, 0, 0, 0.18);
  padding: 0 0 32px;
  transform: translateX(100%);
  transition: transform .32s cubic-bezier(.22,.9,.3,1);
  overflow-y: auto;
  display: flex; flex-direction: column;
}
.ym-drawer.is-open { transform: translateX(0); }

.ym-drawer__head {
  position: sticky; top: 0; z-index: 1;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px 16px 24px;
  background: #F5F8EE;
  border-bottom: 2px solid var(--ym-blue);
}
.ym-drawer__title { margin: 0; display: flex; align-items: baseline; gap: 10px; }
.ym-drawer__title .en {
  font-family: var(--ym-font-en); font-weight: 700; font-size: 22px;
  letter-spacing: 0.24em; color: var(--ym-blue);
}
.ym-drawer__title .ja { font-size: 12px; color: var(--ym-mute); letter-spacing: 0.1em; }
.ym-drawer__close {
  width: 44px; height: 44px; border-radius: 50%;
  border: 2px solid var(--ym-blue);
  background: var(--ym-blue); color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0;
  transition: background .2s, color .2s, transform .2s;
}
.ym-drawer__close:hover { background: #fff; color: var(--ym-blue); transform: rotate(90deg); }

.ym-drawer__list { list-style: none; padding: 8px 0; margin: 0; }
.ym-drawer__list li { border-bottom: 1px solid rgba(31, 136, 59, 0.14); }
.ym-drawer__list a {
  position: relative;
  display: flex; flex-direction: column; gap: 2px;
  padding: 14px 48px 13px 28px;
  color: var(--ym-blue-ink) !important; text-decoration: none !important;
  transition: background .18s, padding-left .18s;
}
.ym-drawer__list a::after {
  content: '';
  position: absolute; right: 24px; top: 50%;
  width: 8px; height: 8px; margin-top: -4px;
  border-top: 2px solid var(--ym-accent-dark); border-right: 2px solid var(--ym-accent-dark);
  transform: rotate(45deg);
  transition: right .18s;
}
.ym-drawer__list .ja {
  font-family: var(--ym-font-head); font-weight: 700;
  font-size: 18px; letter-spacing: 0.06em; line-height: 1.4;
}
.ym-drawer__list .en {
  font-family: var(--ym-font-en); font-weight: 600;
  font-size: 10px; letter-spacing: 0.18em; color: var(--ym-accent-dark);
}
.ym-drawer__list a:hover { background: #fff; padding-left: 34px; }
.ym-drawer__list a:hover::after { right: 18px; }
.ym-drawer__list a[aria-current="page"] {
  background: #fff;
  box-shadow: inset 4px 0 0 var(--ym-blue);
}
.ym-drawer__list a[aria-current="page"] .ja { color: var(--ym-blue); }

.ym-drawer__contact { margin-top: auto; padding: 24px 24px 0; }
.ym-drawer__tel {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  background: var(--ym-blue); color: #fff !important;
  border-radius: 6px; text-decoration: none !important;
  box-shadow: 0 4px 12px rgba(31, 136, 59, 0.25);
  transition: background .2s;
}
.ym-drawer__tel:hover { background: var(--ym-blue-ink); }
.ym-drawer__tel span { display: flex; flex-direction: column; line-height: 1.25; }
.ym-drawer__tel small { font-size: 11px; letter-spacing: 0.08em; opacity: 0.9; }
.ym-drawer__tel strong { font-family: var(--ym-font-en); font-size: 24px; letter-spacing: 0.04em; }
.ym-drawer__address { margin: 14px 2px 10px; font-size: 13px; color: var(--ym-slate); line-height: 1.7; }
.ym-drawer__policies { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ym-drawer__policies a {
  display: inline-block; font-size: 12px; padding: 5px 10px;
  border: 1px solid var(--ym-line-strong); border-radius: 3px;
  color: var(--ym-slate) !important; text-decoration: none !important; background: #fff;
}
.ym-drawer__policies a:hover { border-color: var(--ym-blue); color: var(--ym-blue) !important; }

/* 開いた時に項目が上から順にふわっと入る */
.ym-drawer.is-open .ym-drawer__list li { animation: ymDrawerIn .4s cubic-bezier(.22,.8,.2,1) both; }
.ym-drawer.is-open .ym-drawer__list li:nth-child(1) { animation-delay: .05s; }
.ym-drawer.is-open .ym-drawer__list li:nth-child(2) { animation-delay: .09s; }
.ym-drawer.is-open .ym-drawer__list li:nth-child(3) { animation-delay: .13s; }
.ym-drawer.is-open .ym-drawer__list li:nth-child(4) { animation-delay: .17s; }
.ym-drawer.is-open .ym-drawer__list li:nth-child(5) { animation-delay: .21s; }
.ym-drawer.is-open .ym-drawer__list li:nth-child(6) { animation-delay: .25s; }
.ym-drawer.is-open .ym-drawer__list li:nth-child(7) { animation-delay: .29s; }
.ym-drawer.is-open .ym-drawer__list li:nth-child(8) { animation-delay: .33s; }
@keyframes ymDrawerIn { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .ym-drawer.is-open .ym-drawer__list li { animation: none; }
}

/* ============================================================================
 * ページヒーロー（下層ページ共通：画像背景 + 中央タイトル）
 * ========================================================================== */
.ym-page-hero {
  position: relative;
  width: 100%;
  height: 420px;
  overflow: hidden;
  background: var(--ym-blue);
}
@media (max-width: 720px) { .ym-page-hero { height: 280px; } }
.ym-page-hero__image {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
}
/* 明るい背景画像でもタイトルが読めるよう、画像全体を中央に向けて少し落とす */
.ym-page-hero__overlay {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, rgba(14, 60, 28, 0.38) 0%, rgba(14, 60, 28, 0.12) 60%, rgba(14, 60, 28, 0) 100%);
}
.ym-page-hero__title {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  padding: 0 16px;
}
/* タイトル背面の半透明プレート（濃緑・すりガラス）＋上下にライムの細線 */
.ym-page-hero__title h1 {
  color: #fff !important;
  font-family: var(--ym-font-head);
  font-weight: 700;
  font-size: clamp(24px, 3.4vw, 36px);
  letter-spacing: 0.14em;
  line-height: 1.4;
  margin: 0;
  padding: 0.7em 1.8em;
  background: rgba(22, 98, 48, 0.72);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  border-top: 2px solid var(--ym-accent);
  border-bottom: 2px solid var(--ym-accent);
  border-radius: 4px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.22);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}
@media (max-width: 720px) {
  .ym-page-hero__title h1 { padding: 0.6em 1.2em; letter-spacing: 0.08em; }
}

/* ============================================================================
 * TOP ヒーロー（施設外観 1枚）
 * ========================================================================== */
.ym-top { background: #fff; }
.ym-hero {
  position: relative;
  width: 100%; height: 72vh; min-height: 440px; max-height: 720px;
  overflow: hidden; background: #000;
  border-bottom: 5px solid var(--ym-gold);
}
.ym-hero__image {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  animation: ym-hero-zoom 18s ease-out forwards;
}

/* ===== スライドショー（fade + ken burns zoom、カクつき防止） =====
 * - 全スライドで常時ゆっくりズーム（alternate で往復）→ active切替時のtransformリセット無し
 * - opacity のみを 2 秒かけてクロスフェード
 * - will-change と translateZ(0) で GPU 合成に乗せる
 */
.ym-hero-slideshow { position: absolute; inset: 0; overflow: hidden; }
.ym-hero-slideshow__image {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0;
  transform: scale(1.02) translateZ(0);
  transition: opacity 2s ease-in-out;
  animation: ym-hero-slide-zoom 22s ease-in-out infinite alternate;
  will-change: opacity, transform;
}
.ym-hero-slideshow__image.is-active { opacity: 1; }
@keyframes ym-hero-slide-zoom {
  from { transform: scale(1.02) translateZ(0); }
  to   { transform: scale(1.12) translateZ(0); }
}
@media (prefers-reduced-motion: reduce) {
  .ym-hero-slideshow__image { animation: none; transition: opacity .3s; }
}
/* TOP ヒーロー：全体の紺グラデーションは無し。キャッチコピーのある左上だけうっすら暗く（2026-11-17 SEI 指示） */
.ym-hero__overlay {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 55% at 0% 0%, rgba(0, 0, 0, 0.38) 0%, rgba(0, 0, 0, 0.16) 55%, rgba(0, 0, 0, 0) 100%);
  pointer-events: none;
}
@media (max-width: 640px) {
  .ym-hero__overlay {
    background: radial-gradient(ellipse 95% 60% at 0% 0%, rgba(0, 0, 0, 0.38) 0%, rgba(0, 0, 0, 0.16) 55%, rgba(0, 0, 0, 0) 100%);
  }
}
.ym-hero__caption {
  position: absolute; left: 0; right: 0; bottom: 80px;
  text-align: center; color: #fff;
}
.ym-hero__caption h1 {
  font-family: var(--ym-font-head);
  color: #fff !important;
  font-size: clamp(33px, 5.2vw, 53px);
  letter-spacing: 0.12em;
  margin: 0 0 12px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.4);
}
.ym-hero__caption p {
  font-size: clamp(18px, 2.2vw, 21px);
  letter-spacing: 0.14em;
  opacity: 0.95;
  margin: 0;
}
@keyframes ym-hero-zoom { from { transform: scale(1.0); } to { transform: scale(1.08); } }

/* ===== TOP OPEN バッジ ===== */
.ym-top-badge {
  position: absolute;
  right: 48px; top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.92);
  color: var(--ym-blue);
  padding: 20px 32px;
  border-radius: 4px;
  text-align: center;
  box-shadow: 0 4px 18px rgba(0,0,0,0.2);
}
.ym-top-badge__name {
  font-family: var(--ym-font-head);
  font-size: 25px; letter-spacing: 0.14em;
  margin: 0 0 6px;
}
.ym-top-badge__line { font-size: 20px; letter-spacing: 0.1em; margin: 0; }
.ym-top-badge__open {
  font-family: var(--ym-font-head);
  font-size: 27px; letter-spacing: 0.14em;
  color: var(--ym-gold-dark);
  margin: 4px 0 0;
}
@media (max-width: 720px) {
  .ym-top-badge { right: 16px; left: 16px; top: auto; bottom: 24px; transform: none; padding: 14px 20px; }
  .ym-top-badge__name { font-size: 21px; }
  .ym-top-badge__line { font-size: 18px; }
  .ym-top-badge__open { font-size: 23px; }
}

/* ===== TOP コンセプト ===== */
.ym-concept__body {
  max-width: 720px;
  /* 見出しとの間に 2行分の余白を追加 */
  margin: 72px auto 0;
  text-align: center;
  font-size: 20px; line-height: 2.1;
  color: var(--ym-ink);
}
.ym-concept__body p { margin: 20px 0; }
.ym-concept__body p:first-child { margin-top: 0; }

/* ===== TOP お知らせ/イベントカード ===== */
.ym-top-cards {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px;
  /* 見出しとの間に 1行分 */
  margin-top: 56px;
}
@media (max-width: 720px) {
  .ym-top-cards { grid-template-columns: 1fr; gap: 28px; }
}
.ym-top-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none !important; color: var(--ym-ink);
  background: #fff;
  border: 1px solid var(--ym-line);
  border-radius: 14px;
  padding: 24px 0 28px;
  overflow: hidden;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.ym-top-card:hover { transform: translateY(-3px); border-color: var(--ym-gold); }
.ym-top-card * { text-decoration: none !important; }
/* 日付・タイトルを中央寄せに強制 */
.ym-top-card .ym-top-card__date,
.ym-top-card .ym-top-card__title {
  text-align: center !important;
}
.ym-top-card__image {
  width: 80%; max-width: 80%;
  aspect-ratio: 4 / 3;
  background-size: cover;
  background-position: center top; /* 天揃え */
  background-color: #eee;
  border: 1px solid var(--ym-line);
  margin: 0 auto 20px;
  box-shadow: 0 8px 24px rgba(11,46,94, 0.1);
  transition: box-shadow .2s;
}
.ym-top-card:hover .ym-top-card__image {
  box-shadow: 0 12px 32px rgba(11,46,94, 0.16);
}
/* 日付・タイトルは中央揃え */
.ym-top-card__date,
.ym-top-card__title {
  width: 80%;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.ym-top-card__date {
  color: var(--ym-gold-dark);
  font-size: 18px; letter-spacing: 0.08em;
  margin-top: 0; margin-bottom: 6px;
}
.ym-top-card__title { font-size: 20px; font-weight: 500; margin-top: 0; margin-bottom: 0; line-height: 1.6; }

/* 「お知らせ｜一覧」ボタン */
.ym-topnews__more {
  text-align: center;
  margin: 48px 0 0;
}
.ym-topnews__more a {
  display: inline-block;
  padding: 14px 42px;
  background: var(--ym-blue);
  color: #fff !important;
  text-decoration: none !important;
  font-size: 19px; letter-spacing: 0.14em;
  border: 1px solid var(--ym-blue);
  border-radius: 2px;
  transition: background .2s, color .2s;
}
.ym-topnews__more a:hover {
  background: var(--ym-gold);
  border-color: var(--ym-gold);
}

/* ============================================================================
 * TOP アンカーメニュー
 * ========================================================================== */
.ym-anchors {
  max-width: var(--ym-maxw);
  margin: 48px auto 0;
  padding: 0 20px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
.ym-anchors__item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 22px 10px;
  background: #fff;
  border: 1px solid var(--ym-line);
  border-radius: 10px;
  text-decoration: none;
  color: var(--ym-blue);
  font-family: var(--ym-font-head);
  font-size: 20px;
  letter-spacing: 0.08em;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.ym-anchors__item:hover {
  border-color: var(--ym-gold);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(11,46,94,0.08);
  color: var(--ym-gold-dark);
}
.ym-anchors__kicker {
  font-size: 16px; letter-spacing: 0.15em; color: var(--ym-gold); font-family: var(--ym-font-sans);
}
@media (max-width: 720px) {
  .ym-anchors { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .ym-anchors__item { padding: 16px 8px; font-size: 19px; }
}

/* ============================================================================
 * 共通セクション見出し（山形=屋根型装飾）
 * ========================================================================== */
.ym-section {
  max-width: var(--ym-maxw);
  margin: 72px auto 0;
  padding: 0 20px;
}
.ym-section--pb { padding-bottom: 72px; }
.ym-head {
  font-family: var(--ym-font-head);
  font-weight: 500;
  color: var(--ym-blue);
  text-align: center;
  font-size: clamp(25px, 3vw, 29px);
  letter-spacing: 0.14em;
  margin: 0 0 28px; /* 見出し下の空白（2026-11-17 SEI 指示でさらに詰め）*/
  position: relative;
  padding-top: 48px;
}
/* 山形（屋根）装飾：旧 samidare arrow_top.png を踏襲（20% 縮小） */
.ym-head::before {
  content: '';
  position: absolute;
  left: 50%; top: 0;
  width: 144px; height: 35px;
  transform: translateX(-50%);
  background: url('/yamagata-med/images/head-arrow.png') no-repeat center top / contain;
}

/* ============================================================================
 * 新着記事リスト
 * ========================================================================== */
.ym-news__list {
  list-style: none; padding: 0; margin: 0;
  border-top: 1px solid var(--ym-line);
}
.ym-news__row { border-bottom: 1px solid var(--ym-line); }
.ym-news__row-link {
  display: grid; grid-template-columns: 110px 90px 1fr; align-items: center;
  gap: 14px;
  padding: 18px 10px;
  text-decoration: none; color: var(--ym-ink);
  transition: background .15s;
}
.ym-news__row-link:hover { background: var(--ym-paper-alt); color: var(--ym-blue); }
.ym-news__row-date {
  color: var(--ym-gold-dark);
  font-size: 18px; letter-spacing: 0.08em;
}
.ym-news__row-cat {
  font-size: 16px; letter-spacing: 0.12em;
  padding: 3px 10px;
  border: 1px solid var(--ym-blue);
  color: var(--ym-blue);
  text-align: center;
  border-radius: 3px;
}
.ym-news__row-title { font-size: 20px; font-weight: 500; }
@media (max-width: 640px) {
  .ym-news__row-link { grid-template-columns: 1fr; gap: 4px; padding: 14px 6px; }
  .ym-news__row-cat { justify-self: start; }
}
.ym-news__more { text-align: center; margin-top: 28px; }
.ym-news__more a {
  display: inline-block; padding: 10px 36px;
  background: var(--ym-blue); color: #fff;
  text-decoration: none;
  font-size: 19px; letter-spacing: 0.1em;
  border-radius: 2px;
  transition: background .2s;
}
.ym-news__more a:hover { background: var(--ym-gold); color: #fff; }

/* ============================================================================
 * 寺そば・寺カフェ カード（TOP）
 * ========================================================================== */
.ym-food-highlight {
  max-width: var(--ym-maxw);
  margin: 72px auto 0;
  padding: 0 20px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
}
.ym-food-highlight__card {
  position: relative; display: block;
  border-radius: 10px; overflow: hidden;
  text-decoration: none;
  color: #fff; background: #000;
  min-height: 220px;
}
.ym-food-highlight__card img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.ym-food-highlight__card:hover img { transform: scale(1.05); }
.ym-food-highlight__caption {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: linear-gradient(180deg, rgba(11,46,94,0) 20%, rgba(11,46,94,0.6) 100%);
  color: #fff;
  padding: 20px;
}
.ym-food-highlight__caption h3 {
  color: #fff !important;
  font-size: clamp(25px, 3.2vw, 31px);
  letter-spacing: 0.1em;
  margin: 0 0 6px;
  text-shadow: 0 1px 10px rgba(0,0,0,0.5);
}
.ym-food-highlight__caption p { font-size: 18px; letter-spacing: 0.12em; margin: 0; opacity: 0.95; }
@media (max-width: 720px) { .ym-food-highlight { grid-template-columns: 1fr; } }

/* ============================================================================
 * 外部バナー（全ページ共通・フッター直前）
 * ========================================================================== */
.ym-banners-section {
  background: #fff;
  padding: 48px 20px;
  border-top: 1px solid var(--ym-line);
}
.ym-banners {
  max-width: calc(var(--ym-maxw) * 0.6); margin: 0 auto;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
}
.ym-banners a {
  display: block; background: #fff; padding: 10px;
  border: 1px solid var(--ym-line); border-radius: 6px;
  transition: border-color .2s, transform .2s;
}
.ym-banners a:hover { border-color: var(--ym-gold); transform: translateY(-2px); }
.ym-banners img { width: 100%; height: auto; display: block; }
@media (max-width: 720px) {
  .ym-banners { grid-template-columns: 1fr; max-width: 60%; }
}

/* ============================================================================
 * Main (下層ページ共通コンテナ)
 * ========================================================================== */
/* 2026-11-18 杉原様要望2nd：ヘッダー/フッター以外をさらに +2px */
.ym-main { min-height: calc(100vh - 400px); background: #fff; font-size: 19px; }
.ym-main .l-main,
.ym-main > div > div:not(.ym-page-hero):not(.ym-globalnav):not(.ym-header):not(.ym-footer) {
  /* tenant_pages で入っている旧samidareの l-* / p-* は旧CSSに依存 */
}
.ym-main img { max-width: 100%; height: auto; }
.ym-main h2:not(.ym-head) { font-family: var(--ym-font-head); color: var(--ym-blue); font-size: 28px; margin: 32px 0 12px; letter-spacing: 0.1em; }
.ym-main h3 { font-family: var(--ym-font-head); color: var(--ym-blue); font-size: 24px; margin: 24px 0 10px; letter-spacing: 0.08em; }
.ym-main p  { line-height: 1.95; margin: 10px 0; font-size: 19px; }
.ym-main li { line-height: 1.95; font-size: 19px; }
.ym-main a { color: var(--ym-blue); text-decoration: underline; text-underline-offset: 2px; }
.ym-main a:hover { color: var(--ym-gold); }

/* 下層ページ本文の中央寄せ（tenant_pages 用） */
.ym-page-body {
  max-width: var(--ym-maxw);
  margin: 0 auto;
  padding: 56px 20px 72px;
}

/* 下層ページ本文のコンテンツ幅を20%拡張（Tailwind max-w-* を Jionji 用に上書き） */
[data-ymu-root] .max-w-3xl { max-width: 54rem !important; }  /* 48→54rem (+12.5%) */
[data-ymu-root] .max-w-4xl { max-width: 65rem !important; }  /* 56→65rem (+16%) */
[data-ymu-root] .max-w-5xl { max-width: 76rem !important; }  /* 64→76rem (+18.75%) */
[data-ymu-root] .max-w-6xl { max-width: 86rem !important; }  /* 72→86rem (+19%) */

/* 旧samidareの .c-section__title / .c-section__title--arrow を
 * Jionji の屋根アイコン装飾見出し (.ym-head 相当) にする */
[data-ymu-root] .c-section__title,
[data-ymu-root] .c-section__title--arrow {
  font-family: var(--ym-font-head);
  font-weight: 500;
  color: var(--ym-blue);
  text-align: center;
  font-size: clamp(25px, 3vw, 29px);
  letter-spacing: 0.14em;
  margin: 48px 0 56px;
  position: relative;
  padding-top: 48px;
  display: block;
}
[data-ymu-root] .c-section__title::before,
[data-ymu-root] .c-section__title--arrow::before {
  content: '';
  position: absolute;
  left: 50%; top: 0;
  width: 144px; height: 35px;
  transform: translateX(-50%);
  background: url('/yamagata-med/images/head-arrow.png') no-repeat center top / contain;
}

/* /grounds の「マップを拡大」ボタン */
[data-ymu-root] .ym-map-btn {
  display: inline-block;
  padding: 12px 36px;
  background: var(--ym-blue);
  color: #fff !important;
  text-decoration: none !important;
  font-size: 19px; letter-spacing: 0.14em;
  border: 1px solid var(--ym-blue);
  border-radius: 2px;
  transition: background .2s, border-color .2s;
}
[data-ymu-root] .ym-map-btn:hover {
  background: var(--ym-gold);
  border-color: var(--ym-gold);
}

/* /information のミステリー画像4枚を横一列に */
[data-ymu-root] .p-mystery {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 24px 0;
}
[data-ymu-root] .p-mystery__img {
  width: 100%; height: auto; display: block;
  border-radius: 6px;
}
@media (max-width: 900px) {
  [data-ymu-root] .p-mystery { grid-template-columns: repeat(2, 1fr); }
}

/* ===== /blog カテゴリタブ + ページネーション ===== */
.ym-blog-tabs {
  display: flex; justify-content: center; gap: 10px;
  margin: 0 auto 40px;
  flex-wrap: wrap;
}
.ym-blog-tabs a {
  display: inline-block; padding: 10px 24px;
  text-decoration: none !important;
  color: var(--ym-blue);
  border: 1px solid var(--ym-line);
  border-radius: 999px;
  font-size: 19px; letter-spacing: 0.08em;
  transition: background .2s, color .2s, border-color .2s;
}
.ym-blog-tabs a:hover { border-color: var(--ym-gold); color: var(--ym-gold); }
.ym-blog-tabs a.is-active {
  background: var(--ym-blue); color: #fff !important; border-color: var(--ym-blue);
}
.ym-blog-pager {
  display: flex; justify-content: center; align-items: center;
  gap: 24px; margin-top: 56px;
  font-size: 19px; color: var(--ym-mute);
}
.ym-blog-pager a {
  color: var(--ym-blue); text-decoration: none !important;
  padding-bottom: 2px; border-bottom: 1px solid var(--ym-blue);
}
.ym-blog-pager a:hover { color: var(--ym-gold); border-color: var(--ym-gold); }

/* ===== 記事詳細 ===== */
.ym-article {
  max-width: 820px;
  margin: 0 auto;
  padding: 48px 20px 72px;
}
.ym-article__meta {
  display: flex; align-items: center; gap: 12px;
  color: var(--ym-mute); font-size: 18px; letter-spacing: 0.06em;
  margin: 0 0 24px;
}
.ym-article__cat {
  padding: 3px 10px;
  border: 1px solid var(--ym-blue);
  color: var(--ym-blue);
  font-size: 16px; letter-spacing: 0.1em;
  border-radius: 3px;
}
.ym-article__body { line-height: 1.9; font-size: 20px; }
.ym-article__body h2 { font-family: var(--ym-font-head); color: var(--ym-blue); margin: 32px 0 12px; }
.ym-article__body h3 { font-family: var(--ym-font-head); color: var(--ym-blue); margin: 24px 0 10px; }
.ym-article__body p { margin: 12px 0; }
.ym-article__body a { color: var(--ym-blue); text-decoration: underline; }
.ym-article__body a:hover { color: var(--ym-gold); }
.ym-article__body img { max-width: 100%; height: auto; display: block; margin: 16px auto; }
.ym-article__back {
  margin-top: 48px; text-align: center;
}
.ym-article__back a {
  display: inline-block; padding: 10px 32px;
  background: var(--ym-blue); color: #fff;
  text-decoration: none; font-size: 19px; letter-spacing: 0.1em;
  border-radius: 2px;
  transition: background .2s;
}
.ym-article__back a:hover { background: var(--ym-gold); color: #fff; }

/* ============================================================================
 * /contact 慈恩寺テラス専用
 * ========================================================================== */
.ym-contact {
  max-width: 820px;
  margin: 0 auto;
  padding: 56px 20px 72px;
}
.ym-contact .ym-head { margin-bottom: 24px; }
.ym-contact__lead {
  text-align: center;
  font-size: 20px;
  line-height: 2;
  color: var(--ym-ink);
  margin: 0 0 32px;
}
.ym-contact__info {
  background: var(--ym-paper-alt);
  border: 1px solid var(--ym-line);
  border-left: 3px solid var(--ym-gold);
  border-radius: 4px;
  padding: 24px 28px;
  margin: 0 0 40px;
}
.ym-contact__info dl { margin: 0; }
.ym-contact__info dl > div {
  display: grid; grid-template-columns: 110px 1fr;
  gap: 8px; padding: 10px 0;
  border-bottom: 1px solid var(--ym-line);
}
.ym-contact__info dl > div:last-child { border-bottom: none; }
.ym-contact__info dt {
  font-family: var(--ym-font-head);
  color: var(--ym-blue);
  font-size: 18px; letter-spacing: 0.1em;
  padding-top: 2px;
}
.ym-contact__info dd { margin: 0; font-size: 19px; color: var(--ym-ink); }
.ym-contact__info a { color: var(--ym-blue); text-decoration: underline; }
.ym-contact__info a:hover { color: var(--ym-gold); }

.ym-contact__form {
  background: #f3f3f3;
  border: 1px solid var(--ym-line);
  border-radius: 8px;
  padding: 40px 36px;
}
@media (max-width: 640px) {
  .ym-contact__form { padding: 24px 18px; }
}
.ym-contact__ssl {
  text-align: center;
  font-size: 17px; color: var(--ym-mute);
  margin: 20px 0 0;
  letter-spacing: 0.04em;
}
@media (max-width: 640px) {
  .ym-contact { padding: 40px 16px 56px; }
  .ym-contact__info { padding: 18px 18px; }
  .ym-contact__info dl > div { grid-template-columns: 86px 1fr; }
  .ym-contact__form { padding: 24px 18px; }
}

/* ============================================================================
 * Footer（旧 samidare 準拠：淡灰背景・左に施設情報・右に SNS/TOP）
 * ========================================================================== */
.ym-footer {
  position: relative;
  background: #F5F8EE;  /* 超ライトグレー + わずかに黄緑（SEI 指示 2026-11-17） */
  color: var(--ym-ink);
  margin-top: 0;
  padding: 48px 20px 48px;
  border-top: 1px solid var(--ym-line);
}
.ym-footer__inner {
  max-width: var(--ym-maxw); margin: 0 auto;
  display: grid; grid-template-columns: 1fr auto; gap: 24px;
  align-items: start;
}
@media (max-width: 720px) {
  .ym-footer__inner { grid-template-columns: 1fr; }
}

.ym-footer__title { margin: 0 0 20px; }
.ym-footer__title .name {
  display: block;
  font-family: var(--ym-font-head);
  font-size: 25px;
  letter-spacing: 0.1em;
  color: var(--ym-ink);
}
.ym-footer__title .sub {
  display: block;
  font-family: var(--ym-font-head);
  font-size: 21px;
  letter-spacing: 0.06em;
  color: var(--ym-ink);
  margin-top: 4px;
}
.ym-footer__address {
  margin: 10px 0;
  font-size: 18px;
  color: var(--ym-ink);
  line-height: 1.9;
}
.ym-footer__contact {
  margin: 10px 0;
  font-size: 18px;
  color: var(--ym-ink);
}
.ym-footer__contact a {
  color: var(--ym-ink); text-decoration: none;
}
.ym-footer__contact a:hover { color: var(--ym-blue); text-decoration: underline; }
.ym-footer__copy {
  margin: 32px 0 0;
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--ym-mute);
}

.ym-footer__side {
  display: flex; flex-direction: column;
  align-items: flex-end; justify-content: space-between;
  gap: 32px;
  min-height: 180px;
}
@media (max-width: 720px) {
  .ym-footer__side { align-items: flex-start; margin-top: 16px; min-height: 0; }
}

.ym-footer__sns {
  list-style: none; padding: 0; margin: 0;
  display: flex; gap: 14px;
}
.ym-footer__sns a {
  color: var(--ym-blue);
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px;
  background: #fff;
  border: 1.5px solid var(--ym-blue);
  border-radius: 50%;
  transition: background .2s, color .2s;
}
.ym-footer__sns a:hover { background: var(--ym-blue); color: #fff; }

.ym-footer__totop {
  display: inline-flex; flex-direction: column; align-items: center;
  color: var(--ym-blue); text-decoration: none;
  gap: 6px;
  transition: opacity .2s, color .2s;
  font-size: 16px; letter-spacing: 0.1em;
}
.ym-footer__totop img {
  display: block; width: 110px; height: auto;
}
.ym-footer__totop:hover { color: var(--ym-gold); opacity: 0.8; }

/* ===== 館内マップ クリックエリア（overlay 方式） ===== */
.ym-guidemap { position: relative; max-width: 1000px; margin: 0 auto; }
.ym-guidemap > img { display: block; width: 100%; height: auto; }
.ym-guidemap > a {
  display: block;
  background-color: rgba(195, 146, 92, 0);
  border: 2px solid rgba(195, 146, 92, 0);
  border-radius: 8px;
  transition: background-color .2s ease, border-color .2s ease;
  cursor: pointer;
}
.ym-guidemap > a:hover,
.ym-guidemap > a:focus-visible {
  background-color: rgba(195, 146, 92, 0.25);
  border-color: var(--ym-gold, #5ba3d9);
  outline: none;
}

/* ============================================================================
 * saiseikai 風追加スタイル（2026-11-16）
 * ========================================================================== */

/* 見出しの屋根装飾は無効化（済生会UIにあわせてフラット化） */
[data-template="custom-yamagata-med"] .ym-head { padding-top: 0; }
[data-template="custom-yamagata-med"] .ym-head::before { display: none; }

/* 英字小見出し（PICKUP / NEWS / ABOUT） */
.ym-section__kicker {
  font-family: var(--ym-font-en);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.3em;
  color: var(--ym-accent);
  text-align: center;
  margin: 0 0 10px;
  text-transform: uppercase;
}

/* ヒーロー上のキャッチコピー（左上寄せ + フェードインアニメ） */
.ym-hero__copy {
  position: absolute;
  inset: 0;
  display: flex; flex-direction: column;
  justify-content: flex-start; align-items: flex-start;
  color: #fff;
  text-shadow: 0 2px 14px rgba(0,0,0,0.45);
  pointer-events: none;
  z-index: 3;
  padding: clamp(48px, 7vw, 100px) clamp(24px, 5vw, 80px);
  text-align: left;
}
/* 注: .ym-main p { font-size: 19px } が特異性で勝ってしまうため、
 * .ym-main スコープ込みで特異性を上げて確実に clamp を効かせる */
.ym-main .ym-hero__copy-lead,
.ym-hero__copy-lead {
  position: relative;
  /* 2026-11-18 SEI 指示（4回目）：PC 48px 固定、モバイルは 25px まで縮小可 */
  font-family: 'Noto Sans JP', var(--ym-font-head);
  font-weight: 900;
  font-size: clamp(25px, 4vw, 48px);
  letter-spacing: 0.1em;
  margin: 0;
  padding-left: clamp(14px, 1.2vw, 22px);
  border-left: 4px solid var(--ym-accent);
  line-height: 1.35;

  opacity: 0;
  transform: translateX(-14px) translateY(10px);
  animation: ymHeroInLead 1.2s cubic-bezier(.22,.8,.2,1) 0.35s forwards;
}
.ym-hero__copy-sub {
  margin-top: 18px;
  font-size: clamp(18px, 2vw, 21px);
  letter-spacing: 0.2em;
  padding-left: clamp(14px, 1.2vw, 22px);

  opacity: 0;
  transform: translateY(14px);
  animation: ymHeroInSub 1.1s cubic-bezier(.22,.8,.2,1) 0.85s forwards;
}
@keyframes ymHeroInLead {
  to { opacity: 1; transform: translateX(0) translateY(0); }
}
@keyframes ymHeroInSub {
  to { opacity: 0.95; transform: translateY(0); }
}
/* reduced-motion を好むユーザーには即表示 */
@media (prefers-reduced-motion: reduce) {
  .ym-hero__copy-lead,
  .ym-hero__copy-sub { animation: none; opacity: 1; transform: none; }
}
@media (max-width: 640px) {
  .ym-hero__copy { padding: 32px 20px; }
  .ym-hero__copy-sub { letter-spacing: 0.14em; margin-top: 12px; }
}

/* ============================================================================
 * NEWS タブ切替 + リスト型
 * ========================================================================== */
.ym-newslist {
  max-width: var(--ym-maxw);
  margin: 0 auto;
}
.ym-newslist__tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--ym-line-strong);
  margin-bottom: 0;
}
.ym-newslist__tab {
  background: transparent;
  border: 0;
  padding: 16px 28px;
  font-family: var(--ym-font-sans);
  font-size: 20px;
  font-weight: 700;
  color: var(--ym-mute);
  cursor: pointer;
  position: relative;
  letter-spacing: 0.04em;
  transition: color .2s;
}
.ym-newslist__tab:hover { color: var(--ym-blue); }
.ym-newslist__tab.is-active { color: var(--ym-blue); }
.ym-newslist__tab.is-active::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: -2px;
  height: 3px; background: var(--ym-accent);
}
.ym-newslist__items {
  list-style: none; padding: 0; margin: 0;
}
.ym-newslist__item { border-bottom: 1px solid var(--ym-line); }
.ym-newslist__link {
  display: grid;
  grid-template-columns: auto auto 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 14px;
  row-gap: 8px;
  padding: 18px 10px;
  text-decoration: none;
  color: var(--ym-ink);
  transition: background .15s, color .15s;
}
.ym-newslist__date  { grid-row: 1; grid-column: 1; }
.ym-newslist__tag   { grid-row: 1; grid-column: 2; justify-self: start; }
.ym-newslist__title { grid-row: 2; grid-column: 1 / -1; }
.ym-newslist__link:hover {
  background: var(--ym-paper-alt);
  color: var(--ym-blue);
}
.ym-newslist__date {
  font-family: var(--ym-font-en);
  font-size: 19px;
  color: var(--ym-slate);
  letter-spacing: 0.04em;
  font-weight: 600;
}
.ym-newslist__tag {
  display: inline-block;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  text-align: center;
  border: 1px solid var(--ym-blue);
  color: var(--ym-blue);
  border-radius: 2px;
  white-space: nowrap;
}
.ym-newslist__tag[data-variant="public"] {
  border-color: var(--ym-link);
  color: var(--ym-link-dark);
}
.ym-newslist__tag[data-variant="training"] {
  border-color: var(--ym-accent);
  color: var(--ym-accent-dark);
}
.ym-newslist__title {
  font-size: 20px;
  font-weight: 500;
  line-height: 1.6;
}
.ym-newslist__empty {
  padding: 48px 12px;
  text-align: center;
  color: var(--ym-mute);
  font-size: 19px;
  border-bottom: 1px solid var(--ym-line);
}
.ym-newslist__more {
  margin: 24px 0 0;
  text-align: right;
}
.ym-newslist__more a {
  color: var(--ym-blue);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
}
.ym-newslist__more a:hover { color: var(--ym-accent); }
@media (max-width: 640px) {
  .ym-newslist__link {
    grid-template-columns: 90px 1fr;
    grid-template-rows: auto auto;
    gap: 6px 10px;
  }
  .ym-newslist__date { grid-column: 1; }
  .ym-newslist__tag { grid-column: 2; justify-self: start; }
  .ym-newslist__title { grid-column: 1 / -1; }
  .ym-newslist__tab { padding: 14px 18px; font-size: 19px; }
}

/* ============================================================================
 * ヘッダー右側：電話ボタン + ハンバーガー（saiseikai 風）
 * ========================================================================== */
.ym-header__right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.ym-header__tel {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  text-decoration: none !important;
  color: var(--ym-blue) !important;
  padding: 8px 16px;
  border: 1px solid var(--ym-blue);
  border-radius: 3px;
  line-height: 1.15;
  transition: background .2s, color .2s;
}
.ym-header__tel:hover { background: var(--ym-blue); color: #fff !important; }
.ym-header__tel-icon {
  width: 37px; height: 37px;  /* さらに +20%: 31 → 37 */
  flex-shrink: 0;
  display: block;
}
.ym-header__tel-body {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.ym-header__tel-label {
  font-size: 14px;
  letter-spacing: 0.06em;
  font-weight: 500;
}
.ym-header__tel-num {
  font-family: var(--ym-font-en);
  font-weight: 700;
  font-size: 23px;
  letter-spacing: 0.02em;
  margin-top: 2px;
}
@media (max-width: 899px) {
  .ym-header__tel { display: none; }
  .ym-header__right { gap: 0; }
}

/* ============================================================================
 * 目的別ご案内（2大入口カード）
 * 患者さん向け(ティール枠) / 医療関係者向け(濃緑枠) の 2枚カード
 * ========================================================================== */
.ym-gateway { max-width: var(--ym-maxw); margin: 72px auto 0; padding: 0 20px; }
.ym-gateway-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
.ym-gateway-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 36px 24px 44px;
  text-align: center;
  text-decoration: none !important;
  color: var(--ym-ink) !important;
  background: #fff;
  border: 2px solid transparent;
  border-radius: 6px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(31,136,59,0.08);
}
.ym-gateway-card[data-variant="public"]   { border-color: var(--ym-link); }
.ym-gateway-card[data-variant="provider"] { border-color: var(--ym-blue); }
.ym-gateway-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(31,136,59,0.18);
  background: var(--ym-paper-alt);
}
.ym-gateway-card__icon {
  width: 112px; height: 112px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.ym-gateway-card__icon img { width: 100%; height: 100%; object-fit: contain; }
.ym-gateway-card__label {
  font-family: var(--ym-font-head);
  font-weight: 700;
  font-size: clamp(23px, 2.4vw, 27px);
  letter-spacing: 0.06em;
  color: var(--ym-blue);
  margin: 0;
}
.ym-gateway-card[data-variant="public"] .ym-gateway-card__label {
  color: var(--ym-link-dark);
}
.ym-gateway-card__sub {
  margin-top: 10px;
  font-size: 18px;
  color: var(--ym-mute);
  letter-spacing: 0.04em;
}
@media (max-width: 640px) {
  .ym-gateway-cards { grid-template-columns: 1fr; gap: 20px; }
  .ym-gateway-card { padding: 28px 20px 36px; }
  .ym-gateway-card__icon { width: 88px; height: 88px; margin-bottom: 14px; }
}

/* ============================================================================
 * NEWS タブ内アイコン（補助）
 * ========================================================================== */
.ym-newslist__tab { display: inline-flex; align-items: center; gap: 8px; }
.ym-newslist__tab-icon {
  width: 22px; height: 22px;
  object-fit: contain;
  opacity: 0.8;
  transition: opacity .2s;
}
.ym-newslist__tab.is-active .ym-newslist__tab-icon { opacity: 1; }
@media (max-width: 640px) {
  .ym-newslist__tab-icon { width: 18px; height: 18px; }
}

/* ============================================================================
 * 文字サイズ変更 UI（ヘッダー右上） 2026-11-16 SEI 指示
 * ========================================================================== */
.ym-fontsize {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ym-fontsize__label {
  font-size: 11px;
  color: var(--ym-mute);
  letter-spacing: 0.04em;
  font-weight: 500;
}
.ym-fontsize__group {
  display: inline-flex;
  gap: 2px;
}
.ym-fontsize__btn {
  background: #fff;
  border: 1px solid var(--ym-line-strong);
  padding: 3px 9px;
  min-width: 28px;
  color: var(--ym-ink);
  cursor: pointer;
  line-height: 1.2;
  transition: background .18s, color .18s, border-color .18s;
  font-family: var(--ym-font-sans);
  font-weight: 700;
}
.ym-fontsize__btn[data-size="s"] { font-size: 11px; border-radius: 3px 0 0 3px; }
.ym-fontsize__btn[data-size="m"] { font-size: 13px; }
.ym-fontsize__btn[data-size="l"] { font-size: 15px; border-radius: 0 3px 3px 0; }
.ym-fontsize__btn:hover { color: var(--ym-blue); border-color: var(--ym-blue); }
.ym-fontsize__btn.is-active {
  background: var(--ym-blue);
  color: #fff;
  border-color: var(--ym-blue);
}
@media (max-width: 899px) { .ym-fontsize { display: none; } }

/* ============================================================================
 * 文字サイズ切替：ルート html の data-ym-font-size を見て本文/見出しの基準を変更
 * デフォルト (m) は何もしない。s=0.9倍、l=1.14倍 にスケール。
 * ========================================================================== */
html[data-ym-font-size="s"] [data-ymu-root]               { font-size: 19px; }
html[data-ym-font-size="s"] [data-ymu-root] p,
html[data-ym-font-size="s"] [data-ymu-root] li,
html[data-ym-font-size="s"] [data-ymu-root] td           { font-size: 0.93em; }
html[data-ym-font-size="s"] [data-ymu-root] .ym-head     { font-size: clamp(23px, 2.7vw, 27px); }

html[data-ym-font-size="l"] [data-ymu-root]               { font-size: 23px; }
html[data-ym-font-size="l"] [data-ymu-root] p,
html[data-ym-font-size="l"] [data-ymu-root] li,
html[data-ym-font-size="l"] [data-ymu-root] td           { font-size: 1.1em; }
html[data-ym-font-size="l"] [data-ymu-root] .ym-head     { font-size: clamp(29px, 3.6vw, 35px); }
html[data-ym-font-size="l"] [data-ymu-root] .ym-newslist__title { font-size: 22px; }
html[data-ym-font-size="l"] [data-ymu-root] .ym-gateway-card__label { font-size: clamp(25px, 2.8vw, 30px); }

/* ============================================================================
 * フッター：プライバシーポリシー / 情報セキュリティ基本方針（2026-11-16 SEI 指示）
 * ========================================================================== */
.ym-footer__policies {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}
.ym-footer__policies li { line-height: 1.4; }
.ym-footer__policies a {
  display: inline-block;
  color: var(--ym-ink);
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.04em;
  padding: 7px 14px;
  border: 1px solid var(--ym-line-strong);
  border-radius: 3px;
  background: transparent;
  transition: color .2s, border-color .2s, background .2s;
}
.ym-footer__policies a:hover {
  color: var(--ym-blue);
  border-color: var(--ym-blue);
  background: #fff;
}
.ym-footer__policies a::before {
  content: '▸ ';
  color: var(--ym-accent);
  font-weight: 700;
  margin-right: 2px;
}

/* ============================================================================
 * ヘッダータイトル3行の入場アニメーション（2026-11-16 SEI 指示）
 * staggerで上から順にフェードイン＋わずかに上昇
 * ========================================================================== */
.ym-header__logo-main,
.ym-header__logo-sub,
.ym-header__logo-en {
  opacity: 0;
  transform: translateY(10px);
  animation: ymLogoIn 0.9s cubic-bezier(.22,.8,.2,1) forwards;
  will-change: opacity, transform;
}
.ym-header__logo-main { animation-delay: 0.15s; }
.ym-header__logo-sub  { animation-delay: 0.38s; }
.ym-header__logo-en   {
  animation: ymLogoInEn 1.1s cubic-bezier(.22,.8,.2,1) 0.62s forwards;
  letter-spacing: 0.02em;
}

@keyframes ymLogoIn {
  to { opacity: 1; transform: translateY(0); }
}
/* 英字は letter-spacing も開きながら登場（Gantari ならでは） */
@keyframes ymLogoInEn {
  to { opacity: 1; transform: translateY(0); letter-spacing: 0.1em; }
}

/* ホバーで微妙に上に浮く（存在感の強調） */
.ym-header__brand:hover .ym-header__logo-sub { color: var(--ym-blue-ink); }

@media (prefers-reduced-motion: reduce) {
  .ym-header__logo-main,
  .ym-header__logo-sub,
  .ym-header__logo-en {
    animation: none;
    opacity: 1;
    transform: none;
    letter-spacing: 0.06em;
  }
}

/* ============================================================================
 * フッター メールアドレスは画像化（ボット対策） 2026-11-16 SEI 指示
 *   2026-11-18 テキスト化を試みるも SEI 判断で画像版に差し戻し
 * ========================================================================== */
.ym-footer__mail {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 20px;
  vertical-align: middle;
}
.ym-footer__mail-link {
  display: inline-flex;
  align-items: center;
  transition: opacity .2s;
}
.ym-footer__mail-link:hover { opacity: 0.7; }
.ym-footer__mail-link img {
  height: 22px;
  width: auto;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none; /* 右クリック→名前を付けて保存 対策 */
}
@media (max-width: 720px) {
  .ym-footer__contact {
    display: flex; flex-direction: column; align-items: flex-start;
    gap: 10px;
  }
  .ym-footer__mail { margin-left: 0; }
  .ym-footer__mail-link img { height: 20px; }
}

/* ============================================================================
 * ヒーロースライドショー インジケーター（左下）2026-11-16 SEI 指示
 * ● ◯ ◯ の円ドット・クリックで該当スライドに切替
 * ========================================================================== */
.ym-hero-indicators {
  position: absolute;
  left: clamp(20px, 5vw, 60px);
  bottom: clamp(22px, 4vw, 44px);
  z-index: 4;
  display: flex;
  gap: 12px;
  padding: 0;
  margin: 0;
}
.ym-hero-indicator {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: transparent;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.35);
  transition: background .2s, transform .2s, border-color .2s;
}
.ym-hero-indicator:hover {
  background: rgba(255,255,255,0.55);
  transform: scale(1.08);
}
.ym-hero-indicator.is-active {
  background: #fff;
}
.ym-hero-indicator:focus-visible {
  outline: 2px solid var(--ym-accent);
  outline-offset: 3px;
}
@media (max-width: 640px) {
  .ym-hero-indicator { width: 11px; height: 11px; }
  .ym-hero-indicators { gap: 10px; }
}

/* ============================================================================
 * お知らせリンクの下線を強制的に無効化（2026-11-17 SEI 指示）
 * ========================================================================== */
.ym-newslist__link,
.ym-newslist__link *,
.ym-newslist__link:hover,
.ym-newslist__link:hover *,
.ym-newslist__date,
.ym-newslist__title {
  text-decoration: none !important;
}

/* ============================================================================
 * スクロール時のスルッと入場アニメーション（2026-11-17 SEI 指示）
 * デフォルト=表示。ScrollReveal が hydrate 後、ビューポート下方の要素だけ
 * .is-hidden を付けて opacity 0 に落とし、交差したら .is-in-view で復帰。
 * SSR時点やJS無効/hydrate遅延時は常に表示されたままで、
 * 「スクロール中に真っ白」を根本的に防ぐ。
 * ========================================================================== */
.ym-head,
.ym-section__kicker,
.ym-concept__body,
.ym-gateway-cards,
.ym-newslist {
  transition: opacity .7s cubic-bezier(.22,.8,.2,1), transform .7s cubic-bezier(.22,.8,.2,1);
}
.ym-head.is-hidden,
.ym-section__kicker.is-hidden {
  opacity: 0;
  transform: translateY(18px);
  will-change: opacity, transform;
}
.ym-concept__body.is-hidden,
.ym-gateway-cards.is-hidden,
.ym-newslist.is-hidden {
  opacity: 0;
  transform: translateY(14px);
  will-change: opacity, transform;
}
.ym-head.is-in-view,
.ym-section__kicker.is-in-view,
.ym-concept__body.is-in-view,
.ym-gateway-cards.is-in-view,
.ym-newslist.is-in-view {
  opacity: 1;
  transform: translateY(0);
}

/* reduced-motion を好むユーザーは即表示（ScrollReveal 側でも対応済み・保険） */
@media (prefers-reduced-motion: reduce) {
  .ym-head,
  .ym-section__kicker,
  .ym-concept__body,
  .ym-gateway-cards,
  .ym-newslist {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ============================================================================
 * スマホ版のヒーロー画像：ズームを左右パンに（2026-11-17 SEI 指示）
 * 画像をわずかに拡大した状態でゆっくり左右に動かす
 * ========================================================================== */
@keyframes ym-hero-pan-lr {
  0%   { transform: translateX(0%)  scale(1.18); }
  100% { transform: translateX(-6%) scale(1.18); }
}
@media (max-width: 640px) {
  .ym-hero-slideshow__image {
    animation: ym-hero-pan-lr 14s ease-in-out infinite alternate;
  }
}
@media (max-width: 640px) and (prefers-reduced-motion: reduce) {
  .ym-hero-slideshow__image { animation: none; transform: none; }
}

/* ============================================================================
 * スマホ版フッター改行指示（2026-11-17 SEI 指示）
 * 山形大学医学部附属病院 / 難病診療連携センター / 〒郵便 / 住所 / TEL
 * ========================================================================== */
/* デスクトップ: 住所 zip と street はスペース区切りで1行 */
.ym-footer__address .zip { margin-right: 0.6em; }
.ym-footer__address .street { }

/* スマホ: 全部1行ずつに分ける */
@media (max-width: 720px) {
  .ym-footer__address .zip,
  .ym-footer__address .street {
    display: block;
    margin-right: 0;
  }
}

/* ============================================================================
 * /blog 一覧の記事カード調整（2026-11-17 SEI 指示）
 * - サムネ高さを 30% 高く（16:9 → 20:13 相当）
 * - 天合わせ（既に object-top 指定済 / 保険で強制）
 * ========================================================================== */
[data-template="custom-yamagata-med"] .ym-main .aspect-video {
  aspect-ratio: 20 / 13;  /* 16:9 = 56.25% × 1.3 ≈ 73% */
}
[data-template="custom-yamagata-med"] .ym-main .aspect-video img {
  object-fit: cover !important;
  object-position: top !important;
}

/* ============================================================================
 * /blog ページャー シンプル化 + 現在地を黄緑に（2026-11-17 SEI 指示）
 * ========================================================================== */
[data-template="custom-yamagata-med"] .ym-main .mt-12 a.rounded-lg {
  border-radius: 3px !important;
  transition: background .18s, color .18s, border-color .18s;
}
/* 現在地は --color-brand（= primary_color #1F883B 濃緑）でそのまま塗られる */
/* 「次へ →」等のナビボタンのホバーも控えめに */
[data-template="custom-yamagata-med"] .ym-main .mt-12 a.rounded-lg:hover {
  background: var(--ym-paper-alt) !important;
  color: var(--ym-blue) !important;
  border-color: var(--ym-accent) !important;
}

/* ============================================================================
 * スマホ版：2枚目のヒーロー画像は右側をなるべく見せる（2026-11-17 SEI 指示）
 * 診察シーン：医師が左・患者家族が右。スマホの狭い縦画面では右寄せで
 * 患者さんが切れずに見えるように background-position を右に。
 * ========================================================================== */
@media (max-width: 640px) {
  .ym-hero-slideshow__image:nth-child(2) {
    background-position: right center !important;
  }
}

/* ============================================================================
 * スマホ版：NEWSタブのアイコン2つを非表示（2026-11-17 SEI 指示）
 * ========================================================================== */
@media (max-width: 640px) {
  .ym-newslist__tab-icon { display: none; }
}

/* ============================================================================
 * 固定ページ共通スタイル（/nanbyou /public /provider 他） 2026-11-17
 * ========================================================================== */
/* コーナーページの本文幅は /blog（max-w-4xl=56rem・左右 1rem）に統一 */
[data-template="custom-yamagata-med"] .ym-main main .max-w-2xl,
[data-template="custom-yamagata-med"] .ym-main main .max-w-3xl,
[data-template="custom-yamagata-med"] .ym-main main .max-w-5xl {
  max-width: 56rem !important;
  padding-left: 1rem !important;
  padding-right: 1rem !important;
}
.ym-static {
  max-width: none;
  margin: 0 auto 40px;
  padding: 0;
}
.ym-static__section { margin-bottom: 56px; }
.ym-static__kicker {
  font-family: var(--ym-font-en);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.3em;
  color: var(--ym-accent-dark);
  margin: 0 0 8px;
  text-transform: uppercase;
}
.ym-static__h2 {
  font-family: var(--ym-font-head);
  font-weight: 700;
  font-size: clamp(24px, 2.8vw, 30px);
  color: var(--ym-blue);
  margin: 0 0 20px;
  padding-left: 14px;
  border-left: 4px solid var(--ym-accent);
  line-height: 1.4;
}
.ym-static__h3 {
  font-family: var(--ym-font-head);
  font-weight: 700;
  font-size: 22px;
  color: var(--ym-blue-ink);
  margin: 28px 0 14px;
  letter-spacing: 0.04em;
}
.ym-static__intro, .ym-static__p {
  font-size: 20px;
  line-height: 2;
  margin: 0 0 16px;
  color: var(--ym-ink);
}
.ym-static__note {
  font-size: 17px;
  color: var(--ym-mute);
  background: var(--ym-paper-alt);
  padding: 14px 18px;
  border-left: 3px solid var(--ym-link);
  border-radius: 0 4px 4px 0;
  margin: 0 0 16px;
  line-height: 1.8;
}
.ym-static__conditions {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: grid;
  gap: 10px;
}
.ym-static__conditions li {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 10px;
  padding: 16px 20px;
  background: var(--ym-paper-alt);
  border-left: 4px solid var(--ym-accent);
  border-radius: 0 4px 4px 0;
  font-size: 19px;
  line-height: 1.6;
}
.ym-static__conditions .n {
  font-family: var(--ym-font-en);
  font-weight: 700;
  color: var(--ym-accent-dark);
  font-size: 24px;
}
.ym-static__checklist {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  display: grid;
  gap: 6px;
}
.ym-static__checklist li {
  position: relative;
  padding: 10px 10px 10px 32px;
  font-size: 18px;
  line-height: 1.7;
  border-bottom: 1px dashed var(--ym-line);
}
.ym-static__checklist li::before {
  content: '';
  position: absolute; left: 6px; top: 16px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--ym-accent);
}
.ym-static__linkcards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin: 10px 0 24px;
}
.ym-static__linkcard {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 18px 44px 18px 20px;
  border: 2px solid var(--ym-blue);
  background: #fff;
  border-radius: 4px;
  text-decoration: none !important;
  color: var(--ym-blue) !important;
  transition: background .2s, color .2s, transform .18s;
}
.ym-static__linkcard:hover {
  background: var(--ym-accent);
  color: var(--ym-blue-ink) !important;
  transform: translateY(-2px);
}
.ym-static__linkcard .t { font-weight: 700; font-size: 18px; line-height: 1.5; }
.ym-static__linkcard .s { font-size: 15px; margin-top: 4px; opacity: 0.85; }
.ym-static__linkcard::after {
  content: '→';
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  font-weight: 700; font-size: 20px;
}
.ym-static__linkcard[data-variant="accent"] { border-color: var(--ym-accent); color: var(--ym-accent-dark) !important; }
.ym-static__linkcard[data-variant="accent"]:hover { background: var(--ym-blue); color: #fff !important; }
.ym-static__linkcard[data-variant="link"] { border-color: var(--ym-link); color: var(--ym-link-dark) !important; }
.ym-static__linkcard[data-variant="link"]:hover { background: var(--ym-link); color: #fff !important; }

.ym-static__tellist {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 8px;
}
.ym-static__tellist li {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--ym-paper-alt);
  border-radius: 4px;
}
.ym-static__tellist .label { font-size: 16px; color: var(--ym-slate); }
.ym-static__tellist a {
  font-family: var(--ym-font-en);
  font-weight: 700;
  font-size: 20px;
  color: var(--ym-blue);
  text-decoration: none !important;
}
.ym-static__tellist a:hover { color: var(--ym-accent-dark); }

@media (max-width: 640px) {
  .ym-static { padding: 0; margin: 0 auto 32px; }
  .ym-static__h2 { font-size: 22px; }
  .ym-static__h3 { font-size: 19px; }
  .ym-static__intro, .ym-static__p { font-size: 18px; }
  .ym-static__conditions li { font-size: 17px; }
}

/* ============================================================================
 * /contact フォームの幅拡張とブラッシュアップ（2026-11-17 SEI 指示）
 * 標準の contact ジョブ（Tailwind max-w-xl）を yamagata-med 用に調整
 * ========================================================================== */
[data-template="custom-yamagata-med"] .ym-main .max-w-xl {
  max-width: 56rem !important;
  padding-left: 1rem !important;
  padding-right: 1rem !important;
}

/* 入力欄とテキストエリア */
[data-template="custom-yamagata-med"] .ym-main form input[class*="rounded-xl"],
[data-template="custom-yamagata-med"] .ym-main form textarea[class*="rounded-xl"] {
  border-radius: 4px !important;
  font-size: 18px !important;
  padding: 14px 16px !important;
  border: 1px solid var(--ym-line-strong) !important;
  background: #fff !important;
  line-height: 1.6 !important;
  font-family: var(--ym-font-sans) !important;
}
[data-template="custom-yamagata-med"] .ym-main form input[class*="rounded-xl"]:focus,
[data-template="custom-yamagata-med"] .ym-main form textarea[class*="rounded-xl"]:focus {
  border-color: var(--ym-blue) !important;
  box-shadow: 0 0 0 3px rgba(31,136,59,0.18) !important;
  outline: none !important;
}

/* 送信ボタン */
[data-template="custom-yamagata-med"] .ym-main form button[class*="rounded-full"] {
  border-radius: 6px !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  background: var(--ym-blue) !important;
  padding: 16px !important;
  font-family: var(--ym-font-head) !important;
}
[data-template="custom-yamagata-med"] .ym-main form button[class*="rounded-full"]:hover {
  background: var(--ym-blue-ink) !important;
  opacity: 1 !important;
}

/* ラベルとヘルプテキストの読みやすさ */
[data-template="custom-yamagata-med"] .ym-main form label,
[data-template="custom-yamagata-med"] .ym-main .max-w-xl label {
  font-size: 17px !important;
  font-weight: 600 !important;
  color: var(--ym-blue-ink) !important;
  margin-bottom: 8px !important;
  display: block !important;
}

/* /access 用：住所＋連絡先の2カラム */
.ym-static__info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 640px) {
  .ym-static__info-grid { grid-template-columns: 1fr; gap: 16px; }
}

/* /access 用：バス路線リスト */
.ym-static__buslist {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: grid;
  gap: 8px;
}
.ym-static__buslist li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  background: var(--ym-paper-alt);
  border-radius: 4px;
  border-left: 3px solid var(--ym-link);
  font-size: 17px;
}
.ym-static__buslist .route { font-weight: 500; line-height: 1.5; }
.ym-static__buslist .time {
  font-family: var(--ym-font-en);
  font-weight: 700;
  color: var(--ym-blue);
  white-space: nowrap;
}
.ym-static__buslist .from {
  font-size: 14px;
  color: var(--ym-mute);
  background: #fff;
  padding: 3px 8px;
  border-radius: 3px;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .ym-static__buslist li {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

/* /access 用：地図 iframe */
.ym-static__map {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--ym-line);
}
.ym-static__map iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ============================================================================
 * 記事ページのパンくず（ヒーローの上の白帯・左寄せ） 2026-11-17 SEI 指示
 * ========================================================================== */
.ym-breadcrumb {
  background: #F5F8EE;
  border-bottom: 1px solid var(--ym-line);
}
.ym-breadcrumb ol {
  max-width: var(--ym-maxw);
  margin: 0 auto;
  padding: 12px clamp(16px, 3vw, 32px);
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 0;
  font-size: 16px;
  line-height: 1.6;
}
.ym-breadcrumb li { display: inline-flex; align-items: center; min-width: 0; }
.ym-breadcrumb li + li::before {
  content: '';
  width: 6px; height: 6px;
  margin: 0 12px 0 10px;
  border-top: 2px solid var(--ym-accent-dark);
  border-right: 2px solid var(--ym-accent-dark);
  transform: rotate(45deg);
  flex-shrink: 0;
}
.ym-breadcrumb a {
  color: var(--ym-blue) !important;
  font-weight: 700;
  text-decoration: none !important;
}
.ym-breadcrumb a:hover { text-decoration: underline !important; text-underline-offset: 3px; }
.ym-breadcrumb li span { color: var(--ym-slate); }
.ym-breadcrumb li[aria-current="page"] span {
  display: inline-block;
  max-width: 40em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .ym-breadcrumb ol { font-size: 15px; padding: 10px 16px; }
  .ym-breadcrumb li[aria-current="page"] span { max-width: 14em; }
}

/* /blog 一覧：記事カード・ページャー・カテゴリタブの下線を外す（2026-11-17 SEI 指示） */
[data-template="custom-yamagata-med"] .ym-main a.group,
[data-template="custom-yamagata-med"] .ym-main a.group *,
[data-template="custom-yamagata-med"] .ym-main .mt-12 a,
[data-template="custom-yamagata-med"] .ym-main a.rounded-full,
[data-template="custom-yamagata-med"] .ym-main a.rounded-lg {
  text-decoration: none !important;
}
[data-template="custom-yamagata-med"] .ym-main a.group:hover h2 { color: var(--ym-blue); }

/* コーナーページ：custom_html ブロック内側の二重余白を除去して /blog と同幅に */
[data-template="custom-yamagata-med"] .ym-main main section.bg-white { background: transparent; }
[data-template="custom-yamagata-med"] .ym-main main section.bg-white > div {
  padding: 0 !important;
}
[data-template="custom-yamagata-med"] .ym-main main section.bg-white > div > .max-w-5xl {
  max-width: none !important;
}
/* <section> がサニタイズで外れるため、2つ目以降の kicker の前で区切りを作る */
.ym-static .ym-static__kicker:not(:first-child) { margin-top: 56px; }

/* /access：メールアドレス画像（ボット対策） */
.ym-static__mail img {
  display: inline-block;
  height: 21px; width: auto;
  vertical-align: middle;
  max-width: 100%;
  user-select: none; -webkit-user-drag: none; pointer-events: none;
}

/* /blog 一覧：記事カードのタイトルを省略せず全文表示・25px → 20px（-20%） 2026-11-17 SEI 指示 */
[data-template="custom-yamagata-med"] .ym-main a.group h2 {
  font-size: 22px !important;
  line-height: 1.55 !important;
  letter-spacing: 0.02em !important;
  margin: 8px 0 10px !important;
  display: block !important;
  -webkit-line-clamp: unset !important;
  line-clamp: unset !important;
  overflow: visible !important;
}
@media (max-width: 640px) {
  [data-template="custom-yamagata-med"] .ym-main a.group h2 { font-size: 19px !important; }
}

/* ============================================================================
 * 記事のシェアボタン：シンプル・小さめ・1色（濃緑の線のみ） 2026-11-17 SEI 指示
 * ========================================================================== */
[data-template="custom-yamagata-med"] [aria-label="この記事をシェア"] { gap: 10px !important; margin: 32px 0 !important; }
[data-template="custom-yamagata-med"] [aria-label="この記事をシェア"] > span,
[data-template="custom-yamagata-med"] [aria-label="この記事をシェア"] > p {
  font-size: 14px !important; color: var(--ym-slate) !important; letter-spacing: 0.06em;
}
[data-template="custom-yamagata-med"] [aria-label="この記事をシェア"] a,
[data-template="custom-yamagata-med"] [aria-label="この記事をシェア"] button {
  background: transparent !important;
  color: var(--ym-blue) !important;
  border: 1px solid var(--ym-blue) !important;
  border-radius: 3px !important;
  padding: 4px 10px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  gap: 5px !important;
  text-decoration: none !important;
  box-shadow: none !important;
  transition: background .18s, color .18s !important;
}
[data-template="custom-yamagata-med"] [aria-label="この記事をシェア"] a:hover,
[data-template="custom-yamagata-med"] [aria-label="この記事をシェア"] button:hover {
  background: var(--ym-blue) !important;
  color: #fff !important;
  opacity: 1 !important;
}
[data-template="custom-yamagata-med"] [aria-label="この記事をシェア"] svg { width: 12px !important; height: 12px !important; }

/* コーナーページのヒーロータイトル：背景をフッターと同じ淡グリーンに・文字は濃緑 */
.ym-page-hero__title h1 {
  background: rgba(245, 248, 238, 0.94) !important;
  color: var(--ym-blue-ink) !important;
  text-shadow: none !important;
  -webkit-backdrop-filter: none; backdrop-filter: none;
}

/* プライバシーポリシー：番号見出しと日付 */
.ym-policy .ym-static__kicker { font-size: 17px; letter-spacing: 0.1em; }
.ym-policy .ym-static__h2 { font-size: clamp(21px, 2.4vw, 25px); }
.ym-policy__date {
  margin: 48px 0 0; padding-top: 20px;
  border-top: 1px solid var(--ym-line);
  text-align: right; font-size: 17px; line-height: 1.9; color: var(--ym-slate);
}

/* /contact フォーム下の注意事項 */
.ym-contact-notes {
  margin-top: 40px;
  padding: 22px 24px;
  background: #F5F8EE;
  border-left: 4px solid var(--ym-accent);
  border-radius: 0 6px 6px 0;
}
.ym-contact-notes__head {
  margin: 0 0 12px !important;
  font-family: var(--ym-font-head);
  font-size: 19px !important;
  font-weight: 700;
  color: var(--ym-blue-ink) !important;
  letter-spacing: 0.04em;
}
.ym-contact-notes ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ym-contact-notes li {
  position: relative;
  padding-left: 1.3em;
  font-size: 16px; line-height: 1.85; color: var(--ym-slate);
}
.ym-contact-notes li::before { content: '※'; position: absolute; left: 0; color: var(--ym-accent-dark); }
.ym-contact-notes a { color: var(--ym-blue) !important; text-decoration: underline !important; text-underline-offset: 3px; }
@media (max-width: 640px) { .ym-contact-notes { padding: 18px 16px; } .ym-contact-notes li { font-size: 15px; } }

/* /system 等：単独のリンクカードは横幅いっぱいに伸ばさず読みやすい幅に（2026-11-25 杉原様依頼） */
.ym-static__linkcards--single { grid-template-columns: minmax(0, 560px); margin: 12px 0 20px; }
