/* New text uses one typography; legacy HTML keeps its existing presentation. */
.feed-content-v2 { font-size:inherit; line-height:1.7; overflow-wrap:anywhere; word-break:normal; }
.feed-content-v2 p, .feed-content-v2 ul, .feed-content-v2 ol, .feed-content-v2 blockquote, .feed-content-v2 pre { margin:0; }
.feed-content-v2 > * + * { margin-top:.65em; }
/* A quote already ends the line; keep only the author's explicit following breaks. */
.feed-content-v2 blockquote + p { margin-top:0; }
.feed-content-v2 > :first-child { margin-top:0; }
.feed-content-v2 > :last-child { margin-bottom:0; }
.feed-content-v2 ul, .feed-content-v2 ol { padding-left:1.6em; }
.feed-content-v2 li + li { margin-top:.25em; }
.feed-content-v2 li p { margin:0; }
.feed-content-v2 blockquote { border-left:3px solid var(--ap-accent,#88aaff); padding:3px 0 3px 14px; color:inherit; }
.feed-content-v2 a { color:var(--ap-accent,#88aaff); text-decoration:none; }
.feed-page .markdown-content a, .post-detail-page .markdown-content a { text-decoration:none; }
.feed-content-v2 pre { padding:12px; border-radius:10px; white-space:pre-wrap; background:var(--ap-soft,#929baa12); overflow-x:auto; }
.feed-content-v2 code { font-size:.92em; }
.feed-content-v2 img.feed-emoji, .feed-input__surface img.feed-emoji { display:inline-block!important; width:1.35em!important; height:1.35em!important; max-width:none!important; margin:0 .05em!important; border:0!important; border-radius:0!important; vertical-align:-.3em; object-fit:contain!important; user-select:all; }
.feed-content-v2 .feed-inline-image { display:block; margin:1em 0; padding:0; }
.feed-content-v2 .feed-inline-image a { display:block; border:0; }
.feed-content-v2 .feed-inline-image img { display:block; width:100%; height:auto; max-width:100%; max-height:none; object-fit:contain; border-radius:12px; margin:0; }
.feed-content-v2 .feed-inline-image:first-child { margin-top:0; }
.feed-content-v2 .feed-inline-image:last-child { margin-bottom:0; }
.feed-spoiler { position:relative; padding:.04em .08em; border-radius:4px; -webkit-box-decoration-break:clone; box-decoration-break:clone; cursor:pointer; transition:background-color .2s; }
.feed-spoiler:not(.is-revealed) { color:transparent!important; -webkit-text-fill-color:transparent!important; background-color:#8390a83b; background-image:radial-gradient(circle,#fff9 .7px,transparent 1.1px),radial-gradient(circle,#fffb .6px,transparent 1px),radial-gradient(circle,#fff7 .5px,transparent 1px); background-size:9px 11px,13px 9px,11px 7px; background-position:0 0,3px 5px,7px 2px; }
.feed-spoiler[data-feed-dust] { background-image:none; }
.feed-spoiler__dust { position:absolute!important; inset:auto!important; left:0!important; top:0!important; display:block!important; max-width:none!important; max-height:none!important; margin:0!important; padding:0!important; border:0!important; border-radius:0!important; pointer-events:none!important; user-select:none; z-index:1; }
.feed-spoiler:not(.is-revealed) * { color:transparent!important; -webkit-text-fill-color:transparent!important; text-decoration-color:transparent!important; }
.feed-spoiler:not(.is-revealed) img { opacity:0; }
.feed-spoiler:not(.is-revealed) a { pointer-events:none; }
.feed-spoiler.is-revealed { background:#9caacf14; cursor:text; }
.feed-spoiler:focus-visible { outline:2px solid var(--ap-accent,#88aaff); outline-offset:2px; }
/* Spoilers remain readable while an editor is composing the post. */
.feed-input .feed-input__surface .feed-spoiler, .feed-input .feed-input__surface .feed-spoiler * { color:inherit!important; -webkit-text-fill-color:currentColor!important; text-decoration-color:currentColor!important; }
.feed-input .feed-input__surface .feed-spoiler { background:#93a7d422; background-image:none; animation:none; outline:1px dashed #9baed555; cursor:text; }
.feed-input .feed-input__surface .feed-spoiler img { opacity:1; }
.feed-input .feed-input__surface .feed-spoiler a { pointer-events:auto; }
.feed-gallery { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:3px; border-radius:14px; overflow:hidden; margin-top:15px; isolation:isolate; }
.feed-gallery__item { display:block; position:relative; grid-column:span 2; aspect-ratio:1/1; min-width:0; overflow:hidden; border:0; padding:0; background:#838c9c12; text-decoration:none; }
.feed-gallery__item img, .feed-gallery__item video { display:block; width:100%; height:100%; object-fit:cover; }
.feed-gallery__item:focus-visible { outline:3px solid var(--ap-accent,#88aaff); outline-offset:-3px; }
.feed-gallery--1 { display:block; }
.feed-gallery--1 .feed-gallery__item { aspect-ratio:auto; }
.feed-gallery--1 .feed-gallery__item img, .feed-gallery--1 .feed-gallery__item video { width:100%; height:auto; max-height:min(65dvh,650px); object-fit:contain; }
.feed-gallery--2 .feed-gallery__item, .feed-gallery--4 .feed-gallery__item { grid-column:span 3; }
.feed-gallery--3 { grid-template-columns:repeat(2,minmax(0,1fr)); }
.feed-gallery--3 .feed-gallery__item { grid-column:auto; }
.feed-gallery--3 .feed-gallery__item:first-child { grid-row:span 2; height:100%; aspect-ratio:auto; }
.feed-gallery--5 .feed-gallery__item:nth-child(-n+2), .feed-gallery--8 .feed-gallery__item:nth-child(-n+2) { grid-column:span 3; aspect-ratio:3/2; }
.feed-gallery--7 .feed-gallery__item:first-child { grid-column:1/-1; aspect-ratio:3/1; }
.feed-documents { display:flex; flex-direction:column; gap:7px; margin-top:14px; }
.feed-document { display:flex; align-items:center; gap:11px; min-width:0; padding:11px 13px; border-radius:12px; border:1px solid var(--ap-line,#969fb42b); color:inherit; text-decoration:none; background:var(--ap-soft,#969fb40a); }
.feed-document:hover { border-color:var(--ap-accent,#88aaff); }
.feed-document__icon { display:grid; place-items:center; width:35px; height:38px; flex:none; border-radius:8px; color:var(--ap-accent,#88aaff); background:#88aaff12; }
.feed-document svg { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.5; stroke-linecap:round; stroke-linejoin:round; }
.feed-document__info { display:flex; flex-direction:column; gap:4px; flex:1; min-width:0; }
.feed-document__name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:13px; }
.feed-document__size { color:var(--ap-muted,#8994a6); font-size:11px; }
.feed-document__download { color:var(--ap-muted,#8994a6); flex:none; width:18px!important; }
@media(max-width:640px) { .feed-gallery { border-radius:11px; gap:2px; } }
@media(prefers-reduced-motion:reduce) { .feed-spoiler:not(.is-revealed) { animation:none; } }

/* Keep albums compact regardless of intrinsic image dimensions. */
.feed-gallery:not(.feed-gallery--1) { aspect-ratio:1.4; max-height:520px; grid-auto-rows:minmax(0,1fr); }
.feed-gallery:not(.feed-gallery--1) .feed-gallery__item { aspect-ratio:auto; height:100%; }
.feed-gallery.feed-gallery--2 { aspect-ratio:2; }
