#compareDialog {
  width: min(1280px, calc(100% - 28px));
  max-height: 94vh;
  border-radius: 14px;
}
#compareDialog .dialog-close {
  position: fixed;
}
.compare-bar {
  width: min(940px, calc(100% - 40px));
  min-height: 76px;
  padding: 12px 14px 12px 20px;
  gap: 12px;
  border: 1px solid #cfe3e1 !important;
  border-radius: 14px !important;
  background-color: rgba(255, 255, 255, 0.98) !important;
  background-image: none !important;
  color: #493f44 !important;
  box-shadow: 0 12px 35px rgba(49, 35, 42, 0.18);
  backdrop-filter: blur(12px);
}
.compare-bar .compare-summary {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 15px;
}
.compare-bar .compare-summary > strong {
  flex: 0 0 auto;
  color: #175b61;
  font-size: 15px;
  white-space: nowrap;
}
.compare-bar .compare-summary > strong b {
  color: #079b9d;
  font-size: 20px;
}
.compare-bar .compare-name-list {
  min-width: 0;
  margin: 0;
  display: flex;
  gap: 7px;
  color: inherit;
  overflow: hidden;
}
.compare-name-chip {
  max-width: 190px;
  padding: 6px 9px;
  border-radius: 6px;
  border: 1px solid #c9e4e1;
  background: #e4f3f1;
  color: #24545b !important;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.compare-bar .compare-clear {
  flex: 0 0 auto;
  padding: 9px 10px;
  color: #746870;
  font-size: 14px;
  white-space: nowrap;
}
.compare-bar .compare-clear:hover {
  color: #087f81;
}
.compare-bar .compare-go {
  flex: 0 0 auto;
  padding: 12px 18px;
  border-radius: 7px;
  background: #079b9d;
  color: #fff;
  white-space: nowrap;
}
.compare-bar .compare-go:hover {
  background: #087f81;
}
.results-shell .card-side .compare-check,
.results-shell .card-actions .compare-check {
  min-width: 124px;
  min-height: 44px;
  margin-top: auto;
  padding: 9px 13px;
  border: 1px solid #9dd8d4;
  border-radius: 6px;
  background: #effaf8;
  color: #087f81;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
}
.results-shell .compare-check:hover {
  border-color: #0bbbbd;
  background: #e2f6f3;
}
.results-shell .compare-check input {
  width: 18px;
  height: 18px;
  margin: 0;
}
.results-shell .card-actions {
  justify-content: flex-end;
}
.compare-workspace {
  background: #fff;
}
.compare-workspace-head {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: end;
  padding: 30px 34px 22px;
  border-bottom: 1px solid #dfe6e6;
}
.compare-workspace-head h2 {
  margin: 6px 0 7px;
  color: #173c48;
  font-size: 32px;
}
.compare-workspace-head p {
  margin: 0;
  color: #71686d;
}
.compare-tools {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.compare-tools label {
  font-size: 14px;
  color: #51494d;
  white-space: nowrap;
}
.compare-tools input {
  accent-color: #0bbbbd;
}
.compare-scroll {
  overflow: visible;
}
.compare-top-grid {
  display: grid;
  grid-template-columns: 170px repeat(3, minmax(230px, 1fr));
  min-width: 860px;
  border-bottom: 1px solid #dfe5e5;
  position: sticky;
  top: 0;
  z-index: 8;
  background: #fff;
  box-shadow: 0 8px 18px rgba(23, 60, 72, 0);
  transition: box-shadow 0.2s ease;
}
.compare-top-grid.is-compact {
  box-shadow: 0 8px 18px rgba(23, 60, 72, 0.13);
}
.compare-top-grid.is-compact .compare-corner,
.compare-top-grid.is-compact .compare-home-card,
.compare-top-grid.is-compact .compare-add-slot {
  min-height: 82px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.compare-top-grid.is-compact .compare-home-photo,
.compare-top-grid.is-compact .compare-home-card p,
.compare-top-grid.is-compact .compare-home-card a,
.compare-top-grid.is-compact .compare-corner span,
.compare-top-grid.is-compact .compare-add-slot small {
  display: none;
}
.compare-top-grid.is-compact .compare-remove {
  display: none;
}
.compare-top-grid.is-compact .compare-home-card h3 {
  min-height: 0;
  margin-bottom: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.compare-top-grid.is-compact .compare-add-slot span {
  width: 32px;
  height: 32px;
  font-size: 20px;
}
.compare-top-grid.is-compact .compare-add-slot b {
  margin-top: 4px;
  font-size: 13px;
}
.compare-corner {
  padding: 22px 18px;
  background: #f4f9f8;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.compare-corner b {
  color: #173c48;
}
.compare-corner span {
  margin-top: 7px;
  color: #746b70;
  font-size: 12px;
  line-height: 1.5;
}
.compare-home-card,
.compare-add-slot {
  position: relative;
  min-height: 250px;
  padding: 18px;
  border: 0;
  border-left: 1px solid #dfe5e5;
  background: #fff;
  text-align: left;
}
.compare-home-photo {
  height: 112px;
  margin-bottom: 13px;
  background: #edf3f2;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: #8b9493;
  font-size: 13px;
}
.compare-home-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.compare-home-card h3 {
  min-height: 48px;
  margin: 0 24px 5px 0;
  color: #173c48;
  font-size: 16px;
  line-height: 1.5;
}
.compare-home-card p {
  margin: 0;
  color: #7b7177;
  font-size: 13px;
}
.compare-home-card a {
  display: inline-block;
  margin-top: 10px;
  color: #078d8f;
  font-size: 13px;
  font-weight: 700;
}
.compare-remove {
  position: absolute;
  z-index: 2;
  right: 12px;
  top: 10px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: #5f555a;
  font-size: 22px;
  box-shadow: 0 2px 9px rgba(0, 0, 0, 0.13);
}
.compare-add-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: #82908e;
  text-align: center;
}
.compare-add-slot span {
  width: 54px;
  height: 54px;
  border: 1px dashed #9fcac7;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #0aaeb0;
  font-size: 30px;
}
.compare-add-slot b {
  margin-top: 12px;
  color: #176f73;
}
.compare-add-slot small {
  margin-top: 5px;
}
.enhanced-compare-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  table-layout: fixed;
}
.enhanced-compare-table .compare-label-col {
  width: 170px;
}
.enhanced-compare-table th,
.enhanced-compare-table td {
  padding: 15px 18px;
  border-right: 1px solid #dfe5e5;
  border-bottom: 1px solid #dfe5e5;
  text-align: left;
  vertical-align: top;
  font-size: 14px;
  line-height: 1.6;
}
.enhanced-compare-table th[scope="row"] {
  width: 170px;
  background: #fbfcfc;
  color: #4f474b;
}
.enhanced-compare-table td {
  color: #263f47;
}
.enhanced-compare-table .compare-section-row th {
  padding: 12px 18px;
  background: #eaf6f4;
  color: #0a7476;
  font-size: 16px;
}
.highlight-differences .enhanced-compare-table tr.compare-different td {
  background: #fffaf0;
}
.highlight-differences
  .enhanced-compare-table
  tr.compare-different
  th[scope="row"] {
  box-shadow: inset 4px 0 #76c3cf;
}
.hide-same .enhanced-compare-table tr.compare-same {
  display: none;
}
.compare-empty-value {
  color: #b7bfc0;
}
.compare-workspace-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 18px 34px;
  background: #f7f9f9;
}
.compare-workspace-foot button {
  border: 1px solid #0bbbbd;
  background: #fff;
  color: #078d8f;
  padding: 10px 16px;
  font-weight: 700;
}
.compare-workspace-foot span {
  color: #7c7378;
  font-size: 12px;
}
@media (max-width: 700px) {
  .compare-scroll {
    overflow-x: auto;
  }
  #compareDialog {
    width: 100%;
    max-height: 100vh;
    height: 100vh;
    border-radius: 0;
  }
  .compare-workspace-head {
    display: block;
    padding: 24px 20px;
  }
  .compare-tools {
    margin-top: 18px;
  }
  .compare-workspace-foot {
    padding: 15px 20px;
  }
  .compare-workspace-foot span {
    display: none;
  }
}
