/* A quiet reading column, with tools close to the words rather than a dashboard. */
.daily-feed { max-width: 1230px; margin: 0 auto; grid-template-columns: minmax(0, 760px) minmax(260px, 340px); gap: 28px; }
.daily-feed .welcome--daily { min-height: 0; padding: 12px 4px 24px; border: 0; background: none; gap: 20px; align-items: center; }
.welcome--daily .welcome-art { width: 82px; height: 83px; object-fit: contain; }
.daily-feed .welcome--daily h1 { font-size: clamp(1.7rem, 3vw, 2.15rem); margin: 0 0 6px; }
.welcome--daily p { font-size: .95rem; margin: 0; color: var(--muted); }
.welcome--daily .actions { display: none; }
.daily-feed .feed { padding: 0; border: 1px solid var(--line); background: var(--surface); overflow: clip; }
.daily-feed .tabs { padding: 0 20px; margin: 0; border-block: 1px solid var(--line); }
.daily-feed .tabs-caption { display: none; }
.daily-feed .home-city { padding-top: 10px; align-self: start; }
.standalone-composer { max-width: 740px; margin: 20px auto; }
.standalone-composer .post-composer { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.post-composer { padding: 24px; margin: 0; }
.post-composer > div > div { margin-bottom: 0; }
.composer-heading { display: flex; gap: 12px; align-items: center; margin-bottom: 20px; }
.composer-heading .avatar { width: 42px; height: 42px; flex-shrink: 0; }
.composer-heading strong { display: block; font-size: 1rem; }
.composer-heading small { display: block; margin-top: 4px; color: var(--muted); font-size: .8rem; }
.composer-formats { display: none; }
.is-enhanced .composer-formats { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 0 12px; }
.is-enhanced .composer-native-format { display: none; }
.composer-formats button { border: 1px solid transparent; background: none; color: var(--muted); border-radius: 9px; padding: 8px 10px; display: inline-flex; align-items: center; gap: 7px; font-size: .8rem; flex-shrink: 0; min-height: 38px; cursor: pointer; }
.composer-formats button:hover { background: var(--surface-soft); color: var(--ink); }
.composer-formats button[aria-pressed=true] { background: var(--sage); color: var(--green); border-color: color-mix(in srgb, var(--green) 20%, transparent); }
.post-composer textarea[data-post-composer-target=body] { border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); padding: 16px; min-height: 100px; font-size: 1.08rem; line-height: 1.6; resize: none; max-height: 280px; }
.post-composer textarea:focus-visible { outline-offset: 3px; }
.post-composer label, .post-composer small { font-size: .8rem; }
.post-composer [data-post-composer-target=panel] { margin: 10px 0 18px; }
.post-composer small { color: var(--muted); }
.composer-book-results { max-height: 230px; overflow: auto; scrollbar-width: thin; margin-top: 10px; }
.composer-book { display: flex; align-items: center; gap: 12px; text-align: left; width: 100%; border: 0; padding: 9px; color: var(--ink); background: transparent; border-radius: 8px; cursor: pointer; }
.composer-book:hover, .composer-book:focus-visible { background: var(--sage); }
.composer-book .book-cover { width: 32px; height: 46px; flex-shrink: 0; }
.composer-book > span { flex: 1; }
.composer-book strong, .composer-book small { display: block; }
.composer-book strong { font-size: .9rem; }
.composer-selected { margin-top: 12px; padding: 12px; border-left: 3px solid var(--green); color: var(--green); background: var(--sage); font-size: .9rem; }
.composer-drop { border: 1px dashed var(--line-strong); border-radius: 12px; padding: 20px; text-align: center; background: color-mix(in srgb, var(--sage) 35%, transparent); }
.composer-drop.is-dragging { outline: 2px solid var(--green); background: var(--sage); }
.composer-upload { position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; min-height: 46px; cursor: pointer; color: var(--green); }
.composer-upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.composer-upload:focus-within { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 6px; }
.composer-upload span { font-weight: 400; color: var(--muted); }
.composer-thumbnails { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-top: 12px; }
.composer-thumbnail { min-width: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.composer-thumbnail > img { width: 100%; height: 150px; object-fit: contain; background: var(--surface-soft); }
.thumbnail-controls { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px; font-size: .75rem; }
.thumbnail-controls button { border: 0; background: transparent; color: var(--green); cursor: pointer; min-width: 36px; min-height: 36px; }
.thumbnail-controls button:disabled { opacity: .3; cursor: default; }
.composer-thumbnail label { padding: 0 8px; font-size: .72rem; }
.composer-thumbnail input { min-height: 36px; padding: 6px; font-size: .8rem; }
.composer-preview { margin-top: 10px; font-size: .8rem; color: var(--muted); }
.composer-preview summary { cursor: pointer; width: fit-content; padding: 6px 0; }
.composer-preview [data-post-composer-target=preview] { padding: 12px; border-left: 2px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink); }
.composer-preview img { max-width: 100%; max-height: 240px; object-fit: contain; margin: 8px 0; }
.composer-footer { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding-top: 16px; border-top: 1px solid var(--line); font-size: .72rem; color: var(--muted); }
.composer-audience { flex: 1; display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.composer-audience a { text-decoration: underline; }
.composer-footer .button { font-size: .88rem; min-height: 42px; padding: 10px 18px; }
.composer-status, .composer-error, .post-action-status { font-size: .84rem; line-height: 1.5; color: var(--green); padding-top: 10px; margin: 0; }
.composer-error { color: var(--error); }
.post-composer[aria-busy=true] { opacity: .72; }
.feed-bottom { text-align: center; padding: 12px 20px 24px; }
.feed-bottom p { color: var(--muted); font-size: .8rem; min-height: 1em; }
.feed-more { display: inline-grid; }
.feed-more-label, .feed-more-loading { grid-area: 1 / 1; display: inline-flex; align-items: center; justify-content: center; gap: .7rem; }
.feed-more-loading { visibility: hidden; }
.feed-more[aria-busy=true] { cursor: wait; background: var(--surface-soft); border-color: var(--line-strong); color: var(--green); }
.feed-more[aria-busy=true] .feed-more-label { visibility: hidden; }
.feed-more[aria-busy=true] .feed-more-loading { visibility: visible; }
.feed-more-spinner { width: 16px; height: 16px; border: 2px solid color-mix(in srgb, currentColor 20%, transparent); border-top-color: currentColor; border-radius: 50%; }
.feed-more[aria-busy=true] .feed-more-spinner { animation: feed-more-spin .7s linear infinite; }
.feed-bottom .feed-more-status { margin: 12px 0 0; }
@keyframes feed-more-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .feed-more[aria-busy=true] .feed-more-spinner { animation: none; } }
.feed-empty { padding: 36px 24px; text-align: center; color: var(--muted); line-height: 1.6; }
.feed-empty a { display: block; text-decoration: underline; margin-top: 8px; }
.feed-fresh { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 14px; border: 0; background: var(--sage); color: var(--green); cursor: pointer; }
.daily-feed .post { padding: 24px; }
.daily-feed .post-heading { gap: 12px; align-items: center; margin-bottom: 12px; }
.daily-feed .post-heading .avatar { width: 42px; height: 42px; }
.daily-feed .post-heading .author-name { font-size: 1rem; }
.post-heading > div { min-width: 0; }
.post-heading time { font-size: .76rem; color: var(--muted); }
.post-kind { margin-left: auto; font-size: .7rem; color: var(--muted); white-space: nowrap; }
.post-pin-button { border: 0; background: none; color: var(--muted); border-radius: 50%; width: 36px; height: 36px; flex-shrink: 0; cursor: pointer; }
.post-pin-button:hover, .post-pin-button[aria-pressed=true] { background: var(--sage); color: var(--green); }
.post-pinned { display: flex; align-items: center; gap: 7px; color: var(--green); font-size: .76rem; margin: 0 0 12px; }
.daily-feed .post-content { margin-left: 54px; }
.daily-feed .post-content p { font-size: 1rem; line-height: 1.65; margin-top: 0; overflow-wrap: anywhere; }
.daily-feed .post-content .book-preview { margin-left: 0; border: 1px solid var(--line); background: var(--surface-soft); border-radius: 12px; padding: 16px; grid-template-columns: 100px minmax(0,1fr); gap: 16px; }
.daily-feed .book-preview .book-cover { width: 100px; height: 145px; }
.daily-feed .post-content h2 { font-size: 1.3rem; line-height: 1.3; }
.daily-feed .post-actions { padding-top: 6px; font-size: .82rem; }
.post-text.is-collapsed { max-height: 10.5em; overflow: hidden; mask-image: linear-gradient(to bottom, black 75%, transparent); }
.post-read-more { color: var(--green); margin: 4px 0 12px; }
.post-excerpt { margin: 16px 0; padding: 24px; border: 1px solid var(--line); border-radius: 3px 16px 16px 3px; background: var(--surface-soft); }
.post-excerpt > span { font-size: 3rem; color: var(--green); line-height: .8; display: block; }
.post-excerpt blockquote { margin: 12px 0 20px; line-height: 1.7; font-size: 1.12rem; overflow-wrap: anywhere; }
.post-excerpt figcaption { font-size: .8rem; color: var(--muted); }
.post-excerpt figcaption a { color: var(--green); font-weight: 600; }
.post-gallery { margin: 14px 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface-soft); }
.post-gallery-track { display: flex; align-items: flex-start; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.post-gallery-track::-webkit-scrollbar { display: none; }
.post-gallery-slide { flex: 0 0 100%; min-width: 0; margin: 0; scroll-snap-align: start; }
.post-gallery-slide button { display: block; width: 100%; padding: 0; border: 0; background: transparent; cursor: zoom-in; }
.post-gallery-slide img { display: block; width: 100%; height: auto; max-height: 550px; object-fit: contain; }
.post-gallery-slide figcaption { padding: 10px 16px; font-size: .78rem; color: var(--muted); overflow-wrap: anywhere; }
.post-gallery-controls { display: flex; justify-content: space-between; align-items: center; padding: 6px 12px; border-top: 1px solid var(--line); font-size: .8rem; }
.post-gallery-controls button { width: 40px; height: 36px; background: var(--surface); color: var(--green); border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.post-gallery-controls button:disabled { opacity: .35; cursor: default; }
.post-image-dialog { border: 0; border-radius: 12px; background: var(--surface); padding: 14px; max-width: 92vw; max-height: 92dvh; }
.post-image-dialog::backdrop { background: var(--scrim); backdrop-filter: blur(4px); }
.post-image-dialog > button { display: block; margin: 0 0 10px auto; }
.post-image-dialog > img { max-width: 85vw; max-height: 78dvh; object-fit: contain; }
body:has(.post-image-dialog[open]) { overflow: hidden; }
.post-video { margin: 16px 0; }
.post-video-player { aspect-ratio: 16/9; background: var(--sage); border-radius: 12px; overflow: hidden; }
.post-video-player button { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; height: 100%; gap: 12px; border: 1px solid var(--line); border-radius: 12px; color: var(--green); background: transparent; cursor: pointer; }
.post-video-player button > .icon { font-size: 2rem; }
.post-video-player button span { font-size: .8rem; }
.post-video iframe { width: 100%; height: 100%; border: 0; }
.post-video > a { display: block; margin-top: 8px; font-size: .75rem; text-align: right; color: var(--muted); }
[hidden] { display: none !important; }
@media (max-width: 1150px) { .daily-feed { grid-template-columns: minmax(0, 760px); justify-content: center; } .daily-feed .home-city { display: none; } }
@media (max-width: 600px) {
    .daily-feed .welcome--daily { padding: 4px 8px 18px; gap: 12px; }
    .welcome--daily .welcome-art { width: 52px; height: 58px; }
    .welcome--daily p { font-size: .8rem; }
    .daily-feed .welcome--daily h1 { font-size: 1.5rem; }
    .daily-feed .welcome--daily p br { display: none; }
    .post-composer, .daily-feed .post { padding: 18px 14px; }
    .composer-heading small { font-size: .72rem; }
    .composer-heading strong { font-size: .94rem; }
    .is-enhanced .composer-formats { flex-wrap: wrap; gap: 4px; }
    .composer-formats button { padding: 8px; }
    .composer-footer { flex-wrap: wrap; gap: 8px; }
    .composer-audience { flex-basis: 100%; margin-bottom: 4px; }
    .composer-footer .button { margin-left: auto; }
    .daily-feed .post-content { margin-left: 0; }
    .daily-feed .post-content .book-preview { grid-template-columns: 76px minmax(0,1fr); padding: 12px; gap: 12px; }
    .daily-feed .book-preview .book-cover { width: 76px; height: 110px; }
    .post-kind { font-size: .65rem; }
    .post-excerpt { padding: 20px; }
    .composer-drop { padding: 14px 8px; }
    .composer-upload { flex-wrap: wrap; }
    .composer-thumbnail > img { height: 100px; }
}
@media (prefers-reduced-motion: no-preference) { .post-composer, .composer-formats button, .post-pin-button { transition: background .16s ease, opacity .16s ease; } }

.post-composer.is-enhanced:not(.is-editing) { padding-block: 18px 12px; }
.post-composer:not(.is-editing) .composer-heading { margin-bottom: 6px; }
.post-composer:not(.is-editing) .composer-heading small { display: none; }
.post-composer.is-enhanced:not(.is-editing) textarea[data-post-composer-target=body] { min-height: 50px; height: 50px; padding: 12px 0; resize: none; }
.post-composer.is-enhanced:not(.is-editing) .composer-footer,
.post-composer.is-enhanced:not(.is-editing) .composer-preview,
.post-composer.is-enhanced:not(.is-editing) [data-post-composer-target=panel],
.post-composer:not(.is-editing) .composer-collapse { display: none; }
.post-composer.is-enhanced:not(.is-editing) .composer-formats { flex-wrap: wrap; padding-bottom: 0; }
.composer-collapse { margin-left: auto; color: var(--muted); padding: 10px; }
.daily-feed .home-city h2 { font-size: 1.7rem; }
.daily-feed .home-city h3 { font-size: 1.4rem; }
.daily-feed .home-city p { font-size: 1rem; line-height: 1.5; }
@media (max-width: 600px) {
    .daily-feed .welcome--daily { display: flex; align-items: center; margin-bottom: 4px; }
    .daily-feed .welcome--daily .welcome-art { float: none; flex-shrink: 0; margin: 0; }
    .daily-feed .welcome--daily h1 { margin-bottom: 4px; }
    .daily-feed .welcome--daily p { font-size: .75rem; line-height: 1.4; }
}
.post-composer.is-enhanced:not(.is-editing) textarea[data-post-composer-target=body] { overflow: hidden; }


/* Shared inline editor: compact in the feed, fully usable in a comment. */
.social-editor { position: relative; min-width: 0; }
.social-editor textarea { width: 100%; }
.editor-tools, .mention-choices { display: none; }
.social-editor.is-enhanced .editor-tools { display: flex; align-items: center; gap: .25rem; margin-top: .35rem; }
.social-editor.is-enhanced .mention-choices:not([hidden]) { display: grid; }
.editor-tools button { border: 0; background: transparent; color: var(--ink); min-width: 36px; min-height: 36px; border-radius: 6px; font-size: 1rem; cursor: pointer; }
.editor-tools button:hover, .editor-tools button:focus-visible { background: var(--sage); color: var(--green); }
.editor-tools small { color: var(--muted); font-size: .75rem; margin-left: .5rem; line-height: 1.3; }
.editor-tools-divider { width: 1px; height: 18px; background: var(--line); margin: 0 .25rem; }
.editor-status { margin: .4rem 0; color: var(--muted); font-size: .8rem; }
.member-mention { color: var(--green); font-weight: 650; text-decoration: none; background: var(--sage); border-radius: 4px; padding: .05em .15em; }
.member-mention:hover { text-decoration: underline; }
.post-content .preserve-lines, .inline-comment .preserve-lines, .comment .preserve-lines { overflow-wrap: anywhere; }
.post-content u, .inline-comment u, .social-rich-text u { text-underline-offset: .18em; }
.mention-choices { position: absolute; z-index: 8; inset: auto 0 auto; max-width: 360px; max-height: 240px; overflow-y: auto; scrollbar-width: thin; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: 0 10px 28px var(--shadow-strong); padding: .3rem; }
.mention-choices button { display: grid; gap: .1rem; text-align: left; border: 0; border-radius: 6px; background: transparent; padding: .6rem .75rem; color: var(--ink); cursor: pointer; }
.mention-choices button span { font-size: .8rem; color: var(--muted); }
.mention-choices button:hover, .mention-choices button[aria-selected=true] { background: var(--sage); }
.post-composer.is-enhanced:not(.is-editing) .editor-tools, .post-composer.is-enhanced:not(.is-editing) .editor-preview, .post-composer.is-enhanced:not(.is-editing) .editor-status { display: none; }
.mention-bell { position: relative; }
.mention-panel { position: absolute; right: -44px; top: calc(100% + 14px); width: min(380px, calc(100vw - 32px)); background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 14px 40px var(--shadow-strong); padding: 1rem; z-index: 60; animation: mention-in .18s ease-out; }
.mention-panel > header { display: flex; justify-content: space-between; align-items: start; gap: .6rem; padding-bottom: .75rem; border-bottom: 1px solid var(--line); }
.mention-panel > header strong { font-size: 1.15rem; display: block; }
.mention-panel > header span, .mention-status { color: var(--muted); font-size: .8rem; }
.mention-panel > header button { font-size: 1.4rem; width: 32px; height: 32px; }
.mention-panel [data-mentions-target=list] { max-height: min(60dvh, 470px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.mention-panel > footer { border-top: 1px solid var(--line); padding-top: .7rem; font-size: .9rem; text-align: right; }
.mention-notification { display: flex; align-items: start; gap: .7rem; padding: .85rem .5rem; border-bottom: 1px solid var(--line); border-radius: 8px; }
.mention-notification.is-unread { background: var(--sage); }
.mention-notification .avatar { flex-shrink: 0; width: 36px; height: 36px; }
.mention-notification > div { min-width: 0; }
.mention-notification p { margin: .2rem 0; font-size: .85rem; }
.mention-notification time { color: var(--muted); font-size: .75rem; }
.mention-notification a { display: block; margin-top: .4rem; font-size: .85rem; color: var(--green); }
.mention-notification form { margin: .4rem 0 0; }
.mention-notification form button { font-size: .75rem; }
.mention-pagination { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding-top: .75rem; font-size: .8rem; }
@keyframes mention-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 640px) {
    .editor-tools small { display: none; }
    .editor-tools button { min-width: 40px; min-height: 40px; }
    .mention-panel { position: fixed; top: calc(var(--header-height) + 6px); right: 12px; width: calc(100vw - 24px); max-height: calc(100dvh - var(--header-height) - 30px); }
}
@media (prefers-reduced-motion: reduce) { .mention-panel { animation: none; } }

.comment[id] { scroll-margin-top: calc(var(--header-height) + 24px); }
.comment:target { border-color: var(--green); background: var(--sage); }
.message-bubble a { color: inherit; text-decoration: underline; text-underline-offset: .15em; overflow-wrap: anywhere; }
.post-content .preserve-lines a:not(.member-mention), .inline-comment .preserve-lines a:not(.member-mention), .comment .preserve-lines a:not(.member-mention), .social-rich-text a:not(.member-mention) { color: var(--green); text-decoration: underline; text-underline-offset: .17em; }

/* Keep everyday controls reachable without changing the profile's chosen palette. */
.feed-feedback { margin: 0; padding: 10px 24px; color: var(--green); background: var(--surface-soft); font-size: .82rem; }
.feed-feedback:empty { display: none; }
[data-feed-target=items][aria-busy=true] { opacity: .65; }
.post-meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 7px; color: var(--muted); font-size: .76rem; }
.post-meta time { margin: 0; font-size: inherit; }
.post-handle { overflow-wrap: anywhere; }
.post-heading > a { flex-shrink: 0; }
.post-heading .author-name { overflow-wrap: anywhere; }
.post-pin-button { min-width: 44px; min-height: 44px; }
.post-image-dialog { width: min(960px, 94vw); max-width: 94vw; max-height: 94dvh; padding: 16px; }
.post-image-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; font-size: .85rem; color: var(--muted); }
.post-image-dialog > img { display: block; margin: auto; max-width: 100%; max-height: 64dvh; }
.post-image-caption { margin: 12px 0; font-size: .9rem; overflow-wrap: anywhere; }
.post-image-navigation { display: flex; justify-content: space-between; gap: 10px; margin-top: 12px; }
.post-image-navigation .button { min-height: 44px; }
.post-image-navigation button:disabled { opacity: .4; cursor: default; }
@media (max-width: 600px) {
    .composer-formats button { min-height: 44px; }
    .social-editor .editor-tools button { min-width: 44px; min-height: 44px; }
    .post-gallery-controls button { min-width: 44px; min-height: 44px; }
    .post-composer textarea:focus-visible { outline-width: 2px; outline-offset: 2px; border-radius: 8px; }
    .feed-feedback { padding-inline: 14px; }
    .post-image-dialog { padding: 12px; }
    .post-image-navigation .button { padding: 9px 12px; font-size: .82rem; }
}

/* The writing surface remains identifiable before focus; formatting is visible in-place. */
.social-editor .editor-surface { display: none; }
.social-editor.is-enhanced > textarea { display: none; }
.social-editor.is-enhanced .editor-surface { display: block; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); overflow: hidden; font: inherit; }
.social-editor .ql-editor { min-height: 120px; max-height: 320px; padding: 16px; font: inherit; font-size: 1.05rem; line-height: 1.65; color: var(--ink); overflow-wrap: anywhere; white-space: pre-wrap; }
.social-editor .ql-editor p { margin: 0; font: inherit; }
.social-editor .ql-editor strong { font-weight: 750; }
.social-editor .ql-editor em { font-style: italic; }
.social-editor .ql-editor u { text-decoration: underline; text-underline-offset: .18em; }
.social-editor .ql-editor s { text-decoration: line-through; }
.social-editor .ql-editor.ql-blank::before { inset-inline: 16px; color: var(--muted); font-style: normal; }
.social-editor .editor-surface:focus-within { outline: 2px solid var(--green); outline-offset: 2px; }
.social-editor .ql-editor:focus { outline: none; }
.social-editor .editor-tools { padding: 6px 0; flex-wrap: wrap; }
.social-editor .editor-tools button[aria-pressed=true] { background: var(--sage); color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.post-composer.is-enhanced:not(.is-editing) .ql-editor { min-height: 60px; max-height: 100px; }
.post-composer .composer-formats { margin-top: 14px; }
@media (max-width: 600px) {
    .social-editor .ql-editor { padding: 14px; font-size: 1rem; }
    .social-editor .ql-editor.ql-blank::before { inset-inline: 14px; }
}
