:root {
  --bg: #ffffff;
  --panel: #edeeef;
  --ink: #1b1b1b;
  --ink-sub: #6b6d70;
  --line: #d9dadc;
  --pill: #ffffff;
  --accent: #1b1b1b;
  --heart: #e2483d;
  --radius-card: 6px;
  --gutter: clamp(16px, 2.4vw, 32px);
  --font: "Zen Kaku Gothic New", "Hiragino Sans", "Noto Sans JP", sans-serif;
  --font-en: "Inter", "Zen Kaku Gothic New", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
.sp-only { display: none; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 30;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 14px var(--gutter);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
}
.icon-button {
  display: grid; place-items: center; width: 40px; height: 40px;
  background: none; border: 0; border-radius: 50%;
}
.icon-button:hover { background: var(--panel); }
.logo {
  display: flex; align-items: center; gap: 8px; text-decoration: none;
  font-family: var(--font-en); font-weight: 800; letter-spacing: .08em; font-size: 15px;
}
.header-actions { justify-self: end; display: flex; align-items: center; gap: 10px; }
.text-button {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px; border: 0; border-radius: 999px; background: none; font-weight: 500; font-size: 14px;
}
.text-button:hover, .text-button[aria-pressed="true"] { background: var(--panel); }
.text-button[aria-pressed="true"] svg { color: var(--heart); }
.badge {
  min-width: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--ink); color: var(--bg); font-family: var(--font-en); font-size: 11px; line-height: 20px; text-align: center;
}
.primary-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 18px; border: 0; border-radius: 999px;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 14px; text-decoration: none;
  transition: opacity .2s;
}
.primary-button:hover { opacity: .82; }
.primary-button.large { padding: 14px 28px; font-size: 15px; }
.secondary-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 13px 24px; border: 1.5px solid var(--ink); border-radius: 999px;
  background: var(--bg); font-weight: 700; text-decoration: none;
}
.secondary-button:hover { background: var(--panel); }

/* ---------- drawer ---------- */
.drawer {
  position: fixed; inset: 0 auto 0 0; z-index: 50; width: min(320px, 86vw);
  display: flex; flex-direction: column; gap: 4px; padding: 72px 28px 28px;
  background: var(--bg); transform: translateX(-100%); transition: transform .3s ease;
}
.drawer.is-open { transform: none; }
.drawer a { padding: 12px 0; border-bottom: 1px solid var(--line); text-decoration: none; font-weight: 700; }
.drawer-close { position: absolute; top: 14px; left: 18px; }
.drawer-backdrop {
  position: fixed; inset: 0; z-index: 40; background: rgb(0 0 0 / .35);
  opacity: 0; pointer-events: none; transition: opacity .3s;
}
.drawer-backdrop.is-open { opacity: 1; pointer-events: auto; }

/* ---------- lead & filters ---------- */
main { padding: 0 var(--gutter); }
.lead { margin: 4px 0 14px; color: var(--ink-sub); font-size: 14px; text-align: center; }
.lead strong { color: var(--ink); font-family: var(--font-en); }

.filter-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px;
  padding: 16px 20px; border-radius: 4px; background: var(--panel);
}
.keyword {
  display: flex; align-items: center; gap: 8px; flex: 0 1 200px;
  padding: 6px 4px; border-bottom: 1px solid #b9bbbe; color: var(--ink-sub);
}
.keyword input { width: 100%; border: 0; background: none; font: inherit; color: var(--ink); outline: none; }
.filter-pills { display: flex; flex-wrap: wrap; gap: 8px; flex: 1 1 auto; }
.filter-pill { position: relative; }
.pill-button {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--pill);
  font-weight: 700; font-size: 13px; white-space: nowrap;
}
.pill-button::before {
  content: ""; border: 4.5px solid transparent; border-top: 6px solid currentColor; border-bottom: 0;
}
.pill-button.has-selection { background: var(--ink); border-color: var(--ink); color: #fff; }
.pill-button .pill-count { font-family: var(--font-en); font-size: 11px; }
.pill-panel {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 20; min-width: 220px; max-height: 340px; overflow: auto;
  padding: 10px; border-radius: 6px; background: rgb(60 60 62 / .94); color: #fff;
  box-shadow: 0 12px 32px rgb(0 0 0 / .2); backdrop-filter: blur(6px);
}
.pill-panel[hidden] { display: none; }
.pill-panel-title { margin: 2px 6px 6px; font-size: 11px; letter-spacing: .1em; color: #c7c8ca; }
.pill-option {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%;
  padding: 7px 8px; border: 0; border-radius: 4px; background: none; color: inherit; text-align: left; font-size: 14px;
}
.pill-option:hover { background: rgb(255 255 255 / .1); }
.pill-option[aria-pressed="true"] { background: rgb(255 255 255 / .18); font-weight: 700; }
.pill-option .option-label { display: flex; align-items: center; gap: 8px; }
.pill-option .option-count { color: #a9aaad; font-family: var(--font-en); font-size: 12px; }
.color-dot { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgb(255 255 255 / .4); }
.reset-button {
  display: inline-flex; align-items: center; gap: 6px; margin-left: auto; padding: 6px 4px;
  border: 0; background: none; color: var(--ink-sub); font-weight: 700; font-size: 13px;
}
.reset-button:hover { color: var(--ink); }

/* ---------- toolbar ---------- */
.toolbar { display: flex; align-items: center; justify-content: space-between; margin: 20px 0 18px; }
.result-count { margin: 0; font-weight: 700; font-size: 14px; }
.result-count strong { font-family: var(--font-en); }
.toolbar-switches { display: flex; gap: 12px; }
.segmented { display: flex; padding: 3px; border-radius: 6px; background: var(--panel); }
.segmented button {
  display: grid; place-items: center; width: 38px; height: 30px;
  border: 0; border-radius: 4px; background: none; color: var(--ink-sub);
}
.segmented button.is-active { background: var(--bg); color: var(--ink); box-shadow: 0 1px 2px rgb(0 0 0 / .08); }

/* ---------- house grid ---------- */
.house-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 40px 28px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.house-grid[data-device="sp"] { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 36px 20px; }
.house-grid[data-layout="masonry"] { display: block; columns: 4 240px; column-gap: 24px; }
.house-grid[data-layout="masonry"][data-device="sp"] { columns: 6 150px; column-gap: 18px; }
.house-grid[data-layout="masonry"] .house-card { break-inside: avoid; margin-bottom: 32px; }

.house-card { position: relative; animation: card-in .5s ease both; }
@keyframes card-in { from { opacity: 0; transform: translateY(12px); } }
.card-link { display: block; width: 100%; padding: 0; border: 0; background: none; text-align: left; }
.card-shot {
  position: relative; overflow: hidden; border-radius: var(--radius-card); background: var(--panel);
  aspect-ratio: 16 / 10;
}
.house-grid[data-device="sp"] .card-shot { aspect-ratio: 390 / 760; border-radius: 14px; }
.house-grid[data-layout="masonry"] .card-shot { aspect-ratio: auto; }
.card-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .6s ease; }
.house-grid[data-layout="masonry"] .card-shot img { height: auto; }
.card-shot::after {
  content: "内覧する"; position: absolute; inset: 0; display: grid; place-items: center;
  background: rgb(20 20 20 / .45); color: #fff; font-weight: 700; letter-spacing: .1em;
  opacity: 0; transition: opacity .25s;
}
.card-link:hover .card-shot img { transform: scale(1.03); }
.card-link:hover .card-shot::after, .card-link:focus-visible .card-shot::after { opacity: 1; }
.card-title { margin: 12px 0 2px; font-size: 15px; font-weight: 700; line-height: 1.5; }
.card-meta { margin: 0; color: var(--ink-sub); font-size: 12.5px; }
.house-grid[data-device="sp"] .card-title { font-size: 13px; }
.house-grid[data-device="sp"] .card-meta { font-size: 11px; }
.wish-button {
  position: absolute; top: 10px; right: 10px; z-index: 2; display: grid; place-items: center;
  width: 34px; height: 34px; border: 0; border-radius: 50%;
  background: rgb(255 255 255 / .92); color: #9a9b9e; box-shadow: 0 2px 8px rgb(0 0 0 / .12);
  transition: transform .2s, color .2s;
}
.wish-button:hover { transform: scale(1.08); }
.wish-button[aria-pressed="true"] { color: var(--heart); }
.new-label {
  position: absolute; top: 10px; left: 10px; z-index: 2; padding: 2px 8px; border-radius: 3px;
  background: var(--ink); color: #fff; font-family: var(--font-en); font-size: 10px; font-weight: 700; letter-spacing: .12em;
}
.empty-state { padding: 80px 0; color: var(--ink-sub); text-align: center; }

/* ---------- 展示場について / 流れ / 相談 ---------- */
.notes { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px 48px; max-width: 1080px; margin: 0 auto; padding: 96px 0 0; border-bottom: 0; }
.notes h2 { margin: 0; padding-top: 14px; border-top: 2px solid var(--ink); font-size: 17px; line-height: 1.5; }
.notes > :not(h2) { grid-column: 2; }
.notes-body { max-width: 640px; padding-top: 10px; }
.notes-body p { margin: 0 0 1.1em; font-size: 15.5px; line-height: 2; }
.notes-aside { color: var(--ink-sub); font-size: 13px !important; }
.flow-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.flow-table th, .flow-table td { padding: 14px 12px 14px 0; border-top: 1px solid var(--line); text-align: left; vertical-align: top; }
.flow-table tr:first-child th, .flow-table tr:first-child td { border-top: 0; }
.flow-table th { width: 6em; white-space: nowrap; }
.flow-days { width: 7em; color: var(--ink-sub); font-size: 13px; white-space: nowrap; text-align: right !important; }
.consult-lead { margin: 10px 0 0; color: #444; }
.consult-form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.consult-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; }
.consult-form .full { grid-column: 1 / -1; }
.consult-form input, .consult-form textarea {
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; background: #fafafa; font: inherit; font-weight: 400;
}
.consult-form input:focus, .consult-form textarea:focus { outline: 2px solid var(--ink); outline-offset: 1px; background: #fff; }
.consult-form button { justify-self: start; }
.form-status { grid-column: 1 / -1; margin: 0; min-height: 1.7em; font-size: 14px; }

.site-footer { margin-top: 120px; padding: 32px var(--gutter); border-top: 1px solid var(--line); color: var(--ink-sub); font-size: 12px; text-align: center; }
.site-footer p { margin: 2px 0; }
.footer-note { font-size: 11px; }

/* ---------- dialog (物件詳細) ---------- */
.house-dialog {
  width: min(1120px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0;
  border: 0; border-radius: 10px; background: var(--bg); color: var(--ink);
  box-shadow: 0 30px 80px rgb(0 0 0 / .3);
}
.house-dialog::backdrop { background: rgb(20 20 22 / .6); backdrop-filter: blur(3px); }
.house-dialog[open] { animation: dialog-in .3s ease; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(16px); } }
.dialog-inner { display: grid; grid-template-columns: 1.35fr 1fr; }
.dialog-close { position: absolute; top: 12px; right: 12px; z-index: 3; background: rgb(255 255 255 / .9); }
.dialog-visual { position: relative; padding: 36px 36px 48px; background: var(--panel); }
.dialog-visual .shot-pc { border-radius: 6px; box-shadow: 0 16px 40px rgb(0 0 0 / .18); aspect-ratio: 16 / 10; object-fit: cover; object-position: top; width: 100%; }
.dialog-visual .shot-sp {
  position: absolute; right: 18px; bottom: 20px; width: 23%; aspect-ratio: 390 / 760; object-fit: cover; object-position: top;
  border: 5px solid #111; border-radius: 18px; box-shadow: 0 14px 30px rgb(0 0 0 / .3);
}
.palette { display: flex; gap: 8px; margin-top: 22px; }
.palette span { display: flex; flex-direction: column; gap: 4px; font-family: var(--font-en); font-size: 10px; color: var(--ink-sub); }
.palette i { display: block; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgb(0 0 0 / .1); }
.dialog-spec { padding: 40px 36px 36px; overflow: auto; max-height: calc(100vh - 48px); }
.spec-industry { margin: 0; font-size: 12px; font-weight: 700; color: var(--ink-sub); letter-spacing: .08em; }
.dialog-spec h2 { margin: 4px 0 6px; font-size: 26px; line-height: 1.35; }
.spec-catch { margin: 0 0 24px; color: #444; }
.spec-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.spec-table th, .spec-table td { padding: 12px 0; border-top: 1px solid var(--line); text-align: left; vertical-align: top; }
.spec-table th { width: 7.5em; color: var(--ink-sub); font-weight: 500; white-space: nowrap; }
.spec-table th small { display: block; font-size: 10px; letter-spacing: .05em; }
.spec-price { font-family: var(--font-en); font-size: 20px; font-weight: 800; }
.chip-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.chip-list li { padding: 2px 10px; border-radius: 999px; background: var(--panel); font-size: 12.5px; }
.room-list { counter-reset: room; }
.room-list li::before { counter-increment: room; content: counter(room) " "; font-family: var(--font-en); font-weight: 700; color: var(--ink-sub); }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.dialog-actions .primary-button { padding: 14px 26px; font-size: 15px; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .house-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .house-grid[data-device="sp"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .dialog-inner { grid-template-columns: 1fr; }
  .dialog-spec { max-height: none; }
  .house-dialog { overflow: auto; }
}
@media (max-width: 720px) {
  .sp-only { display: inline; }
  .text-button .wish-label { display: none; }
  .header-actions .primary-button { display: none; }
  .filter-bar { padding: 14px; }
  .keyword { flex: 1 1 100%; }
  .filter-pills { flex-wrap: nowrap; overflow-x: auto; margin: 0 -14px; padding: 0 14px 2px; scrollbar-width: none; }
  .filter-pills::-webkit-scrollbar { display: none; }
  .pill-panel { position: fixed; top: auto; bottom: 0; left: 0; right: 0; max-height: 60vh; border-radius: 14px 14px 0 0; }
  .reset-button { margin-left: 0; }
  .house-grid { grid-template-columns: 1fr; gap: 32px; }
  .house-grid[data-device="sp"] { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 14px; }
  .house-grid[data-layout="masonry"] { columns: 2; column-gap: 14px; }
  .house-grid[data-layout="masonry"] .card-meta { display: none; }
  .notes { grid-template-columns: 1fr; padding-top: 72px; }
  .notes > :not(h2) { grid-column: 1; }
  .flow-table tr { display: grid; grid-template-columns: 1fr auto; padding: 14px 0; border-top: 1px solid var(--line); }
  .flow-table tr:first-child { border-top: 0; }
  .flow-table th, .flow-table td { padding: 0; border: 0; width: auto; }
  .flow-table .flow-days { grid-row: 1; grid-column: 2; }
  .flow-table td:not(.flow-days) { grid-column: 1 / -1; margin-top: 4px; }
  .consult-form { grid-template-columns: 1fr; }
  .dialog-visual { padding: 20px 20px 32px; }
  .dialog-spec { padding: 28px 22px; }
  .dialog-actions a { flex: 1 1 100%; }
}

/* ---------- SEO 用に足した要素（見た目は従来どおり） ---------- */
h1.lead { font-size: 14px; font-weight: 400; line-height: 1.7; }
.card-link { text-decoration: none; color: inherit; }
.text-link { align-self: center; font-size: 13px; font-weight: 700; color: var(--ink-sub); }
.genre-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 10px 0 0; list-style: none; }
.genre-links a {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px;
  border: 1px solid var(--line); border-radius: 999px; font-size: 13.5px; font-weight: 700; text-decoration: none;
}
.genre-links a:hover, .genre-links a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.genre-links span { font-family: var(--font-en); font-size: 11px; color: var(--ink-sub); }
.genre-links a:hover span, .genre-links a[aria-current="page"] span { color: #c7c8ca; }
.consult-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 18px 0 6px; font-size: 13px; color: var(--ink-sub); }
