/* Hellios — Community feed + Messages (uses theme variables from home.css) */
.sc-layout { max-width: var(--max); margin: 0 auto; padding: 28px 24px 72px; display: grid; grid-template-columns: 250px minmax(0, 640px) 280px; justify-content: center; gap: 28px; align-items: start; }
.sc-side { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 14px; }
.sc-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.sc-lbl { font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.sc-me { display: flex; align-items: center; gap: 12px; }
.sc-me b { display: block; font-size: 15px; }
.sc-me small { font-size: 12px; color: var(--gold); font-weight: 600; }
.av { width: 40px; height: 40px; border-radius: 50%; flex: none; object-fit: cover; background: var(--surface-3); display: grid; place-items: center; font-weight: 700; font-size: 13px; color: var(--gold); border: 1px solid var(--line-2); position: relative; }
.av--sm { width: 32px; height: 32px; font-size: 11px; }
.av--lg { width: 48px; height: 48px; }
.av__on { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: #4E9A6B; border: 2px solid var(--surface); }
.sc-nav { display: flex; flex-direction: column; }
.sc-nav button, .sc-nav a { display: flex; justify-content: space-between; align-items: center; padding: 9px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--text); font-size: 14px; text-decoration: none; text-align: left; }
.sc-nav button:hover, .sc-nav a:hover { background: var(--surface-3); color: var(--text); }
.sc-nav .is-on { background: var(--gold-dim); color: var(--gold); font-weight: 700; }
.badge:empty { display: none; }
.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--btn-bg); color: var(--btn-fg); font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; }
.sc-people { display: flex; flex-direction: column; gap: 10px; }
.sc-person { display: flex; align-items: center; gap: 10px; }
.sc-person div { flex: 1; min-width: 0; line-height: 1.3; }
.sc-person b { display: block; font-size: 14px; }
.sc-person small { font-size: 12px; color: var(--muted); }
.mini { border: 1px solid var(--line-2); background: transparent; color: var(--text); border-radius: var(--pill); padding: 6px 10px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-decoration: none; white-space: nowrap; }
.mini:hover { border-color: var(--gold); color: var(--gold); }

.sc-main { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.cmp { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.cmp__top { display: flex; gap: 12px; padding: 14px 16px; }
.cmp textarea { flex: 1; min-height: 48px; border: 0; outline: none; resize: none; background: transparent; color: var(--text); font: inherit; font-size: 16px; line-height: 1.5; padding: 8px 0; }
.cmp textarea::placeholder { color: var(--muted); }
.cmp.is-open textarea { min-height: 96px; }
.cmp__prev { position: relative; margin: 0 16px 12px; border-radius: 10px; overflow: hidden; max-width: 360px; }
.cmp__prev img { width: 100%; max-height: 260px; object-fit: cover; }
.cmp__prev button { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; display: grid; place-items: center; }
.cmp__row { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 12px; }
.cmp__row input { flex: 1 1 180px; background: var(--bg); border: 1px solid var(--line-2); border-radius: 10px; color: var(--text); padding: 9px 12px; font-size: 14px; }
.cmp__bar { display: flex; align-items: center; gap: 4px; padding: 8px 12px; border-top: 1px solid var(--line); }
.tool { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: var(--text-2); padding: 8px 10px; border-radius: 8px; font-size: 12px; font-weight: 700; letter-spacing: .08em; }
.tool:hover { background: var(--surface-3); color: var(--text); }
.tool.is-on { color: var(--gold); }
.cmp__count { margin-left: auto; font-size: 12px; color: var(--muted); }
.tabs2 { display: flex; gap: 6px; }

.post { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); animation: fade .3s ease; }
.post.is-new { border-color: var(--gold); }
.post__head { display: flex; align-items: center; gap: 12px; padding: 14px 16px 0; }
.post__who { flex: 1; min-width: 0; line-height: 1.3; }
.post__who b { font-size: 15px; }
.post__who small { display: block; font-size: 12px; color: var(--muted); }
.post__role { font-size: 10px; font-weight: 700; letter-spacing: .1em; color: var(--gold); margin-left: 6px; }
.post__menu { border: 0; background: transparent; color: var(--muted); padding: 6px; border-radius: 8px; }
.post__menu:hover { color: var(--text); background: var(--surface-3); }
.post__text { margin: 0; padding: 10px 16px 12px; font-size: 15px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.post__img { display: block; width: 100%; max-height: 520px; object-fit: cover; background: var(--surface-3); filter: var(--img-filter); }
.post__tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 16px 0; }
.post__loc { padding: 10px 16px 0; font-size: 12px; color: var(--muted); }
.post__sum { display: flex; justify-content: space-between; padding: 10px 16px; font-size: 13px; color: var(--muted); }
.post__acts { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0 12px; padding: 4px 0; border-top: 1px solid var(--line); }
.post__acts button { display: flex; align-items: center; justify-content: center; gap: 6px; border: 0; background: transparent; color: var(--text-2); padding: 9px 4px; border-radius: 8px; font-size: 11px; font-weight: 700; letter-spacing: .1em; }
.post__acts button:hover { background: var(--surface-3); color: var(--text); }
.post__acts .is-on { color: var(--gold); }
.post__acts .is-on svg { fill: currentColor; }
.cmts { border-top: 1px solid var(--line); padding: 12px 16px 14px; display: flex; flex-direction: column; gap: 10px; }
.cmt { display: flex; gap: 8px; }
.cmt__b { background: var(--surface-3); border-radius: 4px 14px 14px 14px; padding: 8px 12px; font-size: 14px; line-height: 1.45; max-width: 100%; overflow-wrap: anywhere; }
.cmt__b b { display: block; font-size: 12px; }
.cmt__t { font-size: 11px; color: var(--muted); padding: 2px 12px; }
.cmt-form { display: flex; gap: 8px; align-items: center; }
.cmt-form input { flex: 1; min-width: 0; background: var(--bg); border: 1px solid var(--line-2); border-radius: 999px; color: var(--text); padding: 9px 14px; font-size: 14px; }
.cmt-form input:focus, .cmp__row input:focus { outline: none; border-color: var(--gold); }
.sc-empty { padding: 32px; border: 1px dashed var(--line-2); border-radius: var(--r); color: var(--muted); }
.sc-note { font-size: 12px; color: var(--muted); line-height: 1.5; }

/* Messages */
.ms { max-width: var(--max); margin: 0 auto; padding: 24px; height: calc(100vh - 66px); display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 0; }
.ms__list, .ms__chat { background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.ms__list { border-radius: var(--r) 0 0 var(--r); border-right: 0; }
.ms__chat { border-radius: 0 var(--r) var(--r) 0; }
.ms__head { padding: 16px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.ms__head h1 { font-family: var(--serif); font-weight: var(--h-weight); font-size: 26px; margin: 0; }
.ms__convs { overflow-y: auto; flex: 1; }
.conv { width: 100%; display: flex; gap: 12px; align-items: center; padding: 12px 16px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--text); text-align: left; }
.conv:hover { background: var(--surface-3); }
.conv.is-on { background: var(--gold-dim); }
.conv__m { flex: 1; min-width: 0; line-height: 1.35; }
.conv__m b { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.conv__m b span { font-size: 11px; color: var(--muted); font-weight: 400; }
.conv__m small { display: block; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv.is-unread .conv__m small { color: var(--text); font-weight: 600; }
.ms__top { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.ms__top b { display: block; font-size: 15px; }
.ms__top small { font-size: 12px; color: var(--muted); }
.ms__back { display: none; border: 0; background: transparent; color: var(--text); padding: 6px; }
.ms__thread { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.ms__day { align-self: center; font-size: 11px; font-weight: 700; letter-spacing: .12em; color: var(--muted); margin: 8px 0; }
.bub { max-width: min(520px, 78%); padding: 9px 13px; border-radius: 16px 16px 16px 4px; background: var(--surface-3); font-size: 14px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; animation: fade .2s ease; }
.bub small { display: block; font-size: 10px; color: var(--muted); margin-top: 3px; }
.bub--me { align-self: flex-end; border-radius: 16px 16px 4px 16px; background: var(--btn-bg); color: var(--btn-fg); }
.bub--me small { color: inherit; opacity: .7; text-align: right; }
.typing { align-self: flex-start; display: inline-flex; gap: 4px; padding: 12px 14px; border-radius: 16px; background: var(--surface-3); }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }
.ms__form { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line); }
.ms__form textarea { flex: 1; min-height: 42px; max-height: 140px; resize: none; background: var(--bg); border: 1px solid var(--line-2); border-radius: 20px; color: var(--text); padding: 10px 14px; font: inherit; font-size: 14px; }
.ms__form textarea:focus { outline: none; border-color: var(--gold); }
.ms__empty { flex: 1; display: grid; place-items: center; text-align: left; padding: 24px; color: var(--muted); }
.hdr__msg { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: var(--hdr-text); }
.hdr__msg:hover { background: var(--surface-3); color: var(--gold); }
.hdr__msg .badge { position: absolute; top: -2px; right: -4px; min-width: 18px; height: 18px; font-size: 10px; }
.hdr__msg .badge:empty { display: none; }

@media (max-width: 1180px) { .sc-layout { grid-template-columns: 230px minmax(0, 1fr); } .sc-right { display: none; } }
@media (max-width: 860px) {
  .sc-layout { grid-template-columns: minmax(0, 1fr); padding: 16px 12px 56px; } .sc-left { display: none; }
  .ms { grid-template-columns: minmax(0, 1fr); padding: 0; height: calc(100vh - 66px); }
  .ms__list, .ms__chat { border-radius: 0; border-left: 0; border-right: 0; }
  .ms.is-chat .ms__list { display: none; } .ms:not(.is-chat) .ms__chat { display: none; }
  .ms__back { display: block; }
}
