/* ===== Reset (remove page edge gaps) ===== */
html{margin:0;padding:0;overflow-x:hidden;background:#e5ffcc;height:100%;}
body{margin:0;padding:0;overflow-x:hidden;background:transparent;min-height:100%;}
*,*::before,*::after{box-sizing:border-box}

/* ===== Tokens / Responsive base ===== */
:root{
  --container: 1100px;
  --page-narrow: calc(var(--container) * .8); /* 本文狭幅=80%（特集レールの内側幅） */
  --gap: 16px;

  /* Layout */
  --header-h: 58px;
  --header-max: 120px; /* iOS Safari対策: ヘッダーの暴走上限 */

  /* Feature rails */
  --feature-rail-w: 240px;
  --feature-rail-gutter: 12px;

  /* Colors */
  --pink-50:#fff5fa;
  --pink-100:#ffe4f1;
  --pink-500:#FFAEAC;
  --pink-600:#db2777;
  --lime-400:#a3e635;
  --lime-500:#84cc16;
  --lime-600:#65a30d;
  --ink:#1f2937;
  --line:#e5e7eb;
  --surface:#ffffff;

  /* Headings */
  --heading-bar:#84cc16;
}

/* コンテナ余白（モバイルで広がりすぎない） */
.container{max-width:var(--container);margin-inline:auto;padding-inline:clamp(12px,2vw,20px);}

/* 画像は縮小に追随 */
img{max-width:100%;height:auto;}

/* グリッド */
.grid{display:grid;gap:var(--gap);}
.grid-2{grid-template-columns:repeat(2,minmax(0,1fr));}
.grid-3{grid-template-columns:repeat(3,minmax(0,1fr));}
.grid-4{grid-template-columns:repeat(4,minmax(0,1fr));}
@media (max-width:1024px){
  .grid-3{grid-template-columns:repeat(2,1fr);}
  .grid-4{grid-template-columns:repeat(3,1fr);}
}
@media (max-width:640px){
  .grid-2,.grid-3,.grid-4{grid-template-columns:1fr;}
}

/* Flexの折返し */
.flex{display:flex;gap:var(--gap);}
.wrap{flex-wrap:wrap;}
.items-center{align-items:center;}
.justify-between{justify-content:space-between;}

/* ボタン/ピルのモバイル最適化 */
.btn,.pill{white-space:nowrap;}
@media (max-width:640px){ .btn{width:100%;} }

/* ===== Hero ===== */
.hero-bleed{
  position:relative;left:50%;right:50%;
  margin-left:-50vw;margin-right:-50vw;width:100vw;border-radius:0;
}
.hero{
  position:relative;overflow:hidden;border-radius:0;display:grid;place-items:center;text-align:center;
  min-height:clamp(560px,96vh,1100px);
}
@media (max-width:1024px){ .hero{min-height:72vh;} }
@media (max-width:640px){ .hero{min-height:64vh;} }
.hero::before{
  content:"";position:absolute;inset:0;background:url('/images/hero.jpg') center/cover no-repeat;filter: brightness(.90);z-index:0;pointer-events:none;
}
.hero::after{content:"";position:absolute;inset:0;background:none !important;z-index:0;pointer-events:none;}
.hero-inner{position:relative;z-index:1;text-align:center;color:#fff;padding:36px 16px;}
.hero-title{font-size:clamp(24px,3.2vw,40px);font-weight:800;line-height:1.2;}
.hero-lead{font-size:clamp(14px,2vw,18px);opacity:.95;margin-top:8px;}
.searchbar{display:flex;gap:12px;justify-content:center;margin-top:18px;}
.searchbar .input{width:min(560px,90vw);}
@media (max-width:640px){
  .searchbar{flex-direction:column;align-items:stretch;}
  .searchbar .input,.searchbar .btn{width:100%;}
}

/* ================= Buttons / Pills / Inputs ================= */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:.5rem;
  padding:.55rem 1rem;border-radius:9999px;border:1px solid transparent;
  text-decoration:none;font-weight:600;line-height:1;cursor:pointer;transition:.15s ease-in-out;
  box-shadow:0 1px 2px rgba(0,0,0,.04);
}
.btn:focus-visible{outline:0;box-shadow:0 0 0 3px rgba(132,204,22,.35);}
.btn:disabled{opacity:.6;cursor:not-allowed;}
.btn-primary{background:var(--pink-500);border-color:var(--pink-500);color:#fff;}
.btn-primary:hover{background:var(--pink-600);border-color:var(--pink-600);}
.btn-outline{background:#fff;color:var(--pink-500);border-color:var(--pink-500);}
.btn-outline:hover{background:rgba(236,72,153,.08);}
.btn-accent{background:var(--lime-500);border-color:var(--lime-500);color:#113100;}

.input{
  display:inline-block;width:min(560px,90vw);
  padding:.6rem .9rem;border:1px solid var(--line);border-radius:12px;background:#fff;color:var(--ink);
}
.input:focus{outline:none;border-color:var(--pink-500);box-shadow:0 0 0 3px rgba(236,72,153,.15);}

.pill{
  display:inline-flex;align-items:center;gap:.35rem;padding:.45rem .8rem;border-radius:9999px;border:1px solid var(--line);background:#fff;color:var(--ink);
  text-decoration:none;font-weight:600;font-size:.95rem;
}
.pill:hover{border-color:var(--pink-500);color:var(--pink-500);}
.pill.active{background:rgba(236,72,153,.10);border-color:var(--pink-500);color:var(--pink-600);}

/* テキストリンク */
a,a:visited{color:#111;}
a:hover,a:focus{color:#111;text-decoration:underline;}
.link,.btn-link{color:#fff !important;} /* ボタン系の白文字維持 */

/* 一覧カード */
.card{
  display:block;padding:14px;border:1px solid #ffd6d6;border-radius:14px;background:#ffe1de;
  transition:transform .12s ease,box-shadow .12s ease,border-color .12s ease;margin-bottom:16px;
}
.card:hover{transform:translateY(-1px);box-shadow:0 8px 22px rgba(0,0,0,.06);border-color:#dfe3e8;}
.grid>.card{margin:0 !important;} /* gapで揃える */

/* フォーム */
button,[type=button],[type=submit]{cursor:pointer;}
.sm\:hidden{display:none;}

.site-header{
  position:fixed;
  top:0;left:0;right:0;
  z-index:1000;
  height:auto;
  max-height: var(--header-max);          /* ← ヘッダーの上限（iOSでvhが暴れてもここで止める） */
  width:100%;
  background:#D0E4DB;
  color:#000;
  box-shadow:0 2px 10px rgba(0,0,0,.06);
  margin:0;
  border:0;
  overflow: clip;                          /* Safari 16+ / ほか */
}
@supports not (overflow: clip){
  .site-header{ overflow: hidden; }        /* 古いSafari対策 */
}
.site-header::before{content:"";position:absolute;top:0;bottom:0;left:calc(50% - 50vw);right:calc(50% - 50vw);background:inherit;z-index:-1;}
.header-inner{
  display:flex;align-items:center;gap:16px;min-height:var(--header-h);
  max-width:var(--page-narrow) !important;margin:0 auto;padding-inline:clamp(12px,2vw,20px);
}
.brand{color:#000;font-weight:800;letter-spacing:.3px;text-decoration:none;}
.header-nav{margin-left:auto;display:flex;gap:10px;flex-wrap:nowrap;}
/* ---- Brand container must not clip the logo ---- */
.site-header .brand{
  max-width: none !important;
  overflow: visible !important;
}
.site-header .nav-link{color:#000;text-decoration:none;font-weight:700;padding:.45rem .75rem;border-radius:9999px;border:1px solid transparent;}
.site-header .nav-link:hover{background:rgba(255,255,255,.18);border-color:rgba(255,255,255,.22);}

/* 透過ヘッダー（TOP時） */
.site-header.header--over-hero{background:transparent !important;box-shadow:none !important;}
.site-header.header--over-hero::before{display:none !important;}
.site-header.header--over-hero .brand,.site-header.header--over-hero .nav-link{color:#fff !important;text-shadow:0 1px 6px rgba(0,0,0,.25);}
body.past-hero .site-header{background:#D0E4DB !important;box-shadow:0 2px 10px rgba(0,0,0,.06) !important;}
body.past-hero .site-header::before{display:block !important;}
body.past-hero .site-header .brand,body.past-hero .site-header .nav-link{color:#000 !important;text-shadow:none !important;}

/* ===== Main ===== */
.main{
  --page-width:var(--container);
  --page-gutter:clamp(12px,2vw,20px);
  padding-top:var(--header-h);padding-bottom:56px;background:#fff;position:relative;width:100%;
}
.main>.container,
.main>:not(.container):not(.hero):not(.site-header):not(.site-footer){
  max-width:var(--page-narrow) !important;margin-inline:auto;padding-inline:var(--page-gutter) !important;
}

/* 見出し（既存ピル風を打消し→左バー） */
h1,h2,h3,h4{position:relative;padding-left:.75rem;}
.main h3{background:transparent !important;border-radius:0 !important;padding:0 0 0 .75rem !important;color:#111 !important;}
h1::before,h2::before,h3::before,h4::before{
  content:"";position:absolute;left:0;top:-.20em;bottom:-.20em;width:4px;border-radius:2px;background:var(--heading-bar);
}
@media (max-width:640px){ h1,h2,h3,h4{padding-left:.6rem;} h1::before,h2::before,h3::before,h4::before{width:3px;} }
.hero .hero-title,.hero-title{padding-left:0 !important;}
.hero .hero-title::before,.hero-title::before{content:none !important;}

/* ===== Footer ===== */
.site-footer{
  background:#D0E4DB;color:#000;position:relative;width:100%;margin:0;border:0;
  flex:0 0 auto;height:72px;padding:12px 0;box-sizing:border-box;overflow:hidden;
}
.site-footer::before{content:"";position:absolute;top:0;bottom:0;left:calc(50% - 50vw);right:calc(50% - 50vw);background:inherit;z-index:-1;}
.footer-inner{
  max-width:var(--page-narrow) !important;margin:0 auto;padding-inline:clamp(12px,2vw,20px);
  display:flex;align-items:center;justify-content:space-between;gap:10px;
}
.footer-left{display:flex;align-items:center;gap:10px;}
.footer-left .copy{
  white-space: nowrap;
  font-size: .75em;
  line-height: 1.25;
  color: rgba(0,0,0,.72);
  opacity: .85;
}
.footer-right{
  margin-left:auto;display:flex;flex-direction:column; /* 上:policy(1行)/下:brand-variants(2行) */
  align-items:flex-end;justify-content:flex-end;gap:4px;text-align:right;white-space:normal;
}
.site-footer .nav-link{color:#000;text-decoration:none;font-weight:700;}
.site-footer .nav-link:hover{text-decoration:underline;}
.footer-right .policy,
.footer-right .terms{
  display: block;
  white-space: nowrap;
  text-decoration: none;           /* 通常時は下線なしで控えめ */
  color: rgba(0,0,0,.72);          /* 目立たない濃さ */
  font-size: .75em;                /* 小さめ */
  line-height: 1.25;
  opacity: .85;
}
.footer-right .policy:hover,
.footer-right .terms:hover{
  opacity: 1;
  text-decoration: underline;
}

/* 別名群：小さく・2行までで折返し（目立たせない） */
.footer-right .brand-variants{
  display:-webkit-box;           /* 2行まで表示 */
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
  font-size:.5em !important;     /* 小さくして控えめ */
  line-height:1.25 !important;
  opacity:.75 !important;
  white-space:normal !important;
  max-inline-size:40ch;          /* 右端で自然に改行 */
  text-align:right;
}

/* ===== Japan map ===== */
.jmap{padding:0;}
.jmap-stage{
  position: relative;
  aspect-ratio: 3 / 2;                  /* ← 比率固定（3:2） */
  width: 100%;
  background: url("/images/japan-map.svg") center/contain no-repeat;
  border-radius: 14px;
}
.jmap .pin{
  position:absolute;transform:translate(-50%,-50%);background:#fff;color:#e05555;border:1px solid #ffd6d6;border-radius:9999px;padding:.42rem .7rem;font-weight:700;box-shadow:0 2px 8px rgba(0,0,0,.06);text-decoration:none;white-space:nowrap;
}
.jmap .pin:hover{background:#ffe1de;}
.jmap .pin.is-disabled{pointer-events:none;opacity:.55;}
.jmap .p-hokkaido{left:78%;top:16%;}
.jmap .p-tohoku{left:69%;top:30%;}
.jmap .p-kanto{left:66%;top:43%;}
.jmap .p-hokushinetsu{left:60%;top:37%;}
.jmap .p-tokai{left:58%;top:48%;}
.jmap .p-kansai,.jmap .p-kinki{left:53%;top:54%;}
.jmap .p-chugoku{left:42%;top:56%;}
.jmap .p-shikoku{left:46%;top:64%;}
.jmap .p-kyushu-okinawa,.jmap .p-kyushu{left:30%;top:69%;}
@media (max-width:640px){ .jmap-stage{height:320px;} .jmap .pin{font-size:.9rem;padding:.38rem .6rem;} }
#jp-map svg,.jp-map svg{display:block;width:100%;height:auto;}
#jp-map [data-code],.jp-map [data-code]{transition:filter .12s ease;}
.jp-map-wrap{position:relative;padding:0;}
.jp-map-wrap #jp-map{position:relative;}
.jp-map-wrap #jp-map svg{display:block;width:100%;height:auto;border-radius:14px;}
.jp-map-overlay{position:absolute;inset:0;pointer-events:none;}
.jp-map-overlay .chip{
  position:absolute;transform:translate(-50%,-50%);background:#fff;color:#e05555;border:1px solid #ffd6d6;border-radius:9999px;padding:.42rem .7rem;font-weight:700;box-shadow:0 2px 8px rgba(0,0,0,.06);text-decoration:none;white-space:nowrap;pointer-events:auto;
}
.jp-map-overlay .chip:hover{background:#ffe1de;}
.jp-map-wrap + .jmap{display:none !important;}
@media (max-width:640px){ .jp-map-overlay .chip{font-size:.9rem;padding:.38rem .6rem;} }
#jp-map.jp-map-wrap{position:relative;aspect-ratio:3/2;overflow:hidden;}
#jp-map .jp-map-svg svg{display:block;width:100%;height:auto;}
#jp-map .jp-map-overlay{position:absolute;inset:0;pointer-events:none;}
#jp-map .jp-pin{
  position:absolute;transform:translate(-50%,-50%);pointer-events:auto;background:#fff;color:#f2867a;border:1px solid #ffd6d2;border-radius:999px;padding:.35rem .7rem;font-weight:600;font-size:14px;box-shadow:0 1px 6px rgba(0,0,0,.08);white-space:nowrap;
}
@media (max-width:640px){ #jp-map .jp-pin{font-size:12px;padding:.25rem .55rem;} }
#jp-map .jp-map-error{display:grid;place-items:center;min-height:220px;color:#d33;font-weight:600;}
#jp-map .jp-map-svg{position:absolute;inset:0;display:grid;place-items:center;}
#jp-map .jp-map-svg svg{width:100%;height:100%;object-fit:contain;display:block;}
#jp-map .jp-map-overlay{position:absolute;inset:0;pointer-events:none;}
#jp-map .pref-shape{transition:fill .15s ease;outline:none;}
#jp-map .pref-shape:hover,#jp-map .pref-shape.is-hover{fill:#e5ffcc !important;}
#jp-map .pref-shape:focus-visible{outline:2px solid #ffbdb8;outline-offset:2px;}
.pref-shape{transition:fill .18s ease;stroke:#666;stroke-width:.6;}
.pref-shape:hover,.pref-shape.is-hover,.pref-shape:focus{fill:var(--header-green) !important;}

/* ===== Fix: footer height behavior ===== */
html,body{height:100%;}
body{display:flex;flex-direction:column;min-height:100svh;}
main{flex:1 0 auto;}

/* ===== Region detail: outer/inner card colors ===== */
.main .card:has(.card){background:#fff !important;border-color:#ffd6d6;}
.main .card .card{background:#ffe1de !important;border-color:#ffd6d6;margin-bottom:12px;}
.pref-page .card:has(.card){background:#ffe1de !important;border-color:#ffd6d6;}

/* ===== Force equal grid children ===== */
.grid{grid-auto-flow:row;align-items:stretch;}
.grid>*{grid-column:auto !important;grid-row:auto !important;width:auto !important;flex:0 1 auto !important;}
.grid-2{grid-template-columns:repeat(2,minmax(0,1fr)) !important;}
.grid-3{grid-template-columns:repeat(3,minmax(0,1fr)) !important;}
.grid-4{grid-template-columns:repeat(4,minmax(0,1fr)) !important;}
.grid.grid-2>*,.grid.grid-3>*,.grid.grid-4>*,
.main .grid.grid-2>*,.main .grid.grid-3>*,.main .grid.grid-4>*{grid-column:auto !important;grid-row:auto !important;}
.main .grid>*:first-child,.grid>*:first-child,.main .grid>*:nth-child(1),.grid>*:nth-child(1){grid-column:auto !important;grid-row:auto !important;}
.grid>*[style*="grid-column"],.grid>*[style*="grid-row"]{grid-column:auto !important;grid-row:auto !important;}
.grid>*[style*="1 / -1"]{grid-column:auto !important;}
.main .grid>*{min-width:0;width:auto !important;}

/* ===== DEBUG (optional) ===== */
.debug-grid{position:relative;outline:2px dashed #14b8a6;background-clip:padding-box;counter-reset:dbg-item;}
.debug-grid>*{position:relative;outline:2px dashed rgba(96,165,250,.85);background-image:repeating-linear-gradient(45deg,rgba(96,165,250,.08) 0,rgba(96,165,250,.08) 10px,transparent 10px,transparent 20px);}
.debug-grid>*::before{
  content: "# " counter(dbg-item);
  counter-increment: dbg-item;
  position: absolute;
  top: 4px;
  left: 6px;
  font: 600 12px/1.2 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  color: #111;
  background: #fff;
  border: 1px solid #aaa;
  border-radius: 6px;
  padding: 2px 6px;
  z-index: 1;
}
.debug-grid>*[style*="grid-column"],.debug-grid>*[style*="grid-row"]{outline:3px solid #ef4444 !important;}
.debug-grid>*[style*="1 / -1"]{outline:3px solid #f59e0b !important;}
.no-first-span>*:first-child{grid-column:auto !important;grid-row:auto !important;}
.debug-equalize>*{grid-column:auto !important;grid-row:auto !important;width:auto !important;min-width:0 !important;flex:0 1 auto !important;}
.debug-grid.grid-3{grid-template-columns:repeat(3,minmax(0,1fr)) !important;}
@media (max-width:1024px){.debug-grid.grid-3{grid-template-columns:repeat(2,1fr) !important;}}
@media (max-width:640px){.debug-grid.grid-3{grid-template-columns:1fr !important;}}
.debug-grid .dbg-note{position:absolute;bottom:6px;right:6px;background:#fff;border:1px dashed #aaa;border-radius:6px;padding:2px 6px;font-size:12px;color:#111;opacity:.9;}

/* ===== Global page gutters & container ===== */
.page-block{margin-block:clamp(16px,3vw,28px);}
.section--narrow,#areas,#cats,#new,#news{max-width:calc(var(--page-width,1100px)*.8);margin-inline:auto;}
@media (max-width:1024px){.section--narrow,#areas,#cats,#new,#news{max-width:min(92vw,900px);}}
@media (max-width:640px){.section--narrow,#areas,#cats,#new,#news{max-width:100%;}}

/* 都道府県ページのグリッド */
.pref-page .grid.grid-3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;}
@media (max-width:900px){.pref-page .grid.grid-3{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media (max-width:560px){.pref-page .grid.grid-3{grid-template-columns:1fr;}}
.pref-page .grid.grid-3>*{width:100%;}
.pref-page .grid.grid-3>*:first-child{grid-column:auto !important;}
.pref-page .searchbar{justify-content:flex-start;}
body:not(.is-home) .main .searchbar{justify-content:flex-start !important;}
.hero .searchbar{justify-content:center !important;}

/* ===== TOP: header over hero ===== */
.over-hero main,.over-hero .site-main{padding-top:0 !important;}
.main>.hero,.main>.hero-bleed,.site-header + .hero,.site-header + .hero-bleed{margin-top:0 !important;}

/* ===== Transparent header behaviors on mobile ===== */
@media (max-width:860px){
  .is-home .main{padding-top:0 !important;}
  .main>.hero,.main>.hero-bleed,.site-header + .hero,.site-header + .hero-bleed{margin-top:0 !important;}
  .over-hero .site-header,.site-header.header--over-hero{background:transparent !important;box-shadow:none !important;}
  .over-hero .site-header::before{display:none !important;}
}

/* ===== Mobile feature list ===== */
.feature-list-mobile{display:none;}
@media (max-width:768px){
  .feature-list-mobile{display:block;margin:16px auto;}
  .feature-list-mobile h3{margin:20px 0 10px;padding:.45rem .8rem;background:#fff;color:#ffbdb8;border-radius:12px;font-size:16px;line-height:1.2;}
  .feature-list-mobile .grid{display:grid;grid-template-columns:1fr;gap:12px;}
  .feature-card--mobile{display:block;padding:12px;border:1px solid #ffd6d6;border-radius:14px;background:#ffeef0;text-decoration:none;}
  .feature-card--mobile strong{display:block;font-size:14px;color:#111;}
  .feature-card--mobile img{display:block;width:100%;height:auto;border-radius:10px;margin-bottom:8px;}
}

/* ===== Mobile header compaction ===== */
@media (max-width:768px){
  .site-header{height:auto;}
  .site-header .header-inner{display:flex;flex-wrap:nowrap;align-items:center;gap:6px;height:var(--header-h,52px);min-height:var(--header-h,52px);padding:6px 10px;}
  .site-header .brand{flex:0 1 auto;max-width:44vw;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:14px;line-height:1.2;}
  .site-header .header-nav{margin-left:auto;flex:1 1 auto;display:flex;justify-content:flex-end;align-items:center;gap:6px;flex-wrap:nowrap;}
  .site-header .nav-link{white-space:nowrap;font-size:12px;padding:.30rem .45rem;line-height:1;}
}
@media (max-width:360px){
  .site-header .brand{max-width:40vw;font-size:13px;}
  .site-header .nav-link{font-size:11.5px;padding:.28rem .42rem;}
}

/* Hide some header links on mobile */
@media (max-width:768px){
  .site-header .header-nav a[href*="/salons/latest"],
  .site-header .header-nav a[href*="/notices"]{display:none !important;}
}

/* ===== UNIFIED PAGE WIDTH (match TOP ≒ 80%) ===== */
.main{--page-width:var(--container);}
.notice-detail,
.main>.container[class*="max-w-"],
.main .container[class*="max-w-"]{max-width:var(--page-narrow) !important;}

/* Footer mobile wrapping + ensure policy is visible */
@media (max-width:640px){
  /* Allow footer to expand so "個人情報保護方針" never gets clipped */
  .site-footer{
    height: auto !important;
    min-height: 64px;
    overflow: visible !important;
    padding: 12px 0;
  }
  .site-footer .footer-inner{ flex-wrap: wrap; gap: 8px 10px; }
  .footer-right{ width: 100%; align-items: flex-end; }
  .footer-right .policy, .footer-right .terms{ display: block !important; }
}

@media (max-width:768px){
  .site-footer{
    height: auto !important;
    min-height: 64px;
    overflow: visible !important;
  }
  .footer-right .policy, .footer-right .terms{ display: block !important; }
}

/* ===== Feature Rails (fixed left/right gutters) ===== */
.feature-rails{position:fixed;inset:0;pointer-events:none;z-index:25;}
.feature-rails .rail{
  position:fixed;top:calc(var(--header-h) + 16px);bottom:16px;width:var(--feature-rail-w);
  display:grid;grid-auto-rows:min-content;gap:13px;pointer-events:auto;
}
/* レールを“本文の狭幅”に対して左右へオフセット（ハードコード撤廃） */
.feature-rails .rail.left{
  left: calc((100vw - var(--page-narrow)) / 2 - (var(--feature-rail-w) + var(--feature-rail-gutter)));
}
.feature-rails .rail.right{
  right: calc((100vw - var(--page-narrow)) / 2 - (var(--feature-rail-w) + var(--feature-rail-gutter)));
}
.feature-card{
  display:grid;grid-template-rows:132px auto;align-content:start;text-decoration:none;border:1px solid #ffd6d6;background:#fff;border-radius:14px;box-shadow:0 8px 22px rgba(0,0,0,.06);overflow:hidden;transition:transform .12s ease,box-shadow .12s ease,border-color .12s ease;
}
.feature-card:hover{transform:translateY(-2px);border-color:#ffbdb8;box-shadow:0 12px 30px rgba(0,0,0,.09);}
.feature-card .thumb{background:#f6f7f8;}
.feature-card .title{padding:10px 12px 12px;font-weight:700;color:#1f2937;line-height:1.35;font-size:.94rem;}
@media (max-width:1280px){ .feature-rails{display:none !important;} }

/* ==== Static rails for HOME（TOPだけの見せ方） ==== */
.is-home .home-rails-slot{position:relative;min-height:clamp(420px,60vh,720px);}
.is-home .feature-rails.is-static{position:fixed;inset:0;pointer-events:none;z-index:1;}
.is-home .feature-rails.is-static .rail{
  position:absolute;top:calc(var(--header-h,58px) + 12px);transform:none;width:var(--feature-rail-w,268px);
  display:grid;grid-auto-rows:min-content;gap:var(--feature-rail-gap,17px);pointer-events:auto;
}
.is-home .feature-rails.is-static .rail.left{
  left: calc(-1 * (var(--feature-rail-w,268px) + var(--feature-rail-gutter,12px)));
}
.is-home .feature-rails.is-static .rail.right{
  right: calc(-1 * (var(--feature-rail-w,268px) + var(--feature-rail-gutter,12px)));
}

/* 汎用スロット/フレーム（必要なら） */
.rails-slot,.rails-frame{position:relative;max-width:var(--page-narrow) !important;margin-inline:auto;}
.rails-frame .feature-rails.is-static{position:absolute;inset:0;pointer-events:none;z-index:1;}
.rails-frame .feature-rails.is-static .rail{
  position:absolute;top:50%;transform:translateY(-50%);width:var(--feature-rail-w,268px);
  display:grid;grid-auto-rows:min-content;gap:var(--feature-rail-gap,17px);pointer-events:auto;
}
.rails-frame .feature-rails.is-static .rail.left{
  left: calc(-1 * (var(--feature-rail-w,268px) + var(--feature-rail-gutter,12px)));
}
.rails-frame .feature-rails.is-static .rail.right{
  right: calc(-1 * (var(--feature-rail-w,268px) + var(--feature-rail-gutter,12px)));
}
@media (max-width:1280px){
  .feature-rails.is-static,.rails-frame .feature-rails.is-static{display:none !important;}
  body:not(.is-home) .home-rails-slot{display:none !important;}
}
/* HOME 以外は静的レール非表示（重複防止） */
body:not(.is-home) .feature-rails.is-static,
body:not(.is-home) .home-rails-slot,
body:not(.is-home) .rails-slot,
body:not(.is-home) .rails-frame{display:none !important;}
.is-home .feature-rails:not(.is-static){display:none !important;}

/* === Prefecture cards tweaks === */
.pref-cards{display:flex !important;flex-wrap:wrap;gap:16px;}
.pref-cards .card{
  display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;text-align:center;
  min-inline-size:calc(5em + 1.6rem);inline-size:fit-content;min-height:42px;padding:10px 14px;margin:0;
}
.pref-cards .card>*{margin:0;}

/* ===== Mobile typography downsizing ===== */
html{font-size:clamp(14px,1.9vw,16px);}
@media (max-width:360px){ html{font-size:13.5px;} }
@media (max-width:640px){
  :root{--header-h:52px;}
  .site-header .brand{font-size:1rem;}
  .site-header .nav-link{font-size:.9rem;padding:.35rem .55rem;}
  .jmap .pin,#jp-map .jp-pin{font-size:12px;padding:.3rem .5rem;}
}
.hero-title{font-size:clamp(18px,6vw,26px);}
.hero-lead{font-size:clamp(13px,3.2vw,16px);}
.input{font-size:.95rem;padding:.55rem .8rem;}
.btn{font-size:.95rem;padding:.55rem .9rem;}
.pill{font-size:.85rem;padding:.38rem .7rem;}
.card{font-size:.95rem;}
.feature-card .title{font-size:.85rem;}
h2{font-size:1.25rem;}
h3{font-size:1.05rem;}
.main h3{padding:.35rem .6rem;}

/* Salon detail spacing under fixed header */
.main>.container>article.card:first-child,
.main>article.card:first-child{margin-top:clamp(12px,2.5vw,28px);}

/* ===== HOME: show feature rails BELOW the hero ===== */
body.is-home main{padding-top:0 !important;}
.site-header:has(+ .hero),
.site-header:has(+ .hero-bleed){background:transparent !important;box-shadow:none !important;}
.site-header:has(+ .hero)::before,
.site-header:has(+ .hero-bleed)::before{display:none !important;}
.site-header:has(+ .hero) .brand,
.site-header:has(+ .hero) .nav-link,
.site-header:has(+ .hero-bleed) .brand,
.site-header:has(+ .hero-bleed) .nav-link{color:#fff !important;text-shadow:0 1px 6px rgba(0,0,0,.25);}
.site-header:has(+ .hero) + .main,
.site-header:has(+ .hero-bleed) + .main{padding-top:0 !important;}
body.is-home .home-rails-slot{position:relative !important;min-height:clamp(420px,60vh,720px) !important;height:auto !important;margin:0 !important;}
body.is-home .feature-rails{position:absolute !important;inset:0 !important;top:0 !important;pointer-events:none;z-index:1 !important;}
body.is-home .feature-rails .rail{position:absolute !important;top:0 !important;bottom:0 !important;transform:none !important;width:var(--feature-rail-w) !important;grid-auto-rows:min-content;gap:13px;pointer-events:auto;}
body.is-home .feature-rails .rail.left{left:calc(-1 * (var(--feature-rail-w) + var(--feature-rail-gutter)));}
body.is-home .feature-rails .rail.right{right:calc(-1 * (var(--feature-rail-w) + var(--feature-rail-gutter)));}
@media (max-width:1280px){ body.is-home .feature-rails,body.is-home .home-rails-slot{display:none !important;} }

@media (max-width:1120px){ .header-nav{gap:8px;} .site-header .nav-link{padding:.35rem .6rem;} }


/* ===== Header: force single row (safe overrides) ===== */
.site-header .header-inner{
  flex-wrap: nowrap !important;          /* never wrap brand + nav to 2 lines */
  align-items: center;
}
.site-header .header-nav{
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap !important;          /* keep links on one line */
  min-width: 0;
}
.site-header .nav-link{
  white-space: nowrap !important;        /* each link stays on one line */
}
/* Keep the logo visible (do not clip or hide) */
.site-header .brand{
  flex: 0 1 auto;
  max-width: none !important;   /* ロゴを切らない */
  overflow: visible !important;
  white-space: nowrap;
  text-overflow: clip;
  font-size: 14px;
  line-height: 1.2;
}
/* ---- Brand logo: size by height (header auto-sizes to logo) ---- */
.site-header .brand-logo{
  display:block !important;
  /* ← vh を使わず、px と vw のクランプで安定（スマホで ~50–64px に収まる） */
  height: clamp(44px, 14vw, 64px) !important;
  width:auto !important;
  max-height: calc(var(--header-max) - 12px);
  object-fit: contain;
  vertical-align: middle;
}
/* Compress spacing slightly on narrower desktops to avoid wrapping */
/* ===== Align header brand with left feature rail (desktop, TOP) ===== */
@media (min-width:1280px){
  body.is-home .site-header .brand{
    position:relative;
    left:calc(-1 * (var(--feature-rail-w) + var(--feature-rail-gutter))) !important;
    margin-left:0 !important;
  }
}

/* =========================================================
   HEADER: auto-size to logo & keep nav in a single row
   （ロゴに合わせてヘッダー高さを自動化＋ナビを1行固定）
   ========================================================= */
.site-header{
  /* 高さは自動。main 側の余白は JS が --header-h を実測で更新して吸収 */
  height: auto !important;
}
.site-header .header-inner{
  /* 最低ラインは変数、でもコンテンツ（=ロゴ）が大きければ伸びる */
  min-height: var(--header-h) !important;
  padding-block: 6px !important;
  flex-wrap: nowrap !important;
  align-items: center;
}

/* ロゴは縮小させない（常に1行・はみ出さない） */
.site-header .brand{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto !important;     /* ← shrink させない */
  min-width: max-content;        /* 内容幅以下にしない */
  overflow: visible !important;
  white-space: nowrap;
}

/* ロゴの見やすい基準サイズ。画像が大きければヘッダーが追従して伸びます */

/* ナビは必ず1行 */
.site-header .header-nav{
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap !important;     /* ← 改行させない */
  min-width: 0;
}
.site-header .nav-link{
  white-space: nowrap !important;    /* 各リンクも1行 */
}

/* 画面が少し狭いときはパディング/隙間を圧縮して折返し防止 */
@media (max-width: 1200px){
  .site-header .header-nav{ gap: 8px !important; }
  .site-header .nav-link{ padding: .35rem .55rem !important; }
}
@media (max-width: 1040px){
  .site-header .header-nav{ gap: 6px !important; }
  .site-header .nav-link{ padding: .30rem .50rem !important; }
}

/* === Footer width & alignment = Header match =================== */
/* 1) 幅はヘッダー内側と同じ “狭幅（page-narrow）” に固定 */
.site-footer .footer-inner{
  max-width: var(--page-narrow) !important;
}

/* 2) TOPページ（デスクトップ）では、ヘッダーと同じだけ左にオフセット */
@media (min-width: 1280px){
  body.is-home .site-footer .footer-inner{
    position: relative;
    left: calc(-1 * (var(--feature-rail-w) + var(--feature-rail-gutter)));
  }
}

/* === Footer: 左右ともヘッダーと同じ位置に合わせる（TOP/デスクトップ） === */
@media (min-width: 1280px){
  body.is-home .site-footer .footer-inner{
    /* 左にレール分ずらす＋幅をその分だけ広げる＝左右の端がヘッダーと一致 */
    position: relative;
    left: calc(-1 * (var(--feature-rail-w) + var(--feature-rail-gutter)));
    max-width: none !important;
    width: calc(var(--page-narrow) + var(--feature-rail-w) + var(--feature-rail-gutter)) !important;
    margin-inline: auto;
  }
}

/* === Header nav を中央揃え（デスクトップのみ）=== */
@media (min-width: 1024px){
  .site-header .header-inner{ position: relative; }
  .site-header .header-inner .header-nav{
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    margin-left: 0 !important;
    justify-content: center;
    flex-wrap: nowrap !important;   /* 1行固定 */
    white-space: nowrap !important; /* 1行固定 */
  }
}

/* === Footer: 左端は据え置き、右端だけ拡張（TOP/デスクトップ） === */
@media (min-width: 1280px){
  body.is-home .site-footer .footer-inner{
    /* 左端：本文（var(--page-narrow)）の左位置に合わせる */
    max-width: none !important;
    left: 0 !important;                                /* 以前の left ずらしを無効化 */
    margin-left: calc((100vw - var(--page-narrow)) / 2);
    margin-right: auto;

    /* 右端：特集レール分だけ幅を右へ広げる */
    width: calc(
      var(--page-narrow) + var(--feature-rail-w) + var(--feature-rail-gutter)
    ) !important;
  }
}

/* =========================================================
   MOBILE FIX: 初回読み込み時のヘッダー巨大化を根絶
   - モバイルは固定pxベースで高さを決め、vh/JSの影響を切り離す
   ========================================================= */
@media (max-width: 768px){
  /* モバイル専用の固定ヘッダー高（必要に応じて調整） */
  :root{
    --header-hm: 66px;  /* ← ご要望の 66px に合わせています */
  }

  /* ヘッダーは JS が更新する --header-h を使わず、--header-hm を使う */
  .site-header{
    height: var(--header-hm) !important;
  }
  .site-header .header-inner{
    height: var(--header-hm) !important;
    min-height: var(--header-hm) !important;
    padding-block: 8px !important; /* ロゴ上下の余白 */
    flex-wrap: nowrap !important;
    align-items: center;
  }

  /* ロゴは固定px基準で収める（vhは一切使わない） */
  .site-header .brand-logo{
    height: calc(var(--header-hm) - 16px) !important; /* 上下8pxずつ想定 */
    max-height: calc(var(--header-hm) - 16px) !important;
    width: auto !important;
    object-fit: contain;
    display: block !important;
  }

  /* 本文の上余白も固定化（JSの --header-h 更新に左右されない） */
  .main{
    padding-top: var(--header-hm) !important;
  }
}