/* ==========================================================
   ヒカク。 — アプリ型UI
   方針: 情報提供・支援のトーン。営業色なし。スマホ最優先の
   アプリカラム + 下タブ。文字は少なく、詳細はタップで開く。
   ========================================================== */

:root {
  --primary: #2489e5;
  --primary-dark: #1b6fc2;
  --primary-pale: #e8f2fc;
  --primary-pale2: #f4f9fe;
  --accent: #e88c3d;
  --accent-dark: #d1772b;
  --accent-pale: #fff4eb;
  --danger: #d9463b;
  --danger-pale: #fdecec;
  --warn: #b97c0a;
  --warn-pale: #fdf6e3;
  --ok: #3d8a4f;
  --ok-pale: #edf7eb;
  --violet: #7a5cd0;
  --violet-pale: #f2eefb;
  --text: #333333;
  --muted: #6c6c6c;
  --faint: #9aa4ad;
  --bg: #eef3f8;
  --app-bg: #f8fbfe;
  --card: #ffffff;
  --line: #e3e8ee;
  --radius: 16px;
  --radius-s: 12px;
  --shadow: 0 2px 10px rgba(30, 80, 140, 0.07);
  --tabbar-h: 62px;
  --header-h: 54px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { vertical-align: middle; }
a { color: var(--primary-dark); }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

/* ---------- アプリ枠 ---------- */
.app {
  max-width: 520px;
  margin: 0 auto;
  min-height: 100dvh;
  background: var(--app-bg);
  box-shadow: 0 0 24px rgba(30, 80, 140, 0.08);
  position: relative;
}

/* ---------- ヘッダー ---------- */
.app-header {
  position: sticky; top: 0; z-index: 60;
  height: var(--header-h);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px;
  padding: 0 14px;
}
.app-header .back-btn {
  display: none;
  width: 36px; height: 36px; border: none; background: none;
  border-radius: 50%; align-items: center; justify-content: center;
}
.app-header .back-btn:active { background: var(--primary-pale); }
.app-header.has-back .back-btn { display: inline-flex; }
.app-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.app-title .t-main { font-size: 15.5px; font-weight: 900; letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-title .t-screen { font-size: 15.5px; font-weight: 800; color: var(--text); }

/* ---------- お知らせバー ---------- */
.notice-bar {
  background: var(--danger-pale);
  color: #8c2f28;
  font-size: 12.5px; font-weight: 600;
  padding: 8px 14px;
  display: flex; gap: 8px; align-items: flex-start;
  border-bottom: 1px solid #f5d5d2;
}
.notice-bar svg { flex: 0 0 auto; margin-top: 3px; }
.notice-bar a { color: #8c2f28; font-weight: 800; }

/* ---------- 画面 ---------- */
.screen { display: none; padding: 16px 14px calc(var(--tabbar-h) + 28px); }
.screen.active { display: block; }
.screen-lead { font-size: 13.5px; color: var(--muted); margin-bottom: 14px; }

h2.sc-title { font-size: 20px; font-weight: 900; line-height: 1.45; margin-bottom: 4px; }
.sc-sub { font-size: 13px; color: var(--muted); margin-bottom: 16px; }

/* ---------- 下タブ ---------- */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 520px; height: var(--tabbar-h);
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(5, 1fr);
  z-index: 70;
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  text-decoration: none; color: var(--faint);
  font-size: 10px; font-weight: 700;
}
.tabbar a svg { stroke: var(--faint); }
.tabbar a.active { color: var(--primary-dark); }
.tabbar a.active svg { stroke: var(--primary-dark); }

/* ---------- カード・共通部品 ---------- */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.pad { padding: 16px; }

.bigcard {
  display: flex; align-items: center; gap: 14px;
  width: 100%; text-align: left; text-decoration: none; color: var(--text);
  background: var(--card); border: 1.5px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px 16px; margin-bottom: 12px;
  transition: border-color .15s, transform .06s;
}
.bigcard:active { transform: scale(.99); }
.bigcard:hover { border-color: var(--primary); }
.bigcard .bc-icon {
  flex: 0 0 auto; width: 54px; height: 54px; border-radius: 14px;
  background: var(--primary-pale);
  display: flex; align-items: center; justify-content: center;
}
.bigcard.camera .bc-icon { background: var(--accent-pale); }
.bigcard .bc-title { display: block; font-size: 16.5px; font-weight: 900; line-height: 1.4; }
.bigcard .bc-sub { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.55; margin-top: 2px; }
.bigcard .bc-arrow { flex: 0 0 auto; margin-left: auto; color: var(--faint); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: 999px;
  font-size: 15.5px; font-weight: 800; text-decoration: none;
  padding: 13px 22px; line-height: 1.3; text-align: center;
  transition: background .15s, transform .06s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); }
.btn-ghost { background: #fff; color: var(--primary-dark); border: 1.5px solid var(--primary); }
.btn-ghost:hover { background: var(--primary-pale); }
.btn-sm { font-size: 13.5px; padding: 9px 16px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 1.5px solid var(--line); background: #fff; color: var(--text);
  border-radius: 999px; font-size: 13px; font-weight: 700;
  padding: 7px 14px;
}
.chip.on { border-color: var(--primary); background: var(--primary-pale); color: var(--primary-dark); }

.tag {
  display: inline-block; font-size: 11px; font-weight: 700;
  background: var(--primary-pale2); color: var(--primary-dark);
  border: 1px solid var(--primary-pale); border-radius: 6px; padding: 1px 7px;
}

select.field, input.field, textarea.field {
  width: 100%; font-size: 15.5px; padding: 12px 13px;
  border: 1.5px solid var(--line); border-radius: var(--radius-s);
  background: #fff;
}
select.field:focus, input.field:focus, textarea.field:focus { outline: none; border-color: var(--primary); }
label.f-label { display: block; font-size: 12.5px; font-weight: 700; color: var(--muted); margin: 12px 0 5px; }

.hidden { display: none !important; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.muted { color: var(--muted); font-size: 12.5px; }
.center { text-align: center; }

/* ---------- 選択リスト（カテゴリ・工事） ---------- */
.select-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.select-item {
  border: 1.5px solid var(--line); border-radius: var(--radius-s);
  background: #fff; padding: 14px 10px; text-align: center;
  transition: border-color .15s, background .15s;
}
.select-item:active { background: var(--primary-pale2); }
.select-item .si-icon { margin-bottom: 4px; }
.select-item .si-name { font-size: 14px; font-weight: 800; display: block; line-height: 1.35; }
.select-item .si-desc { font-size: 11px; color: var(--muted); display: block; margin-top: 2px; line-height: 1.4; }

.rowlist { display: grid; gap: 9px; }
.rowitem {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  border: 1.5px solid var(--line); border-radius: var(--radius-s);
  background: #fff; padding: 13px 14px; text-align: left; width: 100%;
}
.rowitem:active { background: var(--primary-pale2); }
.rowitem .ri-name { font-size: 14.5px; font-weight: 800; }
.rowitem .ri-sub { font-size: 11.5px; color: var(--muted); display: block; }
.rowitem .ri-arrow { flex: 0 0 auto; color: var(--faint); }

/* ---------- 結果画面 ---------- */
.result-head { margin-bottom: 12px; }
.result-head .rh-label { font-size: 12.5px; color: var(--muted); }
.result-head .rh-title { font-size: 18px; font-weight: 900; line-height: 1.45; }

.price-box { text-align: center; padding: 18px 14px 14px; }
.price-box .pb-range { font-size: 31px; font-weight: 900; color: var(--primary-dark); line-height: 1.2; }
.price-box .pb-range small { font-size: 15px; font-weight: 800; }
.price-box .pb-cond { font-size: 12px; color: var(--muted); margin-top: 4px; }
.price-sub-rows { border-top: 1px dashed var(--line); margin-top: 12px; padding-top: 10px; display: grid; gap: 4px; }
.price-sub-rows .psr { display: flex; justify-content: space-between; font-size: 13px; }
.price-sub-rows .psr b { font-weight: 800; }
.psr .psr-label { color: var(--muted); }

.next-steps { display: grid; gap: 8px; }
.next-step {
  display: flex; gap: 10px; align-items: flex-start;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-s);
  padding: 11px 13px;
}
/* 番号バッジは使わない（手順のSTEP演出を避ける）。チェックマークで示す */
.next-step::before {
  content: "";
  flex: 0 0 auto; width: 20px; height: 20px; margin-top: 3px;
  border-radius: 50%; background-color: var(--primary-pale);
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%231b6fc2" stroke-width="3.2" stroke-linecap="round" stroke-linejoin="round"><path d="M20 6 9 17l-5-5"/></svg>');
  background-size: 12px 12px; background-position: center; background-repeat: no-repeat;
}
.next-step .ns-body { font-size: 13.5px; line-height: 1.6; }
.next-step .ns-body b { font-weight: 800; }

.section-label2 {
  font-size: 13.5px; font-weight: 900; color: var(--text);
  display: flex; align-items: center; gap: 7px;
  margin: 22px 0 10px;
}
.section-label2 svg { color: var(--primary-dark); }

/* 価格判定 */
.judge-wrap { padding: 16px; }
.judge-title { font-size: 14.5px; font-weight: 900; margin-bottom: 2px; }
.judge-sub { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.judge-row { display: flex; gap: 8px; align-items: center; }
.judge-input-wrap { position: relative; flex: 1; }
.judge-input-wrap input {
  width: 100%; font-size: 19px; font-weight: 800;
  padding: 11px 52px 11px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-s);
  text-align: right;
}
.judge-input-wrap input:focus { outline: none; border-color: var(--primary); }
.judge-input-wrap .yen { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); font-weight: 800; font-size: 13px; color: var(--muted); }

.verdict { margin-top: 12px; border-radius: var(--radius-s); padding: 13px 15px; display: none; }
.verdict.show { display: block; }
.verdict .v-title { font-size: 15.5px; font-weight: 900; margin-bottom: 4px; }
.verdict .v-body { font-size: 13px; line-height: 1.65; }
.verdict.v-ok { background: var(--ok-pale); border: 1.5px solid var(--ok); }
.verdict.v-ok .v-title { color: var(--ok); }
.verdict.v-warn { background: var(--warn-pale); border: 1.5px solid #d8ae4e; }
.verdict.v-warn .v-title { color: var(--warn); }
.verdict.v-over { background: var(--danger-pale); border: 1.5px solid var(--danger); }
.verdict.v-over .v-title { color: var(--danger); }
.verdict.v-low { background: var(--violet-pale); border: 1.5px solid var(--violet); }
.verdict.v-low .v-title { color: #5b3fae; }

/* ---------- 業者一覧 ---------- */
.filter-bar { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.gyosha-list { display: grid; gap: 10px; }
.gyosha-card { padding: 13px 14px; }
.gyosha-card .g-name { font-size: 15px; font-weight: 900; }
.gyosha-card .g-meta { font-size: 12px; color: var(--muted); margin: 2px 0 6px; }
.gyosha-card .g-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 9px; }
.gyosha-card .g-actions { display: flex; gap: 8px; align-items: center; }
.tel-btn {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--ok); color: #fff; text-decoration: none;
  font-size: 14px; font-weight: 900; border-radius: 999px; padding: 9px 18px;
}
.tel-btn.small { font-size: 12.5px; padding: 7px 14px; }
.gyosha-card .g-src { font-size: 10.5px; color: var(--faint); margin-top: 7px; }
.gyosha-card .g-src a { color: var(--faint); }
.gyosha-card .g-dist { font-size: 11px; font-weight: 800; color: var(--primary-dark); }

/* Leaflet CSSの適用前でもタイルが画面外にはみ出さないよう、コンテナ側でクリップを保証する */
#gyoshaMap { height: 300px; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; position: relative; max-width: 100%; }
#homeMap { height: 260px; border-radius: var(--radius); border: 1px solid var(--line); background: #e8ebe4; overflow: hidden; position: relative; max-width: 100%; }
.home-board-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* ---------- アップロード ---------- */
.dropzone {
  border: 2px dashed var(--primary); border-radius: var(--radius);
  background: var(--primary-pale2); padding: 26px 16px; text-align: center;
  cursor: pointer;
}
.dropzone:active { background: var(--primary-pale); }
.dropzone .dz-title { font-size: 15.5px; font-weight: 900; margin: 8px 0 2px; }
.dropzone .dz-sub { font-size: 12px; color: var(--muted); }
.dz-thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; justify-content: center; }
.dz-thumbs img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }

.spinner {
  width: 40px; height: 40px; margin: 0 auto 12px;
  border: 4px solid var(--primary-pale); border-top-color: var(--primary);
  border-radius: 50%; animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* AI結果 */
.finding {
  border: 1px solid var(--line); border-radius: var(--radius-s);
  padding: 13px 14px; margin-bottom: 10px; background: #fff;
}
.finding-head { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 4px; }
.finding-head .f-area { font-weight: 900; font-size: 14.5px; }
.sev { font-size: 10.5px; font-weight: 900; border-radius: 6px; padding: 2px 8px; color: #fff; }
.sev-1 { background: var(--ok); } .sev-2 { background: #d8ae4e; }
.sev-3 { background: var(--accent-dark); } .sev-4 { background: var(--danger); }
.finding .f-line { font-size: 13px; display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; }
.finding .f-line .fl-label { color: var(--muted); flex: 0 0 auto; }
.finding .f-line .fl-val { font-weight: 800; text-align: right; }
.finding .f-line .fl-val.price { color: var(--primary-dark); }
.finding .f-note { font-size: 12px; color: var(--muted); margin-top: 5px; }

.soft-alert {
  background: var(--warn-pale); border: 1px solid #ecd9a8;
  border-radius: var(--radius-s); padding: 11px 13px; font-size: 12.5px; line-height: 1.65;
}
.soft-alert b { color: var(--warn); }

/* ---------- アコーディオン ---------- */
.acc {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-s);
  margin-bottom: 9px; overflow: hidden;
  scroll-margin-top: calc(var(--header-h) + 12px); /* 固定ヘッダーに見出しが隠れないように */
}
.acc summary {
  list-style: none; display: flex; gap: 10px; align-items: center;
  padding: 13px 14px; font-weight: 800; font-size: 14px; cursor: pointer;
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary .acc-ic { flex: 0 0 auto; color: var(--primary-dark); display: flex; }
.acc summary .acc-chev { margin-left: auto; color: var(--faint); transition: transform .2s; flex: 0 0 auto; }
.acc[open] summary .acc-chev { transform: rotate(180deg); }
.acc .acc-body { padding: 2px 14px 14px; font-size: 13.5px; color: var(--text); border-top: 1px dashed var(--line); padding-top: 10px; }
.acc .acc-body ul, .acc .acc-body ol { margin-left: 18px; margin-top: 6px; }
.acc .acc-body li { margin-bottom: 4px; }

/* ---------- 保険シミュレーター ---------- */
.sim-result {
  display: none; margin-top: 14px; text-align: center;
  background: var(--primary-pale2); border: 1.5px solid var(--primary);
  border-radius: var(--radius); padding: 16px;
}
.sim-result.show { display: block; }
.sim-result .sr-amount { font-size: 30px; font-weight: 900; color: var(--primary-dark); line-height: 1.25; }
.sim-result .sr-amount small { font-size: 14px; }
.sim-result .sr-label { font-size: 12.5px; color: var(--muted); }
.sim-result .sr-note { font-size: 11.5px; color: var(--muted); margin-top: 8px; text-align: left; }
.seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.seg.two { grid-template-columns: 1fr 1fr; }
.seg button {
  border: 1.5px solid var(--line); background: #fff; border-radius: 10px;
  font-size: 12px; font-weight: 800; padding: 9px 4px; line-height: 1.3;
}
.seg button.on { border-color: var(--primary); background: var(--primary-pale); color: var(--primary-dark); }
.seg button small { display: block; font-weight: 500; font-size: 10px; color: var(--muted); }

/* ---------- 損害区分の色分け ---------- */
.r-zenson { --rc: #d9463b; }
.r-daihanson { --rc: #e07b2a; }
.r-shohanson { --rc: #c79310; }
.r-ichibuson { --rc: #3d8a4f; }
.rdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--rc); margin-right: 4px; vertical-align: 1px; }
.ratio-row {
  border: 1px solid var(--line); border-left: 5px solid var(--rc);
  border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; background: #fff;
}
.ratio-row .rr-head { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.ratio-row .rr-label { font-weight: 900; font-size: 14px; color: var(--rc); }
.ratio-row .rr-pct { font-size: 11.5px; font-weight: 900; color: #fff; background: var(--rc); border-radius: 6px; padding: 1px 8px; }
.ratio-row .rr-body { font-size: 12px; color: var(--muted); line-height: 1.6; }

/* ---------- 勧誘実例の色分け ---------- */
.scam-ex {
  border: 1px solid #f3c9c5; border-left: 5px solid var(--danger);
  background: #fff; border-radius: 10px; padding: 12px 14px; margin-bottom: 10px;
}
.se-quote { font-size: 14px; font-weight: 900; color: var(--danger); margin-bottom: 4px; line-height: 1.55; }
.se-body { font-size: 12.5px; color: var(--text); }
.scam-do {
  display: flex; gap: 7px; align-items: flex-start;
  background: var(--ok-pale); border: 1px solid #bfe0c6; border-radius: 8px;
  padding: 9px 12px; font-size: 12.5px; font-weight: 700; color: #1d6e3e; margin-top: 8px;
}
.scam-do svg { flex: 0 0 auto; margin-top: 2px; }

/* ---------- 専門家アドバイス ---------- */
.advice-card {
  border: 1.5px solid var(--primary); background: var(--primary-pale2);
  border-radius: var(--radius-s); padding: 13px 15px; margin-bottom: 12px;
}
.ac-head { display: flex; gap: 7px; align-items: center; font-size: 13px; font-weight: 900; color: var(--primary-dark); margin-bottom: 5px; }
.ac-body { font-size: 13.5px; line-height: 1.8; }

/* ---------- 地図ラベル・ポップアップ ---------- */
.gyosha-label {
  background: rgba(255,255,255,.92); border: 1px solid var(--line); border-radius: 6px;
  padding: 1px 6px; font-size: 10.5px; font-weight: 800; color: #333;
  box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.gyosha-label::before { display: none; }

/* Leaflet標準のポップアップを、余白と字面の整った白カードに寄せる */
.leaflet-popup-content-wrapper {
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(20, 40, 70, .18);
  padding: 0;
}
.leaflet-popup-content { margin: 0; line-height: 1.6; }
.leaflet-popup-tip { box-shadow: none; }
.leaflet-container a.leaflet-popup-close-button { color: var(--faint); padding: 6px 7px 0 0; }

.map-pop { padding: 13px 14px 11px; }
.map-pop .mp-name { font-weight: 900; font-size: 14px; color: var(--text); line-height: 1.45; padding-right: 14px; }
.map-pop .mp-addr { font-size: 11px; color: var(--muted); margin-top: 2px; }
.map-pop .mp-tags { display: flex; gap: 4px; flex-wrap: wrap; margin: 7px 0 9px; }
.map-pop .mp-actions { display: grid; gap: 6px; }
.map-pop .mp-tel {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--ok); color: #fff; text-decoration: none;
  font-size: 13.5px; font-weight: 800; border-radius: 8px; padding: 9px 10px;
}
.map-pop .mp-web {
  display: block; text-align: center; text-decoration: none;
  border: 1.5px solid var(--line); color: var(--primary-dark);
  font-size: 12.5px; font-weight: 800; border-radius: 8px; padding: 8px 10px;
}
.map-pop .mp-web:hover { border-color: var(--primary); background: var(--primary-pale2); }
.map-pop .mp-src { font-size: 10px; color: var(--faint); margin-top: 9px; }
.map-pop .mp-src a { color: var(--faint); }
.g-web {
  font-size: 12.5px; font-weight: 800; text-decoration: none;
  border: 1.5px solid var(--line); color: var(--primary-dark);
  border-radius: 999px; padding: 7px 14px;
}
.g-web:hover { border-color: var(--primary); background: var(--primary-pale2); }

/* 現在地ボタン */
.locate-btn {
  width: 34px; height: 34px; border: none; border-radius: 8px;
  background: #fff; color: var(--primary-dark);
  box-shadow: 0 1px 5px rgba(0,0,0,.3);
  display: flex; align-items: center; justify-content: center;
}
.locate-btn:hover { background: var(--primary-pale2); }
.locate-btn.loading { opacity: .5; }
.locate-btn.loading svg { animation: spin 1s linear infinite; }

/* ---------- やることリスト ---------- */
.todo-strip {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius-s);
  padding: 12px 14px; margin: 12px 0 4px; text-decoration: none; color: var(--text);
  font-size: 13.5px; font-weight: 700; box-shadow: var(--shadow);
}
.todo-strip svg { color: var(--primary-dark); flex: 0 0 auto; }
.todo-strip b { color: var(--primary-dark); }
.todo-strip .ts-arrow { margin-left: auto; color: var(--faint); }
.todo-progress .tp-num { font-size: 15px; font-weight: 900; margin-bottom: 8px; }
.todo-progress .tp-bar { height: 10px; background: var(--primary-pale); border-radius: 99px; overflow: hidden; }
.todo-progress .tp-fill { height: 100%; background: var(--primary); border-radius: 99px; transition: width .3s; }
.todo-list { display: grid; gap: 8px; }
.todo-item {
  display: flex; gap: 10px; align-items: flex-start;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-s);
  padding: 12px 13px; font-size: 14px; line-height: 1.6; cursor: pointer; user-select: none;
}
.todo-item input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--primary); flex: 0 0 auto; }
.todo-item.done span { color: var(--faint); text-decoration: line-through; }
.todo-item .todo-del {
  margin-left: auto; border: none; background: none; color: var(--faint);
  font-size: 11px; text-decoration: underline; flex: 0 0 auto; padding: 2px;
}

/* ---------- 見積書チェック ---------- */
.m-items { display: grid; gap: 8px; }
.m-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-s); padding: 11px 13px; }
.m-item .mi-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.m-item .mi-name { font-size: 13.5px; font-weight: 800; line-height: 1.5; }
.m-item .mi-right { display: flex; gap: 7px; align-items: baseline; flex: 0 0 auto; }
.m-item .mi-amount { font-size: 13.5px; font-weight: 900; color: var(--text); }
.mi-verdict { font-size: 10.5px; font-weight: 900; border-radius: 6px; padding: 2px 8px; color: #fff; white-space: nowrap; }
.mv-ok { background: var(--ok); }
.mv-warn { background: #d8a413; }
.mv-over { background: var(--danger); }
.mv-low { background: var(--violet); }
.mv-na { background: var(--faint); }
.m-item .mi-basis { font-size: 11.5px; color: var(--muted); margin-top: 3px; line-height: 1.55; }

/* ---------- 掲示板 ---------- */
.post-card { padding: 12px 14px; margin-bottom: 9px; }
.post-head { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.post-head .p-nick { font-size: 13px; font-weight: 900; }
.post-head .p-meta { font-size: 11px; color: var(--faint); }
.post-cat { font-size: 10.5px; font-weight: 800; border-radius: 6px; padding: 1px 7px; background: var(--primary-pale); color: var(--primary-dark); }
.report-btn {
  margin-left: auto; border: none; background: none; color: var(--faint);
  font-size: 11px; text-decoration: underline; padding: 4px 2px;
}
.report-btn[disabled] { text-decoration: none; cursor: default; }
.post-cat.warn { background: var(--danger-pale); color: var(--danger); }
.post-body { font-size: 13.5px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.board-form textarea { min-height: 90px; }
.board-note { font-size: 11.5px; color: var(--muted); }

/* ---------- 窓口 ---------- */
.support-card { padding: 14px; margin-bottom: 10px; }
.support-card .sp-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.support-card .sp-name { font-size: 14.5px; font-weight: 900; }
.support-card .sp-tag { font-size: 10.5px; font-weight: 800; color: #fff; background: var(--primary); border-radius: 6px; padding: 1px 7px; }
.support-card .sp-desc { font-size: 12px; color: var(--muted); margin: 4px 0 8px; }

/* ---------- ホーム ---------- */
.home-hello { margin: 4px 0 14px; }
.home-label {
  display: inline-block; background: var(--primary-pale); color: var(--primary-dark);
  font-size: 11px; font-weight: 800; border-radius: 999px; padding: 3px 12px; margin-bottom: 8px;
}
.home-hello h2 { font-size: 20px; font-weight: 900; line-height: 1.5; }
.home-hello p { font-size: 13px; color: var(--muted); margin-top: 4px; }
.mini-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mini-link {
  display: flex; gap: 8px; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-s);
  padding: 11px 12px; text-decoration: none; color: var(--text);
  font-size: 12.5px; font-weight: 800; line-height: 1.45; min-height: 54px;
  box-shadow: var(--shadow);
}
.mini-link svg { flex: 0 0 auto; color: var(--primary-dark); }
.mini-link:active { background: var(--primary-pale2); }
.mini-link.wide { grid-column: 1 / -1; border-color: var(--primary); font-size: 14px; }

/* ---------- 相場一覧 ---------- */
.soba-tools { position: sticky; top: var(--header-h); z-index: 40; background: var(--app-bg); padding: 8px 0 10px; }
.soba-search { position: relative; margin-bottom: 8px; }
.soba-search input { padding-left: 38px; }
.soba-search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.soba-cat-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 900; margin: 20px 0 8px;
  scroll-margin-top: calc(var(--header-h) + 96px);
}
.soba-cat-head .sch-count { font-size: 11px; font-weight: 700; color: var(--faint); }
.soba-rows { display: grid; gap: 7px; }
.soba-row { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-s); padding: 10px 13px; }
.soba-row .sr-line1 { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.soba-row .sr-name { font-size: 13.5px; font-weight: 800; line-height: 1.45; }
.soba-row .sr-price { font-size: 14.5px; font-weight: 900; color: var(--primary-dark); white-space: nowrap; }
.soba-row .sr-price small { font-size: 10.5px; font-weight: 700; }
.soba-row .sr-line2 { display: flex; justify-content: space-between; gap: 10px; font-size: 11px; color: var(--muted); margin-top: 2px; flex-wrap: wrap; }
.soba-row .sr-src a { color: var(--faint); }
.soba-row .sr-note { font-size: 11px; color: var(--muted); margin-top: 3px; border-top: 1px dashed var(--line); padding-top: 3px; }
.soba-empty { text-align: center; color: var(--muted); font-size: 13px; padding: 24px 0; }
.home-tel-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.home-tel-row .tel-btn {
  border-radius: var(--radius-s); padding: 11px 12px; justify-content: flex-start;
}
.home-tel-row .tel-btn span { display: flex; flex-direction: column; line-height: 1.3; text-align: left; }
.home-tel-row .tel-btn b { font-size: 15px; }
.home-tel-row .tel-btn small { font-size: 10px; font-weight: 700; opacity: .9; }

.home-posts .post-card { margin-bottom: 8px; }
.link-more { font-size: 12.5px; font-weight: 800; }

/* ---------- フッター ---------- */
.app-footer {
  padding: 20px 16px calc(var(--tabbar-h) + 24px);
  font-size: 11px; color: var(--faint); line-height: 1.7;
  border-top: 1px solid var(--line);
}

/* ---------- PC微調整 ---------- */
@media (min-width: 560px) {
  body { padding: 0; }
  .screen { padding-left: 22px; padding-right: 22px; }
}
