/* Communities (views/communities.js, community.js, spaces.js): Community home and Discover are
   ordinary Mercury pages; a community is three glass panels (channels · chat · members) that fill
   the window. Monochrome like the rest of the app: P&L follows the P&L colour setting, and the
   only colour of its own is the green "online" dot the connection pill uses too. */
.dc, .cm { --ca: #ffffff; }
.dc .dot, .cm .dot, .dc-cstat .dot, .dc-mod .dot, .modal .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin: 0 5px 1px 0; background: rgba(255, 255, 255, .28); vertical-align: middle; }
.dot.on { background: #34d399; box-shadow: 0 0 6px rgba(52, 211, 153, .5); }

/* a community's tile: its emoji or initials on glass, faintly tinted with its colour */
.dc-cic { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 12px; font-size: 19px; font-weight: 650; letter-spacing: -.02em; color: var(--text); background: color-mix(in srgb, var(--ca, #fff) 9%, rgba(255, 255, 255, .05)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.dc-cic.official { background: rgba(255, 255, 255, .06); }
.dc-cic.big { width: 64px; height: 64px; font-size: 30px; border-radius: 18px; }
.dc-cic.sm { width: 26px; height: 26px; font-size: 12.5px; border-radius: 8px; }
/* an uploaded picture fills the tile, wherever a community shows (cards, switcher, boards, admin) */
:is(.dc-cic, .gb-ic, .gx-ic).pic { padding: 0; overflow: hidden; background: rgba(255, 255, 255, .05); }
:is(.dc-cic, .gb-ic, .gx-ic).pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* counts that want attention: white on dark, like the active tab */
.dc-badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; font-size: 10.5px; font-weight: 700; font-style: normal; color: #0a0a0b; background: var(--text); }

/* ── Community home & Discover: the page header ── */
.cm { max-width: 1320px; margin: 0 auto; }
.cm-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; padding: 14px 2px 4px; }
.cm-sub { margin: 8px 0 0; max-width: 560px; font-size: 13px; line-height: 1.5; }
.cm-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.cm-tabs { margin-top: 10px; border-bottom: 1px solid var(--line-2); }
.cm-tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 4px 0 12px; margin-bottom: -1px; font-size: 14px; font-weight: 500; color: var(--text-3); text-decoration: none; border-bottom: 1.5px solid transparent; transition: color .2s, border-color .2s; }
.cm-tabs a:hover { color: var(--text); }
.cm-tabs a.on { color: var(--text); border-bottom-color: var(--text); }
.cm-sec { margin-top: 22px; }
.cm-sec:empty { display: none; }
.cm-sec > .lbl:first-child { margin-top: 0; }

/* Discover: search and an invite box under the tabs; communities as glass cards */
.dc-tools-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.dc-search { flex: 1 1 320px; display: flex; align-items: center; gap: 9px; height: 40px; padding: 0 12px; border-radius: 12px; color: var(--text-3); background: rgba(255, 255, 255, .04); border: 1px solid var(--line); transition: border-color .2s; }
.dc-search:focus-within { border-color: rgba(255, 255, 255, .22); }
.dc-search input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; background: none; box-shadow: none; font-size: 14px; }
.dc-code { display: flex; gap: 6px; }
.dc-code input { width: 210px; height: 40px; padding: 0 12px; border-radius: 12px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); box-shadow: none; font-size: 14px; }
.dc-code input:focus { border-color: rgba(255, 255, 255, .22); }
.dc-code .btn { height: 40px; }
.dc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--gap); }
.dc-card { display: flex; flex-direction: column; gap: 10px; padding: var(--pad); overflow: hidden; text-decoration: none; color: inherit; transition: transform .25s var(--ease), border-color .25s; }
.dc-card:hover { transform: translateY(-2px); }
.dc-card .dc-cban { display: block; height: 84px; margin: calc(var(--pad) * -1) calc(var(--pad) * -1) 2px; }
.dc-cban img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dc-ctop { display: flex; align-items: center; gap: 12px; min-width: 0; }
.dc-ctop .grow { display: grid; gap: 3px; min-width: 0; }
.dc-ctop .btn { flex: none; pointer-events: none; }
.dc-cname { display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-cdesc { font-size: 13px; color: var(--text-2); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dc-cstat { display: flex; align-items: center; gap: 4px 12px; flex-wrap: wrap; font-size: 12px; color: var(--text-3); }
.dc-cstat .badge { padding: 1px 6px; font-size: 10.5px; }
.dc-empty { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; padding: 34px; color: var(--text-2); border-radius: var(--radius); border: 1px dashed var(--line); }
.dc-load { display: grid; place-items: center; padding: 30px; grid-column: 1 / -1; }

/* ── invite ── */
.dc-invite { display: grid; place-items: center; min-height: 70vh; padding: 20px; }
.dc-inv { width: min(420px, 100%); display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 30px 26px 26px; text-align: center; overflow: hidden; }
.dc-inv .dc-cban { display: block; align-self: stretch; height: 110px; margin: -30px -26px 0; }
.dc-inv .dc-cban + .dc-cic.big { margin-top: -32px; box-shadow: 0 0 0 4px rgba(14, 14, 17, .95), inset 0 0 0 1px rgba(255, 255, 255, .1); }
.dc-inv h2 { margin: 0; font-size: 24px; letter-spacing: -.02em; }
.dc-inv p { margin: 0 0 6px; color: var(--text-2); }
.dc-inv .btn.primary { width: 100%; justify-content: center; margin-top: 8px; }

/* ── a community: channels · chat · members, three glass panels that fill the window ── */
body.dc-mode #main { display: flex; flex-direction: column; overflow: hidden; padding-bottom: 18px; }
body.dc-mode #main > .view { flex: 1; min-height: 0; max-width: none; width: 100%; }
body.dc-mode .shell { grid-template-columns: minmax(0, 1fr); }
body.dc-mode .sidebar, body.dc-mode #sidebar-btn { display: none !important; }
.dc-space { height: 100%; display: grid; grid-template-columns: 256px minmax(0, 1fr) auto; gap: var(--gap); min-height: 0; }
.dc-space > .glass { border-radius: var(--radius); min-height: 0; overflow: hidden; }
.dc-side { display: flex; flex-direction: column; }
.dc-crumbs { flex: none; display: flex; justify-content: space-between; padding: 10px 10px 0; }
.dc-crumbs .chip-btn { text-decoration: none; }
.dc-shead { position: relative; flex: none; }
.dc-shead .dc-cban { display: none; height: 88px; margin: 10px 10px 0; border-radius: calc(var(--radius) - 6px); overflow: hidden; }
.dc-shead.has-ban .dc-cban { display: block; }
.dc-sname { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 16px 12px 14px; font-size: 15px; font-weight: 600; text-align: left; border-bottom: 1px solid var(--line-2); transition: background .2s; }
.dc-sname:hover { background: rgba(255, 255, 255, .03); }
.dc-sname b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-sname > .ic { color: var(--text-3); }
.dc-sic:empty { display: none; }
.dc-chans { flex: 1; overflow-y: auto; padding: 10px 8px; }
.dc-cinfo { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 2px 8px 10px; font-size: 12px; color: var(--text-3); }
.dc-chh { display: flex; align-items: center; justify-content: space-between; padding: 12px 8px 4px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.dc-chh .icon-btn { width: 24px; height: 24px; }
.dc-ch { position: relative; display: flex; align-items: center; gap: 9px; width: 100%; padding: 7px 9px; margin: 1px 0; border-radius: 9px; color: var(--text-2); text-decoration: none; font-size: 13.5px; text-align: left; transition: background .15s, color .15s; }
.dc-ch:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.dc-ch.on { color: var(--text); background: rgba(255, 255, 255, .08); }
.dc-ch.unread { color: var(--text); font-weight: 600; }
.dc-ch.unread::after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--text); flex: none; }
.dc-ch.unread:has(.dc-badge)::after { display: none; }
.dc-chi { width: 18px; display: grid; place-items: center; font-size: 16px; font-weight: 500; color: var(--text-3); flex: none; }
.dc-ch.on .dc-chi, .dc-ch:hover .dc-chi { color: var(--text-2); }
.dc-chn { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-chedit { opacity: 0; color: var(--text-3); padding: 2px; display: grid; }
.dc-ch:hover .dc-chedit { opacity: 1; }
.dc-me { flex: none; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-top: 1px solid var(--line-2); min-width: 0; }
.dc-me .grow { display: grid; min-width: 0; font-size: 13px; }
.dc-me .grow b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-me .dim { font-size: 11.5px; }

.dc-chat { display: flex; flex-direction: column; min-width: 0; }
.dc-chead { flex: none; display: flex; align-items: center; gap: 8px; height: 52px; padding: 0 10px 0 16px; border-bottom: 1px solid var(--line-2); min-width: 0; }
.dc-back { display: none; }
.dc-chash { color: var(--text-3); font-size: 19px; display: grid; place-items: center; }
.dc-chname { font-size: 15px; font-weight: 600; white-space: nowrap; color: var(--text); }
.dc-topic { margin-left: 4px; padding-left: 12px; border-left: 1px solid var(--line); font-size: 13px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.dc-chead .icon-btn { width: 32px; height: 32px; color: var(--text-3); }
.dc-chead .icon-btn:hover, .dc-chead .icon-btn.on { color: var(--text); background: rgba(255, 255, 255, .07); }
.dc-msgs { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 8px 0 14px; overscroll-behavior: contain; }
.dc-older { display: grid; place-items: center; padding: 10px; }
.dc-welcome { padding: 36px 22px 16px; }
.dc-welcome h3 { margin: 12px 0 6px; font-size: 24px; letter-spacing: -.02em; }
.dc-welcome p { margin: 0; color: var(--text-2); }
.dc-chash.big { width: 56px; height: 56px; border-radius: 16px; background: rgba(255, 255, 255, .06); font-size: 28px; color: var(--text-2); }

/* messages */
.dc-row { position: relative; padding: 2px 16px 2px 0; }
.dc-row:not(.cont):not(.sys) { margin-top: 14px; }
.dc-row:hover { background: rgba(255, 255, 255, .02); }
.dc-row.ping { background: rgba(255, 255, 255, .04); box-shadow: inset 2px 0 0 var(--text); }
.dc-row.pending { opacity: .55; }
.dc-row.flash { animation: dcFlash 1.4s ease; }
@keyframes dcFlash { 0%, 40% { background: rgba(255, 255, 255, .08); } }
.dc-day { display: flex; align-items: center; gap: 10px; margin: 18px 16px 6px; font-size: 11.5px; font-weight: 500; color: var(--text-3); }
.dc-day::before, .dc-day::after { content: ''; flex: 1; height: 1px; background: var(--line-2); }
.dc-m { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: start; }
.dc-av { display: flex; justify-content: center; padding-top: 2px; }
.dc-av button { border-radius: 50%; }
.dc-av time { opacity: 0; font-size: 10.5px; color: var(--text-3); padding-top: 5px; }
.dc-row:hover .dc-av time { opacity: 1; }
.dc-b { min-width: 0; }
.dc-mh { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.dc-mh button { font-weight: 600; font-size: 14.5px; color: var(--text); }
.dc-mh button:hover .lk-name { text-decoration: underline; }
.dc-mh time { font-size: 11.5px; color: var(--text-3); }
.dc-role { align-self: center; padding: 1px 6px; border-radius: 5px; font-size: 10.5px; font-weight: 600; letter-spacing: .03em; color: var(--text-2); background: rgba(255, 255, 255, .06); border: 1px solid var(--line); }
.dc-role.owner { color: var(--text); background: rgba(255, 255, 255, .1); }
.dc-pin { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: var(--text-3); }
.dc-text { font-size: 14.5px; line-height: 1.55; color: var(--text); overflow-wrap: anywhere; }
.dc-text code { padding: 1px 5px; border-radius: 5px; font-family: var(--mono); font-size: 12.5px; background: rgba(255, 255, 255, .07); }
.dc-text pre { margin: 6px 0; padding: 10px 12px; border-radius: 10px; font-family: var(--mono); font-size: 12.5px; white-space: pre-wrap; background: rgba(0, 0, 0, .3); border: 1px solid var(--line-2); }
.dc-text a { color: var(--text); text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .35); text-underline-offset: 2px; }
.dc-at { padding: 0 4px; border-radius: 5px; font-weight: 600; color: var(--text); background: rgba(255, 255, 255, .1); }
.dc-spoil { border-radius: 4px; color: transparent; background: rgba(255, 255, 255, .22); cursor: pointer; transition: color .2s, background .2s; }
.dc-spoil:hover, .dc-spoil:focus { color: inherit; background: rgba(255, 255, 255, .08); }
.dc-ed { margin-left: 5px; font-size: 11px; color: var(--text-3); }
.dc-sys { display: flex; align-items: center; gap: 10px; padding: 4px 16px 4px 26px; font-size: 13px; color: var(--text-2); }
.dc-sys svg { color: var(--text-3); flex: none; }
.dc-sys b { color: var(--text); cursor: pointer; }
.dc-sys time { font-size: 11px; color: var(--text-3); }
.dc-reply { display: flex; align-items: center; gap: 6px; margin: 4px 0 2px 32px; padding-left: 26px; font-size: 12.5px; color: var(--text-3); cursor: pointer; min-width: 0; position: relative; }
.dc-reply::before { content: ''; position: absolute; left: 0; top: 50%; width: 22px; height: 12px; border: 1.5px solid var(--line); border-right: 0; border-bottom: 0; border-radius: 8px 0 0 0; }
.dc-reply svg { display: none; }
.dc-reply b { color: var(--text-2); flex: none; }
.dc-reply span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-reply:hover span { color: var(--text-2); }
.dc-imgs { display: grid; gap: 4px; margin-top: 6px; max-width: 520px; }
.dc-imgs.n2, .dc-imgs.n4 { grid-template-columns: 1fr 1fr; }
.dc-imgs.n3 { grid-template-columns: 1fr 1fr 1fr; }
.dc-imgs img, .dc-imgs video { width: 100%; max-height: 360px; object-fit: cover; border-radius: 10px; cursor: zoom-in; display: block; background: rgba(255, 255, 255, .04); }
.dc-imgs.n1 img, .dc-imgs.n1 video { width: auto; max-width: 100%; }
.dc-trade { display: flex; align-items: center; gap: 12px; max-width: 440px; margin-top: 6px; padding: 11px 14px; border-radius: 14px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line-2); box-shadow: inset 2px 0 0 var(--pos); }
.dc-trade.loss { box-shadow: inset 2px 0 0 var(--neg); }
.dc-trade .grow { display: grid; gap: 2px; min-width: 0; }
.dc-trade .grow .dim { font-size: 12px; }
.dc-tv { display: grid; justify-items: end; gap: 2px; }
.dc-tv b { font-size: 16px; }
.dc-tv span { font-size: 11.5px; color: var(--text-3); display: inline-flex; align-items: center; gap: 3px; }
.dc-reacts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.dc-r { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 8px; border-radius: 8px; font-size: 14px; background: rgba(255, 255, 255, .05); border: 1px solid transparent; transition: background .15s, border-color .15s; }
.dc-r b { font-size: 12px; color: var(--text-2); }
.dc-r:hover { border-color: var(--line); }
.dc-r.on { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .3); }
.dc-r.on b { color: var(--text); }
.dc-tools { position: absolute; right: 14px; top: -14px; z-index: 2; display: none; gap: 1px; padding: 3px; border-radius: 10px; background: rgba(20, 20, 23, .97); border: 1px solid var(--line); box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .7); }
.dc-row:hover .dc-tools { display: flex; }
.dc-tools button { width: 30px; height: 28px; display: grid; place-items: center; border-radius: 7px; color: var(--text-2); }
.dc-tools button:hover { color: var(--text); background: rgba(255, 255, 255, .08); }
.dc-tools button.danger:hover { color: #f87171; }
.dc-edit { width: 100%; font-size: 14px; resize: vertical; }
.dc-edhint { font-size: 11.5px; color: var(--text-3); margin-top: 3px; }

/* composer */
.dc-foot { flex: none; padding: 0 14px 14px; }
.dc-comp { position: relative; }
.dc-inbox { display: flex; align-items: flex-end; gap: 4px; padding: 5px; border-radius: 14px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); transition: border-color .2s; }
.dc-inbox:focus-within { border-color: rgba(255, 255, 255, .22); }
.dc-inbox textarea { flex: 1; min-width: 0; min-height: 36px; max-height: 220px; padding: 8px 6px; resize: none; border: 0; background: none; box-shadow: none; font-size: 14.5px; line-height: 1.4; }
.dc-ib { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; color: var(--text-3); transition: color .15s, background .15s; }
.dc-ib:hover { color: var(--text); background: rgba(255, 255, 255, .07); }
.dc-ib.gif { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; }
.dc-ib.send { color: #0a0a0b; background: var(--text); }
.dc-ib.send:hover { color: #0a0a0b; background: #fff; }
.dc-replybar { display: flex; align-items: center; gap: 6px; padding: 7px 12px 13px; margin-bottom: -6px; border-radius: 12px 12px 0 0; font-size: 12.5px; color: var(--text-2); background: rgba(255, 255, 255, .04); }
.dc-replybar button { margin-left: auto; color: var(--text-3); display: grid; }
.dc-attach { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 4px; }
.dc-thumb { position: relative; width: 64px; height: 64px; border-radius: 10px; overflow: hidden; background: rgba(255, 255, 255, .05); }
.dc-thumb img, .dc-thumb video { width: 100%; height: 100%; object-fit: cover; }
.dc-thumb button, .dc-attach .chip button { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: rgba(0, 0, 0, .7); }
.dc-attach .chip { position: relative; padding-right: 28px; }
.dc-sugg { position: absolute; left: 0; right: 0; bottom: calc(100% + 6px); z-index: 4; padding: 6px; border-radius: 14px; background: rgba(20, 20, 23, .98); border: 1px solid var(--line); box-shadow: 0 16px 40px -16px rgba(0, 0, 0, .8); }
.dc-sugg button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; border-radius: 9px; text-align: left; font-size: 13.5px; }
.dc-sugg button:first-child, .dc-sugg button:hover { background: rgba(255, 255, 255, .07); }
.dc-sugg .dim { font-size: 12.5px; }
.dc-preview { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; padding: 14px; border-radius: 14px; font-size: 13.5px; color: var(--text-2); background: rgba(255, 255, 255, .04); border: 1px solid var(--line-2); }

/* members */
.dc-mem { width: 236px; overflow-y: auto; padding: 10px 8px; }
.dc-mem.off { display: none; }
.dc-mg { padding: 12px 8px 6px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.dc-mi { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 8px; border-radius: 9px; text-align: left; font-size: 13.5px; color: var(--text); }
.dc-mi:hover { background: rgba(255, 255, 255, .05); }
.dc-mi.away { opacity: .55; }
.dc-mi .grow { min-width: 0; overflow: hidden; }
.dc-mi .lk-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.dc-mav { position: relative; display: grid; }
.dc-mav i { position: absolute; right: -2px; bottom: -2px; width: 11px; height: 11px; border-radius: 50%; border: 2.5px solid #101013; background: #52525b; }
.dc-mav i.on { background: #34d399; }
.dc-memh { display: flex; align-items: center; justify-content: space-between; padding: 0 8px 4px; }

/* popovers, modals */
.dc-pop { position: fixed; z-index: 120; min-width: 210px; max-height: 70vh; overflow-y: auto; padding: 6px; border-radius: 14px; background: rgba(16, 16, 18, .96); box-shadow: 0 20px 50px -18px rgba(0, 0, 0, .9); }
.dc-pop.wide { min-width: 260px; }
.dc-pop > button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 9px; font-size: 13px; color: var(--text-2); text-align: left; }
.dc-pop > button:hover, .dc-pop > button.on { color: var(--text); background: rgba(255, 255, 255, .07); }
.dc-pop > button .ic { flex: none; opacity: .75; }
.dc-pop > button .grow { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-pop > button.danger { color: #f87171; }
.dc-pop hr { border: 0; border-top: 1px solid var(--line-2); margin: 5px 4px; }
.dc-emojis { display: grid; grid-template-columns: repeat(6, 36px); gap: 2px; }
.dc-emojis button { height: 36px; border-radius: 9px; font-size: 20px; transition: transform .12s, background .12s; }
.dc-emojis button:hover { background: rgba(255, 255, 255, .08); transform: scale(1.15); }
.dc-form { display: grid; gap: 14px; margin-top: 14px; }
.dc-icons { display: flex; flex-wrap: wrap; gap: 4px; }
.dc-icons label, .dc-accents label { position: relative; cursor: pointer; }
.dc-icons input, .dc-accents input, .dc-kind input, .seg label input { position: absolute; opacity: 0; pointer-events: none; }
.dc-icons span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; font-size: 20px; transition: background .15s; }
.dc-icons input:checked + span { background: rgba(255, 255, 255, .12); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .4); }
.dc-icpic span { overflow: hidden; color: var(--text-3); box-shadow: inset 0 0 0 1px var(--line); }
.dc-icpic span img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dc-icpic span.busy { opacity: .5; animation: pulse 1.2s ease-in-out infinite; }
.dc-icpic:hover span { color: var(--text); }
.dc-ini { font-size: 13px !important; font-weight: 650; letter-spacing: -.02em; color: var(--text-2); }
.dc-ichint { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; font-size: 12px; }
.dc-ichint .chip-btn { margin-left: -9px; }
.dc-accents { display: flex; flex-wrap: wrap; gap: 9px; }
.dc-accents span { display: block; width: 26px; height: 26px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .3); }
.dc-accents input:checked + span { box-shadow: 0 0 0 2px #0d0d10, 0 0 0 4px #fff; }
.seg label { position: relative; cursor: pointer; }
.seg label span { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 8px; font-size: 12.5px; color: var(--text-2); transition: background .2s, color .2s; }
.seg label input:checked + span { background: rgba(255, 255, 255, .11); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .3); }
.dc-kinds { display: grid; gap: 6px; }
.dc-kind span { display: grid; grid-template-columns: 24px auto 1fr; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; cursor: pointer; background: rgba(255, 255, 255, .03); border: 1px solid var(--line-2); }
.dc-kind span > b:first-child { text-align: center; font-size: 17px; color: var(--text-2); }
.dc-kind em { font-style: normal; font-size: 12.5px; color: var(--text-3); }
.dc-kind input:checked + span { border-color: rgba(255, 255, 255, .4); background: rgba(255, 255, 255, .07); }
.dc-banpick { display: flex; align-items: center; gap: 10px; }
.dc-banprev { width: 160px; height: 56px; border-radius: 10px; overflow: hidden; background: rgba(255, 255, 255, .05); border: 1px dashed var(--line); }
.dc-banprev img { width: 100%; height: 100%; object-fit: cover; }
.dc-danger { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(248, 113, 113, .3); background: rgba(248, 113, 113, .05); }
.dc-danger > div { display: grid; font-size: 13px; }
.dc-banrow { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 13.5px; }
.dc-card-p { display: flex; align-items: center; gap: 16px; }
.dc-card-p h3 { margin: 0; }
.dc-mod { margin-top: 16px; padding-top: 6px; border-top: 1px solid var(--line-2); display: grid; gap: 10px; }
.dc-mod .lbl { margin-top: 8px; }
.dc-rulestext { margin-top: 12px; font-size: 14px; line-height: 1.6; color: var(--text-2); }
.dc-lb { display: grid; place-items: center; }
.dc-lb img, .dc-lb video { max-width: 100%; max-height: 72vh; border-radius: 12px; }

/* ── the board: challenge, awards, calendar ── */
.gp-extras { display: grid; gap: var(--gap); margin-bottom: var(--gap); }
.gp-extras:empty, .gp-extras > div:empty { display: none; }
.gp-chal-new { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 18px; border-radius: var(--radius); text-align: left; color: var(--text-2); border: 1px dashed var(--line); transition: color .2s, border-color .2s; }
.gp-chal-new:hover { color: var(--text); border-color: rgba(255, 255, 255, .3); }
.gp-chal-new span { flex: 1; display: grid; gap: 2px; }
.gp-chal-new em { font-style: normal; font-size: 12.5px; color: var(--text-3); }
.gp-chal-new svg:first-child { color: var(--text); }
.gp-chal { padding: 16px 18px; border-radius: var(--radius); }
.gp-chal.won { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3); }
.gc-h { display: flex; align-items: center; gap: 12px; }
.gc-h > svg { color: var(--text-2); }
.gc-h .grow { display: grid; gap: 2px; }
.gc-h .dim { font-size: 12.5px; }
.gc-win { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 12px; border-radius: 12px; font-size: 14px; background: rgba(255, 255, 255, .06); }
.gc-crown { margin-left: auto; color: var(--text); }
.gc-rows { display: grid; gap: 6px; margin-top: 12px; }
.gc-row { display: grid; grid-template-columns: 18px 24px minmax(70px, 140px) minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: 13px; }
.gc-row.me .gc-nm { font-weight: 700; }
.gc-n { color: var(--text-3); font-size: 12px; text-align: center; }
.gc-nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gc-bar { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.gc-bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, rgba(255, 255, 255, .35), rgba(255, 255, 255, .85)); transition: width .6s var(--ease); }
.gc-form { display: grid; gap: 14px; margin-top: 14px; }
.gc-kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.gc-kinds label { position: relative; cursor: pointer; }
.gc-kinds input { position: absolute; opacity: 0; }
.gc-kinds span { display: block; padding: 12px; border-radius: 12px; font-size: 13.5px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line-2); }
.gc-kinds input:checked + span { border-color: rgba(255, 255, 255, .4); background: rgba(255, 255, 255, .07); }
.gp-awards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.ga { display: grid; justify-items: center; gap: 4px; padding: 12px 10px; border-radius: var(--radius); text-align: center; cursor: pointer; transition: transform .2s; }
.ga:hover { transform: translateY(-2px); }
.ga-ic { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: var(--text); background: rgba(255, 255, 255, .08); }
.ga-k { font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.ga b { font-size: 13.5px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ga .dim { font-size: 12px; }
.gcal { margin: 4px 0 14px; }
.gcal-h, .gcal-g { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.gcal-h span { text-align: center; font-size: 10.5px; color: var(--text-3); padding-bottom: 4px; }
.gcal-d { position: relative; aspect-ratio: 1.25; border-radius: 9px; padding: 4px 6px; display: flex; flex-direction: column; justify-content: space-between; background: rgba(255, 255, 255, .03); font-size: 10px; overflow: hidden; }
.gcal-d i { font-style: normal; color: var(--text-3); }
.gcal-d b { font-size: 11px; align-self: flex-end; }
.gcal-d.pos { background: color-mix(in srgb, var(--pos) calc(var(--a) * 100%), transparent); }
.gcal-d.neg { background: color-mix(in srgb, var(--neg) calc(var(--a) * 70%), transparent); }
.gcal-d.pos i, .gcal-d.pos b, .gcal-d.neg i, .gcal-d.neg b { color: var(--text); }

/* ── narrower screens: members fold into a panel that floats over the chat ── */
@media (min-width: 761px) and (max-width: 1100px) {
  .dc-space { grid-template-columns: 228px minmax(0, 1fr); }
  .dc-mem:not(.off) { position: fixed; right: 18px; top: 74px; bottom: 18px; z-index: 40; background: rgba(14, 14, 17, .96); box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .8); }
}

/* ── phones: the channel list, or one chat full screen ── */
@media (max-width: 760px) {
  .cm-head { padding-top: 8px; }
  .cm-acts { width: 100%; }
  .cm-acts .btn { flex: 1; justify-content: center; }
  .dc-tools-row { flex-direction: column; }
  .dc-search { flex: none; }
  .dc-code input { flex: 1; width: auto; }
  .dc-grid { grid-template-columns: minmax(0, 1fr); }

  body.dc-mode #main { padding: 4px 8px calc(84px + env(safe-area-inset-bottom)); }
  body.dc-chatting #main { padding-bottom: 8px; }
  body.dc-chatting .tabbar, body.dc-chatting .more-sheet { display: none; }
  .dc-space { grid-template-columns: minmax(0, 1fr); }
  .dc-chat, .dc-mem { display: none; }
  .dc-space.in-chat .dc-side { display: none; }
  .dc-space.in-chat .dc-chat { display: flex; }
  .dc-back { display: grid; }
  .dc-topic { display: none; }
  .dc-chead { height: 50px; padding: 0 6px; }
  .dc-m { grid-template-columns: 54px minmax(0, 1fr); }
  .dc-row { padding-right: 10px; }
  .dc-reply { margin-left: 24px; }
  .dc-tools { top: auto; bottom: -12px; right: 8px; }
  .dc-foot { padding: 0 6px 8px; }
  .dc-ib { width: 34px; height: 34px; }
  .dc-mem:not(.off) { display: block; position: fixed; inset: auto 0 0 0; z-index: 90; width: auto; max-height: 75dvh; padding: 14px 10px calc(14px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; background: rgba(16, 16, 19, .98); box-shadow: 0 -20px 60px rgba(0, 0, 0, .7); }
  .gc-row { grid-template-columns: 16px 24px minmax(0, 90px) minmax(0, 1fr) auto; gap: 8px; }
  .gc-kinds { grid-template-columns: minmax(0, 1fr); }
  .gp-awards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
