/* ============================================================
   アトランティスホームズ トップページ v2
   theme: tone=light color=atl | AKIRA版デザイン規範 v1.1
   ・色／文字サイズ／余白は tokens.css の変数経由（直書きしない）
   ・画面幅の切り替えは 768px の1点だけ
   ・動きは「動きを減らす設定」「?motion=off」「JS無効」では止まり、全部が最初から見える
   ============================================================ */

/* ---------- 0. このページで足す変数 ---------- */
:root {
  --fs-display: clamp(36px, 6.4vw, 72px);   /* 最初の画面の大見出し（設計書 §2 で許可） */
  --fs-num-xl: clamp(40px, 7vw, 84px);      /* 数字の見せ場（設計書 §2 で許可） */
  --hd-h: calc(var(--sp-5) + var(--sp-3));  /* 固定ヘッダーの高さ */
  --gut: clamp(var(--sp-3), 2.6vw, var(--sp-4)); /* 画面の左右の余白 */
  --sec-y: calc(var(--sp-5) * 2);           /* セクションの上下の余白 */
  --wrap-max: 1280px;                       /* 中身の最大幅 */
  --nav-fs: clamp(var(--fs-note), 1.35vw, var(--fs-body));
  --gal-h: clamp(220px, 44vw, 560px);       /* ギャラリーの写真の高さ */
  --navy: color-mix(in srgb, var(--key-deep) 94%, transparent);      /* 写真の上で文字を受ける紺の面 */
  --on-key-line: color-mix(in srgb, var(--on-key) 55%, transparent); /* 紺の上の細い線（文字には使わない） */
  --on-key-faint: color-mix(in srgb, var(--on-key) 16%, transparent);/* 紺の上の区切り線 */
  --ease: cubic-bezier(.16, 1, .3, 1);
  --slide-ms: 6500ms;                       /* 最初の画面の写真を切り替える間隔 */
}
@media (max-width: 768px) {
  :root {
    --hd-h: calc(var(--sp-5) + var(--sp-1));
    --gut: var(--sp-3);
    --sec-y: calc(var(--sp-5) + var(--sp-4));
  }
}

/* ---------- 1. 土台 ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html {
  scrollbar-gutter: stable;
  scroll-padding-top: calc(var(--hd-h) + var(--sp-3));
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
html:has(dialog[open]) { overflow: hidden; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.85;
  line-break: strict;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--key-text); text-underline-offset: .25em; }
h1, h2, h3 { font-feature-settings: 'palt'; word-break: auto-phrase; text-wrap: balance; }
:focus-visible { outline: 3px solid var(--key-mid); outline-offset: var(--sp-chip-y); }
.num { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum'; }
.icons { position: absolute; width: 0; height: 0; overflow: hidden; }
.ic {
  width: 1.15em; height: 1.15em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
}
.vh {
  position: absolute; width: 1px; height: 1px; margin: 0; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.js-only { display: none; }
.js .js-only { display: inline; }
.wrap { max-width: var(--wrap-max); margin-inline: auto; padding-inline: var(--gut); }
.note { font-size: var(--fs-note); color: var(--ink-note); line-height: 1.7; }
.cap { margin: var(--sp-1) 0 0; font-size: var(--fs-note); line-height: 1.6; }
.frame { overflow: hidden; border-radius: var(--radius-card); background: var(--photo-bg); }
.frame img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- 2. ボタン ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-1);
  min-height: 44px;
  padding: var(--sp-2) var(--sp-3);
  border: 2px solid transparent;
  border-radius: var(--radius-btn);
  font: inherit; font-size: var(--fs-btn); font-weight: 700; line-height: 1.35;
  text-decoration: none; text-align: center;
  cursor: pointer;
  transition: background-color .25s, color .25s;
}
.btn .ic { transition: transform .4s var(--ease); }
.btn:hover .ic { transform: translateX(.2em); }
.btn-primary { background: var(--cta); color: var(--on-cta); box-shadow: var(--btn-shadow); }
.btn-primary:hover { background: var(--cta-shadow); }
.btn-secondary { background: var(--surface); color: var(--key-text); border-color: var(--key-text); }
.btn-secondary:hover { background: var(--key-pale); }
.btn-text {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0;
  border: 0; background: none; color: var(--key-text);
  font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: .3em;
  cursor: pointer;
}
.link-out {
  display: inline-flex; align-items: center; gap: var(--sp-chip-y);
  min-height: 44px; color: var(--key-text); font-weight: 500;
}
.gal-btn {
  display: inline-grid; place-items: center;
  width: 48px; height: 48px; padding: 0;
  border: 2px solid var(--on-key-line); border-radius: 50%;
  background: transparent; color: var(--on-key);
  cursor: pointer; transition: background-color .25s;
}
.gal-btn:hover { background: var(--on-key-faint); }
.gal-btn .ic { width: 1.4em; height: 1.4em; }
.gal-btn--dark { border-color: var(--rule-strong); color: var(--key-text); }
.gal-btn--dark:hover { background: var(--key-pale); }
.x-btn {
  display: inline-flex; align-items: center; gap: var(--sp-chip-y); flex: none;
  min-height: 44px; padding: 0 var(--sp-2);
  border: 1px solid var(--rule-strong); border-radius: var(--radius-btn);
  background: var(--surface); color: var(--ink);
  font: inherit; font-size: var(--fs-note); font-weight: 700; cursor: pointer;
}
.x-btn:hover { background: var(--key-pale); }

/* ---------- 3. ヘッダー ---------- */
.hd {
  position: fixed; inset: 0 0 auto; z-index: 40;
  height: var(--hd-h);
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
  transition: background-color .45s, border-color .45s;
}
.hd-in {
  display: flex; align-items: center; gap: clamp(var(--sp-2), 1.6vw, var(--sp-4));
  height: 100%; max-width: var(--wrap-max); margin: 0 auto; padding: 0 var(--gut);
}
.logo {
  display: flex; flex-direction: column; flex: none; white-space: nowrap; font-feature-settings: 'palt';
  padding: var(--sp-chip-y) var(--sp-1);
  border-radius: var(--radius-badge);
  color: var(--key-text); text-decoration: none; line-height: 1.25;
  transition: background-color .45s, color .45s;
}
.logo-en { font-size: var(--fs-h3); font-weight: 700; letter-spacing: .02em; }
.logo-ja { font-size: var(--fs-note); }
.nav-pc { margin-left: auto; }
.nav-pc ul {
  display: flex; gap: clamp(var(--sp-2), 1.4vw, var(--sp-3));
  margin: 0; padding: 0 var(--sp-1); list-style: none;
  border-radius: var(--radius-btn);
  transition: background-color .45s;
}
.nav-pc a {
  display: flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px;
  color: var(--ink); font-size: var(--nav-fs); font-weight: 500;
  text-decoration: none; white-space: nowrap;
  transition: color .45s;
}
.nav-pc a:hover { text-decoration: underline; }
.hd-cta { flex: none; padding: var(--sp-1) var(--sp-2); white-space: nowrap; }
.menu-btn { display: none; }
.hd-bar {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 3px; background: var(--key-mid);
  transform: scaleX(0); transform-origin: 0 50%; opacity: 0;
}
/* 最初の画面：帯は透明にし、文字は紺の面に載せて写真の上に浮かべる */
.hd.is-top, .hd-top .hd { background: transparent; border-color: transparent; }
.hd.is-top .logo, .hd-top .hd .logo,
.hd.is-top .nav-pc ul, .hd-top .hd .nav-pc ul { background: var(--navy); color: var(--on-key); }
.hd.is-top .nav-pc a, .hd-top .hd .nav-pc a { color: var(--on-key); }

/* スマホ用メニュー（popover。JSが無くても開閉できる） */
.menu-sp {
  position: fixed; inset: var(--hd-h) var(--sp-2) auto auto;
  width: min(84vw, 340px); margin: 0;
  padding: var(--sp-2) var(--sp-3) var(--sp-3);
  border: 1px solid var(--rule); border-radius: var(--radius-card);
  background: var(--surface); color: var(--ink);
}
@supports not selector(:popover-open) { .menu-sp, .menu-btn { display: none !important; } }  /* 古いブラウザでは開きっぱなしにしない */
.menu-sp ul { margin: 0 0 var(--sp-2); padding: 0; list-style: none; }
.menu-sp li + li { border-top: 1px solid var(--rule); }
.menu-sp a {
  display: flex; align-items: center; min-height: 48px;
  color: var(--key-text); font-weight: 700; text-decoration: none;
}
.menu-close {
  min-height: 44px; width: 100%;
  border: 1px solid var(--rule-strong); border-radius: var(--radius-btn);
  background: var(--surface); color: var(--ink);
  font: inherit; font-size: var(--fs-note); font-weight: 700; cursor: pointer;
}

/* ---------- 4. A. 最初の画面 ---------- */
.hero {
  position: relative; isolation: isolate;
  display: flex; align-items: flex-end;
  min-height: 100vh; min-height: 100svh;
  overflow: hidden;
  background: var(--key-deep); color: var(--on-key);
}
.hero-slides { position: absolute; inset: 0; z-index: -1; }
.slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity 1.6s ease; }
.slide.is-active { opacity: 1; }
.slide:not(:first-child) { display: none; }       /* 2枚目以降はJSが準備できてから読み込む */
.slides-ready .slide { display: block; }
.slide picture, .slide img { display: block; width: 100%; height: 100%; }
.slide img { object-fit: cover; object-position: var(--pos); }
.slide-cap { position: absolute; top: calc(var(--hd-h) + var(--sp-3)); right: var(--gut); margin: 0; }
.slab-chip {
  display: inline-flex; flex-direction: column;
  padding: var(--sp-1) var(--sp-2);
  background: var(--navy); color: var(--on-key);
  font-size: var(--fs-note); line-height: 1.5;
}
.slab-chip b { font-size: var(--fs-body); }

.hero-in {
  width: 100%; max-width: var(--wrap-max); margin: 0 auto;
  padding: calc(var(--hd-h) + var(--sp-5) * 2) var(--gut) calc(var(--sp-5) + var(--sp-4));
}
.hero-h1 { margin: 0; font-weight: 700; }
.slab { display: inline-block; background: var(--navy); color: var(--on-key); overflow: hidden; }
.h1-sm { display: block; }
.h1-sm .slab { padding: var(--sp-chip-y) var(--sp-2); font-size: var(--fs-body); font-weight: 500; }
.h1-lg { display: block; margin-top: var(--sp-chip-y); font-size: var(--fs-display); line-height: 1.22; letter-spacing: .03em; }
.h1-lg .slab { padding: var(--sp-chip-y) var(--sp-3) var(--sp-1); }
.w { display: inline-block; }
.hero-stats {
  display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--sp-4);
  margin: var(--sp-chip-y) 0 0; padding: var(--sp-1) var(--sp-3);
  list-style: none; font-weight: 500; line-height: 1.5;
}
.hero-stats li { position: relative; }
.hero-stats li + li::before {      /* ゴールドの小さな点（文字のない装飾） */
  content: ""; position: absolute; left: calc(var(--sp-4) / -2); top: 50%;
  width: 6px; height: 6px; border-radius: 50%; background: var(--key-mid);
  translate: -50% -50%;
}
.hero-stats b { margin: 0 .08em; font-size: var(--fs-h1); font-weight: 700; }
.hero-acts { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-3); }
.hero-acts .btn { padding-inline: var(--sp-4); }

.hero-ctrl {
  position: absolute; right: var(--gut); bottom: calc(var(--sp-5) + var(--sp-4));
  display: none; align-items: center; gap: var(--sp-2);
  padding: var(--sp-chip-y) var(--sp-chip-y) var(--sp-chip-y) var(--sp-2);
  background: var(--navy);
}
.slides-ready .hero-ctrl { display: flex; }
.hero-prog { display: flex; gap: var(--sp-chip-y); }
.hero-prog i { position: relative; display: block; width: 28px; height: 3px; overflow: hidden; background: var(--on-key-faint); }
.hero-prog i::after {
  content: ""; position: absolute; inset: 0; background: var(--key-mid);
  transform: scaleX(0); transform-origin: 0 50%;
}
.hero-prog i.is-done::after { transform: scaleX(1); }
.hero-pause {
  display: inline-flex; align-items: center; gap: var(--sp-1);
  min-height: 44px; padding: 0 var(--sp-2);
  border: 1px solid var(--on-key-line); border-radius: var(--radius-btn);
  background: transparent; color: var(--on-key);
  font: inherit; font-size: var(--fs-note); cursor: pointer;
}
.hero-pause:hover { background: var(--on-key-faint); }
.hero-pause .ic-play { display: none; }
.hero.is-paused .hero-pause .ic-play { display: block; }
.hero.is-paused .hero-pause .ic-pause { display: none; }
.hero-cue {
  position: absolute; left: 50%; bottom: var(--sp-2);
  display: inline-flex; align-items: center; gap: var(--sp-chip-y);
  min-height: 44px; padding: 0 var(--sp-2);
  transform: translateX(-50%);
  background: var(--navy); color: var(--on-key);
  font-size: var(--fs-note); text-decoration: none;
}

/* ---------- 5. ブランドの紹介 ---------- */
.intro { padding: var(--sec-y) 0; }
.intro-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--sp-5) var(--sp-4); align-items: center; }
.intro-tx { grid-column: 1 / 7; }
.intro-ph { grid-column: 8 / 13; }
.intro-h { margin: 0 0 var(--sp-3); font-size: var(--fs-body); font-weight: 700; color: var(--key-text); }
.intro-lead { margin: 0; font-size: var(--fs-h2); font-weight: 500; line-height: 1.8; color: var(--key-text); }
.intro-ph { position: relative; margin: 0; padding-bottom: 20%; }
.intro-ph .frame { aspect-ratio: 3 / 2; }
.intro-ph-a { width: 84%; margin-left: auto; }
.intro-ph-b {
  position: absolute; left: 0; bottom: 0;
  width: 50%;
  outline: var(--sp-1) solid var(--surface);
}
.intro-ph .cap { position: absolute; right: 0; bottom: 0; width: 44%; margin: 0; }

/* ---------- 6. セクション共通 ---------- */
.sec { padding: var(--sec-y) 0; }
.sec--navy { background: var(--key-deep); color: var(--on-key); }
.sec--navy .note { color: var(--on-key); }
.sec-head { max-width: 46em; margin-bottom: var(--sp-5); }
.sec-title {
  margin: 0 0 var(--sp-2);
  font-size: var(--fs-h1); font-weight: 700; line-height: 1.35; letter-spacing: .02em;
  color: var(--key-text);
}
.sec--navy .sec-title { color: var(--on-key); }
.sec-lead { margin: 0; }

/* ---------- 7. B. 路線図 ---------- */
.map-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--sp-4); }
.map { position: relative; flex: 999 1 680px; min-width: 0; }
.map--pc { aspect-ratio: 1000 / 650; }
.map--sp { display: none; aspect-ratio: 360 / 760; }
.map-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.map .grid path { fill: none; stroke: var(--on-key-faint); stroke-width: 1; }
.map .lane { fill: none; stroke: var(--on-key); stroke-width: 5; stroke-linecap: round; }
.map .lane--dash { stroke-dasharray: 12 10; stroke-linecap: butt; }
.map .draw { fill: none; stroke: var(--on-key); stroke-width: 26; stroke-dasharray: 100; stroke-dashoffset: 0; }
.map .leaders path { fill: none; stroke: var(--on-key-line); stroke-width: 1.25; stroke-dasharray: 3 4; }
.map .hub { fill: var(--on-key); }
.map .ring { fill: var(--key-deep); stroke: var(--on-key); stroke-width: 3; }
.map .lit { fill: var(--key-mid); transform-box: fill-box; transform-origin: center; transition: transform .4s var(--ease); }
.map .dot.is-sel .lit { transform: scale(1.45); }

.hub-label, .ln, .tick { position: absolute; margin: 0; line-height: 1.3; white-space: nowrap; pointer-events: none; }
.hub-label {
  left: var(--x); top: var(--y); translate: -100% -50%;
  font-size: var(--fs-h3); font-weight: 700;
}
.hub-label--sp { translate: 0 -50%; }
.ln { left: var(--x); top: var(--y); translate: 0 calc(-100% - var(--sp-1)); font-size: var(--fs-note); font-weight: 500; }
.tick { left: var(--x); top: 96.154%; translate: -50% -50%; font-size: var(--fs-note); }
.tick--sp { left: 0; top: var(--y); translate: 0 -50%; }

.st {
  position: absolute; left: var(--x); top: var(--y);
  display: flex; flex-direction: column; align-items: center;
  min-width: 44px; min-height: 44px;
  padding: var(--sp-chip-y);
  border-radius: var(--radius-badge);
  color: var(--on-key); text-decoration: none; text-align: center;
  line-height: 1.2; white-space: nowrap;
  transition: background-color .3s, color .3s;
}
.st--a { translate: -50% calc(-100% - var(--sp-3)); }
.st--b { translate: -50% var(--sp-3); }
.st--r { display: block; translate: 0 -50%; text-align: left; padding-inline: var(--sp-1); }
.st-name { font-size: var(--fs-body); font-weight: 700; }
.st-min { font-size: var(--fs-note); font-weight: 500; }
.st-min b { font-size: var(--fs-h3); }
.st-ln { display: block; font-size: var(--fs-note); line-height: 1.35; }
.st:hover .st-name { text-decoration: underline; text-underline-offset: .2em; }
.st.is-sel { background: var(--on-key); color: var(--key-text); }

.map-panel {
  flex: 1 1 300px; align-self: flex-start;
  overflow: hidden;
  border-radius: var(--radius-card);
  background: var(--surface); color: var(--ink);
}
.mp-ph { aspect-ratio: 4 / 3; overflow: hidden; background: var(--photo-bg); }
.mp-ph img { width: 100%; height: 100%; object-fit: cover; }
.mp-body { padding: var(--sp-3); }
.mp-line { margin: 0; font-size: var(--fs-note); }
.mp-name { margin: var(--sp-chip-y) 0 var(--sp-2); font-size: var(--fs-h3); font-weight: 700; line-height: 1.4; color: var(--key-text); }
.mp-facts { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-4); margin: 0 0 var(--sp-2); }
.mp-facts dt { font-size: var(--fs-note); }
.mp-facts dd { margin: 0; font-size: var(--fs-h3); font-weight: 700; line-height: 1.3; }
.mp-facts dd b { font-size: var(--fs-h1); }
.mp-note { margin: 0 0 var(--sp-2); font-size: var(--fs-note); }
.mp-body .btn { width: 100%; margin-top: var(--sp-1); }

.map-list {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 var(--sp-4);
  margin: var(--sp-5) 0 var(--sp-2); padding: 0; list-style: none;
}
.map-list li {
  display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: var(--sp-2); align-items: center;
  padding: var(--sp-2) 0; border-top: 1px solid var(--on-key-faint);
}
.ml-min { grid-row: span 2; font-size: var(--fs-note); }
.ml-min b { font-size: var(--fs-h2); }
.ml-st { font-weight: 700; line-height: 1.4; }
.ml-ln { font-size: var(--fs-note); line-height: 1.5; }
.map-note { margin: 0; }

/* ---------- 8. C. 物件 ---------- */
.pc-media {
  position: relative; overflow: hidden;
  border-radius: var(--radius-card);
  background: var(--photo-bg);
}
.pc-zoom { position: absolute; inset: 0; transition: transform 1.6s var(--ease), scale 1.6s var(--ease); }
.pc-zoom img { width: 100%; height: 100%; object-fit: cover; object-position: var(--pos); }
.pc-time {
  position: absolute; left: 0; bottom: 0; z-index: 1;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .25em;
  margin: 0; padding: var(--sp-1) var(--sp-2);
  background: var(--navy); color: var(--on-key);
  font-size: var(--fs-note); line-height: 1.3;
}
.pc-time b { font-size: var(--fs-h1); font-weight: 700; }
.pc-open {
  position: absolute; inset: 0; z-index: 2;
  width: 100%; padding: 0; border: 0;
  background: transparent; cursor: zoom-in;
}
.pc-body { padding-top: var(--sp-3); }
.pc-name { margin: 0; font-size: var(--fs-h2); line-height: 1.4; color: var(--key-text); }
.pc-line { margin: var(--sp-chip-y) 0 var(--sp-2); font-weight: 500; }
.facts {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 13em), 1fr));
  gap: 0 var(--sp-3); margin: 0 0 var(--sp-2);
}
.facts div { display: flex; gap: var(--sp-2); padding: var(--sp-1) 0; border-top: 1px solid var(--rule); }
.facts dt { flex: none; width: 4.6em; font-size: var(--fs-note); line-height: 1.85; }
.facts dd { margin: 0; line-height: 1.6; }
.pc-note, .pc-vac { margin: 0 0 var(--sp-1); font-size: var(--fs-note); }
.pc-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--sp-3); margin-top: var(--sp-1); }
.badge {
  display: inline-block; margin: 0 0 var(--sp-2);
  padding: var(--sp-chip-y) var(--sp-chip-x);
  border-radius: var(--radius-badge);
  background: var(--key-deep); color: var(--on-key);
  font-size: var(--fs-note); font-weight: 700;
}

/* 最新物件（入間）を大きく */
.feat {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--sp-4);
  align-items: center; margin-bottom: calc(var(--sp-5) * 2);
}
.feat-media { position: relative; grid-column: 1 / 8; padding-bottom: calc(var(--sp-5) * 2); }
.feat .pc-media { aspect-ratio: 4 / 3; }
.feat-sub {
  position: absolute; right: calc(var(--sp-4) * -1); bottom: 0;
  width: 44%; margin: 0;
}
.feat-sub .frame { aspect-ratio: 3 / 2; outline: var(--sp-1) solid var(--surface); }
.feat-body { grid-column: 9 / 13; }
.feat-body .pc-name { font-size: var(--fs-h1); }
.feat-body .facts { grid-template-columns: 1fr; }
.feat-body .pc-acts .btn { margin-right: var(--sp-1); }

/* 残り7件：大きさに差をつけて互い違いに並べる */
.pgrid {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--sp-5) var(--sp-4); align-items: start;
}
.pc--w { grid-column: span 7; }
.pc--n { grid-column: span 5; margin-top: calc(var(--sp-5) * 1.5); }
.pc--w .pc-media, .pc--n .pc-media { aspect-ratio: 4 / 3; }   /* 外観は建物全体が切れない4:3で見せる */
.pcta {
  grid-column: span 5; align-self: center;
  padding: var(--sp-4);
  border-radius: var(--radius-card);
  background: var(--key-deep); color: var(--on-key);
}
.pcta-h { margin: 0 0 var(--sp-3); font-size: var(--fs-h3); font-weight: 700; line-height: 1.6; }
.pcta .note { margin: var(--sp-2) 0 0; color: var(--on-key); }

/* ---------- 9. お部屋のギャラリー ---------- */
.gal { --pad: max(var(--gut), calc((100% - var(--wrap-max)) / 2 + var(--gut))); timeline-scope: --gal; }
.gal-track {
  display: flex; gap: var(--sp-3);
  margin: 0; padding: var(--sp-1) var(--pad) var(--sp-2);
  list-style: none;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-inline: var(--pad);
  scrollbar-width: none;
  scroll-timeline: --gal x;
}
.gal-track::-webkit-scrollbar { display: none; }
.gal-item { flex: none; scroll-snap-align: start; }
.gal-item figure { width: calc(var(--gal-h) * 1.5); margin: 0; }
.gal-item--v figure { width: calc(var(--gal-h) / 1.5); }
.gal-open { display: block; overflow: hidden; border-radius: var(--radius-card); background: var(--photo-bg); cursor: zoom-in; }
.gal-open:focus-visible { outline-offset: calc(var(--sp-chip-y) * -1.75); }
.gal-track:focus-visible { outline-offset: calc(var(--sp-chip-y) * -1.75); }
.gal-open img { width: 100%; height: var(--gal-h); object-fit: cover; transition: scale 1.4s var(--ease); }
.gal-item figcaption { margin-top: var(--sp-1); font-size: var(--fs-note); line-height: 1.6; }
.gal-item figcaption b { display: block; font-size: var(--fs-body); }
.gal-ctrl { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); margin-top: var(--sp-3); }
.gal-bar { display: none; position: relative; flex: 1 1 160px; height: 2px; background: var(--on-key-faint); }
.gal-bar i { position: absolute; inset: 0; background: var(--key-mid); transform-origin: 0 50%; }
.gal-hint { flex: 1 1 100%; margin: 0; font-size: var(--fs-note); }

/* ---------- 10. 防犯と設備 ---------- */
.secu { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--sp-4); }
/* 動きなし・JSなし：4枚を2列で並べる */
.secu-frame { grid-column: 1 / 6; align-self: start; display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2); }
.secu-ph { margin: 0; aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--radius-card); background: var(--photo-bg); }
.secu-ph img { width: 100%; height: 100%; object-fit: cover; object-position: var(--pos); }
.secu-list { grid-column: 7 / 13; margin: 0; padding: 0; list-style: none; }
.secu-item { padding: var(--sp-4) 0; border-top: 1px solid var(--rule); }
.secu-item:last-child { border-bottom: 1px solid var(--rule); }
.secu-ic { width: 2.6em; height: 2.6em; color: var(--key-text); stroke-width: 1.5; transition: transform .6s var(--ease); }
.secu-h { margin: var(--sp-2) 0 var(--sp-1); font-size: var(--fs-h1); line-height: 1.35; color: var(--key-text); }
.secu-cap { margin: 0; font-size: var(--fs-note); }

.equip {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--sp-4);
  align-items: start; margin-top: calc(var(--sp-5) * 1.5);
}
.equip-tx { grid-column: 1 / 6; }
.equip-h { margin: 0 0 var(--sp-3); font-size: var(--fs-h2); line-height: 1.4; color: var(--key-text); }
.equip-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--sp-3); margin: 0 0 var(--sp-3); padding: 0; list-style: none; }
.equip-list li { display: flex; align-items: center; gap: var(--sp-1); padding: var(--sp-1) 0; border-bottom: 1px solid var(--rule); line-height: 1.5; }
.equip-list .ic { color: var(--key-text); }
.equip-ph { grid-column: 7 / 13; display: grid; grid-template-columns: 5fr 7fr; gap: var(--sp-3) var(--sp-2); }
.equip-ph figure { margin: 0; }
.eq-a { grid-row: span 2; }
.eq-a .frame { aspect-ratio: 2 / 3; }
.eq-b .frame, .eq-c .frame { aspect-ratio: 3 / 2; }
.eq-note { grid-column: 1 / -1; margin: 0; }

/* ---------- 11. 法人契約 ---------- */
.corp-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--sp-5) var(--sp-4); align-items: center; }
.corp-tx { grid-column: 1 / 8; }
.corp-tx p { margin: 0 0 var(--sp-2); }
.corp-tx .btn { margin-top: var(--sp-3); }
.corp-tx .note { margin-top: var(--sp-2); }
.corp-nums { grid-column: 9 / 13; display: grid; gap: var(--sp-4); margin: 0; padding: 0; list-style: none; }
.corp-nums li { padding-top: var(--sp-2); border-top: 1px solid var(--on-key-line); }
.cn-pre { display: block; font-weight: 500; }
.cn-row { display: flex; align-items: baseline; gap: var(--sp-1); }
.cn-big { font-size: var(--fs-num-xl); font-weight: 700; line-height: 1.05; }
.cn-unit { font-size: var(--fs-h2); font-weight: 700; }

/* ---------- 12. よくある質問 ---------- */
.faq-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--sp-4); }
.faq-head { grid-column: 1 / 5; align-self: start; position: sticky; top: calc(var(--hd-h) + var(--sp-4)); }
.faq { grid-column: 5 / 13; }
.faq-item { padding: var(--sp-3) 0; border-top: 1px solid var(--rule); }
.faq-item:last-child { border-bottom: 1px solid var(--rule); }
.faq-item h3 { margin: 0 0 var(--sp-1); font-size: var(--fs-h3); line-height: 1.5; color: var(--key-text); }
.faq-item p { margin: 0; }

/* ---------- 13. お問い合わせ ---------- */
.contact { background: var(--key-pale); }
.contact-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--sp-4); align-items: center; }
.contact-ph { grid-column: 1 / 5; margin: 0; }
.contact-ph .frame { aspect-ratio: 2 / 3; }
.contact-tx { grid-column: 6 / 13; }
.contact-main, .contact-sub { padding: var(--sp-3) 0; border-top: 1px solid var(--rule); }
.contact-tx h3 { margin: 0 0 var(--sp-2); font-size: var(--fs-h3); line-height: 1.5; color: var(--key-text); }
.contact-tx .note { margin: var(--sp-2) 0 0; }
.contact-foot { padding-top: var(--sp-3); border-top: 1px solid var(--rule); }

/* ---------- 14. フッター ---------- */
.ft { padding: var(--sp-5) 0 var(--sp-4); background: var(--key-deep); color: var(--on-key); }
.ft a { color: var(--on-key); }
.ft-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--sp-4); }
.ft-grid p { margin: 0; }
.ft-logo { margin-bottom: var(--sp-2) !important; font-size: var(--fs-h3); font-weight: 700; line-height: 1.3; }
.ft-logo span { display: block; font-size: var(--fs-note); font-weight: 400; }
.ft-address { font-style: normal; }
.ft-links { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.ft-links a { display: inline-flex; align-items: center; min-height: 44px; }
.copy { margin-top: var(--sp-4); margin-bottom: 0; font-size: var(--fs-note); }

/* ---------- 15. スマホ下部の固定バー ---------- */
.fixbar { display: none; }

/* ---------- 16. 詳細パネル・写真の拡大 ---------- */
dialog { color: var(--ink); }
.pdlg {
  width: min(1120px, calc(100vw - var(--sp-4) * 2));
  max-width: none; max-height: calc(100svh - var(--sp-4) * 2);
  padding: 0; border: 0; border-radius: var(--radius-card);
  background: var(--surface); overflow: auto; overscroll-behavior: contain;
}
.pdlg::backdrop { background: color-mix(in srgb, var(--key-deep) 88%, transparent); }
.pdlg-in { padding: var(--sp-4); }
.pdlg-hd { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-3); margin-bottom: var(--sp-3); }
.pdlg-line { margin: 0; font-weight: 500; }
.pdlg-title { margin: 0; font-size: var(--fs-h1); line-height: 1.35; color: var(--key-text); }
.pdlg-main { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--sp-4); }
.pdlg-track {
  display: flex; margin: 0; padding: 0; list-style: none;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scrollbar-width: none;
}
.pdlg-track::-webkit-scrollbar { display: none; }
.pdlg-track li { flex: 0 0 100%; scroll-snap-align: start; }
.pdlg-track figure { margin: 0; }
.pdlg-ph { aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius-card); background: var(--photo-bg); }
.pdlg-ph img { width: 100%; height: 100%; object-fit: cover; }
.pdlg-ph.is-v img { object-fit: contain; }
.pdlg-track figcaption { margin-top: var(--sp-1); font-size: var(--fs-note); line-height: 1.6; }
.pdlg-nav { display: flex; align-items: center; gap: var(--sp-2); margin-top: var(--sp-2); }
.pdlg-count { margin: 0; font-size: var(--fs-note); }
.pdlg-info .facts { grid-template-columns: 1fr; }
.pdlg-info .btn { width: 100%; margin-top: var(--sp-2); }
.pdlg-info .note { margin: var(--sp-1) 0 0; }

.ldlg {
  width: 100vw; height: 100svh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; background: transparent; color: var(--on-key);
}
.ldlg::backdrop { background: var(--key-deep); }
.ldlg-fig {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--sp-1);
  height: 100%; margin: 0; padding: var(--sp-5) var(--gut);
}
.ldlg-fig img { width: 100%; height: auto; max-height: calc(100svh - var(--sp-5) * 3); object-fit: contain; }
.ldlg-fig figcaption { font-size: var(--fs-note); text-align: center; }
.x-btn--float { position: fixed; top: var(--sp-2); right: var(--sp-2); }

/* ============================================================
   17. 動き（動きを減らす設定・?motion=off では一切効かない）
   ============================================================ */
::view-transition-group(ah-photo) { animation-duration: .55s; animation-timing-function: var(--ease); }

@media (prefers-reduced-motion: no-preference) {
  html.js:not([data-motion="off"]) {
    scroll-behavior: smooth;

    /* 最初の画面：写真がゆっくり拡大（ケン・バーンズ） */
    .slide.is-active img,
    .slide.is-leaving img { animation: kb 13s linear both; transform-origin: var(--kb); }
    .hero.is-paused .slide img,
    .hero.is-paused .hero-prog i::after { animation-play-state: paused; }
    .hero-prog i.is-on::after { animation: prog var(--slide-ms) linear both; }
    .hero-cue .ic { animation: cue 2.4s var(--ease) 3; }

    /* 写真の拡大（ホバー・キーボード） */
    .pc-media:hover .pc-zoom,
    .pc:focus-within .pc-zoom,
    .gal-open:hover img,
    .gal-open:focus-visible img { scale: 1.05; }
    .st.is-sel { animation: none; }
    .secu-item.is-on .secu-ic { transform: scale(1.12); }
    .map-panel.is-swap .mp-ph img { animation: fade-in .6s var(--ease) both; }
    .map-panel.is-swap .mp-body { animation: fade-up .6s var(--ease) both; }
  }

  /* 隠さない動き（JSが動いているときだけ。3秒の安全装置のあとも続く） */
  html.js:not([data-motion="off"]) {
    .rv { transition: opacity .9s var(--ease), transform 1.1s var(--ease); transition-delay: calc(var(--d, 0) * 140ms); }
    .rv:not(.is-in) { transform: translateY(var(--sp-4)); }

    /* 路線図：池袋から線が描かれ、到達した順に駅が灯る（線は飾り。駅名と分数は下の一覧にも文字である） */
    .map .draw { stroke-dashoffset: 100; }
    .map.is-in .draw { stroke-dashoffset: 0; transition: stroke-dashoffset calc(var(--m) * 60ms) linear .35s; }
    .map.is-in .lit {
      transition: opacity .3s, transform .7s var(--ease);
      transition-delay: calc(var(--m) * 60ms + 350ms);
    }
    .map.is-in .dot.is-sel .lit { transform: scale(1.45); transition-delay: 0s; }
    .map.is-in .leaders path, .map.is-in .st {
      transition: opacity .5s, transform .7s var(--ease), background-color .3s, color .3s;
      transition-delay: calc(var(--m) * 60ms + 450ms), calc(var(--m) * 60ms + 450ms), 0s, 0s;
    }
    .map.is-in .ln, .map.is-in .tick, .map.is-in .hub-label { transition: opacity .8s .2s; }

    /* 防犯：左の写真を固定し、右の項目に合わせて切り替える（防犯の検知が動いたときだけ。動かなければ2列で全部見せる） */
    .secu-on .secu-frame {
      position: sticky; top: calc(var(--hd-h) + var(--sp-4));
      display: block; aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--radius-card);
    }
    .secu-on .secu-ph { position: absolute; inset: 0; border-radius: 0; opacity: 0; transform: scale(1.06); transition: opacity .8s, transform 1.4s var(--ease); }
    .secu-on .secu-ph.is-on { opacity: 1; transform: none; }
    .secu-on .secu-item { display: flex; flex-direction: column; justify-content: center; min-height: 46vh; }

    /* 詳細パネル（View Transitions 非対応のとき） */
    &:not(.vt) .pdlg[open], &:not(.vt) .ldlg[open] { opacity: 1; transform: none; transition: opacity .3s, transform .45s var(--ease); }
  }

  /* 内容を隠す状態（3秒たったら無条件で解除＝reveal-all） */
  html.js:not([data-motion="off"]):not(.reveal-all) {
    .rv:not(.is-in) { opacity: 0; transform: translateY(var(--sp-5)); }

    /* 見出しが1行ずつ下からせり上がる */
    .hero-h1 .slab { animation: slab-in .8s var(--ease) both; }
    .hero-h1 .w { animation: rise 1s var(--ease) both; }
    .h1-sm .slab { animation-delay: .1s; }
    .h1-lg:nth-child(2) .slab { animation-delay: .25s; }
    .h1-lg:nth-child(2) .w:nth-child(1) { animation-delay: .4s; }
    .h1-lg:nth-child(2) .w:nth-child(2) { animation-delay: .52s; }
    .h1-lg:nth-child(3) .slab { animation-delay: .45s; }
    .h1-lg:nth-child(3) .w:nth-child(1) { animation-delay: .62s; }
    .h1-lg:nth-child(3) .w:nth-child(2) { animation-delay: .74s; }
    .hero-stats { animation: slab-in .8s var(--ease) .9s both; }
    .hero-acts { animation: fade-up .8s var(--ease) 1.05s both; }

    .map:not(.is-in) .lit { opacity: 0; transform: scale(.2); }
    .map:not(.is-in) :is(.leaders path, .st, .ln, .tick, .hub-label) { opacity: 0; }
    .map:not(.is-in) .st { transform: translateY(var(--sp-1)); }
  }
  /* 検知が一度も動かないまま3秒たったら、線も描き終わった状態にし、小さなずれも戻す（写真が注記に重ならないように） */
  html.reveal-all:not(.io-ok) .map .draw { stroke-dashoffset: 0; }
  html.reveal-all:not(.io-ok) .rv:not(.is-in) { transform: none; }

  @starting-style {
    html.js:not([data-motion="off"]):not(.vt) .pdlg[open] { opacity: 0; transform: translateY(var(--sp-4)); }
    html.js:not([data-motion="off"]):not(.vt) .ldlg[open] { opacity: 0; }
  }

  /* スクロール連動（対応ブラウザだけ。内容を隠さない飾りの動きだけに使う） */
  @supports (animation-timeline: view()) {
    html.js:not([data-motion="off"]) {
      .hero-slides { animation: hero-out linear both; animation-timeline: view(); animation-range: exit 0% exit 100%; }
      .pz img { animation: drift linear both; animation-timeline: view(); animation-range: cover 0% cover 100%; }
      .gal-open img { animation: gal-in linear both; animation-timeline: view(inline); animation-range: entry 0% entry 100%; }
      .hd:not(.is-top) .hd-bar { opacity: 1; animation: grow linear both; animation-timeline: scroll(root); }
      .gal-bar { display: block; }
      .gal-bar i { animation: grow linear both; animation-timeline: --gal; }
    }
  }
}

/* 動きを止めるとき：切り替えの途中の色が残らないよう、変化もすべて一瞬にする（JavaScriptが無効のときも同じ） */
html[data-motion="off"] *, html[data-motion="off"] *::before, html[data-motion="off"] *::after,
html:not(.js) *, html:not(.js) *::before, html:not(.js) *::after { transition: none !important; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@keyframes kb { from { transform: scale(1); } to { transform: scale(1.08); } }
@keyframes prog { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes slab-in { from { opacity: 0; transform: translateX(calc(var(--sp-4) * -1)); } }
@keyframes rise { from { opacity: 0; transform: translateY(105%); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(var(--sp-3)); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes cue { 0%, 100% { transform: none; } 50% { transform: translateY(.3em); } }
@keyframes hero-out { to { transform: translateY(18%) scale(1.04); } }
@keyframes drift { from { transform: scale(1.12) translateY(-3%); } to { transform: scale(1.12) translateY(3%); } }
@keyframes gal-in { from { transform: scale(1.14); } to { transform: scale(1); } }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ============================================================
   18. スマホ（768px以下）
   ============================================================ */
@media (max-width: 768px) {
  /* ヘッダー */
  .nav-pc, .hd-cta { display: none; }
  .menu-btn {
    display: inline-flex; align-items: center; gap: var(--sp-1);
    min-height: 44px; margin-left: auto; padding: 0 var(--sp-2);
    border: 2px solid var(--rule-strong); border-radius: var(--radius-btn);
    background: var(--surface); color: var(--key-text);
    font: inherit; font-size: var(--fs-note); font-weight: 700; cursor: pointer;
  }
  .hd.is-top .menu-btn, .hd-top .hd .menu-btn { border-color: transparent; background: var(--navy); color: var(--on-key); }

  /* 最初の画面 */
  .hero-in { padding: calc(var(--hd-h) + var(--sp-5) * 2) var(--gut) var(--sp-4); }
  .slide img { object-position: var(--pos-sp); }
  .slide-cap { top: calc(var(--hd-h) + var(--sp-2)); left: var(--gut); right: auto; }
  .slab-chip b { font-size: var(--fs-note); }
  .slab-chip span { display: none; }
  .h1-sm .slab { font-size: var(--fs-note); }
  .h1-lg .slab { padding: var(--sp-chip-y) var(--sp-2) var(--sp-1); }
  .hero-stats { gap: 0 var(--sp-3); padding: var(--sp-1) var(--sp-2); }
  .hero-stats li + li::before { display: none; }
  .hero-stats b { font-size: var(--fs-h2); }
  .hero-acts { display: grid; grid-template-columns: 1fr; }
  .hero-ctrl { top: calc(var(--hd-h) + var(--sp-2)); bottom: auto; padding-left: var(--sp-1); }
  .hero-prog i { width: 16px; }
  .hero-pause { padding: 0; width: 44px; justify-content: center; }
  .hero-pause-tx { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .hero-cue { display: none; }

  /* 12列の並びはスマホでは1列にする */
  .intro-grid, .secu, .equip, .corp-grid, .faq-grid, .contact-grid { grid-template-columns: minmax(0, 1fr); }

  /* 紹介 */
  .intro-tx, .intro-ph { grid-column: 1 / -1; }
  .intro-lead { font-size: var(--fs-h3); }
  .intro-ph { padding-bottom: 0; }
  .intro-ph-b { position: relative; width: 56%; margin-top: -18%; }
  .intro-ph .cap { position: static; width: auto; margin-top: var(--sp-1); }

  /* 路線図 */
  .map--pc { display: none; }
  .map--sp { display: block; flex-basis: 100%; }
  .map-list { grid-template-columns: 1fr 1fr; gap: 0 var(--sp-3); }

  /* 物件 */
  .feat { display: block; margin-bottom: var(--sp-5); }
  .feat-media { padding-bottom: 0; }
  .feat-sub { position: relative; right: auto; width: 64%; margin: var(--sp-2) 0 0 auto; }
  .feat-body { margin-top: var(--sp-3); }
  .pgrid { grid-template-columns: 1fr; gap: var(--sp-5); }
  .pc--w, .pc--n, .pcta { grid-column: 1 / -1; margin-top: 0; }
  .pcta { padding: var(--sp-3); }

  /* ギャラリー */
  .gal-item figure { width: min(calc(var(--gal-h) * 1.5), 86vw); }
  .gal-open img { height: auto; aspect-ratio: 3 / 2; }
  .gal-item--v .gal-open img { aspect-ratio: 2 / 3; }

  /* 防犯と設備 */
  .secu-frame, .secu-list { grid-column: 1 / -1; }
  .equip-tx, .equip-ph { grid-column: 1 / -1; }
  .equip-list { grid-template-columns: 1fr; }

  /* 法人契約 */
  .corp-tx, .corp-nums { grid-column: 1 / -1; }
  .corp-nums { grid-template-columns: 1fr 1fr; gap: var(--sp-3); }

  /* よくある質問・お問い合わせ */
  .faq-head, .faq { grid-column: 1 / -1; }
  .faq-head { position: static; }
  .contact-ph, .contact-tx { grid-column: 1 / -1; }
  .contact-ph .frame { aspect-ratio: 4 / 3; }
  .contact-ph img { object-position: 40% 45%; }
  .contact-tx .btn { width: 100%; }

  /* フッター：固定バーに隠れないよう下を空ける */
  .ft { padding-bottom: calc(var(--sp-5) * 2); }

  /* 固定バー */
  .fixbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--sp-1);
    padding: var(--sp-1) var(--sp-2);
    border-top: 1px solid var(--rule);
    background: var(--surface);
    transition: transform .35s var(--ease), visibility 0s;
  }
  .fixbar .btn { padding: var(--sp-1) var(--sp-2); white-space: nowrap; }
  .fixbar.is-hidden { transform: translateY(110%); visibility: hidden; transition: transform .35s var(--ease), visibility 0s .35s; }
  html:has(dialog[open]) .fixbar { display: none; }

  /* 詳細パネルは全画面 */
  .pdlg { width: 100vw; max-height: 100svh; height: 100svh; border-radius: 0; }
  .pdlg-in { padding: var(--sp-3) var(--gut) var(--sp-5); }
  .pdlg-main { grid-template-columns: 1fr; gap: var(--sp-3); }
  .pdlg-title { font-size: var(--fs-h2); }
}

/* 動きありのスマホ：防犯の写真を上に固定 */
@media (max-width: 768px) and (prefers-reduced-motion: no-preference) {
  html.js:not([data-motion="off"]) {
    .secu-on .secu-frame { top: var(--hd-h); z-index: 2; aspect-ratio: auto; height: 40svh; border-radius: 0; margin-inline: calc(var(--gut) * -1); }
    .secu-on .secu-item { min-height: 52svh; }
  }
}
