/* WhatsApp Web, dark theme */
:root {
  --bg: #111b21; --panel: #202c33; --chatbg: #0b141a; --out: #005c4b; --in: #202c33;
  --text: #e9edef; --sub: #8696a0; --green: #00a884; --green2: #06cf9c; --blue: #53bdeb; --line: #222d34;
  --hover: #202c33; --sel: #2a3942; --input: #2a3942; --icon: #aebac1; --danger: #f15c6d;
  --font: "Segoe UI", "Helvetica Neue", Helvetica, "Lucida Grande", Arial, Ubuntu, Cantarell, "Fira Sans", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #0c1317; color: var(--text); font: 14.2px/1.45 var(--font); -webkit-font-smoothing: antialiased; overflow: hidden; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea { font: inherit; color: var(--text); }
.hidden { display: none !important; }
svg { width: 24px; height: 24px; fill: currentColor; }
.icon { width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; color: var(--icon); flex: none; }
.icon:hover { background: rgba(255,255,255,.06); }
.icon.on { background: rgba(255,255,255,.1); }
::-webkit-scrollbar { width: 6px; height: 6px; } ::-webkit-scrollbar-thumb { background: rgba(255,255,255,.16); }
a { color: var(--blue); }

/* ---------- login ---------- */
.login { position: fixed; inset: 0; background: var(--bg); overflow: auto; }
.login-band { height: 222px; background: var(--green); opacity: .9; }
.login-card { position: relative; margin: -140px auto 40px; width: min(560px, 92vw); background: var(--panel); border-radius: 6px; padding: 40px 44px; box-shadow: 0 17px 50px rgba(0,0,0,.3); }
.login-brand { position: absolute; top: -48px; left: 0; display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 600; font-size: 14px; letter-spacing: .3px; text-transform: uppercase; }
.login-brand img { width: 36px; height: 36px; border-radius: 50%; }
.login h1 { font-weight: 300; font-size: 26px; margin: 0 0 18px; }
.login-steps { color: var(--sub); padding-left: 20px; margin: 0 0 24px; line-height: 2; font-size: 16px; }
.login form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.login input { flex: 1 1 220px; background: var(--input); border: 0; border-radius: 8px; padding: 12px 14px; font-size: 16px; outline: none; }
.login input:focus { box-shadow: 0 0 0 2px var(--green); }
.login button { background: var(--green); color: #111b21; font-weight: 600; border-radius: 24px; padding: 11px 24px; }
.login #again { flex-basis: 100%; font-size: 13px; color: var(--green2); text-decoration: none; }
.login-msg { min-height: 20px; color: var(--sub); }
.login-msg.err { color: var(--danger); }
.login-foot { color: var(--sub); font-size: 13px; border-top: 1px solid var(--line); padding-top: 16px; margin-bottom: 0; }

/* ---------- layout ---------- */
.app { position: fixed; inset: 0; display: flex; background: var(--bg); }
@media (min-width: 1440px) { .app { inset: 19px calc((100vw - 1396px) / 2); box-shadow: 0 6px 18px rgba(11,20,26,.4); } body { background: linear-gradient(#0c1317 127px, #0c1317 0); } }
.side { width: 30%; min-width: 340px; max-width: 500px; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: var(--bg); position: relative; }
.main { flex: 1; min-width: 0; position: relative; display: flex; }
.side-head, .chat-head { height: 59px; background: var(--panel); display: flex; align-items: center; padding: 0 16px; gap: 10px; flex: none; }
.head-icons { margin-left: auto; display: flex; gap: 6px; }
.me-avatar, .avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; flex: none; color: #fff; }
.me-avatar { background: #6b7c85; }
.avatar.claude { background: radial-gradient(circle at 30% 30%, #f0a37a, #c96442); font-size: 17px; }
.avatar.n2 { background: radial-gradient(circle at 30% 30%, #5fd0b0, #0a8f74); } .avatar.n3 { background: radial-gradient(circle at 30% 30%, #89a7ff, #4b62d6); }
.avatar.n4 { background: radial-gradient(circle at 30% 30%, #ffb35c, #d97b16); } .avatar.n5 { background: radial-gradient(circle at 30% 30%, #e48ae8, #a542b0); }
.avatar.n6 { background: radial-gradient(circle at 30% 30%, #ff8a8a, #c94242); }
.menu { position: absolute; right: 16px; top: 52px; background: #233138; border-radius: 3px; padding: 9px 0; box-shadow: 0 2px 5px rgba(11,20,26,.26), 0 2px 10px rgba(11,20,26,.16); z-index: 30; min-width: 230px; }
.menu button { display: block; width: 100%; text-align: left; padding: 13px 24px; font-size: 14.5px; }
.menu button:hover { background: #182229; }

.search-row { padding: 7px 12px; background: var(--bg); border-bottom: 1px solid var(--line); }
.search { display: flex; align-items: center; gap: 18px; background: var(--panel); border-radius: 8px; padding: 0 12px 0 14px; height: 35px; color: var(--sub); }
.search svg { width: 20px; height: 20px; }
.search input { flex: 1; background: none; border: 0; outline: none; font-size: 15px; }
.search input::placeholder { color: var(--sub); }
.chips { display: flex; gap: 8px; padding: 8px 14px; border-bottom: 1px solid var(--line); }
.chip { background: var(--panel); color: var(--sub); border-radius: 18px; padding: 5px 13px; font-size: 14px; }
.chip.on { background: #0a332c; color: #00d9a6; }

.list { flex: 1; overflow-y: auto; }
.row { display: flex; align-items: center; height: 72px; padding-left: 13px; cursor: pointer; position: relative; }
.row:hover { background: var(--hover); } .row.sel { background: var(--sel); }
.row .avatar { width: 49px; height: 49px; font-size: 19px; }
.row-body { flex: 1; min-width: 0; height: 100%; margin-left: 15px; padding-right: 15px; border-top: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; }
.row:first-child .row-body { border-top-color: transparent; }
.row-top, .row-bot { display: flex; align-items: center; gap: 6px; }
.row-name { flex: 1; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-time { font-size: 12px; color: var(--sub); flex: none; }
.row.unread .row-time { color: var(--green2); }
.row-last { flex: 1; color: var(--sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; margin-top: 2px; }
.row-last.typing { color: var(--green2); }
.row-last .tk { vertical-align: -3px; margin-right: 2px; }
.badge { background: var(--green2); color: #111b21; border-radius: 12px; min-width: 20px; height: 20px; padding: 0 6px; font-size: 12px; font-weight: 600; display: grid; place-items: center; }
.pin { color: var(--sub); font-size: 13px; }
.list-empty { color: var(--sub); text-align: center; padding: 40px 30px; }
.list-sec { color: var(--green2); font-size: 14px; padding: 18px 30px 10px; }

/* ---------- intro (no chat open) ---------- */
.intro { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; background: #222e35; border-bottom: 6px solid var(--green); padding: 30px; }
.intro-art img { width: 120px; height: 120px; border-radius: 50%; opacity: .9; }
.intro h2 { font-weight: 300; font-size: 32px; margin: 28px 0 10px; color: #e9edef; }
.intro p { color: var(--sub); max-width: 560px; line-height: 1.6; }
.btn-green { background: var(--green); color: #111b21; border-radius: 24px; padding: 10px 24px; font-weight: 600; margin-top: 10px; }
.intro-foot { margin-top: 40px; font-size: 13px; }

/* ---------- chat ---------- */
.chat { flex: 1; display: flex; flex-direction: column; min-width: 0; position: relative; background: var(--chatbg); }
.chat::before { content: ""; position: absolute; inset: 0; background: url(/doodle.svg) repeat; background-size: 320px; pointer-events: none; }
.chat > * { position: relative; }
.chat-head { z-index: 5; border-left: 1px solid var(--line); }
.chat-head .back { display: none; margin-left: -10px; }
.who { min-width: 0; cursor: pointer; flex: 1; }
.who-name { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-sub { font-size: 13px; color: var(--sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-sub.typing { color: var(--green2); }
.findbar { display: flex; align-items: center; gap: 8px; background: var(--panel); padding: 6px 16px; z-index: 5; border-top: 1px solid var(--line); }
.findbar input { flex: 1; background: var(--input); border: 0; border-radius: 8px; padding: 8px 12px; outline: none; }
.findbar span { color: var(--sub); font-size: 13px; }
.msgs { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 12px 0 8px; }
.msgs-in { padding: 0 7%; display: flex; flex-direction: column; }
.day { align-self: center; background: #182229; color: var(--sub); font-size: 12.5px; padding: 5px 12px 6px; border-radius: 7.5px; margin: 10px 0; text-transform: uppercase; box-shadow: 0 1px .5px rgba(11,20,26,.13); position: sticky; top: 4px; z-index: 2; }
.sys { align-self: center; background: #182229; color: #ffd279; font-size: 12.5px; padding: 6px 12px; border-radius: 7.5px; margin: 6px 0; max-width: 80%; text-align: center; }
.m { display: flex; margin-bottom: 2px; }
.m.first { margin-top: 10px; }
.m.me { justify-content: flex-end; }
.b { position: relative; max-width: 65%; padding: 6px 7px 8px 9px; border-radius: 7.5px; box-shadow: 0 1px .5px rgba(11,20,26,.13); font-size: 14.2px; line-height: 19px; word-wrap: break-word; overflow-wrap: anywhere; min-width: 0; }
.m.claude .b { background: var(--in); }
.m.me .b { background: var(--out); }
.m.first.claude .b { border-top-left-radius: 0; }
.m.first.me .b { border-top-right-radius: 0; }
.m.first.claude .b::before, .m.first.me .b::before { content: ""; position: absolute; top: 0; width: 8px; height: 13px; }
.m.first.claude .b::before { left: -8px; background: var(--in); clip-path: polygon(0 0, 100% 0, 100% 100%); }
.m.first.me .b::before { right: -8px; background: var(--out); clip-path: polygon(0 0, 100% 0, 0 100%); }
.m.wide .b { max-width: 85%; }
.meta { float: right; margin: 6px 0 -5px 10px; font-size: 11px; color: rgba(233,237,239,.6); white-space: nowrap; display: inline-flex; align-items: center; gap: 3px; position: relative; top: 4px; }
.m.me .meta { color: rgba(233,237,239,.6); }
.tk { width: 16px; height: 11px; display: inline-block; }
.tk.read { color: var(--blue); }
.txt { white-space: pre-wrap; }
.md > :first-child { margin-top: 0; } .md > :last-child { margin-bottom: 0; }
.md p { margin: 0 0 6px; } .md ul, .md ol { margin: 4px 0 6px; padding-left: 22px; } .md li { margin: 2px 0; }
.md h1, .md h2, .md h3, .md h4 { font-size: 15px; margin: 8px 0 4px; font-weight: 600; }
.md code { background: rgba(0,0,0,.25); padding: 1px 4px; border-radius: 4px; font: 12.5px/1.4 ui-monospace, Menlo, Consolas, monospace; }
.md pre { background: #111b21; padding: 8px 10px; border-radius: 6px; overflow-x: auto; margin: 6px 0; }
.md pre code { background: none; padding: 0; white-space: pre; }
.md table { border-collapse: collapse; margin: 6px 0; display: block; overflow-x: auto; font-size: 13px; }
.md th, .md td { border: 1px solid #3b4a54; padding: 4px 8px; text-align: left; }
.md blockquote { border-left: 3px solid var(--green); margin: 4px 0; padding-left: 10px; color: #cfd6da; }
.md hr { border: 0; border-top: 1px solid #3b4a54; }
.md a { color: var(--blue); }
.cost { font-size: 10.5px; color: rgba(233,237,239,.35); margin-right: 4px; }
.copy { opacity: 0; position: absolute; top: 2px; right: 4px; width: 26px; height: 26px; border-radius: 50%; background: inherit; color: var(--sub); font-size: 13px; }
.b:hover .copy { opacity: 1; }
.m.me .copy { display: none; }
.hl { background: #ffd27955; border-radius: 2px; }

/* attachments in bubbles */
.f-img, .f-vid { display: block; margin: -3px -4px 4px -6px; border-radius: 6px; overflow: hidden; max-width: 330px; cursor: pointer; background: #0b141a; }
.f-img img { display: block; max-width: 100%; max-height: 340px; object-fit: cover; }
.f-vid video { display: block; max-width: 100%; max-height: 340px; }
.f-doc { display: flex; align-items: center; gap: 10px; background: rgba(0,0,0,.18); border-radius: 6px; padding: 10px 12px; margin: -2px -3px 4px -5px; min-width: 240px; max-width: 360px; text-decoration: none; color: var(--text); }
.f-doc:hover { background: rgba(0,0,0,.26); }
.f-ic { width: 34px; height: 40px; border-radius: 4px; display: grid; place-items: center; font-size: 10px; font-weight: 700; color: #fff; flex: none; background: #5f66cd; text-transform: uppercase; }
.f-ic.pdf { background: #e5252a; } .f-ic.xls, .f-ic.xlsx, .f-ic.csv { background: #1f7244; } .f-ic.doc, .f-ic.docx { background: #2a5699; } .f-ic.zip { background: #8b6a2f; } .f-ic.ppt, .f-ic.pptx { background: #c4502b; }
.f-name { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.f-sub { font-size: 12px; color: var(--sub); }
.f-dl { margin-left: auto; width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(255,255,255,.2); display: grid; place-items: center; color: var(--sub); flex: none; }
.f-aud { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; min-width: 250px; }
.f-aud audio { width: 260px; height: 36px; }
.voice-t { font-size: 13px; color: #cfd6da; font-style: italic; margin-top: 2px; }
.up { font-size: 12px; color: var(--sub); }
.bar { height: 3px; background: rgba(255,255,255,.15); border-radius: 2px; margin-top: 4px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--green2); width: 0; }

.typing-b { display: inline-flex; gap: 4px; padding: 4px 4px 2px; }
.typing-b i { width: 7px; height: 7px; background: var(--sub); border-radius: 50%; animation: tp 1.3s infinite; }
.typing-b i:nth-child(2) { animation-delay: .18s; } .typing-b i:nth-child(3) { animation-delay: .36s; }
@keyframes tp { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.typing-what { font-size: 12.5px; color: var(--sub); margin-top: 2px; max-width: 420px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.down { position: absolute; right: 20px; bottom: 76px; width: 42px; height: 42px; border-radius: 50%; background: var(--panel); color: var(--sub); display: grid; place-items: center; box-shadow: 0 1px 3px rgba(11,20,26,.4); z-index: 6; }
.down span { position: absolute; top: -6px; right: -4px; background: var(--green2); color: #111b21; border-radius: 10px; font-size: 11px; font-weight: 700; padding: 0 5px; }
.down span:empty { display: none; }

/* compose */
.compose { min-height: 62px; background: var(--panel); display: flex; align-items: flex-end; padding: 10px 16px; gap: 8px; z-index: 5; }
.compose .icon { margin-bottom: 1px; }
.box { flex: 1; background: var(--input); border-radius: 8px; padding: 9px 12px 11px; min-height: 42px; display: flex; }
.box textarea { flex: 1; background: none; border: 0; outline: none; resize: none; max-height: 140px; font-size: 15px; line-height: 21px; padding: 0; }
.box textarea::placeholder { color: var(--sub); }
.send-btn { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: var(--icon); flex: none; }
#b-send, #pv-send, #rec-send { color: var(--icon); }
.attach-wrap { position: relative; }
.attach-menu { position: absolute; bottom: 54px; left: 0; background: #233138; border-radius: 16px; padding: 10px; box-shadow: 0 2px 5px rgba(11,20,26,.26), 0 2px 10px rgba(11,20,26,.16); min-width: 210px; }
.attach-menu button { display: flex; align-items: center; gap: 14px; width: 100%; padding: 10px 12px; border-radius: 10px; font-size: 15px; }
.attach-menu button:hover { background: #182229; }
.am { font-style: normal; width: 26px; text-align: center; }
.rec { position: absolute; inset: 0; background: var(--panel); display: flex; align-items: center; gap: 12px; padding: 0 16px; justify-content: flex-end; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .2; } }
.rec-hint { color: var(--sub); margin-right: auto; }
#rec-t { font-variant-numeric: tabular-nums; font-size: 16px; }

.drop { position: absolute; inset: 59px 0 0; background: rgba(11,20,26,.88); z-index: 20; display: grid; place-items: center; }
.drop div { border: 2px dashed var(--green); color: var(--text); padding: 50px 70px; border-radius: 12px; font-size: 18px; }

/* attachment preview */
.preview { position: absolute; inset: 59px 0 0; background: #0b141a; z-index: 15; display: flex; flex-direction: column; }
.preview header { height: 60px; display: flex; align-items: center; gap: 12px; padding: 0 16px; background: var(--panel); }
.pv-main { flex: 1; display: grid; place-items: center; overflow: hidden; padding: 20px; }
.pv-main img, .pv-main video { max-width: 100%; max-height: 100%; border-radius: 6px; }
.pv-doc { text-align: center; color: var(--sub); }
.pv-doc .f-ic { width: 80px; height: 100px; font-size: 18px; margin: 0 auto 14px; }
.pv-bar { padding: 14px 20px 18px; background: var(--panel); display: grid; grid-template-columns: 1fr auto; gap: 12px 14px; align-items: center; }
.pv-bar input { grid-column: 1 / -1; background: var(--input); border: 0; border-radius: 8px; padding: 11px 14px; outline: none; font-size: 15px; }
.pv-thumbs { display: flex; gap: 8px; overflow-x: auto; align-items: center; }
.pv-thumbs div { width: 52px; height: 52px; border-radius: 6px; background: #233138; display: grid; place-items: center; font-size: 10px; overflow: hidden; border: 2px solid transparent; flex: none; position: relative; color: var(--sub); }
.pv-thumbs div.on { border-color: var(--green); }
.pv-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.pv-thumbs b { position: absolute; top: 0; right: 2px; font-size: 12px; color: #fff; cursor: pointer; }
.pv-add { width: 52px; height: 52px; border: 1px solid #3b4a54; border-radius: 6px; font-size: 24px; color: var(--sub); }
#pv-send { background: var(--green); color: #111b21; width: 56px; height: 56px; grid-column: 2; grid-row: 2 / span 1; }
.pv-bar .pv-thumbs { grid-column: 1; }

/* info panel */
.info { width: 30%; min-width: 320px; max-width: 420px; background: var(--bg); border-left: 1px solid var(--line); display: flex; flex-direction: column; }
.info header { height: 59px; background: var(--panel); display: flex; align-items: center; gap: 16px; padding: 0 16px; font-size: 16px; flex: none; }
.tabs { display: flex; border-bottom: 1px solid var(--line); }
.tab { flex: 1; padding: 14px 0; color: var(--sub); border-bottom: 3px solid transparent; }
.tab.on { color: var(--green2); border-color: var(--green2); }
.info-body { flex: 1; overflow-y: auto; padding: 10px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.grid a { aspect-ratio: 1; background: #233138; border-radius: 4px; overflow: hidden; display: grid; place-items: center; color: var(--sub); font-size: 11px; }
.grid img, .grid video { width: 100%; height: 100%; object-fit: cover; }
.info-body .f-doc { margin: 0 0 6px; max-width: none; }
.info-empty { color: var(--sub); text-align: center; padding: 30px; }
.info-actions { border-top: 1px solid var(--line); padding: 6px 0; }
.info-actions button { display: block; width: 100%; text-align: left; padding: 12px 22px; font-size: 15px; }
.info-actions button:hover { background: var(--hover); }

/* modal, viewer, toast */
.modal { position: fixed; inset: 0; background: rgba(11,20,26,.85); z-index: 50; display: grid; place-items: center; }
.modal-card { background: #3b4a54; background: var(--panel); border-radius: 6px; width: min(520px, 94vw); max-height: 80vh; display: flex; flex-direction: column; box-shadow: 0 17px 50px rgba(0,0,0,.4); }
.modal-card header { display: flex; align-items: center; padding: 14px 14px 10px 24px; font-size: 18px; }
.modal-card header .icon { margin-left: auto; }
#modal-body { overflow-y: auto; padding: 0 0 12px; }
.wa-row { padding: 12px 24px; cursor: pointer; border-top: 1px solid var(--line); }
.wa-row:hover { background: var(--hover); }
.wa-row b { font-weight: 500; } .wa-row div { color: var(--sub); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viewer { position: fixed; inset: 0; background: rgba(11,20,26,.96); z-index: 60; display: grid; place-items: center; }
.viewer #viewer-x { position: absolute; top: 12px; right: 12px; } .viewer #viewer-dl { position: absolute; top: 12px; right: 60px; text-decoration: none; font-size: 20px; }
#viewer-in img, #viewer-in video { max-width: 94vw; max-height: 88vh; }
#viewer-in iframe { width: 92vw; height: 88vh; border: 0; background: #fff; border-radius: 4px; }
.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: #233138; padding: 10px 18px; border-radius: 8px; z-index: 70; box-shadow: 0 2px 10px rgba(0,0,0,.4); }

/* ---------- phone ---------- */
@media (max-width: 900px) {
  .side { width: 100%; max-width: none; min-width: 0; border: 0; }
  .main { position: fixed; inset: 0; z-index: 10; display: none; }
  .app.open .main { display: flex; }
  .app.open .side { display: none; }
  .intro { display: none; }
  .chat-head { padding: 0 6px 0 4px; border: 0; }
  .chat-head .back { display: inline-grid; margin-left: 0; }
  .chat-head .avatar { width: 36px; height: 36px; }
  .msgs-in { padding: 0 3%; }
  .b { max-width: 88%; }
  .m.wide .b { max-width: 94%; }
  .compose { padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); min-height: 0; gap: 4px; }
  .box { border-radius: 22px; }
  .info { position: fixed; inset: 0; z-index: 40; width: auto; max-width: none; min-width: 0; }
  .copy { opacity: .6; }
  .f-img, .f-vid { max-width: 260px; }
  .f-doc { min-width: 0; }
  .f-aud audio { width: 210px; }
  .side-head { padding: 0 8px 0 14px; }
  .row-name { font-size: 16.5px; }
}
.side-title { font-size: 19px; font-weight: 500; color: var(--text); }
@media (min-width: 901px) { .side-title { display: none; } }
@media (max-width: 900px) { .side-head .me-avatar { display: none; } .side-head { padding-left: 18px; } .side-title { font-size: 22px; } }
.b:has(.f-img), .b:has(.f-vid) { max-width: min(342px, 88%); }

/* 🧭 Master chat */
.avatar.master { background: #00a884; font-size: 20px; }
.topic { display: inline-block; font-size: 12px; font-weight: 600; color: #53bdeb; background: rgba(83,189,235,.12); border-radius: 6px; padding: 2px 7px; margin: 0 0 4px; text-decoration: none; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m.me .topic { display: block; width: fit-content; margin: 4px 0 0; color: #b3e6d6; background: rgba(0,0,0,.18); }
.topic.via { color: var(--sub, #8696a0); font-weight: 500; }

/* reply (23 Oct 2026) */
.m { position: relative; align-items: center; }
.rep { order: 2; opacity: 0; width: 28px; height: 28px; margin: 0 4px; border-radius: 50%; background: var(--panel); color: var(--sub); font-size: 15px; flex: none; }
.m.me .rep { order: 0; }
.m:hover .rep { opacity: .9; }
.m.swiping .rep { opacity: 1; }
.q { border-left: 4px solid #53bdeb; background: rgba(0,0,0,.18); border-radius: 6px; padding: 4px 8px; margin: 0 0 4px; cursor: pointer; max-height: 66px; overflow: hidden; }
.q.claude { border-left-color: #06cf9c; }
.q-who { font-size: 12.5px; font-weight: 600; color: #53bdeb; }
.q.claude .q-who, .reply-bar.claude .q-who { color: #06cf9c; }
.q-txt { font-size: 13px; color: var(--sub); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.reply-bar { display: flex; align-items: center; gap: 8px; background: var(--panel); padding: 8px 16px 0; }
.reply-bar.hidden { display: none; }
.rb-in { flex: 1; min-width: 0; border-left: 4px solid #53bdeb; background: rgba(0,0,0,.2); border-radius: 6px; padding: 5px 9px; }
.reply-bar.claude .rb-in { border-left-color: #06cf9c; }
@media (max-width: 760px) { .rep { display: none; } .m.swiping .rep { display: block; } .reply-bar { padding: 6px 8px 0; } }
