/* 發文工坊（會員中心、站長後台、會員文章頁）專用樣式。獨立檔案，不影響既有頁面的打包 CSS。 */
.cm-app { max-width: 920px; margin: 0 auto; padding: 8px 0 40px; }
.cm-app h1 { margin: 8px 0; }
.cm-app h2 { margin: 28px 0 10px; font-size: 1.15rem; }
.cm-desc { color: var(--muted, #6b6b6b); margin: 0 0 16px; }
.cm-card { background: #fff; border: 1px solid var(--border, #e4e2dc); border-radius: 14px; padding: 16px; margin: 12px 0; }
.cm-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cm-row.sp { justify-content: space-between; }
.cm-btn, .cm-app button, .cm-report button { font: inherit; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--border, #d6d3cb); background: #fff; cursor: pointer; }
.cm-btn.primary, .cm-app button.primary { background: #b45309; border-color: #b45309; color: #fff; }
.cm-app button.danger { color: #b91c1c; border-color: #f0b4b4; }
.cm-app button:disabled { opacity: .5; cursor: default; }
.cm-app label { display: block; margin: 12px 0 4px; font-weight: 600; font-size: 14px; }
.cm-app input[type=text], .cm-app textarea, .cm-app select, .cm-report textarea, .cm-report select { width: 100%; box-sizing: border-box; font: inherit; padding: 8px 10px; border: 1px solid var(--border, #d6d3cb); border-radius: 10px; background: #fff; }
.cm-app textarea { min-height: 360px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; line-height: 1.6; }
.cm-app textarea.short { min-height: 80px; font-family: inherit; }
.cm-hint { color: var(--muted, #6b6b6b); font-size: 13px; margin: 4px 0; }
.cm-msg { min-height: 1.4em; font-size: 14px; }
.cm-msg.err { color: #b91c1c; }
.cm-msg.ok { color: #166534; }
.cm-badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; background: #eee; }
.cm-badge.published { background: #dcfce7; color: #166534; }
.cm-badge.unpublished, .cm-badge.deleted { background: #fee2e2; color: #991b1b; }
.cm-badge.flag { background: #fef3c7; color: #92400e; }
.cm-list { list-style: none; margin: 0; padding: 0; }
.cm-list li { padding: 10px 0; border-bottom: 1px solid var(--border, #e4e2dc); }
.cm-cover { max-width: 240px; max-height: 160px; border-radius: 10px; display: block; margin-top: 8px; }
.cm-preview-frame { width: 100%; height: 70vh; border: 1px solid var(--border, #d6d3cb); border-radius: 12px; background: #fff; }
.cm-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.cm-table th, .cm-table td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--border, #e4e2dc); vertical-align: top; }
.cm-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0; }
.cm-tabs button[aria-pressed=true] { background: #1f2937; color: #fff; border-color: #1f2937; }
.cm-report summary { cursor: pointer; color: var(--muted, #6b6b6b); font-size: 14px; }
.cm-report-form label { display: block; margin: 8px 0; font-size: 14px; }
.cm-member-notice, .cm-sponsored { font-size: 13px; }
.cm-preview { background: #fef3c7; border-left-color: #d97706; }
@media (max-width: 640px) { .cm-app textarea { min-height: 280px; } .cm-table { display: block; overflow-x: auto; } }
.cm-row > select, .cm-row > input[type=text] { width: auto; min-width: 140px; flex: 1 1 160px; }
.cm-row > label { margin: 0; display: inline-flex; gap: 4px; align-items: center; }
.cm-quality { border: 1px solid var(--border, #e4e2dc); border-radius: 12px; padding: 12px 14px; margin: 16px 0; background: #fafaf7; }
.cm-quality h2 { margin: 0 0 6px; }
.cm-quality h3 { margin: 12px 0 4px; font-size: 14px; }
.cm-q-list { margin: 0; padding-left: 1.1rem; font-size: 14px; line-height: 1.6; }
.cm-q-list li.err { color: #991b1b; }
.cm-q-list li.hint { color: #92400e; }
.cm-q-list li.manual { color: #374151; }
.cm-q-list .cm-hint { display: block; }
.cm-verified { color: var(--muted, #6b6b6b); font-size: 13px; }
.cm-taglist { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.cm-taglist a { display: inline-block; padding: 2px 10px; border-radius: 999px; background: #f1efe9; color: inherit; text-decoration: none; font-size: 14px; }
.cm-list-intro { white-space: pre-line; }
.cm-empty { color: var(--muted, #6b6b6b); }
.cm-related-picker .cm-list li { padding: 6px 0; }
.cm-comment-list { list-style: none; margin: 0; padding: 0; }
.cm-comment { padding: 12px 0; border-bottom: 1px solid var(--border, #e4e2dc); }
.cm-c-head { font-size: 13px; color: var(--muted, #6b6b6b); }
.cm-c-body { margin: 6px 0; white-space: pre-line; overflow-wrap: anywhere; }
.cm-c-actions button { font-size: 13px; padding: 4px 10px; }
.cm-c-count { color: var(--muted, #6b6b6b); font-weight: 400; }
.cm-comments textarea, .cm-comments select { width: 100%; box-sizing: border-box; font: inherit; padding: 8px 10px; border: 1px solid var(--border, #d6d3cb); border-radius: 10px; background: #fff; }
.cm-comments textarea { min-height: 90px; }
.cm-comments button { font: inherit; padding: 6px 12px; border-radius: 10px; border: 1px solid var(--border, #d6d3cb); background: #fff; cursor: pointer; }
.cm-comments button.primary { background: #b45309; border-color: #b45309; color: #fff; }
.cm-comments button.danger { color: #b91c1c; border-color: #f0b4b4; }
.cm-comments button:disabled { opacity: .5; cursor: default; }
.cm-comments .cm-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.cm-comments .cm-msg.err { color: #b91c1c; }
.cm-comments .cm-msg.ok { color: #166534; }
.cm-comments .cm-hint { color: var(--muted, #6b6b6b); font-size: 13px; }
/* 會員中心：側欄＋主區（步驟 2） */
.cm-app:has(.cm-shell) { max-width: 1080px; }
.cm-shell { display: grid; grid-template-columns: 220px 1fr; gap: 20px; align-items: start; }
.cm-side { position: sticky; top: 12px; display: flex; flex-direction: column; gap: 6px; background: #fff; border: 1px solid var(--border, #e4e2dc); border-radius: 14px; padding: 14px; }
.cm-who { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.cm-who small { display: block; }
.cm-avatar { width: 40px; height: 40px; border-radius: 50%; background: #0f766e; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; flex: none; }
.cm-app .cm-newbtn { width: 100%; margin-bottom: 6px; }
.cm-app button.cm-nav, .cm-app a.cm-nav { display: block; width: 100%; box-sizing: border-box; text-align: left; border: 0; background: transparent; padding: 9px 12px; border-radius: 10px; color: inherit; text-decoration: none; font: inherit; cursor: pointer; }
.cm-app button.cm-nav:hover, .cm-app a.cm-nav:hover { background: #f1efe9; }
.cm-app button.cm-nav.on { background: #e6f4f1; color: #0f766e; font-weight: 700; }
.cm-logout { margin-top: 8px; border-top: 1px solid var(--border, #e4e2dc) !important; border-radius: 0 !important; color: var(--muted, #6b6b6b) !important; }
.cm-main h2 { margin-top: 0; }
.cm-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 12px 0; }
.cm-stat { background: #fff; border: 1px solid var(--border, #e4e2dc); border-radius: 14px; padding: 12px 14px; }
.cm-stat strong { display: block; font-size: 1.5rem; color: #0f766e; }
.cm-stat small { color: var(--muted, #6b6b6b); }
.cm-articles .cm-art { display: flex; gap: 14px; align-items: flex-start; background: #fff; border: 1px solid var(--border, #e4e2dc); border-radius: 14px; padding: 12px; margin-bottom: 10px; }
.cm-thumb { width: 112px; height: 84px; object-fit: cover; border-radius: 10px; flex: none; background: #eee; }
.cm-art-body { flex: 1; min-width: 0; }
.cm-login { max-width: 520px; margin: 16px auto; text-align: center; padding: 28px 22px; }
.cm-login h2 { margin-top: 0; font-size: 1.4rem; }
.cm-login-btns { display: flex; flex-direction: column; gap: 10px; margin: 16px 0; }
.cm-app a.cm-prov { display: block; text-align: center; text-decoration: none; padding: 12px 14px; font-weight: 700; color: #fff; border: 0; border-radius: 12px; }
.cm-prov-google { background: #1a73e8; } .cm-prov-facebook { background: #1877f2; } .cm-prov-line { background: #06c755; }
@media (max-width: 760px) { .cm-shell { grid-template-columns: 1fr; } .cm-side { position: static; flex-direction: row; flex-wrap: wrap; } .cm-who, .cm-newbtn { flex: 1 1 100%; } .cm-app button.cm-nav, .cm-app a.cm-nav { width: auto; } .cm-stats { grid-template-columns: repeat(2, 1fr); } .cm-thumb { width: 84px; height: 64px; } }
/* 編輯器：左內文、右設定與品質分數（步驟 3） */
.cm-app:has(.cm-editor) { max-width: 1180px; }
.cm-editor { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.cm-ed-side { display: flex; flex-direction: column; }
.cm-ed-side .cm-card { margin: 0 0 12px; }
.cm-actions { position: sticky; top: 8px; z-index: 5; box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.cm-ed-main textarea { min-height: 460px; }
.cm-seo summary { cursor: pointer; font-weight: 700; }
.cm-quality { border: 0; padding: 0; margin: 0; background: transparent; }
.cm-score { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: center; margin: 8px 0 12px; }
.cm-score-num strong { font-size: 2.2rem; line-height: 1; } .cm-score-num small { color: var(--muted, #6b6b6b); }
.cm-score-bar { height: 10px; border-radius: 999px; background: #eceae3; overflow: hidden; } .cm-score-bar i { display: block; height: 100%; background: #0f766e; }
.cm-score.mid .cm-score-bar i { background: #d97706; } .cm-score.bad .cm-score-bar i { background: #dc2626; } .cm-score.good .cm-score-num strong { color: #0f766e; } .cm-score.bad .cm-score-num strong { color: #dc2626; }
.cm-score > small { grid-column: 1 / -1; color: var(--muted, #6b6b6b); }
@media (max-width: 900px) { .cm-editor { grid-template-columns: 1fr; } .cm-actions { position: static; } .cm-ed-main textarea { min-height: 320px; } }
/* 列表頁卡片縮圖、站長後台（步驟 4） */
.cm-cards a { display: flex; flex-direction: column; gap: 6px; }
.cm-cards img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 10px; background: #eee; }
.cm-owner .cm-card { box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.cm-owner .cm-tabs button { border-radius: 999px; }
.cm-owner .cm-table tr:hover td { background: #faf8f3; }

/* 空狀態與分類頁 */
.cm-emptystate { max-width: 560px; margin: 24px auto 32px; padding: 40px 24px; text-align: center; }
.cm-empty-ic { display: inline-flex; width: 76px; height: 76px; align-items: center; justify-content: center; border-radius: 50%; background: #fcebec; color: #d93a3f; margin-bottom: 14px; }
.cm-emptystate h2 { margin: 0 0 8px; font-size: 1.4rem; }
.cm-emptystate p { color: #687386; margin: 0 auto 18px; max-width: 460px; }
.cm-emptystate .cm-row { justify-content: center; }
.cm-emptystate a.cm-btn { text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.cm-emptystate a.cm-btn.primary { background: #d93a3f; border-color: #d93a3f; color: #fff; }
.community-list .hero h1 { font-size: clamp(26px, 4vw, 36px); }
.community-list .hero p.cm-list-intro { max-width: 760px; color: #687386; }

/* 美食分類：地區列與食記彙整 */
.cm-regions { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 18px; }
.cm-regions a { padding: 7px 14px; border-radius: 999px; border: 1px solid #e7eaf0; background: #fff; color: inherit; text-decoration: none; font-size: 14px; }
.cm-regions a:hover { border-color: #d93a3f; }
.cm-regions a[aria-current] { background: #d93a3f; border-color: #d93a3f; color: #fff; font-weight: 700; }
.cm-foodposts h2 { font-size: 1.15rem; }
.cm-foodlist { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.cm-food { background: #fff; border: 1px solid #e7eaf0; border-radius: 12px; padding: 12px 14px; }
.cm-food a { color: inherit; text-decoration: none; }
.cm-food a:hover b { color: #d93a3f; text-decoration: underline; }
.cm-food small { display: block; color: #687386; margin-top: 2px; }
.cm-food p { margin: 6px 0 0; color: #4b5563; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.community-list .block:empty { display: none; }
.cm-food-sum { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* 分類頁：工具列、搜尋、無結果 */
.cm-herocta { margin: 14px 0 4px; }
.cm-herocta a.cm-btn { text-decoration: none; min-height: 46px; display: inline-flex; align-items: center; }
.cm-herocta a.cm-btn.primary { background: #d93a3f; border-color: #d93a3f; color: #fff; }
.cm-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 8px 0 12px; border-bottom: 1px solid #e7eaf0; }
.cm-tab { padding: 10px 4px; font-weight: 700; color: #d93a3f; border-bottom: 3px solid #d93a3f; margin-bottom: -1px; }
.cm-search input { width: min(320px, 100%); min-height: 44px; padding: 8px 14px; border: 1px solid #e7eaf0; border-radius: 12px; font: inherit; background: #fff; }
.cm-nomatch { text-align: center; padding: 36px 16px; color: #687386; } .cm-nomatch h2 { margin: 0 0 6px; color: #252a34; font-size: 1.2rem; }
.cm-cards a[hidden] { display: none; }
.cm-textcards a { padding: 14px 16px; background: #fff; border: 1px solid #e7eaf0; border-radius: 14px; }
.cm-textcards a b { font-size: 1rem; }

/* 全站搜尋頁 */
.cm-searchform { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 14px 0 4px; }
.cm-searchform input[type="search"] { flex: 1 1 260px; min-height: 46px; padding: 8px 14px; border: 1px solid #e7eaf0; border-radius: 12px; font: inherit; background: #fff; }
.cm-searchform .cm-btn { min-height: 46px; background: #d93a3f; border-color: #d93a3f; color: #fff; }
.cm-allopt { display: inline-flex; align-items: center; gap: 6px; color: #4b5563; font-size: 14px; }
