/* 팜시크릿 — 약사들의 수다 (게시글 상세)
 * talk.css의 2단 레이아웃·페이지 헤더를 그대로 차용하고, 본문 typography만 확장
 */

  /* ═════════════════════════════════════════════
     상세 본문 컬럼 (우측 메인)
     ═════════════════════════════════════════════ */
     .tv-main {
      background: #fff;
      border: 1px solid #eef0f3;
      border-radius: 14px;
      padding: 32px 36px;
      box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
    }
    @media (max-width: 1023px) {
      .tv-main { padding: 24px 20px; }
    }
    @media (max-width: 640px) {
      .tv-main { padding: 20px 16px; border-radius: 10px; }
    }
    
    /* ─────────── 게시글 헤더 ─────────── */
    .tv-post-head { margin-bottom: 24px; }
    .tv-post-meta-top {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 6px 8px;
      font-size: 13px;
      color: #9ca3af;
      margin-bottom: 14px;
    }
    .tv-meta-sep { color: #d1d5db; }
    .tv-meta-region { color: #4b5563; font-weight: 500; }
    .tv-meta-time { font-family: var(--font-mono); color: #6b7280; }
    .tv-meta-views {
      margin-left: auto;
      font-family: var(--font-mono);
      font-size: 12px;
      color: #9ca3af;
    }
    
    .tv-post-title {
      font-family: var(--font-display);
      font-size: 26px;
      font-weight: 800;
      color: #111827;
      letter-spacing: -0.025em;
      line-height: 1.35;
      margin-bottom: 22px;
      word-break: keep-all;
    }
    @media (max-width: 640px) {
      .tv-post-title { font-size: 20px; line-height: 1.35; }
    }
    
    /* 작성자 라인 — 닉네임 + 동그라미 아바타 */
    .tv-author-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding-bottom: 20px;
      border-bottom: 1px solid #f1f3f5;
    }
    .tv-author {
      display: inline-flex;
      align-items: center;
      gap: 12px;
      min-width: 0;
    }
    
    /* 동그라미 아바타 — 닉네임 첫글자 + 해시 컬러
       JS가 background/color/text를 채움 */
    .ps-avatar {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 40px; height: 40px;
      border-radius: 9999px;
      font-family: var(--font-display);
      font-size: 16px;
      font-weight: 700;
      letter-spacing: -0.02em;
      background: #f3f4f6;
      color: #374151;
      flex-shrink: 0;
      user-select: none;
      overflow: hidden;
    }
    .ps-avatar img {
      width: 100%;
      height: 100%;
      display: block;
      border-radius: inherit;
      object-fit: cover;
    }
    
    .tv-author-info { min-width: 0; }
    .tv-author-line {
      display: inline-flex;
      align-items: center;
      gap: 8px;
    }
    .tv-author-nick {
      font-size: 15px;
      font-weight: 700;
      color: #111827;
      letter-spacing: -0.01em;
    }
    .tv-author-badge {
      display: inline-flex;
      align-items: center;
      gap: 3px;
      height: 20px;
      padding: 0 7px;
      background: rgba(14, 122, 62, 0.10);
      color: #0e7a3e;
      font-size: 11px;
      font-weight: 700;
      border-radius: 6px;
      letter-spacing: -0.01em;
    }
    .tv-author-sub {
      display: inline-flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 4px 6px;
      margin-top: 3px;
      font-size: 14px;
      color: #9ca3af;
    }
    
    .tv-author-tools {
      display: inline-flex;
      align-items: center;
      gap: 6px;
    }
    .tv-tool-btn {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 7px 11px;
      background: #fff;
      border: 1px solid #e5e7eb;
      border-radius: 9999px;
      color: #4b5563;
      font-size: 12.5px;
      cursor: pointer;
      transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
    }
    .tv-tool-btn:hover {
      background: #f9fafb;
      border-color: #d1d5db;
      color: #111827;
    }
    .tv-tool-more {
      position: relative;
    }
    .tv-tool-menu {
      position: absolute;
      top: calc(100% + 6px);
      right: 0;
      display: none;
      flex-direction: column;
      min-width: 140px;
      padding: 6px;
      background: #fff;
      border: 1px solid #eef0f3;
      border-radius: 10px;
      box-shadow: 0 8px 24px rgba(15, 23, 42, 0.10);
      z-index: 10;
    }
    .tv-tool-menu.is-open { display: flex; }
    .tv-tool-menu button {
      text-align: left;
      padding: 8px 10px;
      background: transparent;
      border: 0;
      border-radius: 6px;
      font-size: 13px;
      color: #374151;
      cursor: pointer;
    }
    .tv-tool-menu button:hover { background: #f3f4f6; color: #111827; }
    
    @media (max-width: 640px) {
      /* 텍스트 숨기고 아이콘만 — svg는 width/height 속성으로 크기 유지되므로 영향 없음 */
      .tv-author-tools .tv-tool-btn {
        font-size: 0;
        gap: 0;
        padding: 0;
        width: 34px;
        height: 34px;
        justify-content: center;
      }
      .tv-author-tools .tv-tool-btn > svg {
        width: 16px;
        height: 16px;
      }
    }
  
    /* ─────────── 본문 typography ─────────── */
    .tv-post-body {
      padding-top: 24px;
      padding-bottom: 8px;
      font-size: 16px;
      line-height: 1.8;
      color: #1f2937;
      word-break: keep-all;
    }
    .tv-post-body > * + * { margin-top: 18px; }
    .tv-post-body p { letter-spacing: -0.005em; }
    .tv-post-body strong { font-weight: 700; color: #111827; }
    .tv-post-body h2 {
      font-family: var(--font-display);
      font-size: 19px;
      font-weight: 800;
      letter-spacing: -0.02em;
      color: #111827;
      margin-top: 32px !important;
      margin-bottom: -2px;
    }
    .tv-post-body ul,
    .tv-post-body ol {
      padding-left: 22px;
      display: flex;
      flex-direction: column;
      gap: 6px;
    }
    .tv-post-body ul { list-style: disc; }
    .tv-post-body ol { list-style: decimal; }
    .tv-post-body li { padding-left: 4px; }
    .tv-post-body li::marker { color: var(--color-brand); }
    .tv-post-body a {
      color: var(--color-brand-dark);
      text-decoration: underline;
      text-underline-offset: 2px;
    }
    .tv-quote {
      margin-top: 22px;
      padding: 14px 18px;
      border-left: 3px solid var(--color-brand);
      background: rgba(254, 105, 27, 0.06);
      border-radius: 0 8px 8px 0;
      font-family: var(--font-display);
      font-size: 17px;
      font-weight: 600;
      letter-spacing: -0.015em;
      color: #5a2008;
      line-height: 1.55;
    }
    
    /* 태그 */
    .tv-tags {
      margin-top: 24px !important;
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }
    .tv-tag {
      display: inline-flex;
      align-items: center;
      height: 28px;
      padding: 0 11px;
      background: #f3f4f6;
      border-radius: 9999px;
      font-size: 12.5px;
      color: #4b5563;
      text-decoration: none;
      transition: background 0.12s ease, color 0.12s ease;
    }
    .tv-tag:hover {
      background: var(--color-brand);
      color: #fff;
    }
    
    /* ─────────── 액션 바 (공감/댓글/공유) ─────────── */
    .tv-actions {
      margin-top: 28px;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      padding: 20px 0;
      border-top: 1px solid #f1f3f5;
      border-bottom: 1px solid #f1f3f5;
    }
    .tv-action {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 10px 18px;
      background: #fff;
      border: 1px solid #e5e7eb;
      border-radius: 9999px;
      color: #4b5563;
      font-size: 13.5px;
      font-weight: 500;
      cursor: pointer;
      text-decoration: none;
      transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
    }
    .tv-action:hover {
      background: #f9fafb;
      border-color: #d1d5db;
      color: #111827;
      transform: translateY(-1px);
    }
    .tv-action-label { font-weight: 500; }
    .tv-action-count {
      font-family: var(--font-mono);
      font-weight: 700;
      color: #111827;
    }
    .tv-action--like.is-on {
      background: var(--color-brand);
      border-color: var(--color-brand);
      color: #fff;
    }
    .tv-action--like.is-on .tv-action-count { color: #fff; }
    .tv-action--like.is-on svg { fill: currentColor; }
    
    @media (max-width: 640px) {
      .tv-action { padding: 9px 14px; font-size: 12.5px; }
      .tv-action-label { display: none; }
    }
    
    /* ─────────── 이전/다음 글 ─────────── */
    .tv-prevnext {
      margin-top: 24px;
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
    }
    .tv-prevnext-item {
      display: flex;
      flex-direction: column;
      gap: 4px;
      padding: 14px 16px;
      background: #fafbfc;
      border: 1px solid #eef0f3;
      border-radius: 10px;
      text-decoration: none;
      transition: background 0.12s ease, border-color 0.12s ease;
    }
    .tv-prevnext-item:hover {
      background: #fff;
      border-color: #dbe2ea;
    }
    .tv-prevnext-item:nth-child(2) { text-align: right; }
    .tv-prevnext-label {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      font-size: 11.5px;
      font-weight: 600;
      color: #9ca3af;
      letter-spacing: 0.04em;
      text-transform: uppercase;
    }
    .tv-prevnext-item:nth-child(2) .tv-prevnext-label { justify-content: flex-end; }
    .tv-prevnext-title {
      font-size: 14px;
      font-weight: 600;
      color: #1f2937;
      line-height: 1.45;
      letter-spacing: -0.01em;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }
    .tv-prevnext-item:hover .tv-prevnext-title { color: var(--color-brand-dark); }
    
    @media (max-width: 640px) {
      .tv-prevnext { grid-template-columns: 1fr; }
      .tv-prevnext-item:nth-child(2) { text-align: left; }
      .tv-prevnext-item:nth-child(2) .tv-prevnext-label { justify-content: flex-start; }
    }
    
    /* ═════════════════════════════════════════════
       댓글 섹션
       ═════════════════════════════════════════════ */
    .tv-comments {
      margin-top: 36px;
      padding-top: 28px;
      border-top: 1px solid #eef0f3;
    }
    .tv-comments-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 18px;
    }
    .tv-comments-title {
      font-family: var(--font-display);
      font-size: 19px;
      font-weight: 800;
      color: #111827;
      letter-spacing: -0.015em;
    }
    .tv-comments-count {
      color: var(--color-brand);
      font-family: var(--font-mono);
      font-weight: 700;
      margin-left: 4px;
    }
    .tv-comments-sort {
      display: inline-flex;
      background: #f3f4f6;
      border-radius: 9999px;
      padding: 3px;
    }
    .tv-cs-btn {
      padding: 5px 12px;
      background: transparent;
      border: 0;
      border-radius: 9999px;
      font-size: 12px;
      color: #6b7280;
      cursor: pointer;
      font-weight: 500;
    }
    .tv-cs-btn:hover { color: #111827; }
    .tv-cs-btn.is-active {
      background: #fff;
      color: #111827;
      font-weight: 700;
      box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    }
    
    /* 댓글 작성 폼 */
    .tv-comment-form {
      display: grid;
      grid-template-columns: 40px 1fr;
      grid-template-rows: auto auto;
      gap: 10px 12px;
      padding: 16px;
      background: #fafbfc;
      border: 1px solid #eef0f3;
      border-radius: 12px;
      margin-bottom: 20px;
    }
    .tv-comment-form-avatar { grid-row: 1 / span 2; }
    .tv-comment-form textarea {
      grid-column: 2;
      width: 100%;
      border: 0;
      outline: none;
      background: transparent;
      resize: vertical;
      font-family: inherit;
      font-size: 14px;
      line-height: 1.6;
      color: #1f2937;
      min-height: 64px;
    }
    .tv-comment-form textarea::placeholder { color: #9ca3af; }
    .tv-comment-form-bar {
      grid-column: 2;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      flex-wrap: wrap;
    }
    .tv-comment-secret {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-size: 12.5px;
      color: #6b7280;
      cursor: pointer;
      user-select: none;
    }
    .tv-comment-secret input { accent-color: var(--color-brand); }
    .tv-comment-submit {
      padding: 8px 22px;
      background: var(--color-brand);
      color: #fff;
      border: 0;
      border-radius: 9999px;
      font-size: 13.5px;
      font-weight: 700;
      cursor: pointer;
      transition: background 0.15s ease;
    }
    .tv-comment-submit:hover { background: var(--color-brand-dark); }
    
    /* 비회원/일반회원 잠금 카드 */
    .tv-comment-locked {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 18px 20px;
      background: #eff6ff;
      border: 1px solid #bfdbfe;
      border-radius: 12px;
      margin-bottom: 20px;
      flex-wrap: wrap;
    }
    .tv-comment-locked--amber {
      background: #fff7ed;
      border-color: #fed7aa;
    }
    .tv-comment-locked-text {
      display: flex;
      flex-direction: column;
      gap: 2px;
      min-width: 0;
    }
    .tv-comment-locked-text strong {
      font-size: 14px;
      font-weight: 700;
      color: #1e3a8a;
      letter-spacing: -0.01em;
    }
    .tv-comment-locked--amber .tv-comment-locked-text strong { color: #9a3412; }
    .tv-comment-locked-text span {
      font-size: 12.5px;
      color: #475569;
    }
    .tv-comment-locked--amber .tv-comment-locked-text span { color: #9a4a18; }
    .tv-comment-locked-btn {
      flex-shrink: 0;
      padding: 9px 18px;
      background: var(--color-brand);
      color: #fff;
      border-radius: 9999px;
      font-size: 13px;
      font-weight: 700;
      text-decoration: none;
      transition: background 0.15s ease;
    }
    .tv-comment-locked-btn:hover { background: var(--color-brand-dark); }
    
    /* 댓글 리스트 */
    .tv-comment-list {
      list-style: none;
      padding: 0;
      margin: 0;
      display: flex;
      flex-direction: column;
    }
    .tv-cmt {
      display: grid;
      grid-template-columns: 40px 1fr;
      gap: 12px;
      padding: 18px 0;
      border-top: 1px solid #f1f3f5;
    }
    .tv-cmt:first-child { border-top: 0; padding-top: 4px; }
    .tv-cmt--reply {
      grid-template-columns: 32px 1fr;
      padding: 14px 0 4px 12px;
      border-top: 0;
      margin-top: 12px;
      background: #fafbfc;
      border-radius: 10px;
      padding: 14px 14px 12px;
    }
    .tv-cmt--reply .tv-cmt-avatar {
      width: 32px; height: 32px;
      font-size: 13px;
    }
    .tv-cmt-body { min-width: 0; }
    .tv-cmt-head {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 4px 6px;
      margin-bottom: 6px;
      font-size: 12px;
      color: #9ca3af;
    }
    .tv-cmt-nick {
      font-size: 13.5px;
      font-weight: 700;
      color: #111827;
      letter-spacing: -0.01em;
    }
    .tv-cmt-badge {
      display: inline-flex;
      align-items: center;
      gap: 2px;
      height: 18px;
      padding: 0 6px;
      background: rgba(14, 122, 62, 0.10);
      color: #0e7a3e;
      font-size: 10.5px;
      font-weight: 700;
      border-radius: 4px;
      letter-spacing: -0.01em;
    }
    .tv-author-mark {
      display: inline-flex;
      align-items: center;
      height: 18px;
      padding: 0 6px;
      background: #111827;
      color: #fff;
      font-size: 10.5px;
      font-weight: 700;
      border-radius: 4px;
    }
    .tv-cmt-time {
      font-family: var(--font-mono);
      color: #9ca3af;
    }
    
    .tv-cmt-content {
      font-size: 14.5px;
      line-height: 1.65;
      color: #1f2937;
      letter-spacing: -0.005em;
      word-break: keep-all;
    }
    .tv-cmt-content strong {
      font-weight: 700;
      color: #111827;
      background: linear-gradient(transparent 62%, rgba(254, 105, 27, 0.18) 62%);
      padding: 0 2px;
    }
    
    .tv-cmt-actions {
      margin-top: 8px;
      display: inline-flex;
      align-items: center;
      gap: 4px;
    }
    .tv-cmt-btn {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 5px 9px;
      background: transparent;
      border: 0;
      border-radius: 6px;
      font-size: 12px;
      color: #6b7280;
      cursor: pointer;
      font-weight: 500;
    }
    .tv-cmt-btn:hover { background: #f3f4f6; color: #111827; }
    .tv-cmt-btn--mute { color: #9ca3af; }
    .tv-cmt-btn--mute:hover { color: #ef4444; }
    
    /* 대댓글 리스트 */
    .tv-reply-list {
      list-style: none;
      padding: 0;
      margin: 12px 0 0;
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    
    /* 댓글 더보기 */
    .tv-comments-more {
      width: 100%;
      margin-top: 16px;
      padding: 14px;
      background: #fff;
      border: 1px solid #e5e7eb;
      border-radius: 10px;
      color: #4b5563;
      font-size: 13.5px;
      font-weight: 600;
      cursor: pointer;
      transition: background 0.12s ease, border-color 0.12s ease;
    }
    .tv-comments-more:hover {
      background: #fafbfc;
      border-color: #d1d5db;
    }
    .tv-comments-more[disabled] {
      background: #f9fafb;
      color: #9ca3af;
      cursor: default;
    }
  
    /* ═════════════════════════════════════════════
       모바일 — 사이드바 CTA 카드 숨김 (사이드바 자체는 카테고리 칩으로 유지)
       ═════════════════════════════════════════════ */
    @media (max-width: 1023px) {
      .tk-aside .tk-cta { display: none; }
    }
    /* FAB이 댓글 더보기 버튼을 가리지 않도록 모바일 하단 여백 보강 */
    @media (max-width: 767px) {
      .tv-main {padding-bottom: 28px;padding: 0;border: 0;border-radius: 0;}
      main {padding-bottom: 0;}
    }
    