/* Full-story dialog on the main page. Same chrome as the event dialog (calendar-dialog.css):
   tokens come from style.css :root, no new colours, fonts or radii. */
html.story-dialog-open { overflow: hidden; scrollbar-gutter: stable; }

.story-dialog {
  width: min(720px, calc(100% - 48px)); max-width: none;
  max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px);
  margin: auto; padding: 0; border: 0; border-radius: var(--r-lg);
  background: var(--bg); color: var(--ink); font-family: var(--font);
  overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
  box-shadow: 0 24px 64px rgba(32, 32, 34, .24);
}
.story-dialog::backdrop { background: rgba(32, 32, 34, .6); }
.story-dialog[open] { animation: story-dialog-in .18s ease-out; }
.story-dialog[open]::backdrop { animation: story-dialog-fade .18s ease-out; }
@keyframes story-dialog-in { from { opacity: 0; transform: translateY(12px); } }
@keyframes story-dialog-fade { from { opacity: 0; } }

.story-dialog__bar {
  position: sticky; top: 0; z-index: 2; display: flex; justify-content: flex-end;
  padding: 12px 12px 0; margin-bottom: -56px; pointer-events: none;
}
.story-dialog__close {
  pointer-events: auto; display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 50%; background: var(--bg); color: var(--ink); cursor: pointer;
  box-shadow: inset 0 0 0 1px #d5d5d5;
}
.story-dialog__close:hover { color: var(--blue-600); }
.story-dialog__sentinel { display: block; width: 0; height: 0; outline: 0; }

.story-dialog__article { display: block; padding: 32px 40px 40px; }
.story-dialog__head { display: flex; align-items: center; gap: 22px; padding-right: 48px; }
.story-dialog__avatar { flex: none; width: 76px; height: 76px; border-radius: 50%; object-fit: cover; background: #d9d9d9; }
.story-dialog__title { margin: 0; font-size: 24px; font-weight: 600; line-height: 1.3; color: var(--ink); overflow-wrap: anywhere; }
.story-dialog__role { margin: 4px 0 0; font-size: 16px; font-weight: 500; line-height: 1.4; color: var(--gray-500); overflow-wrap: anywhere; }
.story-dialog__text { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 16px; font-weight: 500; line-height: 1.5; color: var(--gray-600); overflow-wrap: anywhere; }
.story-dialog__text p { margin: 0 0 14px; white-space: pre-line; }
.story-dialog__text p:last-child { margin-bottom: 0; }

@media (max-width: 640px) {
  .story-dialog {
    width: 100%; height: 100vh; height: 100dvh; max-height: none; border-radius: 0;
    box-shadow: none; animation-name: story-dialog-sheet;
  }
  .story-dialog__article { padding: 20px 16px 32px; }
  .story-dialog__head { gap: 16px; }
  .story-dialog__title { font-size: 20px; }
}
@keyframes story-dialog-sheet { from { opacity: 0; transform: translateY(24px); } }
@media (prefers-reduced-motion: reduce) {
  .story-dialog[open], .story-dialog[open]::backdrop { animation: none; }
}
