.st-comments {
  --comment-ink: #193751;
  --comment-muted: #52677a;
  --comment-line: #d9e3ec;
  --comment-accent: #174f80;
  --comment-surface: #f1f5f9;
  width: min(1100px, calc(100% - 32px));
  margin: 36px auto 12px;
  padding-block: 16px 12px;
  border-block-start: 2px solid #1c4569;
  color: var(--comment-ink);
  font: 14px/1.6 system-ui, "Microsoft JhengHei", sans-serif;
  scroll-margin-block-start: 14px;
}

.st-comments *, .st-comments { box-sizing: border-box; }
.st-comments [hidden] { display: none !important; }
.st-comments-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.st-comments-heading,
.st-comments-list-heading,
.st-comments-toolbar,
.st-comments-attachment {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.st-comments-heading { margin-block-end: 14px; }
.st-comments-heading h2 { margin: 0; color: inherit; font-size: 22px; line-height: 1.3; }
.st-comments textarea {
  display: block;
  width: 100%;
  min-height: 138px;
  padding: 14px 16px;
  resize: vertical;
  background: var(--comment-surface);
  color: var(--comment-ink);
  border: 1px solid var(--comment-line);
  border-radius: 8px;
  font: inherit;
}
.st-comments textarea::placeholder { color: var(--comment-muted); }
.st-comments-toolbar { margin-block-start: 10px; }
.st-comments button { font: inherit; cursor: pointer; }
.st-comments button:disabled { opacity: .55; cursor: wait; }
.st-comments :is(button, textarea):focus-visible,
.st-comments-upload:focus-within { outline: 2px solid var(--comment-accent); outline-offset: 3px; }
.st-comments-upload {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding-inline: 4px;
  color: var(--comment-accent);
  font-weight: 650;
  cursor: pointer;
}
.st-comments-upload input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.st-comments-image-icon {
  width: 17px;
  height: 14px;
  border: 1.5px solid currentColor;
  border-radius: 3px;
  background: radial-gradient(circle at 73% 27%, currentColor 1px, transparent 2px),
              linear-gradient(135deg, transparent 45%, currentColor 46% 52%, transparent 53%) bottom / 80% 65% no-repeat;
}
.st-comments-count { margin-inline-start: auto; color: var(--comment-muted); font-size: 12px; white-space: nowrap; }
.st-comments .st-comments-primary {
  min-height: 42px;
  min-width: 112px;
  padding: 7px 18px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: var(--comment-accent);
  color: #fff;
  font-weight: 700;
}
.st-comments .st-comments-primary:hover:not(:disabled) { background: #123e65; }
.st-comments-status { margin: 6px 0 0; color: var(--comment-muted); font-size: 12px; }
.st-comments-status[data-error] { color: #9d382a; }
.st-comments-attachment { justify-content: flex-start; margin-block-start: 10px; }
.st-comments-attachment img { width: 58px; height: 54px; object-fit: cover; border-radius: 5px; }
.st-comments-list-heading { margin-block-start: 22px; padding-block-end: 8px; border-block-end: 1px solid var(--comment-line); }
.st-comments-list-heading h3 { margin: 0; font-size: 17px; }
.st-comments-list-heading h3 > span { color: var(--comment-muted); font-size: 14px; font-weight: 500; }
.st-comments-sort { display: flex; gap: 3px; border-radius: 6px; background: var(--comment-surface); padding: 3px; }
.st-comments-sort button {
  min-height: 34px;
  padding-inline: 12px;
  border: 0;
  background: transparent;
  color: var(--comment-muted);
  border-radius: 4px;
}
.st-comments-sort button[aria-pressed="true"] { background: #fff; color: var(--comment-accent); font-weight: 700; }
.st-comments :is(ol, ul) { list-style: none; padding: 0; margin: 0; }
.st-comments-item {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 13px;
  border-block-end: 1px solid var(--comment-line);
  padding-block: 17px;
}
.st-comments-avatar {
  display: grid;
  place-items: center;
  align-self: start;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #dce9f5;
  color: #275682;
  font-weight: 750;
}
.st-comments-item:nth-child(3n+2) .st-comments-avatar { background: #e4eee8; color: #315c4b; }
.st-comments-item:nth-child(3n+3) .st-comments-avatar { background: #ece9f4; color: #554575; }
.st-comments-meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 9px; }
.st-comments-meta strong { color: var(--comment-ink); }
.st-comments-meta :is(time, span) { color: var(--comment-muted); font-size: 12px; }
.st-comments-message { margin: 5px 0 3px; white-space: pre-wrap; overflow-wrap: anywhere; color: #263c50; }
.st-comments-post-image { width: auto; max-width: min(100%, 280px); max-height: 180px; margin-block: 10px; object-fit: contain; border-radius: 6px; }
.st-comments-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.st-comments .st-comments-link {
  min-height: 36px;
  padding: 3px 5px;
  border: 0;
  background: transparent;
  color: var(--comment-accent);
  font-size: 13px;
}
.st-comments-link:hover { text-decoration: underline; }
.st-comments-link[aria-pressed="true"] { border-radius: 5px; background: #e1edf8; font-weight: 700; }
.st-comments .st-comments-replies { margin-block-start: 8px; background: var(--comment-surface); border-radius: 7px; }
.st-comments-replies > li { padding: 9px 13px 5px; }
.st-comments-replies > li + li { border-block-start: 1px solid var(--comment-line); }
.st-comments-reply-form { margin-block-start: 8px; }
.st-comments-reply-form textarea { min-height: 76px; background: #fff; }
.st-comments-reply-actions { display: flex; justify-content: end; gap: 9px; margin-block-start: 8px; }

@media (max-width: 600px) {
  .st-comments { width: calc(100% - 28px); margin-block-start: 28px; }
  .st-comments-heading h2 { font-size: 19px; }
  .st-comments-item { grid-template-columns: 34px minmax(0, 1fr); gap: 9px; }
  .st-comments .st-comments-primary { min-width: 94px; padding-inline: 10px; }
  .st-comments-replies > li { padding-inline: 9px; }
}

.st-comments-storage, .st-comments-reply-count { color: var(--comment-muted); font-size: 12px; }
.st-comments-storage { margin: 4px 0 0; }
.st-comments-example { background: #e8f0f7; padding: 1px 6px; border-radius: 4px; }
.st-comments-meta, .st-comments-upload { overflow-wrap: anywhere; }
.st-comments-toolbar { flex-wrap: wrap; }
