.epr-review-form,
.epr-review-list,
.epr-rating-summary {
  --epr-border: #d8e1ef;
  --epr-border-strong: #c8d5e8;
  --epr-muted: #5a667b;
  --epr-text: #1f2937;
  --epr-accent: #0b5cab;
  --epr-accent-soft: #e9f3ff;
  --epr-surface: #f7fafe;
  --epr-star: #f4b322;
  --epr-shadow: 0 12px 30px rgba(16, 24, 40, 0.14);
  color: var(--epr-text);
}

.epr-review-form {
  margin: 0;
}

.epr-review-cta {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 0.65rem;
}

.epr-open-modal {
  font-weight: 600;
}

.epr-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.epr-modal[hidden] {
  display: none !important;
}

.epr-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}

.epr-modal-panel {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  max-height: calc(100vh - 2rem);
  overflow: auto;
  border: 1px solid var(--epr-border);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--epr-shadow);
  padding: 1.2rem 1.1rem 1.1rem;
}

.epr-modal-close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  border: 0;
  background: transparent;
  font-size: 26px;
  line-height: 1;
  color: #6b7280;
  cursor: pointer;
}

.epr-modal-panel h3 {
  margin: 0 0 0.25rem;
  font-size: 1.5rem;
}

.epr-modal-subtitle {
  margin: 0 0 1rem;
  color: var(--epr-muted);
  line-height: 1.45;
}

.epr-review-form textarea,
.epr-review-list textarea,
.epr-review-list select,
.epr-review-form input,
.epr-review-form select {
  border: 1px solid var(--epr-border);
  border-radius: 11px;
  padding: 0.62rem 0.74rem;
  box-sizing: border-box;
}

.epr-review-form textarea,
.epr-reply-form textarea {
  width: 100%;
  max-width: 100%;
}

.epr-label,
.epr-options legend {
  display: block;
  font-weight: 700;
  margin: 0 0 0.45rem;
}

.epr-star-picker {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.epr-star-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: #c8cdd7;
  font-size: 44px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
}

.epr-star-btn.is-active {
  color: var(--epr-star);
}

.epr-options {
  margin: 0.2rem 0 0.8rem;
}

.epr-options-grid,
.epr-review-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.epr-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border: 1px solid #d3deed;
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  background: #fff;
}

.epr-chip input[type="checkbox"] {
  display: none;
}

.epr-chip-pick {
  cursor: pointer;
  user-select: none;
  transition: all 0.16s ease;
}

.epr-chip-pick.is-active {
  border-color: #8fb1de;
  background: #eaf3ff;
  color: #0f3e75;
}

.epr-chip-static {
  background: #f2f6fd;
}

.epr-policy-text {
  margin: 0.8rem 0 0;
  padding-top: 0.8rem;
  border-top: 1px solid #e3e8f3;
  color: var(--epr-muted);
  line-height: 1.45;
}

.epr-proof-upload {
  margin: 0.4rem 0 0.85rem;
  border: 1px solid #dde6f3;
  border-radius: 12px;
  background: #fbfdff;
  padding: 0.7rem;
}

.epr-proof-hint {
  margin: 0 0 0.52rem;
  color: var(--epr-muted);
  font-size: 0.88rem;
}

.epr-proof-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.epr-proof-preview {
  margin-top: 0.6rem;
  min-height: 0;
}

.epr-proof-preview.is-filled {
  min-height: 78px;
}

.epr-proof-preview img {
  display: block;
  width: 120px;
  height: 78px;
  object-fit: cover;
  border: 1px solid #d2def1;
  border-radius: 8px;
}

.epr-modal-actions {
  margin-top: 0.95rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: flex-end;
}

.epr-current-status {
  margin: 0.35rem 0 0;
  color: var(--epr-muted);
  font-size: 0.92rem;
}

.epr-review-list {
  border: 1px solid var(--epr-border);
  border-radius: 16px;
  background: #fff;
  padding: 0.92rem;
}

.epr-review-list-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.78rem;
}

.epr-review-items {
  display: grid;
  gap: 0.72rem;
}

.epr-review-card {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 0.75rem;
  border: 1px solid var(--epr-border);
  border-radius: 14px;
  background: var(--epr-surface);
  padding: 0.76rem;
}

.epr-review-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--epr-border-strong);
  background: #eef3fb;
}

.epr-review-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.epr-avatar-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #35527d;
}

.epr-review-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  margin-bottom: 0.26rem;
  color: var(--epr-muted);
  font-size: 0.86rem;
}

.epr-review-name {
  color: var(--epr-text);
  font-weight: 600;
  font-size: 0.96rem;
}

.epr-review-meta {
  display: flex;
  align-items: center;
  gap: 0.58rem;
  margin-bottom: 0.45rem;
}

.epr-review-rating {
  color: var(--epr-star);
  letter-spacing: 0.6px;
}

.epr-review-badge {
  display: inline-block;
  font-size: 12px;
  color: #4a5b73;
  background: #edf4ff;
  border: 1px solid #d0ddf0;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
}

.epr-review-text {
  margin: 0.25rem 0 0;
  white-space: pre-wrap;
}

.epr-review-proof {
  margin-top: 0.55rem;
}

.epr-review-proof a {
  display: inline-block;
}

.epr-review-proof img {
  display: block;
  width: 132px;
  height: 86px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #d6e1f1;
}

.epr-review-actions {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.56rem;
  flex-wrap: wrap;
}

.epr-review-replies {
  margin-top: 0.72rem;
  padding-top: 0.6rem;
  border-top: 1px dashed #d4dfef;
  display: grid;
  gap: 0.43rem;
}

.epr-review-reply-actions {
  display: flex;
  justify-content: flex-start;
}

.epr-review-reply {
  background: #fff;
  border: 1px solid #dae3f2;
  border-radius: 10px;
  padding: 0.52rem 0.62rem;
}

.epr-review-reply-nested {
  margin-left: 1.4rem;
  background: #f8fbff;
}

.epr-review-reply-meta {
  margin-top: 0.35rem;
  display: flex;
  gap: 0.48rem;
  color: var(--epr-muted);
  font-size: 12px;
}

.epr-reply-form {
  margin-top: 0.68rem;
}

.epr-reply-target {
  margin-bottom: 0.35rem;
  color: var(--epr-muted);
  font-size: 12px;
}

.epr-reply-target .button-link {
  font-size: 12px;
  text-decoration: underline;
}

.epr-review-pagination {
  margin-top: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.56rem;
  flex-wrap: wrap;
}

.epr-message {
  margin-top: 0.62rem;
  font-size: 14px;
  border-radius: 10px;
  padding: 0.52rem 0.68rem;
}

.epr-message-error {
  color: #a21d2f;
  background: #fdecef;
  border: 1px solid rgba(162, 29, 47, 0.25);
}

.epr-message-success {
  color: #0d6b38;
  background: #e8f8ee;
  border: 1px solid rgba(13, 107, 56, 0.24);
}

.epr-message-info {
  color: #0b4f86;
  background: #eaf4ff;
  border: 1px solid rgba(11, 79, 134, 0.2);
}

.epr-hidden {
  display: none !important;
}

.epr-rating-summary {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid var(--epr-border);
  border-radius: 999px;
  background: #fff;
  padding: 0.34rem 0.72rem;
}

.epr-rating-summary-avg {
  font-size: 24px;
  line-height: 1;
}

.epr-rating-stars {
  position: relative;
  display: inline-block;
  line-height: 1;
  letter-spacing: 1px;
}

.epr-rating-stars-base {
  color: #d1d7e3;
}

.epr-rating-stars-fill {
  position: absolute;
  left: 0;
  top: 0;
  white-space: nowrap;
  overflow: hidden;
  color: var(--epr-star);
}

@media (max-width: 860px) {
  .epr-modal-panel {
    padding: 1rem 0.85rem 0.9rem;
  }

  .epr-star-btn {
    font-size: 38px;
  }
}

@media (max-width: 700px) {
  .epr-review-list-toolbar {
    justify-content: flex-start;
  }

  .epr-review-card {
    grid-template-columns: 1fr;
  }

  .epr-review-avatar {
    width: 48px;
    height: 48px;
  }

  .epr-review-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .epr-modal-actions {
    justify-content: stretch;
  }

  .epr-modal-actions .button {
    width: 100%;
  }
}
