/* Desktop keeps the feed in place and opens the existing reader in glass. */
html:has(body.activity-detail-sheet-open), body.activity-detail-sheet-open { overflow: hidden; }
body.activity-detail-sheet-open > .reading-dock { visibility: hidden; }
.activity-detail-sheet { width: min(1160px,calc(100% - 64px)); height: min(760px,calc(100svh - 64px)); max-width: none; max-height: none; margin: auto; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); color: var(--text); box-shadow: 0 16px 48px rgb(0 0 0 / .2); }
.activity-detail-sheet::backdrop { background: rgb(0 0 0 / .22); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.activity-detail-sheet[open] { display: block; }
.activity-detail-sheet.comment-glass-sheet { background: transparent; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .4),0 16px 48px rgb(0 0 0 / .2); }
.activity-detail-sheet__content { height: 100%; min-height: 0; }
.activity-detail-sheet > .activity-detail-sheet__close { position: absolute; z-index: 3; top: 10px; right: 10px; display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 50%; background: color-mix(in srgb,var(--paper) 85%,transparent); color: var(--muted); }
.activity-detail-sheet__close svg { width: 16px; height: 16px; }
.activity-detail-sheet__close:hover { color: var(--ink); }
.activity-detail-sheet__status { padding: 48px; color: var(--muted); font: 14px/1.7 var(--sans); }
.activity-detail-sheet--text { width: min(740px,calc(100% - 64px)); }
.activity-detail-sheet .activity-sheet-detail { --page: 100%; --measure: 100%; --activity-media-width: 100%; --activity-media-height: 100%; width: 100%; height: 100%; max-width: none; margin: 0; padding: 0; }
.activity-sheet-detail > .activity-panel, .activity-sheet-detail .activity-feed { width: 100%; max-width: none; height: 100%; margin: 0; padding: 0; }
.activity-sheet-detail .activity-detail { display: grid; grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr); grid-template-rows: minmax(0,1fr); gap: 0; width: 100%; max-width: none; height: 100%; min-height: 0; overflow: hidden; }
.activity-sheet-detail .activity-detail:not(.activity-detail--media) { grid-template-columns: minmax(0,1fr); }
.activity-sheet-reading { grid-column: 2; grid-row: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; height: 100%; border-radius: 0; background: color-mix(in srgb,var(--paper) 18%,transparent); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); }
.activity-sheet-detail .activity-detail:not(.activity-detail--media) > .activity-sheet-reading { grid-column: 1; }
.activity-sheet-detail .activity-detail-header { flex: 0 0 auto; grid-template-columns: 36px minmax(0,1fr); min-height: 36px; margin: 0; padding: 14px 48px 8px 22px; gap: 10px; background: transparent; }
.activity-sheet-detail .activity-detail-header > .activity-avatar { width: 36px; height: 36px; }
.activity-sheet-scroll { flex: 1 1 auto; min-height: 0; padding: 0 18px 22px 22px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
.activity-sheet-scroll::-webkit-scrollbar { display: none; }
.activity-sheet-detail .activity-detail-comments { margin-top: 28px; padding-top: 20px; }
.activity-sheet-detail .activity-detail-bottom-actions { position: static; flex: 0 0 auto; margin: 0; padding: 10px 18px 10px 22px; border-top: 1px solid var(--line); background: transparent; }
.activity-sheet-detail .activity-detail-media { position: relative; inset: auto; grid-column: 1; grid-row: 1; align-self: stretch; justify-self: stretch; display: flex; flex-direction: column; justify-content: center; width: 100%; height: 100%; min-height: 0; margin: 0; padding: 0; border-radius: 0; background: var(--activity-media-glass-bg); -webkit-backdrop-filter: blur(var(--activity-media-glass-blur)); backdrop-filter: blur(var(--activity-media-glass-blur)); }
.activity-sheet-detail .activity-detail-media .activity-images { display: flex; flex: 1 1 auto; gap: 0; width: 100%; height: 100%; max-height: none; min-height: 0; margin: 0; border-radius: 0; aspect-ratio: auto; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; background: transparent; cursor: grab; }
.activity-sheet-detail .activity-images::-webkit-scrollbar { display: none; }
.activity-sheet-detail .activity-images.is-dragging { scroll-snap-type: none; cursor: grabbing; }
.activity-sheet-detail .activity-images .activity-image { flex: 0 0 100%; width: 100%; height: 100%; max-height: none; aspect-ratio: auto; scroll-snap-align: start; scroll-snap-stop: always; background: transparent; -webkit-user-select: none; user-select: none; }
.activity-sheet-detail .activity-image > .image-load-frame { width: 100%; height: 100%; }
.activity-sheet-detail .activity-image > .image-load-frame > img.image-load-full { object-fit: contain; }
.activity-sheet-detail .activity-gallery-count { position: absolute; z-index: 1; top: 16px; right: 16px; display: block; padding: 3px 9px; border-radius: 20px; background: rgb(0 0 0 / .48); color: #fff; font: 12px/1.6 var(--sans); font-variant-numeric: tabular-nums; pointer-events: none; }
.activity-sheet-detail .activity-gallery-dots { display: flex; flex: 0 0 30px; align-items: center; justify-content: center; gap: 6px; margin: 0; }
.activity-sheet-detail .activity-gallery-dots > span { width: 5px; height: 5px; border-radius: 50%; background: #fff; opacity: .35; }
.activity-sheet-detail .activity-gallery-dots > .is-active { background: #fff; opacity: 1; }
.activity-sheet-detail .activity-video { display: flex; flex-direction: column; width: 100%; height: 100%; min-height: 0; margin: 0; border-radius: 0; background: transparent; }
.activity-sheet-detail .activity-video-stage { flex: 1 1 auto; width: 100%; max-height: none; min-height: 0; aspect-ratio: auto; }
.activity-sheet-detail .activity-video-stage :is(video,img) { object-fit: contain; }
.activity-sheet-detail .activity-video-toolbar { flex-shrink: 0; color: rgb(255 255 255 / .75); }
.activity-sheet-detail .activity-video-toolbar :is(button,span) { color: inherit; }
.activity-detail-sheet > .pswp { position: absolute; z-index: 4; }
.activity-detail-sheet:has(> .pswp) > .activity-detail-sheet__close { visibility: hidden; pointer-events: none; }
@media (prefers-reduced-transparency:reduce) {
  .activity-detail-sheet.comment-glass-sheet, .activity-sheet-reading { background: var(--paper); }
  .activity-sheet-detail .activity-detail-media { background: #0a0c0f; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
