.app-comments {
  width: min(30%, 520px);
  min-width: 360px;
  margin: 1.5rem auto 0 0;
  padding: 0.85rem 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
  color: #132033;
}

.app-comments-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.app-comments-kicker {
  display: block;
  margin-bottom: 0.18rem;
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.app-comments h2 {
  margin: 0;
  color: #0f172a;
  font-size: 1rem;
}

.app-comments-score {
  min-width: 106px;
  text-align: right;
}

.app-comments-score small {
  display: block;
  color: #64748b;
  font-size: 0.74rem;
}

.app-comment-stars {
  display: inline-flex;
  gap: 1px;
  color: #cbd5e1;
  font-size: 0.84rem;
  letter-spacing: 0.02em;
}

.app-comment-stars .is-filled {
  color: #f4b000;
}

.app-comment-form {
  display: grid;
  gap: 0.5rem;
  margin: 0.7rem 0 0.85rem;
}

.app-comment-form.is-reply {
  margin: 0.65rem 0 0.4rem;
}

.app-comment-form textarea {
  width: 100%;
  min-height: 68px;
  padding: 0.68rem 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.5);
  border-radius: 14px;
  background: #fff;
  color: #132033;
  resize: vertical;
}

.app-comment-form.is-reply textarea {
  min-height: 62px;
}

.app-comment-form button {
  justify-self: start;
  border: 0;
  border-radius: 999px;
  padding: 0.58rem 1.05rem;
  background: #111827;
  color: #fff;
  font-weight: 800;
}

.app-comment-rating-input {
  display: inline-flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 2px;
}

.app-comment-rating-input input {
  position: absolute;
  opacity: 0;
}

.app-comment-rating-input label {
  color: #cbd5e1;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
}

.app-comment-rating-input label:hover,
.app-comment-rating-input label:hover ~ label,
.app-comment-rating-input input:checked ~ label {
  color: #f4b000;
}

.app-comment-login-note,
.app-comment-empty {
  margin: 0.65rem 0;
  color: #64748b;
  font-size: 0.84rem;
}

.app-comment-list {
  display: grid;
  gap: 0.65rem;
}

.app-comment-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 0.7rem;
  margin-left: calc(var(--level, 0) * 1.25rem);
}

.app-comment-avatar {
  width: 36px;
  height: 36px;
  overflow: hidden;
  border-radius: 999px;
  background: #fff6d9;
  color: #9a6700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

.app-comment-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.app-comment-body {
  padding: 0.82rem 0.95rem;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 16px;
  background: #fff;
}

.app-comment-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.3rem;
}

.app-comment-head strong {
  font-style: italic;
  color: #0f172a;
}

.app-comment-head time {
  color: #94a3b8;
  font-size: 0.78rem;
}

.app-comment-body p {
  margin: 0;
  color: #334155;
  font-size: 0.92rem;
  line-height: 1.55;
}

.app-comment-reply {
  margin-top: 0.45rem;
}

.app-comment-reply summary {
  color: #64748b;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 800;
}

body.hub-dark-mode .app-comments,
body[data-hub-theme="dark"] .app-comments {
  background: #202734;
  border-color: rgba(148, 163, 184, 0.24);
  color: #eef2f7;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.22);
}

body.hub-dark-mode .app-comments h2,
body[data-hub-theme="dark"] .app-comments h2,
body.hub-dark-mode .app-comment-head strong,
body[data-hub-theme="dark"] .app-comment-head strong {
  color: #f8fafc;
}

body.hub-dark-mode .app-comments-kicker,
body[data-hub-theme="dark"] .app-comments-kicker,
body.hub-dark-mode .app-comments-score small,
body[data-hub-theme="dark"] .app-comments-score small,
body.hub-dark-mode .app-comment-login-note,
body[data-hub-theme="dark"] .app-comment-login-note,
body.hub-dark-mode .app-comment-empty,
body[data-hub-theme="dark"] .app-comment-empty,
body.hub-dark-mode .app-comment-reply summary,
body[data-hub-theme="dark"] .app-comment-reply summary {
  color: #aeb8c7;
}

body.hub-dark-mode .app-comment-form textarea,
body[data-hub-theme="dark"] .app-comment-form textarea,
body.hub-dark-mode .app-comment-body,
body[data-hub-theme="dark"] .app-comment-body {
  background: #171d27;
  border-color: rgba(148, 163, 184, 0.24);
  color: #eef2f7;
}

body.hub-dark-mode .app-comment-body p,
body[data-hub-theme="dark"] .app-comment-body p {
  color: #dbe3ef;
}

body.hub-dark-mode .app-comment-form button,
body[data-hub-theme="dark"] .app-comment-form button {
  background: #f4b000;
  color: #111827;
}

@media (max-width: 640px) {
  .app-comments {
    width: 100%;
    min-width: 0;
    margin-right: 0;
  }

  .app-comments-head {
    display: grid;
  }

  .app-comments-score {
    text-align: left;
  }

  .app-comment-item {
    margin-left: calc(var(--level, 0) * 0.55rem);
  }
}
