/* シラカゲ不動産（デモ）賃貸物件の一覧と絞り込み */
/* 共通部品（TENKA LAB バー・ヘッダー・フッター・ボタン・固定バー・実際のお仕事では）は、これまでの LP のデモと同じクラス名と作り */
:root {
  --c-base: #F4F7F8;
  --c-surface: #FFFFFF;
  --c-soft: #E6EEF0;
  --c-main: #1F5257;
  --c-accent: #A12F3C;
  --c-accent-dark: #842532;
  --c-text: #1E2A2E;
  --c-sub: #55626A;
  --c-line: #CFDADD;
  --c-wood: #F3E6D2;
  --c-water: #D6E6EA;

  --font-body: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", "Meiryo", "Noto Sans JP", sans-serif;
  --font-head: var(--font-body);

  --pad-x: 16px;
  --gap-sec: 48px;
  --pad-card: 16px;
  --radius: 12px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--c-base);
  color: var(--c-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.8;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
  /* 日本語の文を語のまとまりで折り返す（対応しない端末はふつうの折り返し） */
  word-break: auto-phrase;
}
body.is-sheet { overflow: hidden; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, fieldset { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--c-main); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
.inline-link { padding: 15px 0; font-weight: 700; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--c-main); outline-offset: 2px; }
[hidden] { display: none !important; }
.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;
}
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 var(--pad-x); }
.nw { white-space: nowrap; }
svg { flex: none; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
[tabindex="-1"]:focus { outline: none; }
[tabindex="-1"]:focus-visible { outline: 3px solid var(--c-main); }
.sec__title, .hero h1, .detail__title { scroll-margin-top: 24px; }
p, li, dd { text-wrap: pretty; }

/* ---------- TENKA LAB バー（作品例・デモ 共通） ---------- */
.tl-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 40px; padding: 8px 16px; background: #1B2A41; color: #FFFFFF;
  font-family: var(--font-body); font-size: 13px; line-height: 1.5; letter-spacing: .04em;
}
.tl-bar__text { margin: 0; }
.tl-bar strong { font-weight: 700; }
.tl-bar__back {
  flex: none; position: relative; color: #FFFFFF; font-weight: 700;
  text-decoration: underline; text-underline-offset: 3px;
}
.tl-bar__back:hover { color: #FFFFFF; text-decoration-thickness: 2px; }
.tl-bar__back::before { content: ""; position: absolute; inset: -15px -8px; }
.tl-bar__back::after { content: "→"; margin-left: 4px; }
.tl-bar__back:focus-visible { outline: 3px solid #FFFFFF; outline-offset: 2px; }
@media (min-width: 768px) { .tl-bar { padding: 8px 32px; } }

/* ---------- ボタン ---------- */
.btn-main {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 56px; padding: 0 28px; border: 0; border-radius: 28px;
  background: var(--c-accent); color: #FFFFFF; font-size: 16px; font-weight: 700; line-height: 1.3;
  text-decoration: none; text-align: center;
}
.btn-main:hover, .btn-main:active { background: var(--c-accent-dark); color: #FFFFFF; }
.btn-sub {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border: 2px solid var(--c-main); border-radius: 24px;
  background: #FFFFFF; color: var(--c-main); font-size: 16px; font-weight: 700; line-height: 1.3;
  text-decoration: none; text-align: center;
}
.btn-sub:hover { background: var(--c-soft); }
.btn-sub svg { width: 20px; height: 20px; }
.btn-text {
  display: inline-flex; align-items: center; gap: 6px; min-height: 48px; min-width: 64px; padding: 0 4px;
  border: 0; background: none; color: var(--c-main); font-size: 15px; font-weight: 700;
  text-decoration: underline; text-underline-offset: 4px;
}
.btn-text:hover { text-decoration-thickness: 2px; }

/* ---------- ヘッダー（メニューなし。貼り付けない） ---------- */
.hd { background: #FFFFFF; border-bottom: 1px solid var(--c-line); position: relative; z-index: 20; }
.hd__in { display: flex; align-items: center; min-height: 56px; }
.hd__logo {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; min-width: 0;
  color: var(--c-main); text-decoration: none;
}
.hd__mark { width: 28px; height: 28px; }
.hd__name { font-family: var(--font-head); font-size: 17px; font-weight: 700; line-height: 1.3; letter-spacing: .08em; white-space: nowrap; }
.hd__demo {
  display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border-radius: 4px;
  background: var(--c-text); color: #FFFFFF; font-size: 12px; font-weight: 700; line-height: 1; white-space: nowrap;
}

/* ---------- ブロック ---------- */
.sec { padding: var(--gap-sec) 0; }
.sec--band { background: var(--c-soft); }
.sec__en { color: var(--c-sub); font-size: 13px; font-weight: 700; letter-spacing: .16em; line-height: 1.4; }
.sec__title { margin-top: 8px; font-family: var(--font-head); color: var(--c-main); font-size: 22px; font-weight: 700; line-height: 1.5; letter-spacing: .04em; }
.sec__lead { margin-top: 8px; color: var(--c-sub); font-size: 15px; line-height: 1.8; max-width: 40em; }
.sec__title + :not(.sec__lead), .sec__lead + * { margin-top: 24px; }
h3 { font-size: 20px; font-weight: 700; line-height: 1.4; letter-spacing: .04em; }
.note { margin-top: 16px; color: var(--c-sub); font-size: 14px; line-height: 1.7; max-width: 40em; }
.card { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius); padding: var(--pad-card); }

/* ---------- ファーストビュー ---------- */
.hero { padding: 24px 0 48px; }
.hero__art { display: block; width: 100%; height: auto; aspect-ratio: 3 / 1; margin: 0 auto 24px; }
.hero__tag {
  display: inline-flex; align-items: center; min-height: 28px; padding: 0 12px; margin-bottom: 12px;
  border: 1px solid var(--c-sub); border-radius: 14px; background: #FFFFFF; color: var(--c-text);
  font-size: 13px; font-weight: 700; line-height: 1.4;
}
.hero__kind { margin-bottom: 8px; color: var(--c-sub); font-size: 14px; font-weight: 700; line-height: 1.4; }
.h1 { font-family: var(--font-head); color: var(--c-main); font-size: 30px; font-weight: 700; line-height: 1.25; letter-spacing: .04em; }
.hero__lead { margin-top: 12px; font-size: 16px; line-height: 1.8; max-width: 40em; }
.hero__note { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; color: var(--c-sub); font-size: 14px; line-height: 1.7; }
.hero__note svg { margin-top: .2em; width: 16px; height: 16px; }
.hero__act { margin-top: 24px; }
.hero__btn { width: 100%; }

/* ---------- 条件で絞り込む ---------- */
.search__groups { display: grid; gap: 24px; }
.search__group { min-width: 0; padding: 0; border: 0; }
.search__label { display: block; padding: 0; margin-bottom: 8px; color: var(--c-text); font-size: 15px; font-weight: 700; line-height: 1.4; }
.search__hint { margin: -4px 0 8px; color: var(--c-sub); font-size: 14px; line-height: 1.7; }
.search__note { margin-top: 16px; color: var(--c-sub); font-size: 14px; line-height: 1.7; }
.sel-wrap { position: relative; }
.sel {
  display: block; width: 100%; min-height: 48px; padding: 0 44px 0 12px; margin: 0;
  border: 0; border-radius: 8px; background: #FFFFFF; box-shadow: inset 0 0 0 1.5px var(--c-sub);
  color: var(--c-text); font: inherit; font-size: 16px; font-weight: 400; line-height: 1.3;
  -webkit-appearance: none; appearance: none; cursor: pointer;
}
.sel:hover { box-shadow: inset 0 0 0 2px var(--c-main); }
.sel__icon { position: absolute; right: 12px; top: 50%; width: 20px; height: 20px; margin-top: -10px; color: var(--c-main); pointer-events: none; }

/* チップ（間取り・こだわり）。枠は box-shadow で描く（1.5px → 2px にしても幅と中身の位置が跳ねない） */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; display: inline-flex; max-width: 100%; cursor: pointer; }
.chip__face {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 14px 0 12px;
  border-radius: 24px; background: #FFFFFF; box-shadow: inset 0 0 0 1.5px var(--c-sub);
  color: var(--c-text); font-size: 16px; font-weight: 700; line-height: 1.2;
}
.chip__box { width: 20px; height: 20px; }
.chip__box rect { fill: #FFFFFF; stroke: var(--c-sub); stroke-width: 2; }
.chip__box path { fill: none; stroke: var(--c-main); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; visibility: hidden; }
.chip:hover .chip__input:not(:checked) + .chip__face { box-shadow: inset 0 0 0 2px var(--c-main); background: var(--c-soft); }
.chip__input:checked + .chip__face { box-shadow: inset 0 0 0 2px var(--c-main); background: var(--c-main); color: #FFFFFF; }
.chip__input:checked + .chip__face .chip__box rect { fill: #FFFFFF; stroke: #FFFFFF; }
.chip__input:checked + .chip__face .chip__box path { visibility: visible; }
.chip__input:focus-visible + .chip__face { outline: 3px solid var(--c-main); outline-offset: 3px; }

/* 駅から徒歩（radio） */
.walks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.walk-opt { position: relative; display: flex; min-width: 0; cursor: pointer; }
.walk-opt__face {
  display: flex; flex: 1 1 auto; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 12px;
  border-radius: 24px; background: #FFFFFF; box-shadow: inset 0 0 0 1.5px var(--c-sub);
  color: var(--c-text); font-size: 16px; font-weight: 700; line-height: 1.2;
}
.walk-opt__dot { width: 20px; height: 20px; }
.walk-opt__dot .o { fill: #FFFFFF; stroke: var(--c-sub); stroke-width: 2; }
.walk-opt__dot .i { fill: var(--c-main); visibility: hidden; }
.walk-opt:hover .walk-opt__input:not(:checked) + .walk-opt__face { box-shadow: inset 0 0 0 2px var(--c-main); background: var(--c-soft); }
.walk-opt__input:checked + .walk-opt__face { box-shadow: inset 0 0 0 2px var(--c-main); background: var(--c-main); color: #FFFFFF; }
.walk-opt__input:checked + .walk-opt__face .walk-opt__dot .o { stroke: #FFFFFF; }
.walk-opt__input:checked + .walk-opt__face .walk-opt__dot .i { visibility: visible; }
.walk-opt__input:focus-visible + .walk-opt__face { outline: 3px solid var(--c-main); outline-offset: 3px; }

.search__foot { display: grid; gap: 16px; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--c-line); }
.count { color: var(--c-text); font-size: 15px; font-weight: 700; line-height: 1.3; }
.count__n { color: var(--c-main); font-size: 22px; }
.search__sort .search__label { margin-bottom: 8px; }
.search__clear { width: 100%; }

/* ---------- 物件の一覧 ---------- */
.list__sum { color: var(--c-text); }
.list__sum + .list__note { margin-top: 8px; }
.list-grid { margin-top: 24px; }
.props { display: grid; gap: 16px; }
.prop { min-width: 0; }
.prop__in { background: #FFFFFF; border: 1px solid var(--c-line); border-radius: var(--radius); padding: 16px; }
.prop--current .prop__in { box-shadow: inset 0 0 0 1px var(--c-main); border-color: var(--c-main); }
.prop__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 8px; margin-bottom: 12px; }
.prop__no { color: var(--c-sub); font-size: 12px; font-weight: 700; line-height: 1.3; }
.prop__badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge {
  display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 12px;
  font-size: 12px; font-weight: 700; line-height: 1; white-space: nowrap;
}
.badge--open { background: #FFFFFF; border: 1px solid var(--c-sub); color: var(--c-sub); }
.badge--current { background: var(--c-main); color: #FFFFFF; }
.prop__grid { display: grid; grid-template-columns: 112px minmax(0, 1fr); grid-template-areas: "plan title" "info info"; column-gap: 12px; }
.prop__grid > .plan { grid-area: plan; width: 112px; }
.prop__title { grid-area: title; min-width: 0; }
.prop__info { grid-area: info; min-width: 0; margin-top: 12px; }
.prop__name { color: var(--c-text); font-size: 18px; font-weight: 700; line-height: 1.45; letter-spacing: 0; }
.prop__station { margin-top: 4px; color: var(--c-sub); font-size: 14px; line-height: 1.5; }
.prop__station b, .detail__station b { color: var(--c-text); font-weight: 700; }
.prop__money { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 12px; }
.prop__rent { color: var(--c-main); font-size: 24px; font-weight: 700; line-height: 1.2; }
.prop__yen { font-size: 16px; }
.prop__fee { color: var(--c-text); font-size: 14px; line-height: 1.6; }
.prop__month { color: var(--c-text); font-size: 14px; line-height: 1.6; }
.prop__month b { font-weight: 700; }
.prop__spec { margin-top: 8px; color: var(--c-text); font-size: 15px; font-weight: 700; line-height: 1.5; }
.prop__spec--sub { margin-top: 2px; font-size: 14px; font-weight: 400; line-height: 1.6; }
.sep { color: var(--c-sub); font-weight: 400; }
.prop__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tag {
  display: inline-flex; align-items: center; gap: 4px; min-height: 28px; padding: 0 10px 0 8px;
  border-radius: 14px; background: var(--c-soft); color: var(--c-text); font-size: 13px; font-weight: 700; line-height: 1.2;
}
.tag svg { width: 16px; height: 16px; color: var(--c-main); }
.prop__actions { display: grid; gap: 8px; margin-top: 16px; }
.prop__actions .btn-sub, .prop__actions .fav-btn { width: 100%; }

/* 「気になる」 */
.fav-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 16px; border: 0; border-radius: 24px;
  background: #FFFFFF; box-shadow: inset 0 0 0 1.5px var(--c-sub);
  color: var(--c-text); font-size: 16px; font-weight: 700; line-height: 1.3;
}
.fav-btn svg { width: 20px; height: 20px; color: var(--c-main); fill: none; }
.fav-btn:hover { background: var(--c-soft); }
.fav-btn[aria-pressed="true"] { background: var(--c-soft); box-shadow: inset 0 0 0 2px var(--c-main); }
.fav-btn[aria-pressed="true"] svg { fill: var(--c-main); }

/* 間取り図（CSS grid。すき間の 2px が壁の線に見える） */
.plan {
  display: grid; gap: 2px; padding: 2px; background: var(--c-main); border-radius: 4px;
  grid-template-columns: repeat(6, minmax(0, 1fr)); grid-template-rows: .5fr 1fr 1fr 1fr;
  aspect-ratio: 4 / 3;
}
.plan--1r { grid-template-areas: "bal bal bal bal bal bal" "r1 r1 r1 r1 r1 r1" "r1 r1 r1 r1 r1 r1" "ub ub k k en en"; }
.plan--1k { grid-template-areas: "bal bal bal bal bal bal" "r1 r1 r1 r1 r1 r1" "r1 r1 r1 r1 r1 r1" "k k ba wc en en"; }
.plan--1ldk { grid-template-areas: "bal bal bal bal bal bal" "ldk ldk ldk r1 r1 r1" "ldk ldk ldk r1 r1 r1" "ldk ldk ldk ba wc en"; }
.plan--2ldk { grid-template-areas: "bal bal bal bal bal bal" "r1 r1 ldk ldk ldk ldk" "r2 r2 ldk ldk ldk ldk" "r2 r2 ba wc en en"; }
.plan--3ldk { grid-template-areas: "bal bal bal bal bal bal" "r1 r1 ldk ldk r2 r2" "r1 r1 ldk ldk r2 r2" "r3 r3 ba wc en en"; }
.plan__room { display: grid; place-items: center; min-width: 0; min-height: 0; padding: 2px; overflow: hidden; }
.plan__room--bal { grid-area: bal; background: var(--c-base); }
.plan__room--r1 { grid-area: r1; background: #FFFFFF; }
.plan__room--r2 { grid-area: r2; background: #FFFFFF; }
.plan__room--r3 { grid-area: r3; background: #FFFFFF; }
.plan__room--ldk { grid-area: ldk; background: var(--c-wood); }
.plan__room--k { grid-area: k; background: var(--c-wood); }
.plan__room--ub { grid-area: ub; background: var(--c-water); }
.plan__room--ba { grid-area: ba; background: var(--c-water); }
.plan__room--wc { grid-area: wc; background: var(--c-water); }
.plan__room--en { grid-area: en; background: var(--c-soft); }
.plan__label { color: var(--c-text); font-size: 12px; font-weight: 700; line-height: 1.2; text-align: center; white-space: nowrap; letter-spacing: 0; }
.plan--sm .plan__label { display: none; }

/* 0件のときの案内 */
.empty { background: #FFFFFF; border: 2px dashed var(--c-main); border-radius: 12px; padding: 20px; }
.empty__title { color: var(--c-main); font-size: 18px; line-height: 1.45; }
.empty__lead { margin-top: 8px; color: var(--c-text); font-size: 15px; line-height: 1.7; }
.relax { display: grid; gap: 8px; margin-top: 16px; }
.relax-btn {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; align-items: center; width: 100%;
  min-height: 56px; padding: 10px 16px; border: 2px solid var(--c-main); border-radius: 12px;
  background: #FFFFFF; text-align: left; line-height: 1.4;
}
.relax-btn:hover { background: var(--c-soft); }
.relax-btn__name { color: var(--c-main); font-size: 16px; font-weight: 700; }
.relax-btn__count { color: var(--c-text); font-size: 14px; font-weight: 700; }
.empty .btn-sub { margin-top: 16px; width: 100%; }

/* ---------- 物件の詳細（シートと右の欄で同じ中身） ---------- */
.detail { min-width: 0; }
.detail__in { background: #FFFFFF; border: 1px solid var(--c-line); border-radius: 12px; padding: 24px; }
.detail__title { color: var(--c-text); font-size: 20px; font-weight: 700; line-height: 1.4; letter-spacing: 0; }
.detail__head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-bottom: 8px; }
.detail__station { margin-top: 4px; color: var(--c-sub); font-size: 14px; line-height: 1.5; }
.detail__note { margin-top: 8px; color: var(--c-sub); font-size: 14px; line-height: 1.7; }
.detail__plan { max-width: 320px; margin: 16px auto 0; }
.detail__plan-note { margin-top: 8px; color: var(--c-sub); font-size: 13px; line-height: 1.6; text-align: center; }
.detail__dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 16px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--c-line); }
.detail__dl dt { color: var(--c-sub); font-size: 14px; font-weight: 700; line-height: 1.6; }
.detail__dl dd { color: var(--c-text); font-size: 15px; line-height: 1.6; }
.detail__cost-title { margin-top: 24px; color: var(--c-main); font-size: 18px; line-height: 1.45; }
.cost { width: 100%; margin-top: 8px; border-collapse: collapse; font-size: 15px; line-height: 1.6; }
.cost th, .cost td { padding: 8px 0; border-bottom: 1px solid var(--c-line); vertical-align: top; }
.cost th { color: var(--c-text); font-weight: 400; text-align: left; }
.cost td { padding-left: 12px; color: var(--c-text); font-weight: 700; text-align: right; white-space: nowrap; }
.cost__sub { display: block; color: var(--c-sub); font-size: 13px; line-height: 1.5; }
.cost__total th, .cost__total td { border-top: 2px solid var(--c-main); border-bottom: 0; padding-top: 12px; color: var(--c-main); font-size: 20px; font-weight: 700; line-height: 1.3; }
.detail__strong { margin-top: 12px; color: var(--c-text); font-size: 15px; font-weight: 700; line-height: 1.7; }
.detail__extra { margin-top: 4px; color: var(--c-sub); font-size: 14px; line-height: 1.7; }
.detail__fav { margin-top: 16px; width: 100%; }

/* シート（〜1023px。dialog） */
.sheet {
  width: 100%; max-width: 100%; max-height: 88vh; margin: auto 0 0; padding: 0;
  border: 0; border-radius: 16px 16px 0 0; background: #FFFFFF; color: var(--c-text); overflow: auto;
  overscroll-behavior: contain;
}
.sheet::backdrop { background: rgba(30, 42, 46, .5); }
.sheet__bar {
  position: sticky; top: 0; z-index: 1; display: flex; justify-content: flex-end;
  padding: 8px 16px; background: #FFFFFF; border-bottom: 1px solid var(--c-line);
}
.sheet__body { padding: 16px 16px calc(24px + env(safe-area-inset-bottom)); }
.sheet__body .detail__in { border: 0; padding: 0; background: none; }
.sheet[open] { animation: sheet-in .2s ease-out; }
@keyframes sheet-in { from { transform: translateY(16px); opacity: .6; } to { transform: none; opacity: 1; } }
/* showModal の無いブラウザで open を付けた時 */
.sheet.is-fallback { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; box-shadow: 0 0 0 100vmax rgba(30, 42, 46, .5); }

/* ---------- 気になるリスト ---------- */
.fav__note { display: flex; align-items: flex-start; gap: 8px; margin-top: 16px; color: var(--c-sub); font-size: 14px; line-height: 1.7; max-width: 40em; }
.fav__note svg { margin-top: .2em; width: 16px; height: 16px; }
.sec__lead + .fav__note { margin-top: 16px; }
.fav__empty { margin-top: 24px; padding: 16px; background: #FFFFFF; border: 1px dashed var(--c-sub); border-radius: 12px; color: var(--c-text); font-size: 15px; line-height: 1.7; }
.fav__list { display: grid; gap: 12px; margin-top: 24px; }
.fav__item { min-width: 0; background: #FFFFFF; border: 1px solid var(--c-line); border-radius: 12px; padding: 16px; }
.fav__name { color: var(--c-text); font-size: 16px; font-weight: 700; line-height: 1.45; }
.fav__sub { margin-top: 2px; color: var(--c-text); font-size: 14px; line-height: 1.6; }
.fav__btns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.fav__btns .btn-sub { padding: 0 12px; }

/* ---------- 実際のお仕事では（TENKA LAB の層） ---------- */
.sec--lab { border-top: 1px dashed var(--c-sub); }
.lab-tag {
  display: inline-flex; align-items: center; gap: .3em; height: 24px; padding: 0 8px; border-radius: 4px;
  background: var(--c-text); color: #FFFFFF; font-size: 12px; font-weight: 700; line-height: 1;
}
.lab-title { margin-top: 12px; font-size: 22px; font-weight: 700; line-height: 1.5; color: var(--c-main); letter-spacing: .04em; }
.lab-lead { margin-top: 12px; max-width: 40em; }
.work-3 { display: grid; gap: 16px; margin-top: 24px; }
.work-3 > li { background: #FFFFFF; border: 1px solid var(--c-line); border-radius: 12px; padding: 24px; }
.work-3 > li > svg { color: var(--c-main); }
.work-3 h3 { margin-top: 8px; font-size: 17px; }
.work-3 ul, .work-check ul { margin-top: 8px; }
.work-3 ul li, .work-check li { position: relative; padding-left: 16px; font-size: 15px; line-height: 1.7; }
.work-3 ul li + li, .work-check li + li { margin-top: 4px; }
.work-3 ul li::before, .work-check li::before { content: ""; position: absolute; left: 0; top: .72em; width: 6px; height: 6px; border-radius: 50%; background: var(--c-main); }
.work-check { margin-top: 16px; padding: 16px; background: #FFFFFF; border: 1px dashed var(--c-sub); border-radius: 12px; }
.work-check h3 { font-size: 16px; }
.work-check__note { margin-top: 12px; color: var(--c-sub); font-size: 14px; line-height: 1.7; }
.lab-more { margin-top: 16px; }
.lab-more .btn-text { font-size: 14px; padding: 0; }

/* ---------- フッター ---------- */
.site-footer {
  background: var(--c-main); color: var(--c-base); font-size: 15px; line-height: 1.8;
  padding: 48px 16px; text-align: center;
}
.site-footer p + p { margin-top: 16px; }
.site-footer :focus-visible { outline-color: #FFFFFF; }
.btn {
  display: flex; align-items: center; justify-content: center; width: 100%; max-width: 100%; min-height: 52px;
  margin: 0 auto; border: 2px solid #FFFFFF; border-radius: 26px; background: var(--c-accent); color: #FFFFFF;
  font-size: 16px; font-weight: 700; text-decoration: none;
}
.btn:hover, .btn:active { background: var(--c-accent-dark); }
.copy { font-size: 12px; }

/* ---------- スマホの固定バー ---------- */
.fixbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px;
  min-height: calc(72px + env(safe-area-inset-bottom));
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: #FFFFFF; border-top: 1px solid var(--c-line);
  transition: transform .2s ease, visibility .2s;
}
.fixbar__sel { color: var(--c-text); font-size: 14px; font-weight: 700; line-height: 1.4; }
.fixbar .btn-main { min-height: 48px; padding: 0 20px; white-space: nowrap; }
.fixbar.is-hide { transform: translateY(100%); visibility: hidden; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fixbar { transition: none; }
  .sheet[open] { animation: none; }
}

/* 枠を描く色を強制する表示（ハイコントラスト）では box-shadow が消えるので、本物の枠を出す */
@media (forced-colors: active) {
  .chip__face, .walk-opt__face, .fav-btn, .sel { border: 2px solid CanvasText; }
  .chip__box, .walk-opt__dot { forced-color-adjust: none; }
  .chip__box rect, .walk-opt__dot .o { fill: Canvas; stroke: CanvasText; }
  .chip__box path { stroke: CanvasText; }
  .walk-opt__dot .i { fill: CanvasText; }
}

/* ---------- 〜767px ---------- */
@media (max-width: 767px) {
  body { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
}

/* ---------- 768px 以上 ---------- */
@media (min-width: 768px) {
  :root { --pad-x: 32px; --gap-sec: 80px; --pad-card: 20px; }
  .fixbar { display: none; }
  .hd__in { min-height: 64px; }
  .hd__name { font-size: 18px; }
  .hero { padding: 64px 0 80px; }
  .hero__in { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 32px; align-items: center; }
  .hero__art { grid-column: 2; grid-row: 1; height: 160px; aspect-ratio: auto; margin: 0; }
  .hero__text { grid-column: 1; grid-row: 1; min-width: 0; }
  .hero__kind { font-size: 15px; }
  .h1 { font-size: 36px; }
  .hero__lead { font-size: 17px; }
  .hero__btn { width: auto; min-width: 240px; }
  .sec__title { font-size: 26px; }
  .sec__lead { font-size: 16px; }
  .sec__title + :not(.sec__lead), .sec__lead + * { margin-top: 32px; }
  h3 { font-size: 22px; }
  .search__groups { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 32px; }
  .search__foot { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; }
  .count { font-size: 16px; align-self: center; }
  .count__n { font-size: 24px; }
  .search__sort { display: flex; align-items: center; gap: 12px; }
  .search__sort .search__label { margin-bottom: 0; white-space: nowrap; }
  .search__sort .sel-wrap { min-width: 280px; }
  .search__clear { width: auto; }
  .list-grid { margin-top: 32px; }
  .props { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prop__in { padding: 20px; height: 100%; }
  .prop__grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "plan" "title" "info"; }
  .prop__grid > .plan { width: 160px; height: 120px; margin: 0 auto 12px; }
  /* 2つ横に入らない時は折り返して、それぞれ全幅にする */
  .prop__actions { display: flex; flex-wrap: wrap; }
  .prop__actions .btn-sub, .prop__actions .fav-btn { flex: 1 1 auto; width: auto; }
  .prop__actions .btn-sub { padding: 0 12px; }
  .empty { padding: 24px; }
  .detail__title { font-size: 22px; }
  .plan__label { font-size: 13px; }
  .cost__total th, .cost__total td { font-size: 22px; }
  .sheet { width: calc(100% - 64px); max-width: 560px; max-height: 85vh; margin: auto; border-radius: 16px; }
  .sheet.is-fallback { left: 50%; right: auto; top: 50%; bottom: auto; transform: translate(-50%, -50%); }
  .sheet__body { padding: 20px 24px 24px; }
  .fav__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .btn { width: 280px; }
}

/* ---------- 1024px 以上：一覧（左）と詳細の欄（右 400px） ---------- */
@media (min-width: 1024px) {
  .hd__in { min-height: 72px; }
  .hero__in { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; }
  .hero__art { height: 200px; }
  .h1 { font-size: 40px; }
  .list-grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 32px; align-items: start; }
  .props { grid-template-columns: minmax(0, 1fr); }
  .prop__grid { grid-template-columns: 160px minmax(0, 1fr); grid-template-areas: "plan title" "plan info"; grid-template-rows: auto 1fr; column-gap: 20px; }
  .prop__grid > .plan { width: 160px; height: 120px; margin: 0; }
  .prop__info { margin-top: 8px; }
  .prop__actions { display: flex; flex-wrap: wrap; }
  .prop__actions .btn-sub, .prop__actions .fav-btn { flex: none; width: auto; }
  .prop__actions .btn-sub { padding: 0 20px; }
  .detail { position: sticky; top: 24px; }
  .detail.is-static { position: static; }
  .fav__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .work-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- 印刷（崩れない程度） ---------- */
@media print {
  .fixbar, .tl-bar__back, .hero__art, .hero__act, .search__clear, .btn, .lab-more, .prop__actions, .sheet { display: none !important; }
  body { padding-bottom: 0; background: none; color: #1E2A2E; }
  .sec--band, .site-footer, .tl-bar { background: none !important; color: #1E2A2E !important; }
  .prop__in, .card, .work-3 > li { break-inside: avoid; }
  .detail { position: static; }
}
