.hrp-compare {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px 60px;
  color: #33251f;
}

.hrp-compare__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 24px;
}

.hrp-compare h1 {
  margin: 0 0 8px;
  font-size: clamp(24px, 4vw, 38px);
  line-height: 1.3;
}

.hrp-compare__header p {
  margin: 0;
  color: #68584d;
}

.hrp-compare-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.hrp-compare-actions a,
.hrp-compare-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 9px 14px;
  border: 1px solid #d8c5aa;
  border-radius: 999px;
  background: #fff;
  color: #684418;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.hrp-compare-actions button {
  border-color: #9c651f;
  background: #9c651f;
  color: #fff;
}

.hrp-compare-grid {
  display: grid;
  grid-template-columns: repeat(var(--count), minmax(0, 1fr));
  gap: 14px;
}

.hrp-compare-card {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid #eadfce;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 5px 18px rgba(60, 40, 20, 0.08);
}

.hrp-compare-remove {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 2px 10px rgba(51, 37, 31, .14);
  color: #684418;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  backdrop-filter: blur(8px);
}

.hrp-compare-card img,
.hrp-compare-image-placeholder {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.hrp-compare-image-placeholder {
  background: #f5f1eb;
  object-fit: contain !important;
  padding: 18px;
}

.hrp-compare-body {
  display: flex;
  flex-direction: column;
  padding: 16px;
}

.hrp-compare-body h2 {
  margin: 0 0 14px;
  font-size: 18px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  min-height: 54px;
}

.hrp-compare-dl {
  margin: 0;
}

.hrp-compare-dl div {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 8px;
  padding: 9px 0;
  border-top: 1px solid #eee;
  min-height: 48px;
  align-items: center;
}

.hrp-compare-score {
  color: #b46700;
}

.hrp-compare-dl dd small {
  margin-left: 3px;
  color: #806f62;
  font-size: 12px;
  font-weight: 600;
}

.hrp-compare-state {
  display: inline-flex;
  padding: 3px 9px;
  border-radius: 999px;
  background: #f1ede7;
  color: #5f534b;
  font-size: 12px;
  line-height: 1.5;
}

.hrp-compare-state--active {
  background: #e8f7ed;
  color: #196b37;
}

.hrp-compare-state--ended {
  background: #f7e9e7;
  color: #9a2f25;
}

.hrp-compare-dl dt {
  color: #806f62;
}

.hrp-compare-dl dd {
  margin: 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.hrp-compare-link,
.hrp-compare-empty a {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 46px;
  margin-top: 14px;
  border-radius: 12px;
  background: #9c651f;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
}

.hrp-compare-link {
  margin-top: auto;
}

.hrp-compare-link:hover,
.hrp-compare-empty a:hover {
  background: #7c4e17;
  color: #fff;
}

.hrp-compare-link:focus-visible,
.hrp-compare-empty a:focus-visible,
.hrp-compare-remove:focus-visible,
.hrp-compare-actions a:focus-visible,
.hrp-compare-actions button:focus-visible {
  outline: 3px solid #1f6feb;
  outline-offset: 3px;
}

.hrp-tools-status {
  position: fixed;
  left: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom));
  z-index: 1000;
  max-width: min(90vw, 520px);
  padding: 11px 16px;
  border-radius: 999px;
  background: #33251f;
  color: #fff;
  box-shadow: 0 8px 28px rgba(51, 37, 31, .25);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity .2s ease, transform .2s ease;
}

.hrp-tools-status.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.hrp-compare-empty {
  max-width: 540px;
  padding: 24px;
  border: 1px solid #eadfce;
  border-radius: 16px;
  background: #fffaf3;
}

.hrp-compare-scroll-hint {
  display: none;
  color: #68584d;
  font-size: 13px;
}

@media (max-width: 700px) {
  .hrp-compare {
    padding-inline: 12px;
  }

  .hrp-compare-scroll-hint {
    display: block;
  }

  .hrp-compare__header {
    display: block;
  }

  .hrp-compare-actions {
    justify-content: flex-start;
    margin-top: 16px;
  }

  .hrp-compare-actions a,
  .hrp-compare-actions button {
    flex: 1 1 140px;
  }

  .hrp-compare-grid {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 2px 2px 14px;
    scroll-padding-inline: 2px;
    scroll-snap-type: x mandatory;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
  }

  .hrp-compare-card {
    min-width: min(82vw, 330px);
    scroll-snap-align: start;
  }

  .hrp-compare-remove {
    min-height: 44px;
    padding-inline: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hrp-tools-status {
    transition: none;
  }
}
