.rich-body { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
.post-emoji { font-family: "Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",sans-serif; font-size: 1.65em; line-height: 1; vertical-align: -.12em; }
.post-hashtag { color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.record-card { position: relative; }
.record-card-title { overflow-wrap: anywhere; }
.record-card-title::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.record-card .post-hashtag { position: relative; z-index: 2; }
.record-card .record-excerpt { white-space: normal; line-height: 1.5; margin: 0 0 4px; }
.record-read-more { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; margin-bottom: 12px; color: var(--accent); font-size: 12px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.record-read-more:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
.post-emoji-menu { min-width: 0; max-width: 100%; }
.post-emoji-menu summary { cursor: pointer; }
.post-emoji-menu[open] { flex-basis: 100%; }
.post-emoji-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(64px,1fr)); gap: 6px; width: 100%; max-width: 320px; margin-top: 10px; }
.post-format-toolbar .post-emoji-grid button { min-height: 48px; min-width: 0; width: 100%; font-family: "Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",sans-serif; font-size: 26px; }
.rich-body h2,.rich-body h3 { margin: 12px 0; }
.rich-body ul,.rich-body ol { margin: 12px 0; padding-left: 24px; white-space: normal; }
.rich-body li { white-space: pre-wrap; }
.rich-body blockquote { margin: 12px 0; padding: 8px 14px; border-left: 3px solid var(--accent); }
.post-gallery { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin: 12px 0; min-width: 0; }
.post-gallery:empty { display: none; }
.post-gallery img { display: block; width: 100%; height: auto; max-height: 420px; object-fit: contain; background: var(--soft); border-radius: var(--radius); }
.post-gallery img:only-child { grid-column: 1 / -1; }
.post-editor-tools { display: grid; gap: 12px; min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.post-writing-heading h3 { margin: 0; font-size: 17px; }
.post-writing-heading p { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.post-character-count { text-align: right; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.post-character-count.over-limit { color: #b42318; font-weight: 600; }
.post-image-status { margin: 0; font-size: 12px; color: var(--muted); }
.post-media-menu { border-top: 1px solid var(--line); padding-top: 14px; }
.post-media-menu summary { font-size: 13px; font-weight: 600; }
.post-media-menu summary span { color: var(--muted); font-weight: 400; }
#compose-dialog,.contribution-dialog { width: 860px; max-width: calc(100vw - 32px); box-sizing: border-box; padding: 30px; overflow-y: auto; }
#compose-dialog h2 { margin: 10px 0; }
.contribution-intro p { margin: 0 0 20px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.contribution-intro h3 { margin: 0 0 6px; font-size: 21px; }
.contribution-section { margin: 0; min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.contribution-section legend { padding: 0 6px; font-size: 14px; font-weight: 650; }
.contribution-help { margin: 0 0 14px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.contribution-fields { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,2fr); gap: 16px; }
.contribution-form label { font-size: 13px; }
.contribution-section>label { margin-top: 12px; }
.contribution-optional>summary { font-size: 14px; font-weight: 600; cursor: pointer; }
.contribution-optional>summary span { font-size: 12px; color: var(--muted); font-weight: 400; }
.contribution-optional[open] .contribution-help { margin-top: 12px; }
.contribution-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; border-top: 1px solid var(--line); padding-top: 18px; }
.contribution-footer p { margin: 0; color: var(--muted); font-size: 12px; }
.contribution-composer>summary { cursor: pointer; font-weight: 600; }
.contribution-composer[open]>.contribution-form { margin-top: 20px; }
.post-format-toolbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--soft); min-width: 0; }
.post-format-toolbar select { width: auto; max-width: 100%; min-width: 0; padding: 7px; }
.post-format-toolbar button { min-height: 36px; min-width: 36px; padding: 6px 10px; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; }
.post-format-toolbar button[aria-pressed="true"] { border-color: var(--accent); }
.post-visual-editor { min-height: 150px; max-height: min(55vh,500px); width: 100%; min-width: 0; overflow-y: auto; box-sizing: border-box; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text); }
.post-visual-editor:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.post-visual-editor p { margin: 0 0 8px; }
.post-link-menu { max-width: 100%; }
.post-link-menu summary,.post-media-menu summary { cursor: pointer; }
.post-link-menu[open] { flex-basis: 100%; }
.post-media-menu>label,.post-media-menu>.post-link-tools { margin-top: 10px; }
.post-attachment-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; margin-top: 12px; min-width: 0; }
.post-attachment-actions > .button { min-height: 44px; }
.post-video-menu { min-width: 0; max-width: 100%; }
.post-video-menu > summary { min-height: 44px; cursor: pointer; }
.post-video-menu[open] { flex-basis: 100%; }
.post-video-menu .post-link-tools { margin-top: 12px; }
.post-video-draft { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px; margin: 10px 0; background: var(--soft); border: 1px solid var(--line); white-space: normal; }
.post-video-draft span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.post-video { margin: 12px 0; white-space: normal; min-width: 0; }
.post-video iframe { display: block; width: 100%; height: auto; min-height: 200px; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius); }
.post-video>a { display: inline-block; margin-top: 5px; font-size: .875em; }
.post-secondary-actions { margin-top: 12px; }
.post-secondary-actions>summary { cursor: pointer; color: var(--muted); }
.post-secondary-actions>.form-actions { margin-top: 10px; }
.post-editor-tools .form-actions { flex-wrap: wrap; }
.post-link-tools { display: flex; align-items: flex-end; gap: 8px; min-width: 0; }
.post-link-tools label { flex: 1; min-width: 0; }
.post-image-drafts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.post-image-draft { min-width: 0; }
.post-image-draft img { max-width: 100%; height: 100px; object-fit: contain; }
.post-image-description > summary { cursor: pointer; color: var(--accent); min-height: 44px; padding: 10px 0; }
.post-image-description label { margin-top: 8px; }
.post-text-preview { border: 1px solid var(--line); padding: 12px; background: var(--soft); }
.post-card-thumbnail { width: 100%; height: 150px; object-fit: contain; }
@media(max-width:700px) { .post-image-drafts { grid-template-columns: minmax(0,1fr); } .post-link-tools { flex-direction: column; align-items: stretch; } }
@media(max-width:420px) { .post-visual-editor { min-height: 120px; padding: 10px; } .post-format-toolbar { gap: 4px; padding: 6px; } }
@media(max-width:600px) {
    #compose-dialog,.contribution-dialog { padding: 22px 16px; }
    .contribution-fields { grid-template-columns: minmax(0,1fr); }
    .contribution-section,.post-editor-tools { padding: 14px; }
    .contribution-footer .button { width: 100%; justify-content: center; }
}
