/* 나와의 채팅 PC — 카톡 PC·슬랙처럼: 왼쪽 아이콘 줄 · 방 목록 · 대화 · (고를 때만) 오른쪽 패널.
   색은 앱 색 토큰(lib/core/theme/app_colors.dart, 옐로 테마)과 같게. */
:root {
  --bg: #ffffff;
  --rail: #f3f3f4;
  --list: #ffffff;
  --room: #cad6e2;          /* 앱 옐로 테마 채팅방 배경 */
  --room-sub: #556677;      /* 채팅방 배경 위 시간·이름 */
  --card: #ffffff;
  --field: #f3f3f4;
  --hover: #f3f3f4;
  --active: #ebebed;
  --line: #e4e4e6;
  --text: #161618;
  --sub: #66666b;
  --dim: #9a9aa0;
  --mine: #ffe14f;          /* 내 말풍선 */
  --on-mine: #191919;
  --other: #ffffff;
  --badge: #c2410c;
  --danger: #c92a2a;
  --link: #1f5fbf;
  --focus: #3b82f6;
  --pill: rgba(0, 0, 0, .08);
  --shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 4px 16px rgba(0, 0, 0, .06);
  --ease: cubic-bezier(.32, .72, 0, 1); /* 앱처럼: 모든 움직임을 이 곡선 하나로 */
  --t: 160ms;
  --t-mid: 240ms;
  --t-slow: 280ms;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121314;
    --rail: #0e0f10;
    --list: #17181a;
    --room: #0e0f10;
    --room-sub: #a3a9b0;
    --card: #222427;
    --field: #232528;
    --hover: #202225;
    --active: #2a2d31;
    --line: #2a2d31;
    --text: #eceef0;
    --sub: #a3a9b0;
    --dim: #6f757c;
    --mine: #e6cf3a;
    --on-mine: #191919;
    --other: #2b2b2b;
    --link: #7fb0ff;
    --danger: #ff8a8a;
    --pill: rgba(255, 255, 255, .07);
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font: 15px/1.5 Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased; letter-spacing: -.01em;
}
/* 일본어: 한자·가나는 일본 글꼴로 (Pretendard 에 없는 글자) */
html:lang(ja) body { font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", Meiryo, "Segoe UI", system-ui, sans-serif; letter-spacing: 0; }
button, input, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { background: none; border: 0; cursor: pointer; padding: 0; }
kbd { font: 600 11px/1 Pretendard, system-ui, sans-serif; color: var(--dim); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 3px 6px; background: var(--card); }
[hidden] { display: none !important; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 8px; }
.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(127, 127, 127, .28); border-radius: 10px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(127, 127, 127, .45); }

.icon-btn { width: 36px; height: 36px; border-radius: 10px; color: var(--sub); display: inline-grid; place-items: center; flex: none; transition: background var(--t) var(--ease), color var(--t) var(--ease); }
.icon-btn:hover { background: var(--hover); color: var(--text); }
.icon-btn.on { background: var(--active); color: var(--text); }
.main .icon-btn:hover, .main .icon-btn.on { background: rgba(0, 0, 0, .07); }
@media (prefers-color-scheme: dark) { .main .icon-btn:hover, .main .icon-btn.on { background: rgba(255, 255, 255, .08); } }

/* ── 로그인 */
.login { height: 100%; position: relative; overflow: hidden; display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; align-content: center; justify-content: center; gap: 28px 96px; padding: 24px 24px 56px;
  background: #07070c; color: #fff; color-scheme: dark; }
.login::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 56px 56px; -webkit-mask-image: radial-gradient(60% 60% at 50% 45%, #000, transparent); mask-image: radial-gradient(60% 60% at 50% 45%, #000, transparent); }
.login-glow i { position: absolute; border-radius: 50%; filter: blur(120px); pointer-events: none; }
.login-glow i:nth-child(1) { width: 620px; height: 620px; background: #7b2cff; right: 4%; top: -200px; opacity: .5; }
.login-glow i:nth-child(2) { width: 520px; height: 520px; background: #ff2d8a; right: -140px; bottom: -220px; opacity: .42; }
.login-glow i:nth-child(3) { width: 460px; height: 460px; background: #00a8ff; left: -160px; top: 40%; opacity: .22; }
.login > * { position: relative; }
.login > .login-glow { position: absolute; inset: 0; pointer-events: none; }
.login-hero { width: 540px; }
.login-kick { margin: 0 0 14px; font-size: 14px; font-weight: 700; background: linear-gradient(90deg, #8fd3ff, #d58bff, #ff8fc4); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login-hero h2 { margin: 0 0 36px; font-size: 46px; line-height: 1.15; font-weight: 800; letter-spacing: -.04em; word-break: keep-all; }
.login-hero h2 em { font-style: normal; background: linear-gradient(90deg, #fff, #e2c6ff 60%, #ffb3d6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login-win { border-radius: 12px; overflow: hidden; background: #1a1b20; box-shadow: 0 0 0 1px rgba(255,255,255,.12), 0 40px 90px rgba(0,0,0,.6);
  transform: perspective(2000px) rotateY(8deg) rotateX(3deg); transform-origin: left center; }
.login-win .bar { height: 26px; display: flex; align-items: center; gap: 6px; padding: 0 11px; background: #24252b; }
.login-win .bar i { width: 9px; height: 9px; border-radius: 50%; background: #ff5f57; }
.login-win .bar i:nth-child(2) { background: #febc2e; } .login-win .bar i:nth-child(3) { background: #28c840; }
.login-win img { display: block; width: 100%; height: auto; }
.login-card { width: min(400px, 100%); display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 40px 36px 32px; border-radius: 28px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); box-shadow: 0 30px 80px rgba(0,0,0,.45); }
.login-mascot { display: block; width: 120px; height: 120px; margin-bottom: 14px; filter: drop-shadow(0 12px 30px rgba(180, 70, 255, .55)); animation: float 2.8s ease-in-out infinite alternate; }
@keyframes float { from { transform: translateY(0); } to { transform: translateY(-6px); } }
.login h1 { font-size: 30px; font-weight: 800; margin: 0 0 8px; letter-spacing: -.03em; color: #fff; }
.login .copyright { position: absolute; left: 0; right: 0; bottom: 20px; text-align: center; color: rgba(255,255,255,.35); }
@media (max-width: 1080px) { .login-hero { display: none; } }
.login-sub { color: #b3b7c6; margin: 0 0 32px; font-size: 15px; }
.btn-google { width: 100%; display: flex; gap: 10px; align-items: center; justify-content: center; padding: 14px; border: 1px solid #dadce0; border-radius: 14px; font-weight: 600; font-size: 15px; background: #fff; color: #1f1f1f; transition: background var(--t), box-shadow var(--t); }
.btn-google:hover { background: #f8f9fa; box-shadow: 0 2px 8px rgba(0, 0, 0, .06); }
.need-app { margin-top: 16px; padding: 16px; border-radius: 14px; background: var(--card); box-shadow: var(--shadow); }
.need-app p { color: var(--sub); font-size: 14px; line-height: 1.6; margin: 0 0 12px; }
.stores { display: flex; gap: 8px; justify-content: center; }
.store { padding: 10px 16px; border-radius: 12px; background: var(--text); color: var(--bg); font-weight: 600; font-size: 14px; text-decoration: none; }
.copyright { color: var(--dim); font-size: 11px; }
.error { color: var(--danger); font-size: 13px; margin: 12px 0 0; }

/* ── 뼈대 */
.app { display: grid; grid-template-columns: 68px var(--list-w, 320px) minmax(0, 1fr) auto; height: 100vh; height: 100dvh; overflow: hidden; }

/* 왼쪽 아이콘 줄 */
.rail { background: var(--rail); display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 0 14px; border-right: 1px solid var(--line); position: relative; }
.rail-logo { border-radius: 10px; margin-bottom: 14px; }
.rail-btn { position: relative; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: var(--dim); transition: background var(--t) var(--ease), color var(--t) var(--ease); }
.rail-btn .ic { width: 24px; height: 24px; }
.rail-btn:hover { background: var(--active); color: var(--text); }
.rail-btn.on { color: var(--text); }
.rail-btn.on .ic { stroke-width: 2.2; }
.rail-badge { position: absolute; top: 2px; right: 0; min-width: 14px; height: 14px; padding: 0 4px; border-radius: 7px; background: var(--badge); color: #fff; font-size: 9px; font-weight: 700; line-height: 14px; text-align: center; box-shadow: 0 0 0 2px var(--rail); }
.rail-gap { flex: 1; }
.rail-me { width: 34px; height: 34px; border-radius: 50%; background: var(--mine); color: var(--on-mine); font-weight: 800; font-size: 14px; transition: transform var(--t) var(--ease); }
.rail-me:hover { transform: scale(1.06); }
.pop { position: absolute; z-index: 30; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 6px; animation: pop var(--t-mid) var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(4px) scale(.98); } to { opacity: 1; transform: none; } }
.me-menu { left: 60px; bottom: 14px; min-width: 220px; }
.me-email { padding: 10px 12px 8px; font-size: 13px; color: var(--sub); border-bottom: 1px solid var(--line); margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pop-item { width: 100%; text-align: left; padding: 9px 12px; border-radius: 9px; font-size: 14px; }
.pop-item:hover { background: var(--hover); }
.pop-sep { height: 1px; margin: 4px 8px; background: var(--line, rgba(0,0,0,.08)); }

/* 방 목록 */
.list { position: relative; background: var(--list); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.list-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 14px 10px 20px; }
.list-head h2 { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -.03em; }
.list-search { margin: 0 14px 10px; height: 38px; display: flex; align-items: center; gap: 8px; padding: 0 6px 0 12px; border-radius: 11px; background: var(--field); color: var(--dim); transition: box-shadow var(--t); }
.list-search:focus-within { box-shadow: 0 0 0 2px var(--focus) inset; }
.list-search .ic { width: 17px; height: 17px; }
.list-search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 14px; color: var(--text); }
.list-search input::placeholder { color: var(--dim); }
.kbd-btn { display: grid; place-items: center; height: 26px; border-radius: 7px; }
.rooms { flex: 1; overflow-y: auto; padding: 2px 8px 16px; }
.sk-room { height: 52px; margin: 6px 10px; border-radius: 12px; background: linear-gradient(90deg, var(--field, rgba(0,0,0,.05)) 25%, rgba(127,127,127,.12) 50%, var(--field, rgba(0,0,0,.05)) 75%); background-size: 200% 100%; animation: sk 1.2s linear infinite; animation-delay: calc(var(--i) * 60ms); }
.sk-msgs { display: flex; flex-direction: column; gap: 14px; padding: 24px 28px; justify-content: flex-end; min-height: 100%; }
.sk-msg { height: 38px; border-radius: 16px; background: linear-gradient(90deg, var(--field, rgba(0,0,0,.05)) 25%, rgba(127,127,127,.12) 50%, var(--field, rgba(0,0,0,.05)) 75%); background-size: 200% 100%; animation: sk 1.2s linear infinite; width: 42%; }
.sk-msg:nth-child(3n) { width: 56%; }
.sk-msg:nth-child(3n+1) { width: 30%; }
.sk-msg:nth-child(odd) { align-self: flex-end; }
@keyframes sk { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.list-empty { color: var(--dim); text-align: center; padding: 40px 0; font-size: 14px; }
.section + .section { margin-top: 6px; }
.section-head { width: 100%; display: flex; align-items: center; gap: 6px; padding: 12px 12px 6px; font-size: 12px; font-weight: 700; color: var(--sub); border-radius: 8px; }
.section-head:hover { color: var(--text); }
.caret { display: inline-block; transition: transform var(--t) var(--ease); }
.section-head.shut .caret { transform: rotate(-90deg); }
.section-n { margin-left: auto; color: var(--dim); font-weight: 600; }
.room { width: 100%; display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 12px; text-align: left; transition: background var(--t) var(--ease); }
.room:hover { background: var(--hover); }
.room.active { background: var(--active); }
.room.drop-target, .room.drop-target:hover { background: var(--active); box-shadow: 0 0 0 2px var(--focus) inset; }
.room-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.room-top, .room-bottom { display: flex; align-items: center; gap: 6px; min-width: 0; }
.room .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 600; }
.pin-mark { width: 13px; height: 13px; color: var(--dim); }
.room time { margin-left: auto; flex: none; font-size: 11.5px; color: var(--dim); }
.room .last { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--sub); }
.badge { flex: none; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--badge); color: #fff; font-size: 11.5px; font-weight: 700; line-height: 20px; text-align: center; }

/* 방 프로필 (앱과 같은 스쿼클) */
.av { position: relative; width: 46px; height: 46px; flex: none; border-radius: 35.5%; overflow: hidden; background: #b6c0ca; display: grid; place-items: center; }
.av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.av.sm { width: 38px; height: 38px; }
.av.xs { width: 24px; height: 24px; }
.av-sil .sil { position: absolute; inset: 0; width: 100%; height: 100%; fill: #e4e9ee; }
.av-text { background: #1b1b1b; color: #fff; font-weight: 600; text-align: center; line-height: 1.15; padding: 5px; }
.av.xs.av-text { padding: 2px; }
.av-text span { font-size: 11px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: keep-all; }
.av.sm.av-text span { font-size: 9px; }
.av.xs.av-text span { font-size: 6px; }
.av-init { font-weight: 700; color: #fff; font-size: 15px; }

/* ── 대화 */
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; position: relative; background: var(--room); }
.room-head { height: 64px; flex: none; display: flex; align-items: center; gap: 8px; padding: 0 14px 0 20px; }
.back { display: none; margin-left: -8px; }
.room-title { flex: 1; min-width: 0; display: flex; align-items: center; gap: 11px; }
.room-name { font-weight: 700; font-size: 17px; letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.head-actions { display: flex; gap: 2px; align-items: center; }
.room-search { display: none; align-items: center; gap: 6px; width: 260px; height: 36px; padding: 0 10px; margin-right: 4px; border-radius: 10px; background: var(--card); color: var(--dim); box-shadow: 0 0 0 1px var(--line) inset; }
.room-search:focus-within { box-shadow: 0 0 0 2px var(--focus) inset; }
.room-search .ic { width: 16px; height: 16px; }
.room-search input { flex: 1; min-width: 0; border: 0; outline: none; background: none; font-size: 14px; color: var(--text); }
.search-count { font-size: 12px; color: var(--dim); flex: none; }
.app.searching .room-search { display: flex; animation: pop var(--t) var(--ease); }
.app.searching #search-toggle { display: none; }

.pinned { margin: 0 20px 4px; padding: 10px 10px 10px 14px; border-radius: 14px; background: var(--card); box-shadow: var(--shadow); font-size: 14px; display: flex; align-items: center; gap: 10px; cursor: pointer; flex: none; }
.pinned > .ic { width: 17px; height: 17px; color: var(--sub); }
.pinned-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pinned-x { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; color: var(--dim); }
.pinned-x:hover { background: var(--hover); color: var(--text); }
.pinned-x .ic { width: 15px; height: 15px; }

.messages { flex: 1; overflow-y: auto; padding: 6px 0 20px; outline: none; }
.messages.room-in { animation: room-in var(--t-mid) var(--ease); }
@keyframes room-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.day { display: flex; justify-content: center; margin: 22px 0 10px; }
.day span { font-size: 12px; color: var(--room-sub); background: var(--pill); padding: 4px 12px; border-radius: 999px; }

.msg { display: flex; gap: 10px; padding: 2px 24px; }
.msg.start { margin-top: 10px; }
.msg.mine { justify-content: flex-end; }
.who { width: 38px; flex: none; }
.stack { min-width: 0; max-width: min(600px, 72%); display: flex; flex-direction: column; }
.msg.mine .stack { align-items: flex-end; }
.msg .name { font-size: 13px; color: var(--room-sub); margin: 0 0 4px 2px; }
.line { position: relative; display: flex; align-items: flex-end; gap: 6px; max-width: 100%; }
.msg.mine .line { flex-direction: row-reverse; }
.line > time { flex: none; font-size: 11px; color: var(--room-sub); white-space: nowrap; padding-bottom: 1px; }
.content { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.msg.mine .content { align-items: flex-end; }

.bubble { background: var(--other); color: var(--text); border-radius: 16px; padding: 9px 13px; max-width: 100%; word-break: break-word; overflow-wrap: anywhere; }
.msg.mine .bubble { background: var(--mine); color: var(--on-mine); }
.msg.other.start .content > .bubble:first-child { border-top-left-radius: 5px; }
.msg.mine.start .content > .bubble:first-child { border-top-right-radius: 5px; }
.bubble-row { display: flex; align-items: flex-start; gap: 8px; }
.bubble-body { min-width: 0; }
.text { white-space: pre-wrap; }
.bubble a { color: var(--link); text-decoration: none; }
.bubble a:hover { text-decoration: underline; }
.msg.mine .bubble a { color: inherit; text-decoration: underline; text-decoration-color: rgba(0, 0, 0, .3); }
.msg.done .bubble-body { opacity: .45; text-decoration: line-through; }

.quote { display: flex; flex-direction: column; align-items: flex-start; width: 100%; max-width: 360px; text-align: left; padding: 0 0 7px; margin-bottom: 7px; border-bottom: 1px solid rgba(0, 0, 0, .1); }
.quote b { font-size: 12px; font-weight: 700; }
.quote span { font-size: 12.5px; opacity: .6; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (prefers-color-scheme: dark) { .msg.other .quote { border-color: rgba(255, 255, 255, .12); } }

.todo-box { flex: none; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%; border: 1.7px solid currentColor; opacity: .55; display: inline-grid; place-items: center; font-size: 12px; font-weight: 800; line-height: 1; transition: opacity var(--t), background var(--t); }
.todo-box:hover { opacity: 1; }
.msg.done .todo-box { opacity: 1; background: var(--text); border-color: var(--text); color: var(--other); }
.msg.mine.done .todo-box { background: var(--on-mine); border-color: var(--on-mine); color: var(--mine); }

.link-card { display: block; width: 300px; max-width: 100%; border-radius: 14px; overflow: hidden; background: var(--card); color: var(--text); text-decoration: none; box-shadow: 0 0 0 1px rgba(0, 0, 0, .05); transition: transform var(--t) var(--ease); }
.link-card:hover { transform: translateY(-1px); }
.link-img { display: block; width: 100%; aspect-ratio: 1.91; object-fit: cover; background: var(--field); }
.link-meta { display: flex; flex-direction: column; gap: 2px; padding: 10px 13px 11px; }
.link-meta b { font-size: 14px; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.link-meta small { font-size: 12px; color: var(--sub); }

.photos { position: relative; display: flex; }
.photos img { display: block; max-width: 300px; max-height: 320px; min-width: 80px; min-height: 80px; border-radius: 14px; cursor: zoom-in; background: rgba(127, 127, 127, .15); object-fit: cover; transition: filter var(--t); }
.photos img:hover { filter: brightness(.95); }
.photos.album { display: grid; gap: 3px; border-radius: 14px; overflow: hidden; }
.photos.album.n1 { grid-template-columns: 240px; }
.photos.album.n2 { grid-template-columns: repeat(2, 150px); }
.photos.album.n3 { grid-template-columns: repeat(3, 112px); }
.photos.album img { width: 100%; height: auto; aspect-ratio: 1; max-width: none; max-height: none; min-width: 0; min-height: 0; border-radius: 0; }
.photos > .todo-box { position: absolute; top: 8px; left: 8px; z-index: 1; color: #fff; opacity: 1; background: rgba(0, 0, 0, .35); }
.only-phone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; width: 160px; aspect-ratio: 1; border-radius: 14px;
  background: rgba(127, 127, 127, .14); color: var(--sub); font-size: 12px; line-height: 1.3; text-align: center; padding: 8px; box-sizing: border-box; white-space: nowrap; }
.only-phone svg { opacity: .7; }
.photos.album .only-phone { width: 100%; border-radius: 0; }

.file { display: flex; align-items: center; gap: 11px; color: inherit; text-decoration: none !important; min-width: 220px; }
.file-ic { width: 40px; height: 40px; border-radius: 11px; background: rgba(0, 0, 0, .06); display: grid; place-items: center; flex: none; }
.file-meta { display: flex; flex-direction: column; min-width: 0; }
.file-meta b { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 240px; }
.file-meta small { font-size: 12px; opacity: .6; }

.check-head { font-size: 12px; font-weight: 700; opacity: .55; margin-bottom: 2px; }
.checklist { list-style: none; margin: 0; padding: 0; min-width: 200px; }
.checklist li { display: flex; align-items: center; gap: 9px; padding: 3px 0; cursor: pointer; }
.tick { width: 18px; height: 18px; flex: none; border-radius: 50%; border: 1.6px solid currentColor; opacity: .5; display: grid; place-items: center; font-size: 11px; font-weight: 800; }
.checklist li.on { opacity: .45; text-decoration: line-through; }
.checklist li.on .tick { opacity: 1; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
.msg.mine .chips { justify-content: flex-end; }
.chip, .thread-sum { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--card); color: var(--sub); box-shadow: 0 0 0 1px rgba(0, 0, 0, .04); }
.chip-ic { width: 13px; height: 13px; }
.thread-sum { color: var(--text); transition: box-shadow var(--t); }
.thread-sum b { font-weight: 700; }
.thread-sum span { color: var(--sub); }
.thread-sum:hover { box-shadow: 0 0 0 1px var(--dim); }

/* 메시지에 마우스를 올리면 보이는 도구 */
.tools { position: absolute; top: 50%; display: flex; gap: 1px; padding: 3px; background: var(--card); border-radius: 12px; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translateY(-50%) scale(.96); transition: opacity var(--t) var(--ease), transform var(--t) var(--ease); z-index: 2; }
.msg.other .tools { left: calc(100% + 6px); }
.msg.mine .tools { right: calc(100% + 6px); }
.msg:hover .tools, .tools:focus-within { opacity: 1; pointer-events: auto; transform: translateY(-50%); }
.tools button { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: var(--sub); }
.tools .ic { width: 17px; height: 17px; }
.tools button:hover { background: var(--hover); color: var(--text); }
.tools button.on { color: var(--text); }
.tools button[data-act="react"].on { color: #e5484d; }
.tools button[data-act="react"].on .ic { fill: currentColor; }
.tools button[data-act="del"]:hover { color: var(--danger); }

.msg.flash .content { animation: pulse 1s var(--ease); }
.msg.mine.flash .content { transform-origin: right center; }
.msg.other.flash .content { transform-origin: left center; }
@keyframes pulse { 0%, 50%, 100% { transform: scale(1); } 25%, 75% { transform: scale(1.04); } }

.empty, .p-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--room-sub); height: 100%; min-height: 240px; font-size: 14px; }
.empty img, .p-empty img { opacity: .9; }
.empty p, .p-empty p { margin: 0; }
.p-empty { color: var(--dim); min-height: 50vh; }

.drop { position: fixed; inset: 0; z-index: 30; padding: 10px; pointer-events: none; background: rgba(0, 0, 0, .05); animation: fade var(--t) var(--ease); }
.drop > div { width: 100%; height: 100%; border: 2px dashed var(--focus); border-radius: 18px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 40px; }
.drop-pill { display: inline-flex; align-items: center; gap: 10px; max-width: min(520px, 90vw); padding: 12px 20px; border-radius: 999px; background: var(--card); color: var(--text); box-shadow: var(--shadow); animation: pop var(--t-mid) var(--ease); }
.drop-pill b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (prefers-color-scheme: dark) { .drop { background: rgba(255, 255, 255, .04); } }

/* 올리는 중: 대화 맨 아래에 실제 사진 + 은은한 진행 표시. 끝나면 같은 자리가 그대로 말풍선이 된다 */
.up-pending .photos img { opacity: .72; cursor: default; }
.up-empty { display: block; width: 160px; height: 120px; border-radius: 14px; background: rgba(127, 127, 127, .15); }
.up-bar { position: absolute; left: 10px; right: 10px; bottom: 10px; height: 3px; border-radius: 2px; overflow: hidden; background: rgba(255, 255, 255, .45); box-shadow: 0 0 0 .5px rgba(0, 0, 0, .12); }
.up-bar i { display: block; height: 100%; background: #fff; transition: width 200ms var(--ease); }
.bubble .up-bar { position: static; display: block; margin-top: 8px; background: rgba(0, 0, 0, .12); box-shadow: none; }
.bubble .up-bar i { background: rgba(0, 0, 0, .45); }

/* 입력창 */
.composer { flex: none; background: var(--card); border-top: 1px solid var(--line); padding: 12px 16px 10px 22px; display: flex; flex-direction: column; gap: 6px; }
#input { width: 100%; resize: none; border: 0; outline: none; background: transparent; color: var(--text); line-height: 22px; min-height: 66px; max-height: 200px; padding: 2px 0; overflow-y: auto; font-size: 15px; }
#input::placeholder, #reply-input::placeholder { color: var(--dim); }
.composer-bar { display: flex; align-items: center; gap: 8px; margin-left: -8px; }
.attach { cursor: pointer; }
.composer-hint { flex: 1; font-size: 12px; color: var(--dim); }
.send { flex: none; margin-left: auto; padding: 7px 16px; border-radius: 10px; background: var(--mine); color: var(--on-mine); font-weight: 700; font-size: 14px; transition: background var(--t), color var(--t), transform var(--t); }
.send:not(:disabled):active { transform: scale(.97); }
.send:disabled { background: var(--field); color: var(--dim); cursor: default; }
@media (prefers-color-scheme: dark) { .send:disabled { background: #34373c; color: #8a9097; box-shadow: 0 0 0 1px #45494f inset; } }

/* ── 오른쪽 패널 */
.panel { width: 0; display: flex; justify-content: flex-start; min-height: 0; overflow: hidden; overflow: clip; transition: width var(--t-slow) var(--ease); }
.panel.open { width: 360px; }
.panel-in { flex: none; width: 360px; background: var(--list); border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; opacity: 0; transform: translateX(32px); transition: transform var(--t-slow) var(--ease), opacity var(--t-mid) var(--ease); }
.panel.open .panel-in { opacity: 1; transform: none; }
/* 패널을 열거나 다른 패널로 바꿀 때만: 줄들이 살짝 시차를 두고 올라온다 */
.rise { animation: rise var(--t-mid) var(--ease) both; animation-delay: calc(var(--i, 0) * 22ms + var(--rise-from, 0ms)); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.title-in { display: inline-block; animation: fade var(--t-mid) var(--ease); }
.panel-head { height: 64px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 12px 0 20px; border-bottom: 1px solid var(--line); font-weight: 700; font-size: 16px; }
.panel-body { flex: 1; overflow-y: auto; padding: 6px 10px 16px; }
/* 아래에 더 있으면 끝을 흐리게 + 아래 화살표 (스크롤하면 사라짐) */
.panel-body.more-below { -webkit-mask-image: linear-gradient(#000 calc(100% - 56px), transparent); mask-image: linear-gradient(#000 calc(100% - 56px), transparent); }
.panel { position: relative; }
.more-hint { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); z-index: 2; height: 26px; padding: 0 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--sub); font: inherit; font-size: 12px; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; box-shadow: 0 4px 14px -6px rgba(0,0,0,.25); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.more-hint.on { opacity: 1; pointer-events: auto; }
.more-hint:hover { color: var(--fg); }
.more-hint svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.p-group + .p-group { margin-top: 6px; }
.p-room { display: flex; align-items: center; gap: 8px; padding: 14px 8px 6px; font-size: 13px; font-weight: 700; }
.p-room > span:last-of-type { margin-left: auto; color: var(--dim); font-weight: 600; font-size: 12px; }
.p-sub { padding: 14px 8px 8px; font-size: 12px; font-weight: 700; color: var(--sub); }
.p-item { display: flex; align-items: flex-start; gap: 10px; padding: 9px 8px; border-radius: 10px; font-size: 14px; cursor: pointer; color: inherit; text-decoration: none; transition: background var(--t); }
.p-item:hover { background: var(--hover); }
.p-item .todo-box { color: var(--text); }
.p-room .p-all { color: var(--text); margin: 0 2px 0 0; }
.p-room .p-all.some { opacity: 1; }
.p-room[data-todo-fold] { cursor: pointer; }
.p-fold { display: grid; place-items: center; width: 22px; height: 22px; margin-left: 2px; color: var(--sub); }
.p-fold .caret { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.p-fold.shut .caret { transform: rotate(-90deg); }
.p-filter { margin: 4px 8px 2px; }
/* 할 일 패널: 카테고리 고르기 · 카테고리 제목 줄 */
.p-cats { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 8px 2px; }
.p-cats button { height: 26px; padding: 0 11px; border-radius: 999px; font-size: 12.5px; color: var(--sub); background: var(--field); white-space: nowrap; transition: background var(--t), color var(--t); }
.p-cats button:hover { color: var(--text); }
.p-cats button.on { background: var(--text); color: var(--list); font-weight: 600; }
.p-cat + .p-cat { margin-top: 4px; }
.p-cat-head { display: flex; align-items: center; gap: 6px; padding: 16px 8px 2px; font-size: 12px; font-weight: 700; color: var(--sub); cursor: pointer; }
.p-cat-head:hover { color: var(--text); }
.p-cat-n { margin-left: auto; color: var(--dim); font-weight: 600; }
.p-cat .p-room { padding-top: 10px; }
.p-room .p-all.on { opacity: 1; background: var(--sub); border-color: var(--sub); color: var(--list); }
.p-item.done .todo-box { opacity: 1; background: var(--sub); border-color: var(--sub); color: var(--list); }
.p-item.done .p-text { color: var(--dim); text-decoration: line-through; }
.p-text { display: flex; flex-direction: column; min-width: 0; word-break: break-word; }
.p-text small { font-size: 12px; color: var(--dim); margin-top: 1px; }
.p-ic { width: 20px; color: var(--sub); flex: none; padding-top: 1px; }
.p-ic .ic { width: 18px; height: 18px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; padding: 0 4px; }
.grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; cursor: pointer; background: var(--field); transition: filter var(--t); }
.grid img:hover { filter: brightness(.92); }

/* 댓글 (슬랙 스레드처럼: 말풍선 아닌 목록) */
.c-room { font-size: 12px; color: var(--dim); padding: 12px 10px 2px; }
.c-item { display: flex; gap: 10px; padding: 10px; border-radius: 12px; cursor: default; }
.c-item.root { padding-bottom: 14px; }
.c-item .av.xs { width: 30px; height: 30px; margin-top: 2px; }
.c-main { min-width: 0; flex: 1; }
.c-head { display: flex; align-items: baseline; gap: 8px; }
.c-head b { font-size: 14px; }
.c-head time { font-size: 11.5px; color: var(--dim); }
.c-body { font-size: 14.5px; white-space: pre-wrap; word-break: break-word; margin-top: 1px; }
.c-body a { color: var(--link); }
.c-body a.file { color: inherit; margin-top: 4px; }
.c-img { display: block; max-width: 100%; max-height: 240px; margin-top: 4px; border-radius: 12px; cursor: zoom-in; background: rgba(127, 127, 127, .15); }
.c-item.root .c-body { font-size: 15px; }
.c-divider { display: flex; align-items: center; gap: 10px; margin: 4px 10px 6px; font-size: 12px; color: var(--sub); }
.c-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.panel-composer { flex: none; display: flex; align-items: flex-end; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
#reply-input { flex: 1; resize: none; border: 0; outline: none; background: var(--field); color: var(--text); border-radius: 12px; padding: 8px 12px; line-height: 21px; min-height: 37px; max-height: 140px; font-size: 14px; }
#reply-input:focus { box-shadow: 0 0 0 2px var(--focus) inset; }

/* ── 빠른 이동 · 작은 창 */
.modal { position: fixed; inset: 0; background: rgba(0, 0, 0, .3); display: grid; place-items: start center; padding: 14vh 16px 0; z-index: 20; animation: fade var(--t-mid) var(--ease); }
.modal.closing { opacity: 0; transition: opacity var(--t) var(--ease); }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal-card { width: min(580px, 100%); background: var(--card); border-radius: 16px; overflow: hidden; box-shadow: 0 24px 64px rgba(0, 0, 0, .25), 0 0 0 1px var(--line); animation: pop var(--t-mid) var(--ease); }
.switcher-field { display: flex; align-items: center; gap: 10px; padding: 0 18px; border-bottom: 1px solid var(--line); color: var(--dim); }
#switcher-input { flex: 1; border: 0; padding: 17px 0; font-size: 16px; background: transparent; color: var(--text); outline: none; }
.switcher-list { max-height: 52vh; overflow-y: auto; padding: 6px; }
.sw-sec { font-size: 11.5px; font-weight: 700; color: var(--dim); padding: 10px 10px 4px; }
.sw { padding: 8px 10px; border-radius: 10px; display: flex; align-items: center; gap: 10px; cursor: pointer; }
.sw.sel { background: var(--active); }
.sw-ic { width: 24px; height: 24px; display: grid; place-items: center; color: var(--sub); }
.sw-ic .ic { width: 18px; height: 18px; }
.sw-text { display: flex; flex-direction: column; min-width: 0; font-size: 14px; }
.sw-text > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sw-text small { color: var(--dim); font-size: 12px; }
.sw mark { background: rgba(255, 225, 79, .55); color: inherit; border-radius: 3px; }
.sw-empty { color: var(--dim); text-align: center; padding: 28px; font-size: 14px; }
.switcher-foot { display: flex; gap: 16px; padding: 9px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--dim); }
.switcher-foot kbd { margin-right: 3px; }
.ask-card { width: min(380px, 100%); padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.ask-card h3 { margin: 0; font-size: 17px; }
.ask-card input { border: 0; outline: none; background: var(--field); border-radius: 11px; padding: 11px 13px; font-size: 15px; color: var(--text); }
.ask-card input:focus { box-shadow: 0 0 0 2px var(--focus) inset; }
.send-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.send-list li { display: flex; gap: 10px; align-items: baseline; }
.send-list b { flex: 1; min-width: 0; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.send-list small { flex: none; color: var(--sub); font-size: 12.5px; }
.send-sum { margin: 0; font-size: 13px; color: var(--sub); }
.ask-actions { display: flex; justify-content: flex-end; gap: 8px; }
.btn-plain, .btn-primary { padding: 8px 16px; border-radius: 10px; font-weight: 600; font-size: 14px; }
.btn-plain:hover { background: var(--hover); }
.btn-primary { background: var(--mine); color: var(--on-mine); }

.viewer { position: fixed; inset: 0; background: rgba(0, 0, 0, .88); display: grid; place-items: center; z-index: 30; cursor: zoom-out; animation: fade var(--t) var(--ease); }
.viewer img { max-width: 94vw; max-height: 94vh; border-radius: 6px; }
.viewer-x { position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; display: grid; place-items: center; }

/* 전광판 (앱 '채팅방에 저장'): 검은 상자에 빛나는 글자, 누르면 전체 화면 */
.led { position: relative; overflow: hidden; background: var(--bg, #000); color: var(--fg); border-radius: 14px; font-size: 22px; line-height: 1.25; }
.led:not(.led-full) { max-width: 300px; min-width: 120px; padding: 14px 18px; cursor: zoom-in; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.led:not(.led-full) .led-text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-wrap; word-break: break-word; }
.led-text { display: inline-block; }
.led-glow .led-text { text-shadow: 0 0 6px var(--fg), 0 0 14px var(--fg); }
.led-gradient .led-text, .led-rainbow .led-text { color: transparent; background: var(--paint); -webkit-background-clip: text; background-clip: text; text-shadow: none; }
.led-glow.led-gradient .led-text, .led-glow.led-rainbow .led-text { filter: drop-shadow(0 0 5px var(--fg)); }
.led-rainbow .led-text { background-size: 200% 100%; animation: led-hue 4s linear infinite; }
@keyframes led-hue { to { background-position: 200% 0; } }
.led-dots::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle, transparent 50%, var(--bg, #000) 72%); background-size: 3px 3px; opacity: .85; }
.led-viewer { background: #000; }
.led-viewer .viewer-x { z-index: 1; }
.led-hint { position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 1; padding: 7px 14px; border-radius: 999px; background: rgba(255, 255, 255, .14); color: #fff; font-size: 13px; white-space: nowrap; pointer-events: none; animation: led-hint-out .4s ease 5s forwards; }
@keyframes led-hint-out { to { opacity: 0; } }
@media (hover: none) { .led-hint { display: none; } }
.led-viewer:fullscreen { cursor: none; }
.led-viewer:fullscreen .led-hint, .led-viewer:fullscreen .viewer-x { display: none; }
.no-file { cursor: default; }
.led-full { position: absolute; inset: 0; border-radius: 0; display: grid; place-items: center; font-size: min(28vh, 22vw); line-height: 1.1; }
.led-full.led-dots::after { background-size: calc(100vh / var(--dots, 40)) calc(100vh / var(--dots, 40)); }
.led-full .led-track { width: 100%; text-align: center; }
.led-full:not(.led-move) .led-text { white-space: pre-wrap; word-break: break-word; font-size: min(1em, 14vw); padding: 0 4vw; }
.led-move .led-text { white-space: pre; }
.led-move.led-left .led-track, .led-move.led-right .led-track { text-align: left; }
.led-move.led-left .led-text { animation: led-left var(--dur) linear infinite; }
.led-move.led-right .led-text { animation: led-right var(--dur) linear infinite; }
.led-move.led-up .led-track, .led-move.led-down .led-track { height: 100%; display: grid; place-items: center; }
.led-move.led-up .led-text { animation: led-up var(--dur) linear infinite; }
.led-move.led-down .led-text { animation: led-down var(--dur) linear infinite; }
@keyframes led-left { from { transform: translateX(100vw); } to { transform: translateX(-100%); } }
@keyframes led-right { from { transform: translateX(-100%); } to { transform: translateX(100vw); } }
@keyframes led-up { from { transform: translateY(100vh); } to { transform: translateY(-100vh); } }
@keyframes led-down { from { transform: translateY(-100vh); } to { transform: translateY(100vh); } }
.led-mirror { transform: scaleX(-1); }
.led-fx-blink .led-track { animation: led-blink 1s steps(1) infinite; }
.led-fx-pulse .led-track { animation: led-pulse 2s ease-in-out infinite; }
@keyframes led-blink { 50% { opacity: 0; } }
@keyframes led-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .led-move .led-text, .led-rainbow .led-text, .led-fx-blink .led-track, .led-fx-pulse .led-track { animation: none; } }
.toast { position: fixed; bottom: 28px; left: 50%; transform: translate(-50%, 8px); opacity: 0; background: #1f2023; color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 14px; z-index: 40; box-shadow: var(--shadow); max-width: min(560px, calc(100vw - 32px)); overflow-wrap: anywhere; transition: opacity var(--t-mid) var(--ease), transform var(--t-mid) var(--ease); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast-act { margin-left: 14px; color: #8ab4ff; font-weight: 700; font-size: 14px; pointer-events: auto; }

/* ── 창 너비 */
@media (max-width: 1199px) {
  .app { grid-template-columns: 68px var(--list-w, 290px) minmax(0, 1fr); }
  /* 좁은 창: 대화 위로 밀려 들어온다 (대화 폭은 그대로) */
  .panel, .panel.open { position: fixed; top: 0; right: 0; bottom: 0; z-index: 15; width: min(380px, 100%); }
  .panel { transform: translateX(100%); transition: transform var(--t-slow) var(--ease), box-shadow var(--t-slow) var(--ease); }
  .panel.open { transform: none; box-shadow: -12px 0 40px rgba(0, 0, 0, .14); }
  .panel-in { width: 100%; opacity: 1; transform: none; transition: none; }
}
@media (max-width: 899px) {
  .app { grid-template-columns: 60px minmax(0, 1fr); }
  .app:not(.chat-open) .main { display: none; }
  .app.chat-open { grid-template-columns: minmax(0, 1fr); }
  .app.chat-open .rail, .app.chat-open .list { display: none; }
  .back { display: inline-grid; }
  .room-head { padding: 0 8px 0 14px; }
  .msg { padding: 2px 14px; }
  .stack { max-width: 80%; }
  .room-search { width: min(220px, 40vw); }
  .composer-hint { display: none; }
  .rail .rail-logo { width: 30px; height: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* PC 준비 중 안내 + 작은 관리자 로그인 */
.coming { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 8px; }
.coming b { font-size: 17px; font-weight: 700; }
.coming span { font-size: 14px; color: var(--sub); }
.coming .stores { margin-top: 12px; }
.admin-login { margin-top: 28px; font-size: 12px; color: var(--sub); opacity: .6; }
.admin-login button { background: none; border: 0; padding: 4px 2px; font: inherit; color: inherit; cursor: pointer; text-decoration: underline; }
.admin-login:hover { opacity: 1; }

/* 여러 개 선택 (카톡 삭제 모드처럼): 줄 왼쪽 동그라미, 아래 막대 */
.selecting .composer { display: none; }
.selecting .msg { cursor: pointer; position: relative; padding-left: 40px; }
.selecting .msg .tools { display: none !important; }
.msg .pick { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; border-radius: 50%;
  border: 1.8px solid var(--sub); display: grid; place-items: center; font-size: 13px; font-weight: 700; color: #fff; box-sizing: border-box; }
.msg.picked .pick { background: var(--accent, #ffd400); border-color: var(--accent, #ffd400); color: #1a1a1a; }
.msg.picked .bubble, .msg.picked .photos { filter: brightness(.93); }
.sel-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line, rgba(0,0,0,.08)); background: var(--card); }
.sel-bar #sel-n { font-weight: 600; font-size: 14px; }
.sel-del { border: 0; border-radius: 10px; padding: 9px 18px; font: inherit; font-weight: 700; background: #ff3b30; color: #fff; cursor: pointer; }
.sel-del:disabled { opacity: .35; cursor: default; }

/* 카톡 대화에서 가져온 다른 사람: 이름 첫 글자 동그라미 (카톡 기본 프사 느낌) */
.av.author { display: inline-grid; place-items: center; background: #b8c4d4; color: #fff; font-weight: 700; font-size: 13px; }

/* 로그인 버튼 (Google·Apple) */
.login-btns { width: 100%; display: flex; flex-direction: column; gap: 10px; }
.btn-login { width: 100%; display: flex; gap: 10px; align-items: center; justify-content: center; padding: 14px; border-radius: 14px; font-weight: 600; font-size: 15px; cursor: pointer; transition: background var(--t), box-shadow var(--t); }
.btn-google { border: 1px solid #dadce0; background: #fff; color: #1f1f1f; }
.btn-google:hover { background: #f8f9fa; box-shadow: 0 2px 8px rgba(0, 0, 0, .06); }
.btn-apple { border: 1px solid #000; background: #000; color: #fff; }
.btn-apple:hover { background: #1c1c1e; }
.login-note { margin: 14px 0 0; font-size: 13px; color: #8a8ea0; }
.login .btn-apple { border-color: rgba(255,255,255,.22); }
.login .need-app { background: rgba(255,255,255,.06); box-shadow: none; }
.login .need-app p { color: #b3b7c6; }
.login .store { background: #fff; color: #111; }

/* 글 고치기 */
.edit-box { display: block; width: min(560px, 60vw); min-height: 24px; resize: none; border: 0; outline: none; background: transparent; line-height: inherit; padding: 0; overflow: hidden; }
.edit-hint { margin-top: 6px; font-size: 12px; opacity: .55; }

/* 넓은 화면: 대화를 가운데 768px 칸에 모은다 (입력창 폭과 같게, 왼쪽이 휑하지 않게) */
@media (min-width: 900px) {
  .msg { padding-left: max(24px, calc((100% - 768px) / 2)); padding-right: max(24px, calc((100% - 768px) / 2)); }
}

/* 목록 위 '+ 새 방' / '+ 새 문서 방': 글자 있는 큰 버튼 */
.new-room-btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px 0 10px; border-radius: 999px; background: var(--text); color: var(--bg); font-size: 14px; font-weight: 600; white-space: nowrap; transition: opacity var(--t) var(--ease); }
.new-room-btn:hover { opacity: .85; }
.new-room-btn .ic { width: 18px; height: 18px; stroke-width: 2.2; }
html[data-theme="kakao"] .new-room-btn { background: var(--mine); color: var(--on-mine); }
/* 새 방 · 카테고리 옮기기 창의 카테고리 칸 */
.cat-field { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--sub); }
.cat-field select { flex: 1; border: 0; outline: none; background: var(--field); border-radius: 11px; padding: 10px 12px; font-size: 15px; color: var(--text); }
.cat-field select:focus { box-shadow: 0 0 0 2px var(--focus) inset; }
.ask-sub { margin: -8px 0 0; font-size: 14px; color: var(--sub); }

/* 오른쪽 위 할 일 · 예약 메시지: 조금 크게, 숫자 동그라미 */
.head-big { position: relative; width: 38px; height: 38px; }
.head-big .ic { width: 22px; height: 22px; }
.head-big .rail-badge { top: 1px; right: 0; box-shadow: 0 0 0 2px var(--bg); }
.new-btns { display: inline-flex; gap: 6px; }
.new-btns .new-room-btn { height: 32px; padding: 0 12px 0 8px; font-size: 13.5px; }

/* 프로필 */
.rail-me { overflow: hidden; padding: 0; }
.rail-me img { width: 100%; height: 100%; object-fit: cover; display: block; }
.prof-row { display: flex; align-items: center; gap: 14px; }
.prof-av { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; background: var(--field); display: grid; place-items: center; font-size: 26px; font-weight: 700; color: var(--sub); flex: none; }
.prof-av img { width: 100%; height: 100%; object-fit: cover; }
.prof-acts { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.prof-acts .btn-plain { padding: 6px 10px; font-size: 13.5px; cursor: pointer; }
.prof-hint { margin: -6px 0 0; font-size: 12.5px; }
/* 홈 목록: 채팅방과 문서 사이 얇은 줄 */
.kind-sep { display: flex; align-items: center; gap: 8px; margin: 8px 10px 4px; font-size: 11.5px; color: var(--dim); }
.kind-sep::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* 방·문서를 끌어 카테고리 묶음에 놓을 때 */
#rooms .section.drop-into { background: var(--hover); border-radius: 12px; box-shadow: 0 0 0 2px var(--line) inset; }

/* ── 왼쪽 목록 너비 끌기 (경계에 올리면 얇은 선, 두 번 누르면 기본 너비) */
.list-resize { position: absolute; top: 0; bottom: 0; right: -4px; width: 8px; cursor: col-resize; z-index: 6; touch-action: none; }
.list-resize::after { content: ''; position: absolute; top: 0; bottom: 0; left: 3px; width: 2px; border-radius: 1px; background: var(--focus); opacity: 0; transition: opacity var(--t); }
.list-resize:hover::after, .list-resize.drag::after { opacity: 1; }
body.list-resizing { cursor: col-resize; user-select: none; }
@media (max-width: 899px) { .list-resize { display: none; } }
