/* コーヒーの区画。色と字は aircon-electricity-cost・vegetable-storage・tools と同じ（2026-11-25 に aircon から写した） */
: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; }
.prose h2[id], .prose h3[id] { scroll-margin-top: 16px; }
.prose .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* 記事の頭の「このページのまとめ」 */
.point { margin: 0 0 8px; padding: 16px 20px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.point-title { margin: 0 0 6px !important; font-weight: 700; color: var(--accent); }
.point ul { margin: 0 !important; }
.prose tbody th { min-width: 6.5em; background: var(--paper-2); font-weight: 700; }
@media (max-width: 480px) {
  .prose table { font-size: 14px; }
  .prose th, .prose td { padding: 7px 8px; }
}
.prose th small, .prose td small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }

/* 図：1系列の棒。色は aircon の暖房と同じ #b5562c（dataviz の検査を通した色）。数字は文字でも出す */
.chart { margin: 24px 0 28px; padding: 16px 16px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.chart figcaption { margin: 0 0 12px; font-weight: 700; font-size: 15px; }
.hbars { margin: 0; padding: 0; list-style: none; }
.hbars li { display: grid; grid-template-columns: 9em 1fr 7.5em; align-items: center; gap: 10px; padding: 3px 0; font-size: 14px; line-height: 1.5; }
.hbars li:hover { background: var(--paper); }
.hb-name { overflow-wrap: normal; }
.hb-track { height: 14px; }
.hb-bar { display: block; height: 100%; min-width: 2px; border-radius: 0 4px 4px 0; background: var(--accent-2); }
.hb-val { text-align: right; font-family: var(--num); font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }
@media (max-width: 480px) {
  .hbars li { grid-template-columns: 6.5em 1fr 6.5em; gap: 6px; font-size: 13px; }
}
.vbars-wrap { position: relative; padding-top: 12px; }
.chart figcaption small { color: var(--muted); font-weight: 400; font-size: 12px; }
.vb-plot { position: relative; height: 180px; margin: 0 0 26px 3em; }
.vb-plot .vbars { position: relative; height: 100%; margin: 0; }
.vb-grid { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line); }
.vb-grid i { position: absolute; right: 100%; top: -.75em; padding-right: 6px; color: var(--muted); font-size: 12px; font-style: normal; font-family: var(--num); white-space: nowrap; }
.vbars { display: grid; grid-template-columns: repeat(var(--n), 1fr); align-items: end; gap: 2px; height: 180px; margin: 0 0 26px; padding: 0; list-style: none; border-bottom: 1px solid var(--muted); }
.vbars li { position: relative; height: 100%; display: flex; align-items: flex-end; }
.vbars li:hover .vb-bar { opacity: .75; }
.vb-bar { display: block; width: 100%; border-radius: 4px 4px 0 0; background: var(--accent-2); }
.vb-tick { position: absolute; top: calc(100% + 4px); left: 50%; transform: translateX(-50%); color: var(--muted); font-size: 12px; font-family: var(--num); white-space: nowrap; }
.prose td.num, .prose th.num { text-align: right; font-family: var(--num); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* 計算機（tools・aircon と同じ入力欄） */
.tool { margin: 20px 0; 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 { display: block; margin-bottom: 4px; font-size: 14px; font-weight: 700; }
.tool input[type=text] { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font: inherit; font-family: var(--num); font-size: 17px; }
.tool select { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font: inherit; font-size: 16px; }
.tool select:focus, .tool input: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 .hint { margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.calc-out { margin-top: 16px; padding: 14px 16px; border-radius: 10px; background: var(--paper-2); }
.calc-out p { margin: 0 !important; font-size: 15px; }
.calc-out p + p { margin-top: 6px !important; color: var(--muted); font-size: 14px; }
.calc-out b { color: var(--accent-2); font-family: var(--num); font-size: 22px; font-variant-numeric: tabular-nums; }
.calc-out p + p b { font-size: 16px; color: var(--ink); }

/* 地球儀（輸入のページ。aoitrip の Globe.astro の見た目を写した） */
.globe { position: relative; margin: 28px 0 8px; border-radius: 20px; overflow: hidden; background: radial-gradient(ellipse at 50% 45%, #1d1a2e 0%, #07070d 70%); box-shadow: 0 20px 50px rgba(7, 7, 13, .35); color: #fff; }
.globe-stage { position: relative; height: 540px; touch-action: pan-y; }
.globe-stage canvas { position: absolute; inset: 0; display: block; }
.globe-stage .globe-overlay { pointer-events: none; }
.globe-loading { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: rgba(255, 255, 255, .6); font-size: 14px; }
.globe-top { position: absolute; top: 0; left: 0; right: 0; padding: 18px 22px; pointer-events: none; }
.globe-title { margin: 0; font-family: var(--serif); font-size: 21px; text-shadow: 0 1px 8px rgba(0, 0, 0, .6); }
.globe-title span { color: #f3c48a; }
.globe-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 6px 0 0; color: rgba(255, 255, 255, .8); font-size: 12px; }
.globe-legend i { display: inline-block; margin-right: 6px; vertical-align: -1px; }
.globe-legend .dot { width: 10px; height: 10px; border: 1.5px solid #fff; border-radius: 50%; background: rgb(236, 170, 96); }
.globe-legend .band { width: 16px; height: 8px; border-top: 1.5px solid #eeab61; border-bottom: 1.5px solid #eeab61; background: rgba(107, 66, 26, .7); }
.globe-tools { position: absolute; right: 16px; bottom: 30px; display: flex; gap: 6px; }
.globe-tools button { padding: 7px 14px; border: 1px solid rgba(255, 255, 255, .35); border-radius: 999px; background: rgba(255, 255, 255, .1); color: #fff; font: 700 13px/1 var(--sans); cursor: pointer; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.globe-tools button:hover { background: rgba(255, 255, 255, .2); }
.globe-tools button[aria-pressed='true']#globe-belt { background: rgba(236, 170, 96, .85); border-color: transparent; color: #1d1206; }
.globe-hint { position: absolute; left: 22px; bottom: 34px; margin: 0; color: rgba(255, 255, 255, .55); font-size: 12px; pointer-events: none; }
.globe-credit { position: absolute; right: 16px; bottom: 8px; margin: 0; color: rgba(255, 255, 255, .4); font-size: 10px; }
.globe-card { position: absolute; top: 84px; right: 18px; width: 260px; padding: 16px 18px; border-radius: 14px; background: rgba(255, 255, 255, .97); color: var(--ink); box-shadow: 0 12px 30px rgba(0, 0, 0, .35); }
.globe-card[hidden] { display: none; }
.globe-card-close { position: absolute; top: 6px; right: 10px; border: 0; background: none; color: var(--muted); font-size: 20px; cursor: pointer; }
.globe-card p { margin: 0; }
.gc-rank { color: var(--muted); font-size: 12px; }
.gc-name { font-family: var(--serif); font-size: 22px; line-height: 1.35; }
.gc-amount { margin-top: 4px !important; font-size: 14px; }
.gc-amount b { color: var(--accent-2); font-family: var(--num); font-size: 22px; }
.gc-amount small { margin-left: 4px; color: var(--muted); font-size: 12px; }
.gc-price { color: var(--muted); font-size: 12px; }
.gc-five { margin-top: 8px; }
.gc-five div { display: grid; grid-template-columns: 3em 1fr 4.5em; align-items: center; gap: 6px; font-size: 12px; line-height: 1.7; }
.gc-five span { color: var(--muted); font-family: var(--num); }
.gc-five i { height: 7px; border-radius: 0 3px 3px 0; background: var(--accent-2); }
.gc-five b { text-align: right; font-family: var(--num); font-weight: 600; }
.gc-brands { margin-top: 8px !important; padding-top: 8px; border-top: 1px dashed var(--line); font-size: 12px; line-height: 1.7; }
.gc-brands:empty { display: none; }
/* 本文の段落の余白（.prose p）を地球儀の中では使わない */
.prose .globe p { margin: 0; }
.prose .globe .globe-legend { margin-top: 6px; }
/* 全画面（ボタンのときだけ） */
.globe.is-full { position: fixed; inset: 0; z-index: 1000; margin: 0; border-radius: 0; }
.globe.is-full .globe-stage { height: 100vh; height: 100dvh; }
html.globe-lock, html.globe-lock body { overflow: hidden; }
@media (max-width: 600px) {
  .globe { margin-left: -16px; margin-right: -16px; border-radius: 0; }
  .globe-stage { height: 460px; }
  .globe-top { padding: 14px 16px; }
  .globe-title { font-size: 18px; }
  .globe-card { top: auto; bottom: 74px; left: 12px; right: 12px; width: auto; }
  .globe-hint { display: none; }
}

/* トップ：テーマごとのカード */
.group { margin-top: 40px; }
.group h2 { margin: 0 0 14px; font-family: var(--serif); font-size: 22px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.cards a { display: block; height: 100%; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); text-decoration: none; }
.cards a:hover { border-color: var(--accent); }
.cards b { display: block; font-size: 17px; color: var(--accent); }
.cards span { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; line-height: 1.7; }

/* 記事の下：区画のページの一覧 */
.hub { margin-top: 56px; padding: 20px; border-radius: 14px; background: var(--paper-2); }
.hub h2 { margin: 0 0 8px; font-size: 17px; }
.hub h3 { margin: 14px 0 6px; color: var(--muted); font-size: 13px; }
.hub ul { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 0; list-style: none; font-size: 15px; }
.hub li[aria-current] { font-weight: 700; }

.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; }

/* シェア・トップへ戻る（furusato-nozei と同じ） */
/* シェアボタン（bichiku などの Astro の Share.astro と同じ見た目。アイコンは lib/share-icons.php の Font Awesome） */
.share { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin: 56px 0 0; font-size: 12px; font-weight: 700; letter-spacing: .12em; color: var(--ink); }
.share span { margin-right: 6px; }
.share a { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; color: #fff; text-decoration: none; box-shadow: 0 2px 2px rgba(0, 0, 0, .25); transition: box-shadow .2s, opacity .2s; }
.share a:hover { color: #fff; box-shadow: none; opacity: .9; }
.share .x { background: #111; }
.share .fb { background: #3b75d4; }
.share .line { background: #06c755; }
.share .wa { background: #4fce5d; }
.share .pin { background: #e60023; }
@media (max-width: 400px) { .share { gap: 6px; } .share span { margin-right: 2px; } .share a { width: 40px; height: 40px; } }
.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; } }
