.armo-compare-button {
  float: right;
  display: inline-grid;
  width: 34px;
  height: 34px;
  margin: -4px 0 -4px 8px;
  padding: 0;
  place-items: center;
  border: 1px solid #97aaae;
  border-radius: 999px;
  background: #f2f6f6;
  color: #395b61;
  cursor: pointer;
}

.armo-compare-button::before {
  content: "比";
  font-size: 0.78rem;
  font-weight: 900;
}

.armo-compare-button:hover,
.armo-compare-button:focus-visible {
  border-color: #315f66;
  background: #dfebed;
  color: #173e45;
  outline: none;
}

.armo-compare-button[aria-pressed="true"] {
  border-color: #285f66;
  background: #285f66;
  color: #fff;
}

.armo-compare-button[aria-pressed="true"]::before {
  content: "✓";
}

.armo-compare-selected > td {
  background-color: #e8f1f2 !important;
}

.armo-compare-tray {
  position: fixed;
  right: 20px;
  bottom: 20px;
  left: 20px;
  z-index: 8500;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  width: min(1080px, calc(100vw - 40px));
  min-height: 72px;
  margin: 0 auto;
  padding: 12px 14px;
  border: 1px solid #78959a;
  border-radius: 16px;
  background: rgba(239, 246, 246, 0.97);
  color: #17383f;
  box-shadow: 0 20px 58px rgba(17, 43, 48, 0.24);
  backdrop-filter: blur(12px);
}

.armo-compare-tray[hidden] {
  display: none !important;
}

.armo-compare-tray__count {
  display: grid;
  min-width: 94px;
  gap: 2px;
}

.armo-compare-tray__count span {
  color: #557176;
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.1em;
}

.armo-compare-tray__count strong {
  color: #163840;
  font-size: 0.94rem;
}

.armo-compare-tray__items {
  display: flex;
  min-width: 0;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.armo-compare-chip {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 8px;
  max-width: 230px;
  min-height: 40px;
  padding: 0 10px 0 12px;
  border: 1px solid #afc0c3;
  border-radius: 10px;
  background: #fff;
  color: #24474e;
  font-size: 0.8rem;
  font-weight: 800;
}

.armo-compare-chip__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.armo-compare-chip button {
  display: inline-grid;
  width: 24px;
  height: 24px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: #e7eeee;
  color: #37585e;
  font: inherit;
  cursor: pointer;
}

.armo-compare-tray__actions {
  display: flex;
  gap: 7px;
}

.armo-compare-tray__actions button,
.armo-compare-dialog button {
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid #7d999e;
  border-radius: 9px;
  background: #f9fbfb;
  color: #1d4249;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 850;
  cursor: pointer;
}

.armo-compare-tray__actions .is-primary,
.armo-compare-dialog .is-primary {
  border-color: #285f66;
  background: #285f66;
  color: #fff;
}

.armo-compare-tray__actions button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

body.armo-has-compare-tray {
  padding-bottom: 112px;
}

.armo-compare-dialog {
  width: min(1120px, calc(100vw - 30px));
  max-width: none;
  max-height: min(88dvh, 900px);
  padding: 0;
  overflow: hidden;
  border: 1px solid #849da2;
  border-radius: 20px;
  background: #f4f8f8;
  color: #17343a;
  box-shadow: 0 26px 90px rgba(16, 40, 45, 0.32);
}

.armo-compare-dialog::backdrop {
  background: rgba(16, 37, 42, 0.62);
  backdrop-filter: blur(3px);
}

.armo-compare-dialog__layout {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: min(88dvh, 900px);
}

.armo-compare-dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  border-bottom: 1px solid #b7c9cc;
  background: #dce9eb;
}

.armo-compare-dialog__header span {
  display: block;
  margin-bottom: 4px;
  color: #4d6d72;
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.13em;
}

.armo-compare-dialog__header h2 {
  margin: 0;
  color: #102f36;
  font-size: 1.3rem;
}

.armo-compare-dialog__body {
  padding: 18px 22px 24px;
  overflow: auto;
}

.armo-compare-table-wrap {
  min-width: 720px;
  overflow: visible;
  border: 1px solid #bdcdcf;
  border-radius: 13px;
  background: #fff;
}

.armo-compare-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  color: #18373e;
  table-layout: fixed;
}

.armo-compare-table th,
.armo-compare-table td {
  padding: 12px 13px;
  border-right: 1px solid #d2dcde;
  border-bottom: 1px solid #d2dcde;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.armo-compare-table tr:last-child th,
.armo-compare-table tr:last-child td {
  border-bottom: 0;
}

.armo-compare-table th:last-child,
.armo-compare-table td:last-child {
  border-right: 0;
}

.armo-compare-table thead th {
  background: #eaf1f2;
  color: #173b42;
  font-size: 0.86rem;
}

.armo-compare-table thead th:first-child,
.armo-compare-table tbody th {
  width: 145px;
  background: #f0f5f5;
  color: #48676d;
  font-size: 0.78rem;
  font-weight: 850;
}

.armo-compare-table__product {
  display: grid;
  gap: 8px;
}

.armo-compare-table__product strong {
  color: #16353c;
  line-height: 1.4;
}

.armo-compare-table__product button {
  justify-self: start;
  min-height: 32px;
  padding: 0 9px;
  color: #773b33;
}

.armo-compare-table tbody td {
  font-size: 0.87rem;
  font-weight: 700;
  line-height: 1.5;
}

.armo-compare-table tr.has-difference th {
  color: #694c12;
}

.armo-compare-table tr.has-difference td {
  background: #fff9eb;
}

.armo-compare-table td.is-masked {
  color: #5f7478;
  font-style: italic;
}

.armo-compare-table td.is-best {
  background: #e5f1e8 !important;
  color: #235238;
}

.armo-compare-best {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #cfe5d4;
  color: #245136;
  font-size: 0.68rem;
  font-weight: 900;
}

.armo-compare-dialog__empty {
  margin: 0;
  padding: 22px;
  border: 1px dashed #9db2b6;
  border-radius: 13px;
  background: #eaf1f2;
  color: #3d5e64;
  font-weight: 700;
  line-height: 1.65;
}

.armo-compare-dialog__safety {
  margin: 14px 0 0;
  color: #5b4a25;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.55;
}

.armo-compare-dialog__footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 22px;
  border-top: 1px solid #b7c9cc;
  background: #e8f0f1;
}

.armo-compare-toast {
  position: fixed;
  right: 20px;
  bottom: 108px;
  z-index: 10000;
  max-width: min(390px, calc(100vw - 32px));
  padding: 12px 15px;
  border: 1px solid #66878d;
  border-radius: 11px;
  background: #183f46;
  color: #fff;
  font-size: 0.87rem;
  font-weight: 800;
  box-shadow: 0 15px 42px rgba(13, 39, 44, 0.25);
}

@media (max-width: 760px) {
  .armo-compare-tray {
    right: 10px;
    bottom: 76px;
    left: 10px;
    grid-template-columns: 1fr auto;
    width: calc(100vw - 20px);
    gap: 9px;
    padding: 10px;
  }

  .armo-compare-tray__count {
    min-width: 0;
  }

  .armo-compare-tray__items {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .armo-compare-tray__actions button:not(.is-primary) {
    display: none;
  }

  body.armo-has-compare-tray {
    padding-bottom: 178px;
  }

  .armo-compare-dialog {
    width: calc(100vw - 16px);
    max-height: 90dvh;
    border-radius: 16px;
  }

  .armo-compare-dialog__header,
  .armo-compare-dialog__body,
  .armo-compare-dialog__footer {
    padding-left: 14px;
    padding-right: 14px;
  }

  .armo-compare-dialog__footer button {
    flex: 1;
  }

  .armo-compare-toast {
    right: 16px;
    bottom: 174px;
  }
}

