/* ── サイドバー非表示 & フル幅レイアウト ── */
#sidebar { display: none !important; }
.l-content.l-container { max-width: 100%; width: 100%; }
.l-mainContent { max-width: 100%; flex: 1; }

/* === Wizard Layout Styles === */
.sim-wizard { max-width: 900px; margin: 0 auto; }

/* Progress Bar */
.wizard-progress {
  margin-bottom: 32px; padding: 0 20px;
}
.wizard-progress-track {
  display: flex; align-items: flex-start;
}
.wizard-step-indicator {
  flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.wizard-step-circle {
  width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; border: 2px solid var(--border, #e5e7eb);
  color: var(--text-light, #888); background: white; cursor: pointer; transition: all 0.3s;
}
.wizard-step-circle.active { border-color: var(--primary); background: var(--primary); color: white; }
.wizard-step-circle.completed { border-color: var(--primary); background: var(--primary); color: white; }
.wizard-step-circle:not(.completed):not(.active) { cursor: default; }
.wizard-step-line {
  flex: 1; height: 2px; background: var(--border, #e5e7eb); margin: 0 4px;
  align-self: flex-start; margin-top: 19px;
}
.wizard-step-line.active { background: var(--primary); }
.wizard-step-label {
  font-size: 13px; font-weight: 600; color: var(--text-light, #888); white-space: nowrap;
}
.wizard-step-label.active { color: var(--primary-dark); }

/* Step Panels */
.wizard-steps-container { position: relative; min-height: 400px; }
.wizard-step { display: none; animation: fadeIn 0.3s ease-in; }
.wizard-step.active { display: block; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.wizard-step h2 { margin-top: 0; color: var(--primary-dark); }
.wizard-step > p { color: var(--text, #555); line-height: 1.7; margin-bottom: 20px; }

/* Step 1 Specific Styles */
.area-selector { background: var(--bg-gray); border-radius: 12px; padding: 20px; margin-bottom: 20px; }
.area-selector h3 { margin: 0 0 16px; font-size: 15px; color: var(--primary-dark); }
.area-select-row { display: flex; gap: 12px; flex-wrap: wrap; }
.area-select-row select {
  flex: 1; min-width: 140px; padding: 12px 14px; font-size: 15px; border: 2px solid var(--border, #e5e7eb);
  border-radius: 8px; background: #fff; color: var(--text, #333); appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; cursor: pointer; transition: border-color .2s;
}
.area-select-row select:focus { border-color: var(--primary); outline: none; }
.area-select-row select:disabled { background: #f3f4f6; color: #999; cursor: not-allowed; }

.direction-selector { margin: 20px 0; }
.direction-selector h3 { margin: 0 0 14px; font-size: 15px; color: var(--primary-dark); }
.direction-buttons {
  display: flex; gap: 10px; flex-wrap: wrap; justify-content: center;
}
.direction-btn {
  flex: 0 1 calc(20% - 8px); min-width: 70px; padding: 12px 8px; text-align: center;
  border: 2px solid var(--border, #e5e7eb); border-radius: 8px; background: white;
  cursor: pointer; transition: all 0.2s; font-size: 13px; font-weight: 600;
}
.direction-btn:hover { border-color: var(--primary); background: var(--primary-light); }
.direction-btn.selected { border-color: var(--primary); background: var(--primary); color: white; }
.direction-icon { display: block; margin-bottom: 4px; line-height: 0; }
.direction-icon svg { width: 28px; height: 28px; }

.bill-selector { margin: 20px 0; }
.bill-selector h3 { margin: 0 0 14px; font-size: 15px; color: var(--primary-dark); }
.bill-buttons {
  display: flex; gap: 10px; flex-wrap: wrap;
}
.bill-btn {
  flex: 1; min-width: 80px; padding: 10px 8px; text-align: center; border: 2px solid var(--border, #e5e7eb);
  border-radius: 8px; background: white; cursor: pointer; transition: all 0.2s; font-size: 13px; font-weight: 600;
}
.bill-btn:hover { border-color: var(--primary); background: var(--primary-light); }
.bill-btn.selected { border-color: var(--primary); background: var(--primary); color: white; }

.bill-free-input {
  display: none; margin-top: 12px;
}
.bill-free-input.active { display: block; }
.bill-free-input input {
  width: 100%; max-width: 200px; padding: 10px 14px; font-size: 14px; border: 2px solid var(--border);
  border-radius: 8px; font-weight: 600;
}

/* Plan Selector */
.plan-selector { background: var(--bg-gray); border-radius: 12px; padding: 20px; margin-bottom: 20px; display: none; }
.plan-selector h3 { margin: 0 0 6px; font-size: 15px; color: var(--primary-dark); }
.plan-selector .plan-detected {
  font-size: 13px; color: var(--text-light); margin-bottom: 14px;
}
.plan-selector .plan-detected strong { color: var(--primary); font-weight: 700; }
.plan-options { display: flex; flex-direction: column; gap: 10px; }
.plan-opt {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  border: 2px solid var(--border, #e5e7eb); border-radius: 10px;
  background: white; cursor: pointer; transition: all 0.2s;
}
.plan-opt:hover { border-color: var(--primary); background: var(--primary-light); }
.plan-opt.selected { border-color: var(--primary); background: var(--primary-light); box-shadow: 0 0 0 1px var(--primary); }
.plan-opt-radio {
  width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.plan-opt.selected .plan-opt-radio { border-color: var(--primary); }
.plan-opt.selected .plan-opt-radio::after {
  content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--primary);
}
.plan-opt-body { flex: 1; }
.plan-opt-name { font-size: 14px; font-weight: 700; color: var(--text); }
.plan-opt-desc { font-size: 12px; color: var(--text-light); margin-top: 2px; }
.plan-opt-tiers {
  display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap;
}
.plan-opt-tiers .tier-chip {
  font-size: 11px; background: var(--bg-gray); border-radius: 4px; padding: 2px 8px;
  color: #666;
}
.plan-opt.selected .plan-opt-tiers .tier-chip { background: white; }
.plan-opt:hover .plan-opt-desc { color: var(--text); }
.plan-opt.selected .plan-opt-desc { color: var(--text); }
.amp-selector { margin-top: 10px; display: none; }
.amp-selector.visible { display: block; }
.amp-selector label { font-size: 13px; font-weight: 600; color: var(--primary-dark); margin-right: 8px; }
.amp-selector select {
  padding: 8px 12px; font-size: 14px; border: 2px solid var(--border); border-radius: 8px;
  background: white; font-weight: 600;
}
.manual-rate-input { margin-top: 10px; display: none; }
.manual-rate-input.visible { display: flex; align-items: center; gap: 8px; }
.manual-rate-input input {
  width: 80px; padding: 8px 10px; font-size: 15px; font-weight: 700; text-align: center;
  border: 2px solid var(--border); border-radius: 8px;
}
.manual-rate-input span { font-size: 13px; color: var(--text-light); }

/* Step 2 Specific Styles */
.slider-controls { padding: 20px; background: var(--bg-gray); border-radius: 12px; }
.slider-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 20px; }
.slider-item { }
.slider-label { font-size: 13px; font-weight: 700; color: var(--primary-dark); margin-bottom: 8px; }
.slider-val { font-size: 20px; font-weight: 700; color: var(--primary); margin-bottom: 10px; }
.slider-val small { font-size: 12px; font-weight: 400; color: var(--text-light); margin-left: 4px; }
.slider-item input[type="range"] {
  width: 100%; height: 6px; border-radius: 3px; background: var(--border); outline: none;
  -webkit-appearance: none;
}
.slider-item input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 18px; height: 18px; border-radius: 50%;
  background: var(--primary); cursor: pointer; box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.slider-item input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%; background: var(--primary); cursor: pointer;
  border: none; box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.slider-range-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-light); margin-top: 8px; }

.panel-count-ref {
  margin: 12px 0; padding: 10px 14px; background: var(--primary-light); border-radius: 8px;
  font-size: 13px; color: var(--primary-dark);
}

.usage-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.usage-opt {
  padding: 14px 12px; border: 2px solid var(--border); border-radius: 8px; text-align: center;
  cursor: pointer; transition: all 0.2s; background: white;
}
.usage-opt:hover { border-color: var(--primary); background: var(--primary-light); }
.usage-opt:hover .usage-opt-desc { color: var(--text); }
.usage-opt.selected { border-color: var(--primary); background: var(--primary); }
.usage-opt-title { font-size: 13px; font-weight: 700; margin-bottom: 4px; color: var(--text); }
.usage-opt.selected .usage-opt-title { color: white; }
.usage-opt-desc { font-size: 11px; color: var(--text-light); line-height: 1.5; }
.usage-opt.selected .usage-opt-desc { color: white; }

/* Battery toggle */
.bat-toggle-wrap {
  display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: var(--primary-light);
  border: 2px solid var(--primary); border-radius: 10px; margin-bottom: 16px;
}
.bat-toggle-label { font-size: 15px; font-weight: 600; color: var(--primary-dark); flex: 1; }
.toggle-switch { position: relative; display: inline-block; width: 48px; height: 26px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background: #ccc;
  border-radius: 26px; transition: 0.3s;
}
.toggle-slider::before {
  content: ''; position: absolute; height: 20px; width: 20px; left: 3px; bottom: 3px;
  background-color: white; border-radius: 50%; transition: 0.3s;
}
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); }
input:checked + .toggle-slider::before { transform: translateX(22px); }

.bat-capacity-select {
  display: none; padding: 12px 16px; background: var(--bg-gray); border-radius: 8px; margin-bottom: 16px;
}
.bat-capacity-select h4 { font-size: 13px; font-weight: 600; margin: 0 0 8px; }
.bat-cap-buttons { display: flex; gap: 8px; }
.bat-cap-btn {
  flex: 1; padding: 10px 8px; border: 2px solid var(--border); border-radius: 8px; background: white;
  cursor: pointer; font-size: 13px; font-weight: 600; transition: all 0.2s; color: var(--text-light);
}
.bat-cap-btn.selected { border-color: var(--primary); background: var(--primary); color: white; }
.bat-cap-btn:hover:not(.selected) { border-color: var(--primary-light); }

/* Step 3 Results */
.results-container { }
.selected-area-badge {
  display: flex; align-items: center; gap: 10px; padding: 14px 18px;
  background: var(--primary-light); border: 2px solid var(--primary); border-radius: 10px;
  margin-bottom: 24px; font-size: 15px; font-weight: 600; color: var(--primary-dark);
}
.selected-area-badge .badge-link {
  margin-left: auto; font-size: 13px; font-weight: 500; color: var(--primary); text-decoration: none;
}
.selected-area-badge .badge-link:hover { text-decoration: underline; }

/* KPI Cards */
.kpi-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 24px 0;
}
.kpi-card {
  padding: 16px 12px; background: var(--bg-gray); border-radius: 8px; text-align: center;
  border-left: 4px solid var(--border);
}
.kpi-card.kpi-card-hl { border-left-color: var(--primary); background: var(--primary-light); }
.kpi-label { font-size: 11px; color: var(--text-light); font-weight: 600; margin-bottom: 8px; }
.kpi-val {
  font-size: 24px; font-weight: 700; color: var(--primary-dark); line-height: 1.2;
}
.kpi-val.kpi-val-green { color: var(--primary); }
.kpi-val small { font-size: 11px; font-weight: 400; margin-left: 4px; }

/* Tab system */
.tab-group {
  display: flex; gap: 8px; margin: 16px 0; border-bottom: 2px solid var(--border); flex-wrap: wrap;
}
.tab-btn {
  padding: 12px 16px; border: none; background: transparent; cursor: pointer; font-size: 13px;
  font-weight: 600; color: var(--text-light); border-bottom: 3px solid transparent; transition: all 0.2s;
}
.tab-btn:hover { color: var(--primary); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* Navigation Buttons */
.wizard-nav {
  display: flex; gap: 12px; margin-top: 24px; justify-content: space-between;
}
.wizard-nav button {
  padding: 12px 24px; border: none; border-radius: 8px; font-size: 14px; font-weight: 700;
  cursor: pointer; transition: all 0.2s;
}
.wizard-nav .btn-prev {
  background: var(--border, #e5e7eb); color: var(--text); flex: 0 0 auto;
}
.wizard-nav .btn-prev:hover { background: #d1d5db; }
.wizard-nav .btn-next, .wizard-nav .btn-start-sim {
  background: var(--primary); color: white; flex: 1; max-width: 400px; margin-left: auto;
}
.wizard-nav .btn-next:hover, .wizard-nav .btn-start-sim:hover { background: var(--primary-dark); }
.wizard-nav .btn-next:disabled, .wizard-nav .btn-start-sim:disabled {
  opacity: 0.5; cursor: not-allowed;
}

/* Responsive */
@media (max-width: 600px) {
  .area-select-row { flex-direction: column; }
  .area-select-row select { min-width: 100%; }
  /* 方角ボタン: スマホではコンパス型 2-1-2 配置（南を中央に） */
  .direction-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    justify-items: center;
  }
  .direction-btn {
    width: 100%;
    min-width: 0;
    flex: none;
  }
  .direction-btn[data-direction="south"] {
    grid-column: 1 / -1;
    width: 50%;
    justify-self: center;
  }
  .bill-buttons { flex-direction: column; }
  .bill-btn { width: 100%; }
  .slider-row { grid-template-columns: 1fr; }
  .wizard-progress { font-size: 12px; }
  .wizard-step-circle { width: 36px; height: 36px; font-size: 12px; }
  .wizard-step-line { margin-top: 17px; }
  .wizard-step-label { font-size: 11px; }

  /* コンテンツ幅を広げる: 左右paddingを縮小 */
  .sim-wizard { padding: 0 12px; }
  .wizard-progress { padding: 0 4px; margin-bottom: 24px; }
  .area-selector { padding: 16px 14px; }
  .plan-selector { padding: 16px 14px; }
  .slider-controls { padding: 16px 14px; }
  .direction-selector { margin: 16px 0; }
  .section { margin: 24px 0; }
  .section h2 { font-size: 17px; }
  .ba-card { padding: 16px 14px; }
  .coverage-box { padding: 16px 14px; }
  .cta-section { padding: 24px 14px; margin: 28px 0; }
  .sim-section-box { padding: 16px 14px; }
  .sim-notes-box { padding: 14px 14px; }
  .sim-guide-box { padding: 10px 12px; }
  .pseo-wrap { padding: 24px 0 32px; }
}

/* Subsidy Summary */
.summary-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin: 20px 0;
}
.summary-card {
  border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
}
.summary-card .card-header {
  background: var(--primary-light); padding: 12px 16px; border-bottom: 1px solid var(--border);
}
.summary-card .card-header h3 { margin: 0; font-size: 13px; color: var(--primary-dark); }
.summary-card .card-body { padding: 16px; }
.breakdown-list { }
.breakdown-item {
  display: block; padding: 10px 0; font-size: 12px;
  border-bottom: 1px solid var(--border);
}
.breakdown-item:last-child { border-bottom: none; }
.breakdown-item > .subsidy-badge { display: block; width: fit-content; margin-bottom: 4px; }
.breakdown-label { display: block; font-weight: 600; color: var(--text); font-size: 13px; margin-bottom: 2px; }
.breakdown-amount { display: block; color: var(--primary); font-weight: 700; font-size: 17px; }
.breakdown-cap { display: block; font-size: 11px; color: var(--text-light); }

/* Climate Data */
.data-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 20px 0;
}
.data-card {
  padding: 16px 12px; background: var(--bg-gray); border-radius: 8px; text-align: center;
}
.data-label { font-size: 12px; color: var(--text-light); margin-bottom: 8px; }
.data-value { font-size: 22px; font-weight: 700; color: var(--primary-dark); }
.data-value small { font-size: 11px; font-weight: 400; margin-left: 4px; }
.data-note { font-size: 10px; color: var(--text-light); margin-top: 6px; }

/* Monthly Chart */
.monthly-chart {
  display: flex; gap: 6px; align-items: flex-end; height: 180px; padding: 16px 12px;
  background: var(--bg-gray); border-radius: 8px; margin: 16px 0; overflow-x: auto;
}
.month-col {
  flex: 1; min-width: 40px; display: flex; flex-direction: column; align-items: center;
}
.month-val { font-size: 10px; font-weight: 700; color: var(--primary); margin-bottom: 4px; }
.month-bar-wrap { width: 100%; flex: 1; background: var(--border); border-radius: 2px; position: relative; }
.month-bar { width: 100%; background: linear-gradient(180deg, var(--primary) 0%, var(--primary-light) 100%); border-radius: 2px; }
.month-label { font-size: 9px; color: var(--text-light); margin-top: 4px; }

/* Collapsible Details */
.sim-details { cursor: pointer; margin: 20px 0; }
.sim-details summary {
  padding: 12px 16px; background: var(--bg-gray); border: 1px solid var(--border); border-radius: 8px;
  font-weight: 600; font-size: 13px; color: var(--primary-dark); user-select: none;
}
.sim-details summary:hover { background: var(--primary-light); }
.sim-details[open] summary { border-bottom: none; border-radius: 8px 8px 0 0; }
.sim-details > div { padding: 16px; border: 1px solid var(--border); border-top: none; border-radius: 0 0 8px 8px; }

/* BA Cards */
.ba-cards { }
.ba-card {
  padding: 20px 16px; background: var(--bg-gray); border-radius: 10px; margin: 16px 0;
}
.ba-title { font-size: 14px; font-weight: 700; color: var(--primary-dark); margin-bottom: 12px; }
.ba-amount {
  font-size: 18px; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; gap: 8px;
}
.ba-amount .old, .ba-amount .new { color: var(--primary-dark); }
.ba-amount .arrow { color: var(--primary); }
.ba-amount small { font-size: 11px; font-weight: 400; color: var(--text-light); }
.ba-savings { font-size: 16px; font-weight: 700; color: var(--primary); margin-bottom: 8px; }
.ba-sell, .ba-net { font-size: 12px; color: var(--text); margin-bottom: 4px; }

/* Coverage */
.coverage-box {
  padding: 20px 16px; background: var(--bg-gray); border-radius: 10px; text-align: center;
}
.coverage-box > div:first-child { font-size: 13px; color: var(--text-light); margin-bottom: 8px; }
.pct { font-size: 32px; font-weight: 800; color: var(--primary); }

/* Reference Data */
.condition-grid {
  display: grid; grid-template-columns: 1fr 2fr; gap: 12px; font-size: 12px;
  margin: 12px 0; line-height: 1.6;
}
.condition-grid span { padding: 8px 0; border-bottom: 1px solid var(--border); }
.condition-grid span:nth-child(odd) { font-weight: 600; color: var(--text); }
.condition-grid span:nth-child(even) { color: var(--text-light); }

.ref-tile-4 {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 12px; margin: 12px 0;
}
.ref-tile-3 {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin: 12px 0;
}
.ref-tile-3 div, .ref-tile-4 div {
  padding: 12px 10px; background: white; border: 1px solid var(--border); border-radius: 6px; text-align: center;
}

/* CTA */
.cta-section {
  margin: 40px 0; padding: 32px 24px; background: linear-gradient(135deg, var(--primary-light) 0%, rgba(56, 178, 156, 0.05) 100%);
  border: 2px solid var(--primary); border-radius: 12px;
}
.trust-badges {
  display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; margin-bottom: 24px; font-size: 12px;
  font-weight: 600; color: var(--primary);
}
.cta-section h2 { text-align: center; color: var(--primary-dark); margin-bottom: 16px; }
.cta-section > p { text-align: center; color: var(--text); line-height: 1.8; margin: 12px 0; }

.cta-compare-table {
  width: 100%; margin: 20px 0; border-collapse: collapse; font-size: 12px;
}
.cta-compare-table th, .cta-compare-table td { padding: 12px 8px; text-align: left; border-bottom: 1px solid var(--border); }
.cta-compare-table th { background: var(--bg-gray); font-weight: 700; color: var(--primary-dark); }
.cta-compare-table td { color: var(--text); }
.cta-compare-table .col-buy { text-align: center; }
.cta-compare-table .col-zero { text-align: center; background: var(--primary-light); }

.compare-grid-2 {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; margin: 16px 0;
}

.cta-btn, .cta-sub-btn {
  display: inline-block; margin-top: 16px; padding: 14px 32px; border-radius: 8px;
  font-size: 15px; font-weight: 700; text-decoration: none; text-align: center; transition: all 0.2s;
}
.cta-btn {
  background: var(--primary); color: white; width: 100%; max-width: 400px;
}
.cta-btn:hover { background: var(--primary-dark); }
.cta-sub-btn {
  background: white; color: var(--primary); border: 2px solid var(--primary); width: 100%; max-width: 400px;
}
.cta-sub-btn:hover { background: var(--primary-light); }

/* Section Styling */
.section { margin: 32px 0; }
.section h2 { font-size: 20px; font-weight: 700; color: var(--primary-dark); margin: 20px 0 12px; }
.section h3 { font-size: 15px; font-weight: 700; color: var(--primary-dark); margin: 18px 0 12px; }
.section > p { color: var(--text); line-height: 1.7; }

.data-note { font-size: 11px; color: var(--text-light); }

/* Loading */
.sim-loading { text-align: center; padding: 40px 20px; }
.sim-loading .spinner {
  display: inline-block; width: 36px; height: 36px; border: 3px solid var(--border, #e5e7eb);
  border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Subsidy Lookup Button */
.btn-subsidy-lookup:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(245,158,11,0.4); }
.btn-subsidy-lookup:disabled { opacity: 0.6; cursor: wait; }

/* === Wizard UI Styles (extracted from page-simulation.php) === */

/* ── フル幅レイアウト（サイドバーはhpseo-foot.phpで自動表示） ── */
body { overflow-x: hidden !important; }

/* Enhanced Progress Bar — definitions consolidated above */

/* Plan Selector - Detailed Radio Group */
.plan-radio-group {
  background: white; border-radius: 10px; border: 1px solid var(--border, #e5e7eb);
  overflow: hidden; margin-bottom: 12px;
}
.plan-radio-company {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; background: var(--primary-dark, #1a5c5c); color: white;
  font-size: 14px; font-weight: 700;
}
.plan-radio-company .company-icon {
  width: 28px; height: 28px; border-radius: 6px; background: rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0;
}
.plan-radio-company .company-label { flex: 1; }
.plan-radio-company .company-badge {
  font-size: 11px; font-weight: 500; background: rgba(255,255,255,0.2);
  padding: 2px 8px; border-radius: 10px;
}
.plan-radio-list { display: flex; flex-direction: column; }
.plan-radio-item {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  cursor: pointer; transition: background 0.15s; border-bottom: 1px solid var(--border, #f0f0f0);
  position: relative;
}
.plan-radio-item:last-child { border-bottom: none; }
.plan-radio-item:hover { background: #f8fafb; }
.plan-radio-item.selected { background: var(--primary-light, #e6f5f0); }
.plan-radio-dot {
  width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border, #ccc);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  transition: border-color 0.15s;
}
.plan-radio-item.selected .plan-radio-dot { border-color: var(--primary); }
.plan-radio-item.selected .plan-radio-dot::after {
  content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--primary);
}
.plan-radio-body { flex: 1; min-width: 0; }
.plan-radio-name { font-size: 14px; font-weight: 600; color: var(--text); }
.plan-radio-meta { font-size: 11px; color: var(--text-light); margin-top: 2px; }
.plan-radio-item.selected .plan-radio-name { color: var(--primary-dark); }

/* Rate tier info */
#rate-tier-info {
  display: none; margin-top: 0; padding: 10px 16px; background: white;
  border: 1px solid var(--border, #e5e7eb); border-top: none;
  border-radius: 0 0 10px 10px; font-size: 11px; color: var(--text-light); line-height: 1.7;
  margin-top: -12px; margin-bottom: 12px;
}

/* Alternative options (shindenryoku, manual) */
.plan-alt-group { display: flex; flex-direction: column; gap: 0; margin-bottom: 10px; }
.plan-alt-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  background: white; cursor: pointer; transition: background 0.15s;
  border: 1px solid var(--border, #e5e7eb);
}
.plan-alt-item:first-child { border-radius: 10px 10px 0 0; }
.plan-alt-item:last-child { border-radius: 0 0 10px 10px; border-top: none; }
.plan-alt-item:only-child { border-radius: 10px; }
.plan-alt-item:not(:first-child) { border-top: none; }
.plan-alt-item:hover { background: #f8fafb; }
.plan-alt-item.selected { background: var(--primary-light, #e6f5f0); }
.plan-alt-dot {
  width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border, #ccc);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  transition: border-color 0.15s;
}
.plan-alt-item.selected .plan-alt-dot { border-color: var(--primary); }
.plan-alt-item.selected .plan-alt-dot::after {
  content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--primary);
}
.plan-alt-body { flex: 1; }
.plan-alt-name { font-size: 13px; font-weight: 600; color: var(--text); }
.plan-alt-desc { font-size: 11px; color: var(--text-light); margin-top: 1px; }

/* Enhanced Tab system */
.tab-btn {
  padding: 10px 12px; border: none; background: transparent; cursor: pointer; font-size: 12px;
  font-weight: 600; color: var(--text-light); border-bottom: 3px solid transparent; transition: all 0.2s;
}

/* Enhanced Navigation Buttons */
.wizard-nav {
  display: flex; gap: 12px; margin-top: 24px; justify-content: space-between;
  position: relative; z-index: 10;
}

/* 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; margin-right: 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; }

/* Enhanced breakdown item (simulation results) */
.sim-results .breakdown-item {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 0; font-size: 12px;
  border-bottom: 1px solid var(--border);
}
.sim-results .breakdown-item:last-child { border-bottom: none; }
.breakdown-calc { width: 100%; text-align: right; font-size: 13px; color: var(--text); margin-top: 2px; }
.breakdown-calc strong { color: var(--primary); font-size: 15px; }

/* Responsive mobile adjustments */
@media (max-width: 600px) {
  .wizard-step-circle { width: 30px; height: 30px; font-size: 12px; }
  .wizard-step-line { margin-top: 14px; }
  .wizard-step-label { font-size: 10px; }
  .plan-radio-company { font-size: 13px; padding: 10px 14px; }
  .plan-radio-item { padding: 12px 14px; }
  .plan-alt-item { padding: 10px 14px; }
}

/* CTA button styling */
.cta-btn, .cta-sub-btn {
  margin-top: 16px;
}
/* === Extracted Inline Styles === */

/* Text alignment and borders */
.sim-table-cell-center {
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.sim-center {
  text-align: center;
}

.sim-center-bold {
  text-align: center;
  font-weight: 600;
}

.sim-center-bold-primary {
  text-align: center;
  font-weight: 600;
  color: var(--primary-dark);
}

/* Labels and text styles */
.sim-label-bold-15 {
  font-size: 15px;
  font-weight: 700;
  color: #333;
}

.sim-text-12-light {
  font-size: 11px;
  font-weight: 400;
}

.sim-text-10-gray {
  font-size: 10px;
  color: #888;
}

.sim-text-11-light {
  font-size: 11px;
  color: var(--text-light);
}

.sim-text-10-light {
  font-size: 10px;
  color: var(--text-light);
}

.sim-text-12-normal {
  font-size: 12px;
  font-weight: 400;
}

.sim-text-14-light {
  font-size: 14px;
  font-weight: 400;
}

.sim-text-11 {
  font-size: 11px;
}

.sim-text-13 {
  font-size: 13px;
}

.sim-text-16 {
  font-size: 16px;
}

/* Notes and meta text */
.sim-note-12 {
  font-size: 12px;
  color: var(--text-light);
  margin: 0 0 12px;
}

.sim-meta-12 {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 4px;
}

.sim-meta-11 {
  font-size: 11px;
  color: var(--text-light);
  margin-bottom: 4px;
}

.sim-meta-13 {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 16px;
}

.sim-meta-13-gray {
  font-size: 13px;
  color: #666;
  margin-bottom: 8px;
}

.sim-note-dashed {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed var(--border, #e5e7eb);
  color: var(--text-light);
  font-size: 11px;
}

.sim-note-13 {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 14px;
}

.sim-note-11-top {
  font-size: 11px;
  color: var(--text-light);
  line-height: 1.6;
  margin: 12px 0 0;
}

.sim-note-11-margin {
  font-size: 11px;
  color: var(--text-light);
  line-height: 1.5;
  margin-top: 4px;
}

.sim-note-10 {
  font-size: 10px;
  color: var(--text-light, #888);
  margin-top: 6px;
  line-height: 1.5;
}

.sim-note-12-center {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 6px;
  text-align: center;
}

.sim-note-12-space {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 4px;
}

.sim-note-10-right {
  font-size: 10px;
  color: var(--text-light);
  text-align: right;
  margin-bottom: 16px;
}

/* Padding and borders */
.sim-cell-bordered {
  padding: 5px 8px;
  border-bottom: 1px solid var(--border);
}

.sim-cell-padding {
  padding: 5px 8px;
}

.sim-cell-nowrap {
  padding: 6px 4px;
  text-align: center;
  white-space: nowrap;
}

.sim-cell-right-bold {
  font-weight: 600;
  color: var(--primary-dark);
  text-align: right;
}

.sim-table-cell-bold {
  text-align: center;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}

.sim-table-cell-top-left {
  padding: 6px 8px;
  text-align: left;
  border-radius: 4px 0 0 0;
}

.sim-table-cell-top-right {
  padding: 6px 4px;
  text-align: center;
  white-space: nowrap;
  border-radius: 0 4px 0 0;
}

/* Display utilities */
.sim-hidden {
  display: none;
}

.sim-hidden-right {
  display: none;
  text-align: right;
}

.sim-overflow-x {
  overflow-x: auto;
}

/* Flex layouts */
.sim-flex-center {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sim-flex-row-flex {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 16px 0;
}

.sim-flex-col-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}

.sim-flex-between {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
}

.sim-flex-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sim-flex-button {
  flex: 0 0 auto;
  margin-left: 0;
  margin-right: auto;
}

/* Grid layouts */
.sim-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}
.sim-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.sim-grid-appliance {
  display: grid;
  grid-template-columns: auto 1fr minmax(70px, auto);
  gap: 2px 10px;
  align-items: center;
}

.sim-grid-equip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 6px;
}

.sim-grid-payback {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

/* Highlight and background */
.sim-highlight-yellow {
  background: linear-gradient(transparent 60%, #fef08a 60%);
}

.sim-highlight-18 {
  font-size: 18px;
  background: linear-gradient(transparent 60%, #fef08a 60%);
}

.sim-highlight-box {
  padding: 14px;
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border: 2px solid #f59e0b;
  border-radius: 10px;
  text-align: center;
}

.sim-highlight-orange {
  background: #fff7ed;
  border: 1px solid #fb923c;
  border-radius: 8px;
  padding: 16px;
  text-align: center;
}

.sim-highlight-primary {
  background: var(--primary-light);
  border: 2px solid var(--primary);
  border-radius: 8px;
  padding: 16px;
  text-align: center;
}

/* Step numbers and KPI */
.sim-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

.sim-kpi-large {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
}

.sim-kpi-26 {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
}

/* Values */
.sim-value-22-primary {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary-dark);
}

.sim-value-orange-22 {
  font-size: 22px;
  font-weight: 800;
  color: #b45309;
}

.sim-value-orange-26 {
  font-size: 26px;
  font-weight: 800;
  color: #b45309;
}

.sim-value-orange-dark {
  font-size: 22px;
  font-weight: 800;
  color: #c2410c;
}

/* Headings */
.sim-heading-15 {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary-dark);
  margin: 0 0 6px;
}

.sim-heading-15-center {
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  color: var(--primary-dark);
  margin-bottom: 12px;
}

.sim-heading-17 {
  font-size: 17px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 16px;
  text-align: center;
}

.sim-heading-20 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.5;
}

/* Labels */
.sim-label-11-gray {
  font-size: 11px;
  font-weight: 600;
  color: #555;
  margin: 0 0 6px;
}

.sim-label-11-gray-4 {
  font-size: 11px;
  font-weight: 600;
  color: #555;
  margin: 0 0 4px;
}

.sim-label-11-bold {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 6px;
}

.sim-label-11-brown {
  font-size: 11px;
  color: #92400e;
  margin-bottom: 4px;
}

.sim-label-12-dark {
  font-size: 12px;
  color: var(--primary-dark);
  margin-bottom: 4px;
}

.sim-label-12-brown {
  font-size: 12px;
  color: #c2410c;
  margin-bottom: 4px;
}

.sim-label-12-orange {
  font-size: 12px;
  font-weight: 700;
  color: #b45309;
  margin-top: 2px;
}

.sim-label-12-primary {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  margin-top: 6px;
}

.sim-label-13-margin {
  font-size: 13px;
  font-weight: 600;
  margin: 14px 0 8px;
}

.sim-label-bold-13 {
  font-weight: bold;
  font-size: 13px;
  color: #555;
  margin-bottom: 10px;
}

.sim-label-10-light {
  font-size: 10px;
  color: var(--text-light);
  margin-top: 2px;
}

.sim-label-10-gray {
  font-size: 10px;
  color: #999;
  margin-top: 2px;
}

.sim-label-10-gray-b {
  font-size: 10px;
  color: #999;
  margin-bottom: 10px;
}

.sim-label-10-gray-tall {
  font-size: 10px;
  color: #999;
  margin-bottom: 10px;
  line-height: 1.5;
}

/* Link styles */
.sim-link-11 {
  font-size: 11px;
  color: var(--text-light);
  text-decoration: underline;
}

/* Text variations */
.sim-label-20 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.sim-text-13-normal {
  font-size: 13px;
  font-weight: 400;
}

.sim-text-13-tall {
  font-size: 13px;
  line-height: 1.8;
  color: var(--text);
}

.sim-text-13-primary {
  font-size: 13px;
  color: var(--primary-dark);
}

.sim-text-13-brown-margin {
  font-size: 13px;
  color: #92400e;
  margin: 0 0 10px;
  font-weight: 500;
}

.sim-text-14-brown {
  font-size: 14px;
  font-weight: 600;
  color: #92400e;
}

.sim-text-14-light-margin {
  margin-top: 12px;
  font-size: 14px;
  color: var(--text-light);
}

.sim-text-14-light-tall {
  font-size: 14px;
  opacity: 0.92;
  margin-bottom: 20px;
  line-height: 1.8;
}

.sim-text-15-margin {
  font-size: 15px;
  margin-top: 8px;
}

.sim-text-15-tall {
  font-size: 15px;
  line-height: 1.9;
  margin-top: 20px;
}

.sim-text-15-bold-primary {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary-dark);
}

.sim-text-11-light-space {
  font-size: 11px;
  color: var(--text-light);
}

/* Color utilities */
.sim-color-primary {
  color: var(--primary);
}

.sim-color-primary-18 {
  color: var(--primary);
  font-size: 18px;
}

.sim-color-gray {
  color: #888;
}

/* Box styles */
.sim-info-box {
  padding: 14px;
  background: var(--bg-gray);
  border-radius: 10px;
  text-align: center;
}

.sim-info-banner {
  margin-bottom: 16px;
  padding: 10px 14px;
  background: var(--bg-gray);
  border-radius: 8px;
  font-size: 12px;
  color: var(--text);
}

.sim-card-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
}

.sim-stat-box {
  flex: 1;
  min-width: 140px;
  padding: 12px 16px;
  background: var(--bg-gray);
  border-radius: 8px;
  text-align: center;
}

.sim-section-box {
  margin-top: 24px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 22px;
  background: var(--bg-gray);
}

.sim-subsidy-banner {
  text-align: center;
  padding: 18px;
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border-radius: 12px;
  border: 1px dashed #f59e0b;
}

.sim-subsidy-compare {
  padding: 14px 18px;
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.sim-guide-box {
  display: none;
  margin-top: 10px;
  padding: 12px 14px;
  background: white;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.7;
}

.sim-summary-box {
  display: none;
  margin-top: 10px;
  padding: 10px 14px;
  background: var(--primary-light);
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.8;
  color: var(--text-light);
}

.sim-usage-box {
  display: none;
  margin-top: 12px;
  padding: 10px 14px;
  background: var(--primary-light);
  border-radius: 8px;
  align-items: center;
  gap: 8px;
}

.sim-notes-box {
  max-width: 900px;
  margin: 24px auto 32px;
  padding: 18px 20px;
  background: #f8f9fa;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  font-size: 12px;
  color: #666;
  line-height: 1.6;
}

/* Buttons */
.sim-btn-subsidy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
  transition: all 0.2s;
}

.sim-btn-cta {
  display: inline-block;
  padding: 14px 40px;
  background: #ffffff;
  color: var(--primary-dark);
  border-radius: 8px;
  font-size: 16px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s;
}

/* Sections */
.sim-section-cta {
  background: linear-gradient(135deg, var(--primary) 0%, #47A79D 100%);
  border-radius: var(--radius);
  padding: 32px 28px;
  margin: 32px 20px 24px;
  text-align: center;
  color: white;
}

/* Margins */
.sim-margin-32 {
  margin: 32px 0;
}

.sim-margin-top-24 {
  margin-top: 24px;
}

.sim-margin-top-20 {
  margin-top: 20px;
}

.sim-margin-top-10 {
  margin-top: 10px;
}

.sim-margin-bottom-20 {
  margin-bottom: 20px;
}

.sim-margin-bottom-12 {
  margin-bottom: 12px;
}

.sim-space-24 {
  margin-top: 24px;
}

.sim-space-20 {
  margin-top: 20px;
}

/* Dividers */
.sim-divider-section {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-light);
}

.sim-divider-note {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #e5e7eb;
  font-size: 10px;
  color: #999;
  line-height: 1.7;
}

/* Footer and misc */
.sim-footer-note {
  margin-top: 6px;
  font-size: 10px;
  color: #aaa;
}

.sim-footer-text {
  margin-top: 12px;
  font-size: 12px;
  opacity: 0.8;
}

/* Tables */
.sim-data-table {
  width: 100%;
  font-size: 12px;
  border-collapse: collapse;
  line-height: 1.6;
}

.sim-table-header {
  background: var(--primary);
  color: #fff;
  font-size: 11px;
}

/* === Missing class definitions (post-verification fix) === */
.pseo-wrap { background: var(--bg-gray); padding: 32px 0 48px; }

/* === 蓄電池・停電時家電グリッド モバイル対応 === */
@media (max-width: 600px) {
  .sim-grid-appliance {
    grid-template-columns: auto 1fr auto;
    gap: 2px 6px;
    font-size: 11px;
  }
  .sim-grid-appliance span:nth-child(3n+2) {
    /* 家電名カラム: 長い名前が溢れないようにする */
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .sim-guide-box { padding: 10px 12px; font-size: 11px; }
  .sim-footer-note { font-size: 9px; line-height: 1.6; }
  .sim-note-dashed { font-size: 10px; }
}

/* ── 回収テーブル共通ユーティリティ ── */
.recovery-year-row { background: #e6f9f5; font-weight: 700; }
.text-muted { color: var(--text-light, #888); }
.pcon-highlight { color: #dc2626; font-weight: 700; }
.pcon-note { font-size: 10px; color: #e74c3c; }

