/* 화면 공통 스타일. 색은 theme.css의 색 역할 이름(var(--color-…))만 쓴다(024 FR-015). */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: "Pretendard Variable", Pretendard, system-ui, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
       line-height: 1.7; color: var(--color-text); background: var(--color-bg); overflow-wrap: anywhere; word-break: keep-all;
       -webkit-font-smoothing: antialiased; }
main { max-width: 760px; margin: 0 auto; padding: 32px 20px 48px; }
img { max-width: 100%; height: auto; }
a { color: var(--color-brand); text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.35; letter-spacing: -0.01em; }
/* 시안(10-08) 머리말: 화면 폭 띠 + 가운데 1120px 안쪽 */
.site-header { position: sticky; top: 0; z-index: 30; background: var(--color-surface); border-bottom: 1px solid var(--color-border); }
.header-inner { position: relative; max-width: 1120px; margin: 0 auto; padding: 12px 20px; display: flex; gap: 24px; align-items: center; }
.brand { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 1.15em; color: var(--color-text); text-decoration: none; flex: none; }
.brand .icon-paw, .footer-brand .icon-paw, .hero-slogan .icon-paw { color: var(--color-accent); }
.site-nav { flex: 1; display: flex; gap: 12px; align-items: center; min-width: 0; }
.site-menu { flex: 1; display: flex; gap: 12px; align-items: center; justify-content: space-between; min-width: 0; }
.menu-main, .menu-account { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.menu-main a, .menu-login { color: var(--color-text-muted); text-decoration: none; padding: 6px 12px; border-radius: 999px; font-weight: 500;
    display: inline-flex; align-items: center; gap: 4px; }
.menu-main a:hover, .menu-login:hover { color: var(--color-text); background: var(--color-surface-muted); }
.header-quick { display: flex; gap: 8px; align-items: center; flex: none; }
.menu-toggle { background: none; border: 1px solid var(--color-border); border-radius: 10px; color: var(--color-text);
    font: inherit; line-height: 1.6; padding: 2px 10px; cursor: pointer; }
/* 좁은 화면 + 스크립트 있음: 메뉴를 ☰ 안으로 접는다 */
@media (max-width: 640px) {
    .header-inner { gap: 12px; }
    .js .site-nav { justify-content: flex-end; }
    .js .site-menu { display: none; }
    .js .site-nav[data-open] .site-menu { display: flex; flex-direction: column; align-items: stretch; position: absolute; top: 100%;
        left: 0; right: 0; z-index: 20; background: var(--color-surface); border-bottom: 1px solid var(--color-border);
        padding: 8px 20px 16px; gap: 8px; box-shadow: 0 8px 16px var(--color-shadow); }
    .js .site-nav[data-open] .menu-main, .js .site-nav[data-open] .menu-account { flex-direction: column; align-items: stretch; }
    .js .site-nav[data-open] .site-menu a, .js .site-nav[data-open] .site-menu button { text-align: left; }
    .js .site-nav[data-open] .menu-account { border-top: 1px solid var(--color-border); padding-top: 8px; }
}
.site-header form { margin: 0; }
.auth-form .field { margin: 16px 0; }
.auth-form input[type=email], .auth-form input[type=text], .auth-form input[type=password] { width: 100%; max-width: 420px; padding: 8px; }
.handle-input { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.handle-input input { flex: 1 1 160px; min-width: 0; }
.field-error, .form-error { color: var(--color-danger); }
.help { color: var(--color-text-muted); font-size: 0.9em; }
.warning { color: var(--color-warning-text); }
.notice { background: var(--color-brand-soft); padding: 8px 12px; }
.password-rules { padding-left: 1.2em; font-size: 0.9em; }
/* 003 프로필: 아이콘 8색은 흰 글자와 대비 4.5:1 이상(라이트·다크 같음) */
.avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; flex: none;
          object-fit: cover; color: var(--color-on-fill); font-weight: 600; line-height: 1; overflow: hidden; vertical-align: middle; }
.avatar-c0 { background: var(--avatar-c0); } .avatar-c1 { background: var(--avatar-c1); } .avatar-c2 { background: var(--avatar-c2); }
.avatar-c3 { background: var(--avatar-c3); } .avatar-c4 { background: var(--avatar-c4); } .avatar-c5 { background: var(--avatar-c5); }
.avatar-c6 { background: var(--avatar-c6); } .avatar-c7 { background: var(--avatar-c7); }
.profile-header { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.profile-text { flex: 1 1 200px; min-width: 0; }
.profile-bio { white-space: pre-line; margin: 4px 0 0; }
.settings section { border-top: 1px solid var(--color-border); padding: 8px 0 16px; }
.settings .field { margin: 12px 0; }
/* 점검(10-08): 글자 칸 이름은 칸 위에 */
.settings .field > label:not(:has(input[type=checkbox], input[type=radio])), .auth-form .field > label { display: block; margin-bottom: 4px; }
.settings input[type=text], .settings input[type=password], .settings textarea { width: 100%; max-width: 480px; padding: 8px; font: inherit; }
.settings textarea { min-height: 6.5em; resize: vertical; }
.settings .readonly { color: var(--color-text-muted); }
/* 063 강성찬 개인 확장: 설정 섹션 메뉴(넓은 화면은 왼쪽 세로 메뉴, 좁은 화면은 위쪽 가로 줄) */
main.settings { max-width: 960px; }
.settings-nav { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--color-border); margin: 8px 0 16px; }
.settings-nav a { flex: none; padding: 8px 12px; border-radius: 8px; color: var(--color-text-muted); text-decoration: none; font-weight: 600; white-space: nowrap; }
.settings-nav a:hover { color: var(--color-text); background: var(--color-surface-muted); }
.settings-nav a[aria-current] { color: var(--color-text); background: var(--color-brand-soft); }
.settings-layout.is-sectioned .settings-panel > section:first-of-type { border-top: 0; }
@media (min-width: 720px) {
  .settings-layout { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 32px; align-items: start; }
  .settings-nav { flex-direction: column; border-bottom: 0; margin: 0; position: sticky; top: 16px; }
}
.profile-image-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.cropper { max-width: 100%; }
.cropper canvas { max-width: 100%; height: auto; touch-action: none; border-radius: 4px; background: var(--color-border); cursor: grab; }
.status-ok { color: var(--color-success); }
/* 004 편집 화면·비교 창. hidden 속성은 display를 지정한 클래스보다 우선한다 */
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.editor #post-title { width: 100%; padding: 8px; font: inherit; font-size: 1.4em; border: 0; border-bottom: 1px solid var(--color-border); }
.editor textarea { width: 100%; min-height: 60vh; padding: 8px; font: 1em/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; resize: vertical; }
.editor-bar { display: flex; gap: 12px; justify-content: space-between; align-items: center; flex-wrap: wrap; position: sticky; bottom: 0; background: var(--color-surface); padding: 8px 0; }
.editor-actions { display: flex; gap: 8px; }
.save-status { margin: 0; color: var(--color-text-muted); }
.banner-warning { background: var(--color-highlight); border: 1px solid var(--color-warning-border); padding: 8px 12px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
dialog#compare-dialog { width: min(1100px, 96vw); max-height: 90vh; padding: 12px; }
.compare-head, .compare-nav, .compare-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.compare-head h2 { font-size: 1.1em; margin: 0; }
.compare-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.compare-label { margin: 4px 0; font-weight: 600; }
.compare-body { max-height: 55vh; overflow: auto; border: 1px solid var(--color-border); font: 0.9em/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
.diff-row { display: grid; grid-template-columns: 1fr 1fr; }
.diff-cell { padding: 0 6px; white-space: pre-wrap; min-height: 1.5em; border-right: 1px solid var(--color-border); }
.diff-del { background: var(--color-danger-soft); } .diff-add { background: var(--color-success-soft); }
.diff-del mark { background: var(--color-danger-strong); } .diff-add mark { background: var(--color-success-strong); }
.diff-sign { user-select: none; color: var(--color-text-muted); }
.diff-current { outline: 2px solid var(--color-brand); }
.diff-fold { display: block; width: 100%; text-align: left; background: var(--color-surface-muted); border: 0; padding: 2px 6px; color: var(--color-text-muted); }
.diff-title { padding: 4px 6px; border-bottom: 1px solid var(--color-border); }
.overwrite-confirm { border-top: 1px solid var(--color-border); margin-top: 8px; padding-top: 8px; }
@media (max-width: 719px) { .compare-columns { display: none; } .diff-row { grid-template-columns: 1fr; } .diff-cell.diff-same-right { display: none; } }
/* 007 본문(정화된 HTML) 표시 */
.preview-panel { border: 1px dashed var(--color-border); padding: 8px 12px; margin: 8px 0; }
.post-body img { max-width: 100%; height: auto; }
.post-body pre { overflow-x: auto; background: var(--color-code-bg); padding: 12px; }
.post-body table { border-collapse: collapse; display: block; overflow-x: auto; }
.post-body th, .post-body td { border: 1px solid var(--color-border); padding: 4px 8px; }
.post-body blockquote { margin: 0; padding-left: 12px; border-left: 4px solid var(--color-border); color: var(--color-text-muted); }
/* 005 글 상세·발행 설정 */
.post-head h1 { margin: 8px 0; overflow-wrap: anywhere; }
.post-meta { color: var(--color-text-muted); }
.post-tags { list-style: none; padding: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.tag { background: var(--color-brand-soft); border-radius: 999px; padding: 0 8px; }
.publish-panel { border: 1px solid var(--color-border); padding: 12px; margin: 8px 0; }
.tag-chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.tag-box { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 6px 8px; border: 1px solid var(--color-control-border);
    border-radius: 10px; background: var(--color-surface); }
.tag-box:focus-within { outline: 2px solid var(--color-brand); outline-offset: 1px; }
.tag-box .tag-chips:empty { display: none; }
.tag-box .tag-chip { display: inline-flex; align-items: center; gap: 2px; padding: 3px 4px 3px 10px; border: 0;
    background: var(--color-surface-muted); color: var(--color-brand); font-weight: 600; }
.tag-box .tag-chip button { border: 0; background: none; padding: 0 4px; min-height: 0; color: var(--color-text-muted);
    font-size: 1.1em; line-height: 1; cursor: pointer; border-radius: 999px; }
.tag-box .tag-chip button:hover { color: var(--color-text); }
.tag-box #tag-input { flex: 1; min-width: 10em; border: 0; outline: 0; background: transparent; padding: 4px 2px; }
.tag-chip { border: 1px solid var(--color-border); border-radius: 999px; padding: 0 6px; }
.tag-chip[data-error] { border-color: var(--color-danger); }
/* 008 본문 GIF: 정지 장면 + ▶ 표시(class 없이 — 정화 허용 목록을 바꾸지 않음, 23 §5-2) */
.post-body a[href$=".gif"] { position: relative; display: inline-block; }
.post-body a[href$=".gif"]::after { content: "▶ GIF"; position: absolute; left: 8px; bottom: 8px;
    background: var(--color-overlay); color: var(--color-on-fill); padding: 2px 6px; border-radius: 4px; font-size: .8em; }
.post-body a[href$=".gif"][aria-pressed="true"]::after { content: "❚❚ 정지"; }
.alt-field { display: flex; gap: 8px; align-items: center; margin: 4px 0; flex-wrap: wrap; }
.alt-field input { flex: 1 1 200px; min-width: 0; padding: 4px; }
/* 009 글 카드·목록(10 §2·§3). 썸네일 없음은 색 역할 --color-thumb-empty */
main.list-page { max-width: 1120px; }
.card-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 640px) { .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { main.list-page:not(.search-page) .card-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* 시안(10-08) 글 카드: 작성자 → 제목 → 요약 → (사진) → 반응·날짜. 사진이 없으면 빈 칸 없음 */
.post-card { position: relative; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 18px;
    padding: 18px 18px 14px; display: flex; flex-direction: column; gap: 12px; min-width: 0;
    box-shadow: 0 2px 10px var(--color-shadow); transition: transform .15s ease, box-shadow .15s ease; }
.post-card:hover { transform: translateY(-2px); box-shadow: 0 8px 22px var(--color-shadow); }
.card-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1; }
.card-top { margin: 0 0 4px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card-author { position: relative; z-index: 1; display: inline-flex; gap: 8px; align-items: center; min-width: 0;
    color: var(--color-text); text-decoration: none; font-size: .92em; font-weight: 600; }
.card-author span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-title { font-size: 1.08em; font-weight: 700; margin: 0; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden; }
.card-link { color: inherit; text-decoration: none; }
.card-link::after { content: ""; position: absolute; inset: 0; border-radius: 18px; }
.card-link:focus-visible { outline: none; }
.post-card:focus-within { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.card-excerpt { margin: 0; color: var(--color-text-muted); font-size: .93em; line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3;
                -webkit-box-orient: vertical; overflow: hidden; }
.card-thumb { aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; background: var(--color-thumb-empty); }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-foot { margin: 0; display: flex; align-items: center; gap: 14px; color: var(--color-text-muted); font-size: .88em; }
.card-likes { color: var(--color-like); font-weight: 600; }
.card-date { margin-left: auto; }
.list-more { text-align: center; margin: 24px 0; }
/* 067 후속(강성찬 개인 확장): 무한 스크롤이면 [더 보기]는 숨기고(화면 낭독용으로만 남김) 불러오는 동안만 작게 알림 */
.list-more.infinite .more-button { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.list-more.infinite.loading::before { content: "불러오는 중…"; color: var(--color-text-muted); font-size: .9em; }
.inline-form { display: inline; }
/* 010 글 상세 */
.post-meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.reaction-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; color: var(--color-text-muted); }
.author-card { display: flex; gap: 12px; align-items: flex-start; border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); padding: 12px 0; margin: 16px 0; }
.author-card-text { flex: 1; min-width: 0; }
.author-card-text p { margin: 4px 0; }
/* 011 내 글 관리 */
.manage-tabs, .manage-filter { display: flex; gap: 12px; flex-wrap: wrap; margin: 8px 0; }
.manage-tabs a[aria-current="page"], .manage-filter a[aria-current="page"] { font-weight: 700; text-decoration: none; color: inherit; }
.post-row { flex-direction: column; align-items: stretch; }
.row-main, .row-actions { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.row-actions form { margin: 0; }
.untitled { color: var(--color-text-muted); }
/* 067 후속(강성찬 개인 확장): 내 글은 홈과 같은 카드(fragments/post-card), 관리 정보는 배지·⋯ 메뉴 */
#post-rows { margin: 16px 0; }
@media (min-width: 1100px) { main.list-page #post-rows.home-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
#post-rows > .post-row { display: flex; flex-direction: column; align-items: stretch; gap: 6px; padding: 0; border: 0; }
#post-rows > .post-row > .post-card { flex: 1; }
.manage-badges { margin: 0; padding-right: 36px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .9em; }
.manage-badges:empty { display: none; }
.sort-menu.manage-menu { position: absolute; top: 10px; right: 10px; z-index: 2; }
.sort-menu.manage-menu summary { padding: 2px 10px; font-weight: 700; letter-spacing: .1em; }
.sort-menu.manage-menu summary::before, .sort-menu.manage-menu summary::after { content: none; }
.manage-menu .sort-menu-panel form { margin: 0; display: flex; }
.manage-menu .sort-menu-panel button { all: unset; flex: 1; padding: 8px 12px; border-radius: 8px; color: var(--color-text); font-size: .92em; cursor: pointer; }
.manage-menu .sort-menu-panel button:hover, .manage-menu .sort-menu-panel button:focus-visible { background: var(--color-surface-muted); }
.manage-menu .sort-menu-panel .menu-danger { color: var(--color-danger); }
/* 메뉴가 열린 카드는 옆 카드 위로, 떠오르는 효과는 끔(메뉴가 가려지지 않게) */
.post-card:has(.manage-menu[open]) { z-index: 3; transform: none; }
/* 013 태그 */
.tag-suggest { list-style: none; margin: 4px 0; padding: 0; border: 1px solid var(--color-border); max-width: 320px; }
.tag-suggest li { padding: 4px 8px; cursor: pointer; }
.tag-suggest li:hover { background: var(--color-surface-muted); }
.tag-chip:focus { outline: 2px solid var(--color-brand); }
.tag-cloud { list-style: none; padding: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.blog-tags { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 12px 0; }
.blog-tags details { display: contents; }
.tag-filter { display: flex; gap: 12px; align-items: center; }
/* 014 댓글 */
.comment-list, .reply-list { list-style: none; padding: 0; margin: 0; }
.reply-list { margin-left: 24px; border-left: 2px solid var(--color-border); padding-left: 12px; }
.comment { padding: 8px 0; border-bottom: 1px solid var(--color-border); }
.comment-head { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 0; }
.comment-author { display: inline-flex; gap: 6px; align-items: center; color: inherit; }
.comment-content { white-space: pre-line; margin: 4px 0; }
.comment-gone { color: var(--color-text-muted); margin: 0; }
.reply-to { color: var(--color-brand); margin: 4px 0 0; font-size: .9em; }
.comment-actions { display: flex; gap: 8px; margin: 0; }
.comment.highlight { background: var(--color-highlight); transition: background 2s; }
#comment-form textarea, .comment-inline-form textarea { width: 100%; min-height: 5em; padding: 8px; font: inherit; }
.manage-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.post-rows { list-style: none; padding: 0; }
.post-row { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid var(--color-border); }
.badge { font-size: 0.8em; border: 1px solid var(--color-border); border-radius: 999px; padding: 0 8px; color: var(--color-text-muted); }
.badge-editing { border-color: var(--color-warning-border); color: var(--color-warning-text); }
/* 017 알림 */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.notif-bell-wrap { position: relative; }
.notif-bell { text-decoration: none; position: relative; }
.notif-badge { background: var(--color-danger-fill); color: var(--color-on-fill); border-radius: 999px; font-size: .75em; padding: 0 5px; position: absolute; top: 0; right: -2px; line-height: 1.5; }
.notif-panel { position: absolute; right: 0; top: 100%; z-index: 10; width: min(360px, 90vw); background: var(--color-surface);
    border: 1px solid var(--color-border); border-radius: 6px; padding: 8px; box-shadow: 0 4px 12px var(--color-shadow); }
.notif-list { list-style: none; padding: 0; margin: 0; }
.notif { display: flex; gap: 8px; align-items: flex-start; border-bottom: 1px solid var(--color-border); padding: 6px 0; }
.notif form { margin: 0; }
.notif-open { flex: 1; min-width: 0; }
.notif-main { all: unset; cursor: pointer; display: block; width: 100%; overflow-wrap: anywhere; }
.notif-main:focus-visible { outline: 2px solid var(--color-brand); }
.notif-unread .notif-message { font-weight: 700; }
.notif-dot { color: var(--color-brand); margin-right: 4px; }
.notif-time { display: block; color: var(--color-text-muted); font-size: .85em; }
/* 022 운영 */
.warning { background: var(--color-highlight); border: 1px solid var(--color-warning-border); padding: 6px 10px; border-radius: 6px; }
.snapshot { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--color-surface-muted); padding: 8px; border-radius: 6px; }
#report-form label { display: block; }
#report-form textarea { width: 100%; }
/* 016·021 처리방침 링크 */
/* 020 검색 */
.search-form { display: flex; gap: 8px; margin: 8px 0; }
.search-form input[type=search] { flex: 1; min-width: 0; }
.card-excerpt mark { background: var(--color-highlight); color: inherit; }
/* 018 팔로우 */
.follow-form { display: inline; margin: 0; }
.follow-list { list-style: none; padding: 0; }
.follow-row { display: flex; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--color-border); }
.follow-text { flex: 1; min-width: 0; }
.follow-text p { margin: 2px 0; overflow-wrap: anywhere; }
/* 077 강성찬 개인 확장: 사람 목록은 아이디 굵게, 그 아래 닉네임 작게 회색 */
.person-handle { display: block; font-weight: 700; color: var(--color-text); text-decoration: none; }
.person-handle:hover { text-decoration: underline; }
.person-nickname { display: block; font-size: .88em; color: var(--color-text-muted); }
/* 코드 문법 강조: highlight.js가 붙이는 클래스를 색 역할로(배경은 코드 배경 그대로) */
.hljs { background: transparent; color: var(--color-text); }
.hljs-keyword, .hljs-selector-tag, .hljs-built_in, .hljs-literal, .hljs-doctag { color: var(--code-keyword); }
.hljs-string, .hljs-regexp, .hljs-addition, .hljs-attribute .hljs-string { color: var(--code-string); }
.hljs-number, .hljs-symbol, .hljs-bullet, .hljs-link, .hljs-variable.language_ { color: var(--code-number); }
.hljs-comment, .hljs-quote, .hljs-deletion { color: var(--code-comment); font-style: italic; }
.hljs-title, .hljs-title.function_, .hljs-section, .hljs-name { color: var(--code-title); }
.hljs-type, .hljs-title.class_, .hljs-attr, .hljs-attribute, .hljs-params { color: var(--code-type); }
.hljs-meta, .hljs-tag, .hljs-selector-id, .hljs-selector-class, .hljs-template-variable { color: var(--code-meta); }
.hljs-emphasis { font-style: italic; } .hljs-strong { font-weight: 700; }

/* ================================================================
   디자인 시안(10-08): 버튼·입력 칸·탭·태그 공통, 소개 영역, 로그인, 블로그 머리, 글 상세, 바닥글
   ================================================================ */
/* 버튼: 기본은 테두리 둥근 보조 버튼, .btn-primary(세이지)·.btn-danger(분홍)·.btn-text */
button, .btn, .button-link { font: inherit; font-size: .93em; font-weight: 600; line-height: 1.4; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 8px 16px; border-radius: 999px; border: 1px solid var(--color-control-border);
    background: var(--color-surface); color: var(--color-text); text-decoration: none; }
button:hover, .btn:hover, .button-link:hover { background: var(--color-surface-muted); }
button:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary, #publish-open, #publish-submit, #comment-form button[type=submit], .settings form button[type=submit],
.search-form button[type=submit], .follow-button:not([aria-pressed="true"]), .empty-state button {
    background: var(--color-brand-fill); border-color: var(--color-brand-fill); color: var(--color-on-fill); }
.btn-primary:hover, #publish-open:hover, #publish-submit:hover, #comment-form button[type=submit]:hover,
.settings form button[type=submit]:hover, .search-form button[type=submit]:hover, .follow-button:not([aria-pressed="true"]):hover,
.empty-state button:hover { background: var(--color-brand); border-color: var(--color-brand); color: var(--color-surface); }
.btn-danger, #trash-post, .report-button { background: var(--color-danger-soft); border-color: var(--color-danger-soft); color: var(--color-danger); }
.btn-danger:hover, #trash-post:hover, .report-button:hover { background: var(--color-danger-soft); border-color: var(--color-danger); }
.btn-text { background: none; border-color: transparent; color: var(--color-text-muted); padding: 6px 10px; }
.btn-text:hover { background: var(--color-surface-muted); color: var(--color-text); }
.btn-sm { padding: 6px 14px; font-size: .88em; }
.btn-block { width: 100%; padding: 12px 16px; font-size: 1em; }
a.follow-button { display: inline-flex; padding: 6px 16px; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: .9em; }
.follow-button[aria-pressed="true"] { color: var(--color-brand); border-color: var(--color-brand); }
.menu-toggle { background: var(--color-surface); border: 1px solid var(--color-control-border); }
.notif-bell, .icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px;
    border-radius: 999px; color: var(--color-text); text-decoration: none; }
.notif-bell:hover, .icon-btn:hover { background: var(--color-surface-muted); }
.like-button { padding: 6px 14px; }
.like-button[aria-pressed="true"], .like-button .like-icon { color: var(--color-like); }
.list-retry, .handle-suggestion { padding: 4px 12px; font-size: .85em; }

/* 입력 칸 */
input[type=text], input[type=email], input[type=password], input[type=search], input[type=url], input:not([type]), textarea, select {
    font: inherit; color: var(--color-text); background: var(--color-surface); border: 1px solid var(--color-control-border);
    border-radius: 12px; padding: 10px 14px; max-width: 100%; }
input::placeholder, textarea::placeholder { color: var(--color-text-muted); }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 1px; border-color: var(--color-focus); }
select { padding: 6px 12px; }
.auth-form input[type=email], .auth-form input[type=text], .auth-form input[type=password] { width: 100%; max-width: none; padding: 12px 16px; border-radius: 999px; }
.settings input[type=text], .settings input[type=password], .settings textarea { padding: 10px 14px; }
fieldset { border: 1px solid var(--color-border); border-radius: 14px; padding: 12px 16px; }
input[type=checkbox], input[type=radio] { accent-color: var(--color-brand-fill); width: 1.05em; height: 1.05em; vertical-align: -2px; }

/* 안내 상자 */
.notice { background: var(--color-brand-soft); padding: 10px 14px; border-radius: 12px; }
.warning { border-radius: 12px; }
.empty-state { text-align: center; color: var(--color-text-muted); padding: 40px 16px; background: var(--color-surface);
    border: 1px dashed var(--color-border); border-radius: 18px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.badge { background: var(--color-surface-muted); }

/* 탭(최신·트렌딩, 글·사람, 내 글): 밑줄 탭 */
.manage-tabs { gap: 20px; border-bottom: 1px solid var(--color-border); margin: 8px 0 20px; }
.manage-tabs a { color: var(--color-text-muted); text-decoration: none; font-weight: 600; padding: 8px 2px; margin-bottom: -1px;
    border-bottom: 2px solid transparent; }
.manage-tabs a:hover { color: var(--color-text); }
.manage-tabs a[aria-current="page"] { color: var(--color-text); border-bottom-color: var(--color-text); }
.home-tabs { font-size: 1.1em; }
.manage-filter a { color: var(--color-text-muted); text-decoration: none; padding: 4px 12px; border-radius: 999px; }
.manage-filter a[aria-current="page"] { background: var(--color-surface-muted); color: var(--color-text); }

/* 태그 알약 */
.tag { display: inline-flex; align-items: center; background: var(--color-tag-bg); color: var(--color-tag-text); border-radius: 999px;
    padding: 4px 12px; font-size: .88em; font-weight: 600; text-decoration: none; }
.tag:hover { filter: brightness(.97); text-decoration: underline; }
.tag-cloud { gap: 10px; margin-top: 16px; }
.tag-cloud .tag { padding: 8px 18px; font-size: .95em; background: var(--color-surface); color: var(--color-text);
    border: 1px solid var(--color-border); }
.tag-cloud .tag:hover { background: var(--color-brand-soft); color: var(--color-brand); text-decoration: none; }
.tag-chip { padding: 2px 10px; background: var(--color-surface-muted); }

/* 홈 소개 영역 */
/* 본문(카드 줄)과 같은 폭 안에서, 양옆 여백을 두고 둥근 띠로(chan 10-08: 화면 폭 전체는 너무 큼) */
.hero { position: relative; margin: 0 0 32px; border-radius: 24px; overflow: hidden;
    background: linear-gradient(120deg, var(--color-hero-from), var(--color-hero-to)); }
.hero-inner { max-width: 1120px; margin: 0 auto; padding: 48px 48px; min-height: 340px; display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; gap: 24px; }
/* 사진 배너(static/images/hero.webp, 2172×724): 문구는 사진에 그려져 있으므로 글자는 화면 낭독용으로만 두고,
   검색창만 사진의 문구 아래(가로 18.5%, 세로 72%)에 얹는다. 비율을 그대로 지켜 문구 위치가 어긋나지 않게 한다 */
.hero-photo { background: url("/images/hero-38b531d1b282674148d8593ddc9e2e4b.webp") center / 100% 100% no-repeat, var(--color-hero-from); aspect-ratio: 2172 / 724; }
.hero-photo .hero-inner { position: absolute; inset: 0; max-width: none; padding: 0; min-height: 0; display: block; }
.hero-photo .hero-slogan, .hero-photo .hero-sub { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hero-photo .hero-search { position: absolute; left: 18.5%; top: 70%; width: 34%; min-width: 240px; max-width: none; }
.hero-slogan { font-family: Gaegu, "Pretendard Variable", cursive; font-size: clamp(2.2em, 5vw, 3.2em); line-height: 1.25; margin: 0 0 16px;
    color: var(--color-text); }
.hero-slogan span { display: inline-block; margin-left: 1.2em; }
.hero-slogan .icon-paw { width: .6em; height: .6em; vertical-align: .1em; }
.hero-sub { margin: 0 0 24px; color: var(--color-text-muted); font-size: 1.05em; }
.hero-search { display: flex; align-items: center; max-width: 420px; background: var(--color-surface); border-radius: 999px;
    border: 1px solid var(--color-control-border); padding: 4px 4px 4px 18px; box-shadow: 0 4px 14px var(--color-shadow); }
.hero-search input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 10px 4px; border-radius: 999px; }
.hero-search input:focus-visible { outline: none; }
.hero-search:focus-within { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.hero-search-button { border: 0; background: var(--color-brand-fill); color: var(--color-on-fill); width: 42px; height: 42px; padding: 0; }
.hero-search-button:hover { background: var(--color-brand); color: var(--color-surface); }
.hero-art { display: flex; justify-content: center; }
.cat-art { width: 100%; max-width: 420px; height: auto; border-radius: 16px; }
@media (max-width: 720px) {
    .hero-inner { grid-template-columns: 1fr; padding: 32px 20px 8px; min-height: 0; }
    /* 좁은 화면: 사진은 그대로 비율 유지, 검색창은 사진 아래로 */
    .hero-photo { aspect-ratio: auto; background-size: 100% auto; background-position: top center; padding-top: 33.33%; padding-bottom: 16px; }
    .hero-photo .hero-inner { position: static; }
    .hero-photo .hero-search { position: static; width: auto; margin: 12px 20px 0; transform: translateY(0); }
    .hero-art { order: 2; }
    .cat-art { max-width: 280px; }
}

/* 로그인·가입 */
main.auth-page { max-width: 960px; }
.auth-card { display: grid; grid-template-columns: 1fr 1fr; background: var(--color-surface); border: 1px solid var(--color-border);
    border-radius: 28px; overflow: hidden; box-shadow: 0 8px 28px var(--color-shadow); }
.auth-art { display: flex; align-items: center; justify-content: center; padding: 32px;
    background: linear-gradient(160deg, var(--color-hero-from), var(--color-hero-to)); }
/* 로그인 그림은 왼쪽 칸을 꽉 채운다(그림 바탕색 = 칸 바탕색) */
.auth-art { padding: 0; background: var(--color-cat-art-bg); overflow: hidden; }
.auth-art .cat-art { width: 100%; height: 100%; max-width: none; object-fit: contain; border-radius: 0; }
.auth-panel { padding: 48px 44px; }
.auth-panel h1 { margin: 0 0 4px; font-size: 1.6em; }
.auth-lead { margin: 0 0 24px; color: var(--color-text-muted); }
.auth-form .field { margin: 14px 0; }
.auth-form .field > label { font-weight: 600; font-size: .92em; }
.auth-form > button[type=submit] { margin-top: 8px; }
.auth-divider { display: flex; align-items: center; gap: 12px; color: var(--color-text-muted); font-size: .88em; margin: 24px 0 16px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--color-border); }
.social-login { display: flex; flex-direction: column; gap: 10px; }
.btn-social { width: 100%; padding: 11px 16px; font-size: .95em; }
.g-blue { fill: var(--color-google-blue); } .g-green { fill: var(--color-google-green); }
.g-yellow { fill: var(--color-google-yellow); } .g-red { fill: var(--color-google-red); }
.auth-links { text-align: center; color: var(--color-text-muted); font-size: .9em; margin: 20px 0 0; }
/* 070 가입 화면 덜어내기(강성찬 개인 확장): 비밀번호 규칙은 칸을 누르거나 입력하면 보임, "모두 동의" 아래로 개별 동의 */
.signup-password:not(:focus-within):has(input:placeholder-shown) .password-rules { display: none; }
.signup-agree label { display: block; margin: 4px 0; }
.signup-agree .agree-all { font-weight: 600; padding-bottom: 6px; margin-bottom: 6px; border-bottom: 1px solid var(--color-border); }
main.auth-page-single { max-width: 560px; margin-top: 32px; margin-bottom: 32px; background: var(--color-surface);
    border: 1px solid var(--color-border); border-radius: 28px; padding: 40px 40px 32px; box-shadow: 0 8px 28px var(--color-shadow); }
main.auth-page-single h1 { margin-top: 0; font-size: 1.5em; }
@media (max-width: 720px) {
    .auth-card { grid-template-columns: 1fr; }
    .auth-art .cat-art { max-height: 220px; }
    .auth-panel { padding: 28px 22px; }
    main.auth-page-single { margin: 16px; padding: 28px 20px; }
}

/* 개인 블로그 머리 */
.blog-cover { height: 140px; border-radius: 24px 24px 0 0; background: linear-gradient(120deg, var(--color-hero-from), var(--color-hero-to)); }
.blog-header { background: var(--color-surface); border: 1px solid var(--color-border); border-top: 0; border-radius: 0 0 24px 24px;
    padding: 0 28px 24px; margin-bottom: 20px; align-items: flex-start; gap: 20px; }
.blog-header > .avatar { margin-top: -44px; border: 4px solid var(--color-surface); box-sizing: content-box; }
.blog-header .profile-text { padding-top: 14px; }
.blog-header .profile-handle { display: block; font-size: 1.45em; font-weight: 800; color: var(--color-text); text-decoration: none; overflow-wrap: anywhere; }
.blog-header .profile-text p { margin: 6px 0 0; }
.blog-header .follow-button { margin-top: 6px; }
.author-nickname { font-weight: 600; }

/* 글 상세 */
.post-head h1 { font-size: clamp(1.6em, 4.5vw, 2.3em); margin: 12px 0 14px; line-height: 1.3; }
.post-meta { color: var(--color-text-muted); font-size: .93em; }
.post-body { font-size: 1.06em; line-height: 1.85; margin-top: 28px; }
.post-body h2 { margin-top: 2em; font-size: 1.45em; }
.post-body h3 { margin-top: 1.6em; font-size: 1.2em; }
.post-body pre { border-radius: 14px; padding: 16px 18px; font-size: .9em; line-height: 1.6; }
.post-body :not(pre) > code { background: var(--color-code-bg); border-radius: 6px; padding: .1em .4em; font-size: .9em; }
.post-body blockquote { border-left-color: var(--color-brand); background: var(--color-surface-muted); padding: 10px 16px; border-radius: 0 12px 12px 0; }
.post-body img { border-radius: 14px; }
.post-tags { margin: 28px 0 8px; }
.reaction-row { padding: 16px 0; border-bottom: 1px solid var(--color-border); gap: 16px; }
.author-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 20px; padding: 20px; margin: 28px 0; }

/* 댓글 */
.comment { padding: 14px 0; }
#comment-form textarea, .comment-inline-form textarea { border-radius: 16px; padding: 12px 16px; }
#comment-form button[type=submit] { margin-top: 8px; }
.reply-list { border-left-color: var(--color-border); }

/* 내 글·알림·팔로우 목록 */
.post-row, .follow-row, .notif { border-bottom-color: var(--color-border); }
.notif-panel { border-radius: 16px; padding: 12px; }

/* 편집기 */
.editor #post-title { font-size: 1.8em; font-weight: 700; background: transparent; border: 0; border-bottom: 1px solid var(--color-border);
    border-radius: 0; padding: 8px 2px; }
.editor textarea { border-radius: 16px; padding: 16px 18px; background: var(--color-surface); }
/* 068 후속(강성찬 개인 확장): 글쓰기 화면은 사이트 머리말을 숨기고 글쓰기 머리말을 위에 붙임(배경은 화면 폭 전체) */
body:has(main.editor) > .site-header { display: none; }
main.editor { padding-top: 0; }
.editor-bar { position: sticky; top: 0; bottom: auto; z-index: 30; margin: 0 0 20px; padding: 10px 0; flex-wrap: nowrap;
    background: var(--color-surface); border: 0;
    box-shadow: 0 0 0 100vmax var(--color-surface), 0 1px 0 100vmax var(--color-border); clip-path: inset(0 -100vmax -1px); }
.editor-exit { flex: none; color: var(--color-text); text-decoration: none; font-weight: 600; }
.editor-bar .save-status { flex: 1; min-width: 0; text-align: right; font-size: .88em; }
.editor-bar .editor-actions { flex: none; }
.editor-tools { flex: none; display: flex; gap: 4px; padding-left: 10px; margin-left: 2px; border-left: 1px solid var(--color-border); }
.editor-tools button { display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; font-size: .88em; border-color: transparent; background: none; }
.editor-tools button:hover { background: var(--color-surface-muted); }
/* 좁은 화면: "저장됨 시각"·"기기에 저장됨"은 숨기고(자동 저장은 그대로), 오프라인·충돌·오류는 버튼 아래 줄에 */
@media (max-width: 560px) {
    .editor-bar { flex-wrap: wrap; row-gap: 6px; }
    .editor-bar .editor-actions { gap: 6px; margin-left: auto; }
    .editor-bar .editor-actions button { padding: 6px 10px; font-size: .88em; }
    .editor-bar .save-status { order: 3; flex-basis: 100%; text-align: left; }
    .editor-tools { padding-left: 6px; gap: 2px; }
    .editor-tools .tool-label { display: none; }
    .editor-tools button { padding: 6px 8px; }
    .editor-exit { font-size: .92em; }
    .editor-bar .save-status:empty, .editor-bar .save-status[data-kind="saved"], .editor-bar .save-status[data-kind="local"] { display: none; }
}
.publish-panel, .preview-panel { border-radius: 18px; background: var(--color-surface); padding: 16px 20px; }
/* 068 발행 설정 팝업(강성찬 개인 확장) */
dialog.publish-panel { width: min(640px, calc(100% - 32px)); max-height: calc(100vh - 48px); overflow: auto; margin: auto; color: var(--color-text); }

/* 검색 */
.search-form { gap: 10px; margin: 8px 0 16px; }
.search-form input[type=search] { border-radius: 999px; padding: 12px 18px; }

/* 오류 화면 */
.error-page { text-align: center; padding-top: 48px; }
.error-art .cat-art { max-width: 260px; }

/* 바닥글 */
.site-footer { margin-top: 48px; border-top: 1px solid var(--color-border); background: var(--color-surface); }
.footer-inner { max-width: 1120px; margin: 0 auto; padding: 18px 20px; display: flex; gap: 8px 20px; align-items: center; flex-wrap: wrap; }
.footer-brand { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: 800; }
.footer-slogan { margin: 0; color: var(--color-text-muted); font-family: Gaegu, "Pretendard Variable", cursive; font-size: 1.15em; }
.footer-links { margin: 0 0 0 auto; font-size: .9em; }
.footer-links a { color: var(--color-text-muted); }
.more-button { display: inline-flex; padding: 10px 28px; border-radius: 999px; border: 1px solid var(--color-control-border);
    background: var(--color-surface); color: var(--color-text); text-decoration: none; font-weight: 600; }
.more-button:hover { background: var(--color-surface-muted); }
.comment-actions button { padding: 2px 10px; font-size: .82em; font-weight: 500; border-color: transparent; background: none; color: var(--color-text-muted); }
.comment-actions button:hover { background: var(--color-surface-muted); color: var(--color-text); }
/* 내용이 짧아도 바닥글은 화면 아래에 */
body { min-height: 100vh; display: flex; flex-direction: column; }
body > main { width: 100%; }
.site-footer { margin-top: auto; }
body > main + .site-footer, body > div + .site-footer { margin-top: auto; }
/* 카드 머리 태그(시안 10-08) */
.card-tag { position: relative; z-index: 1; margin-left: auto; flex: none; border-radius: 999px; padding: 2px 10px; font-size: .78em;
    font-weight: 600; text-decoration: none; max-width: 50%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-tag:hover { text-decoration: underline; }
.chip0 { background: var(--color-chip0-bg); color: var(--color-chip0-text); }
.chip1 { background: var(--color-chip1-bg); color: var(--color-chip1-text); }
.chip2 { background: var(--color-chip2-bg); color: var(--color-chip2-text); }
.chip3 { background: var(--color-chip3-bg); color: var(--color-chip3-text); }
/* 홈 탭 줄: 왼쪽 탭, 오른쪽 더보기 */
.home-tabs-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--color-border); margin: 8px 0 20px; }
.home-tabs-row .manage-tabs { border-bottom: 0; margin: 0; }
html, body { overflow-x: clip; }
/* 025 친구(강성찬 개인 확장) */
.friend-form { display: inline-flex; gap: 6px; align-items: center; margin: 0 0 0 6px; }
.friend-badge { color: var(--color-brand); font-weight: 600; font-size: .9em; }
.friend-search { display: flex; gap: 6px; margin: 0 0 12px; }
.friend-search input { flex: 1; min-width: 0; }
.friends-page section { margin: 24px 0; }
/* 028 답글 무제한 깊이(강성찬 개인 확장): 들여쓰기는 3단계 폭까지만 늘고 그 뒤로는 같은 폭 */
.reply-list .reply-list .reply-list .reply-list { margin-left: 0; }
.replies-rest, .replies-fold { margin: 4px 0; }
.replies-rest > details > summary, .replies-fold > summary { cursor: pointer; color: var(--color-brand); font-size: .9em; padding: 4px 0; }
/* 029 링크 공개(강성찬 개인 확장) */
.share-link input { width: 100%; font-size: .9em; }
.share-link p { margin: 6px 0; }
/* 030 친구 그룹(강성찬 개인 확장) */
.group-create, .group-add { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 12px 0; }
.group-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 18px; padding: 16px 20px; margin: 16px 0; }
.group-card h2 { margin: 0 0 8px; font-size: 1.1em; }
.group-choice { display: inline-flex; gap: 6px; align-items: center; margin-right: 14px; }
/* 031 잔디·스트릭(강성찬 개인 확장): 주 53개 × 7일, 좁은 화면에서는 가로로 밀어 본다 */
.grass { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 18px; padding: 14px 18px; margin: 0 0 20px; }
.grass-title { margin: 0 0 10px; font-size: 1em; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.grass-streak { color: var(--color-accent); font-weight: 700; }
.grass-grid { display: flex; gap: 3px; overflow-x: auto; padding-bottom: 4px; }
.grass-week { display: flex; flex-direction: column; gap: 3px; }
.grass-day { width: 11px; height: 11px; border-radius: 3px; background: var(--color-grass-0); }
.grass-1 { background: var(--color-grass-1); } .grass-2 { background: var(--color-grass-2); }
.grass-3 { background: var(--color-grass-3); } .grass-4 { background: var(--color-grass-4); }
/* 032 작성자 통계(강성찬 개인 확장): 막대 높이는 서버가 정한 % (style 속성, 색은 역할) */
main.stats-page { max-width: 900px; }
.stats-totals { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.stats-totals li { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 16px; padding: 14px 16px;
    display: flex; flex-direction: column; gap: 2px; }
.stats-number { font-size: 1.6em; font-weight: 800; }
.stats-totals li span:last-child { color: var(--color-text-muted); font-size: .9em; }
.stats-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 18px; padding: 16px 20px; margin: 20px 0; }
.stats-card h2 { margin: 0 0 12px; font-size: 1.1em; }
.stats-bars { display: flex; align-items: flex-end; gap: 3px; height: 140px; }
.stats-bar { flex: 1; height: 100%; display: flex; align-items: flex-end; background: var(--color-surface-muted); border-radius: 4px; }
.stats-bar-fill { width: 100%; background: var(--color-brand-fill); border-radius: 4px; }
.stats-axis { display: flex; justify-content: space-between; color: var(--color-text-muted); font-size: .85em; margin-top: 4px; }
.stats-table { border-collapse: collapse; margin-top: 8px; }
.stats-table th, .stats-table td { padding: 2px 12px; text-align: right; border-bottom: 1px solid var(--color-border); }
.stats-top li { margin: 6px 0; }
/* 033 짧은 기록(강성찬 개인 확장) */
.notes-box { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 18px; padding: 14px 18px; margin: 0 0 20px; }
.note-form textarea { width: 100%; min-height: 4.5em; resize: vertical; }
.note-form-bar { display: flex; gap: 8px; justify-content: flex-end; align-items: center; margin-top: 6px; }
.note-list { list-style: none; padding: 0; margin: 8px 0 0; }
.note { border-top: 1px solid var(--color-border); padding: 10px 0; }
.note-content { white-space: pre-line; margin: 0 0 4px; }
.note-meta { margin: 0; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
main.notes-page .note-list { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 18px; padding: 4px 18px; }
/* 034 같은 주제로 쓰기(강성찬 개인 확장) */
.mission-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.mission-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 16px; padding: 14px 16px; }
.mission-card p { margin: 4px 0 0; }
.mission-title { font-weight: 700; color: var(--color-text); text-decoration: none; }
.mission-ended { opacity: .75; }
.mission-desc { white-space: pre-line; }
.mission-relay { list-style: none; padding: 0; }
.mission-relay li { display: flex; gap: 10px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--color-border); flex-wrap: wrap; }
.relay-order { min-width: 2em; height: 2em; border-radius: 999px; background: var(--color-brand-soft); color: var(--color-brand);
    display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.mission-join { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 12px 0; }
.post-missions { display: flex; gap: 8px; flex-wrap: wrap; }
/* 035 AI 티저(강성찬 개인 확장) */
.teaser-box h2 { margin: 0 0 4px; font-size: 1em; }
.teaser-form { display: flex; gap: 8px; align-items: center; margin: 8px 0; }
.teaser-form input { flex: 1; min-width: 0; }
/* 036 새로 온 작가(강성찬 개인 확장) */
.newcomers { margin: 0 0 24px; }
.newcomers h2 { font-size: 1.05em; margin: 0 0 10px; display: flex; gap: 8px; align-items: baseline; }
/* 067 후속(강성찬 개인 확장): 줄바꿈 대신 한 줄로 밀어 보기(손가락·가로 스크롤·마우스 끌기) */
.newcomer-list { list-style: none; padding: 0 0 6px; margin: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 220px; gap: 12px;
    overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; }
.newcomer-list > li { scroll-snap-align: start; }
.newcomer-list.dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.newcomer { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 16px; padding: 12px 14px;
    display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.newcomer-who { display: inline-flex; gap: 8px; align-items: center; color: var(--color-text); text-decoration: none; font-weight: 700; }
.newcomer-post { color: var(--color-text-muted); font-size: .9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 068 피드 추천 블로그(강성찬 개인 확장): 새로 온 작가 카드 모양을 따른다 */
.feed-recommended { margin: 0 0 24px; }
.feed-recommended h2, .feed-following-heading { font-size: 1.05em; margin: 0 0 10px; display: flex; gap: 8px; align-items: baseline; }
.recommended-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.recommended-blog { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 16px; padding: 12px 14px;
    display: flex; flex-direction: column; gap: 6px; align-items: flex-start; min-width: 0; }
.recommended-bio { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }

/* 039 목차·038 이전/다음 글·관련 글(강성찬 개인 확장) */
.post-toc { border: 1px solid var(--color-border); border-radius: 12px; padding: 12px 16px; margin: 16px 0; background: var(--color-surface); }
.post-toc-title { margin: 0 0 6px; font-weight: 700; }
.post-toc ol { margin: 0; padding-left: 1.2em; }
.post-toc li { margin: 2px 0; }
.post-toc .toc-sub { margin-left: 1em; list-style: circle; }
.post-toc a { color: var(--color-text); text-decoration: none; }
.post-toc a:hover { text-decoration: underline; }
@media (min-width: 1240px) {
    .post-toc { position: fixed; top: 96px; right: max(16px, calc((100vw - 760px) / 2 - 260px)); width: 220px; max-height: 70vh; overflow: auto; margin: 0; font-size: .9em; }
}
.post-nav { display: flex; gap: 12px; margin: 24px 0; }
.post-nav a { flex: 1; display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--color-border);
    border-radius: 12px; color: var(--color-text); text-decoration: none; background: var(--color-surface); }
.post-nav a:hover { background: var(--color-surface-muted); }
.post-nav .post-nav-next { text-align: right; }
/* 075 글 상세 작성자 ⋯ 메뉴·글 설정 창(강성찬 개인 확장): 읽는 흐름엔 글만, 작성자 도구는 작성자 줄 오른쪽에 */
.post-meta-row { display: flex; gap: 8px; align-items: center; }
.post-meta-row .post-meta { flex: 1; min-width: 0; margin: 0; }
.post-owner-menu summary { padding: 2px 10px; font-weight: 700; letter-spacing: .1em; }
.post-owner-menu summary::before, .post-owner-menu summary::after { content: none; }
.post-owner-menu .sort-menu-panel { min-width: 210px; gap: 2px; }
.post-owner-menu .sort-menu-panel form { margin: 0; display: flex; }
.post-owner-menu .sort-menu-panel button, .post-owner-menu .sort-menu-panel #trash-post { all: unset; flex: 1; padding: 8px 12px; border-radius: 8px;
    color: var(--color-text); font-size: .92em; cursor: pointer; }
.post-owner-menu .sort-menu-panel button:hover, .post-owner-menu .sort-menu-panel button:focus-visible { background: var(--color-surface-muted); }
.post-owner-menu .menu-field { display: flex; flex-direction: column; gap: 4px; padding: 6px 12px; font-size: .85em; color: var(--color-text-muted); }
.post-owner-menu .sort-menu-panel #trash-post { color: var(--color-danger); border-top: 1px solid var(--color-border); border-radius: 0 0 8px 8px; margin-top: 4px; }
dialog.post-settings { width: min(560px, calc(100% - 32px)); max-height: calc(100vh - 48px); overflow: auto; margin: auto; color: var(--color-text);
    background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 18px; padding: 16px 20px; }
.post-settings-head { display: flex; align-items: center; justify-content: space-between; }
.post-settings-head h2 { margin: 0; font-size: 1.1em; }
.post-settings .teaser-box { margin: 12px 0 0; }
a.author-byline.author-nickname { color: var(--color-text); text-decoration: none; }
a.author-byline.author-nickname:hover { text-decoration: underline; }
/* 075: 상자끼리 붙지 않게 간격, 미션 표시는 태그 근처에 작게 */
.post-category, .post-missions { margin: 8px 0; font-size: .9em; }
.mission-done-note { margin: 8px 0; padding: 8px 12px; font-size: .88em; }
/* 080 강성찬 개인 확장: velog처럼 작성자 줄 오른쪽 팔로우, 태그는 그 아래, 댓글 다음 관심 있을 만한 글 */
.post-meta-row .follow-form, .post-meta-row > .follow-button { flex: none; }
.post-head .post-tags { margin: 14px 0 0; }
.more-posts { margin: 48px 0 24px; padding-top: 28px; border-top: 1px solid var(--color-border); }
.more-posts h2 { font-size: 1.2em; margin: 0 0 16px; }
/* 037 카테고리·041 시리즈·040 방명록·043 비밀 댓글(강성찬 개인 확장) */
.blog-links { display: flex; gap: 12px; flex-wrap: wrap; }
.blog-links a { text-decoration: none; }
.blog-categories { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 16px; }
.category-link { padding: 4px 12px; border-radius: 999px; border: 1px solid var(--color-border); color: var(--color-text);
    text-decoration: none; background: var(--color-surface); font-size: .92em; }
.category-link:hover { background: var(--color-surface-muted); }
.category-link.active { border-color: var(--color-brand); color: var(--color-brand); font-weight: 700; }
.post-category-form, .series-form { margin: 12px 0; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.series-box { border: 1px solid var(--color-border); border-radius: 12px; padding: 10px 16px; margin: 12px 0; background: var(--color-surface); }
.series-box summary { cursor: pointer; font-weight: 700; }
.series-items { margin: 8px 0 0; padding-left: 1.4em; }
/* 067 시리즈 글도 홈과 같은 카드로(강성찬 개인 확장), 순서는 "N편" 배지 */
.series-cards { list-style: none; padding: 0; margin: 16px 0; }
.series-cards > li { display: flex; }
.series-cards > li > .post-card { flex: 1; }
.series-nav { display: flex; justify-content: space-between; gap: 12px; margin: 8px 0 0; flex-wrap: wrap; }
.secret-check { display: inline-flex; gap: 6px; align-items: center; margin: 6px 0; font-size: .92em; }
.schedule-field input[type="datetime-local"] { margin-top: 6px; }
/* 045~050 관리자 화면 확장·사이트 공지(강성찬 개인 확장) */
.admin-nav { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 18px; }
.admin-nav a { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--color-border); color: var(--color-text);
    text-decoration: none; background: var(--color-surface); font-size: .92em; }
.admin-nav a.active { border-color: var(--color-brand); color: var(--color-brand); font-weight: 700; }
.admin-stats { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin: 0 0 20px; }
.admin-stats li { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 16px; padding: 14px 16px;
    display: flex; flex-direction: column; gap: 2px; }
.admin-stats strong { font-size: 1.8em; }
.admin-stats li.admin-alert { border-color: var(--color-danger); }
.admin-week { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 16px; padding: 14px 18px; }
.admin-bars { display: flex; gap: 10px; align-items: flex-end; height: 160px; margin: 10px 0; }
.admin-day { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; }
.admin-day-bars { flex: 1; width: 100%; display: flex; gap: 2px; align-items: flex-end; justify-content: center; }
.admin-day-bars .bar { width: 28%; min-height: 2px; border-radius: 4px 4px 0 0; }
.bar-members, .legend-members { background: var(--color-brand); }
.bar-posts, .legend-posts { background: var(--color-accent); }
.bar-comments, .legend-comments { background: var(--color-text-muted); }
.legend { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin: 0 4px 0 10px; }
.admin-log-table td, .admin-log-table th { text-align: left; }
.site-notice { background: var(--color-surface-muted); border-bottom: 1px solid var(--color-border); padding: 8px 16px;
    text-align: center; font-size: .92em; }
.site-notice a { margin-left: 8px; }
/* 051~054 방문자 수·읽기 진행 막대·공유하기·고정 글(강성찬 개인 확장) */
.read-progress { position: fixed; top: 0; left: 0; right: 0; height: 4px; z-index: 50; background: transparent; pointer-events: none; }
.read-progress span { display: block; height: 100%; width: 0; background: var(--color-brand); border-radius: 0 4px 4px 0;
    transition: width .08s linear; }
.share-menu summary::before, .share-menu summary::after { content: none; }
.share-menu .sort-menu-panel { left: 0; right: auto; }
.share-menu .sort-menu-panel button { all: unset; padding: 8px 12px; border-radius: 8px; color: var(--color-text); font-size: .92em; cursor: pointer; }
.share-menu .sort-menu-panel button:hover, .share-menu .sort-menu-panel button:focus-visible { background: var(--color-surface-muted); }
.pin-form { margin: 8px 0; }
.pinned-post { margin: 0 0 18px; }
.pinned-label { margin: 0 0 8px; font-weight: 700; }
/* 홈 리뉴얼(강성찬 개인 확장, 10-12 시안) — 머리말 */
.menu-main a[aria-current="page"] { color: var(--color-brand); background: transparent; border-radius: 0;
    box-shadow: inset 0 -2px 0 var(--color-brand); font-weight: 700; }
.btn-write { display: inline-flex; align-items: center; gap: 6px; }
.profile-menu { position: relative; }
.profile-menu summary { list-style: none; cursor: pointer; display: inline-flex; border-radius: 999px; }
.profile-menu summary::-webkit-details-marker { display: none; }
.profile-menu summary:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.profile-menu-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; min-width: 180px; display: flex; flex-direction: column;
    background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 12px; padding: 6px; box-shadow: 0 8px 22px var(--color-shadow); }
.profile-menu-panel a, .profile-menu-panel button { display: block; width: 100%; text-align: left; padding: 8px 12px; border-radius: 8px;
    color: var(--color-text); text-decoration: none; }
.profile-menu-panel a:hover, .profile-menu-panel button:hover { background: var(--color-surface-muted); }
/* 078: 머리말 검색 패널(입력창+추천 태그). 좁은 화면은 머리말 폭 전체 */
.search-menu { position: relative; }
.search-menu summary { list-style: none; cursor: pointer; }
.search-menu summary::-webkit-details-marker { display: none; }
.search-menu-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; width: min(420px, calc(100vw - 32px)); display: flex;
    flex-direction: column; gap: 10px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 12px;
    padding: 14px; box-shadow: 0 8px 22px var(--color-shadow); }
.search-menu-panel .search-form { display: flex; gap: 8px; margin: 0; }
.search-menu-panel .search-form input { flex: 1; min-width: 0; }
.search-menu-title { margin: 0; font-size: .85em; font-weight: 700; color: var(--color-text-muted); }
.search-menu-tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.search-menu-tags .tag-pill { padding: 6px 12px; gap: 6px; font-size: .88em; }
.search-menu-all { align-self: flex-end; font-size: .85em; color: var(--color-text-muted); }
@media (max-width: 640px) {
    .search-menu { position: static; }
    .search-menu-panel { position: absolute; left: 0; right: 0; top: 100%; width: auto; border-radius: 0; border-width: 0 0 1px; }
}
/* 본문 2단 */
.home-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
@media (min-width: 1000px) { .home-layout { grid-template-columns: minmax(0, 1fr) 280px; } }
.home-section-title { margin: 0 12px 6px 0; font-size: 1.35em; font-weight: 800; }
.home-tabs-row { align-items: center; }
.home-tabs-row .home-tabs { flex: 1; }
/* 가로 카드 2열 */
main.list-page .home-cards { grid-template-columns: minmax(0, 1fr); gap: 18px; }
@media (min-width: 700px) { main.list-page .home-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { main.list-page:not(.search-page) .home-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.home-cards .post-card { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "body" "foot"; gap: 10px; }
.home-cards .post-card:has(.card-thumb) { grid-template-columns: 120px minmax(0, 1fr); grid-template-areas: "thumb body" "thumb foot"; column-gap: 14px; }
.home-cards .card-thumb { grid-area: thumb; aspect-ratio: auto; height: 100%; min-height: 120px; max-height: 190px; }
.home-cards .card-foot { flex-wrap: nowrap; white-space: nowrap; gap: 10px; font-size: .85em; }
.home-cards .card-foot .card-date { margin-left: auto; }
@media (min-width: 1300px) { .home-cards .post-card:has(.card-thumb) { grid-template-columns: 150px minmax(0, 1fr); } }
.home-cards .card-body { grid-area: body; }
.home-cards .card-foot { grid-area: foot; }
.home-cards .card-excerpt { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
/* 오른쪽 */
.home-side { display: flex; flex-direction: column; gap: 18px; }
/* 067 후속: 넓은 화면은 오른쪽 칸이 화면에 붙어 따라오고, 칸이 화면보다 길면 칸 안에서만 스크롤 */
@media (min-width: 1000px) { .home-side { position: sticky; top: 76px; align-self: start; max-height: calc(100vh - 92px); overflow-y: auto;
    scrollbar-width: thin; } } /* 휠이 칸 끝에서 페이지로 넘어가게 overscroll-behavior는 두지 않음 */
.side-post-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.side-post-list li { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.side-post-list a { color: var(--color-text); text-decoration: none; font-weight: 600; font-size: .92em; line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.side-post-list a:hover { text-decoration: underline; }
.side-post-list .help { font-size: .8em; }
.side-rec-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.side-rec-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.side-rec-list .newcomer-who { min-width: 0; font-weight: 600; font-size: .92em; }
.side-rec-list .newcomer-who span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-rec-list .follow-form { margin: 0; flex: none; }
.side-rec-list .follow-button { padding: 4px 12px; font-size: .82em; }
/* 067 후속: 링크 넷은 한 줄(작은 회색 글씨, 사이에 ·), 슬로건만 다음 줄 */
.side-links { display: flex; flex-wrap: wrap; gap: 6px 0; padding: 0 2px; font-size: .74em; }
.side-links a { color: var(--color-text-muted); text-decoration: none; white-space: nowrap; }
.side-links a + a::before { content: "·"; margin: 0 4px; color: var(--color-text-muted); display: inline-block; text-decoration: none; }
.side-links a:hover { color: var(--color-text); text-decoration: underline; }
/* 067 후속: 오른쪽 칸 링크가 보이는 넓은 화면은 맨 아래 꼬리말(같은 링크)을 숨김, 좁은 화면은 꼬리말 그대로 */
.side-slogan { display: none; flex-basis: 100%; margin: 4px 0 0; font-size: 1.1em; color: var(--color-text-muted); font-family: Gaegu, "Pretendard Variable", cursive; }
@media (min-width: 1000px) { body:has(.home-side .side-links) > .site-footer { display: none; } .side-slogan { display: block; }
    /* 프로필 메뉴 안 같은 링크도 이때는 숨김(오른쪽 칸 없는 화면·휴대폰은 그대로) */
    body:has(.home-side .side-links) .profile-menu-links { display: none; } }
.menu-links { display: none; }
@media (max-width: 640px) {
    .menu-links { display: flex; flex-wrap: wrap; gap: 4px 12px; padding-top: 8px; border-top: 1px solid var(--color-border); }
    .site-nav .menu-links a { font-size: .82em; color: var(--color-text-muted); padding: 2px 0; }
}
.profile-menu-panel .profile-menu-links { margin: 4px 0; padding: 6px 12px 2px; border-top: 1px solid var(--color-border); display: flex; flex-wrap: wrap; gap: 2px 10px; }
.profile-menu-panel .profile-menu-links a { display: inline; width: auto; padding: 2px 0; font-size: .8em; color: var(--color-text-muted); }
.side-box { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 16px; padding: 16px 18px; }
.side-box h2 { margin: 0 0 12px; font-size: 1.05em; display: flex; align-items: center; gap: 6px; }
.side-box h2 .icon { width: 18px; height: 18px; }
.side-tags { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.side-tags li { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.side-tags a { padding: 4px 10px; border-radius: 999px; text-decoration: none; font-size: .9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 꼬리말 */
.footer-inner { justify-content: space-between; }
.footer-slogan { color: var(--color-text-muted); margin: 0; }
.footer-links { display: flex; gap: 16px; margin: 0; }
.footer-links a { color: var(--color-text-muted); text-decoration: none; font-size: .9em; }
.footer-links a:hover { color: var(--color-text); text-decoration: underline; }
/* 055 카드 대표 사진 고르기(강성찬 개인 확장) */
.cover-field .field-label { margin: 0; font-weight: 600; }
.cover-choices { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 4px; }
.cover-choice { width: 104px; height: 72px; padding: 0; border: 2px solid var(--color-border); border-radius: 10px; overflow: hidden;
    background: var(--color-surface-muted); color: var(--color-text); cursor: pointer; display: inline-flex; align-items: center;
    justify-content: center; font-size: .82em; line-height: 1.3; text-align: center; }
.cover-choice span { padding: 0 6px; }
.cover-choice img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-choice.selected { border-color: var(--color-brand); box-shadow: 0 0 0 2px var(--color-brand); }
.cover-choice:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
/* 056 태그 화면·태그 알약(강성찬 개인 확장, 10-12 시안) */
.tone-green { --tone-bg: var(--tone-green-bg); --tone-fg: var(--tone-green-fg); }
.tone-pink { --tone-bg: var(--tone-pink-bg); --tone-fg: var(--tone-pink-fg); }
.tone-sand { --tone-bg: var(--tone-sand-bg); --tone-fg: var(--tone-sand-fg); }
.tone-blue { --tone-bg: var(--tone-blue-bg); --tone-fg: var(--tone-blue-fg); }
.tone-indigo { --tone-bg: var(--tone-indigo-bg); --tone-fg: var(--tone-indigo-fg); }
.tone-orange { --tone-bg: var(--tone-orange-bg); --tone-fg: var(--tone-orange-fg); }
.tone-yellow { --tone-bg: var(--tone-yellow-bg); --tone-fg: var(--tone-yellow-fg); }
.tone-purple { --tone-bg: var(--tone-purple-bg); --tone-fg: var(--tone-purple-fg); }
.tone-teal { --tone-bg: var(--tone-teal-bg); --tone-fg: var(--tone-teal-fg); }
.tone-gray { --tone-bg: var(--tone-gray-bg); --tone-fg: var(--tone-gray-fg); }
.tag-pills { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 14px 16px; }
.tag-pill { display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 999px; background: var(--tone-bg);
    color: var(--color-text); text-decoration: none; border: 1px solid transparent; transition: transform .12s ease, box-shadow .12s ease; }
.tag-pill:hover { transform: translateY(-1px); box-shadow: 0 6px 16px var(--color-shadow); }
.tag-pill:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.tag-pill .tag-ic { color: var(--tone-fg); flex: none; }
.tag-pill-name { font-weight: 600; }
.tag-pill-count { color: var(--color-text-muted); font-size: .88em; margin-left: 6px; }
.tag-pill-arrow { color: var(--color-text-muted); }
.tags-hero { display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; overflow: hidden; border-radius: 22px;
    background: linear-gradient(120deg, var(--color-hero-from), var(--color-hero-to)); margin: 8px 0 28px; min-height: 200px; }
@media (min-width: 760px) { .tags-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.tags-hero-text { padding: 36px 44px; }
.tags-hero h1 { margin: 0 0 14px; font-family: Gaegu, "Pretendard Variable", cursive; font-size: 2.6em; display: flex; align-items: center; gap: 10px; }
.tags-hero h1 .icon-paw { color: var(--color-accent); width: 1em; height: 1em; }
.tags-hero-paw .icon-paw { width: .55em; height: .55em; }
.tags-hero p { margin: 0; color: var(--color-text-muted); font-size: 1.05em; line-height: 1.7; }
.tags-hero-art { display: block; justify-self: end; width: auto; max-width: calc(100% - 40px); height: 220px; object-fit: cover;
    border-radius: 18px; margin: 18px 24px; }
@media (max-width: 759px) { .tags-hero-art { height: 150px; justify-self: center; margin: 4px 16px 18px; } .tags-hero-text { padding: 26px 24px 0; } }
.tags-box { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 22px; padding: 24px 28px 30px; }
.tags-box-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.tags-box-head h2 { margin: 0; display: flex; align-items: center; gap: 10px; font-size: 1.35em; }
.tags-box-head h2 .icon { color: var(--color-accent); }
.count-chip { font-size: .62em; font-weight: 500; color: var(--color-text-muted); border: 1px solid var(--color-border); border-radius: 999px;
    padding: 3px 12px; }
.sort-menu { position: relative; }
.sort-menu summary { list-style: none; cursor: pointer; border: 1px solid var(--color-control-border); border-radius: 999px; padding: 6px 14px;
    font-size: .9em; color: var(--color-text-muted); background: var(--color-surface); }
.sort-menu summary::-webkit-details-marker { display: none; }
.sort-menu summary::before { content: "⇅ "; }
.sort-menu summary::after { content: " ⌄"; }
.sort-menu-panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 10; min-width: 140px; display: flex; flex-direction: column;
    background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 12px; padding: 6px; box-shadow: 0 8px 22px var(--color-shadow); }
.sort-menu-panel a { padding: 8px 12px; border-radius: 8px; color: var(--color-text); text-decoration: none; font-size: .92em; }
.sort-menu-panel a:hover, .sort-menu-panel a[aria-current] { background: var(--color-surface-muted); }
/* 홈 오른쪽 인기 태그는 작게 */
.side-pills { gap: 8px; }
.side-pills .tag-pill { padding: 6px 12px; gap: 6px; font-size: .88em; }
.side-pills .tag-ic { width: 16px; height: 16px; }
.side-pills .tag-pill-arrow { display: none; }
/* 057 오늘의 미션(강성찬 개인 확장) */
.mission-hero h1 span { font-family: Gaegu, "Pretendard Variable", cursive; }
.mission-days { display: flex; gap: 14px; margin-top: 12px; font-size: .92em; }
.mission-days a { color: var(--color-brand); text-decoration: none; font-weight: 600; }
.mission-stats { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 22px; }
.mission-stat { margin: 0; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 16px; padding: 12px 18px;
    display: flex; flex-direction: column; gap: 2px; min-width: 110px; }
.mission-stat strong { font-size: 1.4em; }
.mission-today-state { flex: 1; min-width: 240px; justify-content: center; }
/* 066 미션 배지: 받은 것은 색, 아직인 것은 흐리게 받는 법과 함께 */
.mission-badges { margin: 0 0 22px; }
.mission-badges h2 { font-size: 1.1em; margin: 0 0 10px; }
.badge-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.badge-item { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 8px; text-align: center;
    background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 16px; opacity: .55; }
.badge-item.is-earned { opacity: 1; border-color: var(--color-brand); background: var(--color-brand-soft); }
.badge-item .help { font-size: .8em; }
.badge-emoji { font-size: 1.8em; line-height: 1.2; }
.badge-item:not(.is-earned) .badge-emoji { filter: grayscale(1); }
.topic-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 800px) { .topic-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.topic-card { background: var(--tone-bg); border-radius: 18px; padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.topic-no { margin: 0; color: var(--tone-fg); font-weight: 700; font-size: .85em; }
.topic-title { margin: 0; font-size: 1.2em; line-height: 1.4; }
.topic-hint { margin: 0; color: var(--color-text-muted); flex: 1; }
.topic-card form, .topic-card > a.btn { margin-top: 6px; }
.mission-feed { margin-top: 28px; }
.mission-feed h2 { font-size: 1.15em; margin: 0 0 12px; }
.mission-posts { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.mission-post { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 16px; padding: 14px 18px; }
.mission-post-title { font-weight: 700; color: var(--color-text); text-decoration: none; }
.mission-post-title:hover { text-decoration: underline; }
.mission-post-excerpt { margin: 6px 0 0; color: var(--color-text-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mission-post-meta { margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: .9em; }
.mission-post-author { color: var(--color-text); font-weight: 600; text-decoration: none; }
.tag-mini { color: var(--color-brand); font-size: .92em; }
.mission-past { margin-top: 28px; }
.mission-past h2 { font-size: 1.05em; }
.mission-past-links { display: flex; flex-wrap: wrap; gap: 10px; }
/* 075 후속(강성찬 개인 확장): 미션 화면은 오늘의 주제가 맨 위 주인공, 바로 아래 글, 기록·배지·지난 미션은 맨 아래 접는 칸 */
.mission-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.mission-head h1 { margin: 0; font-size: 1.2em; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mission-head h1 .icon-paw { color: var(--color-accent); width: 1em; height: 1em; }
.mission-head .mission-day { font-weight: 600; color: var(--color-text-muted); }
.mission-head .mission-days { margin: 0; }
.mission-topics > p { margin: 6px 0 0; }
.mission-today-state { font-weight: 600; }
.mission-topics .topic-cards { margin-top: 16px; }
.mission-topics .topic-card { padding: 24px 24px 22px; gap: 8px; }
.mission-topics .topic-title { font-size: 1.6em; line-height: 1.35; }
.mission-topics .topic-card .btn { align-self: flex-start; }
.mission-info { margin-top: 32px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 16px; padding: 12px 18px; }
.mission-info summary { cursor: pointer; font-weight: 600; font-size: .92em; }
.mission-info[open] summary { margin-bottom: 12px; }
.mission-info .mission-stats, .mission-info .mission-badges { margin: 0 0 14px; }
.mission-info .mission-past { margin-top: 0; }
.mission-past-links a { padding: 4px 12px; border-radius: 999px; border: 1px solid var(--color-border); color: var(--color-text); text-decoration: none; font-size: .9em; }
.mission-editor-note strong { margin-right: 6px; }
.mission-done-note a { color: var(--color-brand); }

/* 058 서식 창(강성찬 개인 확장, 노션 선택 메뉴처럼): 글을 고르면 뜨는 창. 059 AI로 고치기 칸 */
.format-panel { position: absolute; z-index: 40; width: 256px; max-width: calc(100vw - 16px); padding: 6px;
    background: var(--color-surface); color: var(--color-text); border: 1px solid var(--color-border); border-radius: 14px;
    box-shadow: 0 10px 28px var(--color-shadow); font-size: .92rem; line-height: 1.4; }
.fmt-row { display: flex; align-items: center; justify-content: flex-start; gap: 10px; width: 100%; min-height: 36px; padding: 6px 10px; border: 0; border-radius: 8px;
    background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.fmt-row:hover { background: var(--color-surface-muted); }
.fmt-ico { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 22px; font-size: .8rem; font-weight: 800;
    color: var(--color-text-muted); }
.fmt-end { margin-left: auto; color: var(--color-text-muted); }
.fmt-type { font-weight: 600; }
.fmt-check { visibility: hidden; color: var(--color-brand); }
.fmt-row.is-current .fmt-check { visibility: visible; }
.fmt-back { color: var(--color-text-muted); font-size: .85rem; }
.fmt-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; margin: 4px 0; padding: 6px 2px;
    border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
.fmt-btn { display: inline-flex; align-items: center; justify-content: center; width: 100%; height: 36px; white-space: nowrap; border: 0; border-radius: 8px;
    background: transparent; color: inherit; font: inherit; font-size: 1rem; line-height: 1; cursor: pointer; }
.fmt-btn:hover { background: var(--color-surface-muted); }
.fmt-btn[aria-pressed="true"] { background: var(--color-brand-soft); color: var(--color-brand); }
.fmt-btn:focus-visible, .fmt-row:focus-visible, .fmt-swatch:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 1px; }
.fmt-bold { font-weight: 800; }
.fmt-italic { font-style: italic; font-family: Georgia, "Times New Roman", serif; }
.fmt-underline { text-decoration: underline; }
.fmt-strike { text-decoration: line-through; }
.fmt-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; }
.fmt-a { display: inline-block; min-width: 22px; padding: 1px 4px; border: 1px solid var(--color-border); border-radius: 6px; font-weight: 700; }
.fmt-section { margin: 8px 10px 2px; font-size: .78rem; color: var(--color-text-muted); }
.fmt-ask { display: flex; gap: 4px; margin: 6px 4px 2px; }
.fmt-ask input { flex: 1; min-width: 0; height: 34px; padding: 0 10px; font-size: .88rem; }
.fmt-send { width: 34px; height: 34px; color: var(--color-brand); }
.fmt-swatches { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; padding: 2px 6px 6px; }
.fmt-swatch { height: 32px; border: 1px solid var(--color-border); border-radius: 8px; background: var(--color-surface); color: var(--color-text);
    font: inherit; font-weight: 700; cursor: pointer; }
.fmt-swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--color-brand); }
.fmt-ai-out { margin: 6px 10px; max-height: 240px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .9rem; }
.fmt-ai-actions { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 8px 6px; }
.fmt-consent { padding: 4px 10px 8px; }
.fmt-consent .help { margin: 0 0 8px; font-size: .82rem; }
/* 064 / 명령 창(강성찬 개인 확장): 서식 창 모양, ↑↓로 고른 줄 표시 */
.slash-panel { width: 220px; max-height: min(340px, 50vh); overflow-y: auto; }
.slash-panel .fmt-row.is-active { background: var(--color-surface-muted); }
/* 058 글자 색·배경색: 본문(<span class="md-…">)과 서식 창 견본에 같이 쓴다 */
.md-c-gray { color: var(--color-text-muted); }
.md-c-brown { color: var(--tone-sand-fg); }
.md-c-orange { color: var(--tone-orange-fg); }
.md-c-yellow { color: var(--tone-yellow-fg); }
.md-c-green { color: var(--tone-green-fg); }
.md-c-blue { color: var(--tone-blue-fg); }
.md-c-purple { color: var(--tone-purple-fg); }
.md-c-pink { color: var(--tone-pink-fg); }
.md-c-red { color: var(--color-danger); }
.md-bg-gray { background: var(--tone-gray-bg); }
.md-bg-brown { background: var(--tone-sand-bg); }
.md-bg-orange { background: var(--tone-orange-bg); }
.md-bg-yellow { background: var(--tone-yellow-bg); }
.md-bg-green { background: var(--tone-green-bg); }
.md-bg-blue { background: var(--tone-blue-bg); }
.md-bg-purple { background: var(--tone-purple-bg); }
.md-bg-pink { background: var(--tone-pink-bg); }
.md-bg-red { background: var(--color-danger-soft); }
.post-body span[class^="md-bg-"] { padding: 0 3px; border-radius: 4px; }

/* 060 보이는 대로 쓰기(강성찬 개인 확장): 글 화면과 같은 글꼴·제목·목록 모양으로 쓰는 칸 */
.editor-mode { display: flex; justify-content: flex-end; margin: 0 0 8px; }
.visual-editor { position: relative; min-height: 60vh; margin-top: 0; padding: 16px 20px; border: 1px solid var(--color-control-border);
    border-radius: 16px; background: var(--color-surface); color: var(--color-text); outline: none; overflow-wrap: anywhere; }
.visual-editor:focus { border-color: var(--color-focus); box-shadow: 0 0 0 1px var(--color-focus); }
.visual-editor > :first-child { margin-top: 0; }
.visual-editor.is-empty::before { content: attr(data-placeholder); position: absolute; top: 16px; left: 20px; color: var(--color-text-muted);
    pointer-events: none; }
.visual-editor img.img-pending { width: 160px; height: 100px; background: var(--color-surface-muted); border: 1px dashed var(--color-border); }
.visual-editor li > input[type=checkbox] { margin-right: 6px; cursor: pointer; }
.post-body li:has(> input[type=checkbox]) { list-style: none; margin-left: -1.2em; }
.visual-editor pre { white-space: pre-wrap; }
/* 065 표 넣기: 빈 칸도 누르기 쉽게 */
.visual-editor th, .visual-editor td { min-width: 4em; height: 2em; }

/* 061 화면 테마(강성찬 개인 확장): 설정 화면에서 고른다 */
.theme-choices { display: flex; flex-wrap: wrap; gap: 8px 20px; border: 0; padding: 0; margin: 0 0 8px; }

/* 074 강성찬 개인 확장: 인스타식 블로그 머리말 숫자 줄, 가입 코드 단계 */
.insta-stats { display: flex; gap: 22px; list-style: none; padding: 0; margin: 10px 0 4px; flex-wrap: wrap; }
.insta-stats li, .insta-stats a { color: var(--color-text); text-decoration: none; font-weight: 700; }
.signup-code [data-code-entry] { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.signup-code [data-code-entry][hidden] { display: none; }
.signup-code [data-code-entry] label { flex-basis: 100%; }
.signup-code #email-code { flex: 1 1 120px; min-width: 0; letter-spacing: 4px; }
/* 081 강성찬 개인 확장: 피드에 섞인 추천 글 표시와 "팔로우한 글을 모두 봤어요" 줄 */
.feed-rec-badge { margin: 0 0 6px; font-size: .8em; color: var(--color-text-muted); }
.feed-rec-label { font-weight: 700; color: var(--color-brand); }
.feed-divider { grid-column: 1 / -1; margin: 8px 0; text-align: center; padding: 10px 0; border-top: 1px solid var(--color-border); }
/* 079 강성찬 개인 확장: 탐색 화면(홈 오른쪽 칸 상자를 그대로, 넓으면 추천 글·블로그 두 칸) */
.explore-page { display: flex; flex-direction: column; gap: 18px; }
.explore-page h1 { margin: 0; }
.explore-page .newcomers { margin: 0; }
.explore-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; }
@media (min-width: 760px) { .explore-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
