
.reward-banner {
  margin: 16px 0 12px;
  padding: 10px 14px;
  background: #fafbfd;
  border: 1px solid #e4e8f0;
  border-radius: 8px;
  font-size: 12px;
  color: #555;
  line-height: 1.55;
}
.rb-head {
  display: flex; align-items: center; gap: 5px;
  font-size: 12.5px; font-weight: 700; color: #1a73e8;
  margin-bottom: 6px;
}
.rb-head-icon { font-size: 13px; }
.rb-row {
  display: flex; align-items: flex-start; gap: 6px;
  flex-wrap: wrap;
  padding: 2px 0;
}
.rb-tag {
  flex-shrink: 0;
  font-size: 11px; font-weight: 700;
  padding: 2px 7px; border-radius: 10px;
  color: #fff;
  letter-spacing: -0.2px;
}
.rb-tag-pt { background: linear-gradient(135deg,#f59e0b,#d97706); }
.rb-tag-xp { background: linear-gradient(135deg,#3b82f6,#1d4ed8); }
.rb-tag-lim { background: linear-gradient(135deg,#ef4444,#dc2626); }


.reward-banner.limit-banner {
  background: #fff7f7;
  border-color: #fecaca;
  margin-bottom: 8px;
}
.reward-banner.limit-banner .rb-head { color: #dc2626; }
.rb-items {
  flex: 1; min-width: 0;
  font-size: 11.5px; color: #666;
  display: inline-flex; flex-wrap: wrap; gap: 0;
  align-items: center;
}
.rb-item { white-space: nowrap; }
.rb-item b { color: #222; font-weight: 700; padding: 0 1px; }
.rb-sep { color: #c5cad3; padding: 0 5px; user-select: none; }
.rb-note {
  margin-top: 7px;
  padding-top: 6px;
  border-top: 1px dashed #e4e8f0;
  font-size: 10.5px;
  color: #999;
  text-align: center;
  letter-spacing: -0.1px;
}
@media (max-width: 768px) {
  .reward-banner { padding: 9px 12px; font-size: 11.5px; }
  .rb-items { font-size: 11px; }
  .rb-sep { padding: 0 4px; }
}


.cmf-toolbar {
  display: flex; align-items: center; gap: 2px;
  padding: 4px 6px; background: #f9f9f9;
  border: 1px solid #e8e8e8; border-bottom: none;
  border-radius: 6px 6px 0 0;
}
.cmf-toolbar.mini { border-radius: 6px 6px 0 0; padding: 3px 6px; }
.cmf-tool-btn {
  background: none; border: 1px solid transparent;
  border-radius: 4px; padding: 3px 7px;
  font-size: 13px; color: #555; cursor: pointer;
  line-height: 1.4; transition: background .12s;
}
.cmf-tool-btn:hover { background: #ede7f6; border-color: #ce93d8; color: #6a1b9a; }
.cmf-sep { color: #ddd; padding: 0 3px; font-size: 14px; }

.emoji-picker {
  flex-wrap: wrap; gap: 2px;
  background: #fff; border: 1px solid #ddd; border-radius: 8px;
  padding: 8px; max-height: 180px; overflow-y: auto;
  box-shadow: 0 4px 12px rgba(0,0,0,.12); position: relative; z-index: 10;
  margin-bottom: 4px;
}
.emoji-btn {
  font-size: 20px; cursor: pointer; padding: 3px 4px;
  border-radius: 4px; line-height: 1; transition: background .1s;
}
.emoji-btn:hover { background: #f5f0ff; }

.cmf-img-preview {
  padding: 6px; background: #fafafa; border: 1px solid #eee;
  border-bottom: none;
}


.comment-form .cmf-toolbar + .emoji-picker + .cmf-img-preview + textarea,
.comment-form .cmf-toolbar + .emoji-picker + textarea,
.comment-form .cmf-toolbar + .cmf-img-preview + textarea,
.comment-form .cmf-toolbar + textarea,
.reply-form-inner .cmf-toolbar ~ textarea {
  border-top-left-radius: 0; border-top-right-radius: 0;
}

/* contenteditable 댓글/답글 입력란 */
.cmf-editable {
  min-height: 80px;
  padding: 10px 12px;
  border: 1px solid #d9dde5;
  border-radius: 0 0 8px 8px;
  border-top: none;
  font-size: 14px;
  line-height: 1.55;
  outline: none;
  background: #fff;
  font-family: 'Noto Sans KR', 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
  word-break: break-word;
  overflow-wrap: anywhere;
  max-height: 280px;
  overflow-y: auto;
}
.cmf-editable:focus { border-color: #5b8def; box-shadow: 0 0 0 3px rgba(91,141,239,0.12); }
.cmf-editable:empty::before {
  content: attr(data-placeholder);
  color: #b0b6c2;
  pointer-events: none;
}
.cmf-editable img.vn-emoji { width: 48px; height: 48px; vertical-align: middle; display: inline-block; margin: 0 2px; }
.cmf-editable img.fl-emoji { height: 1.2em; width: 1.2em; vertical-align: -0.2em; display: inline-block; }
.cmf-editable-reply { min-height: 60px; }

/* 댓글 표시 측 베트남 이모티콘 */
.comment-text img.vn-emoji { width: 48px; height: 48px; vertical-align: middle; display: inline-block; margin: 0 2px; }


.post-page-wrap {
  max-width: 860px;
  margin: 0 auto;
}

.post-loading {
  text-align: center;
  padding: 60px;
  color: #aaa;
}
.post-loading p { margin-top: 12px; font-size: 13px; }

.post-error {
  text-align: center;
  padding: 40px;
  color: #aaa;
  font-size: 14px;
}


.post-card {
  background: #fff;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  margin-bottom: 12px;
  overflow: hidden;
}

.post-head {
  padding: 16px 20px 12px;
  border-bottom: 1px solid #f0f0f0;
}

.post-board-badge-wrap { margin-bottom: 8px; }
.post-board-badge {
  display: inline-block;
  padding: 2px 9px;
  background: #e8f0fe;
  color: #1a73e8;
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 600;
}

.post-title-main {
  font-size: 18px;
  font-weight: 700;
  color: #222;
  line-height: 1.45;
  margin-bottom: 10px;
  word-break: break-word;
}

.post-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.post-meta-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.pm-author { font-size: 13px; font-weight: 600; color: #444; }
.pm-dot { color: #ddd; }
.pm-time { font-size: 12px; color: #aaa; }

.post-meta-right {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #aaa;
}
.post-meta-right i { margin-right: 2px; }
.post-meta-right b { color: #e53935; }


.post-body {
  padding: 20px;
  font-size: 14px;
  line-height: 1.8;
  color: #333;
  min-height: 80px;
  word-break: break-word;
  overflow-wrap: break-word;
}


.post-body p { margin: 0 0 0.8em; }
.post-body h1, .post-body h2, .post-body h3, .post-body h4 { font-weight: 700; margin: 1.2em 0 0.5em; line-height: 1.35; }
.post-body h1 { font-size: 1.5em; }
.post-body h2 { font-size: 1.3em; }
.post-body h3 { font-size: 1.1em; }
.post-body ul, .post-body ol { padding-left: 1.6em; margin-bottom: 0.8em; }
.post-body li { margin-bottom: 0.2em; }
.post-body blockquote { border-left: 3px solid #1a73e8; margin: 0.8em 0; padding: 8px 14px; background: #f0f7ff; color: #555; border-radius: 0 4px 4px 0; }
.post-body pre { background: #1e2130; color: #e0e0e0; padding: 14px 16px; border-radius: 6px; overflow-x: auto; font-size: 13px; margin-bottom: 0.8em; }
.post-body code { background: #f0f0f0; padding: 2px 5px; border-radius: 3px; font-size: 12.5px; font-family: monospace; }
.post-body pre code { background: none; padding: 0; color: inherit; }
.post-body a { color: #1a73e8; text-decoration: underline; }
.post-body img { max-width: 100%; border-radius: 6px; margin: 4px 0; }
.post-body table { border-collapse: collapse; width: 100%; margin-bottom: 0.8em; }
.post-body th, .post-body td { border: 1px solid #ddd; padding: 6px 10px; font-size: 13px; }
.post-body th { background: #f8f9fa; font-weight: 700; }
.post-body hr { border: none; border-top: 1px solid #e0e0e0; margin: 1.2em 0; }


.post-images {
  padding: 0 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.post-images img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  border: 1px solid #eee;
  cursor: zoom-in;
  
  min-height: 80px;
  background: #f5f5f5;
}
.post-body img {
  max-width: 100%;
  height: auto;
  display: block;
  min-height: 40px;
  background: #f5f5f5;
}
/* 정렬 버튼(text-align)이 블록 이미지에도 적용되도록 — display:block이라 margin으로 반영 */
.post-body [style*="text-align: center"] img,
.post-body [style*="text-align:center"] img { margin-left: auto; margin-right: auto; }
.post-body [style*="text-align: right"] img,
.post-body [style*="text-align:right"] img { margin-left: auto; margin-right: 0; }


.post-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid #f0f0f0;
  background: #fafafa;
}

.like-btn, .edit-btn, .del-btn, .list-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  border: 1.5px solid;
  cursor: pointer;
  transition: all .15s;
}
.like-btn {
  background: #fff;
  color: #e53935;
  border-color: #e53935;
}
.like-btn:hover, .like-btn.active {
  background: #e53935;
  color: #fff;
}
.edit-btn {
  background: #fff;
  color: #1a73e8;
  border-color: #1a73e8;
}
.edit-btn:hover { background: #1a73e8; color: #fff; }
.del-btn {
  background: #fff;
  color: #888;
  border-color: #ddd;
}
.del-btn:hover { background: #f5f5f5; color: #555; }
.list-btn {
  background: #fff;
  color: #555;
  border-color: #ddd;
}
.list-btn:hover { background: #f5f5f5; }


.post-nav {
  background: #fff;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  margin-bottom: 12px;
  overflow: hidden;
}

#postNavArea.nav-loading {
  min-height: 50px;
  margin-bottom: 12px;
  border-radius: 8px;
  background: linear-gradient(90deg, #f5f5f5 0%, #fafafa 50%, #f5f5f5 100%);
  background-size: 200% 100%;
  animation: nav-shimmer 1.4s ease-in-out infinite;
}
@keyframes nav-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
.pn-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid #f5f5f5;
  color: #444;
  font-size: 13px;
  transition: background .12s;
}
.pn-item:last-child { border-bottom: none; }
.pn-item:hover { background: #f8faff; }
.pn-label {
  font-size: 11px;
  color: #aaa;
  flex-shrink: 0;
  width: 34px;
}
.pn-item i { color: #ccc; font-size: 11px; flex-shrink: 0; }
.pn-title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}


.comment-card {
  background: #fff;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  overflow: hidden;
}

.comment-header {
  padding: 11px 16px 10px;
  font-size: 13.5px;
  font-weight: 700;
  color: #333;
  background: #f8f9fa;
  border-bottom: 2px solid #1a73e8;
  display: flex;
  align-items: center;
  gap: 5px;
}
.comment-header i { color: #1a73e8; }

.comment-form {
  padding: 12px 16px;
  border-bottom: 1px solid #f0f0f0;
  background: #fafbfc;
}
.comment-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid #e0e0e0;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
  outline: none;
  transition: border-color .15s;
  background: #fff;
}
.comment-form textarea:focus { border-color: #1a73e8; }
.comment-form textarea:disabled { background: #f5f5f5; color: #aaa; cursor: not-allowed; }

.comment-form-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

.comment-submit {
  padding: 7px 18px;
  background: #1a73e8;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.comment-submit:hover { background: #1557b0; }

#commentList { padding: 0; }

.comment-item {
  padding: 12px 16px;
  border-bottom: 1px solid #f5f5f5;
}
.comment-item:last-child { border-bottom: none; }
.comment-item.cmt-hl { animation: cmtHlPulse 3.5s ease-out; }
@keyframes cmtHlPulse {
  0%   { background: #fff8d6; }
  60%  { background: #fff8d6; }
  100% { background: transparent; }
}

.comment-top {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  margin-bottom: 6px;
  gap: 4px;
}

.comment-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 11.5px;
}
.comment-edited { font-size: 10.5px; color: #bbb; }

.comment-main-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.comment-author-info {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
  flex: 1;
}
.comment-author {
  font-size: 13px;
  font-weight: 600;
  color: #444;
}
.comment-time {
  font-size: 11px;
  color: #bbb;
}
.comment-del {
  background: none;
  border: none;
  color: #ccc;
  cursor: pointer;
  font-size: 12px;
  padding: 2px 5px;
  border-radius: 3px;
  transition: color .12s, background .12s;
}
.comment-del:hover { color: #e53935; background: #fce8e6; }
.comment-text {
  font-size: 13.5px;
  color: #333;
  line-height: 1.7;
  word-break: break-word;
}


.comment-actions-right {
  display: flex;
  align-items: center;
  gap: 4px;
}
.reply-btn {
  background: none;
  border: 1px solid #ddd;
  color: #888;
  cursor: pointer;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  transition: all .12s;
}
.reply-btn:hover { color: #1a73e8; border-color: #1a73e8; background: #e8f0fe; }

.reply-item {
  padding-left: 32px;
  background: #f9fbff;
  border-left: 3px solid #c5d9f7;
  border-bottom: 1px solid #eef2fb;
  position: relative;
}
.reply-item-2 {
  padding-left: 52px;
  background: #f4f8ff;
  border-left: 3px solid #a8c4ef;
  border-bottom: 1px solid #e6edf9;
  position: relative;
}
.reply-item-3 {
  padding-left: 68px;
  background: #eff4ff;
  border-left: 3px solid #8fb5eb;
  border-bottom: 1px solid #dce7f7;
  position: relative;
}
.reply-arrow {
  color: #aac4f0;
  font-size: 13px;
  margin-right: 4px;
}
.reply-to-nick {
  font-size: 11.5px;
  color: #1a73e8;
  font-weight: 600;
  background: #e8f0fe;
  padding: 1px 6px;
  border-radius: 8px;
}
.reply-form-area {
  margin-top: 10px;
  padding: 10px 0 4px;
}
.reply-form-inner {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.reply-form-inner textarea {
  width: 100%;
  flex: none;
  padding: 12px 14px;
  border: 1.5px solid #c5d9f7;
  border-top: none;
  border-radius: 0 0 6px 6px;
  font-size: 13.5px;
  font-family: inherit;
  resize: vertical;
  outline: none;
  background: #fff;
  min-height: 100px;
  line-height: 1.5;
  transition: border-color .15s, box-shadow .15s;
}
.reply-form-inner textarea:focus {
  border-color: #1a73e8;
  box-shadow: 0 0 0 3px rgba(26,115,232,.12);
}
.reply-form-inner .cmf-toolbar.mini {
  border: 1.5px solid #c5d9f7;
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  background: #f4f8ff;
}
.reply-submit {
  align-self: flex-end;
  margin-top: 10px;
  padding: 8px 22px;
  background: #1a73e8;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, transform .08s;
}
.reply-submit:hover { background: #1557b0; }
.reply-submit:active { transform: scale(.97); }
.reply-submit:disabled { background: #c6d9f4; cursor: not-allowed; }
.reply-form-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 11.5px;
  color: #888;
}
.reply-form-meta .reply-char-count { font-variant-numeric: tabular-nums; }
.reply-form-meta .reply-char-count.warn { color: #e0a000; }
.reply-form-meta .reply-char-count.over { color: #d93025; font-weight: 600; }
.reply-form-meta .reply-hint { font-size: 11px; color: #aaa; }

@media (max-width: 600px) {
  .reply-form-inner textarea { min-height: 110px; font-size: 14px; padding: 12px 14px; }
  .reply-submit { padding: 10px 24px; font-size: 14px; width: 100%; align-self: stretch; }
  .reply-form-meta { font-size: 12px; }
  .reply-form-meta .reply-hint { display: none; }
}


.comment-like-row { margin-top: 4px; }
.comment-like-btn {
  background: none; border: 1px solid #e0e0e0; border-radius: 12px;
  color: #888; font-size: 11.5px; padding: 2px 10px; cursor: pointer;
  transition: all .12s; display: inline-flex; align-items: center; gap: 4px;
}
.comment-like-btn:hover { border-color: #1a73e8; color: #1a73e8; }
.comment-like-btn.active { background: #e8f0fe; border-color: #1a73e8; color: #1a73e8; }


@media (max-width: 640px) {
  .post-title-main { font-size: 16px; }
  .post-head { padding: 12px 14px 10px; }
  .post-body { padding: 14px; font-size: 13.5px; }
  .post-images { padding: 0 14px 12px; }
  .post-actions { padding: 10px 14px; gap: 6px; }
  .like-btn, .edit-btn, .del-btn, .list-btn { padding: 6px 12px; font-size: 12px; }
}


.ocr-translate-box {
  margin: 14px 20px 8px; padding: 14px 16px;
  background: linear-gradient(135deg, #f0f9ff, #fef3c7);
  border: 1px solid #fcd34d;
  border-left: 4px solid #f59e0b;
  border-radius: 10px;
}
.ocr-translate-head {
  font-size: 13px; font-weight: 700; color: #92400e;
  display: flex; align-items: center; gap: 6px; margin-bottom: 8px;
}
.ocr-translate-head .ocr-translate-tag {
  font-size: 10.5px; font-weight: 600; color: #f59e0b;
  background: #fffbeb; padding: 2px 7px; border-radius: 10px; margin-left: 4px;
}
.ocr-translate-body {
  font-size: 14px; color: #1f2937; line-height: 1.55;
  white-space: pre-wrap; word-break: break-word;
}
.ocr-translate-orig {
  margin-top: 8px; font-size: 12px; color: #6b7280;
}
.ocr-translate-orig summary {
  cursor: pointer; padding: 4px 0; user-select: none; outline: none;
}
.ocr-translate-orig-body {
  margin-top: 4px; padding: 8px; background: #fff; border-radius: 6px;
  font-size: 12px; color: #4b5563; white-space: pre-wrap;
}
@media (max-width: 768px) {
  .ocr-translate-box { margin: 12px 14px 8px; padding: 12px 14px; }
}
