/* 상세 — 네이버 블로그형 */
.blog-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 10;
}

.blog-top .back {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--text);
}

.blog-top .blog-name {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: inherit;
  text-decoration: none;
}

.blog-top .icons {
  display: flex;
  gap: 2px;
  color: var(--text-sub);
  font-size: 18px;
  align-items: center;
}

.blog-icon-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  border-radius: 8px;
  color: #444;
  font-size: 20px;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}

.blog-icon-btn:hover {
  background: #f3f5f4;
  color: var(--naver, #03c75a);
}

.profile-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 16px 8px;
}

.profile-row .avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: #e8e8e8;
}

.profile-row .avatar.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--naver);
  font-weight: 700;
  font-size: 18px;
}

.profile-row .info .name {
  font-size: 14px;
  font-weight: 600;
}

.profile-row .info .date {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.neighbor-btn {
  margin-left: auto;
  font-size: 12px;
  padding: 6px 12px;
  border: 1px solid var(--naver);
  color: var(--naver);
  border-radius: 4px;
  font-weight: 600;
}

.post-title {
  padding: 16px 16px 12px;
  font-family: var(--font-title);
  font-size: 26px;
  font-weight: normal;
  letter-spacing: -0.04em;
  line-height: 1.35;
  word-break: keep-all;
  color: #222;
}

.post-cover {
  margin: 0 16px 16px;
  border-radius: 8px;
  overflow: hidden;
  background: #f0f0f0;
}

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

.post-body {
  padding: 8px 16px 24px;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.9;
  word-break: keep-all;
  color: #222;
  background: #fff;
}

.post-body p {
  margin-bottom: 1em;
  font-size: 16px;
  line-height: 1.9;
  color: #222;
}

.post-body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 16px 0;
  border-radius: 4px;
}

/* SunEditor 정렬 클래스·data-align → 공개 페이지에서도 유지 */
.post-body img[data-align='center'],
.post-body [data-align='center'] > img,
.post-body .__se__float-center,
.post-body .__se__float-center img,
.post-body .se-image-container.__se__float-center,
.post-body .se-image-container.__se__float-center img,
.post-body p[style*='text-align: center'] img,
.post-body p[style*='text-align:center'] img,
.post-body div[style*='text-align: center'] img,
.post-body div[style*='text-align:center'] img,
.post-body figure[style*='text-align: center'] img,
.post-body figure[style*='text-align:center'] img {
  display: block !important;
  float: none !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.post-body [data-align='center'],
.post-body .__se__float-center,
.post-body .se-image-container.__se__float-center {
  text-align: center !important;
  float: none !important;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.post-body img[data-align='right'],
.post-body [data-align='right'] > img,
.post-body .__se__float-right,
.post-body .__se__float-right img {
  display: block !important;
  float: none !important;
  margin-left: auto !important;
  margin-right: 0 !important;
}

.post-body [data-align='right'],
.post-body .__se__float-right {
  text-align: right !important;
  float: none !important;
  display: block;
  margin-left: auto;
  margin-right: 0;
}

.post-body img[data-align='left'],
.post-body [data-align='left'] > img,
.post-body .__se__float-left,
.post-body .__se__float-left img {
  display: block !important;
  float: none !important;
  margin-left: 0 !important;
  margin-right: auto !important;
}

.post-body [data-align='left'],
.post-body .__se__float-left {
  text-align: left !important;
  float: none !important;
  display: block;
}

.post-body figure {
  margin: 16px 0;
  max-width: 100%;
}

.post-body .se-component,
.post-body .se-image-container {
  max-width: 100%;
}

.post-body strong {
  font-weight: 700;
}

.post-body a {
  color: #0068c3;
  text-decoration: underline;
}

.reaction {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.reaction .item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-sub);
}

.reaction .heart {
  color: var(--heart);
  font-size: 18px;
}

.reaction .count {
  font-weight: 600;
  color: var(--text);
}

.comment-section {
  padding: 16px 16px 100px;
}

.comment-compose {
  margin: 0 0 20px;
}

.comment-gate {
  padding: 20px 16px;
  border-radius: 12px;
  background: #f3fbf6;
  border: 1px solid #cfeedd;
  text-align: center;
}

.comment-gate-title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  color: #222;
}

.comment-gate-desc {
  margin: 0 0 14px;
  font-size: 13px;
  color: #666;
}

.comment-gate-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-comment-primary,
.btn-comment-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.btn-comment-primary {
  background: #03c75a;
  color: #fff;
}

.btn-comment-primary:disabled {
  opacity: 0.65;
  cursor: wait;
}

.btn-comment-ghost {
  background: #fff;
  color: #03c75a;
  border: 1px solid #03c75a;
}

.comment-form {
  padding: 14px;
  border-radius: 12px;
  border: 1px solid #e5e8eb;
  background: #fafbfc;
}

.comment-form-user {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 13px;
}

.comment-form-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #03c75a;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
}

.comment-form-hint {
  color: #888;
  font-weight: 400;
}

.comment-form textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #dde1e6;
  border-radius: 8px;
  padding: 12px;
  font-size: 15px;
  font-family: inherit;
  resize: vertical;
  min-height: 84px;
  line-height: 1.5;
  background: #fff;
}

.comment-form textarea:focus {
  outline: none;
  border-color: #03c75a;
  box-shadow: 0 0 0 3px rgba(3, 199, 90, 0.12);
}

.comment-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}

.comment-form-count {
  font-size: 12px;
  color: #999;
}

.comment-form-msg {
  margin: 10px 0 0;
  font-size: 13px;
}

.comment-form-msg.ok {
  color: #0b7a3b;
}

.comment-form-msg.err {
  color: #c62828;
}

.comment-section .head {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 16px;
}

.comment-section .head em {
  color: var(--naver);
  font-style: normal;
  margin-left: 4px;
}

.comment {
  display: flex;
  gap: 10px;
  padding: 14px 0;
  border-bottom: 1px solid #f0f0f0;
}

.comment .c-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ddd;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.comment .c-body {
  flex: 1;
  min-width: 0;
}

.comment .c-author {
  font-size: 13px;
  font-weight: 600;
}

.comment .c-date {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: 6px;
  font-weight: 400;
}

.comment .c-text {
  font-family: var(--font-body);
  font-size: 16px;
  margin-top: 4px;
  line-height: 1.9;
  word-break: keep-all;
  white-space: pre-wrap;
  color: #222;
}

.comment .c-like {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.comment .c-like span {
  color: var(--heart);
}

/* 네이버 블로그형 댓글 추천·비추천 */
.c-react {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
}

.c-react__item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 11px;
  border: 1px solid #e3e5e8;
  border-radius: 2px;
  background: #fff;
  font-size: 12px;
  font-weight: 400;
  line-height: 1;
  color: #666;
  box-sizing: border-box;
  user-select: none;
}

.c-react__item::before {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  background-size: 12px 12px;
  background-repeat: no-repeat;
  background-position: center;
}

.c-react__item em {
  font-style: normal;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #222;
  margin-left: 1px;
}

.c-react__item--up {
  color: #03c75a;
  border-color: #bfe8cf;
  background: #f4fbf7;
}

.c-react__item--up::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%2303c75a' d='M8 2.2l1.6 3.3 3.6.5-2.6 2.6.6 3.6L8 10.6 4.8 12.2l.6-3.6L2.8 6l3.6-.5L8 2.2z'/%3E%3C/svg%3E");
}

.c-react__item--up em {
  color: #03c75a;
}

.c-react__item--down {
  color: #8a8a8a;
  border-color: #e3e5e8;
  background: #fafafa;
}

.c-react__item--down::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23999999' d='M8 13.8l-1.6-3.3-3.6-.5 2.6-2.6-.6-3.6L8 5.4l3.2-1.6-.6 3.6 2.6 2.6-3.6.5L8 13.8z'/%3E%3C/svg%3E");
}

.c-react__item--down em {
  color: #666;
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 860px;
  display: flex;
  background: var(--white);
  border-top: 1px solid var(--line);
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
  z-index: 20;
}

.bottom-nav .bn-item,
.bottom-nav a {
  flex: 1;
  text-align: center;
  font-size: 11px;
  color: var(--text-sub);
  padding: 4px;
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.2;
}

.bottom-nav .bn-item .ico,
.bottom-nav a .ico {
  display: block;
  font-size: 20px;
  margin-bottom: 2px;
}

.bottom-nav .bn-item.active,
.bottom-nav a.active {
  color: var(--naver);
}

body.sheet-open {
  overflow: hidden;
}

.cafe-sheet-root {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.cafe-sheet-root[hidden] {
  display: none !important;
}

.cafe-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.cafe-sheet-panel {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: min(78vh, 560px);
  overflow: auto;
  background: #fff;
  border-radius: 18px 18px 0 0;
  padding: 8px 16px calc(20px + env(safe-area-inset-bottom));
  transform: translateY(110%);
  transition: transform 0.28s ease;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.12);
}

.cafe-sheet-root.open .cafe-sheet-backdrop {
  opacity: 1;
}

.cafe-sheet-root.open .cafe-sheet-panel {
  transform: translateY(0);
}

.cafe-sheet-grab {
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: #ddd;
  margin: 4px auto 10px;
}

.cafe-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.cafe-sheet-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
}

.cafe-sheet-close {
  border: none;
  background: transparent;
  font-size: 26px;
  line-height: 1;
  color: #888;
  cursor: pointer;
  padding: 0 4px;
}

.cafe-sheet-desc {
  margin: 0 0 12px;
  font-size: 13px;
  color: #777;
  line-height: 1.5;
}

.cafe-sheet-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cafe-sheet-link {
  display: block;
  padding: 14px 16px;
  border-radius: 12px;
  background: #f5f7f6;
  color: #222;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
}

.cafe-sheet-link:hover {
  background: #e8f8ef;
  color: #03c75a;
}

.cafe-sheet-link.muted {
  background: transparent;
  border: 1px dashed #ddd;
  color: #888;
  font-weight: 500;
  text-align: center;
}

.cafe-sheet-gate {
  padding: 8px 4px 12px;
  text-align: center;
}

.cafe-sheet-gate-title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
}

.cafe-sheet-gate-desc {
  margin: 0 0 16px;
  font-size: 13px;
  color: #666;
  line-height: 1.5;
}

.cafe-sheet-gate-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.cafe-sheet-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  padding: 11px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.cafe-sheet-btn.primary {
  background: #03c75a;
  color: #fff;
}

.cafe-sheet-btn.primary:disabled {
  opacity: 0.65;
  cursor: wait;
}

.cafe-sheet-btn.ghost {
  background: #fff;
  color: #03c75a;
  border: 1px solid #03c75a;
}

.cafe-sheet-target {
  margin: 0 0 10px;
  font-size: 13px;
  color: #555;
  line-height: 1.4;
}

.cafe-sheet-comment-form {
  padding: 4px 0 8px;
}

.cafe-sheet-comment-user {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 13px;
  color: #666;
}

.cafe-sheet-comment-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #03c75a;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.cafe-sheet-comment-form textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #dde1e6;
  border-radius: 10px;
  padding: 12px;
  font-size: 15px;
  font-family: inherit;
  resize: vertical;
  min-height: 110px;
  line-height: 1.5;
}

.cafe-sheet-comment-form textarea:focus {
  outline: none;
  border-color: #03c75a;
  box-shadow: 0 0 0 3px rgba(3, 199, 90, 0.12);
}

.cafe-sheet-comment-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}

.cafe-sheet-comment-count {
  font-size: 12px;
  color: #999;
}

.cafe-sheet-comment-msg {
  margin: 10px 0 0;
  font-size: 13px;
}

.cafe-sheet-comment-msg.ok {
  color: #0b7a3b;
}

.cafe-sheet-comment-msg.err {
  color: #c62828;
}

.cafe-sheet-pick-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cafe-sheet-pick {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #e8eaed;
  border-radius: 10px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

.cafe-sheet-pick:hover {
  border-color: #03c75a;
  background: #f3fbf6;
}

.cafe-sheet-pick-cat {
  font-size: 11px;
  color: #03c75a;
  font-weight: 700;
}

.cafe-sheet-pick-title {
  font-size: 14px;
  color: #222;
  font-weight: 600;
  line-height: 1.35;
}

.cafe-sheet-loading,
.cafe-sheet-empty {
  margin: 12px 0;
  font-size: 13px;
  color: #888;
  text-align: center;
}

.post-loading,
.post-error {
  padding: 80px 16px;
  text-align: center;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .post-title {
    font-size: 22px;
    padding: 14px 14px 10px;
  }

  .profile-row {
    flex-wrap: wrap;
    padding: 16px 14px 8px;
  }

  .neighbor-btn {
    margin-left: 0;
    width: 100%;
    text-align: center;
    margin-top: 4px;
  }

  .post-cover {
    margin: 0 14px 14px;
  }

  .post-cover img {
    max-height: 280px;
  }

  .post-body {
    padding-left: 14px;
    padding-right: 14px;
    font-size: 16px;
  }

  .comment-section {
    padding: 14px 14px calc(100px + env(safe-area-inset-bottom));
  }

  .comment .c-text {
    font-size: 15px;
    line-height: 1.75;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 480px) {
  .post-title {
    font-size: 20px;
  }

  .blog-top .blog-name {
    font-size: 14px;
  }
}
