/* ==========================================================================
   EtherXync 커뮤니티
   코랄(Xync) = 사람이 서로 잇는 순간: 추천, 글쓰기, 댓글, 이어지는 실
   민트(Ether) = 구조: 초점, 본문 링크, 운영자 표시, 가입
   흰 점 = 만나는 곳: 고른 게시판, 대화가 시작되는 점
   ========================================================================== */

.cx-page {
  --cx-line: rgba(148, 170, 197, 0.3);
  --cx-hot: var(--xync);
  --cx-body: #DCE4EE;
  min-height: 72vh;
  padding-bottom: 32px;
}
.cx-page [hidden] { display: none !important; }
.cx-head-desc, .cx-state-text, .cx-post-prev, .cx-prof-bio, .cx-guest p { text-wrap: pretty; }
.cx-motto, .cx-head-title, .cx-article-title, .cx-state-title, .cx-post-title { text-wrap: balance; }

/* ---------- 틀: 왼쪽 게시판 줄 + 본문 ---------- */
.cx-shell {
  width: min(100% - 32px, 1160px); margin-inline: auto;
  display: grid; grid-template-columns: 212px minmax(0, 1fr); gap: 60px; align-items: start;
  padding-top: clamp(28px, 4vw, 52px);
}
.cx-main { min-width: 0; }
.cx-rail {
  position: sticky; top: calc(var(--header-h) + 28px);
  display: grid; gap: 40px;
  max-height: calc(100vh - var(--header-h) - 48px); overflow-y: auto; scrollbar-width: none;
  padding: 2px 4px 8px 6px; margin-left: -6px;
}
.cx-rail::-webkit-scrollbar { display: none; }

.cx-boards { display: grid; gap: 2px; }
.cx-board {
  position: relative; display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  min-height: 42px; padding: 0 10px 0 14px; border-radius: var(--r-sm);
  color: var(--text-2); font-weight: 600; font-size: .95rem; letter-spacing: -0.01em;
  transition: color var(--d-2), background var(--d-2);
}
.cx-board:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.cx-board-ic { display: grid; place-items: center; color: var(--text-3); transition: color var(--d-2); }
.cx-board-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-board-n { font-family: var(--f-mono); font-size: .74rem; color: var(--text-3); font-variant-numeric: tabular-nums; }
.cx-board.is-on { color: var(--text); background: rgba(255, 255, 255, 0.055); }
.cx-board.is-on .cx-board-ic { color: var(--xync); }
/* 고른 게시판 앞의 흰 점: 두 줄기가 만나는 자리 */
.cx-board.is-on::before {
  content: ""; position: absolute; left: -3px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%;
  background: var(--spark); box-shadow: -3px 0 9px rgba(99, 242, 210, 0.85), 3px 0 9px rgba(255, 138, 102, 0.85);
}

.cx-rules { font-size: .87rem; line-height: 1.6; color: var(--text-3); }
.cx-rules-t { font-size: .9rem; font-weight: 700; color: var(--text-2); letter-spacing: -0.01em; margin-bottom: 12px; }
.cx-rules ul { list-style: none; display: grid; gap: 11px; }
.cx-rules li b { display: block; font-weight: 650; color: var(--text-2); font-size: .86rem; }
.cx-rules-link {
  display: inline-flex; align-items: center; min-height: 36px; margin-top: 6px; color: var(--text-2);
  text-decoration: underline; text-decoration-color: var(--line-input); text-underline-offset: 4px;
}
.cx-rules-link:hover { color: var(--text); text-decoration-color: var(--text-2); }
.cx-rules-foot { display: none; }

/* ---------- 게시판 머리 ---------- */
.cx-head { display: flex; align-items: flex-start; gap: 18px; min-height: 142px; padding-bottom: 22px; }
.cx-head-ic {
  flex: none; width: 50px; height: 50px; margin-top: 2px; border-radius: 15px; display: grid; place-items: center;
  color: var(--text-2); background: rgba(255, 255, 255, 0.035); border: 1px solid var(--line);
}
.cx-head-text { flex: 1; min-width: 0; }
.cx-motto { font-family: var(--f-display-latin); font-weight: 400; font-size: clamp(2.3rem, 4.4vw, 3.5rem); line-height: 1; letter-spacing: -0.02em; }
@media (min-width: 641px) { .cx-br { display: none; } }
.cx-head-title { font-family: var(--f-display); font-weight: var(--w-display); font-size: clamp(1.85rem, 3.2vw, 2.5rem); line-height: 1.18; letter-spacing: -0.02em; }
.cx-head-desc { margin-top: 12px; color: var(--text-2); max-width: 36em; }
.cx-head-meta { margin-top: 6px; min-height: 1.6em; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .86rem; color: var(--text-3); }
.cx-sk-h1 { display: block; width: min(420px, 80%); height: 44px; }
.cx-sk-desc { display: block; width: min(560px, 95%); height: 18px; margin-top: 18px; }

/* 글쓰기: 눈에 띄지만 크게 외치지 않는 코랄 */
.cx-write, .cx-btn-soft {
  flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px; border-radius: var(--r-pill);
  color: var(--xync); background: var(--xync-dim); border: 1px solid rgba(255, 138, 102, 0.36);
  font-weight: 700; font-size: .96rem; letter-spacing: -0.01em; white-space: nowrap;
  transition: background var(--d-2), color var(--d-2), border-color var(--d-2), transform var(--d-2) var(--ease-out);
}
.cx-write:hover, .cx-btn-soft:hover { background: var(--xync); color: var(--xync-ink); border-color: var(--xync); transform: translateY(-1px); }
.cx-write:active, .cx-btn-soft:active { transform: scale(.98); }

/* ---------- 정렬 ---------- */
.cx-sortbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.cx-window { display: flex; flex-wrap: wrap; gap: 6px; }
.cx-window .chip { height: 34px; padding: 0 13px; }

/* ---------- 글 목록 ---------- */
.cx-feed { min-height: 420px; }
.cx-post {
  position: relative; isolation: isolate;
  display: grid; grid-template-columns: 44px auto minmax(0, 1fr);
  grid-template-areas: "vote title title" "vote prev prev" "vote by stats";
  column-gap: 16px; padding: 18px 8px 18px 0; border-bottom: 1px solid var(--line);
}
.cx-post::before {
  content: ""; position: absolute; z-index: -1; inset: 5px -12px; border-radius: 16px;
  background: transparent; transition: background var(--d-2);
}
.cx-post:hover::before { background: rgba(255, 255, 255, 0.025); }
.cx-post[data-glow]::after { inset: 5px -12px; z-index: -1; border-radius: 16px; }
.cx-post-vote { grid-area: vote; align-self: start; margin-top: -4px; }
.cx-post-title { grid-area: title; font-size: 1.1rem; font-weight: 700; line-height: 1.45; letter-spacing: -0.015em; max-width: 40em; }
.cx-post-link { color: var(--text); transition: color var(--d-1); }
.cx-post-link:visited { color: #BFC9D6; }
.cx-post:hover .cx-post-link { color: #fff; }
.cx-post-link::after { content: ""; position: absolute; inset: 0; z-index: 0; border-radius: 12px; }
.cx-post-link:focus-visible { outline: none; }
.cx-post-link:focus-visible::after { outline: 2px solid var(--ether); outline-offset: -2px; }
.cx-post-prev {
  grid-area: prev; margin-top: 4px; max-width: 46em; font-size: .95rem; line-height: 1.6; color: var(--text-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.cx-post-by, .cx-post-stats { display: flex; align-items: center; gap: 6px 14px; margin-top: 10px; min-width: 0; font-size: .86rem; color: var(--text-3); }
.cx-post-by { grid-area: by; flex-wrap: wrap; }
.cx-post-stats { grid-area: stats; }
.cx-post .cx-vote, .cx-post .cx-author, .cx-post .cx-bd, .cx-post .cx-cc, .cx-post .cx-domain, .cx-post .cx-tag { position: relative; z-index: 1; }

.cx-post.is-skel { min-height: 138px; }
.cx-post.is-skel::before { display: none; }
.cx-sk-vote { display: block; width: 26px; height: 70px; margin: 4px auto 0; border-radius: 9px; }
.cx-sk-title { grid-area: title; display: block; height: 20px; margin-top: 2px; }
.cx-sk-line { grid-area: prev; display: block; width: 88%; height: 14px; margin-top: 14px; }
.cx-sk-meta { grid-area: by; display: block; width: 200px; height: 14px; margin-top: 16px; }

/* 사람, 표시 */
.cx-author { display: inline-flex; align-items: center; gap: 8px; min-width: 0; color: var(--text-2); font-weight: 600; }
.cx-author-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14em; }
a.cx-author:hover .cx-author-name { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-input); }
.cx-author.is-gone { color: var(--text-3); font-weight: 500; }
.cx-av-ghost { background: rgba(148, 170, 197, 0.12); box-shadow: 0 0 0 1px rgba(148, 170, 197, 0.28) inset; }
.cx-tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px; font-size: .72rem; font-weight: 700; letter-spacing: 0; white-space: nowrap; }
.cx-tag.is-admin { color: var(--ether); background: var(--ether-dim); box-shadow: 0 0 0 1px rgba(99, 242, 210, 0.28) inset; }
.cx-tag.is-op { color: var(--xync); background: var(--xync-dim); box-shadow: 0 0 0 1px rgba(255, 138, 102, 0.3) inset; }

.cx-bd, .cx-cc, .cx-domain { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; color: var(--text-3); font-weight: 600; transition: color var(--d-1); }
.cx-bd:hover, .cx-cc:hover { color: var(--text); }
.cx-cc span { font-family: var(--f-mono); font-size: .8rem; font-weight: 500; }
.cx-domain { max-width: 240px; font-weight: 500; }
.cx-domain span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-domain:hover { color: var(--ether); }

/* ---------- 투표 ---------- */
.cx-vote { display: inline-flex; align-items: center; color: var(--text-3); }
.cx-vote.is-col { flex-direction: column; width: 44px; }
.cx-vote-btn {
  display: grid; place-items: center; width: 36px; height: 32px; padding: 0; border: 0; border-radius: 10px;
  background: transparent; color: var(--text-3); -webkit-tap-highlight-color: transparent;
  transition: color var(--d-1), background var(--d-1);
}
.cx-vote-btn svg { transition: transform var(--d-2) var(--ease-out); }
.cx-vote-btn:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.cx-vote-btn.is-up:hover { color: var(--xync); }
.cx-vote-btn:active svg { transform: scale(.84); }
.cx-vote.is-up .cx-vote-btn.is-up { color: var(--xync); }
.cx-vote.is-up .cx-vote-btn.is-up svg, .cx-vote.is-down .cx-vote-btn.is-down svg { fill: currentColor; }
.cx-vote.is-down .cx-vote-btn.is-down { color: var(--text-2); }
.cx-vote-score { min-width: 3.2ch; text-align: center; font-family: var(--f-mono); font-size: .82rem; line-height: 1.25; color: var(--text-2); font-variant-numeric: tabular-nums; }
.cx-vote-score b { display: inline-block; font-weight: 500; }
.cx-vote.is-up .cx-vote-score { color: var(--xync); }
.cx-vote.is-down .cx-vote-score { color: var(--text-3); }
.cx-vote-score .is-bump { animation: cx-bump .38s var(--ease-out); }
.cx-vote.is-off { opacity: .45; }
@keyframes cx-bump { 40% { transform: translateY(-3px) scale(1.2); } 100% { transform: none; } }

.cx-vote.is-pill { height: 44px; padding: 0 3px; gap: 2px; border: 1px solid var(--line-2); border-radius: var(--r-pill); }
.cx-vote.is-pill .cx-vote-btn { width: 36px; height: 36px; border-radius: 50%; }
.cx-vote.is-pill.is-up { border-color: rgba(255, 138, 102, 0.45); background: var(--xync-dim); }
.cx-vote.is-inline .cx-vote-btn { width: 32px; height: 32px; }
.cx-vote.is-inline .cx-vote-score { min-width: 2.4ch; }

/* ---------- 빈 화면, 오류 ---------- */
.cx-state { display: grid; justify-items: center; text-align: center; padding: 56px 16px 64px; }
.cx-state-title { font-family: var(--f-display); font-weight: var(--w-display-strong); font-size: 1.45rem; letter-spacing: -0.02em; line-height: 1.35; }
.cx-state-text { margin-top: 10px; max-width: 30em; color: var(--text-2); }
.cx-state-actions { margin-top: 24px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.cx-state.is-error .cx-state-title { font-size: 1.2rem; }

.cx-converge { width: min(260px, 70vw); height: auto; margin-bottom: 26px; overflow: visible; }
.cx-converge path { fill: none; stroke-width: 2; stroke-linecap: round; }
.cx-converge .cv-e { stroke: var(--ether); }
.cx-converge .cv-x { stroke: var(--xync); }
.cx-converge .cv-t { stroke: var(--text-3); stroke-dasharray: 1 7; opacity: 0; animation: cx-fade .9s ease-out 1.2s forwards; }
.cx-converge .cv-e, .cx-converge .cv-x { stroke-dasharray: 190; stroke-dashoffset: 190; animation: cx-line 1.25s var(--ease-out) .1s forwards; }
.cx-converge .cv-halo { fill: rgba(255, 255, 255, 0.06); transform-origin: 160px 48px; animation: cx-halo 1.4s var(--ease-out) 1s both; }
.cx-converge .cv-dot { fill: var(--spark); transform-origin: 160px 48px; animation: cx-dot .6s var(--ease-out) 1.05s both; }
@keyframes cx-line { to { stroke-dashoffset: 0; } }
@keyframes cx-fade { to { opacity: 1; } }
@keyframes cx-dot { from { transform: scale(0); } 60% { transform: scale(1.6); } to { transform: scale(1); } }
@keyframes cx-halo { from { transform: scale(0); opacity: 0; } 50% { opacity: 1; } to { transform: scale(1); opacity: 1; } }

.cx-starts { list-style: none; width: min(100%, 520px); margin-top: 30px; text-align: left; border-top: 1px solid var(--line); }
.cx-starts li { border-bottom: 1px solid var(--line); }
.cx-start {
  display: grid; grid-template-columns: 40px minmax(0, 1fr); grid-template-areas: "ic name" "ic desc";
  column-gap: 12px; align-items: center; min-height: 64px; padding: 10px 8px; border-radius: 12px;
  transition: background var(--d-2);
}
.cx-start:hover { background: rgba(255, 138, 102, 0.06); }
.cx-start-ic { grid-area: ic; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--text-2); background: rgba(255, 255, 255, 0.035); transition: color var(--d-2); }
.cx-start:hover .cx-start-ic { color: var(--xync); }
.cx-start-name { grid-area: name; font-weight: 700; color: var(--text); }
.cx-start-desc { grid-area: desc; font-size: .86rem; color: var(--text-3); line-height: 1.5; }

.cx-more { display: grid; justify-items: center; gap: 10px; padding-top: 28px; }
.cx-more .btn { min-width: 180px; }
.cx-end { font-size: .86rem; color: var(--text-3); }

/* ---------- 글 본문 (마크다운 조금) ---------- */
.cx-md { overflow-wrap: anywhere; }
.cx-md > * + * { margin-top: .85em; }
.cx-md a { color: var(--ether); text-decoration: underline; text-decoration-color: rgba(99, 242, 210, 0.4); text-underline-offset: 3px; }
.cx-md a:hover { text-decoration-color: var(--ether); }
.cx-md strong { font-weight: 700; color: var(--text); }
.cx-md em { font-style: italic; }
.cx-md code { font-family: var(--f-mono); font-size: .86em; padding: .12em .4em; border-radius: 6px; background: rgba(255, 255, 255, 0.07); color: #E8EEF6; }
.cx-md pre { padding: 14px 16px; border-radius: 12px; background: #0A0F16; border: 1px solid var(--line); overflow-x: auto; font-size: .86rem; line-height: 1.65; tab-size: 4; }
.cx-md pre code { padding: 0; background: none; font-size: inherit; white-space: pre; word-break: normal; overflow-wrap: normal; }
.cx-md blockquote { margin: 0; padding: 1px 0 1px 16px; border-left: 2px solid var(--line-input); color: var(--text-2); }
.cx-md ul, .cx-md ol { padding-left: 1.4em; }
.cx-md li + li { margin-top: .3em; }
.cx-md li::marker { color: var(--text-3); }

/* ---------- 글 페이지 ---------- */
.cx-article { padding-bottom: 32px; min-height: 260px; }
.cx-article-board { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; color: var(--text-2); font-weight: 650; font-size: .92rem; }
.cx-article-board:hover { color: var(--text); }
.cx-article-board svg { color: var(--text-3); }
.cx-article-title { margin-top: 10px; max-width: 26em; font-family: var(--f-display-ko); font-weight: var(--w-display); font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1.3; letter-spacing: -0.02em; }
.cx-article-title.is-gone { color: var(--text-3); }
.cx-article-by { margin-top: 16px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; font-size: .9rem; color: var(--text-3); }
.cx-article-body { margin-top: 26px; max-width: 38em; font-size: 1.0625rem; line-height: 1.85; color: var(--cx-body); }
.cx-edited { color: var(--text-3); }
.cx-linkcard {
  margin-top: 26px; max-width: 38em; display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: center; gap: 14px;
  padding: 14px 16px; border-radius: var(--r-md); border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.02);
  transition: border-color var(--d-2), background var(--d-2);
}
.cx-linkcard:hover { border-color: rgba(99, 242, 210, 0.45); background: rgba(99, 242, 210, 0.04); }
.cx-linkcard-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: var(--ether); background: var(--ether-dim); }
.cx-linkcard-d { display: block; font-weight: 700; color: var(--text); }
.cx-linkcard-u { display: block; font-size: .85rem; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-bar { margin-top: 28px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.cx-bar .btn { min-height: 44px; gap: 8px; }
.cx-bar .btn-quiet { padding: 0 14px; }
.cx-bar .cx-bar-gap { flex: 1; }
.cx-sk-block { display: block; height: 16px; margin-top: 14px; }

/* ==========================================================================
   이어지는 실: 댓글 나무
   세로줄은 부모에서 내려오고, 답글마다 로고의 곡선처럼 휘어 들어간다.
   댓글에 마우스를 올리면 그 댓글에서 글까지 이어진 길이 코랄로 밝아진다.
   ========================================================================== */
.cx-thread {
  --av: 30px; --in: 24px; --gap: 18px; --r: 14px;
  position: relative; padding-top: 28px; border-top: 1px solid var(--line);
  scroll-margin-top: calc(var(--header-h) + 20px);
}
.cx-thread-head { position: relative; display: grid; grid-template-columns: var(--av) minmax(0, 1fr) auto; align-items: center; column-gap: 12px; min-height: 44px; }
.cx-origin {
  justify-self: center; width: 10px; height: 10px; border-radius: 50%; background: var(--spark);
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.05), -4px 0 12px rgba(99, 242, 210, 0.65), 4px 0 12px rgba(255, 138, 102, 0.65);
}
.cx-thread-title { font-family: var(--f-display-ko); font-weight: var(--w-display-strong); font-size: 1.3rem; letter-spacing: -0.02em; }
.cx-thread-head .tabs .tab { height: 32px; padding: 0 14px; font-size: .88rem; }
.cx-thread-head::after {
  content: ""; position: absolute; left: calc(var(--av) / 2 - .75px); top: calc(50% + 10px); bottom: 0;
  border-left: 1.5px solid var(--cx-line); transition: border-color var(--d-2);
}
.cx-thread.has-path .cx-thread-head::after { border-color: var(--cx-hot); }

.cx-kids { margin-left: calc(var(--av) / 2 - .75px); padding-left: var(--in); }
.cx-node { position: relative; padding-top: var(--gap); scroll-margin-top: calc(var(--header-h) + 24px); }
.cx-node::before, .cx-node:not(:last-child)::after {
  content: ""; position: absolute; left: calc(-1 * var(--in)); pointer-events: none;
  border: 0 solid var(--cx-line); transition: border-color var(--d-2);
}
/* 휘어 들어가는 가지 */
.cx-node::before {
  top: 0; width: calc(var(--in) - 6px); height: calc(var(--gap) + var(--av) / 2 + .75px);
  border-left-width: 1.5px; border-bottom-width: 1.5px; border-bottom-left-radius: var(--r);
}
/* 다음 형제로 곧게 이어지는 줄 */
.cx-node:not(:last-child)::after { top: calc(var(--gap) + var(--av) / 2 - var(--r)); bottom: 0; border-left-width: 1.5px; }

.cx-row { position: relative; isolation: isolate; display: grid; grid-template-columns: var(--av) minmax(0, 1fr); column-gap: 12px; align-items: start; }
.cx-row::after {
  content: ""; position: absolute; z-index: -1; inset: -8px -12px -4px -10px; border-radius: 16px;
  background: transparent; pointer-events: none; transition: background .6s, box-shadow .6s;
}
/* 자기 아바타에서 자기 답글로 내려가는 줄기 */
.cx-cm.has-kids > .cx-row::before {
  content: ""; position: absolute; left: calc(var(--av) / 2 - .75px); top: calc(var(--av) + 5px); bottom: 0;
  border-left: 1.5px solid var(--cx-line); transition: border-color var(--d-2);
}

/* 밝아지는 길 */
.cx-node.is-path::before { border-color: var(--cx-hot); }
.cx-node.is-thru::before { border-left-color: var(--cx-hot); }
.cx-node.is-thru::after { border-color: var(--cx-hot); }
.cx-cm.is-anc > .cx-row::before { border-color: var(--cx-hot); }
/* 길 위의 사람들: 아바타가 이어진 점처럼 켜진다 */
.cx-cm-av .avatar { transition: box-shadow var(--d-2); }
.cx-cm.is-path > .cx-row .cx-cm-av .avatar { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px rgba(255, 138, 102, 0.75); }
.cx-cm.is-hot > .cx-row::before,
.cx-cm.is-hot > .cx-kids > .cx-node::before,
.cx-cm.is-hot > .cx-kids > .cx-node::after { border-color: var(--cx-hot); }

/* 줄을 눌러 접기 */
.cx-fold {
  position: absolute; z-index: 2; left: calc(var(--av) / 2 - 12px); width: 24px;
  top: calc(var(--gap) + var(--av) + 5px); bottom: 0; padding: 0; border: 0; border-radius: 12px;
  background: transparent; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.cx-fold:hover { background: linear-gradient(90deg, transparent 40%, rgba(255, 138, 102, 0.08) 50%, transparent 60%); }
.cx-cm > .cx-stub { display: none; }
.cx-cm.is-folded > .cx-stub { display: block; }
.cx-cm.is-folded > .cx-kids:not(.cx-stub) { display: none; }
.cx-knot { justify-self: center; align-self: center; width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--cx-line); background: var(--bg); }
.cx-unfold {
  justify-self: start; display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 12px; margin-left: -4px;
  border: 1px solid rgba(255, 138, 102, 0.35); border-radius: var(--r-pill); background: var(--xync-dim);
  color: var(--xync); font-size: .84rem; font-weight: 650;
}
.cx-unfold:hover { background: var(--xync); color: var(--xync-ink); }

/* 댓글 한 개 */
.cx-cm-av { display: block; line-height: 0; border-radius: 50%; }
.cx-cm-av .avatar { --size: var(--av) !important; }
.cx-cm-main { min-width: 0; }
.cx-cm-head { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; min-height: var(--av); font-size: .9rem; }
.cx-cm-name { font-weight: 700; color: var(--text); }
a.cx-cm-name:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-input); }
.cx-cm-name.is-gone { color: var(--text-3); font-weight: 550; }
.cx-cm-time { color: var(--text-3); font-size: .84rem; }
a.cx-cm-time:hover { color: var(--text-2); }
.cx-replyto { color: var(--text-3); font-size: .84rem; }
.cx-replyto b { color: var(--text-2); font-weight: 600; }
.cx-cm-body { max-width: 42em; font-size: 1rem; line-height: 1.75; color: var(--cx-body); }
.cx-cm-gone { color: var(--text-3); }
.cx-cm-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; margin: 4px 0 0 -8px; }
.cx-act {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border: 0; border-radius: 10px;
  background: transparent; color: var(--text-3); font-size: .86rem; font-weight: 600;
  transition: color var(--d-1), background var(--d-1);
}
.cx-act:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.cx-act.is-reply:hover { color: var(--xync); }
.cx-act[aria-expanded="true"] { color: var(--text); background: rgba(255, 255, 255, 0.07); }
.cx-cm.is-deleted .cx-cm-av .cx-av-ghost { background: transparent; }

.cx-more-wrap { position: relative; }
.cx-row.is-menu { z-index: 40; }
.cx-menu {
  position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; min-width: 172px; padding: 6px;
  display: grid; gap: 2px; background: #0F1621; border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow-2);
  animation: cx-pop .16s var(--ease-out);
}
.cx-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 0 10px; border: 0; border-radius: 8px;
  background: transparent; color: var(--text-2); font-size: .9rem; font-weight: 550; text-align: left;
}
.cx-menu button:hover, .cx-menu button:focus-visible { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.cx-menu button:focus-visible { outline-offset: -2px; }
.cx-menu .is-danger { color: var(--err); }
.cx-menu .is-danger:hover { color: #FCA5A5; }
@keyframes cx-pop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* 새 댓글과 링크로 찾아온 댓글 */
.cx-cm.is-target > .cx-row::after { background: rgba(255, 138, 102, 0.07); box-shadow: 0 0 0 1px rgba(255, 138, 102, 0.24) inset; }
.cx-node.is-new > .cx-row::after { animation: cx-glow 2.8s ease-out; }
.cx-node.is-new::before { animation: cx-grow .7s var(--ease-out); }
@keyframes cx-glow { 0%, 20% { background: rgba(255, 138, 102, 0.16); box-shadow: 0 0 0 1px rgba(255, 138, 102, 0.5) inset; } 100% { background: transparent; box-shadow: none; } }
@keyframes cx-grow { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }

/* 댓글 쓰는 자리: 아직 이어지지 않은 점선 */
.cx-compose::before { border-style: dashed; border-color: rgba(255, 138, 102, 0.42); }
.cx-compose:focus-within::before, .cx-compose.is-path::before { border-color: var(--xync); }
.cx-compose-form { display: grid; gap: 8px; min-width: 0; }
.cx-ta { min-height: 92px; resize: none; overflow: hidden; padding: 12px 14px; border-radius: var(--r-md); font-size: 1rem; line-height: 1.65; }
.cx-compose.is-reply .cx-ta { min-height: 76px; }
.cx-compose-bar { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px 12px; }
.cx-hint { margin-right: auto; font-size: .8rem; color: var(--text-3); }
.cx-count { font-family: var(--f-mono); font-size: .76rem; color: var(--text-3); }
.cx-count.is-over { color: var(--err); }
.cx-compose-err { font-size: .85rem; color: var(--err); }
.cx-compose-to { font-size: .84rem; color: var(--text-3); padding-top: 4px; }
.cx-guest {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 16px;
  padding: 14px 16px; border: 1px dashed var(--line-input); border-radius: var(--r-md);
}
.cx-guest p { color: var(--text-2); font-size: .95rem; }
.cx-guest-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cx-closed { padding: 4px 0; color: var(--text-3); font-size: .95rem; min-height: var(--av); display: flex; align-items: center; }
.cx-compose.is-closed::before { border-color: var(--cx-line); }
.cx-thread-empty { padding: 22px 0 6px calc(var(--av) * 1.5 + var(--in) + 12px); color: var(--text-3); }
.cx-cm-skel .cx-row { min-height: 84px; }
.cx-cm-skel .skeleton { display: block; }
.cx-edit { display: grid; gap: 8px; margin-top: 4px; }

/* ---------- 대화상자 ---------- */
.cx-modal-title { font-size: 1.25rem; font-weight: 750; letter-spacing: -0.02em; line-height: 1.35; }
.cx-modal-text { margin-top: 8px; color: var(--text-2); font-size: .95rem; }
.cx-modal-actions { margin-top: 22px; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.cx-btn-danger { --btn-bg: var(--err); --btn-fg: #2B0909; --btn-bd: var(--err); }
.cx-btn-danger:hover { --btn-bg: #FCA5A5; --btn-bd: #FCA5A5; }
.cx-reasons { margin: 18px 0 16px; padding: 0; border: 0; display: grid; gap: 6px; }
.cx-reason { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; transition: border-color var(--d-1), background var(--d-1); }
.cx-reason:hover { border-color: var(--line-2); }
.cx-reason input { width: 18px; height: 18px; accent-color: var(--xync); }
.cx-reason:has(input:checked) { border-color: rgba(255, 138, 102, 0.5); background: var(--xync-dim); }
.cx-report-more { min-height: 88px; }
.cx-report .field-error { margin-top: 10px; }

/* ---------- 글쓰기 ---------- */
.cx-wrap { width: min(100% - 32px, 800px); margin-inline: auto; padding-top: clamp(24px, 4vw, 44px); }
.cx-back { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; color: var(--text-3); font-size: .92rem; font-weight: 600; }
.cx-back:hover { color: var(--text); }
.cx-write-h { margin-top: 8px; font-family: var(--f-display); font-weight: var(--w-display); font-size: clamp(2rem, 3.6vw, 2.6rem); letter-spacing: -0.02em; line-height: 1.18; }
.cx-form { margin-top: 26px; display: grid; gap: 24px; }
.cx-field-row { display: grid; grid-template-columns: 200px minmax(0, 1fr); align-items: center; gap: 8px 16px; }
.cx-field-row .select { min-height: 48px; }
.cx-board-desc { color: var(--text-3); font-size: .9rem; }
.cx-note { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 12px 16px; border-radius: var(--r-md); background: rgba(255, 255, 255, 0.035); border: 1px solid var(--line); color: var(--text-2); font-size: .92rem; }
.cx-note .btn { min-height: 34px; }

.cx-sheet {
  border: 1px solid var(--line-2); border-radius: var(--r-lg); background: rgba(13, 19, 28, 0.72);
  transition: border-color var(--d-2), box-shadow var(--d-2);
}
.cx-sheet:focus-within { border-color: rgba(99, 242, 210, 0.45); outline: var(--focus-w) solid var(--focus); outline-offset: var(--focus-off); }
.cx-sheet.is-invalid { border-color: rgba(248, 113, 113, 0.6); }
.cx-sheet-title { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 6px 20px 6px 22px; border-bottom: 1px solid var(--line); }
.cx-title-in {
  width: 100%; min-height: 64px; padding: 0; border: 0; background: transparent; color: var(--text);
  font-size: clamp(1.25rem, 2.2vw, 1.5rem); font-weight: 750; letter-spacing: -0.02em;
}
.cx-title-in::placeholder { color: var(--text-3); }
.cx-title-in:focus { outline: none; }
.cx-sheet-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px 0 18px; }
.cx-sheet-tools .tabs .tab { height: 32px; padding: 0 14px; font-size: .88rem; }
.cx-body-in {
  display: block; width: 100%; min-height: 280px; padding: 16px 22px 20px; border: 0; background: transparent; resize: none; overflow: hidden;
  color: var(--text); font-size: 1.0625rem; line-height: 1.8;
}
.cx-body-in::placeholder { color: var(--text-3); }
.cx-body-in:focus { outline: none; }
.cx-preview { min-height: 280px; padding: 18px 22px 22px; font-size: 1.0625rem; line-height: 1.85; color: var(--cx-body); }
.cx-preview-title { font-family: var(--f-display-ko); font-weight: var(--w-display); font-size: 1.7rem; letter-spacing: -0.02em; line-height: 1.3; color: var(--text); margin-bottom: 18px; }
.cx-preview-empty { color: var(--text-3); }
.cx-sheet-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px 14px 22px; border-top: 1px solid var(--line); }
.cx-md-help { display: flex; flex-wrap: wrap; gap: 4px 14px; font-family: var(--f-mono); font-size: .76rem; color: var(--text-3); }
.cx-counter { font-family: var(--f-mono); font-size: .76rem; color: var(--text-3); white-space: nowrap; }
.cx-counter.is-over { color: var(--err); }
.cx-errs { display: grid; gap: 4px; }
.cx-form-bar {
  position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px;
  margin-top: -6px; padding: 18px 0 calc(16px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(7, 10, 15, 0) 0%, rgba(7, 10, 15, 0.94) 38%);
}
.cx-draft { margin-right: auto; font-size: .84rem; color: var(--text-3); }
.cx-gate { min-height: 48vh; padding: 20px 0 80px; }
.cx-gate .gate-card { margin: 12px auto 0; }
.cx-gate .gate-card .lock { background: var(--xync-dim); color: var(--xync); }
.cx-form-skel { margin-top: 26px; display: grid; gap: 18px; }
.cx-form-skel .skeleton { display: block; }

/* ---------- 사용자 페이지 ---------- */
.cx-user { width: min(100% - 32px, 820px); margin-inline: auto; padding-top: clamp(32px, 5vw, 60px); }
.cx-prof { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 26px; align-items: start; min-height: 178px; padding-bottom: 30px; }
.cx-prof-av .avatar { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset, 0 18px 50px -16px hsl(var(--h) 80% 55% / 0.55); }
.cx-prof-name { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; font-family: var(--f-display); font-weight: var(--w-display); font-size: clamp(1.8rem, 3.2vw, 2.45rem); letter-spacing: -0.02em; line-height: 1.2; }
.cx-prof-name .cx-tag { font-family: var(--f-sans); }
.cx-prof-name .cx-tag { height: 24px; font-size: .78rem; }
.cx-prof-bio { margin-top: 10px; max-width: 34em; color: var(--text-2); }
.cx-prof-bio.is-empty { color: var(--text-3); }
.cx-prof-stats { margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 10px 32px; }
.cx-prof-stats dt { font-size: .8rem; color: var(--text-3); }
.cx-prof-stats dd { margin: 2px 0 0; font-weight: 650; }
.cx-prof-stats .mono { font-family: var(--f-mono); font-weight: 500; font-size: 1.05rem; }
.cx-prof-links { margin-top: 18px; display: flex; gap: 8px; flex-wrap: wrap; }
.cx-utabs { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.cx-ulist { min-height: 320px; }
.cx-uc { padding: 18px 0; border-bottom: 1px solid var(--line); }
.cx-uc-post { display: inline-flex; align-items: flex-start; gap: 8px; max-width: 100%; color: var(--text-3); font-size: .88rem; font-weight: 600; line-height: 1.5; }
.cx-uc-post svg { flex: none; margin-top: 2px; }
.cx-uc-post:hover { color: var(--text); }
.cx-uc-body { margin-top: 8px; max-width: 42em; color: var(--cx-body); line-height: 1.75; }
.cx-uc-body.is-long { max-height: 10.5em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent); }
.cx-uc-meta { margin-top: 8px; display: flex; align-items: center; gap: 14px; font-size: .84rem; color: var(--text-3); }
.cx-uc-score { display: inline-flex; align-items: center; gap: 4px; font-family: var(--f-mono); font-size: .8rem; }
.cx-uc-score svg { width: 14px; height: 14px; }
.cx-uc-skel { padding: 18px 0; border-bottom: 1px solid var(--line); min-height: 118px; }
.cx-uc-skel .skeleton { display: block; }

/* ---------- 좁은 화면 ---------- */
@media (max-width: 960px) {
  .cx-shell { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .cx-rail { display: none; }
  .cx-rules-foot { display: block; margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--line); }
  .cx-rules-foot ul { gap: 12px; }
  .cx-head { min-height: 0; }
  .cx-strip {
    position: relative; display: flex; gap: 8px; height: 56px; margin: 0 -16px 10px; padding: 4px 16px 12px;
    overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .cx-strip::-webkit-scrollbar { display: none; }
  .cx-strip .cx-board {
    flex: none; display: inline-flex; gap: 7px; height: 40px; min-height: 0; padding: 0 15px;
    border: 1px solid var(--line-2); border-radius: var(--r-pill); background: rgba(255, 255, 255, 0.02); font-size: .9rem;
  }
  .cx-strip .cx-board svg { width: 16px; height: 16px; color: var(--text-3); }
  .cx-strip .cx-board.is-on { color: var(--text); border-color: rgba(255, 138, 102, 0.5); background: var(--xync-dim); }
  .cx-strip .cx-board.is-on svg { color: var(--xync); }
  .cx-strip .cx-board.is-on::before { display: none; }
}
@media (min-width: 961px) { .cx-strip { display: none; } }

@media (max-width: 640px) {
  .cx-shell { padding-top: 22px; }
  /* 제목과 글쓰기 버튼은 한 줄, 설명은 그 아래 전체 폭 */
  .cx-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; column-gap: 12px; padding-bottom: 16px; }
  .cx-head-text { display: contents; }
  .cx-head-ic { grid-column: 1; grid-row: 1; width: 42px; height: 42px; margin: 0; border-radius: 13px; }
  .cx-head-title { grid-column: 2; grid-row: 1; }
  .cx-motto { grid-column: 1 / 3; grid-row: 1; font-size: 2.45rem; }
  .cx-head-desc, .cx-head-meta, .cx-sk-h1, .cx-sk-desc { grid-column: 1 / -1; }
  .cx-head-desc { font-size: .98rem; margin-top: 12px; }
  .cx-head .cx-write { grid-column: 3; grid-row: 1; align-self: center; min-height: 42px; padding: 0 15px; font-size: .92rem; }
  .cx-sortbar { gap: 10px; }
  .cx-post {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas: "by by" "title title" "prev prev" "vote stats";
    column-gap: 10px; padding: 16px 0 10px;
  }
  .cx-post::before { inset: 4px -8px; }
  .cx-post-by { margin: 0 0 6px; }
  .cx-post-title { font-size: 1.05rem; }
  .cx-post-prev { font-size: .93rem; }
  .cx-post-vote { margin: 6px 0 0 -8px; }
  .cx-post .cx-vote.is-col { flex-direction: row; width: auto; }
  .cx-post-stats { margin-top: 6px; }
  .cx-post.is-skel { min-height: 150px; }
  .cx-sk-vote { width: 90px; height: 26px; margin: 10px 0 0; }
  .cx-sk-meta { grid-area: vote; }

  .cx-article-body { font-size: 1.02rem; }
  .cx-bar .btn-quiet { padding: 0 12px; }
  .cx-bar .btn-quiet span.cx-bar-t { display: none; }

  .cx-thread { --av: 26px; --in: 16px; --gap: 16px; --r: 12px; }
  .cx-cm-body { font-size: .98rem; }
  .cx-cm-actions { margin-left: -6px; }
  .cx-hint { display: none; }
  .cx-guest { padding: 14px; }

  .cx-field-row { grid-template-columns: minmax(0, 1fr); }
  .cx-sheet-title { padding: 4px 16px; }
  .cx-body-in, .cx-preview { min-height: 300px; padding-left: 16px; padding-right: 16px; }
  .cx-sheet-tools { padding: 10px 14px 0; }
  .cx-sheet-foot { padding: 10px 16px 12px; align-items: flex-end; }
  .cx-md-help { gap: 2px 10px; }

  .cx-prof { grid-template-columns: 68px minmax(0, 1fr); gap: 18px; }
  .cx-prof-av .avatar { --size: 68px !important; }
  .cx-form-bar { gap: 6px 10px; }
  .cx-draft { flex-basis: 100%; order: -1; text-align: right; font-size: .8rem; }
  .cx-draft:empty, .cx-draft.is-hint { display: none; }
}

/* 손가락으로 누르는 기기는 목표를 넉넉하게 */
@media (pointer: coarse) {
  .cx-hint, .cx-draft.is-hint { display: none; }
  .cx-vote-btn, .cx-vote.is-inline .cx-vote-btn { width: 44px; height: 44px; }
  .cx-vote.is-pill { height: 48px; }
  .cx-vote.is-pill .cx-vote-btn { width: 42px; height: 42px; }
  .cx-act { height: 44px; }
  .cx-bd, .cx-cc, .cx-domain { min-height: 44px; }
  .cx-board { min-height: 44px; }
  .cx-rules-link, .cx-back { min-height: 44px; }
  .cx-fold { width: 28px; left: calc(var(--av) / 2 - 14px); }
}
