/* community.css — 커뮤니티 탭. style.css 의 토큰과 공용 부품(.btn .chip .rows .sheet .field)을 그대로 쓰고, 여기 클래스는 cm- 로 시작한다. */

/* ---------- 아래 탭이 6개가 되어 글자와 간격을 조금 줄인다 ---------- */
#tabbar button { font-size: 10.5px; padding-left: 0; padding-right: 0; }
#tabbar button span { white-space: nowrap; letter-spacing: -0.03em; }
@media (max-width: 374px) { #tabbar button { font-size: 9.5px; } }

/* ---------- 탭 본문: 목록 ---------- */
.cm-head { display: flex; align-items: center; gap: 2px; margin-right: -8px; }
.cm-head .title { margin: 12px 0 8px; }
#cm-headbtns { flex: none; display: flex; align-items: center; gap: 2px; }
.cm-pill { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 11px 0 8px; margin-right: 2px; border-radius: 999px; background: var(--primary-weak); color: var(--primary-weak-text); font-size: 14px; }
.cm-pill b { font-weight: 700; font-variant-numeric: tabular-nums; }
.cm-search { display: flex; align-items: center; gap: 8px; height: 44px; margin: 0 0 12px; padding: 0 6px 0 12px; border-radius: 12px; background: var(--bg-grey); }
.cm-search-ic { flex: none; display: grid; place-items: center; color: var(--text-3); }
.cm-search-ic svg { width: 20px; height: 20px; }
.cm-search input { flex: 1; min-width: 0; height: 44px; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 16px; -webkit-appearance: none; appearance: none; }
.cm-search input::-webkit-search-cancel-button { display: none; }
.cm-search button { flex: none; width: 36px; height: 36px; font-size: 20px; color: var(--text-3); }
.cm-head .top-btn.on { color: var(--primary); }
.cm-chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 -20px 10px; padding: 0 20px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.cm-chips::-webkit-scrollbar { display: none; }
.cm-chips .chip { flex: none; white-space: nowrap; }
.cm-chips.small .chip { padding: 6px 11px; font-size: 13px; }
.cm-chips .chip:disabled { opacity: .45; }
.cm-boardhint { font-size: 13px; line-height: 19px; color: var(--text-3); margin: 0 0 6px; }
.cm-hint { font-size: 14px; line-height: 21px; color: var(--text-3); text-align: center; padding: 26px 0 10px; margin: 0; }
.cm-empty { text-align: center; padding: 30px 0 10px; }
.cm-empty p { font-size: 15px; color: var(--text-3); margin: 0 0 14px; }
.cm-empty .btn { max-width: 200px; margin: 0 auto; }
.cm-more { margin: 16px 0 4px; height: 48px; line-height: 48px; font-size: 15px; }
.cm-card { display: block; padding: 14px 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.cm-card:active { background: var(--fill); }
.cm-card-photo { position: relative; aspect-ratio: 4 / 3; border-radius: 16px; overflow: hidden; background: var(--fill); margin-bottom: 10px; }
.cm-card-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cm-count { position: absolute; right: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 4px; background: rgba(0,0,0,.55); color: #fff; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 3px 8px; }
.cm-count svg { width: 14px; height: 14px; }
.cm-card-main { display: flex; gap: 12px; align-items: flex-start; }
.cm-card-body { flex: 1; min-width: 0; }
.cm-card-thumb { flex: none; width: 76px; height: 76px; border-radius: 12px; object-fit: cover; background: var(--fill); }
.cm-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.cm-tag { font-size: 12px; line-height: 18px; font-weight: 600; color: var(--text-3); background: var(--fill); border-radius: 6px; padding: 1px 7px; }
.cm-tag.b-free { color: #2272EB; background: #E8F3FF; }
.cm-tag.b-mate { color: #0B8A5F; background: #E3F7EE; }
.cm-tag.b-plan { color: #6B3FD4; background: #F0EAFE; }
.cm-tag.b-brag { color: #B26A00; background: #FFF4DE; }
.cm-tag.warn { color: #9A5B00; background: #FFF4E5; }
.cm-card-title { font-size: 17px; line-height: 24px; font-weight: 600; margin: 0; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cm-card-ex { font-size: 14px; line-height: 20px; color: var(--text-2); margin: 4px 0 0; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cm-att { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; margin: 8px 6px 0 0; font-size: 13px; line-height: 18px; color: var(--primary-weak-text); background: var(--primary-weak); border-radius: 8px; padding: 4px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: top; }
.cm-att svg { width: 14px; height: 14px; flex: none; }
.cm-card-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; font-size: 13px; color: var(--text-3); }
.cm-by { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-stats { display: flex; gap: 12px; flex: none; }
.cm-stat { display: inline-flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; }
.cm-stat svg { width: 16px; height: 16px; }
.cm-stat.on { color: var(--red500); }
#cm-page img.fail, #cm-screen img.fail { opacity: 0; }
.cm-fab { position: fixed; right: 16px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 19; display: inline-flex; align-items: center; gap: 6px; height: 48px; padding: 0 18px 0 14px; border-radius: 999px; background: var(--primary); color: #fff; font-size: 15px; font-weight: 600; box-shadow: 0 4px 14px rgba(49,130,246,.35); }
.cm-fab:active { background: var(--primary-press); }
.cm-side-label, .cm-side-write { display: none; }   /* 웹의 넓은 화면(webver/web.css)에서만 쓴다 */
.cm-webrow { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; margin: 0 0 10px; padding: 0 12px; border-radius: 12px; background: var(--primary-weak); color: var(--primary-weak-text); font-size: 14px; font-weight: 600; text-align: left; }
.cm-webrow svg { flex: none; width: 18px; height: 18px; }
.cm-webrow span { flex: 1; min-width: 0; }
.cm-webrow .chev { flex: none; opacity: .6; }
.cm-webfind { margin: 14px 0 10px; padding: 16px; border-radius: 16px; background: var(--bg-grey); text-align: center; }
.cm-webbar { display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 16px; border-radius: 23px; background: var(--layer, #fff); border: 1px solid var(--border); color: var(--text-3); }
.cm-webbar b { color: var(--text); font-size: 17px; font-weight: 700; }
.cm-webfind p { margin: 10px 0 0; font-size: 14px; color: var(--text-2); }
.cm-weburl { margin: 0 0 12px; padding: 12px 14px; border-radius: 12px; border: 1px dashed var(--border); font-size: 15px; font-weight: 600; text-align: center; overflow-wrap: anywhere; -webkit-user-select: text; user-select: text; }
.cm-webacts { display: flex; gap: 8px; }
.cm-webacts .btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; height: 52px; line-height: 1; }
.cm-webacts .btn svg { width: 18px; height: 18px; flex: none; }
.cm-link { display: block; width: 100%; min-height: 44px; margin-top: 6px; color: var(--text-3); font-size: 14px; }

/* ---------- 하위 화면(글 보기 · 글쓰기) · 시트 · 알림 ---------- */
@keyframes cm-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
#cm-screen { position: fixed; inset: 0; z-index: 62; background: var(--bg); display: flex; flex-direction: column; animation: cm-in .2s ease-out; }
#cm-screen .sd-top { flex: none; display: flex; align-items: center; height: calc(56px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 8px 0; background: var(--bg); }
#cm-screen .sd-top-title { font-size: 17px; font-weight: 600; color: var(--text); padding-left: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-scroll { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 4px 20px 28px; }
.cm-scroll > * { max-width: 560px; margin-left: auto; margin-right: auto; }
.cm-bar { flex: none; display: flex; align-items: center; gap: 8px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--border); }
.cm-bar input { flex: 1; min-width: 0; background: var(--fill); border: 2px solid transparent; border-radius: 999px; padding: 10px 16px; font-size: 16px; line-height: 22px; -webkit-appearance: none; appearance: none; }
.cm-bar input:focus { outline: none; border-color: var(--primary); background: var(--layer); }
.cm-bar .btn { max-width: 520px; margin: 0 auto; }
.cm-send { flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; }
#cm-sheet { z-index: 69; }
#cm-sheet .sheet { max-height: 88vh; max-height: 88dvh; }
#cm-sheet .rows .row { gap: 12px; }
#cm-toast { position: fixed; left: 50%; bottom: calc(100px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 81; background: rgba(25,31,40,.92); color: #fff; font-size: 14px; line-height: 20px; padding: 10px 16px; border-radius: 999px; max-width: calc(100vw - 40px); text-align: center; pointer-events: none; }
.cm-ic { flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--fill); color: var(--text-2); display: grid; place-items: center; }
.cm-acts { display: flex; gap: 8px; margin-top: 14px; }
.cm-acts .btn { flex: 1; }
.cm-terms { margin: 4px 0 10px; padding-left: 20px; font-size: 15px; line-height: 23px; color: var(--text-2); }
.cm-terms li { margin-bottom: 6px; }
.cm-sub { font-size: 14px; font-weight: 600; color: var(--text-2); margin: 18px 0 8px; }
.cm-pbig { text-align: center; padding: 6px 0 2px; }
.cm-pbig b { display: block; font-size: 36px; line-height: 44px; font-weight: 800; font-variant-numeric: tabular-nums; }
.cm-pbig span:not(.cm-ava) { font-size: 13px; color: var(--text-3); }
.cm-plist { list-style: none; margin: 0 0 6px; padding: 0; }
.cm-plist li { display: flex; align-items: center; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 15px; }
.cm-plist span { flex: 1; min-width: 0; }
.cm-plist b { color: var(--primary); font-variant-numeric: tabular-nums; }
.cm-plist b.neg { color: var(--text-3); }
.cm-plist i { flex: none; min-width: 84px; text-align: right; font-style: normal; font-size: 12px; color: var(--text-3); }

/* ---------- 글 보기 ---------- */
.cm-post-title { font-size: 22px; line-height: 30px; font-weight: 700; letter-spacing: -0.02em; margin: 4px 0 12px; overflow-wrap: anywhere; }
.cm-author { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.cm-author b { display: block; font-size: 15px; line-height: 21px; }
.cm-author span:not(.cm-ava) { font-size: 13px; color: var(--text-3); }
.cm-ava { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--primary-weak); color: var(--primary-weak-text); display: grid; place-items: center; font-size: 15px; font-weight: 700; }
.cm-note { background: #FFF4E5; color: #9A5B00; border-radius: 12px; padding: 10px 14px; font-size: 14px; line-height: 21px; margin: 0 0 12px; }
.cm-when { display: inline-block; font-size: 14px; color: var(--text-2); background: var(--bg-grey); border-radius: 10px; padding: 7px 12px; margin: 0 0 12px; }
.cm-body { font-size: 16px; line-height: 26px; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 14px; }
.cm-photo { display: block; width: 100%; height: auto; border-radius: 14px; background: var(--fill); margin: 0 0 10px; cursor: zoom-in; }
.cm-attcard { border: 1px solid var(--border); border-radius: 16px; padding: 14px 16px; margin: 6px 0 14px; }
.cm-attcard-k { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--primary); }
.cm-attcard-k svg { width: 16px; height: 16px; }
.cm-attcard-t { font-size: 17px; line-height: 24px; font-weight: 600; margin-top: 4px; overflow-wrap: anywhere; }
.cm-attcard-s { font-size: 14px; color: var(--text-3); margin-top: 2px; }
.cm-attlist { margin: 10px 0 12px; padding-left: 22px; font-size: 14px; line-height: 22px; color: var(--text-2); }
.cm-attlist li.more { list-style: none; margin-left: -22px; color: var(--text-3); }
.cm-attcard .btn { margin-top: 4px; }
/* 붙인 여행 일정: 날짜별 자세한 목록 */
.cm-plan { margin: 12px 0 10px; }
.cm-plan-day { border-top: 1px solid var(--border); }
.cm-plan-day summary { display: flex; align-items: baseline; gap: 8px; padding: 12px 22px 10px 0; position: relative; cursor: pointer; list-style: none; font-size: 15px; }
.cm-plan-day summary::-webkit-details-marker { display: none; }
.cm-plan-day summary::after { content: ''; position: absolute; right: 4px; top: 50%; width: 7px; height: 7px; margin-top: -6px; border: solid var(--text-3); border-width: 0 1.8px 1.8px 0; transform: rotate(45deg); }
.cm-plan-day[open] summary::after { margin-top: -2px; transform: rotate(-135deg); }
.cm-plan-day summary b { font-weight: 700; }
.cm-plan-day summary span { font-size: 13px; color: var(--text-3); }
.cm-plan-day ol { list-style: none; margin: 0 0 12px; padding: 0; }
.cm-plan-day li { display: flex; gap: 10px; padding: 6px 0; }
.cm-plan-day li > div { flex: 1; min-width: 0; }
.cm-plan-n { flex: none; width: 22px; height: 22px; margin-top: 1px; display: grid; place-items: center; border-radius: 50%; background: var(--primary); color: #fff; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cm-plan-day li.note .cm-plan-n { background: var(--fill); color: var(--text-3); }
.cm-plan-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.cm-plan-name { font-size: 15px; line-height: 22px; font-weight: 600; overflow-wrap: anywhere; }
.cm-plan-day li.note .cm-plan-name { font-weight: 500; color: var(--text-2); }
.cm-plan-time { flex: none; font-size: 13px; color: var(--primary); font-weight: 600; font-variant-numeric: tabular-nums; }
.cm-plan-addr, .cm-plan-stay { font-size: 13px; line-height: 18px; color: var(--text-3); overflow-wrap: anywhere; }
.cm-plan-memo { margin-top: 2px; font-size: 14px; line-height: 20px; color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.cm-plan-day li.leg { margin-left: 10px; padding: 2px 0 2px 21px; border-left: 2px dotted var(--grey300); font-size: 12px; line-height: 18px; color: var(--text-3); }
.cm-plan-img { flex: none; width: 64px; height: 64px; border-radius: 12px; object-fit: cover; background: var(--fill); }
.cm-plan-photos { display: flex; gap: 8px; margin: 12px 0 2px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.cm-plan-photos::-webkit-scrollbar { display: none; }
.cm-plan-photos figure { flex: none; width: 132px; margin: 0; }
.cm-plan-photos img { display: block; width: 132px; height: 96px; border-radius: 12px; object-fit: cover; background: var(--fill); }
.cm-plan-photos figcaption { margin-top: 4px; font-size: 12px; line-height: 16px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 내 여행(웹) */
.cm-trips { list-style: none; margin: 8px 0 0; padding: 0; }
.cm-trip { display: flex; align-items: center; gap: 12px; padding: 14px 4px; border-bottom: 1px solid var(--border); cursor: pointer; color: var(--text-3); }
.cm-trip .cm-ic { color: var(--primary); }
.cm-trip > div { flex: 1; min-width: 0; color: var(--text); }
.cm-trip b { display: block; font-size: 16px; line-height: 24px; overflow-wrap: anywhere; }
.cm-trip span { display: block; font-size: 13px; line-height: 18px; color: var(--text-3); }
.cm-mytrip-sub { margin: 2px 0 14px; font-size: 14px; color: var(--text-3); }
.cm-mytrip-facts { list-style: none; margin: 0 0 6px; padding: 12px 16px; border-radius: 14px; background: var(--bg-grey); }
.cm-mytrip-facts li { display: flex; gap: 12px; padding: 4px 0; font-size: 14px; line-height: 20px; }
.cm-mytrip-facts b { flex: none; width: 64px; font-weight: 600; color: var(--text-3); }
.cm-mytrip-facts span { min-width: 0; overflow-wrap: anywhere; }
.cm-plan-prev { margin-top: 8px; padding: 0 14px; border: 1px solid var(--border); border-radius: 14px; }
.cm-plan-prev > summary { padding: 11px 0; font-size: 14px; font-weight: 600; color: var(--text-2); cursor: pointer; }
.cm-plan-prev .cm-plan { margin-top: 0; max-height: 46vh; overflow-y: auto; }
.cm-places { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.cm-places span { background: var(--fill); color: var(--text-2); border-radius: 999px; padding: 4px 10px; font-size: 13px; }
.cm-react { display: flex; justify-content: center; margin: 16px 0 4px; }
.cm-like { display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 18px; border-radius: 999px; background: var(--fill); color: var(--text-2); font-size: 15px; font-weight: 600; }
.cm-like b { font-variant-numeric: tabular-nums; }
.cm-like.on { background: #FFECEE; color: var(--red500); }
.cm-cmts { list-style: none; margin: 0; padding: 0; }
.cm-cmt { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; }
.cm-cmt-body { flex: 1; min-width: 0; }
.cm-cmt-head b { font-size: 14px; }
.cm-cmt-head span:not(.cm-ava) { font-size: 12px; color: var(--text-3); margin-left: 6px; }
.cm-cmt-body p { font-size: 15px; line-height: 22px; margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.cm-cmt-more { flex: none; width: 32px; height: 32px; color: var(--text-3); display: grid; place-items: center; }
.cm-cmt-more svg { width: 18px; height: 18px; }
/* 답글: 들여 쓰고, 입력 칸 위에 누구에게 다는지 보여 준다 */
.cm-cmt.reply { margin-left: 46px; padding: 8px 0; }
.cm-cmt.reply .cm-ava { width: 28px; height: 28px; font-size: 12px; }
.cm-cmt.gone { color: var(--text-3); }
.cm-cmt.gone .cm-ava { background: var(--fill); }
.cm-cmt.gone p { font-size: 14px; margin-top: 7px; }
.cm-cmt-reply { margin-top: 4px; padding: 2px 0; font-size: 13px; font-weight: 600; color: var(--text-3); }
.cm-cmt-reply:active { color: var(--primary); }
.cm-bar { position: relative; }
.cm-replyto { position: absolute; left: 0; right: 0; bottom: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px 8px 20px; background: var(--bg-grey); border-top: 1px solid var(--border); font-size: 13px; color: var(--text-2); }
.cm-replyto[hidden] { display: none; }
.cm-replyto span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-replyto button { flex: none; width: 28px; height: 28px; display: grid; place-items: center; color: var(--text-3); }
.cm-replyto button svg { width: 14px; height: 14px; }
/* 알림 · 태그 */
.cm-bell { position: relative; }
.cm-bell b { position: absolute; right: 2px; top: 4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--red500); color: #fff; font-size: 10px; line-height: 16px; font-weight: 700; text-align: center; }
#tabbar button.dot { position: relative; }
#tabbar button.dot::after { content: ''; position: absolute; left: 50%; top: 6px; width: 7px; height: 7px; margin-left: 9px; border-radius: 50%; background: var(--red500); }
.cm-textbtn { width: auto; padding: 0 10px; font-size: 14px; font-weight: 600; color: var(--primary); white-space: nowrap; }
.cm-notifs { list-style: none; margin: 0; padding: 0; }
.cm-notif { display: flex; align-items: flex-start; gap: 12px; padding: 14px 12px; border-bottom: 1px solid var(--border); cursor: pointer; }
.cm-notif.new { background: var(--primary-weak); border-radius: 14px; border-bottom-color: transparent; margin-bottom: 4px; }
.cm-notif.new .cm-ava:not(.pic) { background: var(--bg); }   /* 새 알림 줄(연한 파랑) 위에서도 아바타 동그라미가 보이게 */
.cm-notif > div { flex: 1; min-width: 0; }
.cm-notif p { margin: 0; font-size: 15px; line-height: 22px; overflow-wrap: anywhere; }
.cm-notif-ex { color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cm-notif span:not(.cm-ava) { display: block; margin-top: 2px; font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-mention { color: var(--primary); font-weight: 600; cursor: pointer; }
.cm-mentionbox { position: absolute; left: 0; right: 0; bottom: 100%; display: flex; gap: 6px; padding: 8px 12px; overflow-x: auto; background: var(--bg); border-top: 1px solid var(--border); scrollbar-width: none; }
.cm-mentionbox[hidden] { display: none; }
.cm-mentionbox button { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 4px; border-radius: 999px; background: var(--fill); font-size: 14px; font-weight: 600; white-space: nowrap; }
.cm-mentionbox .cm-ava { width: 26px; height: 26px; font-size: 12px; }
.cm-cmt.focus { background: var(--primary-weak); margin-left: -8px; margin-right: -8px; padding-left: 8px; padding-right: 8px; border-radius: 12px; }
.cm-cmt.reply.focus { margin-left: 38px; }
.cm-pushcard { display: flex; align-items: center; gap: 12px; margin: 4px 0 14px; padding: 14px; border-radius: 16px; background: var(--primary-weak); color: var(--primary-weak-text); }
.cm-pushcard > svg { flex: none; width: 24px; height: 24px; }
.cm-pushcard > div { flex: 1; min-width: 0; color: var(--text); }
.cm-pushcard b { display: block; font-size: 15px; }
.cm-pushcard span { display: block; font-size: 13px; line-height: 18px; color: var(--text-2); }
.cm-pushcard .btn { flex: none; width: auto; height: 38px; line-height: 38px; padding: 0 16px; font-size: 14px; }
.cm-pushline { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 13px; color: var(--text-3); }
.cm-pushline svg { width: 16px; height: 16px; }
.cm-pushline span { flex: 1; }
/* 프로필 */
.cm-ava { overflow: hidden; }
.cm-ava.pic { background: var(--fill); }
.cm-ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cm-ava[data-act] { cursor: pointer; }
.cm-ava.big { width: 88px; height: 88px; font-size: 34px; }
.cm-pf { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 0 18px; text-align: center; }
.cm-pf-name { font-size: 19px; line-height: 26px; margin-top: 6px; overflow-wrap: anywhere; }
.cm-pf-bio { margin: 0; font-size: 15px; line-height: 22px; color: var(--text-2); overflow-wrap: anywhere; }
.cm-pf-n { font-size: 13px; color: var(--text-3); }
.cm-pfedit { max-width: 480px; }
.cm-pf-pic { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 14px 0 6px; }
.cm-pf-avabtn { position: relative; border-radius: 50%; }
.cm-pf-avabtn i { position: absolute; right: -2px; bottom: -2px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--layer); border: 1px solid var(--border); color: var(--text-2); }
.cm-pf-avabtn i svg { width: 16px; height: 16px; }
.cm-pf-picbtns { display: flex; gap: 8px; }
.cm-pfedit .field input { font-size: 16px; }
#cm-viewer { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.94); display: grid; place-items: center; }
#cm-viewer img { max-width: 100%; max-height: 100%; object-fit: contain; }
.cm-viewer-x { position: absolute; right: 10px; top: calc(8px + env(safe-area-inset-top)); width: 44px; height: 44px; color: #fff; display: grid; place-items: center; }

/* ---------- 글쓰기 ---------- */
.cm-flabel { font-size: 13px; color: var(--text-3); margin: 14px 0 6px; }
.cm-write .cm-chips { margin-bottom: 6px; }
.cm-write .field { margin-bottom: 10px; }
.cm-write .field input, .cm-write select, .cm-write textarea { font-size: 16px; }   /* iOS 는 16px 미만 입력창을 누르면 화면을 확대한다 */
.cm-write textarea { display: block; width: 100%; background: var(--fill); border: 2px solid transparent; border-radius: 14px; padding: 12px 16px; font: inherit; font-size: 16px; line-height: 24px; color: inherit; resize: none; }
.cm-write textarea:focus { outline: none; border-color: var(--primary); background: var(--layer); }
/* 제목: 큰 글씨 한 줄, 밑줄만 */
.cm-w-title { display: block; width: 100%; margin: 14px 0 12px; padding: 10px 2px; border: 0; border-bottom: 2px solid var(--border); border-radius: 0; background: none; font: inherit; font-size: 22px; line-height: 30px; font-weight: 700; letter-spacing: -0.02em; color: inherit; -webkit-appearance: none; appearance: none; }
.cm-w-title:focus { outline: none; border-bottom-color: var(--primary); }
.cm-w-title::placeholder { color: var(--text-3); font-weight: 600; }
/* 본문 편집기: 서식 줄(붙어 다님) · 고른 것의 도구 줄 · 본문 */
.cm-ed-box { border: 1px solid var(--border); border-radius: 16px; background: var(--layer); }
.cm-ed-box:focus-within { border-color: var(--primary); }
.cm-ed-bar, .cm-ed-ctx { display: flex; align-items: center; gap: 2px; padding: 6px 8px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.cm-ed-bar::-webkit-scrollbar, .cm-ed-ctx::-webkit-scrollbar { display: none; }
.cm-ed-bar { position: sticky; top: -4px; z-index: 3; border-bottom: 1px solid var(--border); border-radius: 16px 16px 0 0; background: var(--layer); }
.cm-ed-bar button, .cm-ed-ctx button { flex: none; min-width: 36px; height: 36px; padding: 0 9px; display: inline-grid; place-items: center; border-radius: 9px; color: var(--text-2); font-size: 16px; line-height: 1; white-space: nowrap; }
.cm-ed-bar button b, .cm-ed-bar button i, .cm-ed-bar button u, .cm-ed-bar button s { font-size: 17px; font-family: Georgia, 'Times New Roman', serif; width: auto; height: auto; background: none; margin: 0; }
.cm-ed-bar button svg, .cm-ed-ctx button svg { width: 20px; height: 20px; }
.cm-ed-bar button.on, .cm-ed-ctx button.on { background: var(--primary-weak); color: var(--primary-weak-text); }
.cm-ed-bar button:active, .cm-ed-ctx button:active { background: var(--fill); }
.cm-ed-bar > i, .cm-ed-ctx > i { flex: none; width: 1px; height: 18px; margin: 0 5px; background: var(--border); }
.cm-ed-ctx { position: sticky; top: 45px; z-index: 3; border-bottom: 1px solid var(--border); background: var(--bg-grey); }
.cm-ed-ctx[hidden] { display: none; }
.cm-ed-ctx button { font-size: 13px; font-weight: 600; }
.cm-ed-ctxk { flex: none; margin: 0 6px 0 4px; font-size: 12px; font-weight: 700; color: var(--text-3); }
.cm-ed { min-height: 220px; margin: 0; padding: 14px 16px 18px; outline: none; cursor: text; -webkit-user-select: text; user-select: text; }
.cm-ed { position: relative; }
.cm-ed.empty::before { content: attr(data-ph); position: absolute; left: 16px; top: 14px; color: var(--text-3); pointer-events: none; }
.cm-ed-foot { display: flex; justify-content: space-between; gap: 12px; padding: 8px 14px 10px; border-top: 1px solid var(--border); font-size: 12px; line-height: 16px; color: var(--text-3); }
.cm-ed-foot b { flex: none; font-weight: 500; font-variant-numeric: tabular-nums; }
.cm-ed-foot b.over { color: var(--red500); font-weight: 700; }
.cm-ed-photo { display: block; width: 100%; height: auto; margin: 10px auto; border-radius: 14px; background: var(--fill); cursor: pointer; }
.cm-ed-photo.on { outline: 3px solid var(--primary); outline-offset: 2px; }
/* 서식 있는 본문(보기 · 쓰기 공통) */
.cm-body.rich { white-space: normal; }
.cm-ed.cm-body.rich { white-space: pre-wrap; }
.cm-body.rich p, .cm-body.rich h2, .cm-body.rich h3, .cm-body.rich blockquote, .cm-body.rich ul, .cm-body.rich ol { margin: 0 0 8px; }
.cm-body.rich p:empty::before { content: '\00a0'; }
.cm-body.rich h2 { font-size: 20px; line-height: 28px; font-weight: 700; letter-spacing: -0.02em; margin-top: 14px; }
.cm-body.rich h3 { font-size: 17px; line-height: 26px; font-weight: 700; margin-top: 10px; }
.cm-body.rich > :first-child { margin-top: 0; }
.cm-body.rich [data-a="c"] { text-align: center; }
.cm-body.rich [data-a="r"] { text-align: right; }
.cm-body.rich ul, .cm-body.rich ol { padding-left: 22px; }
.cm-body.rich ul { list-style: disc; } .cm-body.rich ol { list-style: decimal; }
.cm-body.rich li { margin: 2px 0; }
.cm-body.rich blockquote { padding: 8px 14px; border-left: 3px solid var(--grey300); border-radius: 0 10px 10px 0; background: var(--bg-grey); color: var(--text-2); }
.cm-body.rich hr { height: 1px; margin: 16px 0; border: 0; background: var(--border); }
.cm-body.rich table { width: 100%; margin: 10px 0 12px; border-collapse: collapse; table-layout: fixed; font-size: 15px; line-height: 22px; }
.cm-body.rich th, .cm-body.rich td { padding: 8px 10px; border: 1px solid var(--grey300); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.cm-body.rich th { background: var(--bg-grey); font-weight: 600; }
.cm-body.rich img { margin: 10px auto; }
.cm-body.rich img[data-w="s"] { width: 45%; } .cm-body.rich img[data-w="m"] { width: 70%; }
.cm-body.rich img[data-a="l"] { margin-left: 0; } .cm-body.rich img[data-a="r"] { margin-right: 0; }
/* 넓은 화면(PC·태블릿): 본문은 왼쪽에 넓게, 게시판·지역·붙이기는 오른쪽 기둥 */
@media (min-width: 900px) {
  .cm-scroll > .cm-write { max-width: 1080px; display: grid; grid-template-columns: minmax(0, 1fr) 320px; grid-template-rows: auto 1fr; column-gap: 32px; align-items: start; }
  .cm-w-main { grid-column: 1; grid-row: 1 / span 2; }
  .cm-w-meta { grid-column: 2; grid-row: 1; padding: 6px 20px 16px; border: 1px solid var(--border); border-radius: 18px; }
  .cm-w-extra { grid-column: 2; grid-row: 2; margin-top: 16px; padding: 6px 20px 16px; border: 1px solid var(--border); border-radius: 18px; }
  .cm-w-meta .cm-chips, .cm-w-extra .cm-attbtns { flex-wrap: wrap; overflow: visible; }
  .cm-w-meta .cm-dates { display: block; }   /* 좁은 기둥에서는 날짜 두 칸을 위아래로 */
  .cm-w-title { margin-top: 0; font-size: 28px; line-height: 38px; padding: 6px 2px 14px; }
  .cm-ed { min-height: 420px; padding: 22px 26px 26px; font-size: 17px; line-height: 29px; }
  .cm-ed.empty::before { left: 26px; top: 22px; }
  .cm-ed-bar, .cm-ed-ctx { padding: 8px 12px; }
  .cm-ed-ctx { top: 49px; }
  #cm-screen:has(.cm-write) .sd-top { padding-left: max(8px, calc(50% - 550px)); padding-right: max(8px, calc(50% - 550px)); }
  #cm-screen:has(.cm-write) .cm-bar { padding-left: max(16px, calc(50% - 540px)); padding-right: max(16px, calc(50% - 540px)); }
  #cm-screen:has(.cm-write) .cm-bar .btn { max-width: 320px; margin: 0 0 0 auto; }
}
.cm-write select { display: block; width: 100%; background: var(--fill) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%238B95A1' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center; border: 2px solid transparent; border-radius: 14px; padding: 13px 44px 13px 16px; color: inherit; font: inherit; font-size: 16px; -webkit-appearance: none; appearance: none; }
.cm-dates { display: flex; gap: 8px; }
.cm-dates .field { flex: 1; }
.cm-dates input { -webkit-appearance: none; appearance: none; min-height: 52px; text-align: left; }
.cm-phs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.cm-phs::-webkit-scrollbar { display: none; }
.cm-ph { position: relative; flex: none; width: 76px; height: 76px; border-radius: 12px; overflow: hidden; background: var(--fill); }
.cm-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cm-ph > button { position: absolute; right: 4px; top: 4px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; display: grid; place-items: center; }
.cm-ph > button svg { width: 12px; height: 12px; }
.cm-ph.up img { opacity: .5; }
.cm-ph.up i { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; border: 3px solid rgba(255,255,255,.7); border-top-color: var(--primary); animation: cm-spin .8s linear infinite; }
@keyframes cm-spin { to { transform: rotate(360deg); } }
.cm-ph.fail b { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(240,68,82,.9); color: #fff; font-size: 11px; text-align: center; padding: 2px 0; }
.cm-ph.add { display: grid; place-items: center; align-content: center; gap: 2px; color: var(--text-3); border: 1.5px dashed var(--grey300); background: none; font-size: 12px; }
.cm-attbtns { display: flex; flex-wrap: wrap; gap: 8px; }
.cm-attbtns .chip { display: inline-flex; align-items: center; gap: 6px; }
.cm-attbtns .chip svg { width: 16px; height: 16px; }
.cm-attsel { display: flex; align-items: center; gap: 10px; border: 1px solid var(--border); border-radius: 14px; padding: 10px 12px; color: var(--primary); }
.cm-attsel > div { flex: 1; min-width: 0; color: var(--text); }
.cm-attsel b { display: block; font-size: 15px; overflow-wrap: anywhere; }
.cm-attsel span { font-size: 13px; color: var(--text-3); }
.cm-attsel > button { flex: none; width: 32px; height: 32px; color: var(--text-3); display: grid; place-items: center; }

/* ---------- 키보드가 올라왔을 때(planner.js 가 html 에 pl-kb 와 보이는 영역 값을 넣는다) ---------- */
html.pl-kb #cm-screen, html.pl-kb #cm-sheet { top: var(--pl-vt, 0px); bottom: auto; height: var(--pl-vh, 100%); }
html.pl-kb #cm-sheet .sheet { max-height: calc(var(--pl-vh, 100vh) - 16px); padding-bottom: 16px; }
html.pl-kb .cm-bar { padding-bottom: 10px; }
html.pl-kb #cm-toast { top: calc(var(--pl-vt, 0px) + var(--pl-vh, 100vh) - 128px); bottom: auto; }

#app[data-theme="dark"] .cm-like.on { background: #3A1F24; }
#app[data-theme="dark"] .cm-tag.b-free, #app[data-theme="dark"] .cm-tag.b-mate, #app[data-theme="dark"] .cm-tag.b-plan, #app[data-theme="dark"] .cm-tag.b-brag { background: var(--fill); }
#app[data-theme="dark"] .cm-note, #app[data-theme="dark"] .cm-tag.warn { background: #3A2E17; color: #F5C56B; }

/* 목록 자리표시(처음 불러오는 동안) */
.cm-skel { cursor: default; display: flex; flex-direction: column; gap: 8px; }
.cm-skel:active { background: none; }
.cm-skel .sk { display: block; height: 14px; border-radius: 7px; background: linear-gradient(90deg, var(--fill) 25%, var(--bg-grey) 37%, var(--fill) 63%); background-size: 400% 100%; animation: cm-sk 1.3s ease-in-out infinite; }
.cm-skel .sk-tag { width: 64px; height: 20px; border-radius: 10px; }
.cm-skel .sk-title { height: 18px; }
.cm-skel .sk-line { width: 92%; }
.cm-skel .sk-meta { width: 40%; height: 12px; }
@keyframes cm-sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
@media (prefers-reduced-motion: reduce) { .cm-skel .sk { animation: none; } }

/* 관리자: 사용 통계 */
.adm { padding-bottom: 32px; }
.adm h3 { font-size: 15px; font-weight: 700; margin: 22px 0 8px; }
.adm-note { font-size: 12px; color: var(--text-3); margin: 8px 0 4px; line-height: 1.5; }
.adm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.adm-card { background: var(--bg-grey); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.adm-card span { font-size: 12px; color: var(--text-3); }
.adm-card b { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.adm-card small { font-size: 11px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-chart { width: 100%; height: 84px; display: block; }
.adm-ax { font-size: 10px; fill: var(--text-3); }
.adm-tw { overflow-x: auto; }
.adm-t { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.adm-t th, .adm-t td { padding: 7px 6px; border-bottom: 1px solid var(--border); text-align: right; white-space: nowrap; }
.adm-t th:first-child, .adm-t td:first-child { text-align: left; white-space: normal; }
.adm-t td small { display: block; font-size: 10px; color: var(--text-3); }
.adm-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.adm-pill { font-size: 12px; background: var(--bg-grey); border-radius: 12px; padding: 4px 10px; color: var(--text-2); }
