/* みなと丘消防設備 デモ：両デザイン共通の骨組み。色・書体・角・余白は theme-*.css の変数で決める。 */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: 16px; line-height: 1.65;
  overflow-wrap: anywhere; line-break: strict;
}
[hidden] { display: none !important; }
img { max-width: 100%; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

h1, h2, h3 { margin: 0; color: var(--heading); font-family: var(--font-head); font-weight: var(--head-weight); text-wrap: balance; word-break: auto-phrase; }
h1 { font-size: var(--h1); line-height: 1.35; }
h1 span { display: inline-block; }
h2 { font-size: var(--h2); line-height: 1.4; scroll-margin-top: 84px; }
h3 { font-size: var(--h3); line-height: 1.45; }
p { margin: 0 0 12px; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
dd, li { text-wrap: pretty; }

a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--accent-dark); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
h1:focus, h2:focus { outline: none; }

.skip { position: absolute; left: -9999px; top: 0; padding: 8px 12px; background: var(--bg); z-index: 20; }
.skip:focus { left: 8px; top: 8px; }
.small { font-size: 14px; color: var(--text-sub); line-height: 1.6; }
.note { font-size: 14px; color: var(--text-sub); }
.eyebrow { margin: 0 0 4px; font-size: 13px; font-weight: 700; color: var(--text-sub); font-family: var(--font-body); }
.lead { margin-top: 12px; }
.more { margin-top: 12px; }

/* デモ表示と版の切り替え */
.demo-bar { background: var(--bar-bg); color: var(--bar-text); font-size: 12px; line-height: 1.5; }
.demo-bar .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; padding-top: 5px; padding-bottom: 5px; }
.demo-bar p { margin: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* デザインの切り替え（右上） */
.style-switch { display: flex; align-items: center; gap: 0; margin-left: auto; }
.sw-label { margin-right: 8px; }
.sw-item { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; min-height: 26px; padding: 0 8px; font-weight: 700; line-height: 1; color: var(--bar-text); text-decoration: none; border: 1px solid var(--bar-text); }
.sw-item + .sw-item { border-left: 0; }
.sw-label + .sw-item { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.sw-item:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.sw-item.is-on { background: var(--bar-text); color: var(--bar-bg); }
a.sw-item:hover { color: var(--bar-text); text-decoration: underline; }
.demo-label { display: inline-block; margin: 0 0 12px; padding: 3px 10px; font-size: 13px; font-weight: 700; color: var(--heading); background: var(--bg-sub); border: 1px solid var(--field-border); border-radius: var(--radius-sm); }

/* ヘッダー */
.site-header { position: sticky; top: 0; z-index: 10; padding: 10px 0; background: var(--bg); border-bottom: 1px solid var(--rule); }
.header-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; }
.brand { flex: 1 1 0; min-width: 0; white-space: nowrap; font-family: var(--font-head); font-size: 17px; font-weight: 700; color: var(--heading); text-decoration: none; }
.brand:hover { color: var(--heading); }
.menu-btn, .site-header .header-cta { flex: 0 0 auto; display: inline-block; width: auto; min-height: 40px; padding: 8px 10px; font: inherit; font-size: 14px; font-weight: 700; line-height: 1.5; }
.menu-btn { display: none; background: transparent; color: var(--heading); border: 1px solid transparent; border-radius: var(--radius-sm); cursor: pointer; -webkit-appearance: none; appearance: none; }
.menu-btn[aria-expanded="true"] { border-color: var(--field-border); background: var(--bg-sub); }
.menu-icon { display: inline-block; position: relative; top: -1px; width: 16px; height: 2px; margin-right: 7px; vertical-align: middle; background: currentColor; box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor; }
.site-nav { order: 4; flex: 0 0 100%; }
.site-nav ul { margin: 10px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.site-nav li + li { border-top: 1px solid var(--rule); }
.site-nav a { display: block; padding: 12px 4px; color: var(--heading); font-weight: 700; text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--accent); }
.site-nav a[aria-current] { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.js .menu-btn { display: inline-block; }
.js .site-nav:not(.is-open) { display: none; }

/* パンくず */
.crumbs { padding: 10px 0 0; font-size: 13px; color: var(--text-sub); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 2px 0; margin: 0; padding: 0; list-style: none; }
.crumbs li + li::before { content: "›"; margin: 0 8px; }
.crumbs a { color: var(--text-sub); }

/* ボタン */
.btn { display: block; width: 100%; min-height: 52px; padding: 13px 18px; font: inherit; font-weight: 700; line-height: 1.5; text-align: center; text-decoration: none; border: 1px solid var(--accent); border-radius: var(--radius-btn); cursor: pointer; -webkit-appearance: none; appearance: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn-secondary { background: var(--bg); color: var(--accent); }
.btn-secondary:hover { background: var(--bg-sub); }
.btn-row { display: grid; gap: 12px; margin-top: 20px; }

/* 冒頭 */
.hero { padding: 24px 0 28px; }
.page-head { padding: 20px 0 28px; }
.photo { margin: 24px 0 0; }
.photo img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: 80% center; background: var(--bg-sub); border-radius: var(--radius-lg); }
.photo figcaption { margin-top: 6px; font-size: 12px; color: var(--text-sub); line-height: 1.5; }

/* セクション */
.sec { padding: var(--sec-pad) 0; border-top: 1px solid var(--rule); }
.sec-alt { background: var(--bg-sub); }
.sec-head { margin-bottom: 14px; }
.closing { padding: 32px 0 44px; }

/* 業務のカード（トップ） */
.cards { display: grid; gap: var(--card-gap); }
.card h3 { margin-bottom: 8px; }

/* 対応エリアなどの一覧 */
.facts, .table, .case-list { margin: 0 0 16px; }
.facts > div, .table > div, .case-list > div { padding: 12px 0; border-bottom: 1px solid var(--rule); }
.facts > div:first-child, .table > div:first-child, .case-list > div:first-child { border-top: 1px solid var(--rule-strong); }
.facts dt, .table dt, .case-list dt { margin-bottom: 2px; font-size: 14px; font-weight: 700; color: var(--text-sub); }
.facts dd, .table dd, .case-list dd { margin: 0; }
.table dd { white-space: pre-wrap; }
.table dd.empty { color: var(--text-sub); }

/* 図解：点検の流れ（スマホは上から下、PCは左から右） */
.flow { display: grid; gap: 30px; margin: 0; padding: 0; list-style: none; }
.flow > li { position: relative; padding: 14px 16px 16px; background: var(--bg); border: 1px solid var(--rule-strong); border-radius: var(--radius); }
.flow > li + li::before { content: "↓"; position: absolute; left: 50%; top: -29px; transform: translateX(-50%); font-size: 18px; line-height: 1.5; color: var(--text-sub); }
.flow-num { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; margin-right: 8px; background: var(--heading); color: var(--bg); font-weight: 700; font-size: 15px; line-height: 1; border-radius: var(--radius-num); vertical-align: 1px; }
.flow-label { font-family: var(--font-head); font-size: 17px; color: var(--heading); }
.flow p { margin: 8px 0 0; font-size: 15px; }

/* 図解：報告書と提出控え（分岐は文言と破線で区別する） */
.branch { margin: 20px 0 0; padding: 16px; background: var(--bg); border: 1px solid var(--rule); border-radius: var(--radius); }
.branch figcaption { margin-bottom: 12px; font-size: 13px; font-weight: 700; color: var(--text-sub); }
.node { position: relative; margin: 0; padding: 11px 14px; font-weight: 700; color: var(--heading); text-align: center; background: var(--bg-sub); border: 1px solid var(--rule-strong); border-radius: var(--radius-sm); }
.branch-cols { display: grid; gap: 0; }
.branch-col { position: relative; padding-top: 30px; }
.branch-col::before, .branch-col .node + .node::before { content: "↓"; position: absolute; left: 50%; transform: translateX(-50%); font-size: 18px; line-height: 1.5; font-weight: 400; color: var(--text-sub); }
.branch-col::before { top: 2px; }
.branch-col .node + .node { margin-top: 30px; }
.branch-col .node + .node::before { top: -29px; }
.branch-cond { margin: 0 0 6px; font-size: 13px; font-weight: 700; color: var(--text-sub); text-align: center; }
.branch-col.is-opt { margin-top: 30px; padding: 12px; border: 1px dashed var(--field-border); border-radius: var(--radius); }
.branch-col.is-opt::before { top: -29px; }
.branch-col.is-opt .branch-cond { color: var(--heading); }

/* 見積書サンプル */
.estimate { margin-top: 24px; padding: 18px 16px; background: var(--bg); border: 1px solid var(--rule-strong); border-radius: var(--radius); }
.estimate h3 { margin-bottom: 8px; }
.estimate > p { font-size: 15px; }
.est-table { width: 100%; margin-top: 12px; border-collapse: collapse; font-size: 15px; }
.est-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.est-table tr { display: block; padding: 12px 0; border-top: 1px solid var(--rule); }
.est-table tbody th { display: block; padding: 0 0 2px; text-align: left; color: var(--heading); font-weight: 700; }
.est-table td { display: block; padding: 0; }

/* FAQ */
.faq { border-top: 1px solid var(--rule-strong); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { position: relative; padding: 16px 40px 16px 0; font-weight: 700; color: var(--heading); list-style: none; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 14px; height: 2px; margin-top: -1px; background: var(--heading); }
.faq summary::before { content: ""; position: absolute; right: 12px; top: 50%; width: 2px; height: 14px; margin-top: -7px; background: var(--heading); }
.faq details[open] summary::before { display: none; }
.faq details > p { padding: 0 0 16px; }

/* 対応事例 */
.case-result { margin-top: 16px; padding: 14px 16px; background: var(--bg-sub); border-radius: var(--radius); border-left: var(--result-bar) solid var(--heading); }
.case-result h3 { margin-bottom: 4px; font-size: 16px; font-family: var(--font-body); }

/* フォーム */
.notice { margin: 0 0 24px; padding: 14px; background: var(--bg); border: 1px solid var(--rule-strong); border-radius: var(--radius); }
.notice p { margin-bottom: 8px; }
.notice .btn { margin-top: 12px; }
.field { margin-bottom: 20px; }
.field label { display: block; margin-bottom: 4px; font-weight: 700; color: var(--heading); }
.req, .opt { display: inline-block; margin-left: 6px; font-size: 12px; line-height: 1.5; vertical-align: 2px; }
.req { padding: 1px 7px; font-weight: 700; background: var(--heading); color: var(--bg); border-radius: var(--radius-sm); }
.opt { color: var(--text-sub); font-weight: 400; }
.hint { margin: 0 0 6px; font-size: 14px; color: var(--text-sub); line-height: 1.55; }
input[type="text"], input[type="email"], select, textarea { display: block; width: 100%; min-height: 48px; padding: 10px 12px; font: inherit; font-size: 16px; color: var(--text); background: #fff; border: 1px solid var(--field-border); border-radius: var(--radius-sm); -webkit-appearance: none; appearance: none; }
textarea { min-height: 112px; resize: vertical; line-height: 1.6; }
select { padding-right: 40px; background-image: linear-gradient(45deg, transparent 50%, var(--heading) 50%), linear-gradient(135deg, var(--heading) 50%, transparent 50%); background-position: calc(100% - 20px) 21px, calc(100% - 14px) 21px; background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; }
::placeholder { color: #6f6f6f; opacity: 1; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 0; }
.field.has-error input, .field.has-error select { border: 2px solid var(--error); background-color: var(--error-bg); }
.error { position: relative; margin: 6px 0 0; padding-left: 26px; color: var(--error); font-weight: 700; font-size: 15px; line-height: 1.5; }
.error::before { content: "!"; position: absolute; left: 0; top: 2px; width: 19px; height: 19px; display: flex; align-items: center; justify-content: center; background: var(--error); color: #fff; font-size: 13px; line-height: 1; border-radius: var(--radius-num); }
form .btn + .small { margin-top: 12px; }

/* 入力確認・模擬受付 */
.sec-single { border-top: 0; }
.sec-single h1 { margin-bottom: 12px; }
.sec-single .table { margin-top: 20px; }
.mail { margin: 20px 0 0; padding: 16px 14px; background: var(--bg); border: 1px solid var(--field-border); border-radius: var(--radius); }
.mail .table { margin: 0; }
.mail .mail-head { margin-bottom: 16px; background: var(--bg-sub); border-radius: var(--radius-sm); }
.mail .mail-head > div { padding: 10px 12px; border-top: 0; }
.mail .mail-head > div:last-child { border-bottom: 0; }

/* フッター */
.site-footer { padding: 24px 0 32px; background: var(--footer-bg); color: var(--footer-text); font-size: 13px; line-height: 1.7; border-top: 1px solid var(--rule); }
.site-footer p { margin: 0; }
.footer-brand { font-family: var(--font-head); font-size: 16px; font-weight: 700; }
.footer-demo { margin-top: 10px !important; opacity: 0.85; }

@media (max-width: 899px) {
  .brand { font-size: 16px; }
  .menu-btn { padding: 8px 6px; font-size: 13px; }
  .site-header .header-cta { padding: 8px 9px; font-size: 13px; }
}
@media (max-width: 359px) {
  .brand { font-size: 15px; }
  .menu-icon { display: none; }
  .menu-btn { font-size: 12px; }
  .site-header .header-cta { padding: 8px 7px; font-size: 12px; }
}

@media (min-width: 640px) {
  .btn-row { display: flex; flex-wrap: wrap; }
  .btn-row .btn { width: auto; min-width: 240px; }
  .facts > div, .table > div, .case-list > div { display: grid; grid-template-columns: 10em 1fr; gap: 16px; }
  .facts dt, .table dt, .case-list dt { margin: 0; padding-top: 2px; }
  .est-table thead { position: static; width: auto; height: auto; clip-path: none; }
  .est-table tr { display: table-row; border: 0; }
  .est-table th, .est-table td, .est-table tbody th { display: table-cell; padding: 12px 12px 12px 0; text-align: left; vertical-align: top; border-top: 1px solid var(--rule); }
  .est-table thead th { font-size: 13px; color: var(--text-sub); border-top: 0; padding-top: 0; }
  .est-table tbody th { width: 15em; }
  .estimate { padding: 24px; }
  form .btn { max-width: 360px; }
  .notice .btn { max-width: 360px; }
}

@media (min-width: 900px) {
  :root { --gutter: 32px; }
  .site-header { padding: 12px 0; }
  .header-row { flex-wrap: nowrap; gap: 0 32px; }
  .brand { flex: 0 0 auto; font-size: 19px; }
  .js .menu-btn, .menu-btn { display: none; }
  .site-nav, .js .site-nav:not(.is-open) { display: block; order: 0; flex: 0 0 auto; }
  .site-nav ul { display: flex; gap: 28px; margin: 0; border: 0; }
  .site-nav li + li { border: 0; }
  .site-nav a { padding: 8px 0; font-size: 15px; white-space: nowrap; }
  .site-header .header-cta { margin-left: auto; padding: 8px 20px; font-size: 15px; }
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .flow { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 36px; }
  .flow > li + li::before { content: "→"; left: -27px; top: 50%; transform: translateY(-50%); }
  .branch { padding: 24px; }
  .branch-cols { grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
  .photo { margin-top: 28px; max-width: 720px; }
}
