@charset "UTF-8";
/* ============================================================
   鋸南町国民健康保険 鋸南病院 トップページ
   style.css
   ------------------------------------------------------------
   カラー設計：
   - ベース      : #FAF7EF（真っ白は不使用）
   - メイン      : ゴールド #e3ad0a（装飾） / #7A5C00（文字用）
   - 文字色      : #333333 / リンク #0044CC
   - ダークテーマ: body[data-theme="dark"] で変数を上書き
   ============================================================ */

/*reset----------------------------------------------------------*/
html, body, div, span, object, iframe,h1, h2, h3, h4, h5, h6, p, blockquote, pre,abbr, address, cite, code,del, dfn, em, img, ins, kbd, q, samp,small, strong, sub, sup, var, b, i,dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,table, caption, tbody, tfoot, thead, tr, th, td,article, aside, dialog, figure, footer, header,hgroup, menu, nav, section,time, mark, audio, video { list-style:none; margin:0; padding:0; border:0; outline:0;font-size:100%; vertical-align:baseline; background:transparent;}
body { line-height:1;}
article, aside, dialog, figure, footer, header,hgroup, nav, section { display:block;}
nav ul { list-style:none;}
li { margin:0; padding:0;}
blockquote, q { quotes:none;}
blockquote:before, blockquote:after,q:before, q:after { content:''; content:none;}
a {margin:0;padding:0;border:0;font-size:100%;vertical-align:baseline;background:transparent;}
ins { background-color:#ff9; color:#423a2b; text-decoration:none;}
mark { background-color:#ff9; color:#423a2b; font-style:italic; font-weight:bold;}
del { text-decoration: line-through;}
abbr[title], dfn[title] { border-bottom:1px dotted #423a2b; cursor:help;}
table { border-collapse:collapse; border-spacing:0;}
hr {display:block;height:1px;border:0;border-top: 1px solid #e5dcc8;margin:1em 0;padding:0;}
input, select { vertical-align:middle;}
input[type="submit"], input[type="button"],input[type="checkbox"],input[type="radio"],input[type="text"] { margin: 0; padding: 0; background: none; border: none; border-radius: 0; outline: none; -webkit-appearance: none; -moz-appearance: none; appearance: none;}

/* ------------------------------------------------------------
   1. カスタムプロパティ（ライト／ダーク）
   ------------------------------------------------------------ */
:root{ --bg:#FAF7EF; --bg-alt:#F2EDDF; --surface: #fffefa; --surface-h:#F5EED8; --head:#F6F1E2; --white :#fffdfd; --footBg:#F2ECDA; --line:#D9D2BE; --text:#333333; --muted:#5B5648; --gold:#e3ad0a; --goldText:#7A5C00; --link:#0044CC; --linkbotm:#005c99; --linkHover:#002E8A; --focus:#7A5C00; --dotOff:#8A8468; --logoChip:transparent; --docBlue:#0044CC; --docGreen:#1B7A3D; --docRed:#C0392B;}
body[data-theme="dark"]{ --bg:#1A1A1A; --bg-alt:#232323; --surface:#262626; --surface-h:#33301F; --head:#202020; --footBg:#202020; --line:#4A4A44; --text:#F2EFE6; --muted:#C9C4B4; --goldText:#e3ad0a; --link:#7EC3FF; --linkHover:#B0DAFF; --focus:#e3ad0a; --dotOff:#8F8B7D; --logoChip:#F2EFE6; --docBlue:#7EC3FF; --docGreen:#7ED9A0; --docRed:#FF9B8E;}

/* ------------------------------------------------------------
   2. ベース
   ------------------------------------------------------------ */
*{box-sizing:border-box}
html{scroll-behavior:smooth}
/* 文字サイズ切替（main.js が html に data-fsize を付与する。
   中＝ブラウザ標準100%／大＝115%。500px以下はセクション19で 4vw 基準に切替 */
html[data-fsize="l"]{font-size:115%}
body{background: #fffdfd;color:var(--text);font-family:"Noto Sans JP","Hiragino Sans","ヒラギノ角ゴシック","Hiragino Kaku Gothic ProN","ヒラギノ角ゴ ProN W3","メイリオ",Meiryo,sans-serif;font-size:1rem;line-height:1.7;-webkit-text-size-adjust:100%;}
h1,h2,h3{text-wrap:pretty}
img{max-width:100%}
a{color:var(--link)}
a:hover{color:var(--linkHover)}
button{font-family:inherit}
a:focus-visible,button:focus-visible,input:focus-visible{outline: none;outline-offset: 0;}
.en {font-family: "Mukta Mahee", sans-serif;}
.page{}
.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0;}
.section-title{margin-bottom:18px;font-size: clamp(1.4rem,1vw + 1.1rem,2.7rem);display:flex;align-items:center;gap:.4em;}
.section-title > .ico{width:1em;height:1em}
.txt-gold{color:var(--goldText)}
.br-sp{display:none}
br.sp {display:none;}
:root{--bleed-right:calc(-1 * (((100vw - var(--sbw, 0px)) - min(1280px, 100vw - var(--sbw, 0px))) / 2 + 16px));}
.ico{flex:none}
.ico--gold{color:var(--goldText)}
.tel-link{display:inline-flex;align-items: end;font-size: 250%;line-height: 1;font-weight:700;color: var(--text);text-decoration:none;font-family: "Mukta Mahee", sans-serif;}
.tel-link:hover{color:var(--linkHover)}
.tel-link svg {width: .8em;height: .8em;}

@media (max-width:500px){
br.sp {display:inline;}
}

/* ------------------------------------------------------------
   3. ヘッダー
   ------------------------------------------------------------ */
.site-header{}
.site-header__inner{ max-width: 98%; margin:0 auto; padding: 10px 0 0; display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap: 14px 15px;}
.site-header__brand{display:flex;align-items:center;gap:6px 14px}
.brand-logo{display:inline-flex;}
.brand-logo__img{height: 56px;width:auto;display:block}
.site-header__manager{line-height:1.5}
@media (max-width:1140px){
.site-header__brand{flex-direction:column;align-items:flex-start;gap:6px}
.site-header__manager br{display:none}
}

.site-header__right{display:flex;align-items:center;gap: 14px .5em;flex-wrap:wrap}
.site-header__tel-block{display:flex;flex-direction:column;gap:0}
.site-header__tel-note{font-weight:700;}
.site-header__tools{display:flex;gap: 5px;flex-wrap:wrap}
.tool-btn{min-width:76px;min-height: 72px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap: 2px;cursor:pointer;border: none;color:var(--text);font-size:1rem;font-weight:700;padding:8px 6px;border: 2px solid var(--surface-h);background: var(--surface-h);border-radius: .5em;}
.tool-btn:hover{background: var(--white);}
.tool-btn__icon{display:flex;color:var(--goldText)}

@media (max-width:500px){
.site-header__tel-note{font-size:80%;font-feature-settings: "palt";}
.spmenu__tel .site-header__tel-note{font-size:120%;font-feature-settings: "palt";}
.spmenu__tel .tel-link {font-size:280%;}
}

/* ------------------------------------------------------------
   4. グローバルナビ
   ------------------------------------------------------------ */
.gnav{position:sticky;top:0;z-index:70; }
.gnav--fixed{background: var(--bg);}
.gnav__inner{ max-width: 98%; margin: 5px auto 0; padding: 0; display:grid; grid-template-columns:repeat(auto-fit,minmax(min(88px,22vw),1fr)); gap:4px;}
.gnav__cell{display:flex}
.gnav__item{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap: 2px;min-height:80px;padding:8px 2px;border-radius: 10px 10px 0 0;color:var(--text);font-size: 100%;font-weight:700;text-align:center;line-height:1.35;}
a.gnav__item{text-decoration:none}
button.gnav__item{border:none;background:transparent;cursor:pointer}
.gnav__item:hover{background:var(--surface-h);color:var(--goldText)}
.gnav__icon{display:flex;color:var(--goldText)}
[data-navbtn][aria-expanded="true"]{background: var(--surface);box-shadow:inset 0 -4px 0 var(--gold);}
.gnav--fixed .gnav__item:hover {border-radius:0;}

.gnav-sub{ position:absolute; left:0; right:0; top: calc(100% - 10px); z-index:90;padding: 10px 1% 28px;}
.gnav-sub[hidden]{display:none}
.gnav-sub__panel{ max-width: 1020px; margin:0 auto; background:var(--surface); border-radius: 0 0 .5em .5em; box-shadow:0 18px 42px rgba(40,32,8,.24); padding:clamp(20px,2.6vw,32px) clamp(22px,4vw,56px) clamp(24px,3vw,40px);}
.gnav-sub:not([hidden]) .gnav-sub__panel{animation:gnavSubIn .18s ease;}
@keyframes gnavSubIn{ from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:translateY(0)}}
.gnav-sub__header{ border-bottom:1px solid var(--line); display:flex;align-items:center;justify-content:space-between;gap:10px;}
.gnav-sub__close{ display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; width:64px; height:64px; flex:none; border:none; border-radius:50%;background:var(--surface-h); cursor:pointer; color:var(--text); font-size: 85%; margin-bottom: .5em; font-weight:700; line-height:1; -webkit-transition:background-color .25s ease; transition:background-color .25s ease;}
.gnav-sub__close:hover{background:var(--gold);}
.gnav-sub__head{ display:inline-flex;align-items:center;gap:14px;min-height:60px; padding:2px 4px 10px; font-size:clamp(1.25rem,1vw + 1rem,1.55rem);font-weight:700; color:var(--text);text-decoration:none;letter-spacing:.02em;}
.gnav-sub__head:hover{color:var(--goldText)}
.gnav-sub__grid{ columns:3; column-gap: 1em; padding-top: 1em;}
.gnav-sub__cell{ break-inside:avoid; border-bottom:1px dashed var(--line); padding-bottom:3px;}
.gnav-sub__link{ display:flex; align-items:center; gap:12px; min-height:60px; padding:6px 6px; text-decoration:none; color:var(--text); font-weight:700; line-height:1.5; border-radius: .3em;}
.gnav-sub__link:hover{background:var(--surface-h);color:var(--goldText)}
@media (max-width:900px){
.gnav-sub__grid{columns:2}
.gnav-sub__close {font-size:80%;margin-bottom: .6em;}
}
@media (max-width:600px){
.gnav-sub__grid{columns:1}
}

/* ------------------------------------------------------------
   5. メインビジュアル（FV）
   ------------------------------------------------------------ */
.fv{ position:relative; height:var(--fv-h,calc(100svh - 200px)); /* JSがヘッダー＋ナビの高さから算出 */
  min-height:560px; overflow:hidden; background:#a9bfcc; width: 98%; margin: auto; border-radius: 1em;}
.fv__slide{position:absolute;inset:0}
.fv__slide--1{background:url(../img/fv1.jpg) no-repeat center/cover}
.fv__slide--2{background:url(../img/fv2.jpg) no-repeat center/cover}
.fv__slide--3{background:url(../img/fv3.jpg) no-repeat center/cover}

[data-fv-slide]{opacity:0;transition:opacity 1.1s ease}
[data-fv-slide][data-fv-active="true"]{opacity:1;animation:fvPan 16s linear both}
[data-fv-paused="true"] [data-fv-slide][data-fv-active="true"]{animation-play-state:paused}
@keyframes fvPan{ from{transform:translateX(2.6%) scale(1.07)}to{transform:translateX(-2.6%) scale(1.07)}}
/* スマホ用：拡大せず cover の余剰幅を background-position でパン（〜880pxで使用） */
@keyframes fvPanSp{ from{background-position:0% 50%}to{background-position:100% 50%}}

.fv__copy{ position:absolute; left: max(16px,2vw); right: calc(72px + 24px); bottom:clamp(20px,4vh,44px); z-index:2;}
.fv__title{ margin-bottom:18px;font-size:clamp(1.6rem,4.6vw,2.8rem); line-height:1.6;color:var(--text);letter-spacing:.04em;}
.fv__lead{font-size:1rem;line-height: 2;color:var(--text);font-weight:700;max-width:740px;}
/* コピーの可読性を確保する帯（テキスト分だけ背景を敷く） */
.fv__band{ background: #fffdfd; -webkit-box-decoration-break:clone; box-decoration-break:clone;}
.fv__title .fv__band{padding: 0px 0px 0px 10px;}
.fv__lead .fv__band{padding: 2px 0px 2px 10px;}

/* スライダー操作（前へ・ドット・次へ・一時停止）
   FVの右端に縦帯で表示（文字エリアを下部に置けるようにするため） */
.fv__controls{ position:absolute;top:0;right:0;bottom:0;z-index:3; display:flex;}
.fv__ctrl-group{ display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; height:100%; width:72px; background: var(--surface-h); border-left:1px solid var(--line); padding:12px 6px;}
.fv__arrow{ width:60px;height:60px;border-radius:50%; display:flex;align-items:center;justify-content:center; background:transparent;border:none;cursor:pointer;color:var(--goldText);}
.fv__arrow:hover{background:var(--surface-h)}
.fv__dot{ width: 60px; height:60px; background:transparent; border:none; cursor:pointer; display:flex; align-items:center; justify-content:center;}
.fv__dot-mark{display:block;width:16px;height:16px;border-radius:50%;background:var(--dotOff)}
[data-dot-active="true"] span{background:var(--goldText) !important}
.fv__pause{ width:60px;min-height:76px; display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px; background:transparent;border:none;border-top:1px solid var(--line); cursor:pointer;color:var(--text);font-size:1rem;font-weight:700; padding:10px 0 0;margin-top:10px;}
.fv__pause:hover{background:var(--surface-h)}
.fv__pause-icon{display:flex;color:var(--goldText)}
.fv__pause-icon svg[hidden]{display:none}

/* ------------------------------------------------------------
   6. 外来診療のご案内 ／ 本日の外来担当医
   ------------------------------------------------------------ */
.outpatient{ max-width: 1280px; margin:0 auto; padding: clamp(30px,5vw,60px) 16px 3em; display:flex; flex-wrap:wrap; gap:24px clamp(28px,3vw,44px); align-items:stretch; /* 担当医表の右ブリードのはみ出しで横スクロールを出さない */
overflow-x:clip;}
.outpatient__info{flex:2 1 300px;display:flex;flex-direction:column}
.sub-title{margin-bottom:14px;font-size:1.2rem;color:var(--goldText)}

.time-grid{ display:grid; grid-template-columns:auto 1fr; gap: .5em 1em; align-items:center; margin-bottom: 1em;}
.time-grid__label{background:var(--bg-alt);border-radius:8px;padding:10px 18px;font-weight:700;text-align:center}
.time-grid__value{font-size:1.25rem;font-weight:700}
.time-grid__note{font-size:1rem;font-weight:400;color:var(--muted)}
.outpatient__cta{margin-top: 2em;display:grid;grid-template-columns:1fr 1fr;gap:12px}
.btn-gold{ display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px; min-height:66px; background: #005c99; color: #fffffc; font-weight:700; padding:16px 10px; border-radius: .5em; text-decoration:none; text-align:center; border: 1px solid #005c99; -webkit-transition: color .25s ease, background-color .25s ease; transition: color .25s ease, background-color .25s ease;}
.btn-gold:nth-child(2) {background: var(--white);color: #005c99;}
.btn-gold:hover{background: var(--white);color: #005c99;}
.btn-gold:nth-child(2):hover { background: #005c99;color: #fffffc;}
.btn-gold__icon{display:flex}
.btn-gold__label{display:inline-flex;align-items:center;justify-content:center;gap:6px;flex-wrap:wrap;line-height:1.35;margin-left: 1.5em;}
.outpatient__table{ flex: 3 1 618px; display:flex; flex-direction:column; gap:14px; border-left:1px solid var(--line); padding-left:clamp(28px,3vw,44px);min-width:0;}
.outpatient__table-body{flex:1;min-width:0}
.table-scroll{overflow-x:auto;margin: 0 -1rem;padding: 0 1rem;}
.doc-table{width:100%;min-width:530px;background:var(--surface);table-layout:fixed}
.doc-table__col-slot{width:3.6em}
.doc-table__col-dept{width:5.5em}
.doc-table__col-oncall{width:3em}
.doc-table th,.doc-table td{border:1px solid var(--line);padding: 10px 4px;text-align:center;vertical-align: middle;}
.doc-table thead th{background: var(--gold);}
.doc-table .cell-label{background:var(--bg-alt);font-weight:700;white-space:nowrap}
.doc-table .cell-oncall{background:var(--bg-alt);font-weight:700;padding: 8px;width: 3em;line-height: 1.1;}
.doc-name--blue{color:var(--docBlue);font-weight:700}
.doc-name--green{color:var(--docGreen);font-weight:700}
.doc-name--red{color:var(--docRed);font-weight:700}
@media (max-width:1020px){
.outpatient__table{border-left:none;padding-left:0;margin-right:0}
}
@media (max-width:600px){
.btn-gold__label {display: block;text-align: center;margin: auto;}
.btn-gold__label .ico {display: block;margin: .2em auto 0;}
.panel-link .panel-link__label {display: block;}
.panel-link .panel-link__label .ico {display: block;margin: .2em auto 0;}
}


/* ------------------------------------------------------------
   7. 緊急・救急のご案内
   ------------------------------------------------------------ */
.emergency{padding: 3em 16px;box-shadow: 0 .3rem 1.5rem 0 rgb(22 39 144 / 10%) inset;border: 1px solid var(--line);border-left: 0;border-right: 0;background:url(../img/kinkyu_bg.jpg) no-repeat center;}
.emergency__card{overflow:hidden;margin: 0 auto;padding: 22px 16px;max-width: 1280px;}
.emergency__title{font-size:clamp(1.3rem,1vw + 1.05rem,1.6rem);display:flex;align-items:center;gap:12px;color: var(--docRed);margin-bottom: .5em;}
.emergency__body{max-width: 520px;}
.emergency__text{flex:1 1 380px}
.emergency__text .sub-title{margin-bottom:10px;font-size:1.25rem;color: var(--text);}
.emergency__text p{line-height:2}
.emergency__tel-box{flex:1 1 330px;background: #ffffff;border-radius: .5em;padding: 18px 23px;margin-top: 1.5em;}
.emergency__tel-label{margin-bottom:4px;font-weight:700;font-size:1.1rem;color: var(--docRed);}
.emergency__tel-note{font-size: 100%;}

@media (max-width:950px){
.emergency{padding: 36vw 0 3em;background:url(../img/kinkyu_bg_sp.png) no-repeat top center #dce3ed;background-size:contain;}
.emergency__card {max-width:650px; margin:auto;}
.emergency__body {max-width:initial;}
}

/* ------------------------------------------------------------
   8. 最近のお知らせ
   ------------------------------------------------------------ */
.news{margin-top:26px}
.news__inner{max-width: 1280px;margin:0 auto;padding:clamp(30px,5vw,54px) 16px}
/* 見出し行：左に見出し、右に一覧ボタン */
.news__head{ display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between; gap:12px 24px;margin-bottom:22px;}
.news__head .section-title{margin-bottom:0}
.news__layout{display:flex;flex-wrap:wrap;gap:28px clamp(28px,4vw,56px)}

/* 左側：見出し＋カテゴリータブ＋一覧ボタン */
.news__side{ flex:1 1 230px;max-width:300px; display:flex;flex-direction:column;gap:24px;align-self:flex-start;}
.news__side .section-title{margin-bottom:0}

/* カテゴリータブ：隙間なしの縦積み。上下端のみ角丸 */
.news__cats{display:flex;flex-direction:column}
.cat-btn{ min-height:60px; display:flex; align-items:center; justify-content:center; padding:8px 18px; margin-top:-2px; background: var(--footBg); cursor:pointer; font-size:1.05rem; color:var(--text); text-align:center; border: none; position:relative;}
.cat-btn:first-child{margin-top:0;border-radius:.5em .5em 0 0}
.cat-btn:last-child{border-radius:0 0 .5em .5em}
.cat-btn:hover{border-color: #7A5C00;color: #7A5C00;z-index:1;}
[data-cat-active="true"]{background: var(--gold);font-weight: 700;z-index:2;}
/* 選択中タブの右側に矢印ノッチ（枠線色＋背景色の二重三角形） */
.cat-btn[data-cat-active="true"]::before{ content:""; position:absolute; left:100%; top:50%; transform:translateY(-50%); border-right:0;}
.cat-btn[data-cat-active="true"]::after{ content:""; position:absolute; left:calc(100% - 3px); top:50%; transform:translateY(-50%); border: 9px solid transparent; border-left: 15px solid var(--gold); border-right:0;}

/* 右側：日付・カテゴリ｜区切り線｜タイトル の行リスト */
.news__list{flex:99 1 460px;display:flex;flex-direction:column;}
.news__list a:first-child {border-top:1px solid var(--line);}
.news-item{ display:flex; align-items:center; flex-wrap:wrap; gap:10px 22px; padding:20px 8px; min-height:96px; border-bottom:1px solid var(--line); text-decoration:none; color:var(--text);}
.news-item:hover{background:var(--surface-h);color:var(--text)}
.news-item[hidden]{display:none}
.news-item__meta{ flex:none;width:10.5em;align-self:stretch; display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px; border-right:1px solid var(--line);padding-right:22px;}
.news-item__date{font-weight:700;font-size:1.1rem;white-space:nowrap}
.news-item__cat{ border:2px solid var(--goldText); color:var(--goldText); font-weight:700; font-size:1rem; border-radius:999px; padding:2px 16px; white-space:nowrap; background: var(--white); line-height:1.6;}
.news-item__title{ flex:1 1 240px; font-weight:700;}
.news-item__chev{flex:none;margin-left:auto;color:var(--goldText)}
.news__empty{ margin-top: 2em;}
.news__empty[hidden]{display:none}
.news__more{display:flex;justify-content:center}

@media (max-width:640px){
.news__side{max-width:none}
.news-item__meta{ width:auto;align-self:auto;flex-direction:row;align-items:center; border-right:none;padding-right:0; }
}

/* 丸ピルボタン（お知らせ一覧・当院についてを詳しく見る） */
.btn-outline{ display:inline-flex; align-items:center; gap:10px; min-height:62px; padding:10px 30px; background:var(--linkbotm); border:1px solid var(--linkbotm); border-radius:.5em; font-weight:700; color:var(--surface); text-decoration:none; -webkit-transition: color .25s ease, background-color .25s ease; transition: color .25s ease, background-color .25s ease;}
.btn-outline:hover{background: var(--white);color: var(--linkbotm);}
.btn-outline--lg{min-height:64px;padding:12px 30px;text-align:center}

/* ------------------------------------------------------------
   9. リンクパネル
   ------------------------------------------------------------ */
.quicklinks{max-width: 1280px;margin:0 auto;padding: 0 16px 0;position: relative;z-index: 2;}
.quicklinks__grid{ display:grid; grid-template-columns: repeat(auto-fit,minmax(min(250px,42vw),1fr)); gap:12px;}
.panel-link{ display:flex; flex-direction:column; align-items:center; justify-content:center; gap: .5em; min-height:134px; background: var(--footBg); border-radius: .5em; text-decoration:none; color:var(--text); font-weight:700; text-align:center; padding:16px 8px; line-height:1.45;}

a.panel-link.color1 {color: #1f76f2;
border: 1px solid color-mix(in srgb, #267fff 25%, transparent);background: var(--white) linear-gradient(
color-mix(in srgb, #267fff 14%, transparent), 
color-mix(in srgb, #267fff 0%, transparent)) no-repeat 0% 100% / 100% 200%;}
a.panel-link.color2 {color: #e4317b;
border: 1px solid color-mix(in srgb, #e4317b 25%, transparent);background: var(--white) linear-gradient(
color-mix(in srgb, #e4317b 14%, transparent), 
color-mix(in srgb, #e4317b 0%, transparent)) no-repeat 0% 100% / 100% 200%;}
a.panel-link.color3 {color: #776ed8;
border: 1px solid color-mix(in srgb, #776ed8 25%, transparent);background: var(--white) linear-gradient(
color-mix(in srgb, #776ed8 14%, transparent), 
color-mix(in srgb, #776ed8 0%, transparent)) no-repeat 0% 100% / 100% 200%;}
a.panel-link.color4 {color: #d34111;
border: 1px solid color-mix(in srgb, #d34111 25%, transparent);background: var(--white) linear-gradient(
color-mix(in srgb, #d34111 14%, transparent), 
color-mix(in srgb, #d34111 0%, transparent)) no-repeat 0% 100% / 100% 200%;}
a.panel-link.color5 {color: #0a9a90;
border: 1px solid color-mix(in srgb, #0a9a90 25%, transparent);background: var(--white) linear-gradient(
color-mix(in srgb, #0a9a90 14%, transparent), 
color-mix(in srgb, #0a9a90 0%, transparent)) no-repeat 0% 100% / 100% 200%;}
a.panel-link.color6 {color: #8e8702;
border: 1px solid color-mix(in srgb, #8e8702 25%, transparent);background: var(--white) linear-gradient(
color-mix(in srgb, #8e8702 14%, transparent), 
color-mix(in srgb, #8e8702 0%, transparent)) no-repeat 0% 100% / 100% 200%;}
a.panel-link.color7 {color: #0089d8;
border: 1px solid color-mix(in srgb, #0089d8 25%, transparent);background: var(--white) linear-gradient(
color-mix(in srgb, #0089d8 14%, transparent), 
color-mix(in srgb, #0089d8 0%, transparent)) no-repeat 0% 100% / 100% 200%;}
a.panel-link.color8 {color: #4e9600;
border: 1px solid color-mix(in srgb, #4e9600 25%, transparent);background: var(--white) linear-gradient(
color-mix(in srgb, #4e9600 14%, transparent), 
color-mix(in srgb, #4e9600 0%, transparent)) no-repeat 0% 100% / 100% 200%;}

/* color1〜8 なしのパネル用ホバー（従来どおり） */
.panel-link:not([class*="color"]):hover{border-color:var(--gold);background:var(--surface-h);color:var(--text)}
/* color1〜8 のパネル：ホバーでグラデーションを下から上へスライドして濃くする */
.panel-link{transition:background-position .25s ease}
a.panel-link[class*="color"]:hover{background-position:0% 0%}
/* SVGアイコンと＞マークは各パネルの color1〜8 の文字色に追従させる */
.panel-link__icon{display:flex;color:inherit}
.panel-link .ico--gold{color:inherit}
.panel-link__label{display:inline-flex;align-items:center;gap:4px;flex-wrap:wrap;justify-content:center}

.quicklinks__row{ display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:12px; margin-top: 2em;}
.row-link{ display:flex; align-items:center; justify-content:space-between; gap:8px; min-height: 4em; padding:8px 18px; border-radius: .5em; text-decoration:none; color:var(--text); font-weight:700; background: var(--surface); border: 2px solid var(--line); -webkit-transition: color .25s ease, background-color .25s ease; transition: color .25s ease, background-color .25s ease;}
.row-link:hover{background:var(--surface-h);color:var(--goldText)}

/* ------------------------------------------------------------
   10. 鋸南病院 3つの特徴（tokutyo：特徴＋交通アクセスの共通背景）
   ------------------------------------------------------------ */
.tokutyo{ background:
url(../img/tokutyo_bg.jpg) no-repeat top center,
url(../img/tokutyo_bg_re.jpg) repeat top left; position: relative; z-index: 0; margin-top: -4em; overflow-x: clip;}
.tokutyo:before {content:"";background-image: linear-gradient(0deg, #fefefe00, #fffdfd 96%);top:0;height: 340px;left:0;width:100vw;display: block;position: absolute;}
body[data-theme="dark"] .tokutyo:before {background-image: linear-gradient(0deg, #00000000 50%, #191a1a);}
.features{padding-bottom:clamp(2.5em,5vw,4.5em);position: relative;z-index: 3;}
.features__inner{max-width: 1280px;margin:0 auto;padding: 0 16px 0;}
.features__intro{ min-height: 640px; padding: 254px 62px 0 0; max-width: 540px; margin: 0 55px 0 auto;}
.features__heading{margin-bottom: .5em;font-size: clamp(1.4rem, 1vw + 1.1rem, 2.7rem);}
.features__lede{line-height:2.1;max-width:640px}
.features__list{display:flex;flex-direction:column;gap:clamp(36px,6vw,72px)}

.feature{ display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between; gap:24px clamp(24px,4vw,56px);}
.features__list .feature:nth-child(1){padding-left:clamp(0px,14%,180px)}
.features__list .feature:nth-child(2){padding-left:clamp(0px,6%,80px)}
.feature__body{flex:1 1 340px;max-width:560px}
.feature__head{display:flex;align-items:center;gap:18px;margin-bottom:16px}
.feature__num{ flex:none; font-size: 6em; font-weight:700; color:#D9C48E; line-height:1;}
.feature__title{font-size:clamp(1.25rem,1vw + 1rem,1.55rem);line-height:1.5}
.feature__title-sub{font-size:.72em}
.feature__text{line-height:2.1;margin-bottom:22px}
.feature__btn{ display:inline-flex;align-items:center;justify-content:space-between;gap:10px; min-width:min(280px,100%);min-height:60px;padding:8px 20px; background:var(--white);border:1px solid var(--line);border-radius:.5em; color:var(--text);font-weight:700;text-decoration:none; -webkit-transition:color .25s ease,background-color .25s ease; transition:color .25s ease,background-color .25s ease;}
.feature__btn:hover{background:var(--surface-h);color:var(--goldText)}
.feature__photo{flex:1 1 380px;max-width:640px}
.feature__photo img{width:100%;height:auto;border-radius:12px;display:block}
.feature__photo--bleed{ max-width:none; margin-right:var(--bleed-right);}
.feature__photo--bleed img{border-radius:12px 0 0 12px}

/* 当院についてカード */
.about-card{ display:flex; flex-wrap:wrap; align-items:stretch; justify-content:space-between; margin-top:clamp(40px,6vw,72px); background:var(--white); border-radius:14px; overflow:hidden; text-decoration:none; color:var(--text); box-shadow:0 10px 30px rgba(60,50,20,.08); -webkit-transition:box-shadow .25s ease; transition:box-shadow .25s ease;}
.about-card:hover{box-shadow:0 14px 36px rgba(60,50,20,.16);color:var(--text)}
.about-card:hover .about-card__title{text-decoration:underline}
.about-card__body{ flex: 1 1 200px; display:flex; flex-direction:column; justify-content:center; gap:8px; padding:32px 20px;}
.about-card__title{ display:inline-flex; align-items:center; gap:10px; font-size:clamp(1.3rem,1vw + 1.05rem,1.6rem); font-weight:700; color:var(--goldText); margin-left: .4em;}
.about-card__sub{font-weight:700}
.about-card__photo{ flex:3 1 480px;max-width:none;min-height:220px; display:flex;overflow:hidden;}
.about-card__track{ display:flex;height:100%;width:max-content; animation:aboutSlide 28s linear infinite;}
.about-card__track img{height:100%;width:auto;display:block}
@keyframes aboutSlide{ from{transform:translateX(0)}to{transform:translateX(-50%)}}
@media (prefers-reduced-motion: reduce){
.about-card__track{animation:none}
}

@media (max-width:900px){ 
.tokutyo{background: url(../img/tokutyo_bg_sp.png) no-repeat top center,url(../img/tokutyo_bg_re.jpg) repeat top left;background-size: contain,5%;}
.features__intro{min-height:0;padding: 108vw 0 0;margin: 0 auto 2em;}
.features__list .feature:nth-child(1),
.features__list .feature:nth-child(2){padding-left:0}
}
@media (max-width:600px){
.features__list { margin-top:2em;}
.feature__head {margin-bottom:0;}
.about-card__body{ flex:initial; }
}

/* ------------------------------------------------------------
   11. 交通アクセス
   ------------------------------------------------------------ */
.access{max-width: 1280px;margin:0 auto;padding: 0em 16px 5em;position: relative;z-index: 1;}
.access:before {content:"";width:100vw;height: calc(100% + 14em);bottom:0;left: 0;position: absolute;background: var(--white);z-index: -1;margin-left: calc(50% - 50vw);margin-right: calc(50% - 50vw);}
.access .section-title{ margin-bottom:22px; font-size:clamp(1.7rem,1.4vw + 1.2rem,2.2rem);}
.access__layout{display:flex;flex-wrap:wrap;gap:24px clamp(28px,3vw,44px)}
.access__info{flex:1 1 260px;max-width:420px}
.access__name{margin-bottom:16px;font-size:1.5rem;font-weight:700}

.access-grid{ display:grid;grid-template-columns:auto 1fr;gap:12px 14px; align-items:start;margin-bottom:18px;}
.access-grid__label{ background:var(--bg-alt);border-radius:8px;padding:8px 14px; font-weight:700;text-align:center;white-space:nowrap;}
.access-grid__value{line-height:1.9;padding-top:6px}

.ext-link{display:inline-flex;align-items:center;font-weight:700;color:var(--link);font-feature-settings: "palt";}
.access__map{flex:3 1 480px;margin-right:var(--bleed-right);}
.access__iframe{width:100%;height:400px;border-radius:14px 0 0 14px;display:block}
.access__row{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(240px,80vw),1fr));gap:clamp(12px,2vw,24px);margin-top:clamp(20px,3vw,36px);}
.access-card{ display:flex; flex-direction:column; align-items:center; justify-content:center; gap:20px; min-height:210px; padding:26px 14px; background: var(--bg); border: 10px solid transparent; border-radius:14px; text-decoration:none; color:var(--text); font-weight:700; -webkit-transition: border-color .25s ease, background-color .25s ease; transition: border-color .25s ease, background-color .25s ease;}
.access-card:hover{border-color: var(--bg-alt);color:var(--text);background: var(--white);}
.access-card__icon{width:min(110px,38%);height:auto}
.access-card__label{display:inline-flex;align-items:center;gap:8px}
@media (max-width:900px){ 
.access__map { flex:initial; width:100%;}
.access__iframe { border-radius:0;}
}
@media (max-width:600px){
.access-card__label {display: block;text-align: center;line-height: 1.4;}
.access-card__label .ico {margin: auto;display: block;margin-top: .4em;}
}

/* ------------------------------------------------------------
   12. フッター
   ------------------------------------------------------------ */
.site-footer{background: url(../img/kyonan_bg.jpg) no-repeat bottom center #c5dfff;background-size: 100% auto;padding: 5em 0 22vw;}
.site-footer__inner{ max-width: 1280px; margin:0 auto; padding: 3em 16px; display:flex; flex-wrap:wrap; gap:28px 40px;}
.site-footer__org{flex:1 1 300px}
.site-footer__org .brand-logo__img{height: 4em;}
.site-footer__manager{margin:8px 0 16px;font-size:1rem}
.site-footer__addr{margin-bottom:4px;line-height:1.9}
.site-footer__tel-row{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.site-footer__nav{flex: 2 1 760px;}
.site-footer__links{display:grid;grid-template-columns: repeat(4,minmax(0,1fr));gap: .8em 14px;}
.foot-link{display:flex;flex-direction: row-reverse;justify-content: space-between;gap:6px;padding:4px 2px;text-decoration:none;color:var(--text);line-height:1.5;-webkit-transition: color .25s ease;transition: color .25s ease;}
.foot-link .ico--gold {margin-top: .35em;}
.foot-link:hover{color:var(--goldText);text-decoration:underline}
.site-footer__copy{text-align:center;padding:16px 12px;}

@media (max-width:900px){
.site-footer{background-image:url(../img/kyonan_bg_mdl.jpg);padding: 5em 0 57vw;}
.site-footer__inner {padding-top:0;}
}
@media (max-width:600px){
.site-footer{background-image:url(../img/kyonan_bg_sp.jpg)}
}

/* ------------------------------------------------------------
   13. ページ上部へ戻るボタン
   ------------------------------------------------------------ */
.to-top{position:fixed;right: 1%;bottom: 5em;width:70px;height:70px;border-radius:50%;background:var(--gold);border: 1px solid #fff;color:#333333;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;cursor:pointer;z-index:60;font-weight:700;box-shadow: 0 4px 14px rgb(58 30 13 / 25%);-webkit-transition: background-color .25s ease;transition: background-color .25s ease;}
.to-top:hover{background: var(--white);}
.to-top[hidden]{display:none}

/* ------------------------------------------------------------
   14. ポップアップ（検索／文字サイズ／背景色）
   ------------------------------------------------------------ */
.overlay{ position:fixed;inset:0;background:rgba(20,18,10,.55);z-index:100; display:flex;align-items:flex-start;justify-content:center; padding:24px 16px;overflow:auto;}
.overlay[hidden]{display:none}

.dialog{background: var(--white);border-radius:16px;width:100%;padding:24px;position:relative;}
.dialog--search{max-width:660px;margin-top:6vh;max-height:calc(100vh - 90px);overflow:auto}
.dialog--sm{max-width:480px;margin-top:10vh}

.dialog__close{ position:absolute;top:10px;right:10px;width:64px;height:64px; display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px; background:transparent;border:none;cursor:pointer; color:var(--text);font-size:1rem;font-weight:700;}
.dialog__close:hover{color:var(--goldText)}
.dialog__title{margin-bottom:18px;font-size:1.3rem;padding-right:70px}
.dialog--sm .dialog__title{margin-bottom:10px}
.dialog__desc{margin-bottom:16px;line-height:1.9}

/* 検索フォーム */
.search-form{display:flex;flex-wrap:wrap}
.search-form__field{position:relative;flex:1 1 280px}
.search-form__icon{ position:absolute;left:14px;top:50%;transform:translateY(-50%); display:flex;color:var(--muted);pointer-events:none;}
input.search-form__input{ width:100%; min-height:60px; font-size: 100%; padding:8px 14px 8px 50px; border:2px solid var(--line); border-radius: .5em 0 0 .5em; border-right: 0; background:var(--surface); color:var(--text);}
input.search-form__input:focus {border-color:#f0bd25;}
.search-form__submit{ min-height:60px; min-width:130px; background:var(--gold); color:#333333; font-weight:700; font-size:1.05rem; border: none; border-radius: 0 .4em .4em 0; cursor:pointer;}
.search-form__submit:hover{background:#f0bd25}
.search-kw-title{margin:20px 0 10px;font-weight:700;font-size:1rem}
.search-kw{display:flex;flex-wrap:wrap;gap:8px}
.kw-chip{ padding:8px 20px; background:var(--bg-alt); border: none; border-radius:999px; cursor:pointer; font-size: 100%; color:var(--text);}
.kw-chip:hover{border-color:var(--gold);background:var(--surface-h)}

/* 文字サイズ／背景色の選択ボタン */
.opt-row{display:flex;gap:12px}
.opt-btn{ flex:1;min-height:80px; display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px; background:var(--surface);border:2px solid var(--line);border-radius:12px;cursor:pointer; color:var(--text);font-size:1.05rem;font-weight:700;}
.opt-btn--swatch{gap:6px}
.opt-btn:hover{border-color:var(--gold)}
[data-opt][aria-pressed="true"]{background:var(--gold) !important;border-color:#7A5C00 !important;color:#333333 !important}
.opt-btn__sample--m{font-size:1.2rem}
.opt-btn__sample--l{font-size:1.5rem}
.opt-btn__swatch{width:26px;height:26px;border-radius:50%;border:2px solid #8A8468}
.opt-btn__swatch--light{background:#FAF7EF}
.opt-btn__swatch--dark{background:#1A1A1A}

/* ------------------------------------------------------------
   15. アニメーション抑制（prefers-reduced-motion）
   ------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce){ html{scroll-behavior:auto}
[data-fv-slide]{transition:none;animation:none !important}
.helpbox--open,.helpbox--closing{animation:none}
.helpbox-backdrop{transition:none}
}

/* ------------------------------------------------------------
   16. 背景色「黒」選択時の調整
   ------------------------------------------------------------
   方針：写真やテクスチャ画像を背景に持つエリア
   （FV・緊急救急・特徴〜交通アクセス・フッター）は
   「画像は反転しない」ルールに合わせてライト配色のまま表示し、
   それ以外（ヘッダー・ナビ・外来・お知らせ・ダイアログ等）を
   ダークパレットに切り替える */

/* body の背景はハードコードの #fffdfd ではなく変数に追従させる */
body[data-theme="dark"]{background:var(--bg)}

/* 画像背景エリアはライト時の配色を丸ごと維持（明るい島）。
   ※特徴（.features）は紙テクスチャ上の文字のみ維持し、
     交通アクセス（.access）はダークに切り替える */
body[data-theme="dark"] .fv,
body[data-theme="dark"] .emergency,
body[data-theme="dark"] .features,
body[data-theme="dark"] .site-footer{ --bg:#FAF7EF; --bg-alt:#F2EDDF; --surface:#fffefa; --surface-h:#F5EED8; --footBg:#F2ECDA; --line:#D9D2BE; --text:#333333; --muted:#5B5648; --goldText:#7A5C00; --link:#0044CC; --linkHover:#002E8A; --focus:#7A5C00; --dotOff:#8A8468; --docBlue:#0044CC; --docGreen:#1B7A3D; --docRed:#C0392B;color:var(--text);}

/* ヘッダーのロゴ：ダーク背景では見えないため明るいチップを敷く */
body[data-theme="dark"] .site-header .brand-logo{ background:var(--logoChip); border-radius:8px; padding:2px 6px;}

/* ゴールド背景（担当医表ヘッダー・選択中タブ）に
   ダーク用の明色文字が乗ると読めないため濃色に固定 */
body[data-theme="dark"] .doc-table thead th{color:#333333}
body[data-theme="dark"] [data-cat-active="true"]{color:#333333}

/* タブのホバー色：固定の #7A5C00 はダーク背景で読めない */
body[data-theme="dark"] .cat-btn:hover{color:var(--goldText)}

/* 一覧ボタン：文字色 var(--surface) がダークでは暗色になるため明色へ */
body[data-theme="dark"] .btn-outline{color:#fffdfd}

/* お知らせのカテゴリーピル：白地に明るいゴールドは読めないため透過に */
body[data-theme="dark"] .news-item__cat{background:transparent}

/* ダイアログ（検索・文字サイズ・背景色）はダーク面に */
body[data-theme="dark"] .dialog{background:var(--surface)}

/* 特徴セクション内の白い面（ボタン・当院についてカード）はダーク面へ。
   ※.features は明るい島スコープ内のため、ダークパレットを直接指定する */
body[data-theme="dark"] .feature__btn{ background:#262626;border-color:#4A4A44;color:#F2EFE6;}
body[data-theme="dark"] .feature__btn:hover{background:#33301F;color:#e3ad0a}
body[data-theme="dark"] .feature__btn .ico--gold{color:#e3ad0a}
body[data-theme="dark"] .about-card{background:#262626;color:#F2EFE6}
body[data-theme="dark"] .about-card:hover{color:#F2EFE6}
body[data-theme="dark"] .about-card__title{color:#e3ad0a}

/* 交通アクセス：背面の白パネルと来院方法カードをダーク面へ */
body[data-theme="dark"] .access:before{background:var(--surface)}
body[data-theme="dark"] .access-card:hover{background:var(--surface-h);border-color:var(--line)}

/* ------------------------------------------------------------
   17. お困りごとサポート（画面右下の固定アコーディオン）
   ------------------------------------------------------------ */
.helpbox{position:fixed;right: 1%;bottom: 0;z-index:80;width:min(360px,calc(100vw - 24px));display:flex;flex-direction:column;align-items:stretch;gap:0;}
.helpbox.helpbox--open,.helpbox.helpbox--closing{z-index:888;}
/* 開いている間の黒背景（検索ポップアップの .overlay と同じ色）。
   helpbox はスライドアニメーションで transform されるため別要素（HTML側 #helpbox-backdrop）。
   スライドに合わせてフェードイン／アウトし、表示切替はJSが .is-show で行う */
.helpbox-backdrop{position:fixed;inset:0;z-index:887;background:rgba(20,18,10,.55);opacity:0;visibility:hidden;transition:opacity .4s ease,visibility 0s linear .4s;}
.helpbox-backdrop.is-show{opacity:1;visibility:visible;transition:opacity .4s ease;}
.helpbox__toggle{display:inline-flex;align-items:center;gap:10px;min-height:56px;padding:10px 22px;background:#1B7A3D;color:#fffdfd;border:none;border-radius: 1em 1em 0 0;cursor:pointer;font-size:1rem;font-weight:700;box-shadow:0 4px 14px rgba(0,0,0,.25);-webkit-transition:background-color .25s ease;transition:background-color .25s ease;}
.helpbox__toggle:hover{background:#166332;}
.helpbox__toggle{position:relative;z-index:1}
.helpbox__toggle-chev{transform:rotate(180deg);-webkit-transition:transform .25s ease;transition:transform .25s ease;margin-left: auto;}
.helpbox--open .helpbox__toggle-chev{transform:rotate(0)}
.helpbox__panel{ width:100%; background:var(--surface);border:1px solid var(--line);border-top:none; border-radius:0; box-shadow:0 18px 42px rgba(40,32,8,.28); padding:18px 18px 10px; max-height:calc(100svh - 140px); overflow-y:auto;}
.helpbox__panel[hidden]{display:none}
/* 開閉アニメーション（参考動画準拠）：
   バー＋パネルが一体のまま、バーだけ画面内に残る位置
   （translateY(100% − バー高3.5rem)）から上へスライドして開き、
   閉じるときは同じ軌道で画面下へ下がる。閉じ完了までパネルはJSが表示を維持する */
.helpbox--open{animation:helpboxRise .4s cubic-bezier(.16,.84,.32,1)}
.helpbox--closing{animation:helpboxFall .4s cubic-bezier(.6,.1,.7,.3) forwards}
@keyframes helpboxRise{from{transform:translateY(calc(100% - 3.5rem))}to{transform:translateY(0)}}
@keyframes helpboxFall{from{transform:translateY(0)}to{transform:translateY(calc(100% - 3.5rem))}}
.helpbox__heading{font-weight:700;color:var(--muted); margin-bottom:.2em;}
a + .helpbox__heading{margin-top:1em;}
.helpbox__link{display:flex;align-items:center;gap:10px;min-height:52px;padding: .4em .5em;border-radius:.4em;border:1px solid #f6ffea;background:#f6ffea;color:var(--Text);text-decoration:none;line-height:1.4;-webkit-transition:background-color .25s ease,color .25s ease;transition:background-color .25s ease,color .25s ease;}
.helpbox__link:hover{color:#1B7A3D;border-color:#1B7A3D; background:var(--white);}
.helpbox__link + .helpbox__link {margin-top:.3em;}
.helpbox__ico{color:var(--docGreen);}
.helpbox__chev{margin-left:auto;}
.helpbox__faq{ display:flex;align-items:center;justify-content:center;gap:8px; min-height:52px;margin-top:6px;padding:4px 8px; color:var(--link);font-weight:700;}
.ico.ico--gold.helpbox__chev {color:#1B7A3D;}
.helpbox__link:hover .ico.ico--gold.helpbox__chev  { margin-right:.2em;}

/* ------------------------------------------------------------
   18. スマホ対応（〜880px）
   ------------------------------------------------------------ */
/* スマホ専用要素（PCでは非表示） */
.sp-bar{display:none}
.spmenu{display:none}
.scroll-hint{display:none}

/* お知らせカテゴリーのプルダウン（PCでは非表示、スマホで表示） */
.news__cats-select-wrap{display:none}
select.news__cats-select{ width:100%;min-height:60px;padding:8px 16px; font-size:1.05rem;font-weight:700;color:var(--text); background:var(--surface);border:2px solid var(--line);border-radius:.5em;}

@media (max-width:880px){
.br-sp{display:inline}
.gnav__cell:first-child{display:none}
.gnav__inner{grid-template-columns:repeat(3,1fr)}
[data-navbtn][aria-expanded="true"]{background: var(--gold); }
button.gnav__item {border-radius: .5em;border: 2px solid #eee;}
  /* FV：スライダー操作を下辺で横並び・中央揃え */
.fv__controls{top:auto;left:0;right:0;bottom:0}
.fv__ctrl-group{ flex-direction:row;justify-content:center; width:100%;height:auto; border-left:none;border-top:1px solid var(--line); padding:4px 8px; }
.fv__arrow{width:48px;height:48px}
  /* 縦並び用の上下矢印を、横並びでは左右向きに回転させる */
.fv__arrow svg{transform:rotate(-90deg)}
.fv__dot{width:44px;height:44px}
.fv__pause{ flex-direction:row;gap:6px; width:auto;min-height:48px; border-top:none;border-left:1px solid var(--line); margin:0 0 0 8px;padding:0 12px; }
.fv__copy{right:16px;bottom:calc(56px + 20px)}

  /* FVスマホ用画像（1200x1360）。横に広めに作られているため、
     PCの scale(1.07) ズームは使わず、cover の余剰幅ぶんを
     background-position だけで左右にパンする（拡大なし） */
.fv__slide--1{background-image:url(../img/fv1_sp.jpg)}
.fv__slide--2{background-image:url(../img/fv2_sp.jpg)}
.fv__slide--3{background-image:url(../img/fv3_sp.jpg)}
[data-fv-slide][data-fv-active="true"]{animation-name:fvPanSp}

  /* お知らせ：カテゴリーはプルダウン式に */
.news__cats{display:none}
.news__cats-select-wrap{display:block}

  /* リンクパネル：1列につき2個 */
.quicklinks__grid{grid-template-columns:repeat(2,1fr)}
.quicklinks__row{grid-template-columns:repeat(2,1fr)}

  /* 特徴01〜03：テキスト上・画像下 */
.feature{flex-direction:column;align-items:stretch}
.feature__body{order:1;max-width:none;flex: initial;}
.feature__photo{order:2;max-width:none;flex: initial;}
.feature__btn {width:100%;}

  /* 当院について：テキスト上・無限スライド下 */
.about-card{flex-direction:column}
.about-card__photo{flex:none;width:100%;min-height:0;height:200px}

  /* お困りごと：画面下に左右下2%あけて固定、下から上に展開 */
.helpbox{left:2%;right:2%;bottom: 1%;align-items:stretch}
.helpbox__toggle{width:100%;justify-content:center;border-radius: .5em;}
.helpbox__panel{width:100%}

  /* 上へ戻るボタンはお困りごとバーの上に退避 */
.to-top{right:2%;bottom:calc(2% + 70px)}

  /* --- お困りごと：スマホは浮きバー。開時は緑バーの下にパネルが伸びる --- */
.helpbox{width:auto}
.helpbox__toggle{border-radius:1em}
.helpbox--open .helpbox__toggle{border-radius:1em 1em 0 0}
.helpbox__panel{border-radius:0 0 1em 1em;border-bottom:1px solid var(--line)}

  /* --- ヘッダー1段目：ロゴ｜検索｜メニュー（上部固定バー） --- */
.sp-bar{ display:flex; position:sticky; top:0; z-index:95; align-items:center; justify-content:space-between; gap:8px; background:var(--head); }
.sp-bar__logo {text-decoration:none;}
.sp-bar__logo img{height: 44px;width:auto;display:block;margin: 0 0 0 10px;}
.site-header__manager {font-size: 9px;color: var(--text);margin-left: 7%;}
.sp-bar__tools{display:flex;}
.sp-bar .tool-btn{width: 64px;height: 64px;border-radius: 0;border: none;}
.tool-btn#btn-open-search-sp {background:var(--white);}
.sp-bar button#spmenu-toggle {background: var(--gold);}
.sp-bar button#spmenu-toggle .tool-btn__icon { color:var(--text);}
.sp-bar .tool-btn span, #spmenu-toggle-label {font-size:90%;}
.sp-bar svg[hidden]{display:none}
.site-header__inner {padding: .4em 0 .4em 2%;}
.site-header__tools {gap:5px;}
.site-header__inner .tool-btn {background:var(--surface-h);border-radius:.4em;}
.site-header__inner .tool-btn span + span { font-size:80%;}
.site-header__brand{display:none}
#btn-open-search{display:none} 
.site-header__right{width:100%;flex-wrap:nowrap;justify-content:space-between}
.site-header__tel-block{flex:1;min-width:0}
.site-header__tel-block .tel-link{font-size: 260%;white-space:nowrap}
.gnav{position:relative;top:auto}
.gnav-sub{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;padding:1rem;background:rgba(20,18,10,.55);}
.gnav-sub__panel{width:100%;max-width:480px;max-height:calc(100svh - 2rem);overflow-y:auto;border-radius:1em;}

  /* --- 見出しを1.5倍に --- */
.section-title{font-size:2.1rem;margin-bottom: .3em;}
.access .section-title{font-size:2.55rem}

  /* --- 担当医表の横スクロールヒント --- */
.outpatient__table-body{position:relative}
.scroll-hint{ display:block;position:absolute;left:50%;top:55%; transform:translate(-50%,-50%); background:rgba(40,32,8,.78);color:#fffdfd; font-weight:700;padding:10px 16px;border-radius:999px; pointer-events:none;white-space:nowrap; -webkit-transition:opacity .3s ease,visibility .3s ease; transition:opacity .3s ease,visibility .3s ease; }
.scroll-hint.is-hidden{opacity:0;visibility:hidden}

  /* --- お知らせ：一覧ボタンをリストの下へ --- */
.news__inner{display:flex;flex-direction:column}
.news__head{display:contents}
.news__head .section-title{order:1;margin-bottom:22px}
.news__layout{order:2}
.news__head .news__more{order:3;margin-top:24px;justify-content:center}

.features__heading {font-size: 2.1rem;}

  /* --- 車・電車・バス：PC同様に1行3列 --- */
.access__row{grid-template-columns:repeat(3,1fr);gap:8px}
.access-card{min-height:150px;padding:14px 6px;gap:10px}
.access-card__icon{width:min(64px,60%)}

  /* --- フッター：ロゴ〜電話番号は中央揃え、ナビは1行2個 --- */
.site-footer__org{text-align:center}
.site-footer__tel-row{justify-content:center}
.site-footer__links{grid-template-columns:repeat(2,minmax(0,1fr))}

  /* --- スマホ用メニュー（ハンバーガー） --- */
.spmenu:not([hidden]){display:block}
.spmenu{ position:fixed; left:0; right:0; bottom:0; top:76px; z-index:94; background: var(--white); overflow-y:auto; animation:spmenuIn .25s ease; }
.spmenu__inner{padding:20px 16px 60px;display:flex;flex-direction:column;gap: 1em;}
.spmenu__tel{text-align:center}
.spmenu__addr{margin-top:6px}
.spmenu__quick{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.spmenu__quick-item{ display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px; min-height:96px;padding:10px 8px; background:var(--surface);border:1px solid var(--line);border-radius:.5em; color:var(--text);font-weight:700;text-decoration:none; text-align:center;line-height:1.4; }
.spmenu__quick-item svg{flex:none}
.spmenu__quick-item--pink{color:#e4317b; border:1px solid color-mix(in srgb, #e4317b 25%, transparent); background:var(--white) linear-gradient(
color-mix(in srgb, #e4317b 14%, transparent),
color-mix(in srgb, #e4317b 0%, transparent)) no-repeat 0% 100% / 100% 200%;}
.spmenu__quick-item--green{color:#0a9a90; border:1px solid color-mix(in srgb, #0a9a90 25%, transparent); background:var(--white) linear-gradient(
color-mix(in srgb, #0a9a90 14%, transparent),
color-mix(in srgb, #0a9a90 0%, transparent)) no-repeat 0% 100% / 100% 200%;}
.spmenu__quick-item--orange{color:#d34111; border:1px solid color-mix(in srgb, #d34111 25%, transparent); background:var(--white) linear-gradient(
color-mix(in srgb, #d34111 14%, transparent),
color-mix(in srgb, #d34111 0%, transparent)) no-repeat 0% 100% / 100% 200%;}
.spmenu__quick-item--purple{color:#776ed8; border:1px solid color-mix(in srgb, #776ed8 25%, transparent); background:var(--white) linear-gradient(
color-mix(in srgb, #776ed8 14%, transparent),
color-mix(in srgb, #776ed8 0%, transparent)) no-repeat 0% 100% / 100% 200%;}
.spmenu__small{font-size:.8em}
.spmenu__info{display:grid;grid-template-columns: 1.2fr 1fr;gap:14px;padding: 4%;background: var(--bg);border-radius: .5em;}
.spmenu__info-col:nth-child(2) .spmenu__info-title{background: var(--docRed);}
.spmenu__info-col .spmenu__info-title ~ p{font-feature-settings: "palt";}
.spmenu__info-title{font-weight:700;color: var(--white);margin-bottom: .2em;padding: .2em .2em .1em;text-align: center;border-radius: 999px;background: var(--goldText);}
.spmenu__info-label{ display:inline-block;background:var(--bg-alt);border-radius:6px; padding:0 12px;font-weight:700;margin-top:6px; }
.spmenu__nav{display:flex;flex-direction:column;border-top:1px solid var(--line)}
.spmenu__group{border-bottom:1px solid var(--line)}
.spmenu__group-head{display:flex;align-items:stretch}
.spmenu__group-link{ flex:1;display:flex;align-items:center;min-height:60px;padding:8px 6px; color:var(--text);font-weight:700;text-decoration:none; }
.spmenu__acc{ width:60px;min-height:60px;flex:none; display:flex;align-items:center;justify-content:center; border:none;background:transparent;cursor:pointer;color:var(--goldText); }
.spmenu__plus{position:relative;width:18px;height:18px;display:block}
.spmenu__plus::before,
.spmenu__plus::after{content:"";position:absolute;background:currentColor;border-radius:2px}
.spmenu__plus::before{left:0;right:0;top:7.5px;height:3px}
.spmenu__plus::after{ top:0;bottom:0;left:7.5px;width:3px; -webkit-transition:transform .2s ease;transition:transform .2s ease; }
.spmenu__acc[aria-expanded="true"] .spmenu__plus::after{transform:scaleY(0)}
.spmenu__sub{display:flex;flex-direction:column;padding-bottom:10px}
.spmenu__sub[hidden]{display:none}
.spmenu__sub a{display:flex;align-items:center;min-height:56px;padding:6px 16px;color:var(--text);text-decoration:none;border-top:1px dashed var(--line); }
}
@keyframes spmenuIn{ from{opacity:0;transform:translateY(-8px)}
to{opacity:1;transform:translateY(0)}
}

/* ------------------------------------------------------------
   19. 500px以下：文字サイズ標準を全体で 4vw に
   ------------------------------------------------------------
   基準：4vw = 16px となる幅400pxで従来と同一の見た目。
   幅320〜500pxでは画面幅に比例して全体が等倍で拡縮する。
   そのため、スマホ表示に関わる固定px指定を rem（1rem = 4vw）へ
   換算して上書きする（換算は 16px = 1rem）。
   ※アイコンSVGは width/height 属性（px）を持つため、
     CSSで rem 指定して属性を上書きしスケールさせる */
@media (max-width:500px){
html{font-size:4vw}
/* 文字サイズ「大」＝ 4vw × 115% */
html[data-fsize="l"]{font-size:4.6vw}
.section-title{font-size:160%;gap: .2em;}
.access .section-title{font-size:160%;gap: .2em;}

/* 右ブリード：コンテンツ左右余白（1rem）と揃える */
:root{--bleed-right:-1rem}

/* --- ヘッダー2段目（電話＋文字サイズ・背景色） --- */
.tool-btn{min-width:4.75rem;min-height:4.5rem;gap:.125rem;padding:.5rem .375rem}
.tool-btn__icon svg{width:1.625rem;height:1.625rem}
.site-header__tools{gap:.3125rem}
.site-header__tel-block .tel-link{font-size:210%} 

/* --- スマホ用固定バー --- */
.sp-bar{gap:.5rem}
.sp-bar__logo img{height:2.5rem;margin:0 0 0 .625rem}
.site-header__manager {font-size: 11px; text-align:center;font-feature-settings: "palt"; }
.sp-bar .tool-btn{width:4rem;height:4rem}

/* --- グローバルナビ --- */
.gnav__inner{margin:.3125rem auto 0;gap:.25rem}
.gnav__item{min-height:5rem;padding:.5rem .125rem;gap:.125rem;font-size: 85%;}
.gnav__icon svg{width:1.625rem;height:1.625rem}
.gnav__item > .ico--gold{width:.875rem;height:.875rem}

/* --- ナビのサブメニュー（中央ポップアップ） --- */
.gnav-sub{padding:1rem}
.gnav-sub__panel{padding:1.25rem 1.375rem 1.5rem}
.gnav-sub__header{gap:.625rem}
.gnav-sub__head{gap:.875rem;min-height:3.75rem;padding:.125rem .25rem .625rem}
.gnav-sub__head .ico{width:1.625rem;height:1.625rem}
.gnav-sub__close{width:4rem;height:4rem;gap:.125rem}
.gnav-sub__close svg{width:1.25rem;height:1.25rem}
.gnav-sub__grid{padding-top:1rem}
.gnav-sub__cell{padding-bottom:.1875rem}
.gnav-sub__link{gap:.75rem;min-height:3.75rem;padding:.375rem}
.gnav-sub__link .ico{width:1.125rem;height:1.125rem}

/* --- メインビジュアル --- */
.fv{min-height:35rem}
/* タイトルはスマホ（500px以下）のみ縦書き。
   右列「家族のように、」→左列「あなたを支えたい。」の2列
   （改行は ≤880px で表示される .br-sp を利用） */
.fv__title{margin-bottom:1.125rem;writing-mode:vertical-rl;width:fit-content;}
.fv__title .fv__band{padding: .25rem 0 0 0;font-feature-settings: "palt";￥:no-autospace;} /* 縦書きのため文字前の余白は上側 */
.fv__lead .fv__band{padding: .125em 0 .125em .5em;font-size: 3vw;font-weight: 400;font-feature-settings: "palt";}
.fv__lead {line-height: 1.4;}
.fv__copy{left:1rem;right:1rem;bottom:calc(3.5rem + 1.25rem)}
.fv__ctrl-group{padding:.25rem .5rem;gap:.125rem}
.fv__arrow{width:3rem;height:3rem}
.fv__arrow svg{width:1.375rem;height:1.375rem}
.fv__dot{width:2.75rem;height:2.75rem}
.fv__dot-mark{width:1rem;height:1rem}
.fv__pause{min-height:3rem;margin:0 0 0 .5rem;padding:0 .75rem;gap:.375rem}
.fv__pause-icon svg{width:1.25rem;height:1.25rem}

/* --- 外来診療のご案内／本日の外来担当医 --- */
.outpatient{padding:1.875rem 1rem 3em;gap:1.5rem 1.75rem}
.sub-title{margin-bottom:.875rem}
.time-grid__label{border-radius:.5rem;padding:.625rem 1.125rem}
.outpatient__cta{gap:.75rem}
.btn-gold{min-height:4.125rem;padding:1rem .625rem;gap:.625rem;font-feature-settings: "palt";}
.btn-gold .ico{width:1.25rem;height:1.25rem}
.doc-table{min-width:33.125rem}
.doc-table th,.doc-table td{padding:.625rem .25rem}
.doc-table .cell-oncall{padding:.5rem}
.scroll-hint{padding:.625rem 1rem}

/* --- 緊急・救急のご案内 --- */
.emergency__card{padding:1.375rem 1rem}
.emergency__title{gap:.75rem}
.emergency__title .ico{width:1.75rem;height:1.75rem}
.emergency__text .sub-title{margin-bottom:.625rem}
.emergency__tel-box{padding:1.125rem 1.4375rem}

/* --- 最近のお知らせ --- */
.news{margin-top:1.625rem}
.news__inner{padding:1.875rem 1rem}
.news__head .news__more{margin-top:1.5rem}
.news__layout{gap:1.75rem}
.news__side{gap:1.5rem}
select.news__cats-select{min-height:3.75rem;padding:.5rem 1rem}
.news-item{gap:.625rem 1.375rem;padding:1.25rem .5rem;min-height:6rem;position: relative;}
.news-item__meta{gap:.375rem}
.news-item__cat{padding:.125rem 1rem}
.news-item__chev{width:1.25rem;height:1.25rem;position: absolute;right: 0;}
.news-item__title {padding-right:1em;}
.btn-outline{min-height:3.875rem;padding:.625rem 1.875rem;gap:.625rem}
.btn-outline .ico{width:1.25rem;height:1.25rem}

/* --- リンクパネル --- */
.quicklinks{padding:0 1rem}
.quicklinks__grid{gap:.75rem}
.panel-link{min-height:8.375rem;padding:1rem .5rem}
.panel-link__icon svg{width:4.375rem;height:4.375rem}
.panel-link__label .ico{width:1rem;height:1rem}
.quicklinks__row{gap:.75rem}
.row-link{padding: .5rem .4rem .5rem 1rem;gap: 0;}
.row-link .ico{width:1.125rem;height:1.125rem}

/* --- 3つの特徴 --- */
.tokutyo:before{height: 5.25em;}
.features__inner{padding:0 1rem}
.features__heading{font-size: 160%;}
.features__list{gap:2.25rem}
.feature{gap:1.5rem}
.feature__head{gap:1.125rem}
.feature__text{margin-bottom:1.375rem}
.feature__btn{min-height:3.75rem;padding:.5rem 1.25rem;gap:.625rem}
.feature__btn .ico{width:1.125rem;height:1.125rem}
.feature__photo img{border-radius:.75rem}
.feature__photo--bleed img{border-radius:.75rem 0 0 .75rem}
.about-card{margin-top:2.5rem;border-radius:.875rem}
.about-card__body{padding:2rem 1.25rem;gap:.5rem}
.about-card__title .ico{width:1.25rem;height:1.25rem}
.about-card__photo{height:12.5rem}

/* --- 交通アクセス --- */
.access{padding:0 1rem 5em}
.access__name{margin-bottom:1rem}
.access-grid{gap:.75rem .875rem;margin-bottom:1.125rem}
.access-grid__label{border-radius:.5rem;padding:.5rem .875rem}
.access-grid__value{padding-top:.375rem}
.ext-link .ico{width:1.25rem;height:1.25rem}
.access__iframe{height:25rem}
.access__row{gap:.5rem}
.access-card{min-height: initial;padding: 0 0 .2em;gap: .3em;border-radius: .5em;font-size: 80%;}
.access-card:nth-child(1),.access-card:nth-child(3){ gap:0; }
.access-card__icon{width:min(4rem,60%)}
.access-card__label .ico{width:1.125rem;height:1.125rem;display: block;}

/* --- フッター --- */
.site-footer__inner{padding-left:1rem;padding-right:1rem;gap:1.75rem 2.5rem}
.site-footer__manager{margin:.5rem 0 1rem}
.site-footer__addr{margin-bottom:.25rem}
.site-footer__tel-row{gap:.375rem}
.site-footer__links{gap:.8em .875rem}
.foot-link{gap:.375rem;padding:.25rem .125rem}
.foot-link .ico--gold{width:1rem;height:1rem}
.site-footer__copy{padding:1rem .75rem}

/* --- ページ上部へ戻る --- */
.to-top{width:4.375rem;height:4.375rem;gap:.0625rem;bottom:calc(2% + 4.375rem)}
.to-top svg{width:1.25rem;height:1.25rem}

/* --- お困りごとサポート --- */
.helpbox__toggle{min-height:3.5rem;padding:.625rem 1.375rem;gap:.625rem}
.helpbox__toggle .ico{width:1.375rem;height:1.375rem}
.helpbox__toggle .helpbox__toggle-chev{width:1rem;height:1rem}
.helpbox__panel{padding:1.125rem 1.125rem .625rem}
/* ※padding は元ルールが .4em .5em（em指定＝4vw基準に自動追従）のため上書きしない */
.helpbox__link{min-height:3.25rem;gap:.625rem}
.helpbox__ico{width:1.375rem;height:1.375rem}
.helpbox__link .helpbox__chev{width:1rem;height:1rem}
.helpbox__faq{min-height:3.25rem;margin-top:.375rem;padding:.25rem .5rem;gap:.5rem}
.helpbox__faq .ico{width:1rem;height:1rem}

/* --- ポップアップ（検索／文字サイズ／背景色） --- */
.overlay{padding:1.5rem 1rem}
.dialog{padding:1.5rem;border-radius:1rem}
.dialog__close{top:.625rem;right:.625rem;width:4rem;height:4rem;gap:.125rem;font-size: 80%;}
.dialog__close svg{width:1.375rem;height:1.375rem}
.dialog__title{margin-bottom:1.125rem;padding-right:4.375rem}
.dialog--sm .dialog__title{margin-bottom:.625rem}
.dialog__desc{margin-bottom:1rem}
.search-form__icon{left:.875rem}
.search-form__icon svg{width:1.5625rem;height:1.5625rem}
input.search-form__input{min-height:3.75rem;padding:.5rem .875rem .5rem 3.125rem}
.search-form{flex-wrap:nowrap}
.search-form__field{flex:1 1 auto;min-width:0}
.search-form__submit{min-height:3.75rem;min-width:auto;flex:none;padding:0 1em}
.search-kw-title{margin:1.25rem 0 .625rem}
.search-kw{gap: .5rem .2em;}
.kw-chip{padding: .5rem 1em;}
.opt-row{gap:.75rem}
.opt-btn{min-height:5rem;border-radius:.75rem;gap:.125rem}
.opt-btn--swatch{gap:.375rem}
.opt-btn__swatch{width:1.625rem;height:1.625rem}

/* --- スマホ用メニュー（ハンバーガー） --- */
.spmenu__inner{padding:1.25rem 1rem 3.75rem}
.spmenu__addr{margin-top:.375rem}
.spmenu__quick{gap:.625rem}
.spmenu__quick-item{min-height:6rem;padding:.625rem .5rem;gap:.375rem}
.spmenu__quick-item svg{width:1.875rem;height:1.875rem}
.spmenu__info{gap: 4%;font-size: 70%;}
.spmenu__info-title{font-size: 130%;}
.spmenu__info-label{padding:0 .75rem;margin-top:.375rem}
.spmenu__group-link{min-height:3.75rem;padding:.5rem .375rem}
.spmenu__acc{width:3.75rem;min-height:3.75rem}
.spmenu__sub a{min-height:3.5rem;padding:.375rem 1rem}
}
