.compare-main {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto 80px;
  padding-top: 20px;
  font-size: 16px;
}

.compare-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
}

.compare-control-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 16px;
  margin-bottom: 6px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
}

.compare-seg {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.compare-tab {
  padding: 7px 22px;
  border: 1px solid var(--line);
  border-radius: var(--rs);
  background: transparent;
  color: var(--muted2);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .02em;
  transition: all .15s;
}

.compare-tab:hover:not(.active) {
  border-color: var(--line2);
  background: var(--panel-h);
  color: var(--text);
}

.compare-tab.active {
  border-color: transparent;
  background: var(--accent);
  box-shadow: 0 2px 8px var(--a-glow);
  color: #fff;
}

.compare-tab-panel {
  display: none;
  padding: 8px 0 0;
}

.compare-tab-panel.active {
  display: block;
}

.data-basis-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 11px 15px;
  margin-bottom: 8px;
  color: var(--muted2);
  font-size: 11px;
}

.data-basis-bar strong {
  color: var(--accent);
  font-size: 12px;
}

.data-basis-bar span {
  display: inline-flex;
  gap: 4px;
}

.data-basis-bar b {
  color: var(--text);
}

.compare-filter-bar {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 16px;
  margin-bottom: 14px;
}

.compare-filter-bar label {
  display: flex;
  min-width: 180px;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.compare-filter-bar input,
.compare-filter-bar select {
  width: 100%;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--rs);
  outline: none;
  background: var(--bg2);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}

.compare-filter-bar input:focus,
.compare-filter-bar select:focus {
  border-color: transparent;
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.compare-filter-bar input::placeholder {
  color: var(--muted);
}

.ranking-notice {
  padding: 10px 13px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--rs);
  background: var(--a-dim);
  color: var(--muted2);
  font-size: 12px;
  line-height: 1.55;
}

.compare-primary {
  padding: 9px 14px;
  border: 0;
  border-radius: var(--rs);
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.compare-primary {
  min-height: 34px;
}

.compare-primary:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.judgement {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  margin-bottom: 22px;
  border-left: 3px solid var(--accent);
}

.judgement strong {
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 12px;
}

.judgement span {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.55;
}

.table-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 10px;
}

.table-head strong {
  font-size: 17px;
}

.table-head span {
  color: var(--muted);
  font-size: 12px;
}

.compare-table-wrap {
  overflow: auto;
}

.compare-table-wrap table {
  width: 100%;
  min-width: 960px;
  border-collapse: collapse;
}

.compare-table-wrap th,
.compare-table-wrap td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 13px;
}

.compare-table-wrap th {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .03em;
}

.compare-table-wrap td strong {
  font-size: 14px;
}

.same-comparison-table {
  min-width: 1180px !important;
  table-layout: fixed;
}

.same-comparison-table th,
.same-comparison-table td {
  padding-right: 12px;
  padding-left: 12px;
  white-space: nowrap;
}

.same-comparison-table th:nth-child(1) { width: 7%; }
.same-comparison-table th:nth-child(2) { width: 15%; }
.same-comparison-table th:nth-child(3) { width: 18%; }
.same-comparison-table th:nth-child(4) { width: 9%; }
.same-comparison-table th:nth-child(5) { width: 11%; }
.same-comparison-table th:nth-child(6) { width: 11%; }
.same-comparison-table th:nth-child(7) { width: 8%; }
.same-comparison-table th:nth-child(8) { width: 8%; }
.same-comparison-table th:nth-child(9) { width: 8%; }
.same-comparison-table th:nth-child(10) { width: 5%; }

.same-comparison-table th small {
  color: var(--muted);
  font-size: 10px;
}

.score {
  font-weight: 800;
}

.status {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--a-dim);
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
}

.evidence-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.evidence-grid article {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--rs);
}

.evidence-grid h4 {
  margin-bottom: 6px;
  color: var(--accent);
  font-size: 12px;
}

.evidence-grid p {
  color: var(--muted2);
  font-size: 12px;
  white-space: pre-line;
}

.empty {
  padding: 34px !important;
  color: var(--muted);
  text-align: center !important;
}

.choice-input-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 12px;
}

.choice-input-card {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 16px;
}

.choice-input-card > span {
  grid-column: 1 / -1;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.choice-input-card label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.choice-input-card select {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--rs);
  outline: none;
  background: var(--bg2);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}

.choice-input-card select:focus {
  border-color: transparent;
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.compare-submit {
  display: block;
  min-width: 220px;
  margin: 0 auto 20px;
}

.choice-comparison-table {
  min-width: 780px !important;
}

.choice-comparison-table thead th {
  padding-top: 14px;
  padding-bottom: 14px;
  background: var(--bg2);
  color: var(--text);
  font-size: 12px;
}

.choice-comparison-table thead th strong,
.choice-comparison-table thead th small {
  display: block;
}

.choice-comparison-table thead th strong {
  font-size: 13px;
}

.choice-comparison-table thead th small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.choice-comparison-table tbody th {
  width: 145px;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.choice-comparison-table tbody td {
  color: var(--muted2);
  font-size: 12px;
}

.choice-comparison-table tbody tr:nth-child(3) {
  background: var(--a-dim);
}

.choice-comparison-table tbody tr:nth-child(3) td {
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}

.comparison-winner {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--a-dim);
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
}

.comparison-winner::before {
  content: "✓";
  font-size: 10px;
}

.comparison-winner.neutral {
  background: var(--bg2);
  color: var(--muted2);
}

.comparison-winner.neutral::before {
  display: none;
}

.choice-evidence-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 14px 0;
}

.choice-evidence {
  overflow: hidden;
  padding: 0;
}

.choice-evidence summary {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 14px 42px 14px 16px;
  color: var(--text);
  cursor: pointer;
  list-style: none;
}

.choice-evidence summary::-webkit-details-marker {
  display: none;
}

.choice-evidence summary::after {
  position: absolute;
  top: 50%;
  right: 16px;
  color: var(--accent);
  content: "+";
  font-size: 18px;
  font-weight: 500;
  transform: translateY(-50%);
}

.choice-evidence[open] summary {
  border-bottom: 1px solid var(--line);
  background: var(--a-dim);
}

.choice-evidence[open] summary::after {
  content: "−";
}

.choice-evidence summary span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.choice-evidence summary small {
  overflow: hidden;
  color: var(--muted2);
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.choice-evidence .evidence-grid {
  grid-template-columns: 1fr;
  gap: 0;
  padding: 6px 16px 12px;
}

.choice-evidence .evidence-grid article {
  padding: 11px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}

.choice-evidence .evidence-grid article:last-child {
  border-bottom: 0;
}

.choice-evidence .evidence-grid h4 {
  margin-bottom: 4px;
  color: var(--text);
  font-size: 11px;
}

.choice-evidence .evidence-grid p {
  color: var(--muted2);
  font-size: 11px;
  line-height: 1.65;
}

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

@media (max-width: 700px) {
  .compare-main {
    width: calc(100% - 32px);
  }

  .compare-control-bar,
  .compare-filter-bar {
    align-items: stretch;
  }

  .compare-seg {
    width: 100%;
  }

  .compare-tab {
    flex: 1;
  }

  .compare-filter-bar label {
    min-width: 100% !important;
  }

  .compare-primary {
    width: 100%;
  }

  .choice-input-grid,
  .choice-evidence-grid {
    grid-template-columns: 1fr;
  }

  .choice-input-card {
    grid-template-columns: 1fr;
  }

  .choice-input-card > span {
    grid-column: auto;
  }

  .table-head {
    align-items: start;
    flex-direction: column;
    gap: 3px;
  }

  .judgement {
    align-items: start;
    flex-direction: column;
    gap: 4px;
  }
}
