/* 共通の骨組み。色・字・角の丸みは theme-a/b/c.css の変数で決まる。
   スマホを先に書き、広い画面は min-width で足す。 */
:root {
  --bg: #fff; --surface: #fff; --ink: #222; --muted: #666; --line: #ddd;
  --accent: #a8141c; --accent-ink: #fff; --band: #1f2d3d; --band-ink: #fff;
  --font-body: 'Noto Sans JP', system-ui, sans-serif; --font-head: var(--font-body);
  --radius: 4px; --shadow: none; --wrap: 1120px; --gutter: 16px;
  --cta-h: 60px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 16px; line-height: 1.85; letter-spacing: .02em;
  padding-bottom: calc(var(--cta-h) + env(safe-area-inset-bottom)); /* スマホ下の固定ボタンの分 */
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.4; margin: 0 0 .6em; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 820px; }
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 8px; z-index: 100; background: #fff; padding: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* テスト環境の帯 */
.test-bar { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; padding: 6px var(--gutter);
  background: #fff3b0; color: #3d3500; font: 500 12px/1.5 system-ui, sans-serif; letter-spacing: 0; }
.test-bar span { font-weight: 700; }
.test-bar a[aria-current] { font-weight: 700; text-decoration: none; background: #3d3500; color: #fff3b0; padding: 0 6px; border-radius: 3px; }
.slot { background: #fff3b0; color: #6b5300; border: 1px dashed #c9a400; padding: 0 .3em; border-radius: 3px; font-size: .9em; white-space: nowrap; }

/* ヘッダ */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--surface); border-bottom: 1px solid var(--line); }
.header-in { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand img { height: 36px; width: auto; }
.menu-btn { display: inline-flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
  width: 52px; height: 52px; margin-right: -8px; border: 0; background: none; color: var(--ink); cursor: pointer; }
.menu-btn span { display: block; width: 24px; height: 2px; background: currentColor; transition: transform .2s, opacity .2s; }
.menu-btn b { font-size: 10px; font-weight: 500; line-height: 1; margin-top: 2px; }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.gnav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--line);
  padding: 8px var(--gutter) 20px; box-shadow: 0 12px 24px rgba(0,0,0,.12); }
.gnav.is-open { display: block; }
.gnav ul { list-style: none; margin: 0; padding: 0; }
.gnav li a { display: block; padding: 14px 4px; border-bottom: 1px solid var(--line); text-decoration: none; font-weight: 500; }
.gnav a[aria-current="page"] { color: var(--accent); }
.gnav-tel { display: block; margin-top: 14px; text-decoration: none; font-size: 22px; font-weight: 700; letter-spacing: .04em; }
.gnav-tel span { display: block; font-size: 11px; font-weight: 500; color: var(--muted); }

@media (min-width: 960px) {
  .header-in { height: 84px; }
  .brand img { height: 44px; }
  .menu-btn { display: none; }
  .gnav { display: flex; position: static; align-items: center; gap: 28px; padding: 0; background: none; border: 0; box-shadow: none; }
  .gnav ul { display: flex; gap: 22px; }
  .gnav li a { padding: 6px 0; border: 0; font-size: 14px; }
  .gnav-tel { margin: 0; font-size: 19px; line-height: 1.2; }
}

/* ボタン */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 48px; padding: 10px 26px;
  border: 1px solid currentColor; border-radius: var(--radius); background: transparent; color: var(--ink);
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; transition: background .2s, color .2s; }
.btn:hover { background: var(--ink); color: var(--bg); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn-small { min-height: 44px; padding: 6px 18px; }
.btn-wide { width: 100%; }

/* 見出し */
.section { padding: 56px 0; }
.sec-title { font-size: 24px; margin-bottom: 28px; }
.sec-title .en { display: block; font-family: var(--font-body); font-size: 12px; letter-spacing: .2em; color: var(--accent); font-weight: 700; margin-bottom: 4px; }
.more { margin-top: 28px; text-align: center; }
.more a:not(.btn) { font-weight: 700; }
@media (min-width: 960px) { .section { padding: 88px 0; } .sec-title { font-size: 30px; } }

.page-head { padding: 36px 0 28px; background: var(--surface); border-bottom: 1px solid var(--line); }
.page-head .en { margin: 0; font-size: 12px; letter-spacing: .2em; color: var(--accent); font-weight: 700; }
.page-head h1 { font-size: 26px; margin: 4px 0 10px; }
.crumbs { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; font-size: 12px; color: var(--muted); }
.crumbs li + li::before { content: '›'; margin-right: 4px; }
@media (min-width: 960px) { .page-head { padding: 56px 0 40px; } .page-head h1 { font-size: 34px; } }

/* 施工実績のカード */
.works-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 12px; }
@media (min-width: 720px) { .works-grid { grid-template-columns: repeat(3, 1fr); gap: 28px 24px; } }
.work-card a { display: block; text-decoration: none; height: 100%; }
.work-card figure { margin: 0; aspect-ratio: 4 / 3; overflow: hidden; background: var(--line); border-radius: var(--radius); }
.work-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.work-card a:hover img { transform: scale(1.04); }
.wc-body { padding: 10px 2px 0; }
.wc-meta { margin: 0; font-size: 11px; color: var(--accent); font-weight: 700; display: flex; justify-content: space-between; gap: 8px; }
.wc-meta span { color: var(--muted); font-weight: 400; }
.work-card h3 { font-size: 14px; margin: 2px 0 0; line-height: 1.55; font-family: var(--font-body); }
@media (min-width: 720px) { .work-card h3 { font-size: 15px; } }
.noimg { display: block; width: 100%; height: 100%; background: repeating-linear-gradient(45deg, var(--line) 0 8px, transparent 8px 16px); }

/* 絞り込み */
.filters { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; padding: 16px; margin-bottom: 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.filters label span { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 2px; }
.filters select { width: 100%; min-height: 44px; padding: 8px 10px; font: inherit; font-size: 15px; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); }
.f-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; }
.f-clear { font-size: 14px; }
.js .filters[data-autosubmit] .btn { display: none; }
@media (min-width: 720px) { .filters { grid-template-columns: repeat(4, 1fr) auto; align-items: end; } .f-actions { grid-column: auto; } }
.result-count { font-size: 14px; color: var(--muted); }
.result-count b { font-size: 20px; color: var(--ink); margin-right: 2px; }
.empty { padding: 32px 16px; text-align: center; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); }
.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 36px; }
.pager a, .pager span { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0 12px;
  border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; background: var(--surface); }
.pager span[aria-current] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* 施工実績の詳しいページ */
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; padding: 0; }
.chips li { font-size: 12px; font-weight: 700; padding: 3px 10px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); }
.gallery { margin: 0 calc(var(--gutter) * -1) 28px; }
.g-main { margin: 0; position: relative; background: #111; }
.g-main img { width: 100%; max-height: 72vh; object-fit: contain; margin: 0 auto; } /* 幅の上限は写真ごとの style（元の幅）＝引き伸ばさない */
.g-main figcaption { position: absolute; right: 8px; bottom: 8px; font-size: 12px; color: #fff; background: rgba(0,0,0,.55); padding: 2px 8px; border-radius: 99px; }
.g-thumbs { list-style: none; display: flex; gap: 6px; overflow-x: auto; padding: 8px var(--gutter); margin: 0; scroll-snap-type: x mandatory; }
.g-thumbs li { flex: 0 0 auto; scroll-snap-align: start; }
.g-thumbs button { display: block; width: 84px; aspect-ratio: 1; padding: 0; border: 2px solid transparent; border-radius: calc(var(--radius) / 2); overflow: hidden; background: var(--line); cursor: pointer; }
.g-thumbs button[aria-current] { border-color: var(--accent); }
.g-thumbs img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 720px) { .gallery { margin: 0 0 36px; } .g-main { border-radius: var(--radius); overflow: hidden; } .g-thumbs { padding: 10px 0; flex-wrap: wrap; } .g-thumbs button { width: 96px; } }
.hitokoto { margin: 0 0 28px; padding: 20px 22px; background: var(--surface); border-left: 4px solid var(--accent); border-radius: var(--radius); }
.hitokoto h2 { font-size: 15px; color: var(--accent); margin-bottom: 6px; }
.hitokoto p { margin: 0; }
.hitokoto.is-empty { border: 2px dashed var(--line); border-left: 4px dashed var(--accent); color: var(--muted); font-size: 14px; }
.facts { margin: 0 0 40px; border-top: 1px solid var(--line); }
.facts div, .company-table div { display: grid; grid-template-columns: 7em 1fr; gap: 12px; padding: 12px 2px; border-bottom: 1px solid var(--line); }
.facts dt, .company-table dt { font-weight: 700; color: var(--muted); font-size: 14px; }
.facts dd, .company-table dd { margin: 0; }
.related h2 { font-size: 20px; }
.back { margin-top: 32px; }

/* 固定ページ */
.wide-photo { margin: 0 0 32px; border-radius: var(--radius); overflow: hidden; }
.lead-copy { font-size: 26px; margin: 0 0 28px; line-height: 1.6; }
.lead-copy span { display: block; }
@media (min-width: 960px) { .lead-copy { font-size: 34px; } }
.signature { text-align: right; font-size: 20px; font-family: var(--font-head); font-weight: 700; margin-top: 32px; }
.signature span { font-size: 14px; margin-right: 1em; font-weight: 500; }
.flow { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.flow li { position: relative; padding: 18px 18px 14px 64px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.flow-no { position: absolute; left: 16px; top: 16px; font-size: 22px; font-weight: 700; color: var(--accent); line-height: 1; font-family: var(--font-head); }
.flow h3 { font-size: 17px; margin-bottom: 4px; }
.flow p { margin: 0; font-size: 14px; color: var(--muted); }
@media (min-width: 720px) { .flow { grid-template-columns: repeat(3, 1fr); } }
.company-table { margin: 0; border-top: 1px solid var(--line); }
@media (min-width: 720px) { .company-table div { grid-template-columns: 10em 1fr; padding: 18px 8px; } }
.map-link { margin-top: 20px; }

/* お問い合わせ */
.contact-lead { font-size: 15px; }
.contact-tel { display: block; font-size: 24px; font-weight: 700; text-decoration: none; margin-top: 4px; }
.form { display: grid; gap: 18px; margin-top: 24px; }
.form fieldset { border: 0; margin: 0; padding: 0; }
.field-label, .form legend { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; margin-bottom: 6px; padding: 0; }
.field-label em, .field-label i { font-style: normal; font-size: 11px; padding: 1px 6px; border-radius: 3px; }
.field-label em { background: var(--accent); color: var(--accent-ink); }
.field-label i { background: var(--line); color: var(--muted); }
.form input[type=text], .form input[type=tel], .form input[type=email], .form textarea {
  width: 100%; min-height: 48px; padding: 10px 12px; font: inherit; font-size: 16px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.radio { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-right: 18px; }
.radio input, .agree input { width: 20px; height: 20px; accent-color: var(--accent); }
.topic .radio { display: flex; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.privacy { padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); font-size: 13px; }
.privacy summary { cursor: pointer; font-weight: 700; min-height: 32px; }
.privacy h3 { font-size: 13px; margin: 12px 0 4px; }
.agree { display: flex; align-items: center; gap: 8px; font-weight: 700; min-height: 44px; }
.form-note { font-size: 13px; color: var(--muted); margin: 0; }
.form-errors { padding: 14px 16px; background: #fdecec; color: #8a1010; border-radius: var(--radius); margin-top: 16px; }
.form-errors p { font-weight: 700; margin: 0 0 4px; }
.form-errors ul { margin: 0; padding-left: 1.2em; }
.done { text-align: center; }
.big-tel a { font-size: 32px; font-weight: 700; text-decoration: none; }

/* 不動産の情報 */
.re-lead { font-size: 15px; }
.re-dealer, .re-notes { padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin: 24px 0 40px; }
.re-dealer h2, .re-notes h2 { font-size: 16px; margin-bottom: 8px; }
.re-dealer dl { margin: 0; }
.re-dealer div, .property dl div { display: grid; grid-template-columns: 6.5em 1fr; gap: 10px; padding: 6px 0; border-bottom: 1px dotted var(--line); font-size: 14px; }
.re-dealer dt, .property dt { color: var(--muted); font-weight: 700; }
.re-dealer dd, .property dd { margin: 0; }
.re-notes ul { margin: 0; padding-left: 1.2em; font-size: 13px; color: var(--muted); }
.property { position: relative; padding: 18px 20px; margin: 0 0 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.property.is-sample { border: 2px dashed #c9a400; background: repeating-linear-gradient(-45deg, var(--surface) 0 14px, #fffbe6 14px 28px); }
.sample-stamp { display: inline-block; margin: 0 0 8px; padding: 2px 10px; background: #fff3b0; color: #6b5300; font-size: 12px; font-weight: 700; border-radius: 3px; }
.property header { margin-bottom: 8px; }
.property h3 { font-size: 18px; margin: 6px 0 0; }
.trade, .ptype { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 3px; margin-right: 6px; }
.trade { background: var(--ink); color: var(--bg); }
.trade.wanted { background: var(--accent); color: var(--accent-ink); }
.ptype { border: 1px solid var(--line); }
.property dl { margin: 0; }
.dates { margin: 10px 0 0; font-size: 12px; color: var(--muted); }

/* お問い合わせの帯 */
.contact-band { padding: 48px 0; background: var(--band); color: var(--band-ink); text-align: center; }
.cb-lead { font-family: var(--font-head); font-size: 22px; font-weight: 700; margin-bottom: 20px; }
.cb-actions { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.cb-actions .btn-primary:hover { background: var(--band-ink); color: var(--band); border-color: var(--band-ink); }
.cb-tel { text-decoration: none; font-size: 28px; font-weight: 700; letter-spacing: .04em; line-height: 1.3; }
.cb-tel small { display: block; font-size: 12px; font-weight: 500; opacity: .8; letter-spacing: .1em; }
@media (min-width: 720px) { .cb-actions { flex-direction: row; justify-content: center; gap: 40px; } .cb-lead { font-size: 26px; } }

/* フッタ */
.site-footer { padding: 40px 0 0; background: var(--surface); border-top: 1px solid var(--line); font-size: 14px; }
.footer-in { display: grid; gap: 28px; }
.footer-logo { width: 160px; height: auto; margin-bottom: 12px; }
.footer-name { font-weight: 700; margin-bottom: 4px; }
.footer-co p { margin: 0 0 6px; }
.footer-co a { text-decoration: none; }
.footer-lic { font-size: 12px; color: var(--muted); margin-top: 10px !important; }
.footer-nav { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
.footer-nav a { display: block; padding: 8px 0; text-decoration: none; }
.copy { margin: 32px 0 0; padding: 16px var(--gutter); font-size: 11px; text-align: center; color: var(--muted); border-top: 1px solid var(--line); }
@media (min-width: 960px) { .footer-in { grid-template-columns: 1fr auto; } .footer-nav { grid-template-columns: repeat(4, auto); gap: 0 32px; align-content: start; } }

/* スマホ下の固定ボタン（電話する・問い合わせる） */
.cta-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: grid; grid-template-columns: 1fr 1fr;
  height: calc(var(--cta-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: var(--surface); box-shadow: 0 -4px 16px rgba(0,0,0,.12); }
.cta-bar a { display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; font-size: 16px; text-decoration: none; }
.cta-bar svg { width: 20px; height: 20px; fill: currentColor; }
.cta-tel { background: var(--surface); color: var(--ink); border-top: 1px solid var(--line); }
.cta-mail { background: var(--accent); color: var(--accent-ink); }
@media (min-width: 960px) { body { padding-bottom: 0; } .cta-bar { display: none; } }

/* 見本の一覧 */
.chooser h1 { font-size: 26px; }
.chooser-list { list-style: none; padding: 0; margin: 24px 0; display: grid; gap: 12px; }
.chooser-list a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; background: var(--surface); }
.chooser-list span { color: var(--muted); font-size: 13px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }

/* グリッドの子が中身（大きな写真の width 属性・折り返さない文字）で横に広がらないように。
   これが無いとスマホで横にはみ出す（2026-10-09 実測）。 */
.a-hero-in > *, .a-message-in > *, .a-split-in > *, .c-hero-in > *, .c-message-in > *, .footer-in > *, .b-links-in > *,
.works-grid > *, .filters > *, .flow > *, .a-service-list > * { min-width: 0; }
