.community-shell { width: min(1000px, calc(100% - 44px)); margin: 0 auto; padding: 35px 0 8px; }
.community-intro { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin: 0 0 24px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.community-intro > div { max-width: 620px; }
.community-intro h1 { margin: 7px 0; font: 600 clamp(30px, 5vw, 46px)/1.08 'Space Grotesk', sans-serif; letter-spacing: -.04em; }
.community-intro h1 span { color: var(--accent); }
.community-intro p { max-width: 320px; margin: 0; color: var(--muted); font-size: 12px; }
.community-panel { margin: 14px 0; padding: 20px; border: 1px solid var(--line); border-radius: 2px; background: var(--surface); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.panel-heading h2, .feed-heading h2 { margin: 3px 0 0; font: 600 21px/1.2 'Space Grotesk', sans-serif; }
.notice { color: var(--muted); font-size: 12px; }
.hidden { display: none !important; }
.small { min-height: 34px; padding: 6px 10px; }
.auth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.community-form { display: grid; gap: 11px; }
.community-form h3 { margin: 0; font: 600 16px 'Space Grotesk', sans-serif; }
.community-form label { display: grid; gap: 5px; color: var(--muted-strong); font-size: 11px; font-weight: 600; }
.community-form input, .community-form select, .community-form textarea { width: 100%; min-width: 0; border: 1px solid var(--line-strong); border-radius: 2px; padding: 10px; background: var(--surface-inset); color: var(--text); font: 400 13px 'DM Sans', sans-serif; }
.community-form input:focus, .community-form select:focus, .community-form textarea:focus { border-color: var(--accent); outline: none; }
.community-form textarea { resize: vertical; }
.community-form small { color: var(--muted); font-size: 10px; font-weight: 400; }
.community-form button { justify-self: start; }
.captcha-container { display: flex; min-height: 65px; align-items: center; grid-column: 1 / -1; }
.captcha-container.hidden { display: none !important; }
.profile-summary { display: flex; align-items: center; gap: 11px; margin: 8px 0 18px; }
.profile-summary > div:last-of-type { display: grid; }
.profile-summary span { color: var(--muted); font-size: 11px; }
.avatar { display: grid; width: 46px; height: 46px; flex: 0 0 auto; place-items: center; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--surface-raised); color: var(--accent); font: 700 17px 'Space Grotesk', sans-serif; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-form { max-width: 640px; }
.publish-form { grid-template-columns: 1fr 1fr; }
.publish-form > label:nth-child(2), .publish-form > label:nth-child(3), .publish-form > div, .publish-form button { grid-column: 1 / -1; }
.publish-form > div { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.feed-section { margin-top: 30px; }
.feed-heading { align-items: end; flex-wrap: wrap; }
.feed-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.feed-controls a, .filter-button { border: 1px solid var(--line); border-radius: 2px; padding: 7px 9px; background: var(--surface-raised); color: var(--muted-strong); font: 600 10px 'DM Sans', sans-serif; text-decoration: none; cursor: pointer; }
.feed-controls a:hover, .filter-button:hover, .filter-button.is-active { border-color: var(--accent); color: var(--accent); }
.post-list { display: grid; gap: 10px; }
.post-card { padding: 17px; border: 1px solid var(--line); border-radius: 2px; background: var(--surface); }
.post-card-admin { border-color: #788f48; border-left: 3px solid var(--accent); background: linear-gradient(115deg, #a8d94c12, transparent 48%), var(--surface); box-shadow: inset 0 0 24px #a8d94c08; }
.post-card-role { border-color: #596c47; border-left: 3px solid #849f64; background: linear-gradient(115deg, #849f6410, transparent 50%), var(--surface); }
.post-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.post-author { display: flex; align-items: center; gap: 9px; color: var(--text); text-decoration: none; }
.post-author .avatar { width: 34px; height: 34px; font-size: 13px; }
.post-author small { display: block; color: var(--muted); font-size: 10px; }
.post-kind, .admin-badge, .official-label { display: inline-flex; align-items: center; border: 1px solid #576746; border-radius: 2px; padding: 3px 7px; background: #a8d94c0c; color: var(--accent); font-size: 9px; font-weight: 700; letter-spacing: .07em; }
.post-card h3 { margin: 13px 0 5px; font: 600 18px 'Space Grotesk', sans-serif; }
.post-description { color: var(--muted-strong); font-size: 12px; white-space: pre-wrap; }
.post-meta { color: var(--muted); font-size: 10px; }
.post-code { max-height: 350px; overflow: auto; margin: 12px 0; padding: 13px; border: 1px solid var(--line); background: #0c0e10; color: #d4dfc4; font: 12px/1.6 ui-monospace, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.post-link { display: inline-flex; margin: 7px 0; color: var(--accent); font-size: 11px; }
.post-images { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.post-image-link { display: block; width: min(190px, 45%); overflow: hidden; border: 1px solid var(--line); }
.post-image-link img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.post-actions { display: flex; justify-content: flex-end; }
.text-button { border: 0; background: none; color: #d68b84; font: 600 10px 'DM Sans', sans-serif; cursor: pointer; }
.comment-list { display: grid; gap: 6px; margin: 13px 0; }
.comment-item { padding: 8px 10px; border: 1px solid var(--line); background: var(--surface-inset); color: var(--muted-strong); font-size: 11px; white-space: pre-wrap; }
.comment-item a { color: var(--accent); font-weight: 600; text-decoration: none; }
.comment-item small { margin-left: 7px; color: var(--muted); }
.comment-form { display: flex; gap: 7px; }
.comment-form input { flex: 1; min-width: 0; border: 1px solid var(--line-strong); border-radius: 2px; padding: 9px; background: var(--surface-inset); color: var(--text); }
.comment-form button { border: 1px solid var(--accent); border-radius: 2px; padding: 0 12px; background: var(--accent); color: #171b12; font-size: 11px; font-weight: 700; cursor: pointer; }
.profile-stats { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: 15px 0; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.profile-stats strong { color: var(--text); font: 700 15px 'Space Grotesk', sans-serif; }
.post-engagement { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding-top: 11px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.star-button { display: inline-flex; min-height: 32px; align-items: center; gap: 5px; padding: 5px 9px; border: 1px solid var(--line-strong); background: var(--surface-raised); color: var(--muted-strong); font-size: 11px; font-weight: 700; text-decoration: none; cursor: pointer; }
.star-button:hover, .star-button.is-active { border-color: var(--accent); color: var(--accent); }
.star-button:disabled { opacity: .55; cursor: wait; }
.public-profile-card > .profile-stats { margin-bottom: 0; }
.profile-star-button { margin-left: auto; }
.script-star-control .star-button { min-height: 38px; }
.empty-state { padding: 22px; border: 1px dashed var(--line-strong); color: var(--muted); font-size: 12px; text-align: center; }
.message-error { color: #e99a92; }
.community-page .site-footer { margin-top: 42px; }
.feed-only-shell { width: min(920px, calc(100% - 44px)); padding-top: 31px; }
.feed-intro { align-items: center; }
.feed-intro h1 span { color: var(--accent); }
.feed-intro .publish-cta { flex: 0 0 auto; }
.feed-only-shell .feed-section { margin-top: 20px; }
.feed-only-shell .feed-heading { margin-bottom: 12px; }
.feed-only-shell .post-list { gap: 12px; }
.feed-only-shell .post-card { padding: 19px; }
.feed-only-shell .post-card h3 { font-size: 19px; }
.feed-only-shell .post-description { line-height: 1.65; }
.feed-only-shell #feed-message:empty { display: none; }
.feed-only-shell .empty-state a { color: var(--accent); }
.public-profile-card { margin-top: 0; }
.publish-shell { width: min(800px, calc(100% - 44px)); }
.publish-shell .publish-form { grid-template-columns: 1fr 1fr; }
.publish-shell .publish-form > label:nth-child(2), .publish-shell .publish-form > label:nth-child(3), .publish-shell .publish-form > label:nth-child(4), .publish-shell .publish-form > div, .publish-shell .publish-form > button, .publish-shell .publish-form > p { grid-column: 1 / -1; }
.publish-shell .publish-form > div:not(.captcha-container) { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.publish-shell .publish-form > #captcha-publish { display: flex; min-height: 78px; align-items: center; grid-column: 1 / -1; }
.publish-shell .publish-form > button { justify-self: start; }
.publish-shell .publish-form > p { margin: 0; }
.publish-panel { padding: clamp(18px, 4vw, 32px); }
.publish-panel-heading { margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.publish-panel-heading h2 { margin: 4px 0; font: 600 21px 'Space Grotesk', sans-serif; }
.publish-panel-heading p { margin: 0; color: var(--muted); font-size: 11px; }
.publish-form { gap: 15px; }
.publish-form > label, .publish-fields > label { display: grid; gap: 6px; color: var(--muted-strong); font-size: 11px; font-weight: 600; }
.publish-form input:not([type='radio']), .publish-form select, .publish-form textarea { width: 100%; min-width: 0; border: 1px solid var(--line-strong); border-radius: 3px; padding: 11px 12px; background: var(--surface-inset); color: var(--text); font: 400 13px/1.5 'DM Sans', sans-serif; }
.publish-form select { min-height: 42px; }
.publish-form textarea { resize: vertical; }
.publish-form input:focus, .publish-form select:focus, .publish-form textarea:focus { border-color: var(--accent); outline: 2px solid #a8d94c28; }
.publish-form .publish-full { grid-column: 1 / -1; }
.publish-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.publish-fields > label:first-child { grid-column: 1 / -1; }
.publish-form .platform-selector { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; min-width: 0; margin: 0; padding: 0; border: 0; }
.platform-selector legend { grid-column: 1 / -1; margin-bottom: -2px; color: var(--muted-strong); font-size: 11px; font-weight: 600; }
.platform-option { display: flex; min-height: 76px; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line-strong); background: var(--surface); cursor: pointer; }
.platform-option:has(input:checked) { border-color: var(--accent); background: #a8d94c0d; box-shadow: inset 0 0 0 1px #a8d94c33; }
.platform-option input { width: 16px; height: 16px; flex: 0 0 auto; accent-color: var(--accent); }
.platform-option span { display: grid; gap: 3px; }
.platform-option strong { color: var(--text); font: 600 12px 'Space Grotesk', sans-serif; }
.platform-option small, .publish-form label > small { color: var(--muted); font-size: 10px; line-height: 1.4; }
.platform-option:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.publish-platform-note { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 10px; }
.publish-form .captcha-container { grid-column: 1 / -1; min-height: 72px; }
.publish-submit { min-width: 175px; justify-self: start; }
.publish-submit:disabled { opacity: .65; cursor: wait; }
.publish-message { grid-column: 1 / -1; min-height: 18px; margin: 0; }
.publish-message:empty { display: none; }
.auth-shell { width: min(760px, calc(100% - 44px)); min-height: calc(100vh - 170px); }
.auth-panel { max-width: 600px; margin: 0 auto 40px; padding: clamp(20px, 4vw, 32px); }
.auth-panel > h2 { margin: 0 0 20px; font: 600 22px 'Space Grotesk', sans-serif; }
.auth-panel .community-form { max-width: 100%; }
.auth-switch { margin: 18px 0 0; color: var(--muted); font-size: 12px; }
.auth-switch a, #public-profile-link { color: var(--accent); }
.auth-shell .community-intro { justify-content: flex-start; }
.auth-shell .community-intro p { max-width: 420px; }
.auth-panel #auth-message:empty { display: none; }
.admin-badge-prominent { margin-left: auto; padding: 7px 11px; border-color: var(--accent); background: #a8d94c20; box-shadow: 0 0 18px #a8d94c22; color: var(--accent); font-size: 10px; }
.profile-data-loading .profile-summary, .profile-data-loading #profile-stats, .profile-data-loading #profile-form { opacity: .45; transition: opacity .2s ease; }
.profile-summary, #profile-stats, #profile-form { transition: opacity .2s ease; }
.profile-data-loading .profile-summary, .profile-data-loading #profile-stats, .profile-data-loading #profile-form { opacity: .18; pointer-events: none; }
.role-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.user-role-badge { display: inline-flex; align-items: center; width: fit-content; padding: 3px 7px; border: 1px solid #596b4d; border-radius: 2px; background: #8ca66e12; color: #b7d68b; font-size: 9px; font-weight: 700; letter-spacing: .035em; line-height: 1.2; }
.user-role-parceiro { border-color: #9c8045; background: #e7bd4b12; color: #f0d17b; }
.user-role-scripter { border-color: #4f8490; background: #52b6ca12; color: #8ddceb; }
.user-role-custom { border-color: #6e5c94; background: #a98be012; color: #c2aaf2; }
.user-role-helper { border-color: #518464; background: #55bb7b12; color: #91d5aa; }
.user-role-apoiador { border-color: #8d597b; background: #d083b912; color: #e6a6d4; }
.ghost-loader { display: flex; min-height: 145px; align-items: center; justify-content: center; flex-direction: column; gap: 7px; color: var(--muted); font-size: 12px; text-align: center; }
.ghost-loader-inline { min-height: 58px; flex-direction: row; justify-content: flex-start; padding: 0 10px; }
.ghost-loader-art { display: grid; width: 43px; height: 43px; place-items: center; animation: ghost-float 1.45s ease-in-out infinite; }
.ghost-loader-art svg { width: 100%; height: 100%; overflow: visible; fill: #a8d94c24; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 7px #a8d94c55); }
.ghost-loader-art circle { fill: var(--accent); stroke: none; }
.ghost-loader-dots { color: var(--accent); letter-spacing: 3px; animation: ghost-dots 1s steps(4, end) infinite; }
@keyframes ghost-float { 0%, 100% { transform: translateY(3px) rotate(-4deg); } 50% { transform: translateY(-7px) rotate(4deg); } }
@keyframes ghost-dots { 0% { opacity: .25; } 50% { opacity: 1; } 100% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .ghost-loader-art, .ghost-loader-dots { animation: none; } }
.admin-role-editor { min-width: 132px; color: var(--muted-strong); font-size: 10px; }
.admin-role-editor summary { cursor: pointer; }
.admin-role-editor > div { display: grid; gap: 5px; margin-top: 7px; padding: 9px; border: 1px solid var(--line); background: var(--surface); }
.admin-role-editor label { display: flex; align-items: center; gap: 6px; }
.admin-role-editor input { accent-color: var(--accent); }
.post-list[aria-busy="true"] { opacity: .72; transition: opacity .18s ease; }
.profile-summary .admin-badge, .post-author .admin-badge { margin-left: 6px; vertical-align: middle; }
.profile-summary .admin-badge-prominent { margin-left: 8px; }
.site-search-shell { width: min(1000px, calc(100% - 44px)); }
.site-search-form { display: flex; gap: 8px; margin: 0 0 10px; }
.site-search-form input, .admin-search-label input { width: 100%; min-width: 0; border: 1px solid var(--line-strong); border-radius: 2px; padding: 11px 12px; background: var(--surface-inset); color: var(--text); font: 400 13px 'DM Sans', sans-serif; }
.site-search-form input:focus, .admin-search-label input:focus { border-color: var(--accent); outline: 2px solid #a8d94c28; }
.site-search-results { display: grid; gap: 12px; }
.site-search-group { padding: 17px; border: 1px solid var(--line); background: var(--surface); }
.site-search-group .panel-heading { margin-bottom: 10px; }
.site-search-group h2 { margin: 0; font: 600 18px 'Space Grotesk', sans-serif; }
.site-search-group-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.site-search-result { display: grid; gap: 5px; min-width: 0; padding: 12px; border: 1px solid var(--line); background: var(--surface-inset); color: var(--text); text-decoration: none; }
.site-search-result:hover { border-color: var(--accent); }
.site-search-result-top { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.site-search-result small, .site-search-result p { margin: 0; color: var(--muted); font-size: 11px; }
.site-search-result p { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-height: 1.5; }
.admin-shell { width: min(1100px, calc(100% - 44px)); }
.admin-search-label { display: grid; gap: 6px; max-width: 500px; margin-bottom: 12px; color: var(--muted); font-size: 11px; }
.admin-list { display: grid; gap: 7px; }
.admin-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid var(--line); background: var(--surface-inset); }
.admin-row-details { display: grid; min-width: 0; gap: 4px; }
.admin-row-details > strong { overflow-wrap: anywhere; }
.admin-row-details > span, .admin-row-details > small { color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.admin-row-actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: 6px; }
.admin-row-actions .button { min-height: 30px; padding: 5px 8px; }
.button.danger { border-color: #803f3b; background: #562623; color: #ffd7d3; }
.button.danger:hover { background: #71332e; }
.admin-protected { color: var(--accent); font-size: 10px; font-weight: 700; }
.admin-pagination { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.admin-pagination button:disabled { opacity: .45; cursor: not-allowed; }
@media (max-width: 680px) {
  .community-shell { width: calc(100% - 28px); padding-top: 24px; }
  .auth-shell { width: calc(100% - 28px); }
  .community-intro { align-items: flex-start; flex-direction: column; gap: 5px; }
  .feed-intro { align-items: flex-start; }
  .feed-intro .publish-cta { align-self: flex-start; }
  .community-intro p { font-size: 11px; }
  .community-panel { padding: 15px; }
  .auth-grid, .publish-form, .publish-form > div { grid-template-columns: 1fr; }
  .publish-shell .publish-form > label, .publish-shell .publish-form > div, .publish-shell .publish-form > button, .publish-shell .publish-form > p { grid-column: 1; }
  .publish-shell .publish-form > div:not(.captcha-container) { grid-template-columns: 1fr; }
  .publish-shell .publish-form > #captcha-publish { grid-column: 1; }
  .publish-form .platform-selector { grid-template-columns: 1fr; }
  .publish-form > label, .publish-form > div, .publish-form button { grid-column: 1; }
  .feed-heading { align-items: flex-start; }
  .feed-controls { width: 100%; }
  .post-top { align-items: flex-start; }
  .comment-form { flex-direction: column; }
  .comment-form button { min-height: 38px; }
  .site-search-shell, .admin-shell { width: calc(100% - 28px); }
  .site-search-form { align-items: stretch; flex-direction: column; }
  .site-search-group-grid { grid-template-columns: 1fr; }
  .admin-row { align-items: flex-start; flex-direction: column; }
  .admin-row-actions { width: 100%; }
}
