:root {
  --bg: #f5f7fa;
  --white: #ffffff;
  --text: #1a1a2e;
  --accent1: #e63946;
  --accent2: #2196f3;
  --accent3: #4caf50;
  --border: #d0d7e3;
  --header-bg: #1a1a2e;
  --tag-docomo: #e53935;
  --tag-au: #f57f17;
  --tag-sb: #1565c0;
  --tag-rakuten: #c62828;
  --tag-multi: #6a1b9a;
  --shadow: 0 2px 8px rgba(0,0,0,0.10);
}

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

body {
  font-family: 'Noto Sans JP', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.6;
}

small { font-size: 14px; font-weight: 700; }

header {
  background: var(--header-bg);
  color: #fff;
  padding: 12px 20px 10px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 4px solid var(--accent1);
}

header .emoji { font-size: 28px; }

header h1 {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 1px;
}

header .date {
  font-size: 15px;
  color: #c5cbd3;
  margin-left: auto;
  font-weight: 700;
  white-space: nowrap;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 10px 12px 20px;
}

/* ===== 凡例バー ===== */
.legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 10px;
  font-size: 15px;
  font-weight: 700;
}
.legend-item { display: flex; align-items: center; gap: 5px; }
.dot { width: 14px; height: 14px; border-radius: 50%; display: inline-block; }
.dot-docomo { background: var(--tag-docomo); }
.dot-au { background: var(--tag-au); }
.dot-sb { background: var(--tag-sb); }
.dot-rakuten { background: var(--tag-rakuten); }
.dot-multi { background: var(--tag-multi); }

/* ===== メインテーブル ===== */
.table-wrap {
  overflow-x: auto;
  overscroll-behavior-x: none;
  border-radius: 10px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  font-size: 15px;
}

thead th {
  background: var(--header-bg);
  color: #fff;
  padding: 9px 10px;
  font-size: 15px;
  font-weight: 900;
  text-align: center;
  white-space: nowrap;
  border-right: 1px solid rgba(255,255,255,0.1);
  position: sticky;
  top: 0;
  z-index: 10;
}

thead th:first-child { text-align: left; padding-left: 12px; }

tbody tr:nth-child(even) { background: #f0f4ff; }
tbody tr:hover { background: #e3f0ff; transition: background 0.15s; }

tbody td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid #e9ecef;
  vertical-align: middle;
  text-align: center;
  font-weight: 700;
}

tbody td:first-child {
  text-align: left;
  padding-left: 10px;
  min-width: 150px;
}

.company-name {
  font-size: 17px;
  font-weight: 900;
  display: block;
}

.category-tag {
  display: inline-block;
  font-size: 14px;
  padding: 2px 9px;
  border-radius: 10px;
  color: #fff;
  font-weight: 900;
  margin-top: 3px;
}

.tag-mno { background: #37474f; }
.tag-sub { background: #00897b; }
.tag-mvno { background: #5c6bc0; }

.line-tag {
  display: inline-block;
  font-size: 14px;
  padding: 2px 9px;
  border-radius: 10px;
  color: #fff;
  font-weight: 900;
  margin: 2px;
  white-space: nowrap;
}
.lt-docomo { background: var(--tag-docomo); }
.lt-au { background: var(--tag-au); }
.lt-sb { background: var(--tag-sb); }
.lt-rakuten { background: var(--tag-rakuten); }
.lt-own { background: #4caf50; }
.lt-multi { background: var(--tag-multi); }

.price-low { color: #d32f2f; font-weight: 900; white-space: nowrap; }
.price-mid { color: #1565c0; font-weight: 900; white-space: nowrap; }
.price-high { color: #37474f; font-weight: 700; }

.check { color: #2e7d32; font-size: 22px; }
.cross { color: #b71c1c; font-size: 22px; }
.tri  { color: #f57f17; font-size: 22px; }

.feature-list {
  font-size: 14px;
  text-align: left;
  color: #333;
  font-weight: 700;
  line-height: 1.65;
}

/* ===== 下部2カラム ===== */
.bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

@media (max-width: 800px) {
  .bottom-grid { grid-template-columns: 1fr; }
}

/* ===== カード ===== */
.card {
  background: var(--white);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 14px 16px;
}

.rec-card { margin-bottom: 14px; }

.card h2 {
  font-size: 18px;
  font-weight: 900;
  border-left: 4px solid var(--accent1);
  padding-left: 8px;
  margin-bottom: 12px;
  color: var(--text);
}

/* ===== 円グラフ ===== */
.chart-container {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.chart-container svg {
  width: 240px;
  height: 240px;
  flex-shrink: 0;
}

.chart-container svg text {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 900;
}

.chart-legend {
  flex: 1;
  min-width: 190px;
  font-size: 15px;
  font-weight: 700;
}

.chart-legend li {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 6px;
}

.cleg-dot {
  width: 15px;
  height: 15px;
  border-radius: 3px;
  flex-shrink: 0;
}

/* ===== おすすめ別 ===== */
.rec-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 800px) {
  .rec-grid { grid-template-columns: 1fr; }
}

.rec-item {
  background: #f0f4ff;
  border-radius: 8px;
  padding: 10px 12px;
  border-left: 4px solid var(--accent2);
}

.rec-item.red { border-left-color: var(--accent1); background: #fff3f3; }
.rec-item.green { border-left-color: var(--accent3); background: #f1f8f1; }
.rec-item.purple { border-left-color: #9c27b0; background: #f9f3ff; }
.rec-item.orange { border-left-color: #ff9800; background: #fff8f0; }

.rec-title {
  font-size: 15px;
  font-weight: 900;
  color: #555;
  margin-bottom: 4px;
}

.rec-val {
  font-size: 17px;
  font-weight: 900;
  color: var(--text);
}

.rec-sub {
  font-size: 14px;
  color: #555;
  font-weight: 700;
}

/* ===== 注意書き ===== */
.note {
  font-size: 14px;
  color: #555;
  font-weight: 700;
  margin-top: 8px;
  padding: 10px 12px;
  background: #f8f8f8;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
  line-height: 1.7;
}
