/* ============================================================
   車中泊ポータブル電源 診断サイト スタイル
   ============================================================ */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #2c5f4a;
  --primary-dark: #1e4435;
  --accent: #e8a33d;
  --bg: #f4f6f4;
  --text: #1f2421;
  --muted: #6b7670;
  --card: #ffffff;
  --border: #e0e4e0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN",
               "Noto Sans JP", "Yu Gothic", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-text-size-adjust: 100%;
}

a { color: inherit; }

.container { max-width: 860px; margin: 0 auto; padding: 0 20px; }

/* --- ヘッダー --- */
.site-header {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: #fff;
  padding: 56px 20px 48px;
  text-align: center;
}
.site-header .badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  padding: 5px 16px;
  font-size: 13px;
  margin-bottom: 18px;
}
.site-header h1 {
  font-size: clamp(24px, 5vw, 38px);
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 14px;
}
.site-header p { font-size: clamp(14px, 2.5vw, 17px); opacity: 0.9; }

/* --- タブ --- */
.tabs {
  display: flex;
  gap: 8px;
  max-width: 860px;
  margin: -24px auto 0;
  padding: 0 20px;
  position: relative;
}
.tab-button {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 12px 12px 0 0;
  padding: 16px 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  color: var(--muted);
  transition: background 0.15s, color 0.15s;
}
.tab-button.active {
  background: var(--card);
  color: var(--primary);
  box-shadow: 0 -3px 0 var(--accent) inset;
}

/* --- パネル --- */
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.panel-inner {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0 0 14px 14px;
  padding: 32px 24px;
  margin-bottom: 32px;
}
.panel-inner h2 { font-size: 20px; margin-bottom: 6px; }
.panel-lead { color: var(--muted); font-size: 14px; margin-bottom: 24px; }

/* --- 容量シミュレーター --- */
.appliance-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
}
.appliance-check {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  flex: 1;
  font-size: 15px;
}
.appliance-check input { width: 18px; height: 18px; accent-color: var(--primary); }
.watt-badge {
  background: var(--bg);
  color: var(--muted);
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 6px;
}
.hours-input { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.hours-input input {
  width: 62px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  text-align: right;
}
.hours-input input:disabled { background: var(--bg); color: #b5bcb6; }

.cta-button {
  display: block;
  width: 100%;
  background: var(--accent);
  color: #3a2a05;
  border: none;
  border-radius: 10px;
  padding: 15px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  margin-top: 24px;
}
.cta-button:hover { filter: brightness(1.05); }

/* --- 結果ボックス --- */
.result { margin-top: 8px; display: none; }
.result.show { display: block; }
.result-box {
  background: #f0f5f2;
  border: 1px solid #cfe0d6;
  border-radius: 12px;
  padding: 24px 20px;
  margin-top: 20px;
}
.result-box h3 { font-size: 18px; margin-bottom: 16px; color: var(--primary-dark); }
.result-box h4 { font-size: 16px; margin: 24px 0 12px; }

.result-numbers { display: flex; gap: 12px; flex-wrap: wrap; }
.num-card {
  flex: 1;
  min-width: 130px;
  background: #fff;
  border-radius: 10px;
  padding: 16px;
  text-align: center;
}
.num-card .num { display: block; font-size: 26px; font-weight: 800; color: var(--primary); }
.num-card .num-label { font-size: 12px; color: var(--muted); }

.breakdown { margin-top: 14px; font-size: 14px; }
.breakdown summary { cursor: pointer; color: var(--primary); }
.breakdown ul { margin: 8px 0 0 20px; color: var(--muted); }

.warn {
  background: #fff4e0;
  border: 1px solid #f0d49a;
  border-radius: 8px;
  padding: 12px;
  font-size: 13px;
  margin-top: 14px;
}
.hint { color: var(--muted); font-size: 14px; }

/* --- 商品カード --- */
.product-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
.product-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px;
  position: relative;
}
.product-card.best { border-color: var(--accent); border-width: 2px; }
.best-badge {
  position: absolute;
  top: -11px;
  left: 16px;
  background: var(--accent);
  color: #3a2a05;
  font-size: 12px;
  font-weight: 800;
  padding: 3px 12px;
  border-radius: 12px;
}
.product-brand { font-size: 12px; color: var(--muted); font-weight: 700; }
.product-name { font-size: 16px; font-weight: 700; margin: 2px 0 8px; }
.product-specs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.product-specs span {
  background: var(--bg);
  font-size: 12px;
  padding: 3px 9px;
  border-radius: 6px;
}
.product-highlight { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.product-price { font-size: 22px; font-weight: 800; color: var(--text); }
.product-price small { font-size: 12px; color: var(--muted); font-weight: 400; }
.product-cta {
  display: block;
  text-align: center;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  padding: 11px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  margin-top: 12px;
}
.product-cta:hover { background: var(--primary-dark); }

.disclaimer { font-size: 11px; color: var(--muted); margin-top: 16px; }

/* --- 診断 --- */
.diag-progress { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.diag-question { font-size: 19px; margin-bottom: 18px; }
.diag-options { display: grid; gap: 10px; }
.diag-option {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 15px 16px;
  font-size: 15px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}
.diag-option:hover { border-color: var(--primary); background: #f0f5f2; }
.diag-back {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  margin-top: 16px;
}
.diag-profile { font-size: 15px; margin-bottom: 8px; }
.diag-power-class {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
  background: #fff;
  border-radius: 8px;
  padding: 10px 14px;
}
.diag-restart {
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 14px;
  cursor: pointer;
  margin-top: 18px;
}

/* --- ギアリスト --- */
.gear-list { list-style: none; display: grid; gap: 12px; }
.gear-item { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; }
.gear-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gear-cat {
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 6px;
}
.gear-name { font-weight: 700; font-size: 15px; }
.gear-essential {
  background: #ffe0e0;
  color: #c23b3b;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
}
.gear-reason { font-size: 13px; color: var(--muted); margin: 6px 0; }
.gear-link { font-size: 13px; color: var(--primary); font-weight: 700; text-decoration: none; }

/* --- 一般コンテンツ --- */
.content-section { margin: 32px 0; }
.content-section h2 {
  font-size: 19px;
  border-left: 4px solid var(--accent);
  padding-left: 12px;
  margin-bottom: 14px;
}
.content-section p { font-size: 14px; margin-bottom: 10px; }
.faq-item { border-bottom: 1px solid var(--border); padding: 12px 0; }
.faq-item summary { font-weight: 700; cursor: pointer; font-size: 15px; }
.faq-item p { margin-top: 8px; color: var(--muted); }

/* --- 記事ページ用 --- */
.content-section h1 { font-size: 22px; line-height: 1.4; margin-bottom: 14px; }
.content-section .lead {
  font-size: 15px;
  background: #f0f5f2;
  border-left: 4px solid var(--primary);
  padding: 12px 14px;
  border-radius: 0 8px 8px 0;
  margin-bottom: 20px;
}
.content-section h2 { margin-top: 26px; }
.content-section ul, .content-section ol { margin: 10px 0 10px 22px; font-size: 14px; }
.content-section table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin: 12px 0;
}
.content-section th, .content-section td {
  border: 1px solid var(--border);
  padding: 8px 10px;
  text-align: left;
}
.content-section th { background: var(--bg); }
.article-cta {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  margin: 26px 0;
}
.article-cta p { color: #fff; font-size: 14px; margin-bottom: 10px; }
.article-cta a {
  display: inline-block;
  background: var(--accent);
  color: #3a2a05;
  font-weight: 800;
  text-decoration: none;
  padding: 12px 22px;
  border-radius: 8px;
  font-size: 15px;
}
.exp-placeholder {
  background: #fff8e8;
  border: 1px dashed var(--accent);
  border-radius: 8px;
  padding: 14px;
  color: #8a6d2f;
  font-size: 14px;
}

/* --- フッター --- */
.site-footer {
  background: var(--primary-dark);
  color: rgba(255, 255, 255, 0.75);
  padding: 32px 20px;
  text-align: center;
  font-size: 12px;
  margin-top: 40px;
}
.site-footer a { color: rgba(255, 255, 255, 0.9); }
.site-footer .links { margin-bottom: 12px; }
.site-footer .links a { margin: 0 10px; }

@media (min-width: 620px) {
  .product-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}
