/* === Base / Layout === */
:root {
  --primary: #0C8698;
  --primary-light: #e4f4f7;
  --primary-dark: #0a6e7d;
  --accent: #D30F25;
  --accent-light: #fde8ea;
  --cta-yellow: #E6FF4F;
  --text: #333333;
  --text-light: #777777;
  --bg: #ffffff;
  --bg-gray: #f5f4f4;
  --border: #e0dede;
  --shadow: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 12px rgba(0,0,0,0.1);
  --radius: 12px;
}
* { margin:0; padding:0; box-sizing:border-box; }
html, body, body.hpseo-page {
  font-family: "Noto Sans JP", "ヒラギノ角ゴ Pro W3", "Yu Gothic Medium", "游ゴシック Medium", YuGothic, 游ゴシック体, メイリオ, sans-serif;
  color: var(--text);
  background: var(--bg-gray);
  line-height: 1.8;
  font-size: 15px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
body.hpseo-page h1, .hpseo-page .prefsub-hero h1, .hpseo-page .hero h1 { font-weight: 900; }
body.hpseo-page h2, body.hpseo-page h3, body.hpseo-page h4 { font-weight: 700; }
body.hpseo-page p, body.hpseo-page li, body.hpseo-page td, body.hpseo-page th { font-weight: 400; }

/* === SWELLマーカー互換 + 太字化 === */
.marker-yellow, .marker_yellow,
span.marker-yellow, span.marker_yellow {
  background: linear-gradient(transparent 60%, #fff59d 60%);
  font-weight: 700 !important;
  padding: 0 2px;
}
.marker-blue, .marker_blue,
span.marker-blue, span.marker_blue {
  background: linear-gradient(transparent 60%, #bbdefb 60%);
  font-weight: 700 !important;
  padding: 0 2px;
}
.marker-pink, .marker_pink, .marker-red, .marker_red,
span.marker-pink, span.marker_pink, span.marker-red, span.marker_red {
  background: linear-gradient(transparent 60%, #ffcdd2 60%);
  font-weight: 700 !important;
  padding: 0 2px;
}
/* SWELL bold-marker combo */
.bold-marker, strong .marker-yellow, .marker-yellow strong {
  font-weight: 700 !important;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; }
.container { max-width: 800px; margin: 0 auto; padding: 0 20px; }
.breadcrumb { padding: 12px 0; font-size: 14px; color: var(--text-light); }
.breadcrumb ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; align-items: center; }
.breadcrumb li { display: flex; align-items: center; }
.breadcrumb li + li::before { content: ">"; margin: 0 6px; color: var(--text-light); }
.breadcrumb a { color: var(--primary); text-decoration: none; }
.hero { background: linear-gradient(135deg, var(--primary) 0%, #47A79D 100%); color: white; padding: 40px 0; margin-bottom: 32px; }
.hero h1 { font-size: 28px; font-weight: 700; line-height: 1.4; margin-bottom: 8px; }
.hero .update-date { font-size: 14px; opacity: 0.85; }
.section { background: white; border-radius: var(--radius); box-shadow: var(--shadow); padding: 32px 28px; margin-bottom: 24px; }
.section h2 { font-size: 24px; font-weight: 700; color: var(--primary-dark); margin-bottom: 20px; padding-bottom: 12px; border-bottom: 3px solid var(--primary); }
.section h3 { font-size: 20px; font-weight: 600; margin: 24px 0 12px; color: var(--text); }
.section p { margin-bottom: 16px; }

/* === Summary Cards === */
.summary-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 20px 0; }
@media (max-width: 600px) { .summary-cards { grid-template-columns: 1fr; } }
.summary-card { border: 2px solid var(--primary); border-radius: var(--radius); overflow: hidden; }
.summary-card .card-header { background: var(--primary) !important; color: #fff !important; padding: 12px 16px; font-weight: 600; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.summary-card .card-body { padding: 16px; }
.summary-card .total-amount { font-size: 32px; font-weight: 800; color: var(--primary); margin: 8px 0; }
.summary-card .total-amount small { font-size: 16px; font-weight: 400; }
.breakdown-table { width: 100%; font-size: 15px; margin-top: 12px; }
.breakdown-table td { padding: 4px 0; }
.breakdown-table td:last-child { text-align: right; font-weight: 600; }

.card-header h3 { margin: 0 !important; padding: 0 !important; font-size: 16px !important; color: #fff !important; border: none !important; background: none !important; }

/* === Battery Compare === */
.battery-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; text-align: center; margin-top: 8px; }
.battery-compare .col-header { font-size: 14px; font-weight: 600; color: var(--text-light); padding-bottom: 4px; border-bottom: 1px solid var(--border); }
.battery-compare .col-amount { font-size: 24px; font-weight: 800; color: var(--primary); padding: 8px 0; }
.battery-compare .col-amount small { font-size: 14px; font-weight: 400; }

/* === Detail Table === */
.detail-table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 15px; }
.detail-table th { background: var(--primary-light); padding: 10px 12px; text-align: left; font-weight: 600; white-space: nowrap; width: 30%; border: 1px solid var(--border); }
.detail-table td { padding: 10px 12px; border: 1px solid var(--border); }
.detail-table .highlight-row td { background: var(--accent-light); font-weight: 600; }

/* === Steps === */
.steps { counter-reset: step; list-style: none; margin: 20px 0; }
.steps li { counter-increment: step; position: relative; padding: 12px 0 12px 48px; border-bottom: 1px solid var(--border); font-size: 16px; }
.steps li:last-child { border-bottom: none; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 12px; width: 32px; height: 32px; background: var(--primary); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.steps li strong { color: var(--primary-dark); }

/* === Reference Tiles === */
.ref-tile-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 4px; }
.ref-tile-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 4px; }
.ref-tile-4 > div, .ref-tile-3 > div { background: #fff; border: 1px solid #e5e7eb; border-radius: 6px; padding: 8px 10px; text-align: center; }
@media (max-width: 600px) { .ref-tile-4 { grid-template-columns: 1fr 1fr; } .ref-tile-3 { grid-template-columns: 1fr; } }

/* === Condition Grid (label + description) === */
.condition-grid { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; margin-bottom: 6px; }
@media (max-width: 600px) { .condition-grid { grid-template-columns: 1fr; } .condition-grid > span:nth-child(odd) { font-weight: 600; margin-top: 4px; } }

/* === Comparison Grid (e.g. 電気代の値上げ) === */
.compare-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
@media (max-width: 600px) { .compare-grid-2 { grid-template-columns: 1fr; } }

/* === CTA Section === */
.cta-section { background: linear-gradient(160deg, #e4f4f7 0%, #eef9f5 50%, #f0faf7 100%); border: 4px solid var(--primary); color: var(--text); padding: 32px 28px; border-radius: var(--radius); margin-bottom: 24px; box-shadow: var(--shadow-lg); text-align: center; }
.cta-section h2 { color: var(--primary-dark); border-bottom-color: var(--primary); font-size: 24px; margin-bottom: 24px; }
.cta-section p { margin-bottom: 16px; font-size: 16px; }
.cta-btn { display: block; max-width: 480px; margin: 16px auto 0; padding: 16px 32px; background: var(--accent); color: #ffffff; border: none; border-radius: 8px; font-size: 18px; font-weight: 800; cursor: pointer; text-align: center; text-decoration: none; transition: transform 0.2s, box-shadow 0.2s; }
.cta-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.2); color: #fff; text-decoration: none; }
.cta-sub-btn { display: block; max-width: 480px; margin: 8px auto 0; padding: 12px 32px; background: transparent; color: var(--primary); border: 2px solid var(--primary); border-radius: 8px; font-size: 16px; font-weight: 600; cursor: pointer; text-align: center; text-decoration: none; transition: background 0.2s; }
.cta-sub-btn:hover { background: var(--primary-light); }
.article-footer { text-align: center; padding: 24px; font-size: 13px; color: var(--text-light); }

/* === Simulation Components === */
.sim-box { background: var(--bg-gray); border: 2px solid var(--border); border-radius: var(--radius); padding: 24px; margin: 20px 0; }
.sim-box h4 { font-size: 16px; margin-bottom: 16px; color: var(--primary-dark); }
.recovery-table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 15px; }
.recovery-table th { background: var(--primary); color: white; padding: 10px 12px; text-align: center; font-weight: 600; border: 1px solid var(--primary-dark); }
.recovery-table td { padding: 10px 12px; text-align: center; border: 1px solid var(--border); }
.recovery-table tbody tr:nth-child(even) { background: var(--bg-gray); }
.recovery-table .highlight { color: var(--primary); font-weight: 700; }
.ba-cards { display: grid; gap: 12px; margin: 16px 0; }
.ba-card { border: 2px solid var(--border); border-radius: var(--radius); padding: 16px; position: relative; }
.ba-card.best { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.ba-card .ba-badge { position: absolute; top: -10px; right: 16px; background: var(--accent); color: white; font-size: 11px; font-weight: 700; padding: 2px 10px; border-radius: 10px; }
.ba-card .ba-title { font-weight: 700; font-size: 15px; margin-bottom: 8px; color: var(--text-light); }
.ba-card .ba-amount { font-size: 15px; }
.ba-card .ba-amount .old { text-decoration: line-through; color: var(--text-light); }
.ba-card .ba-amount .arrow { color: var(--primary); font-weight: 700; margin: 0 4px; }
.ba-card .ba-amount .new { font-size: 22px; font-weight: 800; color: var(--primary); }
.ba-card .ba-savings { font-size: 15px; color: var(--accent); font-weight: 600; }
.ba-card .ba-sell { font-size: 14px; color: var(--text-light); margin-top: 4px; }
.ba-card .ba-net { margin-top: 10px; padding-top: 10px; border-top: 2px dashed var(--primary); font-size: 15px; font-weight: 600; color: var(--text); }
.ten-year-table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 16px 0; }
.ten-year-table th { background: var(--primary); color: white; padding: 8px 6px; text-align: center; font-size: 12px; border: 1px solid var(--primary-dark); }
.ten-year-table td { padding: 6px; text-align: right; border: 1px solid var(--border); font-size: 12px; }
.ten-year-table td:first-child { text-align: center; font-weight: 600; }
.ten-year-table tbody tr:nth-child(even) { background: var(--bg-gray); }
.ten-year-table tfoot td { font-weight: 700; background: var(--primary-light); border-top: 2px solid var(--primary); }
.coverage-box { background: var(--primary-light); border-radius: 8px; padding: 16px; text-align: center; margin: 16px 0; font-size: 16px; }
.coverage-box .pct { font-size: 28px; font-weight: 800; color: var(--primary); }
.cta-compare-table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 15px; border-radius: 10px; overflow: hidden; }
.cta-compare-table th { padding: 12px 14px; text-align: center; font-weight: 700; font-size: 15px; border: none; }
.cta-compare-table th:first-child { text-align: left; background: transparent; }
.cta-compare-table th.col-buy { background: var(--bg-gray); color: var(--text); }
.cta-compare-table th.col-zero { background: var(--primary); color: #ffffff; }
.cta-compare-table td { padding: 12px 14px; text-align: center; border: none; }
.cta-compare-table td:first-child { text-align: left; font-weight: 600; }
.cta-compare-table tbody tr:nth-child(odd) { background: white; }
.cta-compare-table tbody tr:nth-child(even) { background: var(--bg-gray); }
.note { font-size: 14px; color: var(--text-light); margin-top: 16px; padding-left: 16px; border-left: 3px solid var(--border); }
.tab-group { display: flex; gap: 4px; margin-bottom: 0; }
.tab-btn { padding: 8px 16px; border: 1px solid var(--border); border-bottom: none; border-radius: 8px 8px 0 0; background: var(--bg-gray); cursor: pointer; font-size: 14px; font-weight: 600; color: var(--text-light); }
.tab-btn.active { background: white; color: var(--primary); border-color: var(--primary); }
.tab-content { display: none; border: 1px solid var(--border); border-radius: 0 8px 8px 8px; padding: 12px; }
.tab-content.active { display: block; }
.data-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 20px 0; }
@media (max-width: 600px) { .data-grid { grid-template-columns: 1fr; } }
.data-card { background: var(--bg-gray); border-radius: 8px; padding: 16px; text-align: center; }
.data-card .data-label { font-size: 14px; color: var(--text-light); margin-bottom: 4px; }
.data-card .data-value { font-size: 24px; font-weight: 800; color: var(--primary); }
.data-card .data-value small { font-size: 14px; font-weight: 400; }
.data-card .data-note { font-size: 13px; color: var(--text-light); margin-top: 4px; }
.monthly-chart { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; align-items: end; height: 160px; margin: 20px 0 8px; padding: 0 4px; }
@media (max-width: 600px) { .monthly-chart { gap: 2px; } }
.month-col { display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; }
.month-bar-wrap { width: 100%; flex: 1; display: flex; align-items: flex-end; justify-content: center; }
.month-bar { width: 70%; background: linear-gradient(180deg, var(--accent) 0%, #fbbf24 100%); border-radius: 4px 4px 0 0; min-height: 4px; transition: height 0.5s ease; }
.month-val { font-size: 11px; font-weight: 600; color: var(--text-light); margin-bottom: 2px; }
.month-label { font-size: 12px; color: var(--text-light); margin-top: 4px; }
.neighbor-table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 16px 0; }
.neighbor-table th { background: var(--primary); color: white; padding: 10px 8px; text-align: center; font-size: 12px; font-weight: 600; border: 1px solid var(--primary-dark); }
.neighbor-table td { padding: 10px 8px; text-align: center; border: 1px solid var(--border); font-size: 13px; vertical-align: top; }
.neighbor-table tbody tr:first-child { background: var(--primary-light); font-weight: 600; }
.neighbor-table tbody tr:nth-child(even) { background: var(--bg-gray); }
.neighbor-table td:first-child { font-weight: 600; white-space: nowrap; }
.neighbor-table a { color: var(--primary); text-decoration: none; font-weight: 600; }
.neighbor-table a:hover { text-decoration: underline; }
.faq-list { margin: 16px 0; }
.faq-item { border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px; overflow: hidden; }
.faq-q { padding: 14px 16px; font-weight: 600; font-size: 16px; cursor: pointer; display: flex; align-items: flex-start; gap: 8px; background: white; transition: background 0.2s; user-select: none; }
.faq-q:hover { background: var(--bg-gray); }
.faq-q .q-icon { flex-shrink: 0; width: 24px; height: 24px; background: var(--primary); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; }
.faq-q .toggle { margin-left: auto; flex-shrink: 0; font-size: 18px; color: var(--text-light); transition: transform 0.3s; }
.faq-item.open .faq-q .toggle { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.faq-item.open .faq-a { max-height: 500px; }
.faq-a-inner { padding: 0 16px 16px 48px; font-size: 15px; line-height: 1.8; color: var(--text); }
.disaster-box { background: #fef2f2; border: 1px solid #fecaca; border-radius: 8px; padding: 16px 20px; margin: 16px 0; font-size: 15px; }
.disaster-box .icon-title { font-weight: 700; font-size: 16px; margin-bottom: 8px; color: #991b1b; }
.household-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 20px 0; }
@media (max-width: 600px) { .household-grid { grid-template-columns: 1fr; } }
.slider-controls { background: var(--bg-gray); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin: 20px 0; }
.slider-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 600px) { .slider-row { grid-template-columns: 1fr; } }
.slider-item { display: flex; flex-direction: column; gap: 4px; }
.slider-label { font-size: 13px; color: var(--text-light); font-weight: 500; }
.slider-val { font-size: 18px; font-weight: 800; color: var(--primary-dark); }
.slider-item input[type="range"] { width: 100%; height: 6px; -webkit-appearance: none; appearance: none; background: var(--border); border-radius: 3px; outline: none; margin: 4px 0; }
.slider-item input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--primary); cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,0.2); }
.slider-item input[type="range"]::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--primary); cursor: pointer; border: none; }
.slider-range-labels { display: flex; justify-content: space-between; font-size: 10px; color: var(--text-light); }
.kpi-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 16px 0; }
@media (max-width: 600px) { .kpi-cards { grid-template-columns: 1fr 1fr; } }
.kpi-card { background: var(--bg-gray); border-radius: 8px; padding: 14px 12px; }
.kpi-card-hl { background: var(--primary-light); }
.kpi-label { font-size: 12px; color: var(--text-light); margin-bottom: 4px; }
.kpi-card-hl .kpi-label { color: var(--primary-dark); }
.kpi-val { font-size: 20px; font-weight: 800; }
.kpi-val small { font-size: 12px; font-weight: 500; color: var(--text-light); }
.kpi-val-green { color: var(--primary); }
.chart-wrap { height: 300px; margin: 16px 0; }
.toggle-switch input:checked + .toggle-slider { background: var(--primary-dark); box-shadow: 0 0 0 2px var(--primary), 0 2px 4px rgba(0,0,0,0.15); }
.toggle-slider:before { content:""; position:absolute; height:20px; width:20px; left:3px; bottom:3px; background:white; border-radius:50%; transition:.3s; }
.toggle-switch input:checked + .toggle-slider:before { transform: translateX(22px); }
.usage-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0 16px; }
@media (max-width: 600px) { .usage-options { grid-template-columns: 1fr; } }
.usage-opt { background: white; border: 2px solid var(--border); border-radius: 8px; padding: 10px 12px; cursor: pointer; transition: all 0.15s; text-align: center; }
.usage-opt:hover { border-color: var(--primary); background: var(--primary-light); }
.usage-opt.selected { border-color: var(--primary); background: var(--primary-light); }
.usage-opt:hover .usage-opt-desc { color: var(--text); }
.usage-opt.selected .usage-opt-desc { color: var(--text); }
.usage-opt-title { font-size: 14px; font-weight: 600; }
.usage-opt-desc { font-size: 11px; color: var(--text-light); margin-top: 2px; }
.trust-badges { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 20px; }
.trust-badges span { background: var(--primary-light); border: 1px solid var(--primary); border-radius: 10px; padding: 10px 14px; font-size: 14px; font-weight: 600; color: var(--primary-dark); text-align: center; }
@media (max-width: 600px) { .trust-badges { grid-template-columns: 1fr; } }
.inherited-badge { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; background: var(--primary-light); border: 1px solid var(--primary); border-radius: 8px; font-size: 14px; color: var(--primary-dark); font-weight: 600; margin-bottom: 12px; }
.inherited-badge .sync-icon { font-size: 16px; }
.sim-details { margin: 16px 0; }
.sim-details summary { cursor: pointer; font-size: 15px; font-weight: 600; color: var(--primary); padding: 10px 0; border-bottom: 1px solid var(--border); list-style: none; display: flex; align-items: center; gap: 6px; }
.sim-details summary::-webkit-details-marker { display: none; }
.sim-details summary::before { content: '▼'; font-size: 10px; color: var(--text-light); transition: transform 0.2s; }
.sim-details[open] summary::before { transform: rotate(180deg); }
.sim-details[open] summary { border-bottom: none; }

.breakdown-list { margin-top: 12px; }
/* Subsidy status badges */
.subsidy-badge {
  display: inline-block; font-size: 10px; font-weight: 700; padding: 2px 8px;
  border-radius: 10px; line-height: 1.4; vertical-align: middle;
}
.breakdown-item > .subsidy-badge {
  display: block; width: fit-content; margin-bottom: 4px;
}
.badge-active  { background: #e8f5e9; color: #2e7d32; }
.badge-low     { background: #fff3e0; color: #e65100; }
.badge-ended   { background: #fce4ec; color: #c62828; }
.badge-none    { background: #f5f5f5; color: #888; }
.badge-unknown { background: #f5f5f5; color: #888; }

.breakdown-item { padding: 10px 0; border-bottom: 1px solid var(--border); }
.breakdown-item:last-child { border-bottom: none; }
.breakdown-label { display: block; font-size: 13px; color: var(--text-light); font-weight: 500; margin-bottom: 2px; }
.breakdown-amount { display: block; font-size: 17px; font-weight: 700; color: var(--text); }
.breakdown-cap { display: block; font-size: 13px; color: var(--text-light); margin-top: 1px; }
.breakdown-condition { display: block; font-size: 11px; color: #b8860b; background: #fffbe6; padding: 3px 8px; border-radius: 4px; margin-top: 4px; line-height: 1.4; }
.solar-set-item { background: #f0faf8; border-radius: 6px; padding: 10px 12px; margin-top: 6px; border: 1px dashed #47a79d; }
.set-badge { display: inline-block; font-size: 10px; background: #0c8698; color: #fff; padding: 1px 6px; border-radius: 3px; margin-left: 6px; vertical-align: middle; font-weight: 600; }
.set-note { font-size: 11px; color: var(--text-light); margin-top: 4px; padding-left: 2px; }
.subsidy-ended .breakdown-amount { text-decoration: line-through; opacity: 0.6; }
.subsidy-ended .breakdown-cap { text-decoration: line-through; opacity: 0.6; }

/* === まとめセクション リスト === */
.matome-list {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}
.matome-list li {
  position: relative;
  padding: 12px 0 12px 24px;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
  line-height: 1.7;
}
.matome-list li:last-child {
  border-bottom: none;
}
.matome-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 12px;
  color: var(--primary);
  font-weight: 700;
  font-size: 15px;
}
.marker-yellow {
  background: linear-gradient(transparent 60%, #fef08a 60%);
}

/* ============================
   ヘッダー：ロゴ＋グロナビ横並び強制
   (SWELL -series レイアウトを上書き)
   ============================ */
.pseo-custom .l-header.-series {
  display: flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
}
.pseo-custom .l-header.-series .l-header__inner {
  flex-shrink: 0 !important;
  width: auto !important;
}
.pseo-custom .l-header.-series .l-header__gnav {
  flex: 1 !important;
  width: auto !important;
}
.pseo-custom .l-header.-series .l-header__gnav .c-gnav {
  justify-content: flex-end !important;
}
@media (max-width: 959px) {
  .pseo-custom .l-header.-series .l-header__gnav {
    display: none !important;
  }
}

/* ============================
   pSEO 2カラムレイアウト強制
   (SWELLがsubsidy_pageにサイドバーを適用しない場合の補完)
   ============================ */
.pseo-custom .l-content.l-container {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 40px !important;
}
.pseo-custom .l-mainContent {
  flex: 1 !important;
  min-width: 0 !important;
}
.pseo-custom .l-sidebar {
  width: 280px !important;
  flex-shrink: 0 !important;
  position: relative !important;
}
.pseo-custom .l-sidebar #sidebar-toc {
  position: sticky !important;
  top: 160px !important;
}
@media (max-width: 1000px) {
  .pseo-custom .l-content.l-container {
    flex-direction: column !important;
  }
  .pseo-custom .l-sidebar {
    width: 100% !important;
    display: none !important;
  }
}

/* ============================
   Sidebar TOC Readability
   ============================ */
.pseo-custom .l-sidebar #sidebar-toc {
  padding: 20px 18px 14px !important;
  border: 1px solid #dce3e8 !important;
  border-radius: 10px !important;
  background: #fff !important;
}
.pseo-custom .l-sidebar #sidebar-toc > p:first-child {
  font-size: 15px !important;
  font-weight: 700 !important;
  color: #1a1311 !important;
  margin-bottom: 10px !important;
  padding-bottom: 8px !important;
  border-bottom: 2px solid var(--color_main, #0c8698) !important;
}
.pseo-custom .l-sidebar #sidebar-toc ol {
  list-style: none !important;
  counter-reset: toc-counter !important;
  padding: 0 !important;
  margin: 0 !important;
}
.pseo-custom .l-sidebar #sidebar-toc ol li {
  counter-increment: toc-counter !important;
  padding: 8px 0 !important;
  border-bottom: 1px solid #f0f2f4 !important;
  margin: 0 !important;
  list-style: none !important;
}
.pseo-custom .l-sidebar #sidebar-toc ol li:last-child {
  border-bottom: none !important;
}
.pseo-custom .l-sidebar #sidebar-toc ol li a {
  display: flex !important;
  align-items: flex-start !important;
  gap: 8px !important;
  font-size: 14.5px !important;
  line-height: 1.6 !important;
  color: #37474f !important;
  text-decoration: none !important;
  transition: color .15s !important;
}
.pseo-custom .l-sidebar #sidebar-toc ol li a::before {
  content: counter(toc-counter) !important;
  flex-shrink: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 22px !important;
  height: 22px !important;
  border-radius: 50% !important;
  background: var(--color_main, #0c8698) !important;
  color: #fff !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  margin-top: 1px !important;
}
.pseo-custom .l-sidebar #sidebar-toc ol li a:hover {
  color: var(--color_main, #0c8698) !important;
}

/* === pSEO standalone layout styles === */
/* Box-sizing reset */
* { box-sizing: border-box; }
*::before { box-sizing: border-box; }
*::after { box-sizing: border-box; }

/* Sidebar */
.hpseo-sidebar {
  position: sticky;
  top: 160px;
  max-height: calc(100vh - 170px);
  overflow-y: auto;
}
.hpseo-sidebar__banner {
  margin-bottom: 16px;
}
.hpseo-sidebar__banner img {
  width: 100%;
  border-radius: 8px;
}
.hpseo-sidebar__toc {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px;
}
.hpseo-sidebar__toc-title {
  font-size: 15px;
  font-weight: 700;
  color: #555;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 2px solid #2d9f93;
}
.hpseo-sidebar__toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: toc;
}
.hpseo-sidebar__toc li {
  counter-increment: toc;
  padding: 6px 0;
  border-bottom: 1px solid #f3f4f6;
}
.hpseo-sidebar__toc li:last-child {
  border-bottom: none;
}
.hpseo-sidebar__toc a {
  font-size: 14.5px;
  line-height: 1.6;
  color: #555;
  text-decoration: none;
  display: block;
  padding-left: 20px;
  position: relative;
}
.hpseo-sidebar__toc a::before {
  content: counter(toc);
  position: absolute;
  left: 0;
  font-size: 12px;
  font-weight: 700;
  color: #2d9f93;
}
.hpseo-sidebar__toc a:hover {
  color: #2d9f93;
}

/* Layout: main + sidebar */
.hpseo-layout {
  display: flex;
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
.hpseo-layout__main {
  flex: 1;
  min-width: 0;
}
.hpseo-layout__sidebar {
  width: 300px;
  flex-shrink: 0;
}

@media (max-width: 1000px) {
  .hpseo-layout {
    flex-direction: column;
  }
  .hpseo-layout__sidebar {
    width: 100%;
    order: 99;
  }
  .hpseo-sidebar {
    position: static;
    max-height: none;
  }
}

/* === スマホ: コンテナ・セクションの左右padding縮小 === */
@media (max-width: 600px) {
  .container { padding: 0 12px; }
  .section { padding: 20px 16px; margin-bottom: 16px; }
  .section h2 { font-size: 20px; margin-bottom: 16px; padding-bottom: 10px; }
  .section h3 { font-size: 17px; margin: 20px 0 10px; }
  .hero { padding: 28px 0; margin-bottom: 20px; }
  .hero h1 { font-size: 22px; }
  .sim-box { padding: 16px 14px; }
  .cta-section { padding: 24px 16px; }
  .card-gray { padding: 16px 14px; }
  .gradient-hero { padding: 24px 16px; }
  .slider-controls { padding: 16px 14px; }
  .highlight-left { padding: 16px 14px; }
  .disaster-box { padding: 14px 14px; }
  .info-panel { padding: 14px 14px; }
}

/* === Sticky header offset for anchor links === */
[id^="toc-heading"],
.prefsub-section h2[id],
.prefsub-section h3[id],
.prefsub-section h4[id],
.hpseo-entry h2[id],
.hpseo-entry h3[id],
.hpseo-entry h4[id],
.entry-content h2[id],
.entry-content h3[id],
.entry-content h4[id] {
  scroll-margin-top: 100px; /* header 80px + 余白 20px */
}
body.admin-bar [id^="toc-heading"],
body.admin-bar .prefsub-section h2[id],
body.admin-bar .prefsub-section h3[id],
body.admin-bar .prefsub-section h4[id],
body.admin-bar .hpseo-entry h2[id],
body.admin-bar .hpseo-entry h3[id],
body.admin-bar .hpseo-entry h4[id],
body.admin-bar .entry-content h2[id],
body.admin-bar .entry-content h3[id],
body.admin-bar .entry-content h4[id] {
  scroll-margin-top: 132px; /* header 80px + admin-bar 32px + 余白 20px */
}

/* === Thumbnail / Featured Image === */
.entry-thumbnail {
  margin: 0 0 24px;
  border-radius: 8px;
  overflow: hidden;
}
.entry-thumbnail__img {
  width: 100%;
  height: auto;
  display: block;
}
.prefsub-thumbnail {
  margin: 0 0 8px;
  border-radius: 8px;
  overflow: hidden;
}
.prefsub-thumbnail__img {
  width: 100%;
  height: auto;
  display: block;
}

/* === Site Footer === */
.hpseo-footer {
  background: #fdfdfd;
  border-top: 1px solid #e5e7eb;
  padding: 24px 20px;
  text-align: center;
  font-size: 12px;
  color: #888;
  margin-top: 40px;
}
.hpseo-footer p {
  margin: 0;
}
.hpseo-footer a {
  color: #2d9f93;
  text-decoration: none;
}
.hpseo-footer a:hover {
  text-decoration: underline;
}

/* post h1 -> prefsub-hero style unified */
.entry-header {
  background: linear-gradient(135deg, #0c8698 0%, #47a79d 100%);
  padding: 40px 0;
  color: #fff;
  margin-bottom: 32px;
}
.entry-header .entry-title {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 auto 0;
  max-width: 820px;
  padding: 0 20px;
  color: #fff;
}
.entry-header .update-date {
  font-size: 13px;
  opacity: 0.85;
  padding: 8px 20px 0;
  max-width: 820px;
  margin: 0 auto;
}
.prefsub-hero {
  margin-bottom: 32px;
}
@media (max-width: 600px) {
  .entry-header {
    padding: 28px 0;
    margin-bottom: 20px;
  }
  .entry-header .entry-title {
    font-size: 20px;
    padding: 0 16px;
  }
  .prefsub-hero {
    margin-bottom: 20px;
  }
}
