:root {
  --accent: var(--nori-accent, #3b6cf6);
  --bg: #f6f6f7;
  --surface: #ffffff;
  --text: #18181b;
  --muted: #71717a;
  --faint: #a1a1aa;
  --line: #e9e9ec;
  --hover: #f4f4f6;
  --boost: #16a34a;
  --like: #e11d48;
  --danger: #dc2626;
  --radius: 14px;
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
  --shell-bg: #eff0f3;
  color-scheme: light;
}
/* 테마: data-theme="light|dark"가 있으면 그걸, 없으면 시스템 설정을 따른다 */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f0f11;
    --surface: #18181b;
    --text: #ececf0;
    --muted: #9a9aa3;
    --faint: #6b6b74;
    --line: #26262c;
    --hover: #212126;
    --boost: #22c55e;
    --like: #fb7185;
    --shell-bg: #0c0c0e;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    --bg: #0f0f11;
    --surface: #18181b;
    --text: #ececf0;
    --muted: #9a9aa3;
    --faint: #6b6b74;
    --line: #26262c;
    --hover: #212126;
    --boost: #22c55e;
    --like: #fb7185;
    --shell-bg: #0c0c0e;
    color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 15px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body.embed { background: transparent; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
svg.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
code, pre, .mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .9em; }
code { background: var(--hover); padding: 1px 5px; border-radius: 5px; }
pre.code { background: var(--hover); padding: 12px 14px; border-radius: 10px; overflow-x: auto; font-size: 13px; line-height: 1.6; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hint { color: var(--muted); font-size: 13.5px; margin: 6px 4px 16px; }
.empty { color: var(--faint); text-align: center; padding: 40px 0; margin: 0; }
.tag { display: inline-block; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--hover); padding: 1px 7px; border-radius: 6px; vertical-align: 2px; }

/* 레이아웃 */
.main { min-height: calc(100vh - 220px); }
.col { max-width: 640px; margin: 0 auto; padding: 20px 16px; }
.col.wide { max-width: 860px; }
.col.narrow { max-width: 440px; }
.center { text-align: center; }
.page-title { font-size: 22px; font-weight: 750; letter-spacing: -.02em; margin: 4px 4px 16px; }
.page-title a { color: inherit; }
.section-title { font-size: 14px; font-weight: 650; color: var(--muted); margin: 28px 4px 10px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row-end { display: flex; justify-content: flex-end; gap: 8px; margin: 12px 0; }
.row-between { display: flex; justify-content: space-between; gap: 8px; }
.flash { background: color-mix(in srgb, var(--accent) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); color: var(--text); padding: 10px 14px; border-radius: 10px; max-width: 608px; margin: 16px auto 0; font-size: 14px; }
.flash.err { background: color-mix(in srgb, var(--danger) 9%, var(--surface)); border-color: color-mix(in srgb, var(--danger) 25%, transparent); margin: 0 0 14px; }
.col .flash { margin: 0 0 14px; }

/* 버튼 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-size: 14px; font-weight: 600; line-height: 1;
  padding: 10px 16px; border-radius: 10px; cursor: pointer;
  background: var(--surface); color: var(--text); border: 1px solid var(--line);
  text-decoration: none !important; transition: background .15s, border-color .15s, opacity .15s;
}
.btn:hover { background: var(--hover); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { opacity: .9; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--hover); color: var(--text); }
.btn.danger { color: var(--danger); }
.btn.primary.danger, .btn.danger:not(.ghost) { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.small { padding: 6px 10px; font-size: 13px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--muted); cursor: pointer; }
.linklike:hover { color: var(--text); text-decoration: underline; }

/* 폼 */
input, textarea, select {
  font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
input[type=checkbox] { width: auto; accent-color: var(--accent); }
input[type=color] { width: 48px; height: 36px; padding: 2px; }
input[type=file] { padding: 7px; font-size: 13px; }
textarea { resize: vertical; line-height: 1.55; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 16px; }
.card h1 { font-size: 20px; margin: 0 0 16px; letter-spacing: -.02em; }
.card h2 { font-size: 16px; margin: 0 0 12px; }
.form label { display: block; font-size: 13.5px; font-weight: 600; color: var(--muted); margin-bottom: 14px; }
.form label > input, .form label > textarea, .form label > select, .form label > .row { margin-top: 6px; }
.form label small { display: block; font-weight: 400; margin-top: 4px; color: var(--faint); }
.form label.check { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 500; }
.form.inline { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.form.inline h2 { width: 100%; }
.form.inline label { margin: 0; flex: 1 1 140px; }
.form.inline label.check { flex: 0 0 auto; padding-bottom: 10px; }
.narrow-input { width: 72px !important; }
.title-input { font-size: 18px; font-weight: 650; margin-bottom: 12px; }
.help summary { cursor: pointer; color: var(--muted); font-size: 13.5px; margin-bottom: 8px; }
.avatar-edit { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.avatar-edit img { width: 64px; height: 64px; border-radius: 16px; object-fit: cover; }
.avatar-edit label { margin: 0; flex: 1; }
.copy { font-family: ui-monospace, monospace; font-size: 12.5px; padding: 6px 8px; min-width: 260px; }

/* 탭 */
.tabs { display: flex; gap: 4px; margin: 0 0 14px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow-x: auto; }
.tabs a { flex: 1; text-align: center; color: var(--muted); font-weight: 600; font-size: 14px; padding: 8px 12px; border-radius: 9px; white-space: nowrap; text-decoration: none; }
.tabs a:hover { color: var(--text); background: var(--hover); }
.tabs a.on { color: var(--text); background: var(--hover); }

/* 작성기 */
.composer { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 14px; }
.composer textarea { border: 0; padding: 4px 2px; min-height: 64px; font-size: 15.5px; box-shadow: none !important; background: transparent; resize: none; }
.composer .cw-input { margin-bottom: 8px; font-size: 14px; }
.composer-bar { display: flex; align-items: center; gap: 4px; border-top: 1px solid var(--line); padding-top: 10px; margin-top: 6px; }
.composer .tool { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 9px; color: var(--muted); background: none; border: 0; cursor: pointer; }
.composer .tool:hover, .composer .tool.on { background: var(--hover); color: var(--accent); }
.vis-select { width: auto; max-width: 150px; border: 0; background: transparent; color: var(--muted); font-size: 13.5px; padding: 6px 4px; cursor: pointer; box-shadow: none !important; }
.composer .count { margin-left: auto; color: var(--faint); font-size: 12.5px; font-variant-numeric: tabular-nums; padding: 0 8px; }
.composer .count.over { color: var(--danger); }
.previews { display: flex; gap: 8px; flex-wrap: wrap; }
.previews:not(:empty) { margin: 8px 0; }
.preview { position: relative; width: 96px; }
.preview img, .preview .file { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--hover); font-size: 11px; color: var(--muted); }
.preview input { font-size: 11.5px; padding: 4px 6px; margin-top: 4px; border-radius: 6px; }

/* 글 */
.notes { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.notes > .empty { padding: 48px 0; }
.note { padding: 14px 16px 6px; border-bottom: 1px solid var(--line); }
.notes > .note:last-child { border-bottom: 0; }
.note.focus { background: color-mix(in srgb, var(--accent) 3%, var(--surface)); }
.note.focus .note-content { font-size: 16.5px; }
.note-row { display: flex; gap: 12px; }
.note-boosted { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin: 0 0 8px 28px; }
.note-boosted svg.i { width: 15px; height: 15px; color: var(--boost); }
.note-boosted a { color: var(--muted); font-weight: 600; }
.avatar { flex-shrink: 0; }
.avatar img { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; background: var(--hover); display: block; }
.note-main { flex: 1; min-width: 0; }
.note-head { display: flex; align-items: baseline; gap: 8px; }
.note-name { display: flex; align-items: baseline; gap: 6px; min-width: 0; flex: 1; color: var(--text); text-decoration: none !important; }
.note-name b { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-shrink: 1; min-width: 0; }
.note-name .acct { color: var(--muted); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-shrink: 100; min-width: 0; }
.note-meta { margin-left: auto; display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.note-meta .time { color: var(--faint); font-size: 13px; }
.note-meta .vis { color: var(--faint); display: inline-flex; }
.note-meta .vis svg.i { width: 14px; height: 14px; }
.note-replyto { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); margin-top: 1px; }
.note-replyto svg.i { width: 14px; height: 14px; }
.note-content { margin-top: 3px; overflow-wrap: anywhere; }
.note-content p { margin: 0 0 .6em; }
.note-content p:last-child { margin-bottom: 0; }
.note-content a { color: var(--accent); }
.note-content .invisible { display: none; }
.note-content .ellipsis::after { content: "…"; }
.note-content blockquote { margin: .4em 0; padding-left: 12px; border-left: 3px solid var(--line); color: var(--muted); }
.note-content ul.poll { padding-left: 1.2em; color: var(--muted); }
img.emoji { height: 1.4em; width: auto; vertical-align: -.35em; margin: 0 .05em; }
.cw { margin-top: 4px; }
.cw summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; background: var(--hover); font-weight: 500; }
.cw summary::-webkit-details-marker { display: none; }
.cw-btn { margin-left: auto; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.cw[open] .cw-btn { visibility: hidden; }
.cw[open] summary { margin-bottom: 8px; }

.media { display: grid; gap: 4px; margin-top: 10px; border-radius: 12px; overflow: hidden; position: relative; max-height: 520px; }
.media.n1 { grid-template-columns: 1fr; }
.media.n2, .media.n4 { grid-template-columns: 1fr 1fr; }
.media.n3 { grid-template-columns: 1fr 1fr; }
.media.n3 > :first-child { grid-row: span 2; }
.media a, .media video { display: block; background: var(--hover); min-height: 0; }
.media img { width: 100%; height: 100%; object-fit: cover; display: block; max-height: 520px; }
.media.n1 img { object-fit: contain; max-height: 520px; background: var(--hover); }
.media:not(.n1) img { aspect-ratio: 16/10; }
.media video { width: 100%; max-height: 520px; }
.media audio { width: 100%; }
.media.sensitive > a, .media.sensitive > video { filter: blur(28px) brightness(.85); }
.media-reveal { position: absolute; inset: 0; margin: auto; width: max-content; height: max-content; padding: 9px 14px; border: 0; border-radius: 10px; background: rgba(0,0,0,.6); color: #fff; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }

.note-actions { display: flex; gap: 2px; margin: 6px 0 0 -8px; }
.note-actions form { margin: 0; }
.act { display: inline-flex; align-items: center; gap: 5px; padding: 6px 8px; min-width: 56px; border-radius: 8px; border: 0; background: none; font: inherit; font-size: 13px; color: var(--faint); cursor: pointer; text-decoration: none !important; }
.act span { font-variant-numeric: tabular-nums; }
.act:hover:not(:disabled) { background: var(--hover); color: var(--text); }
.act:disabled { opacity: .4; cursor: default; }
.act.boost.on, .act.boost:hover:not(:disabled) { color: var(--boost); }
.act.like.on, .act.like:hover { color: var(--like); }
.act.like.on svg.i { fill: currentColor; }
.act.del { min-width: 0; }
.act.del:hover { color: var(--danger); }
.act.ext { min-width: 0; margin-left: auto; }
.note-actions span.act { cursor: default; }
.note-actions span.act:hover { background: none; color: var(--faint); }

.pager { display: flex; justify-content: center; gap: 8px; margin: 18px 0; }

/* 스레드 */
.thread-compose { margin-top: 14px; }
.notes > div > .note { border-bottom: 1px solid var(--line); }
.notes > div:last-child > .note { border-bottom: 0; }
.ancestor .note-row { position: relative; }
.ancestor .note-row::before { content: ""; position: absolute; left: 21px; top: 50px; bottom: -14px; width: 2px; background: var(--line); }
.reply.d1 .note { padding-left: 34px; } .reply.d2 .note { padding-left: 52px; } .reply.d3 .note { padding-left: 70px; } .reply.d4 .note { padding-left: 84px; }

/* 프로필 */
.profile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 14px; padding-bottom: 18px; }
.profile-banner { height: 160px; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 35%, var(--surface)), color-mix(in srgb, var(--accent) 10%, var(--surface))); background-size: cover; background-position: center; }
.profile-top { display: flex; align-items: flex-end; justify-content: space-between; padding: 0 18px; margin-top: -40px; }
.profile-avatar { width: 88px; height: 88px; border-radius: 22px; object-fit: cover; border: 4px solid var(--surface); background: var(--hover); }
.profile-actions { display: flex; gap: 6px; padding-bottom: 4px; }
.profile-actions form { margin: 0; }
.profile-name { font-size: 21px; font-weight: 750; letter-spacing: -.02em; margin: 10px 18px 0; }
.profile-acct { color: var(--muted); margin: 0 18px; font-size: 14px; }
.profile-bio { margin: 12px 18px 0; overflow-wrap: anywhere; }
.profile-bio p { margin: 0 0 .5em; }
.profile-stats { display: flex; gap: 16px; margin: 14px 18px 0; font-size: 14px; color: var(--muted); flex-wrap: wrap; }
.profile-stats a { color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.profile-stats b { color: var(--text); }
.profile-stats svg.i { width: 14px; height: 14px; }

/* 계정 목록 */
.card-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.account-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; color: var(--text); text-decoration: none !important; border-bottom: 1px solid var(--line); }
.card-list > .account-row:last-child { border-bottom: 0; }
.account-row:hover { background: var(--hover); }
.account-row img { width: 40px; height: 40px; border-radius: 11px; object-fit: cover; }
.account-row b { display: block; font-weight: 650; }
.account-row small { color: var(--muted); }
td .account-row { padding: 0; border: 0; }
td .account-row:hover { background: none; }
img.mini { width: 22px; height: 22px; border-radius: 6px; object-fit: cover; vertical-align: -6px; }

/* 알림 */
.notifs { display: flex; flex-direction: column; gap: 8px; }
.notif { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.notif.unseen { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.notif-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.notif-head a { color: var(--text); }
.notif-head time { margin-left: auto; font-size: 12.5px; }
.notif-ic { display: inline-flex; color: var(--accent); }
.notif-ic.k-like { color: var(--like); } .notif-ic.k-boost { color: var(--boost); }
.notif-quote { display: block; margin-top: 8px; padding: 8px 12px; border-radius: 10px; background: var(--hover); color: var(--muted) !important; font-size: 14px; text-decoration: none !important; max-height: 6.5em; overflow: hidden; }
.notif-quote p { margin: 0; }
.notif .note { border: 0; padding: 10px 0 0; }
.notif-req { display: flex; gap: 8px; margin-top: 10px; }
.notif-req form { margin: 0; }

/* 검색 */
.searchbar { display: flex; gap: 8px; }

/* 랜딩/소개 */
.hero { padding: 48px 8px 24px; }
.hero h1 { font-size: 34px; font-weight: 800; letter-spacing: -.035em; margin: 0 0 8px; }
.hero p { font-size: 16.5px; color: var(--muted); margin: 0 0 20px; }
.hero-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.err-code { font-size: 56px; font-weight: 800; margin: 48px 0 0; color: var(--faint); }

/* 표 */
.table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: 14px; }
.table th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12.5px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--hover); }
.table td { padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.dim td { opacity: .5; }
.table td input:not([type=checkbox]) { padding: 6px 8px; }
.table td form { margin: 0; }
.card .table { border: 0; }
.col.wide .table { display: block; overflow-x: auto; }
ul.plain { list-style: none; padding: 0; margin: 14px 0 0; }
ul.plain li { padding: 6px 0; display: flex; gap: 10px; align-items: center; }
.inline-form { display: inline; margin: 0; }

/* 페이지(prose) */
.prose { font-size: 16px; line-height: 1.75; overflow-wrap: anywhere; }
.prose h1 { font-size: 28px; font-weight: 800; letter-spacing: -.03em; line-height: 1.3; margin: 8px 0 18px; }
.prose h2 { font-size: 21px; letter-spacing: -.02em; margin: 1.8em 0 .6em; }
.prose h3 { font-size: 17.5px; margin: 1.5em 0 .5em; }
.prose img { border-radius: 10px; }
.prose blockquote { margin: 1em 0; padding: 2px 16px; border-left: 3px solid var(--accent); color: var(--muted); }
.prose pre { background: var(--hover); padding: 14px; border-radius: 10px; overflow-x: auto; font-size: 13.5px; }
.prose pre code { background: none; padding: 0; }
.prose table { border-collapse: collapse; width: 100%; }
.prose th, .prose td { border: 1px solid var(--line); padding: 6px 10px; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.prose.small { font-size: 14.5px; line-height: 1.65; }
.prose.small p { margin: .3em 0; }
.admin-edit { margin-top: 32px; }

/* 위젯 (페이지 안 게시판/타임라인) */
.widget { margin: 1.6em 0; font-size: 15px; line-height: 1.55; }
.widget-head { display: flex; justify-content: space-between; align-items: center; margin: 0 4px 8px; }
.widget-head a { font-weight: 700; color: var(--text); font-size: 15.5px; }
.widget-head a::after { content: " →"; color: var(--faint); font-weight: 400; }

/* 게시판 */
.board-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.board-head .page-title { margin-bottom: 4px; }
.board-head p { margin: 0 4px 8px; }
.board-list { list-style: none; padding: 0; margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.board-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.board-list li:last-child { border-bottom: 0; }
.board-list li.empty { display: block; }
.bl-title { color: var(--text); font-weight: 550; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.bl-title .pin { color: var(--accent); display: inline-flex; }
.bl-title .pin svg.i { width: 15px; height: 15px; }
.bl-count { color: var(--accent); font-size: 12.5px; font-weight: 700; }
.bl-meta { color: var(--faint); font-size: 13px; white-space: nowrap; flex-shrink: 0; }
.board-list.compact li { padding: 10px 14px; }
.crumb { margin: 0 4px 12px; font-size: 14px; }
.crumb a { color: var(--muted); }
.board-article { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 28px; }
.board-article h1 { margin-top: 0; }
.bp-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--muted); font-size: 13.5px; }
.bp-meta a { color: var(--text); }
.board-article .bp-meta { padding-bottom: 16px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.bp-tools { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.bp-tools a { color: var(--muted); }
.bp-tools form { margin: 0; }
.comments { margin-top: 8px; }
.comment { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin-bottom: 8px; }
.comment-form { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; margin-top: 12px; }

.embed-wrap { padding: 0; }
body.embed .main { min-height: 0; }

@media (max-width: 600px) {
  .col { padding: 12px 10px; }
  .note { padding: 12px 12px 4px; }
  .avatar img { width: 40px; height: 40px; border-radius: 11px; }
  .note-row { gap: 10px; }
  .act { min-width: 48px; }
  .board-list li { flex-direction: column; align-items: flex-start; gap: 2px; }
  .board-article { padding: 18px; }
  .reply.d1 .note, .reply.d2 .note, .reply.d3 .note, .reply.d4 .note { padding-left: 24px; }
  .hero { padding-top: 28px; }
  .hero h1 { font-size: 28px; }
}

/* ---------- v0.2 ---------- */
.composer-opts { display: flex; gap: 12px; flex-wrap: wrap; padding: 8px 2px 4px; }
.composer-opts label { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.composer-opts select { width: auto; padding: 5px 8px; font-size: 13px; }
.vis-select { max-width: 170px; }

.act.bm.on { color: var(--accent); }
.act.bm.on svg.i { fill: currentColor; }
.act-more { position: relative; }
.act-more > summary { list-style: none; min-width: 0; }
.act-more > summary::-webkit-details-marker { display: none; }
.act-more .menu { position: absolute; z-index: 20; left: 0; top: 34px; min-width: 210px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.14); }
.act-more .menu a, .act-more .menu button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border-radius: 8px; color: var(--text); font: inherit; font-size: 14px; background: none; border: 0; cursor: pointer; text-decoration: none !important; text-align: left; }
.act-more .menu a:hover, .act-more .menu button:hover { background: var(--hover); }
.act-more .menu button.danger { color: var(--danger); }
.act-more .menu form { margin: 0; }
.note.deleted { opacity: .35; pointer-events: none; }
.new-posts { display: block; width: 100%; margin: 0 0 10px; padding: 10px; border: 0; border-radius: 12px; background: var(--accent); color: #fff; font: inherit; font-weight: 650; cursor: pointer; }

/* 아티클 카드 (타임라인) */
.article-card { display: flex; flex-direction: column; margin-top: 8px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; color: var(--text); text-decoration: none !important; transition: border-color .15s; }
.article-card:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.ac-cover { width: 100%; max-height: 240px; object-fit: cover; display: block; }
.ac-body { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 14px; }
.ac-kicker { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--accent); }
.ac-kicker svg.i { width: 14px; height: 14px; }
.ac-title { font-size: 17px; letter-spacing: -.02em; line-height: 1.35; }
.ac-excerpt { color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* 아티클 보기 */
.article-view { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 0 28px; overflow: hidden; }
.article-view > :not(.article-cover) { margin-left: 36px; margin-right: 36px; }
.article-cover { width: 100%; max-height: 420px; object-fit: cover; display: block; border-radius: 0 !important; margin-bottom: 8px; }
.article-view h1 { font-size: 32px; margin-top: 28px; }
.article-lede { font-size: 18px; color: var(--muted); margin-top: -6px; }
.article-meta { padding-bottom: 18px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.article-meta svg.i { width: 14px; height: 14px; vertical-align: -2px; }
.article-body { font-size: 17px; line-height: 1.85; }
.article-actions { margin-top: 12px; padding: 4px 16px; }
.article-actions .note-actions { margin: 0; }
.article-form .title-input.big { font-size: 26px; font-weight: 800; border: 0; padding: 8px 0; letter-spacing: -.02em; box-shadow: none !important; }
.article-form .article-body-input { font-size: 16px; line-height: 1.75; min-height: 420px; margin: 12px 0; }
.article-form .opts { align-items: flex-end; }
.article-form .article-cover { border-radius: 10px !important; margin-bottom: 10px; }
.article-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.article-tile { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--text); text-decoration: none !important; transition: transform .15s, box-shadow .15s; }
.article-tile:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.article-tile img, .at-ph { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--accent) 10%, var(--surface)); color: var(--accent); }
.at-ph svg.i { width: 32px; height: 32px; }
.at-body { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 14px; }
.at-body b { font-size: 16px; letter-spacing: -.01em; line-height: 1.35; }
.at-body small { font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* 북마크 */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; align-items: center; }
.chips > a, .chip-add > summary { padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--text); font-size: 13.5px; font-weight: 600; text-decoration: none !important; cursor: pointer; list-style: none; }
.chip-add > summary::-webkit-details-marker { display: none; }
.chips > a small { color: var(--faint); font-weight: 500; margin-left: 2px; }
.chips > a.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.chips > a.on small { color: rgba(255,255,255,.75); }
.chip-add { position: relative; }
.chip-add[open] form { position: absolute; z-index: 10; top: 38px; left: 0; width: 280px; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.12); flex-wrap: nowrap; }
.folder-edit { margin-bottom: 12px; }
.folder-edit input { max-width: 220px; padding: 6px 10px; }
.bm-item { position: relative; border-bottom: 1px solid var(--line); }
.bm-item:last-child { border-bottom: 0; }
.bm-item .note { border-bottom: 0; }
.bm-move { display: flex; align-items: center; gap: 6px; padding: 0 16px 10px 72px; color: var(--faint); margin: 0; }
.bm-move svg.i { width: 15px; height: 15px; }
.bm-move select { width: auto; padding: 3px 8px; font-size: 12.5px; color: var(--muted); }

/* 모멘트 */
.moment-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.moment-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--text); text-decoration: none !important; }
.moment-card:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.moment-card img, .mc-ph { width: 100%; aspect-ratio: 2/1; object-fit: cover; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 22%, var(--surface)), color-mix(in srgb, var(--accent) 6%, var(--surface))); color: var(--accent); }
.mc-ph svg.i { width: 30px; height: 30px; }
.mc-body { display: flex; flex-direction: column; gap: 3px; padding: 10px 14px 12px; }
.mc-body small { font-size: 13px; color: var(--muted); }
.new-moment { padding: 0; border: 0; background: none; }
.new-moment > summary { list-style: none; display: inline-flex; margin-bottom: 12px; }
.new-moment > summary::-webkit-details-marker { display: none; }
.new-moment[open] .form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.moment-head { padding: 4px 4px 14px; }
.moment-head h1 { font-size: 28px; letter-spacing: -.03em; margin: 4px 0 6px; }
.moment-desc { font-size: 16px; margin: 0 0 8px; }
.mi { border-bottom: 1px solid var(--line); }
.mi:last-child { border-bottom: 0; }
.mi .note { border-bottom: 0; }
.mi-tools { display: flex; gap: 4px; justify-content: flex-end; padding: 0 12px 8px; margin: 0; }

/* 시트 */
.sheet { margin: 1.4em 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); font-size: 14px; line-height: 1.5; }
.sheet-bar { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-bottom: 1px solid var(--line); background: var(--hover); }
.sheet-search { max-width: 240px; padding: 6px 10px; font-size: 13.5px; }
.sheet-count { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.sheet-orig { margin-left: auto; font-size: 12.5px; color: var(--muted) !important; white-space: nowrap; }
.sheet-scroll { overflow: auto; max-height: 70vh; }
.sheet-table { border-collapse: separate; border-spacing: 0; width: 100%; min-width: max-content; }
.prose .sheet-table th, .prose .sheet-table td { border: 0; }
.sheet-table th { position: sticky; top: 0; z-index: 1; background: var(--surface); text-align: left; font-weight: 700; font-size: 13px; padding: 9px 12px; border-bottom: 2px solid var(--line) !important; cursor: pointer; user-select: none; white-space: nowrap; }
.sheet-table th:hover { color: var(--accent); }
.sheet-table th[data-dir=asc]::after { content: " ▲"; font-size: 10px; color: var(--accent); }
.sheet-table th[data-dir=desc]::after { content: " ▼"; font-size: 10px; color: var(--accent); }
.sheet-table td { padding: 8px 12px; border-bottom: 1px solid var(--line) !important; vertical-align: top; max-width: 420px; }
.sheet-table tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--hover) 55%, var(--surface)); }
.sheet-table tbody tr:hover td { background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.sheet-table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sheet-frame { background: #fff; }
.sheet-frame iframe { width: 100%; height: 520px; border: 0; display: block; background: #fff; }
.sheet-frame figcaption { display: flex; align-items: center; gap: 6px; padding: 8px 12px; font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--line); background: var(--surface); }
.sheet-frame figcaption svg.i { width: 15px; height: 15px; color: #188038; }

.scope-list { padding-left: 1.2em; }
.app-row { padding: 8px 0; border-bottom: 1px solid var(--line); }
.app-row:last-child { border-bottom: 0; }
.app-row .btn { margin-left: auto; }
.card h2 svg.i { vertical-align: -3px; }

@media (max-width: 600px) {
  .article-view > :not(.article-cover) { margin-left: 18px; margin-right: 18px; }
  .article-view h1 { font-size: 25px; }
  .bm-move { padding-left: 62px; }
}
.composer-opts[hidden], [hidden] { display: none !important; }
.ac-cover { aspect-ratio: 2/1; max-height: 200px; }
.bm-item > .note, .mi > .note { border-bottom: 0 !important; }

/* ⋯ 메뉴가 잘리지 않도록: 목록은 overflow를 풀고 첫/마지막 글에 모서리를 직접 준다 */
.notes { overflow: visible; }
.notes > .note:first-child, .notes > div:first-child > .note { border-top-left-radius: var(--radius); border-top-right-radius: var(--radius); }
.notes > .note:last-child, .notes > div:last-child > .note { border-bottom-left-radius: var(--radius); border-bottom-right-radius: var(--radius); }
.act-more[open] { z-index: 30; }
.act-more .menu { z-index: 40; }
.act-more > summary:focus:not(:focus-visible) { outline: none; }
.act-more[open] > summary { background: var(--hover); color: var(--text); }

/* =========================================================
   개인 홈 레이아웃 (배너 / 왼쪽 프로필 / 오른쪽 메뉴+피드)
   ========================================================= */
body.shell-body { background: var(--shell-bg, #eff0f3); }
.shell { max-width: 880px; margin: 0 auto; padding: 56px 16px 40px; }
.banner { display: flex; align-items: center; justify-content: center; aspect-ratio: 8 / 1; min-height: 96px; border-radius: 16px; background: var(--accent) center / cover no-repeat; color: #fff; text-decoration: none !important; margin-bottom: 18px; overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.banner-title { font-size: 26px; font-weight: 800; letter-spacing: -.02em; text-shadow: 0 1px 2px rgba(0,0,0,.15); }
.shell-grid { display: grid; grid-template-columns: 228px minmax(0, 1fr); gap: 16px; align-items: start; }

/* 왼쪽 */
.side { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 16px; }
.side-card { background: var(--surface); border-radius: 16px; padding: 18px 16px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.profile-card { text-align: center; padding: 26px 16px 18px; }
.pc-avatar { display: inline-block; padding: 6px; border-radius: 20px; background: var(--hover); }
.pc-avatar img { display: block; width: 92px; height: 92px; border-radius: 15px; object-fit: cover; }
.pc-name { font-size: 20px; font-weight: 800; letter-spacing: -.01em; margin: 14px 0 2px; line-height: 1.25; overflow-wrap: anywhere; }
.pc-name a { color: var(--text); }
.pc-name svg.i { width: 15px; height: 15px; }
.pc-acct { font-size: 12px; color: var(--faint); overflow-wrap: anywhere; }
.pc-bio { font-size: 12.5px; line-height: 1.7; color: var(--muted); margin-top: 10px; overflow-wrap: anywhere; }
.pc-bio p { margin: 0 0 .3em; }
.pc-since { font-size: 11.5px; color: var(--faint); margin-top: 12px; }
.pc-stats { display: flex; justify-content: center; gap: 12px; margin-top: 10px; font-size: 12px; }
.pc-stats a { color: var(--muted); display: flex; flex-direction: column; align-items: center; line-height: 1.3; }
.pc-stats b { color: var(--text); font-size: 14px; }
.pc-actions { margin-top: 14px; display: flex; justify-content: center; }
.pc-actions form { margin: 0; }
.pc-note { display: block; font-size: 11.5px; color: var(--muted); margin-top: 8px; }

.pill { display: inline-flex; align-items: center; padding: 6px 14px; border-radius: 999px; font: inherit; font-size: 13px; font-weight: 700; color: var(--muted); background: transparent; border: 0; cursor: pointer; text-decoration: none !important; white-space: nowrap; transition: background .15s, color .15s; }
.pill:hover { color: var(--text); background: color-mix(in srgb, var(--text) 6%, transparent); }
.pill.on { background: var(--accent); color: #fff; }
.pill.on:hover { opacity: .9; }
.profile-card .pill { padding: 7px 18px; }
.profile-card .pill:not(.on) { background: var(--hover); color: var(--text); }

.side-moments { display: flex; flex-direction: column; gap: 6px; }
.moment-strip { position: relative; display: flex; align-items: flex-end; height: 52px; padding: 0 12px 7px; border-radius: 10px; background: var(--accent) center / cover no-repeat; color: #fff; font-weight: 700; font-size: 13px; text-decoration: none !important; overflow: hidden; }
.moment-strip::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.55), rgba(0,0,0,0) 75%); }
.moment-strip.no-img::before { background: linear-gradient(90deg, rgba(0,0,0,.18), rgba(0,0,0,0)); }
.moment-strip span { position: relative; text-shadow: 0 1px 2px rgba(0,0,0,.4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.moment-strip:hover { filter: brightness(1.06); }

.side-list { padding: 12px 10px; }
.side-list h3 { display: flex; justify-content: space-between; align-items: center; margin: 6px 6px 4px; font-size: 13px; }
.side-list h3 a { display: inline-flex; align-items: center; gap: 6px; color: var(--text); }
.side-list h3 svg.i { width: 15px; height: 15px; color: var(--accent); }
.side-list h3 small, .side-list > a small { color: var(--faint); font-weight: 500; font-size: 12px; }
.side-list > a { display: flex; justify-content: space-between; padding: 5px 8px 5px 27px; border-radius: 8px; color: var(--muted); font-size: 13px; text-decoration: none !important; }
.side-list > a:hover { background: var(--hover); color: var(--text); }
.side-list h3 + h3, .side-list > a + h3 { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }

.side-cal { background: #5a5a5f; color: #fff; border-radius: 16px; padding: 14px 12px 12px; text-align: center; }
.cal-year { font-size: 10.5px; opacity: .65; }
.cal-head { display: flex; justify-content: center; align-items: center; gap: 18px; margin: 2px 0 8px; }
.cal-head b { font-size: 20px; font-weight: 800; letter-spacing: .02em; }
.cal-head a { color: #fff; opacity: .7; font-size: 18px; text-decoration: none !important; padding: 0 4px; }
.cal-head a:hover { opacity: 1; }
.cal-grid { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 11.5px; }
.cal-grid th { font-weight: 500; opacity: .55; font-size: 10px; padding-bottom: 6px; }
.cal-grid td { padding: 2px 0; height: 22px; }
.cal-grid span, .cal-grid a { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 20px; border-radius: 999px; color: #fff; text-decoration: none !important; font-weight: 600; }
.cal-grid span { opacity: .85; }
.cal-grid a.has { background: rgba(255,255,255,.18); }
.cal-grid a.has:hover { background: rgba(255,255,255,.3); }
.cal-grid .today { background: var(--accent) !important; opacity: 1; }

/* 오른쪽 */
.main-col { min-width: 0; }
.pillnav { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; min-height: 36px; }
.pills { display: flex; gap: 4px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.pills::-webkit-scrollbar { display: none; }
.pn-tools { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.pn-ic { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 999px; color: var(--muted); }
.pn-ic:hover { background: color-mix(in srgb, var(--text) 6%, transparent); color: var(--text); }
.pn-ic svg.i { width: 19px; height: 19px; }
.pn-ic .nori-badge { position: absolute; top: 2px; right: 0; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--accent); color: #fff; font-size: 10.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.pn-me { position: relative; margin-left: 4px; }
.pn-me summary { list-style: none; cursor: pointer; display: flex; }
.pn-me summary::-webkit-details-marker { display: none; }
.pn-me summary img { width: 32px; height: 32px; border-radius: 10px; object-fit: cover; background: var(--hover); }
.pn-drop { position: absolute; right: 0; top: 40px; z-index: 60; min-width: 190px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.14); }
.pn-drop a, .pn-drop button { display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: 8px; color: var(--text); text-decoration: none !important; font: inherit; font-size: 14px; background: none; border: 0; cursor: pointer; }
.pn-drop a:hover, .pn-drop button:hover { background: var(--hover); }
.pn-drop a b { display: block; }
.pn-drop a small { color: var(--muted); }
.pn-drop form { margin: 4px 0 0; padding-top: 4px; border-top: 1px solid var(--line); }

.panel { background: var(--surface); border-radius: 16px; padding: 30px 34px 34px; min-height: 420px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.panel > .flash { margin: 0 0 16px; max-width: none; }
.shell-foot { text-align: center; font-size: 11.5px; color: var(--faint); margin-top: 48px; }
.shell-foot a { color: var(--faint); }

/* 패널 안에서는 카드 테두리를 덜어낸다 */
.panel .col, .panel .col.wide, .panel .col.narrow { max-width: none; margin: 0; padding: 0; }
.panel .col.narrow { max-width: 460px; margin: 0 auto; }
.panel .page-title { font-size: 19px; margin: 0 0 18px; }
.panel .notes { border: 0; border-radius: 0; background: transparent; }
.panel .notes > .note:first-child, .panel .notes > div:first-child > .note,
.panel .notes > .note:last-child, .panel .notes > div:last-child > .note { border-radius: 0; }
.panel .note { padding-left: 0; padding-right: 0; }
.panel .note.focus { background: transparent; }
.panel .tabs { background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 0; gap: 0; margin-bottom: 16px; }
.panel .tabs a { flex: 0 0 auto; border-radius: 0; padding: 10px 14px; background: none !important; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.panel .tabs a.on { color: var(--text); border-bottom-color: var(--accent); }
.panel .composer { background: var(--hover); border: 0; }
.panel .composer textarea { background: transparent; }
.panel .card, .panel .board-list, .panel .table, .panel .card-list, .panel .board-article, .panel .article-view { box-shadow: none; }
.panel .card { border-color: var(--line); }
.panel .thread-compose { margin: 8px 0 16px; }
.panel .bm-move { padding-left: 56px; }
.panel .article-view { border: 0; padding: 0; }
.panel .article-view > :not(.article-cover) { margin-left: 0; margin-right: 0; }
.panel .article-cover { border-radius: 12px !important; }
.panel .hero { padding: 8px 0 20px; }
.day-filter { font-size: 13.5px; color: var(--muted); margin: -4px 0 12px; }

@media (max-width: 760px) {
  .shell { padding: 12px 10px 28px; }
  .banner { border-radius: 12px; margin-bottom: 12px; min-height: 72px; aspect-ratio: 5 / 1; }
  .shell-grid { grid-template-columns: 1fr; gap: 12px; }
  .side { position: static; display: contents; }
  .profile-card { order: 1; display: grid; grid-template-columns: auto 1fr; column-gap: 14px; text-align: left; align-items: center; padding: 14px; }
  .pc-avatar { grid-row: span 3; padding: 4px; border-radius: 16px; }
  .pc-avatar img { width: 68px; height: 68px; border-radius: 12px; }
  .pc-name { margin: 0; font-size: 17px; }
  .pc-bio, .pc-since, .pc-stats, .pc-actions, .pc-note { grid-column: 1 / -1; }
  .pc-stats, .pc-actions { justify-content: flex-start; }
  .main-col { order: 2; }
  .side-moments, .side-list, .side-cal { order: 3; }
  .side-moments { flex-direction: row; overflow-x: auto; }
  .moment-strip { flex: 1 0 160px; }
  .panel { padding: 18px 14px 22px; border-radius: 14px; }
}

/* 사이트 공용 메뉴: 배너 위 */
.shell { padding-top: 18px; }
.shell > .pillnav { margin-bottom: 14px; padding: 0 2px; }
.pn-brand { font-weight: 800; font-size: 16px; letter-spacing: -.02em; color: var(--text); text-decoration: none !important; margin-right: 10px; white-space: nowrap; display: inline-flex; align-items: center; }
.pn-brand::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--accent); margin-right: 8px; }
@media (max-width: 760px) {
  .shell { padding-top: 8px; }
  .shell > .pillnav { margin-bottom: 10px; }
  .pn-brand { font-size: 15px; margin-right: 4px; }
}
.btn { white-space: nowrap; flex-shrink: 0; }
.composer-bar .vis-select { min-width: 0; flex: 0 1 auto; }

/* 비로그인 스플래시 */
body.splash-body { background: var(--shell-bg, #eff0f3); }
.splash { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; }
.splash > .flash { margin: 0 0 16px; }
.splash-card { width: 100%; max-width: 420px; background: var(--surface); border-radius: 22px; padding: 44px 32px 36px; text-align: center; box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 16px 48px rgba(0,0,0,.06); }
.splash-mark { width: 56px; height: 56px; margin: 0 auto 20px; border-radius: 16px; background: var(--accent); position: relative; }
.splash-mark::after { content: ""; position: absolute; inset: 16px; border-radius: 6px; background: #fff; opacity: .9; }
.splash-card h1 { font-size: 30px; font-weight: 800; letter-spacing: -.03em; margin: 0 0 8px; }
.splash-card > p { color: var(--muted); margin: 0 0 26px; font-size: 15px; }
.splash-actions { display: flex; flex-direction: column; gap: 8px; }
.splash-actions .btn { width: 100%; padding: 13px 16px; font-size: 15px; border-radius: 12px; }
.splash-note { font-size: 12.5px; color: var(--faint); margin: 16px 0 0; }

/* 타임라인 화면 왼쪽 바로가기 */
.side-nav { display: flex; flex-direction: column; gap: 2px; padding: 10px; }
.side-nav > a:not(.pill) { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--text); font-weight: 600; font-size: 14.5px; text-decoration: none !important; }
.side-nav > a:not(.pill):hover { background: var(--hover); }
.side-nav > a.on:not(.pill) { background: color-mix(in srgb, var(--accent) 10%, var(--surface)); color: var(--accent); }
.side-nav svg.i { width: 19px; height: 19px; }
.side-nav em { margin-left: auto; font-style: normal; font-size: 11px; font-weight: 700; color: #fff; background: var(--accent); border-radius: 999px; padding: 1px 7px; }
.side-nav-cta { justify-content: center; gap: 6px; margin-top: 8px; padding: 10px 14px !important; }
.side-nav-cta svg.i { width: 15px; height: 15px; }

/* 왼쪽 박스들 */
.side-box { padding: 14px 12px; }
.side-box h3 { display: flex; justify-content: space-between; align-items: center; margin: 0 4px 8px; font-size: 13.5px; }
.side-box h3 a { display: inline-flex; align-items: center; gap: 6px; color: var(--text); }
.side-box h3 svg.i { width: 15px; height: 15px; color: var(--accent); }
.side-box h3 small, .sb-item small { color: var(--faint); font-weight: 500; font-size: 12px; }
.sb-item { display: flex; justify-content: space-between; gap: 8px; padding: 6px 8px; border-radius: 8px; color: var(--muted); font-size: 13px; text-decoration: none !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-item:hover { background: var(--hover); color: var(--text); }
.sb-more { display: block; padding: 6px 8px 0; font-size: 12.5px; color: var(--accent); }
.sb-lock { display: flex; align-items: center; gap: 4px; padding: 8px 8px 0; font-size: 11px; color: var(--faint); }
.sb-lock svg.i { width: 12px; height: 12px; }
.side-box .side-moments { gap: 5px; }
.pc-actions { gap: 6px; flex-wrap: wrap; }
.pc-actions .pill svg.i { width: 14px; height: 14px; margin-right: 4px; }

@media (max-width: 760px) {
  .side-nav { order: 1; flex-direction: row; overflow-x: auto; padding: 6px; scrollbar-width: none; }
  .side-nav > a:not(.pill) { flex-direction: column; gap: 3px; padding: 8px 10px; font-size: 11.5px; min-width: 58px; position: relative; }
  .side-nav em { position: absolute; top: 2px; right: 6px; padding: 0 5px; }
  .side-nav-cta { display: none !important; }
  .side-box { order: 3; }
  .splash-card { padding: 36px 22px 28px; }
}
.side-nav > a.on.pill { background: var(--accent); color: #fff; }
.side-nav > a:not(.pill) span { white-space: nowrap; }
.splash-card > p.splash-note { margin: 16px 0 0; font-size: 12.5px; color: var(--faint); }

/* 바로가기 박스 (프로필 사이드바와 같은 스타일) */
.sb-item > span { display: inline-flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sb-item > span svg.i { width: 15px; height: 15px; color: var(--faint); flex-shrink: 0; }
.sb-item.on { background: var(--hover); color: var(--text); font-weight: 600; }
.sb-item.on svg.i { color: var(--accent); }
.sb-item em { font-style: normal; font-size: 11px; font-weight: 700; color: #fff; background: var(--accent); border-radius: 999px; padding: 0 7px; line-height: 18px; }
.side-box .pc-actions { margin-top: 12px; }
.side-box h3 > span { display: inline-flex; align-items: center; gap: 6px; }

/* 해시태그 구름 */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 4px 8px; padding: 2px 4px; line-height: 1.5; }
.tag-cloud a { color: var(--muted); text-decoration: none !important; white-space: nowrap; }
.tag-cloud a:hover { color: var(--accent); }
.tag-cloud small { font-size: 10.5px; color: var(--faint); margin-left: 1px; }
.tag-cloud .tc1 { font-size: 12px; }
.tag-cloud .tc2 { font-size: 13.5px; color: var(--text); }
.tag-cloud .tc3 { font-size: 15px; font-weight: 600; color: var(--text); }
.tag-cloud .tc4 { font-size: 17px; font-weight: 700; color: var(--accent); }

@media (max-width: 760px) {
  .side > .side-box:first-child { order: 1; }
}
@media (max-width: 760px) {
  .side-shortcuts { order: 1 !important; display: flex; overflow-x: auto; gap: 2px; padding: 6px; scrollbar-width: none; }
  .side-shortcuts h3, .side-shortcuts .pc-actions { display: none; }
  .side-shortcuts .sb-item { flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 62px; padding: 8px 6px; font-size: 11.5px; position: relative; }
  .side-shortcuts .sb-item > span { flex-direction: column; gap: 3px; }
  .side-shortcuts .sb-item > span svg.i { width: 19px; height: 19px; color: var(--muted); }
  .side-shortcuts .sb-item em { position: absolute; top: 3px; right: 8px; }
}

/* 모멘트·아티클 목록: 2열, 왼쪽 썸네일 + 오른쪽 글 */
.moment-grid, .article-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.moment-card, .article-tile { flex-direction: row; align-items: stretch; min-height: 96px; border: 1px solid var(--line); box-shadow: none; }
.article-tile:hover { transform: none; box-shadow: none; border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.moment-card img, .mc-ph, .article-tile img, .at-ph { width: 96px; min-width: 96px; height: auto; aspect-ratio: auto; align-self: stretch; object-fit: cover; }
.mc-ph svg.i, .at-ph svg.i { width: 24px; height: 24px; }
.mc-body, .at-body { flex: 1; min-width: 0; justify-content: center; gap: 3px; padding: 10px 12px; }
.mc-body b, .at-body b { font-size: 14.5px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mc-body small, .at-body small { font-size: 12.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.moment-grid > .empty, .article-grid > .empty { grid-column: 1 / -1; }
@media (max-width: 520px) {
  .moment-grid, .article-grid { grid-template-columns: 1fr; }
}

/* 해시태그 구름: 크기 차이 없이 */
.tag-cloud a, .tag-cloud .tc1, .tag-cloud .tc2, .tag-cloud .tc3, .tag-cloud .tc4 { font-size: 13px; font-weight: 500; color: var(--muted); }
.tag-cloud a:hover { color: var(--accent); }
.sb-item > span.sb-t { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.article-grid { grid-template-columns: minmax(0, 1fr); }

/* 오른쪽 패널을 왼쪽 사이드바 높이에 맞춘다 */
.shell-grid { align-items: stretch; }
.side { align-self: start; }
.main-col { display: flex; flex-direction: column; }
.main-col > .panel { flex: 1; }

/* 탭: 스크롤바 없이 (밑줄은 그림자로) */
.tabs { scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.panel .tabs { border-bottom: 0; box-shadow: inset 0 -1px 0 var(--line); overflow-y: hidden; }
.panel .tabs a { border-bottom: 0; margin-bottom: 0; }
.panel .tabs a.on { box-shadow: inset 0 -2px 0 var(--accent); }

/* ⋯ 메뉴 */
.act-more .menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 6px; }

/* 팝업 */
dialog.modal { width: min(400px, calc(100vw - 32px)); max-height: min(560px, calc(100vh - 48px)); padding: 0; border: 0; border-radius: 16px; background: var(--surface); color: var(--text); box-shadow: 0 24px 64px rgba(0,0,0,.25); overflow: auto; }
dialog.modal::backdrop { background: rgba(15,15,20,.45); }
.modal-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 8px; padding: 14px 14px 12px 18px; background: var(--surface); border-bottom: 1px solid var(--line); }
.modal-head b { font-size: 15.5px; }
.modal-x { margin-left: auto; display: inline-flex; padding: 6px; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; }
.modal-x:hover { background: var(--hover); color: var(--text); }
.modal-body { padding: 10px 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.modal-body > form { margin: 0; }
.modal-body.form { gap: 10px; padding: 14px 16px 16px; }
.pick { display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px 12px; border: 0; border-radius: 10px; background: none; font: inherit; font-size: 14px; color: var(--text); text-align: left; cursor: pointer; }
.pick:hover { background: var(--hover); }
.pick.on { background: color-mix(in srgb, var(--accent) 9%, var(--surface)); }
.pick-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.pick small { color: var(--faint); font-size: 12px; }
.pick-check { width: 18px; text-align: center; color: var(--accent); font-weight: 800; }
.pick-new { display: flex; gap: 6px; margin-top: 10px !important; padding-top: 12px; border-top: 1px solid var(--line); }
.pick-new input { padding: 7px 10px; font-size: 14px; }
.pick-remove { margin: 10px 12px 0; font-size: 13px; color: var(--danger) !important; }

/* 알림 토스트 */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 12px); z-index: 1000; padding: 10px 16px; border-radius: 999px; background: #18181b; color: #fff; font-size: 13.5px; font-weight: 600; opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.modal-x:focus:not(:focus-visible) { outline: none; }

.sb-mobile { display: none !important; }
@media (max-width: 760px) {
  .side-shortcuts .sb-mobile { display: flex !important; }
  .side-shortcuts .sb-more { display: none; }
}

/* 설정: 패널 폭 그대로, 테두리 없이 구역을 가로줄로 나눈다 */
.panel .col.settings { max-width: none; }
.set-sec { padding: 22px 0; border-top: 1px solid var(--line); }
.settings > .page-title + .settings-form > .set-sec:first-child { border-top: 0; padding-top: 4px; }
.set-sec h2 { font-size: 16px; margin: 0 0 14px; }
.set-sec .form, .settings-form { margin: 0; }
.set-save { padding: 4px 0 24px; }
.settings .avatar-edit img { width: 72px; height: 72px; border-radius: 18px; }

.fields-edit { margin-top: 6px; }
.fields-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.fields-head b { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--muted); }
.fields-head svg.i { width: 15px; height: 15px; }
.fields-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.field-row { display: grid; grid-template-columns: 28px minmax(0, 2fr) minmax(0, 3fr) 34px; gap: 8px; align-items: center; padding: 8px; border-radius: 12px; background: var(--hover); }
.field-row input { background: var(--surface); padding: 8px 10px; }
.field-row.dragging { opacity: .5; }
.field-handle { display: flex; justify-content: center; color: var(--faint); cursor: grab; }
.field-del { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border: 0; border-radius: 8px; background: none; color: var(--faint); cursor: pointer; }
.field-del:hover { color: var(--danger); background: var(--surface); }
.js-field-add:disabled { opacity: .4; }

/* 프로필 카드의 추가 정보 */
.pc-fields { margin: 12px 0 0; text-align: left; font-size: 12px; border-top: 1px solid var(--line); }
.pc-fields > div { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 8px; padding: 6px 2px; border-bottom: 1px solid var(--line); }
.pc-fields dt { color: var(--faint); font-weight: 600; overflow-wrap: anywhere; }
.pc-fields dd { margin: 0; color: var(--text); overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .field-row { grid-template-columns: 22px minmax(0, 1fr) 30px; }
  .field-row input[name=field_value] { grid-column: 2; grid-row: 2; }
}

/* 이미지는 비율을 지키면서 칸을 가득 채운다 (넘치는 부분은 잘림) */
.pc-avatar { padding: 0; background: none; border-radius: 18px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.pc-avatar img { width: 104px; height: 104px; border-radius: 18px; object-fit: cover; }
.banner.has-img { background-size: cover; background-position: center; }
.avatar img, .account-row img, img.mini, .pn-me summary img, .nori-me summary img { object-fit: cover; }

/* 설정: 헤더/프로필 사진 고르기 */
.img-edit { position: relative; margin-bottom: 52px; }
.hdr-pick { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 1; min-height: 96px; border-radius: 14px; background: var(--hover) center / cover no-repeat; border: 2px dashed var(--line); cursor: pointer; overflow: hidden; margin: 0 !important; }
.hdr-pick.has { border-style: solid; border-color: transparent; }
.hdr-pick input, .av-pick input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.pick-label { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: rgba(0,0,0,.55); color: #fff; font-size: 13px; font-weight: 600; }
.pick-label svg.i { width: 15px; height: 15px; }
.hdr-pick:not(.has) .pick-label { background: var(--surface); color: var(--muted); }
.hdr-pick.picked, .av-pick.picked img { box-shadow: 0 0 0 3px var(--accent); }
.av-pick { position: absolute; left: 20px; bottom: -44px; width: 96px; height: 96px; margin: 0 !important; border-radius: 22px; cursor: pointer; }
.av-pick img { width: 96px; height: 96px; border-radius: 22px; object-fit: cover; border: 4px solid var(--surface); background: var(--hover); display: block; }
.av-pick .pick-label { position: absolute; right: -4px; bottom: -4px; padding: 6px; border: 2px solid var(--surface); }
.img-status { margin: 0 0 8px; }
.err-text { color: var(--danger) !important; font-weight: 600; }
.ok-text { color: var(--accent) !important; font-weight: 600; }
.img-remove { margin-bottom: 14px; gap: 16px; }
.img-remove .check { margin: 0 !important; }

/* 달력: 다른 상자와 같은 카드 스타일 (테마 색을 따름) */
.side-cal { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.cal-year { color: var(--faint); opacity: 1; }
.cal-head a { color: var(--muted); opacity: 1; }
.cal-head a:hover { color: var(--accent); }
.cal-grid th { color: var(--faint); opacity: 1; }
.cal-grid span, .cal-grid a { color: var(--text); }
.cal-grid span { color: var(--muted); opacity: 1; font-weight: 500; }
.cal-grid a.has { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--accent); font-weight: 700; }
.cal-grid a.has:hover { background: color-mix(in srgb, var(--accent) 22%, var(--surface)); }
.cal-grid .today { background: var(--accent) !important; color: #fff !important; }

/* 테마 전환 버튼 */
.pn-theme { border: 0; background: none; cursor: pointer; }
.pn-theme .t-sun { display: none; }
:root[data-theme="dark"] .pn-theme .t-sun { display: block; }
:root[data-theme="dark"] .pn-theme .t-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .pn-theme .t-sun { display: block; }
  :root:not([data-theme]) .pn-theme .t-moon { display: none; }
}
.theme-pick { display: flex; gap: 8px; flex-wrap: wrap; }
.theme-pick label { display: flex !important; align-items: center; gap: 6px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 10px; color: var(--text) !important; font-weight: 500 !important; cursor: pointer; margin: 0 !important; }
.theme-pick input { width: auto; accent-color: var(--accent); }

/* 작성기: 민감한 미디어, 드래그 앤 드롭 */
.composer { position: relative; }
.composer .tool.js-nsfw.on { color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, var(--surface)); }
.previews.nsfw .preview img { filter: blur(6px); }
.drop-hint { display: none; position: absolute; inset: 0; z-index: 5; align-items: center; justify-content: center; border: 2px dashed var(--accent); border-radius: inherit; background: color-mix(in srgb, var(--accent) 8%, var(--surface)); color: var(--accent); font-weight: 700; pointer-events: none; }
.composer.dragover .drop-hint { display: flex; }

/* 사진 팝업 */
dialog.lightbox { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(10,10,12,.92); color: #fff; overflow: hidden; }
dialog.lightbox::backdrop { background: transparent; }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox figure { margin: 0; max-width: calc(100vw - 140px); max-height: calc(100vh - 80px); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.lightbox figure img { max-width: 100%; max-height: calc(100vh - 120px); object-fit: contain; border-radius: 6px; }
.lightbox figcaption { font-size: 13.5px; color: rgba(255,255,255,.75); text-align: center; max-width: 640px; }
.lightbox figcaption:empty { display: none; }
.lb-x, .lb-prev, .lb-next { position: absolute; border: 0; background: rgba(255,255,255,.12); color: #fff; cursor: pointer; border-radius: 999px; font-size: 22px; line-height: 1; display: flex; align-items: center; justify-content: center; }
.lb-x { top: 16px; right: 16px; width: 40px; height: 40px; font-size: 18px; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); width: 48px; height: 48px; font-size: 30px; }
.lb-prev { left: 16px; } .lb-next { right: 16px; }
.lb-x:hover, .lb-prev:hover, .lb-next:hover { background: rgba(255,255,255,.24); }
.lb-open { position: absolute; bottom: 16px; right: 20px; color: rgba(255,255,255,.7) !important; font-size: 13px; }
@media (max-width: 600px) {
  .lightbox figure { max-width: 100vw; }
  .lb-prev, .lb-next { top: auto; bottom: 16px; transform: none; }
  .lb-prev { left: 16px; } .lb-next { left: 76px; right: auto; }
}

.banner:not(.has-img) .banner-title { display: none; }
dialog.lightbox { background: rgba(8,8,10,.97); } dialog.lightbox::backdrop { background: rgba(8,8,10,.6); backdrop-filter: blur(6px); }

/* 첨부 미리보기 + 민감한 미디어 토글 (사진 위) */
.previews-wrap { position: relative; margin: 8px 0; padding: 40px 10px 10px; border-radius: 12px; background: color-mix(in srgb, var(--text) 4%, transparent); }
.previews-wrap .previews { margin: 0; }
.nsfw-toggle { position: absolute; top: 8px; left: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.nsfw-toggle svg.i { width: 15px; height: 15px; }
.nsfw-toggle:hover { color: var(--text); }
.nsfw-toggle.on { background: var(--danger); border-color: var(--danger); color: #fff; }
.preview { position: relative; }
.preview-x { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border: 0; border-radius: 999px; background: rgba(0,0,0,.6); color: #fff; font-size: 11px; line-height: 22px; text-align: center; cursor: pointer; padding: 0; }
.preview-x:hover { background: var(--danger); }
.previews.nsfw .preview img { filter: blur(8px); }
.previews.nsfw .preview img { clip-path: inset(0 round 10px); }

.note-pinned svg.i { color: var(--accent) !important; }

/* 사진별 민감한 미디어 */
.media > .m-item { position: relative; min-height: 0; overflow: hidden; background: var(--hover); }
.media.n3 > .m-item:first-child { grid-row: span 2; }
.media > .m-item > a, .media > .m-item > video { display: block; height: 100%; }
.media > .m-item.blur > a, .media > .m-item.blur > video { filter: blur(28px) brightness(.8); pointer-events: none; }
.m-reveal { position: absolute; inset: 0; margin: auto; width: max-content; height: max-content; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 16px; border: 0; border-radius: 14px; background: rgba(0,0,0,.45); color: #fff; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.m-reveal svg.i { width: 28px; height: 28px; }
.m-reveal:hover { background: rgba(0,0,0,.6); }
.media.n3 > :first-child { grid-row: auto; }
.media.n3 > .m-item:first-child { grid-row: span 2; }

.preview-eye { position: absolute; top: 48px; left: 48px; transform: translate(-50%, -50%); width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 999px; background: rgba(0,0,0,.45); color: #fff; cursor: pointer; padding: 0; }
.preview-eye svg.i { width: 22px; height: 22px; }
.preview-eye:hover { background: rgba(0,0,0,.65); }
.preview-eye.on { background: var(--danger); }
.preview.sens img { filter: blur(8px); clip-path: inset(0 round 10px); }
.previews-wrap { padding: 10px; }
.previews-hint { margin: 8px 2px 0; font-size: 12px; color: var(--faint); }

.pc-remote { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 10px; font-size: 12px; }
.pc-remote a { color: var(--muted); }
.pc-remote form { margin: 0; }
.pc-remote .linklike { font-size: 12px; }
.pc-remote .linklike:disabled { opacity: .6; cursor: progress; }

/* 프로필 추가 정보: 좁은 칸이라 이름(둥근 배경) 아래에 내용을 쌓는다 */
.pc-fields { border-top: 0; margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.pc-fields > div { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 0; border-bottom: 0; }
.pc-fields dt { display: inline-block; padding: 2px 9px; border-radius: 7px; background: var(--hover); color: var(--muted); font-size: 11.5px; font-weight: 700; }
.pc-fields dd { padding: 0 2px; font-size: 12.5px; line-height: 1.55; word-break: keep-all; overflow-wrap: anywhere; }

/* 커스텀 이모지: 높이만 맞추고 가로는 원래 비율 그대로 (가로로 긴 이모지도 줄이지 않음) */
img.emoji { height: 1.5em; width: auto; max-width: none; vertical-align: -.38em; object-fit: contain; }

/* 리액션 */
.note-actions { flex-wrap: wrap; }
.reactions { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 6px 8px; }
.reactions form { margin: 0; }
.rc { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font: inherit; font-size: 12.5px; cursor: pointer; }
span.rc { cursor: default; }
.rc:hover { border-color: var(--faint); }
.rc.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); color: var(--accent); }
.rc img.emoji { height: 28px; max-width: 160px; vertical-align: 0; }
.rc-u { font-size: 22px; line-height: 1; }
.rc b { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.act.react { min-width: 0; }
.act.react:hover { color: var(--accent); }

/* 이모지 고르기 */
.modal-head .ep-search { flex: 1; min-width: 0; margin-left: 8px; padding: 6px 10px; font-size: 13.5px; }
.ep { gap: 0 !important; }
.ep-cat { font-size: 12px; font-weight: 700; color: var(--faint); margin: 10px 4px 6px; }
.ep-grid { display: flex; flex-wrap: wrap; gap: 2px; }
.ep-grid form { margin: 0; }
.ep-btn { min-width: 40px; height: 40px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 10px; background: none; font-size: 22px; cursor: pointer; }
.ep-btn:hover { background: var(--hover); }
.ep-btn.on { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); }
.ep-btn img.emoji { height: 28px; vertical-align: 0; }

/* 관리: 이모지 목록 */
.emoji-admin { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.ea-item { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 12px; }
.ea-item img.emoji { height: 36px; grid-row: span 2; }
.ea-item code { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; }
.ea-item form { margin: 0; flex-wrap: nowrap; }
.ea-item input { padding: 4px 8px; font-size: 12.5px; }

.reactions.folded > :nth-child(n+13):not(.rc-more) { display: none; }
.rc-more { color: var(--accent); font-weight: 600; }

/* 타임라인 글타래: 원글과 답글을 아바타 사이 선으로 잇는다 */
.note.th-next { border-bottom: 0 !important; padding-bottom: 2px; }
.note.th-prev { padding-top: 6px; }
.note.th-next .note-row { position: relative; }
.note.th-next .note-row::before { content: ""; position: absolute; left: 21px; top: 52px; bottom: -10px; width: 2px; border-radius: 2px; background: var(--line); }
.panel .notes > .note.th-next { border-bottom: 0 !important; }
.note.th-prev .note-replyto { display: none; }
@media (max-width: 600px) { .note.th-next .note-row::before { left: 19px; top: 48px; } }

/* 자세히 보기: 리액션·부스트한 사람 */
.people { margin-top: 18px; }
.people-tabs { display: flex; gap: 4px; box-shadow: inset 0 -1px 0 var(--line); margin-bottom: 6px; }
.people-tabs button { border: 0; background: none; padding: 9px 14px; font: inherit; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; }
.people-tabs button.on { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }
.people-list { display: flex; flex-direction: column; }
.person { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none !important; }
.person:last-child { border-bottom: 0; }
.person:hover { background: var(--hover); }
.person > img { width: 36px; height: 36px; border-radius: 10px; object-fit: cover; background: var(--hover); }
.person-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.person-name b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person-name small { color: var(--faint); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person-r { font-size: 20px; line-height: 1; }
.person-r img.emoji { height: 24px; vertical-align: middle; }
.people-empty { padding: 14px 4px; }
span.rc { opacity: .85; }

/* 프로필 카드 정리: 가운데 정렬로 통일, 추가 정보 위 가로선, 숫자 작게, 버튼 꽉 차게 */
.pc-fields { border-top: 1px solid var(--line); padding-top: 14px; text-align: center; }
.pc-fields > div { align-items: center; }
.pc-fields dd { text-align: center; }
.pc-stats { gap: 16px; }
.pc-stats b { font-size: 12.5px; }
.pc-stats a { font-size: 11px; }
.pc-actions { display: flex; gap: 6px; width: 100%; }
.pc-actions > form, .pc-actions > a { flex: 1; min-width: 0; }
.pc-actions .pill { width: 100%; justify-content: center; }

/* 프로필 카드: 나를 팔로우함 배지, since 작게 */
.pc-badge { display: inline-block; margin-top: 6px; padding: 1px 8px; border-radius: 6px; background: var(--hover); color: var(--muted); font-size: 10.5px; font-weight: 600; }
.pc-since { font-size: 10.5px; margin-top: 10px; }
.act.react { min-width: 56px; }

/* 인용 */
.note-content.has-quote .quote-inline { display: none; }
.quote-card { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; color: var(--text); text-decoration: none !important; transition: background .15s; }
.quote-card:hover { background: var(--hover); }
.qc-head { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 13.5px; }
.qc-head img { width: 20px; height: 20px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.qc-head b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qc-head small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qc-head time { margin-left: auto; color: var(--faint); font-size: 12px; white-space: nowrap; flex-shrink: 0; }
.qc-title { font-weight: 700; }
.qc-text { font-size: 14.5px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.qc-text p { margin: 0 0 .4em; }
.qc-text .quote-inline { display: none; }
.qc-media { display: flex; gap: 4px; }
.qc-media img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; }
.qc-media img.blur { filter: blur(10px); clip-path: inset(0 round 8px); }
.quote-compose .composer { margin-bottom: 0; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.quote-preview { padding: 0 14px 14px; background: var(--hover); border-radius: 0 0 14px 14px; }
.quote-preview .note-content:empty { display: none; }
.quote-preview .quote-card { margin-top: 0; background: var(--surface); }
.act-boost .menu { min-width: 160px; }

.quote-card { position: relative; }
.qc-cover { position: absolute; inset: 0; border-radius: inherit; z-index: 0; }
.quote-card .qc-text a, .quote-card .qc-head { position: relative; z-index: 1; }
.quote-card .qc-head { pointer-events: none; }
.qc-text { display: -webkit-box; }

/* ================= 모바일 정리 ================= */
.tabbar { display: none; }
.pc-more { display: none; }
@media (max-width: 760px) {
  /* 위 메뉴: 첫 줄엔 이름과 아이콘, 둘째 줄에 메뉴 알약(가로 스크롤) */
  .shell > .pillnav { flex-wrap: wrap; row-gap: 6px; margin-bottom: 10px; }
  .shell > .pillnav .pills { order: 3; flex: 0 0 100%; padding: 0; }
  .shell > .pillnav .pn-tools { margin-left: auto; }
  body[data-stream] .shell > .pillnav .pn-tools > a.pn-ic { display: none; } /* 검색·알림은 아래 탭으로 */

  /* 프로필 카드: 가운데 정렬로 작게 */
  .profile-card { display: block !important; text-align: center !important; padding: 20px 16px 16px !important; }
  .pc-avatar { padding: 0; border-radius: 16px; }
  .pc-avatar img { width: 76px !important; height: 76px !important; border-radius: 16px !important; }
  .pc-name { margin: 10px 0 0 !important; font-size: 18px !important; }
  .pc-bio { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
  .pc-stats { justify-content: center !important; }
  .pc-actions { justify-content: center !important; }
  .pc-fields.folded { display: none; }
  .pc-more { display: inline-block; margin-top: 10px; padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; background: none; color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; }

  /* 타임라인 바로가기 줄은 아래 탭과 겹치므로 숨김 */
  .side-shortcuts { display: none !important; }

  /* 아래 탭 */
  body[data-stream] .shell { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; justify-content: space-around; align-items: center;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--surface) 92%, transparent);
    -webkit-backdrop-filter: saturate(180%) blur(14px); backdrop-filter: saturate(180%) blur(14px); border-top: 1px solid var(--line); }
  .tabbar a { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0; color: var(--muted); font-size: 10.5px; font-weight: 600; text-decoration: none !important; }
  .tabbar a svg.i { width: 23px; height: 23px; }
  .tabbar a.on { color: var(--accent); }
  .tabbar .tb-write { flex: 0 0 auto; width: 46px; height: 46px; justify-content: center; border-radius: 16px; background: var(--accent); color: #fff; margin: 0 6px; }
  .tabbar .tb-write svg.i { width: 21px; height: 21px; }
  .tabbar em { position: absolute; top: 0; left: 50%; margin-left: 6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--accent); color: #fff; font-size: 10px; font-style: normal; font-weight: 700; display: flex; align-items: center; justify-content: center; }
  .toast { bottom: calc(86px + env(safe-area-inset-bottom)); }

  /* 배너 조금 낮게, 패널 여백 */
  .banner { min-height: 64px; aspect-ratio: 6 / 1; }
  .panel { padding: 16px 12px 20px; }
  .note-actions { margin-left: -6px; }
  .act { min-width: 44px; }
}

@media (max-width: 760px) {
  /* 설정 등에서는 내 프로필 카드·상자를 숨긴다 (프로필·글·아티클 화면만 보여 줌) */
  body:not(.pg-profile):not(.pg-thread):not(.pg-article) .side { display: none !important; }
  .hdr-pick { width: 100%; max-width: 100%; aspect-ratio: auto; height: 96px; }
  .av-pick { left: 14px; width: 80px; height: 80px; bottom: -36px; }
  .av-pick img { width: 80px; height: 80px; }
  .img-edit { margin-bottom: 44px; }
}
@media (max-width: 760px) {
  .banner { aspect-ratio: auto !important; width: 100%; height: clamp(64px, 24vw, 110px); min-height: 0; }
  .act-more:not(.act-boost) .menu { left: auto; right: 0; }
}

/* 오른쪽으로 쓸어서 뒤로 가기 표시 */
.swipe-back { position: fixed; left: 10px; top: 50%; z-index: 90; width: 40px; height: 40px; margin-top: -20px; border-radius: 999px; background: var(--surface); color: var(--muted); box-shadow: 0 4px 16px rgba(0,0,0,.15); display: flex; align-items: center; justify-content: center; font-size: 26px; line-height: 1; opacity: 0; pointer-events: none; transition: background .15s, color .15s; }
.swipe-back.ready { background: var(--accent); color: #fff; }

@media (max-width: 760px) {
  /* 단독 게시물 화면에서도 위쪽 프로필 카드 숨김 */
  body.pg-thread .side { display: none !important; }
  /* 프로필 카드 추가 정보: 접지 않고 2열 */
  .pc-fields, .pc-fields.folded { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 10px; text-align: center; }
  .pc-fields > div { min-width: 0; }
  .pc-more { display: none !important; }
}

/* 쓱뽕 */
html { overscroll-behavior-y: contain; } /* 브라우저 기본 당겨서 새로고침과 겹치지 않게 */
.ptr { position: fixed; top: 6px; left: 50%; z-index: 95; width: 38px; height: 38px; margin-top: -20px; transform: translate(-50%, 0); border-radius: 999px; background: var(--surface); color: var(--muted); box-shadow: 0 4px 16px rgba(0,0,0,.15); display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; opacity: 0; pointer-events: none; }
.ptr.ready { background: var(--accent); color: #fff; }
.ptr.spin span { animation: ptr-spin .7s linear infinite; display: inline-block; }
@keyframes ptr-spin { to { transform: rotate(360deg); } }

.theme-bg-prev { height: 80px; border-radius: 12px; background: var(--hover) center / cover; margin: -6px 0 10px; }

/* 드라이브 */
.drive-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0 14px; }
.drive-tools form { margin: 0; }
.drive-tools label.btn { cursor: pointer; }
.drive-crumb { margin: 0 0 8px; }
.drive-folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; margin-bottom: 14px; }
.dfolder { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; color: var(--text); text-decoration: none !important; }
.dfolder:hover { background: var(--hover); }
.dfolder svg.i { color: var(--accent); }
.dfolder b { flex: 1; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dfolder small { color: var(--faint); }
.drive-bar { position: sticky; top: 8px; z-index: 5; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px 10px; margin-bottom: 10px; border-radius: 12px; background: var(--surface); box-shadow: 0 4px 16px rgba(0,0,0,.1); border: 1px solid var(--line); }
.drive-bar[hidden] { display: flex; visibility: hidden; } /* 자리는 남겨 둬서 고를 때 파일이 밀리지 않게 */
.drive-bar select { width: auto; padding: 5px 8px; font-size: 13px; }
.ds-count { font-size: 13px; font-weight: 700; margin-right: 4px; }
.drive-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.dfile { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; cursor: default; }
.dfile:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 30%, transparent); }
.dfile input { position: absolute; top: 10px; left: 10px; z-index: 1; width: 18px; height: 18px; }
.df-thumb { aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--hover); display: flex; align-items: center; justify-content: center; color: var(--faint); }
.df-thumb img, .df-thumb video { width: 100%; height: 100%; object-fit: cover; }
.df-name { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 2px; }
.df-meta { font-size: 11.5px; color: var(--faint); padding: 0 2px; }
.df-meta em { font-style: normal; color: var(--danger); font-weight: 600; }
.df-acts { font-size: 11.5px; padding: 0 2px; }
.df-acts a, .df-acts .linklike { font-size: 11.5px; color: var(--muted); }
.dfile.unused .df-thumb { opacity: .75; }
@media (max-width: 600px) { .drive-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.df-date { display: none; }
.drive-view { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin: 0 0 8px; }
.drive-view .ds-all { margin-right: auto; font-size: 13px; }
.drive-view .seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.drive-view .seg button { border: 0; background: none; padding: 5px 9px; color: var(--muted); cursor: pointer; display: flex; }
.drive-view .seg button + button { border-left: 1px solid var(--line); }
.drive-view .seg button.on { background: var(--hover); color: var(--text); }
.drive-view .seg svg { width: 16px; height: 16px; }
.drive-grid { user-select: none; -webkit-user-select: none; }
.drive-band { position: absolute; z-index: 50; pointer-events: none; border: 1px solid var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); border-radius: 3px; }
body.drive-dragging { cursor: crosshair; user-select: none; -webkit-user-select: none; }
body.drive-moving { cursor: grabbing; }
.drive-ghost { position: fixed; z-index: 60; pointer-events: none; padding: 6px 12px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 600; box-shadow: 0 4px 14px rgba(0,0,0,.2); }
.dfolder.drop-on, .drive-crumb a.drop-on { outline: 2px solid var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); border-radius: 8px; }
.drive { min-height: 60vh; }
/* 목록 보기 */
.drive-grid.list { display: flex; flex-direction: column; gap: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.drive-grid.list .dfile { display: grid; grid-template-columns: 22px 40px minmax(0, 1fr) 112px 118px; align-items: center; column-gap: 12px; row-gap: 1px; padding: 6px 12px; border: 0; border-radius: 0; border-bottom: 1px solid var(--line); }
.drive-grid.list .dfile:last-child { border-bottom: 0; }
.drive-grid.list .dfile:has(input:checked) { box-shadow: none; background: color-mix(in srgb, var(--accent) 10%, transparent); }
.drive-grid.list .dfile input { position: static; }
.drive-grid.list .df-thumb { width: 40px; height: 40px; border-radius: 6px; }
.drive-grid.list .df-thumb svg { width: 18px; height: 18px; }
.drive-grid.list .df-name { font-size: 13.5px; }
.drive-grid.list .df-date { display: block; font-size: 12px; color: var(--faint); white-space: nowrap; }
.drive-grid.list .df-acts { text-align: right; }
.drive-grid.list input, .drive-grid.list .df-thumb { grid-row: 1 / span 2; }
.drive-grid.list .df-name { grid-column: 3; grid-row: 1; align-self: end; }
.drive-grid.list .df-meta { grid-column: 3; grid-row: 2; align-self: start; }
.drive-grid.list .df-date { grid-column: 4; grid-row: 1 / span 2; }
.drive-grid.list .df-acts { grid-column: 5; grid-row: 1 / span 2; }
.drive-grid.list .df-meta, .drive-grid.list .df-acts { white-space: nowrap; }
.drive-grid.list .dfile:hover { background: var(--hover); }
@media (max-width: 600px) {
  .drive-grid.list .dfile { grid-template-columns: 22px 40px minmax(0, 1fr); row-gap: 2px; }
  .drive-grid.list .df-date { display: none; }
  .drive-grid.list .df-meta { grid-column: 3; }
  .drive-grid.list .df-acts { grid-column: 3; grid-row: 3; text-align: left; }
  .drive-grid.list .df-thumb { grid-row: 1 / span 3; grid-column: 2; }
  .drive-grid.list input { grid-row: 1 / span 3; }
}

.ck-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 2px 12px; margin-bottom: 12px; }
.ck-grid label.check { margin: 0 0 6px !important; }
.cl-box { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; }
.cl-box .row { font-size: 14px; }
.danger-box { border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); }

.danger-box { border-color: var(--line); }

/* 음악 첨부: 사진 아래에 플레이어 */
.audios { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.audio-card { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: color-mix(in srgb, var(--accent) 4%, var(--surface)); }
.audio-card.blur audio { filter: blur(3px); }
.ac-info { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ac-info b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-icon { flex-shrink: 0; width: 28px; height: 28px; border-radius: 8px; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; }
.audio-card audio { width: 100%; height: 36px; }
.media video { background: #000; }

.ea-item .ea-alias { grid-column: 2; }
.ea-item { grid-template-rows: auto auto auto; }

/* 글 상세: 반응 목록과 답글 사이 구분, 답글은 팝업으로 */
.thread .people { padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.reply-cta { display: flex; align-items: center; gap: 10px; width: 100%; margin: 14px 0 6px; padding: 8px 14px 8px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--faint); font: inherit; font-size: 14.5px; text-align: left; cursor: text; }
.reply-cta:hover { border-color: var(--faint); color: var(--muted); }
.reply-cta img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.reply-cta span { flex: 1; }
.reply-cta .i { color: var(--muted); }
dialog.modal.reply-modal { width: min(620px, calc(100vw - 24px)); max-height: calc(100vh - 48px); }
.reply-modal .modal-body { padding: 12px 14px 14px; }
.reply-modal .composer { margin: 0; border: 0; box-shadow: none; padding: 0; background: none; }
.thread .replies { margin-top: 6px; }

.act.react.on { color: var(--accent); }

/* 액션줄: 버튼마다 같은 폭의 칸을 주고 아이콘은 칸 왼쪽에 (숫자가 있든 없든 간격이 똑같게) */
.note-actions > :not(.reactions) { flex: 1 1 0; min-width: 0; }
.note-actions > form > .act, .note-actions > details > summary.act { width: max-content; }
.note-actions .act, .note-actions .act.react, .act-more > summary { min-width: 0; }
.article-actions .note-actions > :not(.reactions) { flex: 0 0 auto; }

/* 위젯 */
.widget-frame { display: block; width: 100%; border: 0; background: transparent; color-scheme: normal; }
.widget-box { padding: 0; overflow: hidden; }
.widget-box h3 { padding: 14px 16px 0; }
.widget-preview { margin-top: 12px; padding: 10px; border: 1px dashed var(--line); border-radius: 12px; }
.widget-preview .widget-frame { margin-top: 6px; }
.widget-edit textarea { min-height: 220px; }
.float-widgets { position: fixed; right: 16px; bottom: 16px; z-index: 900; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; max-width: calc(100vw - 32px); pointer-events: none; }
.fw { max-width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 32px rgba(0,0,0,.18); overflow: hidden; pointer-events: auto; }
.fw-bar { display: flex; align-items: center; gap: 4px; padding: 4px 6px 4px 12px; font-size: 12px; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line); }
.fw-bar span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fw-bar button { border: 0; background: none; color: var(--muted); font-size: 16px; line-height: 1; padding: 2px 6px; border-radius: 6px; cursor: pointer; }
.fw-bar button:hover { background: var(--hover); color: var(--text); }
.fw.min iframe { display: none; }
.fw.min .fw-bar { border-bottom: 0; }
@media (max-width: 760px) { .float-widgets { bottom: 76px; right: 10px; } }

/* 스티커: 화면 틀 둘레에 붙이는 이미지 (넓은 화면에서만) */
.shell { position: relative; }
body.shell-body { overflow-x: clip; }
.stickers { position: absolute; top: 0; left: 50%; width: 0; height: 0; z-index: 60; }
.sticker { position: absolute; height: auto; max-width: none; max-height: none; translate: -50% -50%; transform: rotate(var(--r, 0deg)); transform-origin: center; filter: drop-shadow(2px 3px 4px rgba(0,0,0,.28)); user-select: none; -webkit-user-drag: none; }
.sticker:hover { animation: stk-bounce .4s ease; }
.sticker.shake { animation: stk-shake 2.4s ease-in-out infinite; }
@keyframes stk-bounce { 0% { scale: 1 } 30% { scale: 1.18 } 50% { scale: .95 } 70% { scale: 1.05 } 100% { scale: 1 } }
@keyframes stk-shake { 0%, 100% { rotate: 0deg } 25% { rotate: -4deg } 75% { rotate: 4deg } }
/* 편집 모드 */
body.stk-editing .sticker { cursor: grab; outline: 2px dashed color-mix(in srgb, var(--accent) 70%, transparent); outline-offset: 4px; }
body.stk-editing .sticker:not(.shake) { animation: none; }
body.stk-editing .sticker.dragging { animation: none; }
body.stk-editing .sticker.sel { outline-style: solid; }
body.stk-editing .sticker:active { cursor: grabbing; }
.stk-bar { position: fixed; z-index: 1000; left: 50%; top: 12px; transform: translateX(-50%); display: flex; flex-wrap: nowrap; white-space: nowrap; max-width: calc(100vw - 24px); overflow-x: auto; align-items: center; gap: 8px; padding: 8px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 32px rgba(0,0,0,.18); font-size: 13px; }
.stk-bar label { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.stk-bar input[type=range] { width: 110px; accent-color: var(--accent); }
.stk-bar .stk-sel[hidden] { display: none; }
.stk-bar .stk-sel { display: inline-flex; align-items: center; gap: 8px; padding-left: 8px; border-left: 1px solid var(--line); }
@media (max-width: 760px) {
  .stickers, .float-widgets, .js-sticker-edit { display: none !important; }
}

/* 상단 메뉴: 왼쪽 위 내 프로필 사진(메뉴), 오른쪽 위 로고(타임라인) */
.pn-me-left { margin: 0 4px 0 0; }
.pn-me-left .pn-drop { left: 0; right: auto; }
.pillnav .pn-brand { margin: 0 0 0 8px; }
.pn-login { flex-shrink: 0; }
.field-group { display: flex; flex-direction: column; gap: 6px; }
.field-group .fg-label { font-size: 13.5px; font-weight: 600; }
.field-group input[type=color] { margin-left: 6px; vertical-align: middle; }
@media (max-width: 760px) {
  .shell > .pillnav .pn-tools { margin-left: auto; }
}

/* 트위터 이모지: 글자 크기에 맞춰 */
img.emoji.twemoji { height: 1.15em; width: 1.15em; margin: 0 .05em; vertical-align: -.2em; object-fit: contain; }
.rc img.twemoji { height: 22px; width: 22px; vertical-align: 0; }
.ep-btn img.twemoji { height: 26px; width: 26px; }

/* @아이디 자동완성 */
.composer { position: relative; }
.ac-box { position: absolute; z-index: 70; left: 8px; right: 8px; margin-top: 2px; max-width: 360px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.16); }
.ac-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 8px; border: 0; border-radius: 8px; background: none; font: inherit; text-align: left; cursor: pointer; color: var(--text); }
.ac-item.on, .ac-item:hover { background: var(--hover); }
.ac-item img { width: 30px; height: 30px; border-radius: 8px; object-fit: cover; flex: none; }
.ac-t { display: flex; flex-direction: column; min-width: 0; }
.ac-t b, .ac-t small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-t b { font-size: 14px; }
.ac-t small { color: var(--muted); font-size: 12px; }
/* 상단 메뉴는 스티커보다 위에 (스티커가 덮어도 누를 수 있게) */
.shell > .pillnav { position: relative; z-index: 80; }

/* 아티클 편집기: 이미지 넣기 */
.md-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 10px 0 -4px; }
.article-body-input.drop-on { outline: 2px dashed var(--accent); outline-offset: 2px; }
.article-body img { max-width: 100%; height: auto; border-radius: 12px; display: block; margin: 14px auto; }

.tab-cta { margin: 12px 0 0; }

/* 라디오·색 고르기는 입력칸 공통 폭(100%)에서 빼기 */
input[type=radio] { width: auto; accent-color: var(--accent); }
.form label.check > input { margin-top: 0; flex: none; }
.form label.check > input[type=color] { width: 40px; height: 30px; margin-left: 4px; }

/* 설정 탭 */
.settings-tabs { position: sticky; top: 8px; z-index: 20; margin-bottom: 6px; }
.settings-tabs a.on { color: var(--text); background: var(--hover); box-shadow: inset 0 -2px 0 var(--accent); }
.settings [data-tab][hidden] { display: none !important; }
.settings .settings-form > .set-sec[data-tab]:not([hidden]) ~ .set-sec { border-top: 1px solid var(--line); }
.set-save { position: sticky; bottom: 0; z-index: 10; padding: 12px 0 16px; background: linear-gradient(to top, var(--surface) 70%, transparent); }
@media (max-width: 760px) { body[data-stream] .set-save { bottom: calc(64px + env(safe-area-inset-bottom)); } }

/* 꾸미기: 위젯·스티커 안내 카드 */
.deco-cta { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin-bottom: 22px; }
.deco-card { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 16px; text-decoration: none !important; color: var(--text);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 16%, var(--surface)), var(--surface) 70%); border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); transition: transform .15s, box-shadow .15s; }
.deco-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px color-mix(in srgb, var(--accent) 22%, transparent); }
.deco-ic { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 14px; background: var(--accent); color: #fff; }
.deco-ic svg.i { width: 22px; height: 22px; }
.deco-t { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.deco-t b { font-size: 16px; }
.deco-t small { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.deco-go { margin-left: auto; font-size: 20px; color: var(--accent); }

/* 위젯 템플릿 고르기 */
.wt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.wt-grid form { margin: 0; }
.wt-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; width: 100%; height: 100%; padding: 14px 14px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: transform .15s, border-color .15s, box-shadow .15s; }
.wt-card:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: 0 10px 22px color-mix(in srgb, var(--accent) 18%, transparent); }
.wt-ic { font-size: 26px; line-height: 1; margin-bottom: 4px; }
.wt-card b { font-size: 14.5px; }
.wt-card small { color: var(--muted); font-size: 12px; line-height: 1.45; }
.wt-card em { margin-top: auto; padding-top: 6px; font-style: normal; font-size: 11px; color: var(--accent); font-weight: 700; }

/* 스티커 메모 (포스트잇) */
.sticker.memo { min-height: 70px; padding: 20px 14px 14px; background: var(--memo, #fff27a); color: #3b3324; border-radius: 2px 2px 14px 2px; box-shadow: 0 8px 16px rgba(0,0,0,.18); filter: none; font-size: 14px; line-height: 1.55; font-weight: 600; }
.sticker.memo::before { content: ""; position: absolute; top: -10px; left: 50%; width: 64px; height: 20px; transform: translateX(-50%) rotate(-3deg); background: rgba(255,255,255,.55); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.memo-body { white-space: pre-wrap; word-break: break-word; outline: none; min-height: 1.5em; }
body.stk-editing .sticker.memo.sel .memo-body { cursor: text; background: rgba(255,255,255,.35); border-radius: 4px; }
.stk-colors { display: inline-flex; gap: 4px; }
.stk-colors[hidden] { display: none; }
.stk-sw { width: 20px; height: 20px; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); cursor: pointer; padding: 0; }

/* 사이드바 상자 순서 편집 */
.side-slots { display: contents; }
.sb-slot.sb-off { display: none; }
body.side-editing .side-slots { display: flex; flex-direction: column; gap: inherit; }
body.side-editing .sb-slot { position: relative; outline: 2px dashed color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 3px; border-radius: var(--radius); }
body.side-editing .sb-slot.sb-off { display: block; opacity: .45; }
body.side-editing .sb-slot.sb-drag { opacity: .4; }
body.side-editing .sb-slot iframe { pointer-events: none; }
.sb-tools { display: flex; align-items: center; gap: 4px; padding: 6px 8px; margin-bottom: 6px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 12px; cursor: grab; }
.sb-tools b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-tools button, .sb-tools a { border: 0; background: rgba(255,255,255,.2); color: #fff; font: inherit; font-size: 12px; padding: 2px 7px; border-radius: 6px; cursor: pointer; text-decoration: none !important; }
.sb-tools button:hover, .sb-tools a:hover { background: rgba(255,255,255,.35); }
.sb-grip { font-size: 14px; opacity: .8; }
.sb-add { display: block; text-align: center; padding: 12px; border: 2px dashed var(--line); border-radius: var(--radius); color: var(--accent); font-weight: 700; font-size: 13.5px; text-decoration: none !important; background: var(--surface); }
.sb-edit-row { display: flex; justify-content: center; }
.sb-edit { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--faint); font: inherit; font-size: 12.5px; padding: 6px 10px; border-radius: 8px; cursor: pointer; }
.sb-edit:hover { color: var(--text); background: var(--hover); }
.sb-edit svg.i { width: 14px; height: 14px; }
body.side-editing .sb-edit { color: #fff; background: var(--accent); }

/* 위젯 미리보기: 실제 자리와 같은 폭으로 */
.wp-stage { margin-top: 8px; padding: 16px; border-radius: 12px; background: var(--shell-bg, #eff0f3); display: flex; justify-content: center; overflow-x: auto; }
.wp-side { width: 228px; flex: none; margin: 0; }
.wp-float { flex: none; max-width: none; }

/* 프로필 카드: 뮤트·차단 메뉴 */
.pc-menu { position: relative; flex: none; }
.pc-menu > summary.pill { padding-left: 10px; padding-right: 10px; height: 100%; }
.pc-menu .menu { left: auto; right: 0; top: 40px; text-align: left; }
.pc-menu .menu small { color: var(--muted); font-size: 12px; margin-left: 4px; }
.pc-filter { margin-top: 10px; padding: 6px 10px; border-radius: 10px; background: var(--hover); color: var(--muted); font-size: 12.5px; text-align: center; }
.danger-pill { color: var(--danger) !important; }

.kw-muted > summary span:first-child { color: var(--muted); font-style: italic; }

/* 설정: 뮤트·차단 */
.kw-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.kw-add input[name=word], .kw-add input[name=domain] { flex: 1 1 200px; width: auto; }
.kw-add label.check { margin: 0; }
.chip-list { display: flex; flex-wrap: wrap; gap: 6px; }
.kw-chip { display: inline-flex; align-items: center; gap: 2px; margin: 0; padding: 3px 4px 3px 12px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); font-size: 13px; }
.kw-chip.hard { background: var(--hover); border-color: var(--line); }
.kw-chip span { margin-right: 4px; font-weight: 600; }
.kw-chip button { border: 0; background: none; color: var(--muted); font: inherit; font-size: 12px; padding: 2px 7px; border-radius: 999px; cursor: pointer; }
.kw-chip button:hover { background: var(--surface); color: var(--text); }
.filter-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); margin: 0; }
.fr-who { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; color: var(--text); text-decoration: none !important; }
.fr-who img { width: 36px; height: 36px; border-radius: 10px; object-fit: cover; }
.fr-who span { display: flex; flex-direction: column; min-width: 0; }
.fr-who small { color: var(--muted); }

.stk-colors .stk-cc { width: 28px; height: 24px; padding: 1px; border-radius: 6px; }
.stk-colors .stk-hex { width: 76px; padding: 3px 6px; font: 12px ui-monospace, monospace; border-radius: 6px; }

/* 코드 편집 칸 (CodeMirror) — 사이트 색에 맞춘 문법 색칠 */
:root { --code-tag: #c2185b; --code-attr: #8250df; --code-str: #0a7f3f; --code-com: #8b8b95; --code-kw: #cf222e; --code-num: #0550ae; --code-prop: #0969da; --code-def: #953800; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --code-tag: #ff7ab2; --code-attr: #c4a0ff; --code-str: #7ee787; --code-com: #7d7d88; --code-kw: #ff7b72; --code-num: #79c0ff; --code-prop: #6cb6ff; --code-def: #ffa657; } }
:root[data-theme="dark"] { --code-tag: #ff7ab2; --code-attr: #c4a0ff; --code-str: #7ee787; --code-com: #7d7d88; --code-kw: #ff7b72; --code-num: #79c0ff; --code-prop: #6cb6ff; --code-def: #ffa657; }
.form label .CodeMirror { margin-top: 6px; }
.CodeMirror { height: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); font: 13px/1.6 ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-weight: 400; }
.CodeMirror-focused { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.CodeMirror-scroll { min-height: 180px; max-height: 70vh; }
.CodeMirror-gutters { background: var(--hover); border-right: 1px solid var(--line); border-radius: 10px 0 0 10px; }
.CodeMirror-linenumber { color: var(--faint); }
.CodeMirror-cursor { border-left: 2px solid var(--text); }
.CodeMirror-selected, .CodeMirror-focused .CodeMirror-selected { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.CodeMirror-matchingbracket { color: var(--accent) !important; font-weight: 700; text-decoration: underline; }
.cm-s-default .cm-tag { color: var(--code-tag); }
.cm-s-default .cm-bracket { color: var(--code-com); }
.cm-s-default .cm-attribute { color: var(--code-attr); }
.cm-s-default .cm-string, .cm-s-default .cm-string-2 { color: var(--code-str); }
.cm-s-default .cm-comment { color: var(--code-com); font-style: italic; }
.cm-s-default .cm-keyword, .cm-s-default .cm-atom { color: var(--code-kw); }
.cm-s-default .cm-number { color: var(--code-num); }
.cm-s-default .cm-property, .cm-s-default .cm-variable-2 { color: var(--code-prop); }
.cm-s-default .cm-def, .cm-s-default .cm-qualifier, .cm-s-default .cm-builtin, .cm-s-default .cm-variable-3, .cm-s-default .cm-type { color: var(--code-def); }
.cm-s-default .cm-variable, .cm-s-default .cm-operator { color: var(--text); }
.cm-s-default .cm-meta { color: var(--code-com); }

/* 파일 고르기 칸 */
.fp-input { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0; pointer-events: none; }
.file-pick { display: flex; align-items: center; gap: 10px; margin-top: 6px; padding: 8px 10px; border: 1.5px dashed var(--line); border-radius: 12px; background: var(--surface); transition: border-color .15s, background .15s; }
.file-pick.drop { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.file-pick.has { border-style: solid; }
.file-pick .btn { flex: none; }
.fp-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 500; color: var(--muted); }
.file-pick.has .fp-name { color: var(--text); }
.fp-thumb { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; flex: none; }
.fp-clear { flex: none; border: 0; background: none; color: var(--muted); font-size: 18px; line-height: 1; padding: 2px 6px; border-radius: 6px; cursor: pointer; }
.fp-clear:hover { background: var(--hover); color: var(--text); }

/* iPhone은 16px보다 작은 입력칸을 누르면 화면을 확대해 버린다 */
@media (pointer: coarse) {
  .preview input { font-size: 16px; }
}

/* 설정 상단 탭: 내용이 비치지 않게 */
.settings-tabs { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 4px; box-shadow: 0 6px 18px color-mix(in srgb, var(--text) 8%, transparent); }

/* 로고는 상단 가운데 */
.shell > .pillnav { position: relative; }
.pillnav .pn-brand { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); margin: 0; }
.pillnav .pn-tools { margin-left: auto; }

/* 아이폰 하단 홈 막대와 겹치지 않게 아래 탭에 여유 */
@media (max-width: 760px) {
  .tabbar { padding: 8px 6px max(14px, calc(8px + env(safe-area-inset-bottom))); }
  body[data-stream] .shell { padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(96px + env(safe-area-inset-bottom)); }
}

/* 배경 투명 위젯: 상자 없이 위젯 내용만 */
.widget-box.bare { background: transparent !important; border: 0 !important; box-shadow: none !important; padding: 0; backdrop-filter: none; }
.fw.bare { background: transparent !important; border: 0 !important; box-shadow: none !important; backdrop-filter: none; }
.fw.bare .fw-bar { background: transparent; border: 0; opacity: 0; transition: opacity .15s; }
.fw.bare:hover .fw-bar, .fw.bare.min .fw-bar { opacity: 1; }

/* 연합 안 함 토글 */
.lo-tool:has(input:checked) { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.lo-badge { color: var(--accent); }

/* 첨부 올리는 정도 */
.up-progress { position: relative; height: 18px; margin: 6px 0; border-radius: 999px; background: var(--hover); overflow: hidden; }
.up-progress i { position: absolute; inset: 0 auto 0 0; width: var(--p, 0%); background: var(--accent); transition: width .2s; }
.up-progress span { position: relative; display: block; text-align: center; font-size: 11px; font-weight: 700; line-height: 18px; color: var(--text); mix-blend-mode: difference; filter: invert(1); }

/* 드라이브에서 고르기 */
.drive-pick { width: min(560px, calc(100vw - 24px)); padding: 0; }
.drive-pick .modal-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.drive-pick .dp-x { border: 0; background: none; color: var(--muted); font-size: 16px; cursor: pointer; }
.dp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; padding: 12px 14px; max-height: 60vh; overflow: auto; }
.dp-item { aspect-ratio: 1; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--hover); cursor: pointer; color: var(--text); font-size: 11px; }
.dp-item:hover { border-color: var(--accent); }
.dp-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dp-item span { display: block; padding: 6px; word-break: break-all; }
.dp-hint { padding: 0 14px 12px; margin: 0; }
.preview.from-drive img { outline: 2px solid color-mix(in srgb, var(--accent) 50%, transparent); outline-offset: -2px; }

/* 타임라인 타래: 첫 글과 최신 글 사이 접힌 부분 */
.th-gap { position: relative; display: block; padding: 6px 16px 6px 64px; font-size: 13px; font-weight: 600; color: var(--accent); text-decoration: none !important; }
.th-gap::before { content: ""; position: absolute; left: 37px; top: 0; bottom: 0; border-left: 2px dotted var(--line); }
.th-gap:hover { background: var(--hover); }

/* 팔로우 승인 대기 · 아이콘만 있는 버튼 */
.pill.pending-pill { border-style: dashed; color: var(--muted); }
.pill.pending-pill svg.i, .pill svg.i { width: 14px; height: 14px; vertical-align: -2px; }
.pill.pill-ic { padding-left: 10px; padding-right: 10px; }

/* 프로필 버튼 줄: 글자 버튼이 남는 폭을 쓰고, 아이콘 버튼(메시지·더보기)은 제 크기만 */
.pc-actions > a.pill-ic { flex: 0 0 auto; }
.pc-actions .pill.pill-ic { width: auto; padding: 0 14px; }
.pc-actions .pill { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; gap: 4px; }
.pc-actions .pill svg.i { flex-shrink: 0; margin-right: 0; }

/* 홈 화면에 추가한 웹앱: 두 번 탭 확대 막기 */
@media (display-mode: standalone) {
  html { touch-action: manipulation; }
}

/* 멀티 계정 전환 */
.acct-sw { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; display: flex; flex-direction: column; }
.acct-sw form { margin: 0; }
.acct-sw .acct-sw-item { display: flex !important; align-items: center; gap: 8px; width: 100%; text-align: left; }
.acct-sw-item img { width: 26px; height: 26px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.acct-sw-item span { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.acct-sw-item b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-sw-item small { font-size: 11px; color: var(--muted); }
.acct-sw-item em { margin-left: auto; font-style: normal; font-size: 10px; font-weight: 700; color: #fff; background: var(--accent); border-radius: 999px; padding: 1px 6px; }

/* 관리자 표: 줄바꿈으로 깨지지 않게 */
.table th, .table td { white-space: nowrap; vertical-align: middle; }
.table td:first-child { white-space: normal; }
.table td form, .table td .btn, .table td button { display: inline-block; margin: 0 4px 0 0; }
.table-scroll { max-height: 420px; overflow: auto; border-radius: 12px; }
.table-scroll thead th { position: sticky; top: 0; z-index: 1; }
.set-sec:has(> .table), .card:has(> .table) { overflow-x: auto; }
.emoji-table { max-height: 640px; }
.emoji-table img.emoji { height: 32px; width: auto; max-width: 64px; vertical-align: middle; }
.emoji-table .row { display: flex; gap: 6px; flex-wrap: nowrap; margin: 0; }
.emoji-table input { min-width: 120px; padding: 5px 8px; font-size: 13px; }
/* 관리자 표: 폭을 꽉 채우고, 넘치면 표 상자 안에서만 가로로 스크롤 */
.col.wide .table { display: table; width: 100%; }
.col.wide { overflow-x: auto; }
.table td:last-child { white-space: normal; }
.table td:last-child form, .table td:last-child a { display: inline-block; margin: 2px 6px 2px 0; }
.table td:last-child .btn, .table td:last-child button { font-size: 12.5px; }
.table-scroll .table { margin: 0; }
.emoji-table input { min-width: 0; width: 100%; }
.emoji-table td:nth-child(3) { width: 28%; } .emoji-table td:nth-child(4) { width: 36%; }
.ea-acts { display: flex; gap: 4px; margin: 0; }
.ea-acts svg.i { width: 14px; height: 14px; }
.adm-menu { position: relative; display: inline-block; }
.adm-menu > summary { list-style: none; cursor: pointer; }
.adm-menu > summary::-webkit-details-marker { display: none; }
.adm-menu .menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; display: flex; flex-direction: column; align-items: stretch; gap: 2px; min-width: 130px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 28px rgba(0,0,0,.14); }
.adm-menu .menu .btn { width: 100%; justify-content: flex-start; text-align: left; margin: 0; }
.col.wide { overflow: visible; }
.col.wide .table { overflow: visible; }
.table td:last-child form.ea-acts { display: flex; flex-wrap: nowrap; margin: 0; }
.table td:last-child .adm-menu form.menu { display: flex; margin: 0; }
.emoji-table td:last-child { white-space: nowrap; width: 1%; }
.inst-table td:first-child { white-space: nowrap; }
.inst-table td:not(:first-child):not(:nth-child(2)) { text-align: right; font-variant-numeric: tabular-nums; }
.sw-tag { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--hover); font-size: 11.5px; font-weight: 600; }

/* 링크 미리보기 */
.lp { margin: 10px 0 4px; }
.lp:empty { min-height: 1px; margin: 0; }
.lp-card { display: flex; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--text); text-decoration: none !important; transition: border-color .15s, background .15s; }
.lp-card:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: var(--hover); }
.lp-thumb { position: relative; flex: 0 0 132px; min-height: 100px; background: var(--hover); }
.lp-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lp-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 11px 14px; }
.lp-text small { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-text b { font-size: 14px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lp-text span { font-size: 12.5px; line-height: 1.45; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* 유튜브: 큰 썸네일 위, 글은 아래 */
.lp-card.lp-yt { flex-direction: column; }
.lp-yt .lp-thumb { flex: none; aspect-ratio: 16 / 9; min-height: 0; }
.lp-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 62px; height: 44px; border-radius: 12px; background: rgba(0,0,0,.72); color: #fff; font-size: 20px; display: flex; align-items: center; justify-content: center; transition: background .15s; }
.lp-yt:hover .lp-play { background: #e00; }
.lp-player { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 14px; background: #000; }
@media (max-width: 600px) { .lp-card:not(.lp-yt) .lp-thumb { flex-basis: 96px; } }

/* 아바타 꾸미기: 그림은 아바타의 두 배 크기로 가운데에 겹친다 (미스키 규격) */
.avatar, .pc-avatar, .de-av, .deco-prev { position: relative; }
.avatar { display: block; }
.avatar img:not(.deco), .pc-avatar img:not(.deco) { position: relative; }
img.deco { position: absolute !important; z-index: 1; top: -50%; left: -50%; width: 200% !important; height: auto !important; max-width: none !important; border-radius: 0 !important; background: none !important; object-fit: contain !important; pointer-events: none; box-shadow: none !important; }
.pc-avatar { overflow: visible !important; }
.deco-prev { display: inline-block; width: 40px; height: 40px; margin: 12px; }
.deco-prev .dp-av { width: 40px; height: 40px; border-radius: 10px; display: block; }
/* 편집기 */
.de-top { display: flex; gap: 28px; align-items: flex-start; flex-wrap: wrap; }
.de-stage { flex: 0 0 auto; padding: 48px; border-radius: 18px; background: var(--hover); }
.de-av { display: block; width: 112px; height: 112px; }
.de-av > img:first-child { width: 112px; height: 112px; border-radius: 22px; object-fit: cover; display: block; }
.de-list { flex: 1; min-width: 240px; display: flex; flex-direction: column; gap: 12px; }
.de-item { padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.de-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.de-head img { width: 32px; height: 32px; object-fit: contain; }
.de-head b { flex: 1; font-size: 13.5px; }
.de-head .check { font-size: 12px; margin: 0; }
.de-sl { display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); margin: 2px 0; }
.de-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; margin-bottom: 14px; }
.de-opt { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; color: var(--text); }
.de-opt img { width: 64px; height: 64px; object-fit: contain; }
.de-opt small { font-size: 11px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.de-opt.on { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 30%, transparent); }
.deco-muted { align-items: center; justify-content: space-between; }
/* 꾸미기는 아바타 상자 기준으로 자리를 잡으니, 상자가 글 높이만큼 늘어나지 않게 아바타 크기에 딱 맞춘다 */
.avatar, .pc-avatar, .de-av { align-self: flex-start; height: fit-content; line-height: 0; font-size: 0; }
.radio-row { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.radio-row .check { margin: 0; }

/* 글 가져오기 */
.imp-progress { width: 100%; height: 10px; accent-color: var(--accent); }

/* MFM 효과 ($[x2 …], $[spin …] 등) — 미스키와 같은 이름·움직임 */
.mfm-fn { display: inline-block; }
.mfm-x2 { font-size: 200%; }
.mfm-x3 { font-size: 400%; }
.mfm-x4 { font-size: 600%; }
.mfm-x2 img.emoji, .mfm-x3 img.emoji, .mfm-x4 img.emoji { height: 1.2em; }
.mfm-center { text-align: center; }
.mfm-math { font-family: "Times New Roman", serif; }
.mfm-font-serif { font-family: serif; }
.mfm-font-monospace { font-family: monospace; }
.mfm-font-cursive { font-family: cursive; }
.mfm-font-fantasy { font-family: fantasy; }
.mfm-font-emoji { font-family: emoji; }
.mfm-font-math { font-family: math; }
.mfm-blur { filter: blur(6px); transition: filter .3s; }
.mfm-blur:hover { filter: none; }
.mfm-time { padding: 1px 6px; border-radius: 6px; background: var(--bg2, rgba(127,127,127,.12)); font-size: .92em; }
.mfm-tada { font-size: 150%; animation: mfm-tada 1s linear infinite both; }
.mfm-jelly { animation: mfm-jelly 1s linear infinite both; }
.mfm-twitch { animation: mfm-twitch .5s ease infinite; }
.mfm-shake { animation: mfm-shake .5s ease infinite; }
.mfm-spin { animation: mfm-spin 1.5s linear infinite; }
.mfm-spinx { animation: mfm-spinx 1.5s linear infinite; }
.mfm-spiny { animation: mfm-spiny 1.5s linear infinite; }
.mfm-jump { animation: mfm-jump .75s linear infinite; }
.mfm-bounce { animation: mfm-bounce .75s linear infinite; transform-origin: center bottom; }
.mfm-rainbow { animation: mfm-rainbow 1s linear infinite; }
.mfm-sparkle { animation: mfm-sparkle 1.2s ease-in-out infinite; }
@keyframes mfm-tada {
  0% { transform: scale(1); }
  10%, 20% { transform: scale(.9) rotate(-3deg); }
  30%, 50%, 70%, 90% { transform: scale(1.1) rotate(3deg); }
  40%, 60%, 80% { transform: scale(1.1) rotate(-3deg); }
  100% { transform: scale(1); }
}
@keyframes mfm-jelly {
  0% { transform: scale(1, 1); } 30% { transform: scale(1.25, .75); } 40% { transform: scale(.75, 1.25); }
  50% { transform: scale(1.15, .85); } 65% { transform: scale(.95, 1.05); } 75% { transform: scale(1.05, .95); } 100% { transform: scale(1, 1); }
}
@keyframes mfm-twitch {
  0% { transform: translate(7px, -2px); } 5% { transform: translate(-3px, 1px); } 10% { transform: translate(-7px, -1px); }
  15% { transform: translateY(-1px); } 20% { transform: translate(-8px, 6px); } 25% { transform: translate(-4px, -3px); }
  30% { transform: translate(-4px, -6px); } 35% { transform: translate(-8px, -8px); } 40% { transform: translate(4px, 6px); }
  45% { transform: translate(-3px, 1px); } 50% { transform: translate(2px, -10px); } 55% { transform: translate(-7px); }
  60% { transform: translate(-2px, 4px); } 65% { transform: translate(3px, -8px); } 70% { transform: translate(6px, 7px); }
  75% { transform: translate(-7px, -2px); } 80% { transform: translate(-7px, -8px); } 85% { transform: translate(9px, 3px); }
  90% { transform: translate(-3px, -2px); } 95% { transform: translate(-10px, 2px); } 100% { transform: translate(-2px, -6px); }
}
@keyframes mfm-shake {
  0% { transform: translate(-3px, -1px) rotate(-8deg); } 10% { transform: translate(0, -1px) rotate(-10deg); }
  20% { transform: translate(-2px, 1px) rotate(9deg); } 30% { transform: translate(1px, -3px) rotate(-6deg); }
  40% { transform: translate(-3px, -2px) rotate(2deg); } 50% { transform: translate(3px) rotate(-3deg); }
  60% { transform: translate(-1px, 3px) rotate(10deg); } 70% { transform: translate(2px, 1px) rotate(4deg); }
  80% { transform: translate(-1px, -1px) rotate(-6deg); } 90% { transform: translate(2px, -2px) rotate(-1deg); }
  100% { transform: translate(-1px, 2px) rotate(-2deg); }
}
@keyframes mfm-spin { 0% { transform: rotate(0); } 100% { transform: rotate(360deg); } }
@keyframes mfm-spinx { 0% { transform: perspective(128px) rotateX(0); } 100% { transform: perspective(128px) rotateX(360deg); } }
@keyframes mfm-spiny { 0% { transform: perspective(128px) rotateY(0); } 100% { transform: perspective(128px) rotateY(360deg); } }
@keyframes mfm-jump {
  0% { transform: translateY(0); } 25% { transform: translateY(-16px); } 50% { transform: translateY(0); }
  75% { transform: translateY(-8px); } 100% { transform: translateY(0); }
}
@keyframes mfm-bounce {
  0% { transform: translateY(0) scale(1); } 25% { transform: translateY(-16px) scale(1); }
  50% { transform: translateY(0) scale(1); } 75% { transform: translateY(0) scale(1.5, .75); } 100% { transform: translateY(0) scale(1); }
}
@keyframes mfm-rainbow { 0% { filter: hue-rotate(0deg) contrast(150%) saturate(150%); } 100% { filter: hue-rotate(360deg) contrast(150%) saturate(150%); } }
@keyframes mfm-sparkle { 0%, 100% { filter: drop-shadow(0 0 0 gold); } 50% { filter: drop-shadow(0 0 6px gold) brightness(1.2); } }
@media (prefers-reduced-motion: reduce) {
  .mfm-fn { animation: none !important; }
}
.mfm-time { display: inline-block; white-space: nowrap; }
.mfm-time img { display: inline !important; width: auto !important; height: 1.1em !important; margin: 0 2px 0 0 !important; vertical-align: -.15em; border-radius: 0 !important; box-shadow: none !important; }

/* 타임라인 글 속 아티클 링크 카드 */
.art-card { display: flex; flex-direction: column; margin: 10px 0 4px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--text); text-decoration: none !important; transition: border-color .15s, background .15s; }
.art-card:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: var(--hover); }
.art-card .ac-cover { display: block; aspect-ratio: 2 / 1; overflow: hidden; background: var(--hover); }
.art-card .ac-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.art-card .ac-body { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 13px; min-width: 0; }
.art-card .ac-kind { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); font-size: 12px; font-weight: 700; }
.art-card .ac-kind svg { width: 14px; height: 14px; }
.art-card b { font-size: 17px; line-height: 1.35; overflow-wrap: anywhere; }
.art-card small { color: var(--muted); font-size: 13.5px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.art-card .ac-meta { display: flex; align-items: center; gap: 6px; margin-top: 4px; color: var(--faint); font-size: 12.5px; }
.art-card .ac-meta img { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; }
