.compare-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  min-height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #6b7280;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
}
.compare-toggle::before {
  content: '+';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  margin-right: 4px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
}
.compare-toggle:hover { color: #111827; }
.compare-toggle[aria-pressed="true"] { background: transparent; color: #111827; }
.compare-toggle[aria-pressed="true"]::before { content: '✓'; }
.compare-toggle[aria-disabled="true"]:not([aria-pressed="true"]) { color: #c4c9d1; }
.compare-toggle:focus-visible { outline: 2px solid #111827; outline-offset: 2px; }
.complex-compare-toggle,
.complex-compare-toggle[aria-pressed="true"] {
  width: auto;
  min-width: 0;
  min-height: 32px;
  padding: 0;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
}

.comparison-tray {
  position: fixed;
  z-index: 80;
  right: 0;
  bottom: 0;
  left: 0;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  border-top: 1px solid #d1d5db;
  background: rgba(255, 255, 255, 0.98);
}
.comparison-tray-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  width: min(calc(100% - 40px), 600px);
  min-height: 64px;
  margin: 0 auto;
}
.comparison-tray-summary {
  min-width: 0;
  overflow: hidden;
  color: #111827;
  font-size: 14px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.comparison-tray-clear {
  min-height: 40px;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: #6b7280;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}
.comparison-tray-clear:hover { color: #111827; }
.comparison-tray-clear:focus-visible { outline: 2px solid #111827; outline-offset: 2px; }
.comparison-tray-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid #111827;
  background: #111827;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.comparison-tray-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
body.has-comparison-tray { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }

.comparison-container { max-width: 940px; }
.comparison-page { padding: 10px 0 44px; }
.comparison-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0 22px;
  border-bottom: 1px solid #d1d5db;
}
.comparison-hero > div { min-width: 0; }
.comparison-hero h1 {
  margin: 0;
  color: #111827;
  font-size: clamp(28px, 4vw, 34px);
  line-height: 1.2;
  letter-spacing: -0.7px;
}
.comparison-hero p {
  margin: 9px 0 0;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.55;
  word-break: keep-all;
}
.comparison-add-link {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  color: #374151;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.comparison-add-link:hover { color: #111827; }
.comparison-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 70px;
  border-bottom: 1px solid #d1d5db;
}
.comparison-filter-field { display: flex; align-items: center; gap: 12px; }
.comparison-filter label { color: #374151; font-size: 13px; font-weight: 700; white-space: nowrap; }
.comparison-filter select {
  min-width: 150px;
  min-height: 42px;
  padding: 0 34px 0 12px;
  border: 1px solid #d1d5db;
  border-radius: 0;
  background: #fff;
  color: #111827;
  font-size: 16px;
}
.comparison-filter p { margin: 0; color: #6b7280; font-size: 12px; text-align: right; }
.comparison-filter noscript button { min-height: 40px; }

.comparison-desktop { margin-top: 24px; }
.comparison-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  color: #111827;
}
.comparison-table caption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.comparison-label-column { width: 142px; }
.comparison-table th,
.comparison-table td { border-left: 1px solid #e5e7eb; }
.comparison-table tr > :first-child { border-left: 0; }
.comparison-table thead { border-bottom: 2px solid #111827; }
.comparison-table thead > tr > th {
  padding: 0 16px 18px;
  color: #6b7280;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  vertical-align: bottom;
}
.comparison-table thead > tr > th:first-child { padding-left: 0; }
.comparison-table-head { position: relative; min-height: 98px; padding-right: 34px; }
.comparison-table-head p {
  overflow: hidden;
  margin: 0 0 8px;
  color: #6b7280;
  font-size: 11px;
  font-weight: 450;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.comparison-table-title {
  display: -webkit-box;
  overflow: hidden;
  color: #111827;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.3px;
  text-decoration: none;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.comparison-remove {
  padding: 0;
  border: 0;
  background: transparent;
  color: #6b7280;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}
.comparison-table-head .comparison-remove { position: absolute; top: -2px; right: 0; }
.comparison-remove:hover { color: #111827; }
.comparison-remove:focus-visible { outline: 2px solid #111827; outline-offset: 3px; }
.comparison-table tbody tr { border-bottom: 1px solid #e5e7eb; }
.comparison-table tbody th,
.comparison-table tfoot th {
  padding: 17px 16px 17px 0;
  color: #6b7280;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  text-align: left;
}
.comparison-table tbody td,
.comparison-table tfoot td {
  padding: 17px 16px;
  color: #111827;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  text-align: left;
  font-variant-numeric: tabular-nums;
}
.comparison-table .comparison-primary-row th,
.comparison-table .comparison-primary-row td { padding-top: 21px; padding-bottom: 21px; }
.comparison-table .comparison-primary-row td strong { font-size: 19px; font-weight: 800; }
.comparison-table .comparison-primary-row td span { margin-left: 4px; color: #6b7280; font-size: 11px; font-weight: 500; }
.comparison-table .is-missing { color: #6b7280; font-weight: 500; }
.comparison-table tfoot { border-bottom: 1px solid #d1d5db; }
.comparison-table tfoot a { color: #374151; font-size: 12px; font-weight: 700; text-decoration: none; }
.comparison-mobile-list { display: none; }

.comparison-empty { padding: 72px 0 84px; border-bottom: 1px solid #e5e7eb; text-align: center; }
.comparison-empty h2 { margin: 0; color: #111827; font-size: 21px; }
.comparison-empty p { margin: 10px 0 22px; color: #6b7280; font-size: 13px; }
.comparison-empty a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid #111827;
  background: #111827;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.comparison-method { margin-top: 48px; border-top: 1px solid #d1d5db; }
.comparison-method summary {
  min-height: 52px;
  padding: 17px 0 0;
  color: #374151;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.comparison-method > div { max-width: 780px; padding: 0 0 8px; }
.comparison-method p { margin: 8px 0 0; color: #6b7280; font-size: 12px; line-height: 1.75; word-break: keep-all; }
.comparison-method code { font-family: inherit; }

@media (max-width: 800px) {
  .comparison-page { padding-top: 4px; }
  .comparison-hero { align-items: center; gap: 16px; padding: 18px 0 17px; }
  .comparison-hero h1 { font-size: 28px; }
  .comparison-add-link { min-height: 44px; }
  .comparison-filter { display: grid; grid-template-columns: 1fr; gap: 8px; min-height: 0; padding: 18px 0 16px; }
  .comparison-filter-field { display: grid; grid-template-columns: 74px minmax(0, 1fr); }
  .comparison-filter select { width: 100%; min-width: 0; }
  .comparison-filter p { text-align: left; }
  .comparison-desktop { display: none; }
  .comparison-mobile-list { display: grid; gap: 0; }
  .comparison-card { min-width: 0; padding: 24px 0 8px; border-bottom: 1px solid #d1d5db; }
  .comparison-card-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding-bottom: 17px; }
  .comparison-card-head > div { min-width: 0; }
  .comparison-card-head p { overflow: hidden; margin: 0 0 6px; color: #6b7280; font-size: 11px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
  .comparison-card-head h2 { margin: 0; color: #111827; font-size: 19px; line-height: 1.4; letter-spacing: -0.3px; }
  .comparison-card-head h2 a { color: inherit; text-decoration: none; }
  .comparison-card-head .comparison-remove { align-self: start; min-width: 40px; min-height: 32px; }
  .comparison-facts { margin: 0; }
  .comparison-facts > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 16px; min-height: 52px; padding: 14px 0; border-top: 1px solid #e5e7eb; }
  .comparison-facts dt { color: #6b7280; font-size: 12px; }
  .comparison-facts dd { margin: 0; color: #111827; font-size: 14px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
  .comparison-facts dd.is-missing { color: #6b7280; font-weight: 500; }
  .comparison-facts .comparison-fact-primary { min-height: 64px; }
  .comparison-fact-primary dd strong { font-size: 20px; font-weight: 800; }
  .comparison-fact-primary dd span { margin-left: 4px; color: #6b7280; font-size: 11px; font-weight: 500; }
  .comparison-detail-link { display: flex; justify-content: flex-end; gap: 6px; min-height: 44px; align-items: center; color: #374151; font-size: 12px; font-weight: 700; text-decoration: none; }
  .comparison-method { margin-top: 40px; }
}

@media (max-width: 430px) {
  .comparison-tray-inner { gap: 8px; }
  .comparison-tray-summary { font-size: 13px; }
  .comparison-tray-action { min-width: 82px; padding: 0 11px; }
  .comparison-hero p { max-width: 235px; }
}
