.story-engagement-counts {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: .78rem;
}

.story-engagement-controls {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.story-share-dialog {
  width: min(calc(100vw - 24px), 520px);
  max-width: 100%;
  box-sizing: border-box;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 24px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 22px 64px rgb(26 18 52 / 24%), 0 2px 10px rgb(26 18 52 / 10%);
  overflow-x: hidden;
}

.story-share-dialog::backdrop {
  background: rgb(20 14 40 / 52%);
  backdrop-filter: blur(3px);
}

.story-share-panel {
  position: relative;
  padding: 24px;
}

.story-share-close {
  position: absolute;
  inset-block-start: 12px;
  inset-inline-end: 12px;
  width: 44px;
  height: 44px;
  border: 1px solid transparent;
  border-radius: 50%;
  color: var(--ink);
  background: var(--surface-2);
  font-size: 1.5rem;
  cursor: pointer;
}

.story-share-preview {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-inline-end: 34px;
  margin-block-end: 22px;
}

.story-share-preview img,
.story-share-cover-fallback {
  width: 68px;
  height: 84px;
  flex: 0 0 auto;
  border-radius: 12px;
  object-fit: cover;
  background: var(--surface-2);
}

.story-share-cover-fallback {
  display: grid;
  place-items: center;
  font-size: 2rem;
}

.story-share-preview p {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: .85rem;
}

.story-share-preview h2 {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.25;
}

.story-share-destinations {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.story-share-destinations button {
  min-width: 0;
  padding: 10px 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  background: var(--surface-2);
  font: inherit;
  font-size: .72rem;
  cursor: pointer;
}

.story-share-destinations button:hover,
.story-share-destinations button:focus-visible,
.story-share-close:hover,
.story-share-close:focus-visible {
  border-color: var(--gold);
}

.story-share-destinations button:focus-visible,
.story-share-close:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--gold) 55%, transparent);
  outline-offset: 2px;
}

.story-share-destinations button span[aria-hidden] {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin: 0 auto 5px;
  border-radius: 50%;
  color: var(--violet);
  background: var(--surface);
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
}

.story-share-destinations button span[aria-hidden] svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.story-share-destinations button[data-share-destination="facebook"] span[aria-hidden] {
  color: #fff;
  background: #1877f2;
}

.story-share-destinations button[data-share-destination="whatsapp"] span[aria-hidden] {
  color: #fff;
  background: #25d366;
}

.story-share-destinations button[data-share-destination="messenger"] span[aria-hidden] {
  color: #fff;
  background: linear-gradient(145deg, #00b2ff 12%, #7b4dff 56%, #ff5c87 100%);
}

.story-share-destinations button[data-share-destination="x"] span[aria-hidden] {
  color: #fff;
  background: #000;
}

.story-share-destinations button[data-share-destination="telegram"] span[aria-hidden] {
  color: #fff;
  background: #229ed9;
}

[data-theme="light"] .story-share-destinations button {
  background: color-mix(in srgb, var(--surface-2) 62%, #eef0f4);
}

@media (prefers-color-scheme: light) {
  [data-theme="system"] .story-share-destinations button {
    background: color-mix(in srgb, var(--surface-2) 62%, #eef0f4);
  }
}

.story-share-feedback {
  min-height: 1.25em;
  margin: 12px 0 0;
  color: var(--success, #287a4b);
  text-align: center;
  font-size: .82rem;
}

@media (max-width: 520px) {
  .story-share-dialog { border-radius: 20px; }

  .story-share-panel { padding: 18px 16px 14px; }

  .story-share-close {
    inset-block-start: 8px;
    inset-inline-end: 8px;
  }

  .story-share-preview {
    gap: 12px;
    padding-inline-end: 38px;
    margin-block-end: 16px;
  }

  .story-share-preview img,
  .story-share-cover-fallback {
    width: 58px;
    height: 72px;
    border-radius: 10px;
  }

  .story-share-preview h2 { font-size: 1.08rem; }

  .story-share-destinations {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .story-share-destinations button { padding: 8px 5px; }

  .story-share-destinations button[data-share-destination="copy"] {
    grid-column: 1 / -1;
  }

  .story-share-feedback { margin-block-start: 8px; }
}

.reader-comments {
  scroll-margin-top: 84px;
  margin-block: clamp(28px, 5vw, 52px);
  padding: clamp(22px, 3.5vw, 38px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg, 24px);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.reader-comments-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding-block-end: clamp(18px, 3vw, 26px);
  border-block-end: 1px solid var(--line);
}

.reader-comments-heading .eyebrow { margin-block-end: 6px; }
.reader-comments-heading h2 { margin: 0; font-size: clamp(1.8rem, 3.5vw, 2.7rem); }
.reader-comments-total,
.reader-comment time,
.reader-comment-help { color: var(--muted); font-size: .82rem; }
.reader-comments-total { flex: 0 0 auto; }
.reader-comments-list { display: grid; gap: 14px; margin-block: clamp(20px, 3vw, 28px); }
.reader-comment { min-width: 0; padding: clamp(16px, 2.5vw, 20px); border: 1px solid var(--line); border-radius: 18px; background: var(--surface-2); box-shadow: 0 8px 24px color-mix(in srgb, var(--ink) 7%, transparent); }
.reader-comment header { display: flex; align-items: center; gap: 12px; min-width: 0; }
.reader-comment-avatar { display: grid; place-items: center; width: 44px; height: 44px; flex: 0 0 44px; border: 1px solid color-mix(in srgb, var(--violet) 35%, var(--line)); border-radius: 50%; color: var(--violet); background: var(--surface); font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; }
.reader-comment-author { display: grid; min-width: 0; gap: 1px; }
.reader-comment-author strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reader-comment p { margin: 13px 0 0; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.reader-comment-status { display: inline-flex; align-items: center; min-height: 28px; width: fit-content; margin-block-start: 10px; padding-inline: 10px; border: 1px solid color-mix(in srgb, var(--gold) 48%, var(--line)); border-radius: 999px; color: color-mix(in srgb, var(--gold) 72%, var(--ink)); background: color-mix(in srgb, var(--gold) 10%, var(--surface)); font-size: .76rem; font-weight: 700; }
.reader-comments-empty { margin: 0; padding: clamp(24px, 5vw, 38px) 18px; border: 1px dashed var(--line); border-radius: 18px; color: var(--muted); background: var(--surface-2); text-align: center; }
.reader-comments-empty::before { content: "○"; display: block; margin-block-end: 6px; color: var(--violet); font-size: 1.8rem; line-height: 1; }
.reader-comments-more { min-height: 44px; }
.reader-comments-more[hidden] { display: none !important; }
.reader-comments-pending { display: grid; gap: 14px; margin-block: 18px 0; }
.reader-comment-form { display: grid; gap: 10px; margin-block-start: clamp(24px, 4vw, 34px); padding-block-start: clamp(22px, 3vw, 28px); border-block-start: 1px solid var(--line); }
.reader-comment-form label { font-weight: 700; }
.reader-comment-form textarea { width: 100%; min-width: 0; min-height: clamp(116px, 18vw, 150px); padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); background: var(--surface-2); font: inherit; line-height: 1.55; resize: vertical; transition: border-color .2s, box-shadow .2s, background-color .2s; }
.reader-comment-form textarea:hover { border-color: color-mix(in srgb, var(--violet) 45%, var(--line)); }
.reader-comment-form textarea:focus-visible { outline: none; border-color: var(--gold); background: var(--surface); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 28%, transparent); }
.reader-comment-form .btn { min-height: 44px; justify-self: start; margin-block-start: 4px; }
.reader-comment-help,
.reader-comment-form-status { min-height: 1.3em; margin: 0; }
.reader-comment-form-status:not(:empty) { margin-block-start: 4px; color: var(--green); font-weight: 600; }
.reader-comments-login { margin: clamp(24px, 4vw, 32px) 0 0; }
.reader-comments-login a { display: inline-flex; min-height: 44px; align-items: center; color: var(--violet); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.reader-comment-link { position: relative; text-decoration: none; }
.reader-comment-link small { position: absolute; inset-block-start: -4px; inset-inline-end: -4px; min-width: 18px; padding: 1px 4px; border-radius: 9px; background: var(--gold); color: #221535; font-size: .65rem; line-height: 16px; }

@media (max-width: 820px) {
  .reader-comments { width: min(100% - 32px, 1180px); }
}

@media (max-width: 520px) {
  .reader-comments { width: min(100% - 24px, 1180px); padding: 18px 16px 22px; border-radius: 20px; }
  .reader-comments-heading { align-items: flex-start; flex-direction: column; gap: 10px; }
  .reader-comments-list { gap: 12px; margin-block: 18px; }
  .reader-comment { padding: 15px; border-radius: 16px; }
  .reader-comment-avatar { width: 40px; height: 40px; flex-basis: 40px; }
  .reader-comment-form textarea { min-height: 112px; padding: 13px 14px; border-radius: 14px; }
  .reader-comment-form .btn,
  .reader-comments-more { width: 100%; }
}
