/* 大阪タワーマンション価格データサイト */
:root {
  --ink: #23303e;
  --muted: #6b7280;
  --line: #eaecef;
  --bg: #f6f7f3;              /* ほんのり暖色のオフホワイト */
  --accent: #2563eb;
  --accent-dark: #1e40af;
  --sun: #f5b301;            /* アヒルの黄色(サブアクセント) */
  --sun-soft: #fff6da;
  --sun-deep: #9c6d00;        /* 濃い黄色(成約タブ・成約グラフ)。白文字で4.6:1 */
  --down: #dc2626;
  --up: #059669;
  --shadow: none;
  --shadow-lift: 0 1px 2px rgba(20, 30, 45, .08);
}

* { box-sizing: border-box; }
/* スマホは横に長いブロック(横スクロールする表など)の中の文字を勝手に拡大する
   (font boosting)。指定どおりの大きさで出すため切っておく。 */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo,
               system-ui, -apple-system, sans-serif;
  line-height: 1.7;
  font-size: 15px;
}
/* 見出し・ブランドはやわらかい丸ゴシックを優先(なければ通常ゴシック) */
h1, h2, h3, .brand {
  font-family: "Hiragino Maru Gothic ProN", "Hiragino Maru Gothic Pro",
               "Hiragino Kaku Gothic ProN", Meiryo, system-ui, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 960px; margin: 0 auto; padding: 0 16px; }

/* ヘッダー */
.site-header {
  background: #172433;
  padding: 12px 0;
  position: relative;
}
.site-header::after {   /* 遊びのアクセントライン(青→アヒル黄) */
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: var(--sun);
}
/* ヘッダーだけ広い幅を許可(960px制限だとPCでナビが2段に折り返す) */
.site-header .container { display: flex; flex-wrap: wrap; align-items: center;
                          gap: 8px 20px; max-width: 1360px; }
.brand { display: flex; align-items: center; gap: 9px; color: #fff; font-weight: 700; font-size: 17px; }
.brand:hover { text-decoration: none; }
.brand-icon { width: 30px; height: 30px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(245,179,1,.6); }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-left: auto; }
.nav a { color: #cdd6e0; font-size: 13px; transition: color .12s; }
.nav a:hover { color: #fff; text-decoration: none; }
.nav-cta {
  background: var(--accent);
  color: #fff !important;
  padding: 3px 12px;
  border-radius: 999px;
  transition: background .12s, transform .1s;
}
.nav-cta:hover { background: var(--accent-dark); transform: translateY(-1px); }

/* 「記事」ホバードロップダウン(シリーズ) */
.nav-item { position: relative; display: inline-flex; align-items: center; }
.nav-parent { color: #cdd6e0; font-size: 13px; }
.nav-caret { font-size: 9px; margin-left: 3px; opacity: .75; }
.nav-dropdown {
  position: absolute;
  top: 100%; left: 0;
  min-width: 210px;
  margin-top: 8px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .2);
  display: none;
  z-index: 60;
}
.nav-dropdown::before {   /* ホバーが途切れないよう、隙間に透明の橋を掛ける */
  content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px;
}
.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown { display: block; }
.nav-dropdown a {
  display: block;
  color: var(--ink);
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 7px;
  white-space: nowrap;
}
.nav-dropdown a:hover { background: var(--sun-soft); color: var(--ink); text-decoration: none; }

/* ハンバーガー(スマホのみ表示) */
.nav-toggle {
  display: none;
  margin-left: auto;
  width: 40px; height: 34px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 8px;
  cursor: pointer;
  padding: 0 8px;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform .2s, opacity .2s;
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* コンテンツ */
/* main は <main class="container"> なので、.container の padding より
   詳細度を上げないと上下の余白が効かない(ヘッダー/フッターの
   グラデーション線にコンテンツが密着してしまう)。 */
main.container { padding: 14px 16px 26px; }
h1 { font-size: 25px; line-height: 1.4; margin: 8px 0 16px; letter-spacing: .01em; }
h2 {
  font-size: 18px;
  margin: 38px 0 14px;
  padding-left: 14px;
  position: relative;
}
h2::before {   /* 角丸のグラデーションバー */
  content: "";
  position: absolute;
  left: 0; top: .18em; bottom: .18em;
  width: 5px;
  border-radius: 3px;
  background: var(--accent);
}
section:first-child h2 { margin-top: 12px; }
.breadcrumb { font-size: 12px; color: var(--muted); }
.note { font-size: 12px; color: var(--muted); }
.md-note { font-size: 12.5px; color: var(--muted); }  /* 記事本文の※注記 */
.more { text-align: right; font-size: 13px; }

/* ヒーロー(やわらかいグラデ帯)・カード */
.hero {
  background: #fff;
  border: 1px solid #eef1ea;
  border-radius: 10px;
  padding: 22px 26px;
  margin-bottom: 6px;
}
.hero p { color: #46545f; margin: 0; }
.stat-cards { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0; }
/* 棟ページの3枚組: スマホでも横に3つ並べる */
.stat-cards-3 { flex-wrap: nowrap; }
.stat-cards-3 .card { flex: 1 1 0; min-width: 0; }
@media (max-width: 700px) {
  .stat-cards-3 { gap: 8px; }
  /* 幅は内容に合わせ、数値・見出しとも改行させない */
  .stat-cards-3 .card { padding: 11px 7px; flex: 1 1 auto; }
  .stat-cards-3 .card .num { font-size: 16px; white-space: nowrap; }
  .stat-cards-3 .card .cap { font-size: 10px; white-space: nowrap; }
}
.card {
  flex: 1 1 140px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 15px 16px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.card a { color: inherit; text-decoration: none; }
.card .num { font-size: 23px; font-weight: 700; color: var(--accent-dark); }
.card .cap { font-size: 12px; color: var(--muted); }

/* 運営者バッジ(トップ) */
.operator-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 12px 16px;
  margin: 16px 0 4px;
  color: var(--ink);
}
.operator-badge:hover { background: #f8fafc; text-decoration: none; }
.ob-icon { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.ob-text { font-size: 13px; line-height: 1.55; }
.ob-link { color: var(--accent); font-weight: 700; margin-left: 4px; white-space: nowrap; }

/* 運営者プロフィール(aboutページ) */
.operator-intro {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 4px 0 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}
.operator-avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}
.operator-name { font-size: 20px; font-weight: 700; margin: 0; }
.operator-yomi { font-size: 13px; font-weight: 400; color: var(--muted); margin-left: 6px; }
.operator-tags { margin: 6px 0 0; }
.operator-tags span {
  display: inline-block;
  font-size: 12px;
  background: #eef2ff;
  color: var(--accent-dark);
  border-radius: 10px;
  padding: 2px 10px;
  margin: 2px 4px 2px 0;
}

/* トップ: 価格指数のエリアフィルタと見出し数字 */
.market-filter { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 13px; }
.market-filter label { color: var(--muted); }
.market-filter select {
  border: 1px solid var(--line); border-radius: 8px;
  padding: 5px 10px; font-size: 13px; background: #fff; color: var(--ink);
}

.market-lead {
  display: flex; flex-wrap: wrap; gap: 10px 28px;
  align-items: flex-end; margin: 0 0 10px;
}
.ml-item { min-width: 92px; }
.ml-num { font-size: 30px; font-weight: 700; line-height: 1.15; color: var(--accent-dark); }
.ml-num.up { color: var(--up); }
.ml-num.down { color: var(--down); }
.ml-unit { font-size: 15px; font-weight: 400; margin-left: 2px; }
.ml-cap { font-size: 12px; color: var(--muted); }
@media (max-width: 560px) {
  /* 4つを必ず1行に収める。項目数はエリアによって3にも4にもなるので、
     固定の列数ではなく auto-flow で見えている数だけ等分する。 */
  .market-lead {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 0 6px;
  }
  .ml-item { min-width: 0; }
  .ml-num { font-size: 19px; letter-spacing: -.01em; white-space: nowrap; }
  .ml-unit { font-size: 11px; margin-left: 1px; }
  .ml-cap { font-size: 10.5px; line-height: 1.3; }
}
@media (max-width: 360px) {
  .ml-num { font-size: 17px; }
  .ml-cap { font-size: 10px; }
}

/* 簡易査定 */
.val-form { margin: 4px 0 18px; }
.val-field { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 10px; }
.val-field label { color: var(--muted); white-space: nowrap; min-width: 74px; }
.val-field input, .val-field select {
  border: 1px solid var(--line); border-radius: 8px;
  padding: 7px 10px; font-size: 14px; background: #fff; color: var(--ink);
}
.val-field input[type="number"] { width: 92px; }
.val-suffix { color: var(--muted); font-size: 12px; }
.val-field-name { max-width: 520px; }
.val-pick { position: relative; flex: 1; }
.val-pick input { width: 100%; }
.val-list {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 40;
  margin-top: 4px; padding: 4px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 10px 28px rgba(0,0,0,.14);
  max-height: 320px; overflow-y: auto;
}
.val-opt {
  display: block; width: 100%; text-align: left;
  border: 0; background: transparent; cursor: pointer;
  padding: 8px 10px; border-radius: 7px; font-size: 13.5px; color: var(--ink);
}
.val-opt:hover { background: var(--sun-soft); }
.val-opt-sub { display: block; font-size: 11.5px; color: var(--muted); }
.val-row { display: flex; flex-wrap: wrap; gap: 0 22px; }
.val-result {
  background: var(--sun-soft);
  border: 1px solid #eef1ea; border-radius: 10px;
  padding: 20px 24px; max-width: 520px;
}
.vr-name { font-size: 13px; color: var(--muted); }
.vr-price { font-size: 40px; font-weight: 700; line-height: 1.2; color: var(--accent-dark); }
.vr-unit { font-size: 17px; font-weight: 400; margin-left: 3px; }
.vr-range { font-size: 16px; font-weight: 600; color: var(--accent-dark); margin-top: 2px; }
.vr-sub { font-size: 13px; color: var(--muted); margin-top: 4px; }
.vr-pl { font-size: 17px; font-weight: 700; margin-top: 8px; }
.vr-pl .plus { color: #15803d; }
.vr-pl .minus { color: #b91c1c; }
.vr-pos { margin-top: 14px; padding-top: 12px; border-top: 1px solid #e3e8ef; }
.vr-pos-line { font-size: 12.5px; color: var(--muted); }
.vr-blink { display: inline-block; margin-top: 10px; font-size: 13px; font-weight: 600; }
@media (max-width: 560px) {
  .val-field label { min-width: 62px; }
  .vr-price { font-size: 31px; }
  .vr-range { font-size: 14px; }
}

/* 記事末尾のソース注記(em) */
.article-body em { font-style: normal; font-size: 12px; color: var(--muted); }

/* 記事内チャート([chart:name]) */
.art-chart { position: relative; height: 360px; margin: 22px 0; }
.art-chart-multi { height: auto; }
.art-chart-tall { height: 420px; }
.art-multi { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.art-multi-cell { position: relative; height: 200px; }
.art-multi-note { font-size: 12px; color: var(--muted); margin: 0 0 10px; }
@media (max-width: 560px) {
  .art-chart { height: 300px; }
  .art-chart-tall { height: 380px; }
  .art-chart-multi { height: auto; }  /* .art-chartの300px指定に負けないよう再宣言 */
  .art-multi { grid-template-columns: 1fr; gap: 14px; }
  .art-multi-cell { height: 180px; }
}

/* AIチャット */
.chat-box { max-width: 640px; }
.chat-log { display: flex; flex-direction: column; gap: 10px;
            min-height: 300px; max-height: 60vh; overflow-y: auto;
            padding: 16px; background: #f6f8fa; border: 1px solid #e3e8ef;
            border-radius: 12px; }
.chat-msg { max-width: 85%; padding: 10px 14px; border-radius: 12px;
            font-size: 14.5px; line-height: 1.7; white-space: pre-wrap; }
.chat-msg.user { align-self: flex-end; background: var(--accent, #2563eb);
                 color: #fff; border-bottom-right-radius: 4px; }
.chat-msg.model { align-self: flex-start; background: #fff;
                  border: 1px solid #e3e8ef; border-bottom-left-radius: 4px; }
.chat-msg.model a { word-break: break-all; }
.chat-row { display: flex; gap: 8px; align-items: flex-start;
            align-self: flex-start; max-width: 100%; }
.chat-row .chat-msg.model { max-width: calc(100% - 50px); }
.chat-avatar { width: 42px; height: 42px; flex: none; }
.chat-avatar-wrap { display: flex; flex-direction: column; align-items: center;
                    gap: 3px; flex: none; }
.chat-avatar-wrap.has-cap { width: 64px; }
.chat-avatar-cap { font-size: 9px; color: var(--muted); text-align: center;
                   line-height: 1.35; }
.chat-row:has(.has-cap) .chat-msg.model { max-width: calc(100% - 72px); }
.chat-form { display: flex; gap: 8px; margin-top: 12px; }
.chat-form input { flex: 1; padding: 10px 14px; font-size: 15px;
                   border: 1px solid #cbd5e1; border-radius: 10px; }
.chat-form button { padding: 10px 20px; font-size: 15px; border: 0;
                    border-radius: 10px; background: var(--accent, #2563eb);
                    color: #fff; cursor: pointer; }
.chat-form button:disabled { opacity: .5; cursor: default; }

/* AIチャットのフローティングウィジェット */
.aichat-fab { position: fixed; right: 16px; bottom: 16px; z-index: 900;
              padding: 8px 13px; border-radius: 999px;
              background: #fff; border: 1px solid #d7dee8;
              box-shadow: 0 2px 10px rgba(30, 41, 59, .12);
              font-size: 12.5px; font-weight: 600; color: #475569;
              line-height: 1; cursor: pointer; opacity: .85; }
.aichat-fab:hover { opacity: 1; }
.aichat-fab.hidden { display: none; }
.aichat-panel { position: fixed; right: 14px; bottom: 14px; z-index: 901;
                display: none; flex-direction: column;
                width: min(360px, calc(100vw - 28px));
                height: min(480px, calc(100vh - 90px));
                background: #fff; border: 1px solid #d7dee8; border-radius: 10px;
                box-shadow: 0 8px 30px rgba(30, 41, 59, .18); overflow: hidden; }
.aichat-panel.open { display: flex; }
.aichat-head { display: flex; align-items: center; justify-content: space-between;
               padding: 10px 14px; font-size: 14px; font-weight: 600;
               border-bottom: 1px solid #eef1f5; background: #f8fafc; }
.aichat-close { border: 0; background: none; font-size: 14px; cursor: pointer;
                color: var(--muted); padding: 2px 6px; }
.aichat-log { flex: 1; min-height: 0; max-height: none; border: 0; border-radius: 0; }
.aichat-form { margin: 0; padding: 10px; border-top: 1px solid #eef1f5; }
/* スマホではパネルを全画面にする(小さい浮き枠は見にくい) */
@media (max-width: 560px) {
  .aichat-panel { right: 0; bottom: 0; left: 0; top: 0;
                  width: 100%; height: 100%; height: 100dvh;
                  border-radius: 0; border: 0; }
}

/* 地図タイルを半透明にするので、下地は白にしておく */
.tower-map { background: #fff; }

/* マップの表示モード切替 */
.map-mode { display: flex; gap: 8px; margin: 10px 0 8px; }
.mm-btn { padding: 5px 14px; font-size: 13px; border-radius: 999px;
          border: 1px solid #cbd5e1; background: #fff; cursor: pointer;
          color: var(--muted); }
.mm-btn.selected { background: var(--ink, #23303e); color: #fff;
                   border-color: var(--ink, #23303e); }
.mm-pin { display: flex; align-items: center; gap: 5px; font-size: 13px;
          color: var(--muted); margin-left: 4px; cursor: pointer;
          white-space: nowrap; }
@media (max-width: 560px) {
  /* スマホは1行に収める(折り返さず横スクロール) */
  .map-mode { flex-wrap: nowrap; overflow-x: auto; gap: 6px;
              -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .map-mode::-webkit-scrollbar { display: none; }
  .mm-btn { padding: 4px 10px; font-size: 12px; white-space: nowrap; flex: none; }
  .mm-pin { font-size: 12px; flex: none; }
}

/* ダッシュボードKPI */
.dash-kpis { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0 8px; }
/* 隣のカードのキャプション折り返しで背が伸びても、中身は上下中央に置く */
.dash-kpis .card { flex: 1 1 130px; display: flex; flex-direction: column;
                   justify-content: center; }
.dash-kpis .num .unit { font-size: 13px; font-weight: 400; margin-left: 2px; }
.dash-kpis .down-num { color: var(--down); }

/* ページャー */
.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 12px 0 4px;
}
.pg-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 5px 11px;
  border-radius: 5px;
  font-size: 13px;
  cursor: pointer;
}
.pg-btn:hover:not(:disabled) { background: #f3f4f6; }
.pg-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.pg-btn:disabled { opacity: .4; cursor: default; }
.pg-info { font-size: 12px; color: var(--muted); margin: 0 6px; }

/* テーブル */
.data-table, .info-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  font-size: 13.5px;
}
.data-table th, .data-table td, .info-table th, .info-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table thead th {
  background: #eef3fb;
  color: #3a4a5c;
  font-size: 12.5px;
  white-space: nowrap;
}
.data-table tbody tr { transition: background .1s; }
.data-table tbody tr:hover { background: var(--sun-soft); }
.num-cell { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.total-row { font-weight: 700; background: #f9fafb; }
.info-table th { width: 90px; background: #eef3fb; font-weight: 600; font-size: 12.5px; }
.table-scroll { overflow-x: auto; }
.down { color: var(--down); font-weight: 700; }
.up { color: var(--up); }

/* タグ */
.tag {
  display: inline-block;
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 10px;
  background: #eef2ff;
  color: var(--accent-dark);
  margin-right: 4px;
}
.tag-new { background: #ecfdf5; color: var(--up); }
.tag-change { background: #fef2f2; color: var(--down); }
.tag-relist { background: #fffbeb; color: #b45309; }

/* チャート(maintainAspectRatio:false のため高さはコンテナで制御) */
.chart-wrap {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  height: 440px;
  box-shadow: var(--shadow);
}
.chart-wrap.chart-sm { height: 300px; }
.chart-wrap canvas { width: 100% !important; height: 100% !important; }

/* タブ */
.tabs { display: flex; gap: 6px; margin-bottom: 10px; }
/* display指定はブラウザ既定の [hidden]{display:none} に勝ってしまうので打ち消す。
   成約タブでは内側の「階数×/面積×」を hidden で隠している(building.js)。 */
.tabs[hidden] { display: none; }
.tabs .tab {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  padding: 6px 16px;
  border-radius: 6px 6px 0 0;
  font-size: 13px;
  cursor: pointer;
}
.tabs .tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}

/* 成約タブとそのグラフは、サイトの青→黄グラデーションの黄側に寄せる */
.tabs .tab[data-view="tx"].active {
  background: var(--sun-deep);
  border-color: var(--sun-deep);
}

/* ソート可能テーブル */
.sortable thead th[data-type] { cursor: pointer; user-select: none; white-space: nowrap; }
.sortable thead th[data-type]:hover { background: #e5e7eb; }
.sortable thead th[data-type]::after { content: " ↕"; color: #9ca3af; font-size: 10px; }
.sortable thead th.sort-asc::after { content: " ▲"; color: var(--accent); }
.sortable thead th.sort-desc::after { content: " ▼"; color: var(--accent); }
.suumo-link { font-size: 12px; white-space: nowrap; }
.card .unit { font-size: 13px; font-weight: 400; margin-left: 2px; }

/* 棟内坪単価最安のハイライト(色で視覚化) */
.data-table tbody tr.row-min { background: #fff1f2; }
.data-table tbody tr.row-min:hover { background: #ffe4e6; }
.data-table td.cell-min { color: var(--down); font-weight: 700; }
.data-table tbody tr.row-value { background: #ecfdf5; }
.data-table tbody tr.row-value:hover { background: #d1fae5; }
.data-table td.cell-value { color: var(--up); font-weight: 700; }
.data-table .over { color: var(--muted); }
.min-legend { color: var(--down); font-weight: 700; }
.line-legend { color: #6b7280; font-weight: 700; }
.value-legend { color: var(--up); font-weight: 700; }

/* 割安ピック(棟別ページ) */
.value-pick {
  display: flex;
  align-items: baseline;
  gap: 10px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 8px;
  padding: 10px 14px;
  margin: 12px 0 0;
  font-size: 13.5px;
}
.vp-badge {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: var(--up);
  border-radius: 4px;
  padding: 2px 8px;
}
.vp-dev { color: var(--up); font-weight: 700; margin: 0 4px; white-space: nowrap; }

/* 記事 */
.article-list { list-style: none; padding: 0; }
.article-list li { padding: 7px 0; border-bottom: 1px dashed var(--line); }
.article-list .date { color: var(--muted); font-size: 12.5px; margin-right: 10px; }
.article-list-lg .excerpt { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); }
.article-series { margin: 0 0 2px; }
.article-series a {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-dark);
  background: var(--sun-soft);
  border: 1px solid #f3e4b3;
  border-radius: 999px;
  padding: 2px 12px;
}
.article-meta { color: var(--muted); font-size: 13px; }
.series-lead { font-size: 13.5px; margin-bottom: 18px; }

/* 記事トップ: シリーズ一覧カード */
.series-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.series-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  transition: box-shadow .12s, transform .12s, border-color .12s;
}
.series-card:hover {
  border-color: var(--accent);
  box-shadow: 0 6px 18px rgba(37, 99, 235, .12);
  transform: translateY(-2px);
}
.series-card-title { font-size: 16px; font-weight: 700; color: var(--ink); }
.series-card-desc { font-size: 13px; color: #4a5763; line-height: 1.6; }
.series-card-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* シリーズページ: 各記事をパネル(カード)表示 */
.article-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 16px;
}
.article-card {
  display: flex; flex-direction: column; gap: 6px;
  padding: 16px 18px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow);
  transition: box-shadow .12s, transform .12s, border-color .12s;
}
.article-card:hover {
  border-color: var(--accent);
  box-shadow: 0 6px 18px rgba(37, 99, 235, .12);
  transform: translateY(-2px);
  text-decoration: none;
}
.ac-date { font-size: 12px; color: var(--muted); }
.ac-title { font-size: 15px; font-weight: 700; color: var(--ink); line-height: 1.45; }
.ac-excerpt {
  font-size: 12.5px; color: #4a5763; line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

.stars { margin-left: 8px; letter-spacing: 1px; font-size: .92em; vertical-align: 1px; }
.stars .star-on { color: #f5b301; }
.stars .star-off { color: #d6dae0; }

/* マンションマップ: エリア複数選択フィルタ */
.map-filter { margin: 0 0 12px; }
.mf-head { font-size: 13px; color: var(--muted); margin: 0 0 6px; }
.mf-clear {
  margin-left: 10px; font-size: 12px; color: var(--accent-dark);
  background: none; border: none; cursor: pointer; text-decoration: underline; padding: 0;
}
.area-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.area-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; line-height: 1.6;
  padding: 2px 10px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  cursor: pointer; user-select: none;
}
.area-chip::before {
  content: ''; width: 9px; height: 9px; border-radius: 50%;
  background: var(--acc, #94a3b8); flex: none;
}
.area-chip:hover { border-color: var(--accent); }
.area-chip.selected {
  background: var(--sun-soft); border-color: var(--sun); font-weight: 700;
}

/* マンションマップ: フリーワード絞り込み */
.map-search { display: flex; align-items: center; gap: 12px; margin: 4px 0 10px; }
.map-search input {
  flex: 0 1 420px;
  font-size: 14px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  outline: none;
}
.map-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px #dbeafe; }
.map-search .note { margin: 0; }

/* マンションマップ(Leaflet + 地理院タイル) */
.tower-map {
  height: 460px;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  overflow: hidden;
  margin: 8px 0 10px;
}
.map-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 20px; }
.map-legend .lg { font-size: 12.5px; color: var(--muted); display: inline-flex; align-items: center; }
.map-legend .lg::before {
  content: ''; width: 11px; height: 11px; border-radius: 50%;
  background: var(--lgc, #94a3b8); border: 1.5px solid #fff;
  box-shadow: 0 0 0 1px var(--line); margin-right: 5px;
}
.map-pop { font-size: 13px; line-height: 1.5; }
.map-pop strong { font-size: 13.5px; }
.map-pop .mp-stat { color: var(--muted); font-size: 12px; margin: 3px 0 6px; }
.map-pop .mp-link, .map-pop .mp-review { display: block; font-weight: 700; text-decoration: none; }
.map-pop .mp-link { color: var(--accent-dark); }
.map-pop .mp-review { color: var(--accent-dark); margin-top: 4px; }
@media (max-width: 640px) { .tower-map { height: 360px; } }

/* レビュー連携: 一覧・ランキング・検索の「★レビュー」バッジ */
.review-badge {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--accent-dark);
  background: var(--sun-soft);
  border: 1px solid #f3e4b3;
  border-radius: 999px;
  padding: 1px 8px;
  margin-left: 6px;
  white-space: nowrap;
  text-decoration: none;
  line-height: 1.7;
}
.review-badge:hover { background: #ffeaa8; }

/* マンション別ページ: レビュー・記事カード(上部に昇格) */
.related-reviews {
  background: var(--sun-soft);
  border: 1px solid #eaeef0;
  border-radius: 10px;
  padding: 14px 18px;
  box-shadow: var(--shadow);
}
.related-reviews h2 { border: none; padding: 0; margin: 0 0 10px; font-size: 16px; }
.review-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.review-card a {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  text-decoration: none;
  color: var(--ink);
  transition: box-shadow .15s ease, transform .15s ease;
}
.review-card a:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.review-card .rc-stars { margin-left: 0; flex: none; }
.review-card .rc-title { font-weight: 700; flex: 1 1 auto; }
.review-card .rc-go { color: var(--accent-dark); font-size: 13px; font-weight: 700; flex: none; }
/* X(旧Twitter)リンク */
.operator-sns { margin: 6px 0 0; }
.x-link {
  display: inline-flex; align-items: center; gap: 4px;
  font-weight: 700; font-size: 13px; color: var(--accent-dark);
  text-decoration: none;
}
.x-link:hover { text-decoration: underline; }
.footer-links { margin: 10px 0 4px; font-size: 12.5px; }
.footer-links a { color: #cdd6e0; }
.footer-links .x-link { color: #cdd6e0; }

/* レビュー記事の評価レーダーチャート */
.review-radar-wrap {
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  padding: 14px 16px; margin-bottom: 16px;
}
.review-radar-wrap .rr-title { margin: 0 0 6px; font-weight: 700; font-size: 14px; }
.review-radar { height: 300px; max-width: 420px; margin: 0 auto; position: relative; }

.article-body { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 20px 24px; }
.article-body h2 { margin-top: 28px; }
.article-body table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.article-body th, .article-body td { border: 1px solid var(--line); padding: 6px 10px; font-size: 13.5px; }
.article-body pre { background: #f3f4f6; padding: 12px; border-radius: 6px; overflow-x: auto; font-size: 13px; }
.article-body code { background: #f3f4f6; padding: 1px 5px; border-radius: 4px; font-size: 13px; }
.article-body blockquote { margin: 12px 0; padding: 4px 16px; border-left: 4px solid var(--line); color: var(--muted); }
.article-body img { max-width: 100%; }
.related { margin-top: 24px; padding: 14px 18px; background: #eef2ff; border-radius: 8px; }
.related h2 { border: none; padding: 0; font-size: 15px; margin: 0 0 8px; }
.related ul { margin: 0; padding-left: 18px; }

/* 免責ボックス(内覧同行の「診断ではない」明記など) */
.disclaimer {
  margin: 16px 0;
  padding: 14px 18px;
  background: #fff8e1;
  border: 1px solid #f0d98a;
  border-left: 4px solid var(--sun);
  border-radius: 10px;
}
.disclaimer p { margin: 4px 0; font-size: 13.5px; }
.disclaimer p:first-child { color: var(--accent-dark); }

/* CTA */
.cta-box {
  margin-top: 40px;
  background: var(--sun-soft);
  border: 1px solid #eaeef0;
  border-radius: 10px;
  padding: 18px 22px;
  box-shadow: var(--shadow);
}
.cta-box h2 { margin: 0 0 8px; padding: 0; }
.cta-box h2::before { display: none; }
/* ボタンを横並び/折り返しで間隔を確保(スマホでの重なり防止) */
.button-row { display: flex; flex-wrap: wrap; gap: 10px; }

.button {
  display: inline-block;
  background: var(--accent);
  color: #fff !important;
  padding: 9px 24px;
  border-radius: 999px;
  border: none;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(37, 99, 235, .25);
  transition: background .12s, transform .1s, box-shadow .12s;
}
.button:hover {
  background: var(--accent-dark);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(37, 99, 235, .32);
}

/* 検索フォーム */
.search-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 16px;
}
.search-form .field { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.search-form label { color: var(--muted); white-space: nowrap; }
.search-form input, .search-form select {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 13px;
}
.search-form input[type="number"] { width: 84px; }
/* エリアは37区分あるので、セレクトの複数選択ではなく
   ドロップダウンの中にチェックボックスを並べる形にする。
   1つも選ばれていなければ絞り込まない(=すべて)扱い。 */
.ward-dd { position: relative; }
.ward-dd-btn {
  padding: 5px 26px 5px 8px; border: 1px solid var(--line); border-radius: 5px;
  background: #fff; font-size: 13px; color: var(--ink); cursor: pointer;
  min-width: 132px; text-align: left; position: relative;
}
.ward-dd-btn::after {
  content: ""; position: absolute; right: 9px; top: 50%; margin-top: -2px;
  border: 4px solid transparent; border-top-color: var(--muted);
}
.ward-dd-btn:hover { border-color: var(--accent); }
.ward-dd-btn[aria-expanded="true"] { border-color: var(--accent); }
.ward-dd-btn.has-sel { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.ward-dd-panel {
  position: absolute; z-index: 30; top: calc(100% + 4px); left: 0;
  width: 260px; max-width: 84vw; background: #fff;
  border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow-lift);
}
.ward-dd-list { max-height: 300px; overflow-y: auto; padding: 6px; }
.ward-opt {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px; font-size: 13px; border-radius: 4px; cursor: pointer;
}
.ward-opt:hover { background: #f3f4f6; }
.ward-opt input { margin: 0; flex: none; }
.ward-dd-foot {
  display: flex; gap: 8px; justify-content: space-between;
  padding: 8px; border-top: 1px solid var(--line);
}
.wards-clear, .wards-close {
  border: 1px solid var(--line); background: #fff; color: var(--muted);
  font-size: 12px; padding: 4px 10px; border-radius: 4px; cursor: pointer;
}
.wards-clear:hover { border-color: var(--accent); color: var(--accent); }
.wards-close { background: var(--accent); border-color: var(--accent); color: #fff; }

/* マンション名のフリーワードは他より長い語を入れるので幅を広く取る */
/* 検索結果: マンション単位に束ねた行 */
.grp-row { cursor: pointer; }
.grp-row:hover { background: var(--sun-soft); }
.grp-toggle {
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 16px;
  width: 24px;
  padding: 0 6px 0 0;
  cursor: pointer;
  line-height: 1;
  vertical-align: -1px;
}
.grp-row:hover .grp-toggle { color: var(--accent-dark); }
.grp-count {
  display: inline-block;
  margin-left: 6px;
  padding: 0 7px;
  border-radius: 999px;
  background: #eef2ff;
  color: var(--accent-dark);
  font-size: 11.5px;
}
.grp-child > td { background: #fbfcfe; }
.grp-child-name {
  color: var(--muted);
  font-size: 12px;
  padding-left: 22px !important;
}

.search-form .field-reset { margin-left: auto; }
.reset-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  cursor: pointer;
}
.reset-btn:hover { background: var(--sun-soft); color: var(--ink); border-color: var(--sun); }

.search-form .field-name { flex: 1 1 260px; }
.search-form .field-name input { flex: 1; min-width: 160px; }

/* Xポスト下書き(運営者用) */
.draft-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 14px;
}
.draft-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.draft-kind { font-weight: 700; font-size: 14px; }
.draft-chars { font-size: 12px; color: var(--muted); }
.copy-btn {
  margin-left: auto;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  padding: 4px 14px;
  border-radius: 5px;
  cursor: pointer;
}
.copy-btn:hover { background: var(--accent-dark); }
.draft-text {
  white-space: pre-wrap;
  word-break: break-word;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  margin: 0;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.6;
}

/* 相談料金 */
.fee { font-size: 22px; margin: 6px 0; }
.fee strong { color: var(--accent-dark); }

/* LINE相談 */
.line-consult {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px 24px;
  max-width: 640px;
}
.line-steps { padding-left: 20px; }
.line-steps li { margin-bottom: 6px; }
.line-button {
  background: #06c755;
  font-size: 16px;
  padding: 12px 28px;
}
.line-button:hover { background: #05a648; }

/* 相談ページ: アイコン/カードで軽快に */
.icon-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px; margin-top: 14px;
}
.icon-cards-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.icon-card {
  display: flex; gap: 13px; align-items: flex-start;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 16px; box-shadow: var(--shadow);
}
.icon-card .ic {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 10px;
  background: var(--sun-soft); display: flex; align-items: center; justify-content: center;
}
.icon-card .ic svg { width: 22px; height: 22px; color: var(--accent-dark); }
.icon-card b { font-size: 14.5px; color: var(--ink); }
.icon-card p { margin: 4px 0 0; font-size: 13px; color: #4a5763; line-height: 1.65; }

.buy-sell { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 10px; }
.bs-card {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 18px 20px; box-shadow: var(--shadow);
}
.bs-card h2 {
  margin: 0 0 10px; padding: 0; font-size: 16px;
  display: flex; align-items: center; gap: 10px;
}
.bs-card h2::before { display: none; }
.bs-card h2 svg { width: 22px; height: 22px; color: var(--accent); flex: 0 0 auto; }
.bs-card ul { margin: 0; padding-left: 18px; }
.bs-card li { font-size: 13.5px; line-height: 1.7; margin-bottom: 5px; }
.bs-card > p { font-size: 14px; line-height: 1.7; margin: 0 0 10px; color: #33414d; }
.bs-card .disclaimer, .bs-card .fee-badge { margin-top: 12px; }
@media (max-width: 640px) { .buy-sell { grid-template-columns: 1fr; } }

/* 内覧同行: サービスカード(新築/中古)を縦積みで見やすく */
.service-cards { display: grid; gap: 16px; margin-top: 10px; }

/* 内覧同行: 報告書サンプル画像 */
.report-sample { margin: 14px 0 0; }
.report-sample img {
  display: block; width: 100%; max-width: 680px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
}
.report-sample figcaption { margin-top: 8px; font-size: 12px; color: var(--muted); }

.fee-badge {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--sun-soft); border: 1px solid #f3e4b3; border-radius: 10px;
  padding: 12px 22px; margin: 6px 0;
}
.fee-badge svg { width: 30px; height: 30px; color: var(--accent-dark); flex: 0 0 auto; }
.fee-amount { font-size: 24px; font-weight: 700; color: var(--accent-dark); }
.fee-tax { font-size: 14px; color: var(--muted); }

.inspection-crosslink { margin-top: 22px; }
.crosslink-ic { width: 20px; height: 20px; color: var(--accent); vertical-align: -4px; margin-right: 6px; }

/* フッター */
.site-footer {
  border-top: 3px solid transparent;
  border-color: var(--sun);
  background: #fff;
  padding: 20px 0 28px;
  font-size: 11.5px;
  color: var(--muted);
}
.footer-brand { display: flex; align-items: center; gap: 8px; }
.footer-duck { width: 22px; height: 22px; border-radius: 50%; }

@media (max-width: 640px) {
  h1 { font-size: 20px; }
  .search-form .field { width: 100%; }
  /* スマホでは散布図を縦に大きく取り、点の重なりを見やすくする */
  .chart-wrap { height: 74vh; min-height: 420px; padding: 8px; }
  .chart-wrap.chart-sm { height: 300px; min-height: 0; }
  .dash-kpis .card { flex: 1 1 44%; }

  /* ハンバーガーメニュー */
  .nav-toggle { display: flex; }
  .nav {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 8px 0 2px;
  }
  .nav.open { display: flex; }
  .nav a {
    font-size: 15px;
    padding: 11px 6px;
    border-top: 1px solid rgba(255, 255, 255, .12);
  }
  .nav-cta {
    margin: 8px 0 2px;
    text-align: center;
    border-top: none;
    padding: 11px 6px;
  }
  /* スマホではホバーが無いので、シリーズは「記事」の下に常時インデント表示 */
  .nav-item { display: block; width: 100%; }
  .nav-parent {
    display: block; font-size: 15px; padding: 11px 6px;
    border-top: 1px solid rgba(255, 255, 255, .12);
  }
  .nav-caret { display: none; }
  .nav-dropdown {
    position: static; display: block; min-width: 0;
    margin: 0; padding: 0; background: transparent; border: none; box-shadow: none;
  }
  .nav-dropdown::before { display: none; }
  .nav-dropdown a {
    color: #aeb9c6; font-size: 13.5px; border-radius: 0;
    padding: 9px 6px 9px 22px;
    border-top: 1px solid rgba(255, 255, 255, .08);
  }
  .nav-dropdown a:hover { background: transparent; color: #fff; }

  /* 物件概要(info-table)を縦積みにして改行の暴れを防ぐ */
  .info-table, .info-table tbody, .info-table tr, .info-table th, .info-table td {
    display: block;
    width: auto;
  }
  .info-table tr { border-bottom: 1px solid var(--line); padding: 4px 0; }
  .info-table tr:last-child { border-bottom: none; }
  .info-table th {
    background: transparent;
    color: var(--muted);
    font-size: 11.5px;
    padding: 6px 12px 0;
    border: none;
  }
  .info-table td { padding: 0 12px 6px; border: none; }

  /* 記事の表は列数が多いものがあるので、狭い画面では横スクロールで見せる。
     セルを折り返すと数字が縦に潰れて比較できなくなるため。 */
  .article-body table { display: block; overflow-x: auto; width: auto; }
  .article-body th, .article-body td { white-space: nowrap; padding: 6px 8px; font-size: 13px; }

  /* 一覧の棟名は途中改行させず、必要なら横スクロール */
  .data-table td a[href^="/b/"] { white-space: nowrap; }
  /* 各セルを1行に固定し、所在(区)などの折り返しで行が無駄に高くなるのを防ぐ。
     はみ出す分は .table-scroll の横スクロールで見せる */
  .data-table th, .data-table td { white-space: nowrap; }

  /* ランキングはスマホで文字・余白を小さめにして一覧性を上げる */
  .rank-panel .data-table { font-size: 12px; }
  .rank-panel .data-table th, .rank-panel .data-table td { padding: 6px 8px; }
  .rank-panel .data-table thead th { font-size: 11px; }
  .rank-panel .review-badge { font-size: 10px; padding: 1px 5px; }
  /* タブが折り返して大きく見えるのを抑える */
  /* タブが画面幅に収まらないときは横スクロールさせる(切れて押せなくなるため)。
     ランキングは6タブあり、375px幅では確実にはみ出す。 */
  .tabs {
    gap: 4px;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
    /* 端が切れていることが分かるよう、右端をうっすら透かす */
    mask-image: linear-gradient(90deg, #000 calc(100% - 18px), transparent);
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs .tab {
    padding: 6px 10px;
    font-size: 12.5px;
    white-space: nowrap;
    flex: 0 0 auto;
  }
}


/* スマホでの入力時ズーム対策: iOS Safariはfont-sizeが16px未満の入力欄に
   フォーカスすると自動ズームする。入力系は16px以上に揃える */
@media (max-width: 820px) {
  input[type="text"], input[type="number"], input[type="search"],
  select, textarea { font-size: 16px; }
}

/* ---- 住宅ローン破綻シミュレーター(/tools/loan-simulator/) ---- */
.ls-layout { display: flex; flex-direction: column; gap: 18px; margin-top: 14px; }
.ls-side { width: 100%; }
/* 入力セクションを画面上部に複数カラムで敷き詰める(狭い画面では自動で1列) */
.ls-cols { columns: 3 250px; column-gap: 34px; }
.ls-sec {
  break-inside: avoid; -webkit-column-break-inside: avoid; page-break-inside: avoid;
  background: #f7f9fb; border: 1px solid #eef2f6; border-radius: 10px;
  padding: 12px 14px 13px; margin-bottom: 16px;
}
.ls-sec > .ls-subhead:first-child { margin-top: 0; }
.ls-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.ls-card {
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow); padding: 16px 18px; margin-bottom: 14px;
}
.ls-main .ls-card { margin-bottom: 0; }
.ls-premise summary { cursor: pointer; font-size: 13.5px; }
.ls-hint-inline { font-size: 11.5px; color: var(--muted); margin-left: 6px; }
.ls-premise-body { font-size: 12.5px; line-height: 1.9; color: #46545f; margin-top: 10px; }
.ls-premise-body p { margin: 0 0 10px; }
.ls-premise-body b { color: var(--ink); }
.ls-subhead {
  font-size: 13.5px; font-weight: 700; margin: 20px 0 6px;
  padding-bottom: 6px; border-bottom: 1px solid var(--line);
}
.ls-subhead::before {
  content: ""; display: inline-block; width: 4px; height: 13px; border-radius: 2px;
  background: var(--accent);
  margin-right: 7px; vertical-align: -1px;
}
.ls-card > .ls-subhead:first-child, .ls-card > div > .ls-subhead:first-child { margin-top: 4px; }
.ls-field { display: flex; align-items: center; gap: 8px; font-size: 13px; margin: 10px 0 2px; }
.ls-field label { flex: 1; line-height: 1.4; font-weight: 600; font-size: 12.5px; color: var(--ink); }
.ls-lbl { font-weight: 600; font-size: 12.5px; color: var(--ink); margin-top: 12px; }
.ls-field input, .ls-persons input, .ls-knot input, .ls-child input {
  width: 92px; padding: 5px 9px; border: 1px solid #c6d0da; border-radius: 7px;
  font-size: 14px; font-weight: 700; text-align: right; background: #fff;
  color: var(--accent-dark);
  -moz-appearance: textfield; appearance: textfield; font-variant-numeric: tabular-nums;
}
.ls-field input:focus, .ls-persons input:focus, .ls-knot input:focus, .ls-child input:focus {
  outline: 2px solid rgba(37, 99, 235, .3); outline-offset: 1px; border-color: var(--accent);
}
.ls-unit { color: var(--muted); font-size: 11.5px; min-width: 34px; }
.ls-hint { font-size: 11px; color: #98a2ab; line-height: 1.6; margin: 3px 0 0; }
.ls-hint-warn { color: #b45309; }
.ls-notes { margin: 6px 0 0; padding-left: 1.3em; font-size: 11px; color: #98a2ab; line-height: 1.65; }
.ls-seg, .ls-preset { display: flex; flex-wrap: wrap; gap: 5px; margin: 6px 0; }
.ls-seg button, .ls-preset button, .ls-add {
  font-size: 12px; padding: 4px 10px; border-radius: 999px; cursor: pointer;
  border: 1px solid #cbd5e1; background: #fff; color: var(--muted);
}
.ls-preset button { font-size: 11px; padding: 3px 8px; }
.ls-seg button.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.ls-preset button.active { background: #eff6ff; border-color: var(--accent); color: var(--accent-dark); }
.ls-check { display: flex; align-items: center; gap: 7px; font-size: 12.5px; margin: 8px 0 2px; cursor: pointer; }
.ls-persons { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-top: 6px; }
.ls-persons th { font-weight: 400; font-size: 11px; color: var(--muted); text-align: center; padding: 0 0 3px; }
.ls-persons td { padding: 2px 3px 2px 0; }
.ls-persons td:first-child { white-space: nowrap; }
.ls-persons input { width: 100%; min-width: 56px; }
.ls-ro {
  display: block; padding: 5px 9px; border: 1px dashed #c6d0da; border-radius: 7px;
  background: #eef2f6; color: var(--muted); text-align: right; font-size: 13px;
  cursor: pointer;
}
.ls-ro:hover { border-color: var(--accent); color: var(--accent-dark); }
.ls-child { display: flex; align-items: center; gap: 6px; margin: 6px 0; font-size: 12.5px; }
.ls-child input { width: 48px; }
.ls-child select { flex: 1; padding: 4px 6px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 12px; }
.ls-x { border: none; background: none; color: var(--muted); font-size: 15px; cursor: pointer; padding: 0 4px; }
.ls-knots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin: 8px 0; }
.ls-knots[hidden] { display: none; }   /* display:grid が hidden 属性に勝つのを防ぐ */
.ls-knots[hidden] { display: none; }   /* display:grid が hidden 属性に勝つのを防ぐ */
.ls-knot { display: flex; align-items: center; gap: 4px; font-size: 10.5px; color: var(--muted); }
.ls-knot span { min-width: 26px; text-align: right; }
.ls-knot input { width: 100%; font-size: 12px; padding: 2px 5px; }
.ls-spark { position: relative; height: 120px; margin-top: 10px; }
.ls-fold summary { cursor: pointer; font-size: 13.5px; }
.ls-sub2 { font-size: 13px; color: var(--muted); font-weight: 600; }
.ls-headline { font-size: 27px; font-weight: 700; line-height: 1.3; margin-top: 4px; letter-spacing: -0.01em; }
.ls-headline2 { font-size: 22px; }
.ls-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 18px;
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line);
}
.ls-grid.ls-grid3 { grid-template-columns: repeat(3, 1fr); }
.ls-kv-cap { font-size: 12px; color: #46545f; font-weight: 600; }
.ls-kv-num { font-size: 21px; font-weight: 700; margin: 2px 0; font-variant-numeric: tabular-nums; }
.ls-metrics {
  display: flex; flex-wrap: wrap; gap: 4px 22px; font-size: 12px; color: var(--muted);
  margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line);
}
.ls-metrics b { color: var(--ink); font-variant-numeric: tabular-nums; }
.ls-warn {
  background: #fff7ed; border: 1px solid #fbbf24; border-radius: 6px;
  padding: 8px 10px; font-size: 11.5px; color: #92400e; margin-top: 8px; line-height: 1.65;
}
.ls-danger {
  background: #fef2f2; border: 1px solid #fca5a5; border-radius: 6px;
  padding: 9px 11px; font-size: 12.5px; color: #991b1b; margin-top: 12px; line-height: 1.7;
}
.ls-striphead { font-size: 13px; font-weight: 700; margin: 16px 0 8px; }
.ls-strip { display: flex; gap: 1px; height: 26px; }
.ls-strip div { flex: 1; border-radius: 1px; min-width: 2px; }
.ls-striplabels { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--muted); margin-top: 3px; }
.ls-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 11px; color: var(--muted); margin-top: 8px; }
.ls-legend i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; margin-right: 4px; vertical-align: -1px; }
.ls-chartwrap { position: relative; height: 320px; }
.ls-exits td:first-child, .ls-annual td { white-space: nowrap; }
.ls-annual { font-size: 11.5px; }
.ls-annual td, .ls-annual th { padding: 3px 7px; font-variant-numeric: tabular-nums; }
.ls-field input::-webkit-outer-spin-button, .ls-field input::-webkit-inner-spin-button {
  -webkit-appearance: none; margin: 0;
}
@media (max-width: 860px) {
  .ls-layout { flex-direction: column; }
  .ls-side { width: 100%; }
  .ls-main { width: 100%; }
  .ls-grid, .ls-grid.ls-grid3 { grid-template-columns: 1fr 1fr; }
  .ls-chartwrap { height: 260px; }
}

.sim-link { color: var(--accent); display: inline-flex; align-items: center; vertical-align: middle; }
.sim-link:hover { color: var(--accent-dark); }
.sim-ico { display: block; }

.ls-results { display: flex; flex-direction: column; gap: 16px; }
.ls-results[hidden] { display: none; }
.ls-run {
  display: inline-block; background: var(--accent); color: #fff; border: none;
  border-radius: 999px; padding: 11px 26px; font-size: 14.5px; font-weight: 700;
  cursor: pointer; box-shadow: var(--shadow); transition: background .12s, transform .12s;
}
.ls-run:hover { background: var(--accent-dark); transform: translateY(-1px); }
.ls-start { text-align: center; }

.ls-artlink { font-size: 12.5px; font-weight: 600; margin: 2px 0 8px; }

.badge-rented {
  font-size: 10.5px; color: #6b7280; background: #f3f4f6;
  border: 1px solid #d1d5db; border-radius: 4px; padding: 0 5px;
  margin-left: 4px; white-space: nowrap;
}

/* 住戸別の価格履歴(値下げの軌跡)。営業・買い手の指値根拠 */
.price-hist { font-size: 10.5px; color: var(--muted); white-space: normal; max-width: 250px;
              line-height: 1.5; margin-top: 1px; font-weight: 400; }
.ico-cell { white-space: nowrap; }
.ico-cell .sim-link + .sim-link { margin-left: 8px; }

/* 新着・価格更新の一覧: セル内改行を禁止(はみ出す場合は table-scroll の横スクロール)
   マンション名が1番長いのでそこだけ上限幅を設けて省略表示 */
.nowrap-table th, .nowrap-table td { white-space: nowrap; padding-left: 5px; padding-right: 5px; }
.nowrap-table td:first-child { max-width: 196px; overflow: hidden; text-overflow: ellipsis; }

/* 棟ページ→周辺マップの導線 */
.around-link { margin: 8px 0 0; font-size: 13.5px; }

/* 地図/空中写真の切替を小型化。スマホは leaflet-touch がコントロールを肥大化させるので上書き */
#towerMap .leaflet-control-layers { font-size: 11.5px; line-height: 1.55; }
#towerMap .leaflet-control-layers-expanded { padding: 4px 9px 4px 6px; }
#towerMap .leaflet-control-layers label { margin: 0; font-weight: 500; }
#towerMap .leaflet-control-layers input { width: 12px; height: 12px; margin: 1px 3px 0 0; }
#towerMap.leaflet-touch .leaflet-control-layers { border: 1px solid rgba(0,0,0,.25); border-radius: 6px; }

/* 数値の桁揃え(表の数字がガタつかない) */
table { font-variant-numeric: tabular-nums; }
