/* エアコンの電気代くらべ。色と字は vegetable-storage・tools・furusato-nozei と同じ。入力欄は tools の「ツールの入力欄と結果」と同じ */
:root {
  --ink: #2b2a26;
  --muted: #6f6a5f;
  --paper: #fbf9f4;
  --paper-2: #f3efe5;
  --line: #e2dccd;
  --accent: #6b7f3a;
  --accent-2: #b5562c;
  --serif: 'Shippori Mincho B1', 'Hiragino Mincho ProN', serif;
  --sans: 'Zen Kaku Gothic New', 'Hiragino Sans', 'Yu Gothic', sans-serif;
  /* 数字・型番だけ欧文の Inter（等幅の数字がある）。日本語の字（円など）は Inter にないので Zen Kaku になる
     Zen Kaku Gothic New は等幅の数字（tnum）がなく、表の桁がそろわない（2026-11-14 に測った） */
  --num: 'Inter', 'Zen Kaku Gothic New', 'Hiragino Sans', sans-serif;
  --w: 720px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.9; overflow-wrap: anywhere; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-2); }

.container { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.wide { max-width: 960px; margin: 0 auto; padding: 0 16px; }
.narrow-in { max-width: var(--w); margin: 40px auto 0; }

/* ヘッダー・フッター */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); }
.bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; min-height: 56px; padding-top: 8px; padding-bottom: 8px; }
.logo, .section { white-space: nowrap; overflow-wrap: normal; }
.logo { font-family: var(--serif); font-weight: 700; font-size: 20px; letter-spacing: .08em; color: var(--ink); text-decoration: none; }
.section { padding-left: 14px; border-left: 1px solid var(--line); color: var(--accent); font-weight: 700; font-size: 14px; text-decoration: none; }
.site-footer { margin-top: 96px; padding: 40px 0 48px; background: var(--paper-2); border-top: 1px solid var(--line); }
.f-logo { margin: 0; font-family: var(--serif); font-weight: 700; font-size: 20px; }
.f-logo a { color: var(--ink); text-decoration: none; }
.f-copy { margin: 4px 0 20px; color: var(--muted); font-size: 14px; }
.f-links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0 0 24px; padding: 0; list-style: none; font-size: 14px; }
.f-small { margin: 0 0 6px; color: var(--muted); font-size: 12px; }

.breadcrumbs { margin: 20px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 13px; color: var(--muted); }
.breadcrumbs li + li::before { content: '›'; margin-right: 8px; }
.breadcrumbs a { color: inherit; }
.breadcrumbs-bottom { margin-top: 40px; }

.head { margin: 28px 0 20px; }
h1 { margin: 0; font-family: var(--serif); font-size: clamp(26px, 6vw, 34px); line-height: 1.4; }
.lead { margin: 10px 0 0; color: var(--muted); }

/* 本文 */
.prose h2 { margin: 64px 0 20px; padding-bottom: 10px; border-bottom: 2px solid var(--ink); font-family: var(--serif); font-size: 24px; line-height: 1.5; }
.prose p, .prose ul { margin: 0 0 1.2em; }
.prose ul { padding-left: 1.4em; }
.prose li + li { margin-top: 4px; }
.prose table { width: 100%; margin: 20px 0 28px; border-collapse: collapse; font-size: 15px; }
.prose th, .prose td { padding: 8px 10px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose thead th { background: var(--paper-2); }
.prose .num { text-align: right; font-variant-numeric: tabular-nums; }
.prose .source { color: var(--muted); font-size: 14px; }
.prose h3 { margin: 36px 0 12px; padding-left: 12px; border-left: 4px solid var(--accent); font-size: 18px; line-height: 1.5; }
.prose ol { margin: 0 0 1.2em; padding-left: 1.4em; }
.prose .formula { padding: 12px 14px; border-radius: 8px; background: var(--paper-2); font-size: 15px; }
.note-box { margin: 20px 0; padding: 14px 16px; border-left: 4px solid var(--accent-2); border-radius: 0 8px 8px 0; background: #fff4e5; font-size: 14px; }
.updated { margin-top: 32px; color: var(--muted); font-size: 13px; }

/* 入力欄（tools と同じ） */
.tool { padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.tool .fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px 12px; }
.tool .fields > * { min-width: 0; }
.tool label, .tool .label { display: block; margin-bottom: 4px; font-size: 14px; font-weight: 700; }
.tool input[type=text], .tool select { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font: inherit; font-size: 17px; }
.tool input:focus, .tool select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.tool .unit { display: flex; align-items: center; gap: 6px; }
.tool .unit span { flex: none; color: var(--muted); font-size: 14px; }
.tool .check { display: flex; align-items: center; gap: 8px; font-weight: 400; cursor: pointer; }
.tool .check input { width: 20px; height: 20px; accent-color: var(--accent); }
.tool .hint { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.checkcell { display: flex; align-items: flex-end; padding-bottom: 10px; }
.sortrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 16px; }
.sortrow .label { margin: 0; }
.tool .seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--accent); border-radius: 999px; overflow: hidden; }
.tool .seg label { position: relative; margin: 0; padding: 7px 14px; color: var(--accent); font-size: 14px; font-weight: 700; cursor: pointer; }
.tool .seg label + label { border-left: 1px solid var(--accent); }
.tool .seg input { position: absolute; opacity: 0; pointer-events: none; }
.tool .seg label:has(input:checked) { background: var(--accent); color: #fff; }
.tool .seg label:has(input:focus-visible) { outline: 2px solid var(--accent-2); outline-offset: -4px; }
.btn { padding: 8px 16px; border: 1px solid var(--accent); border-radius: 999px; background: #fff; color: var(--accent); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.btn:hover { background: var(--accent); color: #fff; }

/* 結果 */
.pr { margin: 18px 0 6px; color: var(--muted); font-size: 12px; }
#result[aria-busy=true] { opacity: .5; transition: opacity .2s; }
.result { margin-top: 12px; padding: 18px 20px; border-radius: 12px; background: var(--paper-2); }
.summary { margin: 0; font-size: 15px; line-height: 1.8; }
.summary b { color: var(--accent-2); font-size: 20px; font-variant-numeric: tabular-nums; }
.cold-note { margin: 10px 0 0; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 13px; line-height: 1.7; }
.table-wrap { margin-top: 12px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.list { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 14px; line-height: 1.6; }
.list th, .list td { padding: 9px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.list thead th { background: #fff; font-size: 13px; color: var(--muted); white-space: nowrap; }
.list .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.list .rank { width: 2.5em; color: var(--muted); }
.list .model { min-width: 15em; }
.list .mk { display: block; color: var(--muted); font-size: 12px; }
.list .md { font-weight: 700; }
.list .nm { display: block; color: var(--muted); font-size: 12px; }
.list .tag { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 4px; background: #e8eef7; color: #2f5596; font-size: 12px; font-weight: 700; vertical-align: 1px; }
.list .others { color: var(--muted); font-size: 12px; }
.list .others summary { cursor: pointer; color: var(--accent); }
.list .diff { display: block; color: var(--accent-2); font-size: 12px; }
.list .best { display: block; color: var(--accent); font-size: 12px; }
.list .price small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.list .none { color: var(--muted); font-size: 12px; }
.list .amz { white-space: nowrap; }
.list .amz .shop { display: flex; width: 100%; max-width: 92px; justify-content: center; }
.list .amz .shop + .shop { margin-top: 6px; }
.jump { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.jump-bottom { margin-top: 14px; text-align: right; }
.prose h2[id] { scroll-margin-top: 16px; }
.list .spec { display: block; color: var(--muted); font-size: 12px; }

/* 数字と型番は欧文の Inter（等幅の数字）。日本語の部分は Zen Kaku のまま */
.list .num, .list .md, .card .md, .card .yr b, .summary b, .n, .shop b,
.list.sum td, .prose td.num { font-family: var(--num); font-feature-settings: 'tnum' 1, 'cv11' 1; }
.list .md, .card .md { letter-spacing: .01em; }
.list .num b.n { font-weight: 600; }

/* 店へのリンク：下線の文字ではなく小さなボタン */
.shop { display: inline-flex; align-items: center; gap: 2px; padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); font-size: 13px; font-weight: 700; line-height: 1.4; text-decoration: none; white-space: nowrap; }
.shop:hover { border-color: var(--accent); color: var(--accent); }
.shop-r { border-color: #e7c9bd; background: #fff8f5; }
.shop-r b { font-weight: 700; }
.list .price .shop { margin-left: auto; }

/* 電気代の棒は、下の「冷房・暖房の内訳の棒」（.split）。クラス名 .bar はヘッダーで使っているので使わない */

/* スマホ：表をカードの形にする（横にスクロールせずに値段まで見える） */
@media (max-width: 600px) {
  .table-wrap { overflow: visible; }
  .list { min-width: 0; }
  .list thead { display: none; }
  .list, .list tbody { display: block; }
  .list tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .list td { display: block; padding: 0; border: 0; }
  .list td.rank { display: none; }
  .list td.model { grid-column: 1 / -1; min-width: 0; }
  .list td.num { text-align: left; white-space: normal; }
  .list td[data-label]::before { content: attr(data-label); display: block; color: var(--muted); font-family: var(--sans); font-size: 12px; font-weight: 700; }
  .list td.amz { align-self: end; }
  .list .amz .shop { display: inline-flex; width: auto; max-width: none; }
  .list .amz .shop + .shop { margin: 0 0 0 6px; }
  .list .price .shop { margin-left: 0; }
}

.more-row { margin: 16px 0 0; text-align: center; }

/* 入力欄の2段：畳数・地域を先に、くわしい条件はたたむ */
.main-fields { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; max-width: 560px; }
.tool .main-fields select { font-size: 18px; font-weight: 700; }
.coldrow { margin-top: 12px; }
.more-opts { margin-top: 14px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.more-opts summary { cursor: pointer; color: var(--accent); font-size: 14px; font-weight: 700; }
.more-opts[open] summary { margin-bottom: 12px; }

/* 答えのカード（上位3機種） */
.answer { margin-top: 18px; }
.answer h3 { margin: 0 0 10px; font-size: 16px; line-height: 1.6; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.card { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 14px 16px 14px 46px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.card .no { position: absolute; left: 14px; top: 14px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; }
.card .mk, .card .nm { color: var(--muted); font-size: 12px; }
.card .md { font-weight: 700; }
.card .tag { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 4px; background: #e8eef7; color: #2f5596; font-family: var(--sans); font-size: 12px; font-weight: 700; vertical-align: 1px; letter-spacing: 0; }
.card .yr { margin-top: 6px; font-size: 14px; }
.card .yr b { color: var(--accent-2); font-size: 22px; font-variant-numeric: tabular-nums; }
.card .save { color: var(--accent); font-size: 12px; font-weight: 700; }
.card .buy { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.card .kind { margin-top: 4px; color: var(--muted); font-size: 12px; }
.list-title { margin: 24px 0 0; font-size: 15px; }

/* 地域・畳数のページ */
.kicker { display: inline-block; margin: 0 0 10px; padding: 0 10px; border-radius: 4px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; line-height: 1.9; }
.by-cap { margin-top: 40px; }
.by-cap h2, .hub h2 { margin: 0 0 8px; font-family: var(--serif); font-size: 22px; line-height: 1.5; }
.by-cap .note { margin: 0 0 4px; color: var(--muted); font-size: 13px; }
.list.sum { min-width: 640px; }
.list.sum th small { font-weight: 400; }
.list .go { white-space: nowrap; font-size: 13px; text-align: right; }
.hub { margin-top: 48px; padding: 20px; border-radius: 14px; background: var(--paper-2); }
.hub h2 { font-size: 17px; }
.hub h2 + .chips { margin-bottom: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chips a { display: inline-block; padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); font-size: 14px; text-decoration: none; }
.chips a:hover { border-color: var(--accent); color: var(--accent); }
@media (max-width: 600px) {
  .list.sum { min-width: 0; }
  .list.sum tr { grid-template-columns: 1fr 1fr 1fr; }
  .list.sum td.go { grid-column: 1 / -1; text-align: left; }
}

/* シェア・トップへ戻る（furusato-nozei と同じ） */
.share { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 56px 0 0; font-size: 12px; font-weight: 700; color: var(--muted); }
.share a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: #fff; font-size: 13px; font-weight: 700; text-decoration: none; }
.share .x { background: #111; }
.share .fb { background: #1877f2; font-size: 18px; }
.share .line { background: #06c755; font-size: 10px; }
.share .pin { background: #e60023; font-size: 17px; font-family: Georgia, serif; }
.to-top { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 900; display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%; background: var(--accent); color: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .2); cursor: pointer; opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .25s, transform .25s, visibility .25s, box-shadow .2s; }
.to-top.show { opacity: .9; visibility: visible; transform: none; }
.to-top:hover { opacity: 1; }
@media (max-width: 600px) { .to-top { width: 42px; height: 42px; } }
@media (prefers-reduced-motion: reduce) { .to-top { transition: none; } }

/* ---- 2026-11-14 の見直し：まとめのタイル・冷房と暖房の内訳・値段と電気代の図 ---- */
:root { --cool: #3b7bbf; --heat: #b5562c; }
.pr-bottom { margin-top: 16px; }

/* まとめ：少ない・真ん中・多いの3つの数字 */
.cond { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; margin: 0 0 10px; font-weight: 700; line-height: 1.6; }
.cond span { color: var(--muted); font-size: 13px; font-weight: 400; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 8px; margin: 0; }
.tile { min-width: 0; padding: 10px 14px 8px; border-radius: 10px; background: #fff; }
.tile dt { color: var(--muted); font-size: 12px; font-weight: 700; line-height: 1.5; }
.tile dd { margin: 0; font-size: 13px; line-height: 1.5; white-space: nowrap; }
.tile dd b { font-family: var(--num); font-size: clamp(18px, 5.2vw, 26px); font-weight: 600; letter-spacing: -.01em; }
.tile.lo dd b { color: var(--accent-2); }
.summary { margin-top: 12px; font-size: 13px; color: var(--muted); }
.summary b { color: var(--ink); font-size: inherit; }
/* スマホ：タイルは横に3つ並ばないので、1行ずつ（左に名前、右に数字） */
@media (max-width: 480px) {
  .tiles { grid-template-columns: 1fr; gap: 6px; }
  .tile { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 6px 14px; }
  .tile dd b { font-size: 22px; }
}

/* 冷房・暖房の内訳の棒（細い棒。色だけにせず、数字を必ず文字で添える） */
.split { display: flex; gap: 2px; height: 6px; }
.split i { flex: 1 1 0; min-width: 2px; border-radius: 3px; }
.split .c, .sw.c { background: var(--cool); }
.split .h, .sw.h { background: var(--heat); }
.mix { margin-top: 14px; }
.mix .split { width: 100%; height: 8px; }
.mix .split i { border-radius: 4px; }
.mix-label { margin: 0 0 4px; color: var(--muted); font-size: 12px; font-weight: 700; }
.mix-legend { display: flex; flex-wrap: wrap; gap: 2px 18px; margin: 6px 0 0; font-size: 13px; line-height: 1.6; }
.mix-note { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.mix-gap { margin: 10px 0 0; padding: 10px 14px; border-radius: 8px; background: #fff; font-size: 13px; line-height: 1.8; }
.sw { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 3px; }
.tool > .result { margin: 0 0 4px; }
.tool > .result .mix { margin-top: 0; }

/* 答えのカード：値段＋電気代の順のときの内訳 */
.card .parts { color: var(--muted); font-size: 12px; line-height: 1.6; }
.card .yr b { font-variant-numeric: normal; }
.list.by-total td.total .n { font-weight: 600; }

/* 値段と電気代の図 */
.scatter { margin-top: 28px; }
.scatter h3 { margin: 0; font-size: 16px; line-height: 1.6; }
.sc-lead { margin: 2px 0 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.sc-wrap { margin-top: 10px; padding: 0 14px 0 44px; }
.sc-ytitle, .sc-xtitle { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.sc-ytitle { margin-left: -44px; }
.sc-xtitle { margin-top: 26px; text-align: right; }
.sc-plot { position: relative; height: 300px; margin-top: 10px; }
.sc-plot .gy { position: absolute; left: 0; right: 0; height: 0; border-top: 1px solid var(--line); }
.sc-plot .gx { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1px solid var(--line); }
.sc-plot em { position: absolute; white-space: nowrap; overflow-wrap: normal; color: var(--muted); font-family: var(--num); font-size: 12px; font-style: normal; line-height: 1; font-feature-settings: 'tnum' 1; }
.sc-plot .gy em { right: 100%; margin-right: 8px; transform: translateY(-50%); }
.sc-plot .gx em { top: 100%; margin-top: 8px; transform: translateX(-50%); }
.iso { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.iso line { stroke: #8c8674; stroke-width: 1.5; }
.dot { position: absolute; width: 14px; height: 14px; margin: 0 0 -7px -7px; border: 2px solid #fff; border-radius: 50%; background: #9a927f; cursor: pointer; }
.dot::after { content: ''; position: absolute; inset: -7px; border-radius: 50%; }
.dot:hover, .dot.on { background: var(--ink); z-index: 3; }
.dot.inst { border: 3px solid #9a927f; background: #fff; }
.dot.hi { background: var(--accent-2); z-index: 2; }
.dot.hi.inst { border-color: var(--accent-2); background: #fff; }
.dot b { position: absolute; left: 100%; top: 50%; transform: translate(3px, -50%); color: var(--ink); font-family: var(--num); font-size: 13px; line-height: 1; text-shadow: 0 0 2px #fff, 0 0 2px #fff, 0 0 3px #fff; pointer-events: none; }
.sc-legend { display: flex; flex-direction: column; gap: 2px; margin: 12px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 12px; line-height: 1.7; }
.sc-legend li { display: flex; align-items: baseline; gap: 8px; }
.sc-legend .dot { position: static; flex: none; width: 12px; height: 12px; margin: 0; cursor: default; transform: translateY(1px); }
.sc-legend .dot::after { content: none; }
.sc-legend .ln { flex: none; width: 18px; height: 0; border-top: 1.5px solid #8c8674; transform: translateY(-4px); }
.sc-note { margin: 12px 0 0; padding: 12px 14px; border-radius: 10px; background: var(--paper-2); font-size: 14px; line-height: 1.8; }
.sc-tip { position: fixed; z-index: 950; max-width: min(300px, calc(100vw - 16px)); padding: 8px 12px; border-radius: 8px; background: var(--ink); color: #fff; font-size: 12px; line-height: 1.6; pointer-events: none; box-shadow: 0 2px 10px rgba(0, 0, 0, .2); }
.sc-tip b { display: block; font-size: 13px; }
.load-error { margin: 12px 0 0; padding: 10px 14px; border-radius: 8px; background: #fff4e5; font-size: 14px; }
@media (max-width: 600px) {
  .sc-plot { height: 250px; }
  .sc-wrap { padding: 0 10px 0 38px; }
  .sc-ytitle { margin-left: -38px; }
}

/* 答えのカードの写真（楽天の出品の写真。右上に小さく） */
.card .photo { position: absolute; right: 12px; top: 12px; display: block; width: 72px; height: 72px; border: 1px solid var(--line); border-radius: 8px; background: #fff; overflow: hidden; }
.card .photo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.card:has(.photo) .mk, .card:has(.photo) .md, .card:has(.photo) .nm { padding-right: 82px; }
.card:has(.photo) { min-height: 100px; }
