#post-carousels,
.post-carousel,
.post-carousel__track,
.post-carousel__slide,
.post-carousel__pagination,
.post-carousel__controls {
  width:100%;
  max-width:100%;
  box-sizing:border-box;
}
.post-carousel {
  --post-carousel-viewport:100vh;
  --post-carousel-header:calc(var(--header-height, 4rem) + 1rem + env(safe-area-inset-top, 0px));
  --post-carousel-controls:9rem;
  margin-block:1.5rem;
  border:0;
  border-radius:0;
  overflow:hidden;
  background:#0b0e13;
  color:#f5f5f5;
  color-scheme:dark;
}
.post-carousel__track {
  display:flex;
  overflow-x:auto;
  scroll-snap-type:x mandatory;
  overscroll-behavior-x:contain;
  scrollbar-width:none;
}
.post-carousel__track::-webkit-scrollbar { display:none; }
.post-carousel__slide { flex:0 0 100%;margin:0;scroll-snap-align:start; }
.post-carousel__slide img {
  display:block;
  width:100%;
  max-width:100%;
  box-sizing:border-box;
  /* Captions and comments remain in normal flow below the viewport-sized media. */
  aspect-ratio:auto;
  height:calc(var(--post-carousel-viewport) - var(--post-carousel-header) - var(--post-carousel-controls) - 3rem - env(safe-area-inset-bottom, 0px));
  object-fit:contain;
  background:#0b0e13;
}
.post-carousel__slide figcaption,
.post-carousel__caption,
.post-carousel [role=status] {
  padding:.5rem .75rem .75rem;
  margin:0;
  overflow-wrap:anywhere;
  line-height:1.6;
}
.post-carousel__slide figcaption:empty,
.post-carousel__caption:empty,
.post-carousel [role=status]:empty { display:none; }
.post-carousel__pagination {
  display:flex;
  justify-content:center;
  align-items:center;
  flex-wrap:wrap;
  padding:.25rem .75rem 0;
}
.post-carousel button {
  box-sizing:border-box;
  color:inherit;
  background:transparent;
  border:0;
  border-radius:0;
  padding:0;
  cursor:pointer;
  font:inherit;
  box-shadow:none;
}
.post-carousel__dot {
  display:grid;
  place-items:center;
  width:1.25rem;
  height:2.75rem;
  flex:0 0 auto;
}
.post-carousel__dot::before {
  content:"";
  width:.375rem;
  height:.375rem;
  border-radius:50%;
  background:#46505c;
}
.post-carousel__dot[aria-current=true]::before { background:#5b78ff; }
.post-carousel__controls {
  display:flex;
  align-items:center;
  gap:.5rem;
  padding:0 .5rem .25rem;
  flex-wrap:wrap;
}
.post-carousel__controls button {
  display:grid;
  place-items:center;
  width:2.75rem;
  height:2.75rem;
  flex:0 0 auto;
  font-size:2rem;
  line-height:1;
}
.post-carousel__count { font-size:.875rem;font-variant-numeric:tabular-nums; }
.post-carousel__save svg { display:block;width:1.75rem;height:1.75rem; }
.post-carousel__save[aria-pressed=true] svg { fill:currentColor; }
.post-carousel__controls button:disabled { opacity:.35;cursor:default; }
.post-carousel button:focus-visible,
.post-carousel__track:focus-visible { outline:2px solid #f5f5f5;outline-offset:-3px; }
.post-carousel [role=status] { color:#b9c0ca;font-size:.875rem; }
.post-carousel [hidden] { display:none!important; }
#post-carousels:empty { display:none; }
@supports(height:100dvh) { .post-carousel { --post-carousel-viewport:100dvh; } }
@media(prefers-color-scheme:dark) { .post-carousel { background:#0b0e13;color:#f5f5f5; } }
@media(prefers-reduced-motion:reduce) { .post-carousel__track { scroll-behavior:auto; } }

.post-carousel__actions {
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:.25rem;
  width:100%;
  max-width:100%;
  box-sizing:border-box;
  padding:0 .5rem .25rem;
}
.post-carousel__actions button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.375rem;
  min-width:2.75rem;
  min-height:2.75rem;
  padding:.375rem;
  font-size:.875rem;
}
.post-carousel__actions svg {
  display:block;
  width:1.75rem;
  height:1.75rem;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.post-carousel__actions .post-carousel__save { margin-inline-start:auto; }
.post-carousel__actions [data-post-heart][aria-pressed=true] { color:#ff647c; }
.post-carousel__actions [data-post-heart][aria-pressed=true] svg,
.post-carousel__actions .post-carousel__save[aria-pressed=true] svg { fill:currentColor; }
.post-carousel__actions [data-post-repost][aria-pressed=true] { color:#85d9b4; }
.post-carousel__actions button:disabled { opacity:.5;cursor:wait; }
.post-discussion,
.post-saved,
.community-reposts {
  width:100%;
  max-width:100%;
  box-sizing:border-box;
  margin:1rem auto;
  padding:1rem;
  border:1px solid var(--post-paper-edge,var(--border,#e0e0e0));
  border-radius:.75rem;
  background:var(--post-paper-bg-raised,var(--surface,#fff));
  color:var(--post-paper-ink,var(--text,#222));
  box-shadow:var(--post-shadow-tight,0 .5rem 1.25rem rgba(0,0,0,.08));
  overflow-wrap:anywhere;
  color-scheme:light;
}
.post-discussion[hidden],
.post-discussion [hidden],
.community-reposts [hidden] { display:none!important; }
/* Hide the article-end panel until a media action opens it in its inline slot. */
body.page-post:has([data-post-comments]) #post-discussion:not([data-comments-open]) { display:none; }
.post-discussion h2,
.community-reposts h2 { margin:0;font-size:1.1rem;line-height:1.35;color:inherit; }
.post-discussion__heading { display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.5rem; }
.post-discussion [data-comments-close] { display:inline-flex;align-items:center;justify-content:center;min-width:2.75rem; }
.post-discussion [data-comments-close] svg { display:block;flex-shrink:0; }
.post-discussion > p,
.community-reposts > p { margin:.75rem 0;line-height:1.6; }
.post-carousel .post-discussion { margin:0 0 .75rem; }
.post-discussion form,
.post-discussion textarea,
.post-discussion__comment,
.post-saved__list,
.community-reposts__list,
.post-saved__list a,
.community-reposts__list a {
  width:100%;
  max-width:100%;
  box-sizing:border-box;
}
.post-discussion textarea {
  display:block;
  margin-block:.5rem;
  padding:.75rem;
  border:1px solid var(--post-paper-edge,var(--border,#737373));
  border-radius:.5rem;
  background:var(--post-control-bg,var(--surface,#fff));
  color:inherit;
  font:inherit;
  resize:vertical;
}
.post-discussion button,
.community-reposts button { font:inherit;cursor:pointer;padding:.5rem .75rem;min-height:2.75rem;border:1px solid var(--post-paper-edge,var(--border,#e0e0e0));border-radius:.5rem;background:var(--post-control-bg,var(--surface,#fff));color:inherit;box-sizing:border-box;max-width:100%; }
.post-discussion button[type=submit] { background:var(--post-paper-ink,#222);color:var(--post-paper-bg-raised,#fff);font-weight:700; }
.post-discussion button:disabled,
.community-reposts button:disabled { opacity:.5;cursor:wait; }
.post-discussion :is(button,a,textarea):focus-visible,
.post-saved :is(summary,a):focus-visible,
.community-reposts :is(button,a):focus-visible { outline:2px solid var(--post-accent-strong,var(--primary-orange,#e66c2c));outline-offset:2px; }
.post-discussion__buttons,
.community-reposts__buttons { display:flex;flex-wrap:wrap;gap:.5rem;align-items:center; }
.post-discussion__comment { padding-block:1rem;border-bottom:1px solid var(--post-paper-edge,var(--border,#d4d4d8)); }
.post-discussion__comment p { margin:.5rem 0;white-space:pre-wrap; }
.post-discussion__comment time { font-size:.85rem; }
.post-discussion [role=status],
.community-reposts [role=status] { margin-block:.75rem; }
.post-discussion [role=status] { color:var(--post-paper-muted,inherit); }
.post-discussion [role=status]:empty,
.community-reposts [role=status]:empty { display:none; }
.post-saved summary { cursor:pointer;font-size:.95rem;font-weight:700;letter-spacing:.02em;line-height:1.5; }
.post-saved summary::marker { color:var(--post-accent-strong,var(--primary-orange,#e66c2c)); }
.post-saved__list,
.community-reposts__list { display:grid;grid-template-columns:1fr;gap:.75rem;list-style:none;padding:0;margin:1rem 0; }
.post-saved__list li,
.community-reposts__list li { min-width:0; }
.post-saved__list a,
.community-reposts__list a { display:block;padding:.9rem;border:1px solid var(--post-paper-edge,var(--border,#e0e0e0));border-radius:.65rem;background:var(--post-control-bg,var(--surface,#fff));color:inherit;text-decoration:none;line-height:1.5; }
.post-saved__list a:hover,
.community-reposts__list a:hover { border-color:var(--post-accent-strong,var(--primary-orange,#e66c2c)); }
.community-reposts__label { display:block;font-size:.75rem;letter-spacing:.04em;color:var(--text-muted,#595959); }
.community-reposts__title { display:block;margin-block:.4rem;font-size:1.05rem;font-weight:700; }
.community-reposts__action { display:flex;align-items:center;gap:.4rem;font-size:.875rem;font-weight:600;color:var(--primary-orange,#a34512); }
.community-reposts__action svg { display:block;flex-shrink:0; }
@media(min-width:769px) {
  .community-reposts__list { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(prefers-color-scheme:dark) {
  .post-discussion,
  .post-saved,
  .community-reposts { background:var(--post-paper-bg-raised,var(--dm-card-bg,#1b1e24));color:var(--post-paper-ink,var(--dm-text,#f4f4f5));border-color:var(--post-paper-edge,rgba(255,255,255,.13));color-scheme:dark; }
  .post-discussion textarea,
  .post-discussion button,
  .community-reposts button,
  .post-saved__list a,
  .community-reposts__list a { background:var(--post-control-bg,var(--dm-card-bg,#1b1e24));border-color:var(--post-paper-edge,rgba(255,255,255,.13)); }
  .post-discussion button[type=submit] { background:var(--post-paper-ink,#f4f4f5);color:var(--post-paper-bg-raised,#1b1e24); }
  .community-reposts__label { color:var(--dm-text,#f4f4f5);opacity:.72; }
}
