/* 게시판. 두 화면 스타일(새 화면·예전 화면)에서 같이 쓴다 — 색과 면은 전부 토큰에서 온다.
   래퍼(.po-root)는 이 화면이 소유한다(js/posts.js). #view 는 다른 화면과 공유하는 노드다. */
.po-root { min-width: 0; max-width: 860px; }
.po { padding: 18px; }
.po-head { display: flex; align-items: baseline; gap: 12px; }
.po-count { margin: 0 auto 0 0; color: var(--sub); font-size: 12.5px; }

/* ── 목록 ── 줄 하나가 버튼 하나다. 제목이 남는 폭을 다 쓰고 길면 줄인다. */
.po-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 1px; }
.po-row {
  width: 100%;
  display: grid; grid-template-columns: minmax(0, 1fr) 110px 86px; align-items: baseline; column-gap: 12px;
  padding: 10px 10px; border: 0; border-radius: var(--radius-slot);
  background: transparent; color: var(--ink); text-align: left;
  transition: background 160ms ease;
}
.po-row:hover { background: rgba(255, 255, 255, 0.045); }
.po-row-title { min-width: 0; font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.po-row.is-pinned .po-row-title { font-weight: 700; }
.po-row-author { min-width: 0; color: var(--quiet); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.po-row-date { color: var(--sub); font-size: 12px; text-align: right; }
.po-pin {
  display: inline-block; margin-right: 7px; padding: 1px 6px;
  border: 1px solid var(--amethyst); border-radius: 4px;
  color: var(--amethyst); font-size: 11.5px; font-weight: 600; vertical-align: 1px;
}
.po-empty { margin: 14px 0 0; padding: 26px 14px; color: var(--sub); font-size: 13px; }
.po-pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 14px; }
.po-page { color: var(--sub); font-size: 12.5px; }

/* ── 글 ── */
.po-read-head { padding-bottom: 14px; border-bottom: 1px solid var(--edge-soft); }
.po-title { font-size: 19px; line-height: 1.4; overflow-wrap: anywhere; }
.po-meta { margin: 8px 0 0; color: var(--sub); font-size: 12.5px; }
.po-meta b { color: var(--quiet); font-weight: 600; margin-right: 6px; }
/* 줄바꿈과 공백을 쓴 그대로 둔다. 긴 주소가 화면을 옆으로 밀지 않게 어디서든 끊는다. */
.po-body { padding: 18px 0; font-size: 14.5px; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
.po-body a { color: var(--ether); }
.po-trace {
  margin: 0 0 14px; padding: 10px 12px; border: 1px dashed var(--edge); border-radius: var(--radius-slot);
  display: grid; gap: 3px; color: var(--quiet); font-size: 12.5px;
}
.po-trace b { color: var(--amethyst); font-weight: 600; }
.po-acts { display: flex; align-items: center; gap: 8px; padding-top: 14px; border-top: 1px solid var(--edge-soft); }
.po-acts-gap { flex: 1; }

/* ── 쓰기 ── */
.po-warn {
  margin: 12px 0 0; padding: 10px 12px; border-left: 2px solid var(--amethyst); border-radius: 0 var(--radius-slot) var(--radius-slot) 0;
  background: rgba(166, 107, 245, 0.07); color: var(--quiet); font-size: 12.5px; line-height: 1.7;
}
.po-warn b { color: var(--ink); font-weight: 600; }
.po-form { display: grid; gap: 14px; margin-top: 16px; }
.po-form .po-acts { padding-top: 0; border-top: 0; }
.po-field { display: grid; gap: 6px; color: var(--sub); font-size: 12px; }
.po-input {
  width: 100%; padding: 9px 11px;
  border: 1px solid var(--edge); border-radius: var(--radius-slot);
  background: rgba(255, 255, 255, 0.04); color: var(--ink); font-size: 14px;
}
.po-text { min-height: 340px; line-height: 1.7; resize: vertical; }
.po-counter { margin-left: 6px; color: var(--sub); }
.po-counter.is-over { color: #F5A6A6; }
.po-error { margin: 0; color: #F5A6A6; font-size: 12.5px; }

/* ── 사이드바의 공지 ── 제목 한 줄, 그 아래 본문 앞부분 두 줄. 누르면 그 글이 열린다. */
.notice-item {
  width: calc(100% + 12px); margin: 0 -6px; padding: 6px 6px;
  display: grid; gap: 2px;
  border: 0; border-radius: 6px; background: transparent; color: var(--quiet); text-align: left;
  transition: background 160ms ease;
}
.notice-item:hover { background: rgba(255, 255, 255, 0.06); }
.notice-title { color: var(--ink); font-size: 12.5px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.notice-excerpt {
  color: var(--sub); font-size: 12px; line-height: 1.45; overflow-wrap: anywhere;
  overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
}
.links-view .notice-item { padding: 10px 6px; }
.links-view .notice-title { font-size: 14px; }
.links-view .notice-excerpt { font-size: 13px; }

@media (max-width: 720px) {
  .po { padding: 14px; }
  /* 좁은 화면에서는 제목을 한 줄 통째로 주고 작성자·날짜를 아래로 내린다. */
  .po-row { grid-template-columns: minmax(0, 1fr) auto; row-gap: 2px; padding: 11px 6px; }
  .po-row-title { grid-column: 1 / -1; white-space: normal; }
  .po-row-date { text-align: right; }
  .po-acts { flex-wrap: wrap; }
  .po-text { min-height: 260px; }
}
