/* frontend/panseo/community.css — 원본 community-enhancements.css 이식본(무수정 복사).
   원본: .superpowers/sdd/2026-08-15-panseo-community-core/panseo-src/app/community-enhancements.css
   아래 규칙은 한 줄도 고치지 않았다 — 선택자·값이 원본과 다르면 community.js 의 마크업이
   원본과 다르다는 뜻이므로, 스타일이 어긋나면 JS 쪽 클래스명을 먼저 의심할 것.
   ⚠ 링크 순서: base.css → community.css → readability.css (readability 가 마지막이어야
   12개 충돌 선택자가 원본과 같은 우선순위로 해결된다 — base.css 머리말 참고). */

/* Community-only additions: educator feed, attachments, ownership and discussions. */

.following-note {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--orange-tint);
  color: var(--orange-dark-text);
  font-size: 11px;
  font-weight: 700;
}

.featured-expanded {
  margin-top: 18px;
  padding-top: 17px;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
}

.featured-author {
  padding: 0;
  color: inherit;
}

.post-follow-button,
.my-post-label {
  flex: 0 0 auto;
  margin-left: auto;
  padding: 4px 8px;
  border: 1px solid var(--control-line);
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
  line-height: 1.3;
}

.post-follow-button:hover,
.post-follow-button.following {
  border-color: var(--orange);
  color: var(--orange-dark-text);
}

.my-post-label {
  border-color: var(--line);
  background: var(--wash-2);
  color: var(--faint);
}

.post-attachments {
  display: grid;
  margin-top: 17px;
  gap: 9px;
}

.post-image-grid {
  display: grid;
  overflow: hidden;
  max-width: 620px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--line);
  gap: 1px;
  background: var(--line);
}

.post-image-grid.count-1 {
  grid-template-columns: minmax(0, 1fr);
}

.post-image-grid.count-3 a:first-child {
  grid-row: span 2;
}

.post-image-grid a {
  display: block;
  min-height: 120px;
  background: var(--wash-3);
}

.post-image-grid img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 430px;
  object-fit: cover;
}

.post-file-list {
  display: grid;
  gap: 7px;
}

.attachment-card {
  display: grid;
  width: 100%;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: inherit;
  text-align: left;
  text-decoration: none;
  gap: 10px;
}

.attachment-card:hover {
  border-color: var(--ink);
}

.attachment-card > span,
.file-tile {
  display: grid;
  min-width: 38px;
  height: 36px;
  place-items: center;
  background: var(--orange-soft);
  color: var(--orange-dark-text);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
  font-weight: 800;
}

.attachment-card > div,
.draft-attachment-list li > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.attachment-card strong,
.draft-attachment-list strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}

.attachment-card small,
.draft-attachment-list small {
  margin-top: 2px;
  color: var(--faint);
  font-size: 9px;
}

.attachment-card b {
  color: var(--muted);
  font-size: 15px;
}

.discussion {
  margin-top: 26px;
  padding-top: 21px;
  border-top: 1px solid var(--line-dark);
}

.discussion-head {
  display: flex;
  align-items: center;
  gap: 7px;
}

.discussion-head strong {
  font-size: 13px;
}

.discussion-head span {
  color: var(--orange-dark-text);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  font-weight: 800;
}

.comment-list {
  margin-top: 13px;
  border-top: 1px solid var(--line);
}

.comment {
  padding: 17px 0 15px;
  border-bottom: 1px solid var(--line);
}

.comment-author {
  display: flex;
  align-items: center;
  gap: 8px;
}

.comment-author > span {
  display: grid;
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line-dark);
  border-radius: 50%;
  background: var(--paper);
  font-size: 9px;
  font-weight: 800;
}

.comment-author > div {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.comment-author strong {
  font-size: 11px;
}

.comment-author small {
  margin-top: 3px;
  color: var(--faint);
  font-size: 9px;
}

.comment > p,
.reply > p {
  margin: 9px 0 5px 35px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.reply-control {
  margin-left: 35px;
  padding: 2px 0;
  color: var(--faint);
  font-size: 10px;
  font-weight: 700;
}

.reply-control:hover {
  color: var(--orange-dark-text);
}

.reply {
  margin: 13px 0 0 35px;
  padding: 13px 14px;
  border-left: 2px solid var(--line-dark);
  background: var(--wash);
}

.reply > p {
  margin-right: 0;
  margin-bottom: 0;
}

.reply-form,
.comment-form {
  display: grid;
  margin-top: 13px;
  gap: 7px;
}

.reply-form {
  margin-left: 35px;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--wash);
}

.reply-form textarea,
.comment-form textarea {
  width: 100%;
  padding: 10px 11px;
  border: 1px solid var(--control-line);
  border-radius: 0;
  outline: none;
  background: var(--paper);
  font-size: 12px;
  line-height: 1.6;
  resize: vertical;
}

.reply-form textarea:focus,
.comment-form textarea:focus {
  border-color: var(--ink);
}

.reply-form > div {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.reply-form button,
.comment-form button {
  min-height: 31px;
  padding: 5px 10px;
  font-size: 10px;
  font-weight: 750;
}

.reply-form button[type="submit"],
.comment-form button {
  background: var(--ink);
  color: var(--on-ink);
}

.comment-form {
  grid-template-columns: 1fr auto;
  align-items: end;
  margin-top: 17px;
}

.comment-form label {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}

.comment-form textarea {
  min-height: 70px;
}

.comment-form button {
  min-width: 78px;
  min-height: 70px;
}

.no-comments {
  margin: 13px 0 0;
  padding: 14px;
  background: var(--wash);
  color: var(--faint);
  font-size: 11px;
}

.owner-action {
  color: var(--muted) !important;
}

.owner-action.is-delete:hover {
  color: var(--danger-text) !important;
}

.attachment-uploader {
  display: grid;
  gap: 9px;
}

.attachment-uploader-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.attachment-uploader-head > div {
  display: flex;
  align-items: center;
  gap: 7px;
}

.attachment-uploader-head strong {
  color: var(--muted);
  font-size: 11px;
}

.attachment-uploader-head span {
  color: var(--faint);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
}

.attachment-uploader-head button {
  padding: 4px 0;
  color: var(--orange-dark-text);
  font-size: 10px;
  font-weight: 750;
}

.paste-zone {
  display: flex;
  min-height: 92px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 15px;
  border: 1px dashed var(--line-dark);
  background: var(--wash);
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  gap: 3px;
}

.paste-zone:hover {
  border-color: var(--orange);
  background: var(--orange-tint);
}

.paste-zone > span {
  color: var(--orange-dark-text);
  font-size: 20px;
  line-height: 1;
}

.paste-zone small {
  color: var(--faint);
  font-size: 9px;
  font-weight: 500;
}

.visually-hidden-file,
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

.draft-attachment-list {
  display: grid;
  max-height: 190px;
  overflow: auto;
  margin: 0;
  padding: 0;
  list-style: none;
  gap: 6px;
}

.draft-attachment-list li {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  padding: 7px 9px;
  border: 1px solid var(--line);
  gap: 9px;
}

.draft-attachment-list img,
.draft-attachment-list .file-tile {
  display: block;
  width: 42px;
  height: 38px;
  object-fit: cover;
}

.draft-attachment-list .file-tile {
  display: grid;
  min-width: 42px;
  place-items: center;
}

.draft-attachment-list li > button {
  padding: 4px 6px;
  color: var(--faint);
  font-size: 18px;
}

.confirm-modal {
  width: min(100%, 440px);
  padding: 33px 32px 29px;
}

.confirm-modal h2 {
  margin: 5px 0 0;
  font-size: 23px;
  letter-spacing: -0.045em;
}

.confirm-modal > p {
  margin: 13px 0 20px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.danger-button {
  border-color: var(--danger-fill);
  background: var(--danger-fill);
  color: var(--on-orange);
}

@media (max-width: 780px) {
  .post-follow-button,
  .my-post-label {
    margin-left: auto;
  }

  .author-copy {
    min-width: 0;
    max-width: calc(100% - 112px);
  }

  .author-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .post-image-grid a {
    min-height: 105px;
  }

  .post-actions {
    flex-wrap: wrap;
  }

  .post-actions .share-action {
    margin-left: auto;
  }

  .owner-action {
    order: 5;
  }

  .reply,
  .reply-form {
    margin-left: 20px;
  }

  .comment-form {
    grid-template-columns: 1fr;
  }

  .comment-form button {
    min-height: 38px;
  }

  .paste-zone {
    min-height: 78px;
    text-align: center;
  }

  .confirm-modal {
    padding: 29px 21px 25px;
  }
}

@media (max-width: 420px) {
  .post-follow-button {
    padding-right: 6px;
    padding-left: 6px;
  }

  .attachment-card {
    grid-template-columns: 34px minmax(0, 1fr) auto;
    padding: 9px;
  }
}
.community-ad-slot {
  min-width: 0;
}

.community-ad-slot--wide {
  margin: 28px 0 30px;
}

.community-ad-slot--compact {
  margin: 28px 0;
}
