.article-share-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.article-share-button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 9px 16px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease;
}

.article-share-button:hover,
.article-share-button:focus-visible {
  background: var(--ink);
  color: var(--paper);
}

.article-share-button:disabled { opacity: .6; cursor: wait; }

.article-share-button--story {
  background: var(--acid);
}

.article-share-button svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#share-article-telegram svg { fill: currentColor; stroke: none; }

.article-share-icon-button {
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  gap: 0;
}

.article-share-icon-button.article-share-button--story { background: transparent; }
.article-share-icon-button:hover,
.article-share-icon-button:focus-visible { background: var(--acid); color: var(--ink); }
.article-share-icon-button:active { opacity: .58; }
.article-share-icon-button svg { width: 23px; height: 23px; }
.share-label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.article-share-status { width: fit-content; min-height: 0; margin: 4px 0 0; padding: 0; color: var(--muted); font-size: 12px; }
.article-share-status:empty { display: none; }

.story-dialog {
  position: fixed;
  inset: 0;
  width: min(950px, calc(100vw - 28px));
  max-height: calc(100dvh - 28px);
  margin: auto;
  padding: 0;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 18px 18px 0 rgba(23, 25, 20, .22);
  overflow: hidden;
}

.story-dialog::backdrop { background: rgba(15, 17, 13, .78); backdrop-filter: blur(4px); }
.story-dialog-shell { display: grid; grid-template-columns: minmax(260px, 390px) minmax(300px, 1fr); min-height: min(760px, calc(100dvh - 30px)); }
.story-dialog-preview { display: grid; place-items: center; padding: 28px; background: #dfe2d4; overflow: auto; }
.story-dialog-preview canvas { display: block; width: min(100%, 330px); height: auto; aspect-ratio: 9/16; background: var(--paper); box-shadow: 0 12px 30px rgba(23,25,20,.2); }
.story-dialog-content { display: flex; flex-direction: column; padding: 32px; overflow: auto; }
.story-dialog-kicker { margin: 0 0 12px; font: 800 12px/1.5 monospace; color: var(--muted); direction: ltr; text-align: right; }
.story-dialog h2 { margin: 0; font-size: clamp(25px, 3vw, 38px); line-height: 1.5; }
.story-dialog-description { color: var(--muted); line-height: 1.9; }
.story-dialog-note { margin-top: auto; padding: 16px; border-right: 4px solid var(--ink); background: #dfe2d4; font-size: 13px; line-height: 1.9; }
.story-dialog-actions { display: grid; gap: 10px; margin-top: 18px; }
.story-dialog-actions button { width: 100%; }
.story-dialog-close { position: absolute; inset: 14px 14px auto auto; z-index: 2; width: 44px; height: 44px; border: 1px solid var(--ink); background: var(--paper); color: var(--ink); cursor: pointer; font-size: 24px; line-height: 1; }
.story-dialog-status { min-height: 24px; margin: 10px 0 0; font-size: 12px; color: var(--muted); }
body.story-dialog-open { overflow: hidden; }

@media (max-width: 720px) {
  .article-share-actions { display: flex; width: auto; gap: 8px; }
  .article-share-icon-button { padding: 0; }
  .story-dialog { width: 100%; max-width: none; max-height: 100dvh; height: 100dvh; border: 0; }
  .story-dialog-shell { display: flex; flex-direction: column; min-height: 100dvh; }
  .story-dialog-preview { min-height: 47dvh; padding: 20px; }
  .story-dialog-preview canvas { width: auto; height: min(43dvh, 480px); }
  .story-dialog-content { padding: 24px 20px 30px; overflow: visible; }
  .story-dialog h2 { font-size: 25px; padding-left: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  .article-share-button { transition: none; }
}
