/* Shared social surfaces. Palette comes exclusively from the active panel theme. */
.celebrando-modal-open { overflow: hidden; }
.celebrando-dialog, .celebrando-page-heading, .celebrando-layout { color: var(--panel-text); font-family: inherit; }
.celebrando-dialog, .celebrando-dialog *, .celebrando-layout *, #communityRoot, #communityRoot * { box-sizing: border-box; }
.celebrando-dialog { background: var(--panel-surface); border: 1px solid var(--panel-border); border-radius: 24px; box-shadow: 0 28px 100px #0005; color-scheme: inherit; margin: auto; max-height: calc(100dvh - 40px); max-width: calc(100vw - 32px); overflow: auto; overscroll-behavior: contain; padding: 0; width: 640px; }
.celebrando-dialog::backdrop { background: #071510a8; backdrop-filter: blur(5px); }
.celebrando-dialog [hidden], .celebrando-layout [hidden], #communityRoot [hidden] { display: none !important; }
.celebrando-dialog button, .celebrando-dialog select, .celebrando-dialog input, .celebrando-dialog textarea { font: inherit; }
.celebrando-dialog button, .celebrando-layout button, .celebrando-page-heading button { cursor: pointer; }
.celebrando-dialog button { background: var(--panel-soft); border: 1px solid var(--panel-border); border-radius: 12px; color: var(--panel-text); font-size: .88rem; font-weight: 650; min-height: 44px; padding: 10px 14px; }
.celebrando-dialog button:hover { background: var(--panel-tint); }
.celebrando-dialog button:disabled { cursor: default; opacity: .5; }
.celebrando-dialog :is(button, input, select, textarea):focus-visible,
:is(.celebrando-layout, #communityRoot) button:focus-visible { outline: 3px solid var(--panel-accent); outline-offset: 3px; }
.celebrando-dialog :is(input:not([type="range"]):not([type="file"]):not([type="checkbox"]):not([type="radio"]), select, textarea) { background: var(--panel-input); border: 1px solid var(--panel-border); border-radius: 12px; color: var(--panel-text); min-height: 44px; min-width: 0; padding: 12px; }
.celebrando-profile-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.celebrando-profile-edit-dialog { width: min(720px, calc(100vw - 24px)); }
.celebrando-profile-edit-dialog .provider-community-profile-form { display: grid; gap: 16px; padding: 20px; }
.celebrando-profile-edit-dialog .provider-community-profile-head { display: none; }
.celebrando-profile-edit-dialog .provider-community-profile-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.celebrando-profile-edit-dialog .provider-community-profile-actions label { display: flex; align-items: center; gap: 8px; }
.celebrando-dialog textarea { line-height: 1.6; resize: vertical; }
.celebrando-dialog-heading { align-items: flex-start; border-bottom: 1px solid var(--panel-border); display: flex; gap: 16px; justify-content: space-between; padding: 22px 24px; }
.celebrando-dialog-heading > div { min-width: 0; }
.celebrando-dialog-heading h2 { font-size: 1.3rem; letter-spacing: -.03em; line-height: 1.2; margin: 0; }
.celebrando-dialog-heading span { color: var(--panel-accent-ink); display: block; font-size: .72rem; font-weight: 750; letter-spacing: .08em; margin-bottom: 7px; text-transform: uppercase; }
.celebrando-dialog-heading p { color: var(--panel-muted); font-size: .85rem; line-height: 1.5; margin: 8px 0 0; }
.celebrando-dialog-heading > button, .celebrando-post-heading > button:last-child { flex: 0 0 44px; font-size: 1.5rem; padding: 4px; }
.celebrando-inline-status { background: var(--panel-soft); border-radius: 12px; color: var(--panel-text); font-size: .86rem; line-height: 1.5; margin: 12px 20px; overflow-wrap: anywhere; padding: 12px 14px; }
.celebrando-primary, .celebrando-dialog .celebrando-primary { background: var(--panel-accent); border: 1px solid var(--panel-accent); border-radius: 12px; color: var(--panel-on-accent); font: inherit; font-weight: 750; min-height: 46px; padding: 12px 18px; }
.celebrando-dialog .celebrando-primary:hover { background: var(--panel-accent-strong); }
.celebrando-dialog .celebrando-danger { background: var(--panel-danger, #b42332); border-color: var(--panel-danger, #b42332); color: white; }
.celebrando-dialog .celebrando-danger-text { color: var(--panel-danger, #b42332); margin-left: auto; }
.celebrando-confirm-dialog { width: 460px; }
.celebrando-confirm-dialog > p { line-height: 1.6; margin: 20px 24px; }
.celebrando-confirm-dialog footer, .celebrando-editor-dialog footer { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; padding: 18px 24px; }
.celebrando-empty { color: var(--panel-muted); line-height: 1.6; padding: 32px 24px; text-align: center; }
.celebrando-empty strong { color: var(--panel-text); display: block; font-size: 1rem; }
.celebrando-empty p { margin: 8px auto 14px; max-width: 40ch; }
.celebrando-empty button { background: var(--panel-tint); border: 1px solid var(--panel-border); border-radius: 12px; color: var(--panel-accent-ink); min-height: 44px; padding: 10px 16px; }
.celebrando-sr-only { clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; }
.celebrando-avatar { align-items: center; background: var(--panel-tint); border: 1px solid var(--panel-border); border-radius: 50%; color: var(--panel-accent-ink); display: inline-flex; flex: 0 0 44px; font-weight: 750; height: 44px; justify-content: center; overflow: hidden; width: 44px; }
.celebrando-avatar img { height: 100%; object-fit: cover; width: 100%; }
.celebrando-profile-link, .celebrando-dialog .celebrando-profile-link { background: transparent; border: 0; color: inherit; display: inline-flex; min-height: 0; padding: 0; text-align: left; }
.celebrando-profile-link:hover, .celebrando-dialog .celebrando-profile-link:hover { background: transparent; color: var(--panel-accent-ink); }

/* Feed and portfolio share the same hierarchy in Evento and Prestador. */
.celebrando-page-heading { align-items: center; display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; margin: 0 auto 22px; max-width: 1160px; padding: 12px 0; }
.celebrando-page-heading > div { flex: 1 1 260px; }
.celebrando-page-heading span { color: var(--panel-accent-ink); font-size: .72rem; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
.celebrando-page-heading h2 { color: var(--panel-text); font-size: clamp(1.9rem, 3vw, 2.6rem); letter-spacing: -.06em; line-height: 1.12; margin: 6px 0 8px; }
.celebrando-page-heading p { color: var(--panel-muted); font-size: .9rem; margin: 0; }
.celebrando-layout, #communityRoot .community-layout { align-items: start; display: grid; gap: 26px; grid-template-columns: minmax(0, 1fr) 290px; margin: 0 auto; max-width: 1160px; }
.celebrando-layout > *, #communityRoot .community-layout > * { min-width: 0; }
.celebrando-layout > aside, #communityRoot .community-side-column { display: grid; gap: 18px; }
.celebrando-feed-tabs, #communityRoot .community-tabs.celebrando-feed-tabs { align-items: center; border-bottom: 1px solid var(--panel-border); display: flex; flex-wrap: nowrap; gap: 8px; margin: 0 0 18px; overflow-x: auto; padding: 0 0 10px; scrollbar-width: thin; }
.celebrando-feed-tabs button, #communityRoot .celebrando-feed-tabs button { background: transparent; border: 0; border-radius: 10px; color: var(--panel-muted); flex: 0 0 auto; font: inherit; font-size: .86rem; font-weight: 650; min-height: 44px; padding: 10px 16px; white-space: nowrap; }
.celebrando-feed-tabs button[aria-pressed="true"], #communityRoot .celebrando-feed-tabs button[aria-pressed="true"] { background: var(--panel-tint); color: var(--panel-accent-ink); }
.celebrando-compose-entry { align-items: center; background: var(--panel-surface); border: 1px solid var(--panel-border); border-radius: 18px; color: var(--panel-text); display: flex; font: inherit; gap: 14px; margin-bottom: 20px; min-height: 96px; padding: 18px 20px; text-align: left; width: 100%; }
.celebrando-compose-entry > span:nth-child(2) { display: grid; flex: 1; gap: 5px; min-width: 0; }
.celebrando-compose-entry strong { font-size: .98rem; font-weight: 650; }
.celebrando-compose-entry small { color: var(--panel-muted); font-size: .8rem; line-height: 1.4; }
.celebrando-compose-entry > span:last-child { color: var(--panel-accent-ink); font-size: 1.5rem; }
.celebrando-topic-filter { align-items: center; color: var(--panel-muted); display: flex; font-size: .8rem; gap: 10px; margin-bottom: 18px; }
.celebrando-topic-filter select { background: var(--panel-surface); border: 1px solid var(--panel-border); border-radius: 10px; color: var(--panel-text); font: inherit; min-height: 42px; min-width: 0; padding: 8px 12px; }
#communityRoot .community-feed, .celebrando-layout .provider-community-feed { gap: 24px; }
#communityRoot .community-post, .celebrando-layout .provider-community-post { border-radius: 18px; box-shadow: 0 3px 16px #00000006; overflow: visible; }
#communityRoot .community-post-header, .celebrando-layout .provider-community-post > header { align-items: center; gap: 12px; padding: 20px; }
.celebrando-layout .provider-community-post > header > div { flex: 1; min-width: 0; }
#communityRoot .community-post-author > button, .celebrando-layout .provider-community-post header strong { font-size: .95rem; font-weight: 700; }
#communityRoot .community-post-body, .celebrando-layout .provider-community-post-body { font-size: .95rem; line-height: 1.7; overflow-wrap: anywhere; padding: 0 20px 18px; white-space: pre-wrap; }
#communityRoot .community-post-stats, .celebrando-layout .provider-community-stats { color: var(--panel-muted); gap: 8px; padding: 12px 20px; }
#communityRoot .community-post-stats button { background: transparent; border: 0; color: inherit; cursor: pointer; font: inherit; min-height: 32px; text-align: left; }
.celebrando-layout .provider-community-stats button { line-height: 1.4; min-height: 32px; text-align: left; }
#communityRoot .community-post-actions, .celebrando-layout .provider-community-actions { border-top: 1px solid var(--panel-border); flex-wrap: wrap; gap: 6px; padding: 10px 14px; }
#communityRoot .community-post-actions button, .celebrando-layout .provider-community-actions button { font-size: .82rem; min-height: 42px; }
.celebrando-post-more { background: transparent; border: 0; color: var(--panel-muted); font: inherit; font-size: .76rem; margin-left: auto; min-height: 44px; padding: 8px; }
.celebrando-layout .provider-community-media { align-items: start; max-height: none; }
.celebrando-layout .provider-community-media:has(> button:only-child) { display: block; }
.celebrando-layout .provider-community-media button { appearance: none; background: var(--panel-soft); border: 0; cursor: pointer; display: block; height: auto; line-height: 0; min-height: 0; min-width: 0; overflow: hidden; padding: 0; width: 100%; }
.celebrando-layout .provider-community-media button:only-child { grid-column: 1 / -1; }
.celebrando-layout .provider-community-media img { display: block; max-height: 560px; object-fit: cover; width: 100%; }
.celebrando-layout .provider-community-media button:only-child img { height: auto; object-fit: contain; }
#communityRoot .community-post-media img { max-height: 560px; }
#communityRoot .community-post-media .celebrando-feed-photo { background: var(--panel-soft); border: 0; border-radius: 0; cursor: pointer; display: block; height: auto; inset: auto; line-height: 0; max-width: 100%; min-height: 0; overflow: hidden; padding: 0; position: static; width: 100%; }
#communityRoot .community-post-media.is-single img { aspect-ratio: auto; height: auto; object-fit: contain; }
#communityRoot .community-profile-card, .celebrando-profile-card .provider-community-profile-card { align-items: start; display: grid; gap: 14px; grid-template-columns: 1fr; }
#communityRoot .community-profile-card { padding: 24px; }
#communityRoot .community-profile-card h4 small { display: block; margin: 5px 0; }
#communityRoot .community-profile-card h4, .celebrando-profile-card h2 { font-size: 1.08rem; }
#communityRoot .community-profile-card p, .celebrando-profile-card p { font-size: .84rem; line-height: 1.6; }
.celebrando-profile-card .provider-community-profile-card > *, .celebrando-profile-card .provider-community-profile-card > button { grid-column: 1; max-width: 100%; min-width: 0; }
.celebrando-profile-posts { background: var(--panel-soft); border: 1px solid var(--panel-border); border-radius: 12px; color: var(--panel-accent-ink); font: inherit; font-size: .8rem; min-height: 44px; padding: 10px; text-align: left; }
.celebrando-side-note { background: var(--panel-tint); border: 1px solid var(--panel-border); border-radius: 18px; color: var(--panel-muted); padding: 22px; }
.celebrando-side-note h3 { color: var(--panel-text); font-size: .96rem; margin: 0 0 10px; }
.celebrando-side-note p { font-size: .83rem; line-height: 1.6; }
.celebrando-side-note button { background: none; border: 0; color: var(--panel-accent-ink); font: inherit; font-size: .84rem; font-weight: 700; min-height: 44px; padding: 4px 0; }
.celebrando-portfolio-intro { color: var(--panel-muted); font-size: .86rem; line-height: 1.6; margin: 0 0 22px; }
.celebrando-portfolio-grid, #communityRoot .community-feed.celebrando-portfolio-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.celebrando-portfolio-item { background: var(--panel-surface); border: 1px solid var(--panel-border); border-radius: 16px; color: var(--panel-text); min-width: 0; overflow: hidden; position: relative; text-align: left; }
.celebrando-portfolio-item > button:first-child, button.celebrando-portfolio-item { background: transparent; border: 0; color: inherit; cursor: pointer; display: grid; font: inherit; min-width: 0; padding: 0; text-align: left; width: 100%; }
.celebrando-portfolio-item img { aspect-ratio: 4 / 3; display: block; height: auto; object-fit: cover; width: 100%; }
.celebrando-portfolio-item span:not(.celebrando-text-tile), .celebrando-portfolio-item small { -webkit-box-orient: vertical; display: -webkit-box; -webkit-line-clamp: 3; font-size: .9rem; line-height: 1.5; margin: 14px 16px 0; overflow: hidden; overflow-wrap: anywhere; }
.celebrando-portfolio-item small { color: var(--panel-muted); display: block; font-size: .72rem; margin-bottom: 16px; }
.celebrando-portfolio-item .celebrando-portfolio-delete { background: var(--panel-surface); border: 1px solid var(--panel-border); border-radius: 10px; color: var(--panel-danger, #b42332); font-size: .72rem; min-height: 36px; padding: 6px 10px; position: absolute; right: 8px; top: 8px; }
.celebrando-text-tile { align-items: center; aspect-ratio: 4 / 3; background: var(--panel-tint); color: var(--panel-accent-ink); display: flex; font-family: Georgia, serif; font-size: 6rem; justify-content: center; }
.celebrando-load-more { background: var(--panel-surface); border: 1px solid var(--panel-border); border-radius: 12px; color: var(--panel-accent-ink); cursor: pointer; font: inherit; font-size: .86rem; margin-top: 20px; min-height: 46px; padding: 12px; width: 100%; }

/* Composer keeps publishing logic in each portal; the surface and editor are shared. */
.celebrando-composer-content { padding: 22px 24px; }
.celebrando-composer-form, #communityRoot .celebrando-composer-form { background: none; border: 0; box-shadow: none; display: grid; gap: 18px; margin: 0; padding: 0; }
.celebrando-composer-author { align-items: center; display: flex; gap: 12px; }
.celebrando-composer-author > span { display: grid; gap: 4px; }
.celebrando-composer-author small { color: var(--panel-muted); font-size: .8rem; }
.celebrando-composer-form > textarea { min-height: 155px; width: 100%; }
#communityRoot .celebrando-composer-form .community-composer-top { align-items: flex-start; display: flex; gap: 12px; }
#communityRoot .celebrando-composer-form .community-composer-top textarea { min-height: 150px; width: 100%; }
.celebrando-composer-options { align-items: end; display: flex; flex-wrap: wrap; gap: 14px; }
.celebrando-composer-options label { display: grid; font-size: .8rem; gap: 6px; }
.celebrando-audience-note { color: var(--panel-muted); font-size: .78rem; padding-bottom: 12px; }
.celebrando-composer-footer, #communityRoot .celebrando-composer-form .community-composer-actions { align-items: center; border-top: 1px solid var(--panel-border); display: flex; flex-wrap: wrap; gap: 12px; padding-top: 16px; }
.celebrando-composer-footer small { color: var(--panel-muted); flex: 1; font-size: .75rem; }
.celebrando-file-button, #communityRoot .celebrando-composer-form .community-upload-label { background: var(--panel-tint); border: 1px solid var(--panel-border); border-radius: 12px; color: var(--panel-accent-ink); cursor: pointer; display: inline-flex; font-size: .82rem; font-weight: 700; min-height: 44px; overflow: hidden; padding: 12px; position: relative; }
.celebrando-file-button input, #communityRoot .celebrando-composer-form .community-upload-label input { cursor: pointer; height: 100%; inset: 0; opacity: 0; position: absolute; width: 100%; }
.celebrando-file-button:focus-within, #communityRoot .community-upload-label:focus-within { outline: 3px solid var(--panel-accent); outline-offset: 2px; }
.celebrando-photo-list { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.celebrando-photo-item { border: 1px solid var(--panel-border); border-radius: 14px; overflow: hidden; }
.celebrando-photo-item img { aspect-ratio: 4 / 3; display: block; object-fit: contain; width: 100%; }
.celebrando-photo-item > div { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; }
.celebrando-photo-item button { flex: 1; font-size: .75rem; padding: 8px; }
#communityRoot .celebrando-composer-form .community-upload-item { grid-template-columns: 90px minmax(0, 1fr); }
#communityRoot .celebrando-composer-form .community-upload-item-actions { flex-direction: row; flex-wrap: wrap; grid-column: 1 / -1; justify-content: flex-end; }
#communityRoot .celebrando-composer-form .community-upload-item-actions button { min-width: 40px; }

/* Post view: photo and conversation on desktop, a single natural scroll on phones. */
.celebrando-viewer-dialog { width: 1080px; }
.celebrando-post-detail { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(340px, .95fr); min-height: min(650px, 85dvh); }
.celebrando-post-detail.is-text-only { display: block; margin: auto; max-width: 680px; min-height: 480px; }
.celebrando-viewer-dialog:has(.is-text-only) { width: 680px; }
.celebrando-gallery { align-items: center; background: var(--panel-soft); display: flex; justify-content: center; min-width: 0; overflow: hidden; position: relative; }
.celebrando-gallery > img { display: block; height: auto; max-height: min(780px, calc(100dvh - 42px)); object-fit: contain; width: 100%; }
.celebrando-gallery > button { background: var(--panel-surface); border: 1px solid var(--panel-border); border-radius: 50%; font-size: 1.5rem; height: 44px; left: 12px; padding: 0; position: absolute; top: calc(50% - 22px); width: 44px; }
.celebrando-gallery > button[data-celebrando-gallery-step="1"] { left: auto; right: 12px; }
.celebrando-gallery-count { background: var(--panel-surface); border: 1px solid var(--panel-border); border-radius: 20px; bottom: 16px; font-size: .78rem; font-weight: 700; left: 50%; padding: 7px 12px; position: absolute; transform: translateX(-50%); }
.celebrando-post-conversation { display: flex; flex-direction: column; max-height: calc(100dvh - 44px); min-height: 0; min-width: 0; }
.celebrando-post-heading { align-items: center; border-bottom: 1px solid var(--panel-border); display: flex; gap: 12px; padding: 18px 20px; }
.celebrando-post-heading > div { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.celebrando-post-heading strong { font-size: .92rem; }
.celebrando-post-heading small, .celebrando-post-heading time { color: var(--panel-muted); display: block; font-size: .74rem; line-height: 1.5; }
.celebrando-post-scroll { flex: 1; min-height: 80px; overflow-y: auto; overscroll-behavior: contain; padding: 0 20px; }
.celebrando-caption { font-size: .95rem; line-height: 1.7; margin: 20px 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.celebrando-dialog .celebrando-reaction-summary { background: transparent; border: 0; border-bottom: 1px solid var(--panel-border); border-radius: 0; color: var(--panel-accent-ink); font-size: .82rem; padding: 12px 0; text-align: left; width: 100%; }
.celebrando-reaction-summary span { color: var(--panel-muted); font-weight: 400; }
.celebrando-comments-title { align-items: center; display: flex; font-size: .82rem; gap: 8px; margin: 20px 0; }
.celebrando-comments-title span { color: var(--panel-muted); font-weight: 400; }
.celebrando-comments { display: grid; gap: 18px; padding-bottom: 20px; }
.celebrando-comment { align-items: start; display: flex; gap: 10px; min-width: 0; }
.celebrando-comment .celebrando-avatar { flex-basis: 32px; font-size: .65rem; height: 32px; width: 32px; }
.celebrando-comment > div { background: var(--panel-soft); border-radius: 0 14px 14px; flex: 1; min-width: 0; padding: 10px 12px; }
.celebrando-comment strong { font-size: .8rem; }
.celebrando-comment p { font-size: .86rem; line-height: 1.6; margin: 5px 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.celebrando-comment time { color: var(--panel-muted); font-size: .66rem; }
.celebrando-post-footer { border-top: 1px solid var(--panel-border); padding: 12px 16px 18px; }
.celebrando-post-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 6px; }
.celebrando-post-actions button { background: none; border-color: transparent; font-size: .8rem; padding: 8px; }
.celebrando-post-actions button[aria-pressed="true"] { background: var(--panel-tint); color: var(--panel-accent-ink); }
.celebrando-reaction-options { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 0; }
.celebrando-reaction-options button { font-size: .8rem; padding: 8px; }
.celebrando-dialog .celebrando-quote-link { background: var(--panel-tint); color: var(--panel-accent-ink); font-size: .78rem; margin: 8px 0; width: 100%; }
.celebrando-comment-form { align-items: end; display: flex; gap: 8px; margin-top: 12px; }
.celebrando-comment-form textarea { flex: 1; font-size: .86rem; max-height: 110px; min-width: 0; }
.celebrando-comment-form button { background: var(--panel-accent); color: var(--panel-on-accent); font-size: .82rem; }
.celebrando-reactions-dialog { width: 470px; }
.celebrando-reaction-filters { display: flex; gap: 6px; overflow-x: auto; padding: 14px 20px; }
.celebrando-reaction-filters button { flex: 0 0 auto; font-size: .78rem; }
.celebrando-reaction-filters button[aria-pressed="true"] { background: var(--panel-tint); border-color: var(--panel-selected-border); color: var(--panel-accent-ink); }
.celebrando-reaction-people { display: grid; max-height: 55dvh; overflow: auto; padding: 0 14px 18px; }
.celebrando-dialog .celebrando-reaction-person { align-items: center; background: none; border: 0; display: flex; gap: 12px; text-align: left; width: 100%; }
.celebrando-reaction-person > span:nth-child(2) { display: grid; flex: 1; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.celebrando-reaction-person small { color: var(--panel-muted); font-size: .72rem; font-weight: 400; }
.celebrando-profile-dialog { width: 860px; }
.celebrando-profile-dialog .celebrando-portfolio-grid { padding: 10px 24px 24px; }
.celebrando-portfolio-profile { align-items: start; display: flex; gap: 16px; padding: 24px; }
.celebrando-portfolio-profile > div { min-width: 0; }
.celebrando-portfolio-profile h3 { margin: 0 0 6px; }
.celebrando-portfolio-profile p { line-height: 1.6; overflow-wrap: anywhere; }
.celebrando-portfolio-profile small { color: var(--panel-muted); }

.celebrando-editor-dialog { width: 740px; }
.celebrando-editor-preview { align-items: center; background: var(--panel-soft); display: flex; justify-content: center; min-height: 120px; padding: 16px; }
.celebrando-editor-preview canvas { cursor: grab; display: block; height: auto; max-height: 38dvh; max-width: 100%; object-fit: contain; touch-action: none; width: auto; }
.celebrando-editor-preview canvas:active { cursor: grabbing; }
.celebrando-editor-controls { align-items: end; display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 20px 24px 0; }
.celebrando-editor-controls label { display: grid; font-size: .8rem; gap: 8px; }
.celebrando-editor-controls label:has([data-photo-zoom]) { grid-column: 1 / -1; grid-template-columns: 1fr auto; }
.celebrando-editor-controls input[type="range"] { accent-color: var(--panel-accent); cursor: pointer; grid-column: 1 / -1; min-height: 32px; width: 100%; }

@media (max-width: 1020px) {
  .celebrando-layout, #communityRoot .community-layout { gap: 18px; grid-template-columns: minmax(0, 1fr); }
  .celebrando-post-detail { grid-template-columns: minmax(0, 1fr) minmax(320px, 1fr); }
}
@media (max-width: 760px) {
  .celebrando-layout, #communityRoot .community-layout { grid-template-columns: minmax(0, 1fr); }
  .celebrando-page-heading { gap: 16px; }
  .celebrando-page-heading > button { width: 100%; }
  .celebrando-page-heading h2 { font-size: 2rem; }
  .celebrando-layout > aside, #communityRoot .community-side-column { position: static; }
  .celebrando-dialog { border-radius: 20px; max-height: calc(100dvh - 16px); max-width: calc(100vw - 16px); }
  .celebrando-dialog-heading { padding: 18px; }
  .celebrando-viewer-dialog { max-height: calc(100dvh - 16px); }
  .celebrando-post-detail { display: flex; flex-direction: column; min-height: 0; }
  .celebrando-post-detail.is-text-only { min-height: 0; }
  .celebrando-post-conversation { display: contents; max-height: none; }
  .celebrando-post-heading { background: var(--panel-surface); order: -2; padding: 14px; position: sticky; top: 0; z-index: 2; }
  .celebrando-gallery { flex: 0 0 auto; order: -1; }
  .celebrando-gallery > img { max-height: 54dvh; }
  .celebrando-post-scroll { flex: none; overflow: visible; padding: 0 16px; }
  .celebrando-post-footer { background: var(--panel-surface); padding-bottom: max(16px, env(safe-area-inset-bottom)); }
  .celebrando-composer-content { padding: 18px; }
  .celebrando-dialog :is(textarea, input:not([type="range"]), select) { font-size: 16px; }
  .celebrando-compose-entry { padding: 14px; }
  .celebrando-composer-footer > button { width: 100%; }
  #communityRoot .celebrando-composer-form .community-composer-actions > button { width: 100%; }
  #communityRoot .community-post-header, .celebrando-layout .provider-community-post > header { padding: 16px; }
  #communityRoot .community-post-body, .celebrando-layout .provider-community-post-body { padding: 0 16px 14px; }
  .celebrando-layout .provider-community-actions { display: grid; }
  .celebrando-layout .provider-community-actions > .is-chat { margin-left: 0; }
  .celebrando-layout .provider-community-media { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .celebrando-editor-controls { gap: 12px; padding: 16px 18px 0; }
  .celebrando-editor-dialog footer { padding: 16px 18px max(16px, env(safe-area-inset-bottom)); }
  .celebrando-editor-dialog footer button:last-child { flex: 1; }
}
@media (max-width: 400px) {
  .celebrando-portfolio-grid, #communityRoot .community-feed.celebrando-portfolio-grid { gap: 10px; }
  .celebrando-portfolio-item span:not(.celebrando-text-tile), .celebrando-portfolio-item small { font-size: .78rem; margin-left: 10px; margin-right: 10px; }
  .celebrando-feed-tabs button, #communityRoot .celebrando-feed-tabs button { font-size: .78rem; padding: 10px; }
  .celebrando-photo-list { grid-template-columns: 1fr; }
  .celebrando-confirm-dialog footer { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  .celebrando-dialog *, .celebrando-layout * { scroll-behavior: auto; transition: none; }
}

/* Each grid must be allowed to shrink: hiding overflow only concealed posts. */
#communityRoot, #communityContent, #communityFeedHost,
#communityRoot .community-shell, .celebrando-layout, #communityRoot .community-layout { max-width: 100%; min-width: 0; width: 100%; }
#communityRoot, #communityRoot .community-shell { grid-template-columns: minmax(0, 1fr); }
#communityRoot :is(.community-main-column, .community-side-column, .community-feed),
.celebrando-layout .provider-community-feed { grid-template-columns: minmax(0, 1fr); max-width: 100%; min-width: 0; }
#communityRoot .community-post, .celebrando-layout .provider-community-post,
#communityRoot .community-post > *, .celebrando-layout .provider-community-post > * { max-width: 100%; min-width: 0; }
#communityRoot .community-post-media.is-single { grid-template-columns: minmax(0, 1fr); }
#communityRoot .community-post-media :is(figure, img) { display: block; min-width: 0; max-width: 100%; }
#communityRoot .community-post-body { white-space: normal; }
#communityRoot .community-post-body p { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
#communityRoot .community-post-author, #communityRoot .community-post-author :is(button, small),
.celebrando-layout .provider-community-post header :is(button, strong, small) { min-width: 0; max-width: 100%; overflow-wrap: anywhere; white-space: normal; }
#communityRoot .community-post-stats, .celebrando-layout .provider-community-stats { flex-wrap: wrap; font-size: .75rem; }
#communityRoot .community-post-stats button, .celebrando-layout .provider-community-stats button { font-size: .75rem; max-width: 100%; overflow-wrap: anywhere; }
#communityRoot .community-post-actions, .celebrando-layout .provider-community-actions { align-items: stretch; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
#communityRoot .community-post-actions > *, .celebrando-layout .provider-community-actions > * { min-width: 0; margin: 0; width: auto; }
#communityRoot .community-post-actions button, .celebrando-layout .provider-community-actions button {
  align-items: center; border: 1px solid var(--panel-border); border-radius: 10px; display: inline-flex;
  font-family: inherit; font-size: 13px; font-weight: 650; justify-content: center; line-height: 1.35; min-height: 44px; min-width: 0;
  overflow-wrap: anywhere; padding: 10px 8px; white-space: normal; width: 100%;
}
#communityRoot .community-post-actions :is(.community-context-chat, .community-opportunity-button) { grid-column: auto; margin: 0; width: 100%; }
#communityRoot .community-reaction-picker { gap: 2px; grid-template-columns: repeat(4, 44px); }
#communityRoot .community-reaction-picker button { padding: 4px; }
#communityRoot .community-profile-card { grid-template-columns: minmax(0, 1fr); }
#communityRoot .community-profile-card > * { min-width: 0; overflow-wrap: anywhere; }
.celebrando-topic-filter { flex-wrap: wrap; }
.celebrando-topic-filter select { max-width: 100%; }
.celebrando-dialog footer { background: transparent; text-align: left; }
.celebrando-dialog-heading h2 { overflow-wrap: anywhere; }
@media (max-width: 760px) {
  #communityRoot .community-post-header { align-items: start; display: grid; gap: 6px 10px; grid-template-columns: 40px minmax(0, 1fr) auto; }
  #communityRoot .community-post-header > .community-avatar { grid-column: 1; grid-row: 1; height: 40px; width: 40px; }
  #communityRoot .community-post-author { grid-column: 2; grid-row: 1; }
  #communityRoot .community-post-header > .community-topic { grid-column: 2 / -1; grid-row: 2; justify-self: start; max-width: 100%; overflow-wrap: anywhere; white-space: normal; }
  #communityRoot .community-post-header > .community-more { grid-column: 3; grid-row: 1; min-height: 44px; width: 44px; padding: 0; }
  #communityRoot .community-post-author > button, .celebrando-layout .provider-community-post header strong { font-size: 14px; line-height: 1.4; }
  #communityRoot .community-post-author small { font-size: 11px; }
  #communityRoot .community-side-column, .celebrando-layout > aside { grid-template-columns: minmax(0, 1fr); }
  .celebrando-page-heading > div { min-width: 0; }
}
