/* ============================================================
   05-board-write.css
   공지사항 게시판 + 댓글 + 글쓰기 폼 + Quill Editor 보정
   ============================================================ */

  /* =============================================
     공지사항 게시판 스타일 (notice.html에서 통합)
  ============================================= */  /* ============================================
     공지사항 페이지 - 카드 공통
  ============================================ */
  .notice-card {
    background: var(--ios-card);
    border-radius: 14px;
    padding: 24px;
  }

  .notice-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
  }

  .notice-page-title {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.4px;
    color: var(--ios-text);
  }

  /* 글쓰기 제목에 표시되는 게시판 이름 배지 */
  .write-title-board {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    color: white;
    background: var(--ios-blue);
    padding: 4px 10px;
    border-radius: 8px;
    vertical-align: middle;
    margin-right: 8px;
    letter-spacing: -0.2px;
  }

  /* 글쓰기 모달 닫기 버튼 (모달 모드에서만 표시) */
  .write-modal-close {
    display: none;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    font-size: 24px;
    color: var(--ios-text-secondary);
    cursor: pointer;
    border-radius: 8px;
    line-height: 1;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin-left: auto;
  }
  .write-modal-close:hover {
    background: var(--ios-bg);
    color: var(--ios-text);
  }
  /* 모달 모드일 때만 닫기 버튼 표시 */
  #centerBoard.board-as-modal .write-modal-close {
    display: flex;
  }

  /* 글쓰기/수정 폼이 표준 모달(#boardWriteModal)로 들어간 뒤 — 폼 자체 헤더(제목 + × )는
     모달 헤더와 중복이라 숨긴다. 폼 안 #writeTitle 갱신 코드는 그대로 둬도 무해. */
  #boardWriteModal .notice-page-header { display: none; }
  /* 본문이 길면 .modal-body 가 넘쳐 푸터를 모달 밖으로 밀어낸다(overflow:visible + flex 기본값).
     flex 자식이 내용보다 작아질 수 있게 min-height:0 을 주고 본문만 스크롤시킨다. */
  #boardWriteModal .modal-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
  #boardWriteModal .modal-footer { flex: 0 0 auto; }

  /* 푸터로 옮긴 취소/저장 — 폼 안에 있을 때의 상단 여백·구분선 제거 */
  #boardWriteModal .modal-footer .notice-detail-footer {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; margin: 0; padding: 0; border: none;
  }
  #boardWriteModal .notice-card {
    border: none; border-radius: 0; box-shadow: none; padding: 0; background: transparent;
  }

  /* 글쓰기 폼: 에디터 초기화 중에는 폼 영역 숨김 (깜빡임 방지) */
  #viewWrite .write-form {
    opacity: 0;
    transition: opacity 0.2s ease;
  }
  #viewWrite.editor-ready .write-form {
    opacity: 1;
  }

  .notice-actions {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  /* 검색 */
  .notice-search {
    position: relative;
    display: flex;
    align-items: center;
  }

  .notice-search svg {
    position: absolute;
    left: 12px;
    width: 16px;
    height: 16px;
    color: var(--ios-text-secondary);
    pointer-events: none;
  }

  .notice-search input {
    width: 240px;
    padding: 8px 12px 8px 34px;
    border: 1px solid var(--ios-separator);
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    color: var(--ios-text);
    background: var(--ios-bg);
    transition: border-color 0.15s, background 0.15s;
  }

  .notice-search input:focus {
    outline: none;
    border-color: var(--ios-blue);
    background: var(--ios-card);
  }

  /* 버튼 */
  .btn-primary {
    background: var(--ios-blue);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: opacity 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
  }

  .btn-primary:hover { opacity: 0.85; }
  .btn-primary svg { width: 14px; height: 14px; }

  .btn-secondary {
    background: var(--ios-fill);
    color: var(--ios-text);
    border: none;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s;
  }

  .btn-secondary:hover { background: var(--ios-text-tertiary); }

  .btn-danger {
    background: rgba(255, 59, 48, 0.1);
    color: var(--ios-red);
    border: none;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s;
  }

  .btn-danger:hover { background: rgba(255, 59, 48, 0.2); }

  /* 목록 테이블 */
  .notice-table-wrap {
    border-top: 1px solid var(--ios-separator-thin);
  }

  .notice-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
  }

  .notice-table th {
    padding: 12px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--ios-text-secondary);
    border-bottom: 0.5px solid var(--ios-separator);
    background: var(--ios-bg);
  }

  .notice-table td {
    padding: 12px;
    border-bottom: 0.5px solid var(--ios-separator-thin);
    color: var(--ios-text);
    vertical-align: middle;
  }

  .notice-table tbody tr {
    cursor: pointer;
    transition: background 0.1s;
  }

  .notice-table tbody tr:hover { background: var(--ios-bg); }
  .notice-table tbody tr.pinned { background: rgba(255, 59, 48, 0.04); }
  .notice-table tbody tr.pinned:hover { background: rgba(255, 59, 48, 0.08); }

  .notice-table .col-no { color: var(--ios-text-secondary); font-size: 13px; }
  .notice-table .col-title { font-weight: 500; }

  /* 게시판 목록(center.html)만 — 제목 컬럼이 남는 폭을 먹고 넘칠 때만 말줄임.
     다른 컬럼은 th width 로 고정, 제목만 가변 → table-layout:fixed 로 안정. hover 시 title 로 전체 표시.
     (notice-table 은 결재함·개인업무·카탈로그와 공유하므로 board-list 로 스코프.) */
  .board-list { table-layout: fixed; }
  /* 제목 텍스트만 말줄임(...)하고 댓글수·첨부·NEW 는 항상 보이도록 flex 로 분리.
     이전엔 제목+메타를 한 셀에 담아 말줄임이 뒤 메타까지 잘라먹었음(반응형에서 특히). */
  .board-list .col-title { overflow: hidden; }
  .board-list .col-title .col-title-inner {
    display: flex;
    align-items: center;
    gap: 3px;
    min-width: 0;
  }
  .board-list .col-title .col-title-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
  }
  .board-list .col-title .comment { color: var(--ios-orange); font-weight: 600; flex-shrink: 0; }
  .board-list .col-title .attach { font-size: 12px; flex-shrink: 0; }
  .board-list .col-title .new-badge { flex-shrink: 0; }
  .notice-table .col-author, .notice-table .col-date, .notice-table .col-views {
    color: var(--ios-text-secondary);
    font-size: 13px;
  }

  .notice-table .badge-pinned-row {
    display: inline-block;
    padding: 2px 7px;
    background: var(--ios-red);
    color: white;
    font-size: 10px;
    font-weight: 700;
    border-radius: 4px;
  }

  /* NEW 배지 (테이블/게시판 페이지에서 사용) */
  .new-badge {
    display: inline-block;
    margin-left: 4px;
    padding: 1px 5px;
    background: rgba(255, 59, 48, 0.12);
    color: var(--ios-red);
    font-size: 9px;
    font-weight: 700;
    border-radius: 4px;
    vertical-align: middle;
    letter-spacing: 0.3px;
    line-height: 1.4;
    border: 1px solid rgba(255, 59, 48, 0.25);
  }

  .notice-empty {
    text-align: center;
    padding: 80px 20px;
    color: var(--ios-text-secondary);
  }

  /* 페이지네이션 */
  .notice-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    padding: 20px 0 4px;
  }

  .page-btn {
    min-width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ios-text);
    cursor: pointer;
    transition: background 0.15s;
    font-family: inherit;
  }

  .page-btn:hover:not(:disabled) { background: var(--ios-bg); }
  .page-btn:disabled { opacity: 0.3; cursor: not-allowed; }

  .page-btn.active {
    background: var(--ios-blue);
    color: white;
  }

  /* 상세 뷰 */
  .notice-detail-header {
    padding-bottom: 20px;
    border-bottom: 1px solid var(--ios-separator-thin);
    margin-bottom: 24px;
  }

  .detail-meta-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
  }

  .detail-meta-top .badge-pinned-row { flex-shrink: 0; }

  .detail-title {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.4px;
    line-height: 1.4;
    color: var(--ios-text);
  }

  .detail-meta {
    font-size: 13px;
    color: var(--ios-text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .detail-meta b { color: var(--ios-text); font-weight: 600; }
  .meta-sep { color: var(--ios-text-tertiary); }

  .detail-content {
    min-height: 200px;
    padding: 0 0 24px 24px;
    font-size: 15px;
    line-height: 1.7;
    color: var(--ios-text);
  }

  /* 본문 첫 요소의 상단 마진 제거 (구분선 바로 아래 시작) */
  .detail-content > *:first-child { margin-top: 0; }
  .detail-content > p:first-child { margin-top: 0; }

  .detail-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 8px 0;
  }

  .detail-content p { margin-bottom: 8px; }
  .detail-content a { color: var(--ios-blue); text-decoration: underline; }

  /* 첨부파일 */
  .detail-attachments {
    padding: 16px;
    background: var(--ios-bg);
    border-radius: 12px;
    margin-bottom: 24px;
  }

  .attachments-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ios-text);
    margin-bottom: 10px;
  }

  .attachments-title svg { width: 14px; height: 14px; color: var(--ios-blue); }
  .attachments-title b { color: var(--ios-blue); }

  .attachment-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    padding: 0;
  }

  .attachment-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--ios-card);
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s;
  }

  .attachment-list li:hover { background: rgba(0, 122, 255, 0.05); }

  .attachment-list .file-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
  }

  .attachment-list .file-name {
    flex: 1;
    color: var(--ios-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .attachment-list .file-size {
    color: var(--ios-text-secondary);
    font-size: 12px;
    flex-shrink: 0;
  }

  .attachment-list .file-download {
    color: var(--ios-blue);
    font-size: 16px;
    flex-shrink: 0;
  }

  /* ============================================
     댓글 영역
  ============================================ */
  .comments-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--ios-separator-thin);
  }

  .comments-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ios-text);
    margin-bottom: 14px;
  }

  .comments-header svg {
    width: 16px;
    height: 16px;
    color: var(--ios-blue);
  }

  .comments-header b { color: var(--ios-blue); }

  .comment-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
  }

  /* 입력창 아래 툴바: 📎 첨부(왼쪽) / 취소·등록(오른쪽) */
  .comment-form-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }
  .comment-form-btns { display: flex; gap: 6px; }
  .comment-form-bar .btn-cancel {
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    font-family: inherit;
    background: var(--ios-bg);
    color: var(--ios-text-secondary);
  }
  .comment-form-bar .btn-cancel:hover { background: var(--ios-separator); }

  .comment-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--ios-separator);
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    color: var(--ios-text);
    background: var(--ios-card);
    resize: vertical;
    min-height: 40px;
    max-height: 120px;
    -webkit-appearance: none;
    transition: border-color 0.15s;
    line-height: 1.5;
  }

  .comment-form textarea:focus {
    outline: none;
    border-color: var(--ios-blue);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
  }

  .comment-form .btn-primary {
    flex-shrink: 0;
  }

  .comment-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 0;
  }

  .comment-item {
    padding: 12px 0;
    border-bottom: 0.5px solid var(--ios-separator-thin);
  }

  .comment-item:last-child { border-bottom: none; }

  .comment-item.is-reply {
    margin-left: 32px;
    padding-left: 12px;
    border-left: 2px solid var(--ios-separator-thin);
  }

  .comment-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 13px;
  }

  .comment-author {
    font-weight: 600;
    color: var(--ios-text);
  }

  .comment-time {
    color: var(--ios-text-secondary);
    font-size: 12px;
  }

  .comment-edited {
    color: var(--ios-text-tertiary);
    font-size: 11px;
  }

  .comment-actions {
    margin-left: auto;
    display: flex;
    gap: 4px;
  }

  .comment-action-btn {
    background: transparent;
    border: none;
    color: var(--ios-text-secondary);
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s, color 0.15s;
  }

  .comment-action-btn:hover {
    background: var(--ios-bg);
    color: var(--ios-blue);
  }

  .comment-action-btn.del:hover {
    color: var(--ios-red);
  }

  .comment-body {
    font-size: 14px;
    line-height: 1.5;
    color: var(--ios-text);
    white-space: pre-wrap;
    word-break: break-word;
  }

  /* 댓글 첨부 — 입력(파일첨부 버튼+칩) / 표시(다운로드 링크) */
  /* 📎 첨부 텍스트 버튼 (툴바 왼쪽) */
  .comment-attach-btn {
    flex-shrink: 0;
    font-size: 13px;
    color: var(--ios-blue);
    cursor: pointer;
    padding: 6px 12px;
    border: 1px solid var(--ios-separator);
    border-radius: 8px;
    background: var(--ios-card);
  }
  .comment-attach-btn:hover { background: var(--ios-bg); }
  .comment-attach-chips { display: flex; flex-wrap: wrap; gap: 6px; }
  .comment-attach-chips:not(:empty) { margin: 0 0 16px; }
  .comment-edit-form .comment-attach-chips:not(:empty) { margin: 6px 0; }
  .cmt-chip { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; background: var(--ios-bg); border: 0.5px solid var(--ios-separator); border-radius: 12px; padding: 2px 4px 2px 10px; }
  .cmt-chip button { border: none; background: none; cursor: pointer; color: var(--ios-text-secondary); font-size: 14px; line-height: 1; padding: 0 4px; }
  .comment-attachments { display: flex; flex-direction: column; gap: 3px; margin-top: 6px; }
  .comment-file { font-size: 13px; color: var(--ios-blue); text-decoration: none; width: fit-content; }
  .comment-file:hover { text-decoration: underline; }

  .comment-edit-form {
    margin-top: 6px;
    display: flex;
    gap: 6px;
    flex-direction: column;
  }

  .comment-edit-form textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--ios-separator);
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
    color: var(--ios-text);
    background: var(--ios-card);
    resize: vertical;
    min-height: 60px;
    -webkit-appearance: none;
    line-height: 1.5;
  }

  .comment-edit-form textarea:focus {
    outline: none;
    border-color: var(--ios-blue);
  }

  .comment-edit-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: flex-end;
  }
  /* 수정폼: 📎 첨부는 왼쪽, 취소/저장은 오른쪽 */
  .comment-edit-actions .comment-attach-btn { margin-right: auto; }

  .comment-edit-actions button {
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    font-family: inherit;
  }

  .comment-edit-actions .save-btn {
    background: var(--ios-blue);
    color: white;
  }

  .comment-edit-actions .cancel-btn {
    background: var(--ios-fill);
    color: var(--ios-text);
  }

  /* 답글 폼 = 댓글 입력과 동일(내부 .comment-form 재사용). 전용 override 제거.
     02-css 의 .reply-form{display:flex} 를 block 으로 덮어 세로 배치 유지 */
  .reply-form {
    margin-top: 8px;
    display: block;
  }

  .comments-empty {
    padding: 30px 10px;
    text-align: center;
    color: var(--ios-text-secondary);
    font-size: 13px;
  }

  /* 푸터 (목록/상세/쓰기 공통) */
  .notice-detail-footer {
    display: flex;
    justify-content: space-between;
    padding-top: 20px;
    border-top: 1px solid var(--ios-separator-thin);
    margin-top: 8px;
  }

  .notice-detail-footer-right { display: flex; gap: 8px; }

  /* ============================================
     글쓰기 폼
  ============================================ */
  .write-form .form-row {
    margin-bottom: 16px;
  }

  /* 카테고리(좌) + 토글(상단고정/공개, 우) 한 줄 */
  .write-form .write-meta-row {
    display: flex;
    align-items: flex-end;
    gap: 16px;
  }
  .write-form .write-meta-cat label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--ios-text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
  }
  /* 카테고리 드롭다운 — 너비 축소 */
  .write-form .write-meta-cat select {
    width: 200px;
    max-width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--ios-separator);
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    color: var(--ios-text);
    background: var(--ios-card);
    cursor: pointer;
  }
  /* 상단고정·공개 토글은 카테고리 유무와 무관하게 항상 우측 정렬 */
  .write-form .write-meta-toggle {
    margin-left: auto;
    padding-bottom: 4px;
    white-space: nowrap;
  }
  .write-form .write-meta-toggle label {
    font-size: 14px;
    color: var(--ios-text);
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
  }

  .write-form .form-row > label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--ios-text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
  }

  .write-form input[type="text"] {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--ios-separator);
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    color: var(--ios-text);
    background: var(--ios-card);
    -webkit-appearance: none;
    transition: border-color 0.15s;
  }

  .write-form input[type="text"]:focus {
    outline: none;
    border-color: var(--ios-blue);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
  }

  .write-form input[type="checkbox"] {
    margin-right: 6px;
    accent-color: var(--ios-blue);
    cursor: pointer;
  }

  .write-form .form-row > label:has(input[type="checkbox"]) {
    text-transform: none;
    font-size: 14px;
    color: var(--ios-text);
    font-weight: 500;
    letter-spacing: normal;
    cursor: pointer;
    margin-bottom: 0;
    display: inline-flex;
    align-items: center;
  }

  /* 에디터 툴바 */
  .editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    padding: 8px;
    background: var(--ios-bg);
    border: 1px solid var(--ios-separator);
    border-bottom: none;
    border-radius: 10px 10px 0 0;
    align-items: center;
  }

  .editor-toolbar button {
    background: transparent;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    color: var(--ios-text);
    transition: background 0.15s;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .editor-toolbar button:hover { background: var(--ios-card); color: var(--ios-blue); }

  .editor-toolbar select {
    height: 30px;
    padding: 0 8px;
    border: 1px solid var(--ios-separator);
    border-radius: 6px;
    background: var(--ios-card);
    font-size: 12px;
    font-family: inherit;
    color: var(--ios-text);
    cursor: pointer;
  }

  .editor-toolbar input[type="color"] {
    width: 30px;
    height: 30px;
    padding: 2px;
    border: 1px solid var(--ios-separator);
    border-radius: 6px;
    cursor: pointer;
    background: var(--ios-card);
  }

  .toolbar-sep {
    width: 1px;
    height: 20px;
    background: var(--ios-separator);
    margin: 0 4px;
  }

  /* 에디터 컨텐츠 */
  .editor-content {
    min-height: 280px;
    max-height: 500px;
    overflow-y: auto;
    padding: 16px;
    border: 1px solid var(--ios-separator);
    border-radius: 0 0 10px 10px;
    font-size: 15px;
    line-height: 1.7;
    color: var(--ios-text);
    background: var(--ios-card);
    outline: none;
  }

  .editor-content:focus {
    border-color: var(--ios-blue);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
  }

  .editor-content:empty::before {
    content: attr(placeholder);
    color: var(--ios-text-tertiary);
    pointer-events: none;
  }

  .editor-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 6px 0;
  }

  /* 본문 - 인용구 */
  .editor-content blockquote,
  .detail-content blockquote {
    margin: 12px 0;
    padding: 10px 16px;
    border-left: 4px solid var(--ios-blue);
    background: var(--ios-bg);
    color: var(--ios-text-secondary);
    border-radius: 0 8px 8px 0;
    font-style: italic;
  }

  /* 본문 - 코드 블록 */
  .editor-content pre,
  .detail-content pre {
    margin: 12px 0;
    padding: 14px 16px;
    background: #1C1C1E;
    color: #F2F2F7;
    border-radius: 10px;
    overflow-x: auto;
    font-family: 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
    font-size: 13px;
    line-height: 1.5;
  }

  .editor-content pre code,
  .detail-content pre code {
    background: transparent;
    padding: 0;
    color: inherit;
  }

  /* 본문 - 인라인 코드 */
  .editor-content code,
  .detail-content code {
    background: var(--ios-bg);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'SF Mono', Menlo, Consolas, monospace;
    font-size: 0.9em;
    color: var(--ios-red);
  }

  /* 본문 - 표 */
  .editor-content table,
  .detail-content table {
    border-collapse: collapse;
    margin: 12px 0;
    width: 100%;
  }

  .editor-content table td,
  .editor-content table th,
  .detail-content table td,
  .detail-content table th {
    border: 1px solid var(--ios-separator);
    padding: 8px 12px;
    font-size: 14px;
  }

  .editor-content table th,
  .detail-content table th {
    background: var(--ios-bg);
    font-weight: 600;
    text-align: left;
  }

  /* 본문 - 구분선 */
  .editor-content hr,
  .detail-content hr {
    border: none;
    border-top: 1px solid var(--ios-separator);
    margin: 20px 0;
  }

  /* 이모지 피커 */
  .emoji-picker {
    margin-top: 6px;
    padding: 12px;
    background: var(--ios-card);
    border: 1px solid var(--ios-separator);
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  }

  .emoji-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 2px;
    max-height: 180px;
    overflow-y: auto;
  }

  .emoji-grid button {
    background: transparent;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    font-size: 20px;
    cursor: pointer;
    transition: background 0.1s;
    padding: 0;
    line-height: 1;
  }

  .emoji-grid button:hover {
    background: var(--ios-bg);
  }

  /* 첨부파일 영역 */
  .attach-area {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .attach-drop-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 28px 20px;
    border: 1.5px dashed var(--ios-separator);
    border-radius: 10px;
    background: var(--ios-bg);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    color: var(--ios-text-secondary);
  }

  .attach-drop-zone:hover {
    border-color: var(--ios-blue);
    background: rgba(0, 122, 255, 0.04);
    color: var(--ios-blue);
  }

  .attach-drop-zone.drag-over {
    border-color: var(--ios-blue);
    background: rgba(0, 122, 255, 0.08);
    color: var(--ios-blue);
  }

  .attach-drop-zone svg { width: 32px; height: 32px; }
  .attach-drop-zone span { font-size: 14px; font-weight: 500; }
  .attach-drop-zone small { font-size: 12px; color: var(--ios-text-secondary); }

  .attach-file-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    padding: 0;
  }

  .attach-file-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--ios-bg);
    border-radius: 8px;
    font-size: 13px;
  }

  .attach-file-list .file-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
  }

  .attach-file-list .file-name {
    flex: 1;
    color: var(--ios-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .attach-file-list .file-size {
    color: var(--ios-text-secondary);
    font-size: 12px;
    flex-shrink: 0;
  }

  .attach-file-list .file-action {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    color: var(--ios-text-secondary);
    font-size: 14px;
    transition: background 0.15s, color 0.15s;
    font-family: inherit;
  }

  .attach-file-list .file-action:hover {
    background: var(--ios-card);
    color: var(--ios-blue);
  }

  .attach-file-list .file-action.del:hover {
    color: var(--ios-red);
  }

  /* ============================================
     Quill Editor 보정 (라이트 모드 / iOS 톤)
  ============================================ */
  #quillEditor {
    background: var(--ios-card);
    border-radius: 0 0 10px 10px;
  }

  /* 툴바 */
  .ql-toolbar.ql-snow {
    background: var(--ios-bg);
    border: 1px solid var(--ios-separator) !important;
    border-radius: 10px 10px 0 0;
    border-bottom: none !important;
  }

  /* 본문 영역 */
  .ql-container.ql-snow {
    border: 1px solid var(--ios-separator) !important;
    border-radius: 0 0 10px 10px;
    font-family: inherit;
    font-size: 15px;
    background: var(--ios-card);
  }

  .ql-editor {
    min-height: 320px;
    color: var(--ios-text);
    line-height: 1.7;
    padding: 16px;
  }

  /* 탭 들여쓰기 시각화 (Quill에서 \t를 화이트스페이스로 표시하기 위함) */
  .ql-editor {
    white-space: pre-wrap;
  }

  /* 플레이스홀더 색상 */
  .ql-editor.ql-blank::before {
    color: var(--ios-text-tertiary);
    font-style: normal;
  }

  /* 인용구 */
  .ql-editor blockquote {
    border-left: 4px solid var(--ios-blue);
    background: var(--ios-bg);
    margin: 12px 0;
    padding: 10px 16px;
    border-radius: 0 8px 8px 0;
    color: var(--ios-text-secondary);
  }

  /* 코드 블록 */
  .ql-editor pre.ql-syntax,
  .ql-editor pre {
    background: #1C1C1E;
    color: #F2F2F7;
    border-radius: 10px;
    padding: 14px 16px;
    overflow-x: auto;
    font-family: 'SF Mono', Menlo, Consolas, monospace;
    font-size: 13px;
  }

  /* 툴바 버튼 색상 */
  .ql-snow .ql-stroke { stroke: var(--ios-text); }
  .ql-snow .ql-fill { fill: var(--ios-text); }
  .ql-snow .ql-picker { color: var(--ios-text); }

  .ql-snow .ql-toolbar button:hover .ql-stroke,
  .ql-snow .ql-toolbar button.ql-active .ql-stroke {
    stroke: var(--ios-blue);
  }
  .ql-snow .ql-toolbar button:hover .ql-fill,
  .ql-snow .ql-toolbar button.ql-active .ql-fill {
    fill: var(--ios-blue);
  }
  .ql-snow .ql-toolbar button:hover,
  .ql-snow .ql-toolbar button.ql-active {
    color: var(--ios-blue);
  }
