/* 오픈스톤 — 정동석(geode): 겉은 차분한 돌, 안은 자수정 빛.
   종이색 바탕 · 먹색 글자 · 자수정 보라 한 가지 포인트 · 봇은 청록 */

:root {
  --bg: #F6F5F1;
  --surface: #FFFFFF;
  --sunken: #EFEDE7;
  --line: #E2DFD6;
  --line-strong: #CFCBBF;
  --text: #1D1C19;
  --mid: #48463F;
  --dim: #85827A;
  --accent: #6C47D8;
  --accent-ink: #4B2DA8;
  --accent-soft: #F0EBFC;
  --bot: #0E7C72;
  --bot-soft: #E4F3F0;
  --warn: #B45309;
  --warn-soft: #FDF3E4;
  --danger: #C0392B;
  --danger-soft: #FBECEA;
  --ok: #2F7D4F;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(29, 28, 25, .06), 0 4px 16px rgba(29, 28, 25, .05);
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.3; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: 26px; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
p { margin: 0 0 .8em; }
small, .dim { color: var(--dim); }
.mid { color: var(--mid); }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ── 버튼·폼 ── */

.btn, button.btn, input.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap;
  line-height: 1.2;
}
.btn:hover { border-color: var(--mid); text-decoration: none; }
.btn.is-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.is-primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn.is-danger { color: var(--danger); border-color: #E9B7B1; }
.btn.is-danger:hover { background: var(--danger-soft); }
.btn.is-ghost { border-color: transparent; background: transparent; }
.btn.is-ghost:hover { background: var(--sunken); }
.btn.is-sm { padding: 4px 9px; font-size: 12.5px; }
.btn.is-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
form.inline, .inline form, form.button_to { display: inline; margin: 0; }

label { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 5px; color: var(--mid); }
.field { margin-bottom: 16px; }
.field .hint { font-size: 12.5px; color: var(--dim); margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=search], input[type=number], select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font: inherit; font-size: 15px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
textarea { resize: vertical; min-height: 90px; line-height: 1.5; }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 500; }
.check input { margin-top: 4px; }
.prefix-input { display: flex; align-items: stretch; }
.prefix-input span { padding: 9px 10px; background: var(--sunken); border: 1px solid var(--line-strong); border-right: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm); color: var(--dim); font-size: 14px; white-space: nowrap; }
.prefix-input input { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.errors { background: var(--danger-soft); border: 1px solid #EFC4BE; color: var(--danger); padding: 10px 14px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 14px; }
.errors ul { margin: 0; padding-left: 18px; }

/* ── 공통 조각 ── */

.flash { padding: 10px 16px; font-size: 14px; background: var(--accent-soft); color: var(--accent-ink); border-bottom: 1px solid #DCD0F7; }
.flash.is-alert { background: var(--warn-soft); color: var(--warn); border-color: #F3D9B1; }
.banner { padding: 10px 16px; font-size: 13.5px; background: var(--warn-soft); color: var(--warn); border-bottom: 1px solid #F3D9B1; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.banner form { display: inline; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.card + .card { margin-top: 12px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--sunken); color: var(--mid); white-space: nowrap; }
.chip.is-accent { background: var(--accent-soft); color: var(--accent-ink); }
.chip.is-bot { background: var(--bot-soft); color: var(--bot); }
.chip.is-warn { background: var(--warn-soft); color: var(--warn); }
.chip.is-danger { background: var(--danger-soft); color: var(--danger); }
.badge { display: inline-flex; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; align-items: center; justify-content: center; font-style: normal; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); display: inline-block; }

.av { width: 34px; height: 34px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; color: #fff; flex: none; }
.av.is-sm { width: 24px; height: 24px; border-radius: 6px; font-size: 11px; }
.av.is-lg { width: 64px; height: 64px; border-radius: 16px; font-size: 26px; }
.av1 { background: #7C5CD6; } .av2 { background: #2E8B7A; } .av3 { background: #C2653A; }
.av4 { background: #4F6DB8; } .av5 { background: #A34E83; } .av6 { background: #6B7A3A; }
.av.is-bot { background: var(--bot); }
.av.is-sys { background: var(--mid); }

.empty { text-align: center; color: var(--dim); padding: 40px 16px; }
.empty .btn { margin-top: 12px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs a { padding: 8px 12px; color: var(--mid); font-weight: 600; font-size: 14px; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.is-active { color: var(--accent-ink); border-bottom-color: var(--accent); }
.tabs a:hover { text-decoration: none; color: var(--text); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.stack > * + * { margin-top: 12px; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
table.list { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--surface); }
table.list th, table.list td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list th { font-size: 12.5px; color: var(--dim); font-weight: 600; background: var(--sunken); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.table-wrap.has-menu { overflow: visible; }

.text { white-space: normal; }
.text p { margin: 0 0 .6em; }
.text p:last-child { margin-bottom: 0; }
.text blockquote { margin: 0 0 .6em; padding: 4px 12px; border-left: 3px solid var(--line-strong); color: var(--mid); background: var(--sunken); border-radius: 0 6px 6px 0; }
.mention { background: var(--accent-soft); color: var(--accent-ink); border-radius: 4px; padding: 0 3px; font-weight: 600; }

/* ── 공개 화면(로그인 전) ── */

.pub-top { display: flex; align-items: center; gap: 12px; padding: 14px 24px; max-width: 1080px; margin: 0 auto; }
.wordmark { font-weight: 800; font-size: 19px; letter-spacing: -0.02em; color: var(--text); display: inline-flex; align-items: center; gap: 8px; }
.wordmark:hover { text-decoration: none; }
.wordmark svg { width: 24px; height: 24px; }
.pub-main { max-width: 1080px; margin: 0 auto; padding: 16px 24px 60px; }
.pub-foot { max-width: 1080px; margin: 0 auto; padding: 24px; border-top: 1px solid var(--line); font-size: 13px; color: var(--dim); display: flex; gap: 16px; flex-wrap: wrap; }
.pub-foot a { color: var(--dim); }

.hero { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: center; padding: 40px 0 30px; }
.hero h1 { font-size: 40px; letter-spacing: -0.03em; margin-bottom: 14px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lead { font-size: 17.5px; color: var(--mid); max-width: 34em; }
.hero-art { display: flex; justify-content: center; }
.hero-art svg { width: 100%; max-width: 300px; height: auto; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 20px 0 36px; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.feature b { display: block; margin: 6px 0 4px; font-size: 16px; }
.feature p { margin: 0; color: var(--mid); font-size: 14px; }
.feature i { font-style: normal; font-size: 22px; }

.auth { max-width: 420px; margin: 30px auto; }
.auth h1 { font-size: 24px; }
.auth .card { padding: 26px; }
.auth .alt { text-align: center; margin-top: 16px; font-size: 14px; color: var(--dim); }

.prose { max-width: 720px; }
.prose h2 { margin-top: 1.6em; font-size: 18px; }
.prose li { margin-bottom: 4px; }

/* ── 앱 틀(로그인 후) ── */

body.is-app { height: 100dvh; overflow: hidden; }
.app { display: flex; height: 100dvh; }
.app-col { display: flex; flex-direction: column; flex: 1; min-width: 0; min-height: 0; }
.rail { width: 68px; flex: none; background: #22201C; display: flex; flex-direction: column; align-items: center; padding: 12px 0; gap: 8px; overflow-y: auto; }
.rail a { position: relative; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; color: #D8D4C8; font-size: 19px; text-decoration: none; flex: none; }
.rail a:hover { background: #34312B; text-decoration: none; }
.rail a.is-active { background: #3B3530; box-shadow: inset 0 0 0 2px var(--accent); }
.rail .rail-com { font-weight: 800; font-size: 16px; color: #fff; }
.rail .rail-sep { width: 32px; height: 1px; background: #3F3B34; margin: 4px 0; flex: none; }
.rail .dot, .rail .badge { position: absolute; top: 2px; right: 2px; }
.rail .rail-bottom { margin-top: auto; }
.rail .logo svg { width: 28px; height: 28px; }

.side { width: 250px; flex: none; background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.side-head { padding: 14px 14px 10px; border-bottom: 1px solid var(--line); }
.side-head b { display: block; font-size: 16px; }
.side-head small { display: block; font-size: 12.5px; }
.side-scroll { flex: 1; overflow-y: auto; padding: 8px 0 16px; }
.side-sec { padding: 12px 16px 4px; font-size: 11.5px; font-weight: 700; color: var(--dim); letter-spacing: .04em; display: flex; align-items: center; }
.side-sec a { margin-left: auto; font-size: 15px; color: var(--dim); }
.side-link { display: flex; align-items: center; gap: 8px; padding: 6px 16px; margin: 0 8px; border-radius: 7px; color: var(--mid); font-size: 14.5px; text-decoration: none; }
.side-link:hover { background: var(--sunken); text-decoration: none; }
.side-link.is-active { background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; }
.side-link.is-unread { color: var(--text); font-weight: 700; }
.side-link i { font-style: normal; width: 18px; text-align: center; color: var(--dim); flex: none; }
.side-link .av { flex: none; }
.side-link i.dot { width: 8px; height: 8px; flex: none; }
.side-link span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-link.is-archived span { color: var(--dim); text-decoration: line-through; }
.side-me { border-top: 1px solid var(--line); padding: 10px 12px; display: flex; gap: 10px; align-items: center; }
.side-me .who { flex: 1; min-width: 0; }
.side-me .who b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-me .who small { font-size: 12px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.main { flex: 1; min-width: 0; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; }
.page { padding: 22px 28px 60px; max-width: 980px; width: 100%; }
.page-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 22px; }
.page-head .sub { color: var(--dim); font-size: 14px; margin-top: 2px; }

.topbar { display: none; }
.drawer-backdrop { display: none; }

/* ── 채팅 ── */

.chat { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 11px 18px; border-bottom: 1px solid var(--line); background: var(--surface); flex: none; }
.chat-head .title { font-weight: 800; font-size: 16px; }
.chat-head .desc { color: var(--dim); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.chat-body { display: flex; flex: 1; min-height: 0; }
.stream { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0; }
.msgs { flex: 1; overflow-y: auto; padding: 12px 0 8px; }
.day { display: flex; align-items: center; gap: 10px; color: var(--dim); font-size: 12px; font-weight: 600; margin: 14px 18px 6px; }
.day::before, .day::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.msg { display: flex; gap: 10px; padding: 6px 18px; position: relative; }
.msg:hover { background: #FBFAF7; }
.msg.is-target { background: var(--accent-soft); }
.msg-main { flex: 1; min-width: 0; }
.msg-head { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.msg-head b { font-size: 14.5px; }
.msg-head b a { color: var(--text); }
.msg-head small { font-size: 12px; }
.msg-body { margin-top: 1px; }
.msg-body.is-deleted { color: var(--dim); font-style: italic; font-size: 14px; }
.msg-foot { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.react { display: inline-flex; align-items: center; gap: 3px; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; cursor: pointer; font-family: inherit; }
.react.is-mine { border-color: #CDBEF4; background: var(--accent-soft); }
.reply-link { font-size: 12.5px; font-weight: 700; color: var(--accent-ink); }
.msg-tools { position: absolute; right: 14px; top: -10px; display: none; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); padding: 2px; z-index: 5; }
.msg:hover .msg-tools, .msg-tools:focus-within, .msg-tools[open] { display: flex; }
.msg-tools .tool { border: 0; background: transparent; padding: 4px 6px; border-radius: 6px; cursor: pointer; font-size: 14px; font-family: inherit; color: var(--mid); text-decoration: none; }
.msg-tools .tool:hover { background: var(--sunken); text-decoration: none; }
.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-pop { position: absolute; right: 0; top: 100%; margin-top: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); min-width: 170px; padding: 4px; z-index: 20; }
.menu-pop a, .menu-pop button { display: block; width: 100%; text-align: left; padding: 7px 10px; border: 0; background: transparent; border-radius: 6px; color: var(--text); font: inherit; font-size: 13.5px; cursor: pointer; text-decoration: none; }
.menu-pop a:hover, .menu-pop button:hover { background: var(--sunken); text-decoration: none; }
.menu-pop .is-danger { color: var(--danger); }
.menu-pop form { display: block; }
.menu-pop .menu-sep { height: 1px; background: var(--line); margin: 4px 0; }
.menu-pop form.narrow-only { display: none; }
.menu-pop select { font-size: 13px; padding: 4px; margin: 4px 0; }

.botmsg { margin: 8px 18px; padding: 10px 14px; border-radius: var(--radius); background: var(--bot-soft); border: 1px solid #C7E6E0; }
.sysmsg { text-align: center; color: var(--dim); font-size: 13px; margin: 6px 18px; }

.postcard { margin-top: 4px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 8px; background: var(--surface); padding: 10px 14px; max-width: 620px; }
.postcard.is-topic, .postcard.is-digest { border-left-color: var(--bot); }
.postcard .kind { font-size: 12px; font-weight: 700; color: var(--accent-ink); }
.postcard.is-topic .kind, .postcard.is-digest .kind { color: var(--bot); }
.postcard .t { display: block; font-weight: 800; font-size: 15.5px; color: var(--text); margin: 2px 0 4px; }
.postcard .x { color: var(--mid); font-size: 14px; margin: 0 0 6px; white-space: pre-line; }
.postcard .meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; font-size: 12.5px; color: var(--dim); }

.composer { border-top: 1px solid var(--line); padding: 10px 14px 12px; background: var(--surface); flex: none; }
.composer form { display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { min-height: 42px; max-height: 200px; resize: none; border-radius: 9px; padding: 10px 12px; }
.composer .note { font-size: 12px; color: var(--dim); margin-top: 6px; }
.composer.is-closed { text-align: center; color: var(--dim); font-size: 13.5px; padding: 14px; }

.thread { width: 380px; flex: none; border-left: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; min-height: 0; }
.thread-head { display: flex; align-items: center; gap: 8px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.thread-head b { flex: 1; }
.thread .msgs { background: var(--surface); }
.thread .msg:hover { background: #FAF9F6; }
.thread-root { border-bottom: 1px solid var(--line); padding-bottom: 8px; margin-bottom: 4px; }
.thread-count { margin: 8px 18px; font-size: 12.5px; color: var(--dim); font-weight: 600; }

/* ── 글 ── */

.post-row { display: flex; gap: 14px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.post-row + .post-row { margin-top: 8px; }
.vote { display: flex; flex-direction: column; align-items: center; min-width: 44px; }
.vote button, .vote .btn { padding: 3px 8px; }
.vote b { font-size: 15px; }
.vote .is-voted { background: var(--accent-soft); border-color: #CDBEF4; color: var(--accent-ink); }
.post-row .t { font-weight: 800; font-size: 16px; color: var(--text); }
.post-row .x { color: var(--mid); font-size: 14px; margin: 3px 0 6px; }
.post-row .meta { font-size: 12.5px; color: var(--dim); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.post { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; }
.post h1 { font-size: 24px; margin-bottom: 8px; }
.post .meta { font-size: 13px; color: var(--dim); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.post .text { font-size: 15.5px; line-height: 1.7; }
.post .source { margin-top: 14px; padding: 10px 12px; background: var(--sunken); border-radius: 8px; font-size: 13.5px; overflow-wrap: anywhere; }
.post-actions { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; align-items: center; }
.comments { margin-top: 20px; }
.comments .msg { padding: 10px 0; border-bottom: 1px solid var(--line); }
.comments .msg:hover { background: transparent; }
.comment-form textarea { min-height: 70px; }

/* ── 모임 카드·소개 ── */

.com-card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; color: var(--text); transition: border-color .15s; }
.com-card:hover { border-color: var(--accent); text-decoration: none; }
.com-card .head { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.com-card b { display: block; font-size: 16px; }
.com-card .tag { font-size: 13px; color: var(--accent-ink); }
.com-card p { font-size: 13.5px; color: var(--mid); margin: 0 0 8px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.com-card .meta { font-size: 12.5px; color: var(--dim); display: flex; gap: 8px; flex-wrap: wrap; }
.com-av { width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(135deg, #7C5CD6, #3E2A8C); color: #fff; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; font-size: 18px; flex: none; }
.com-av.is-lg { width: 72px; height: 72px; border-radius: 20px; font-size: 32px; }
.com-hero { display: flex; gap: 18px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 18px; flex-wrap: wrap; }
.com-hero .info { flex: 1; min-width: 240px; }
.com-hero h1 { margin-bottom: 2px; }
.com-hero .tag { color: var(--accent-ink); font-weight: 600; margin-bottom: 10px; }
.com-hero .desc { color: var(--mid); white-space: pre-line; }

.invite-box { display: flex; gap: 8px; align-items: center; }
.invite-box input { font-family: ui-monospace, Menlo, monospace; font-size: 13px; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 20px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.stat b { display: block; font-size: 24px; }
.stat small { font-size: 12.5px; }

/* ── 통화 ── */

.call { display: flex; flex-direction: column; height: 100%; background: #1B1A17; color: #EDEBE4; }
.call-head { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-bottom: 1px solid #34312B; }
.call-head a { color: #CFC9FF; }
.call-grid { flex: 1; display: grid; gap: 10px; padding: 14px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); align-content: center; overflow-y: auto; }
.tile { position: relative; background: #2A2823; border-radius: 12px; aspect-ratio: 4 / 3; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.tile video { width: 100%; height: 100%; object-fit: cover; background: #111; }
.tile .name { position: absolute; left: 10px; bottom: 8px; background: rgba(0,0,0,.55); padding: 2px 8px; border-radius: 6px; font-size: 13px; }
.tile .av { position: absolute; width: 64px; height: 64px; font-size: 26px; border-radius: 16px; }
.tile .initial { position: absolute; width: 64px; height: 64px; border-radius: 16px; background: #4B2DA8; color: #fff; font-size: 26px; font-weight: 800; display: none; align-items: center; justify-content: center; }
.tile.is-cam-off .initial { display: flex; }
.tile.is-cam-off video { visibility: hidden; }
.tile.is-mic-off .name::after { content: " 🔇"; }
.call-bar { display: flex; justify-content: center; gap: 10px; padding: 14px; border-top: 1px solid #34312B; flex-wrap: wrap; }
.call-bar .btn { background: #2F2C27; border-color: #4A463E; color: #EDEBE4; }
.call-bar .btn.is-off { background: #5A2A24; border-color: #7A3A31; }
.call-bar .btn.is-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.call-note { text-align: center; font-size: 13px; color: #A8A395; padding: 0 14px 10px; }
.call-live { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 700; color: var(--ok); }
.call-live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }

/* ── 좁은 화면 ── */

@media (max-width: 1100px) {
  .thread { width: 320px; }
}

@media (max-width: 860px) {
  body.is-app { overflow: hidden; }
  .app { position: relative; }
  .topbar { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--surface); border-bottom: 1px solid var(--line); flex: none; }
  .topbar button { border: 0; background: transparent; font-size: 20px; cursor: pointer; position: relative; padding: 2px 6px; }
  .topbar .title { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar .badge { position: absolute; top: -2px; right: -4px; }
  .nav-drawer { position: fixed; inset: 0 auto 0 0; z-index: 50; display: flex; transform: translateX(-105%); transition: transform .2s ease; box-shadow: 4px 0 24px rgba(0,0,0,.15); }
  .is-drawer-open .nav-drawer { transform: none; }
  .is-drawer-open .drawer-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 40; }
  .side { width: min(270px, calc(100vw - 80px)); }
  .page { padding: 16px 16px 60px; }
  .thread { position: fixed; inset: 0; width: auto; z-index: 30; }
  .chat-head { padding: 9px 12px; }
  .chat-head .desc { display: none; }
  .msg { padding: 6px 12px; }
  .msg-tools { display: flex; position: static; box-shadow: none; border: 0; padding: 0; margin-top: 2px; background: transparent; }
  .msg-tools .tool { padding: 2px 5px; font-size: 13px; }
  .msg-tools form.quick { display: none; }
  .menu-pop form.narrow-only { display: block; }
  .chat-head .title { display: none; }
  .hero { grid-template-columns: 1fr; gap: 10px; padding-top: 16px; }
  .hero h1 { font-size: 30px; }
  .hero-art { display: none; }
  .features { grid-template-columns: 1fr; }
  .pub-top, .pub-main { padding-left: 16px; padding-right: 16px; }
  .post { padding: 16px; }
}

.nav-drawer { display: flex; flex: none; }
@media (max-width: 860px) {
  .nav-drawer { display: flex; }
}

/* ── 알림 ── */
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); }
.notice:hover { border-color: var(--accent); text-decoration: none; }
.notice.is-unread { background: var(--accent-soft); border-color: #D9CCF6; }
.notice-main { flex: 1; min-width: 0; }
.notice-main b { font-size: 14px; }
.notice-main p { margin: 3px 0 2px; font-size: 14px; color: var(--mid); }
.notice .dot { margin-top: 6px; flex: none; }
.msg:target { background: var(--accent-soft); }
