@font-face { font-family: Rubik; src: url(/rubik.woff2) format('woff2'); font-weight: 300 900; font-display: swap; }

:root {
  color-scheme: dark;
  --rail: #0c0c0e; --side: #131316; --ground: #1a1a1e; --raised: #242429; --hover: #2a2a30; --line: #32323a;
  --text: #ededf0; --soft: #a3a3ae; --live: #4ccb8e; --warn: #f0b64a; --danger: #c93a3a; --danger-text: #ff8d87; --stage: #0c0c0e;
  --accent: #ff8b2b; --accent-text: #ffa65c; --on-accent: #1c0f02; --ink: #17171a;
  --dome: 50% 50% 38% 38% / 60% 60% 32% 32%;
}
:root[data-accent='violeta'], .accent-violeta { --accent: #a78bfa; --accent-text: #b9a4fb; --on-accent: #160b33; }
:root[data-accent='azul'], .accent-azul { --accent: #5aa9ff; --accent-text: #85c0ff; --on-accent: #03182e; }
:root[data-accent='verde'], .accent-verde { --accent: #54cf94; --accent-text: #74dba9; --on-accent: #04200f; }
.accent-laranja { --accent: #ff8b2b; }
:root[data-theme='light'] {
  color-scheme: light;
  --rail: #dcdce1; --side: #ececef; --ground: #fbfbfc; --raised: #fff; --hover: #dfdfe5; --line: #cfcfd7;
  --text: #1a1a1e; --soft: #5b5b66; --live: #11784a; --warn: #9a6200; --danger-text: #b32626; --stage: #dedee3; --accent-text: #a84900;
}
:root[data-theme='light'][data-accent='violeta'] { --accent-text: #6b43d8; }
:root[data-theme='light'][data-accent='azul'] { --accent-text: #0b62b8; }
:root[data-theme='light'][data-accent='verde'] { --accent-text: #11784a; }

* { box-sizing: border-box; margin: 0; }
[hidden] { display: none !important; }
html, body, #root { height: 100%; }
body { background: var(--ground); color: var(--text); font: 400 15px/1.45 Rubik, system-ui, sans-serif; overflow: hidden; accent-color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; text-align: inherit; padding: 0; }
button:disabled { cursor: default; opacity: .5; }
a { color: var(--accent-text); }
ul { list-style: none; padding: 0; }
h1, h2, h3, h4 { font-weight: 600; text-wrap: balance; }
small { display: block; color: var(--soft); font-size: 13px; font-weight: 400; }
hr { border: 0; border-top: 1px solid var(--line); }
fieldset { border: 0; padding: 0; min-width: 0; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
* { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.clip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.soft { color: var(--soft); }
.grow { flex: 1; min-width: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.narrow { display: none !important; }

/* botões e campos */
.primary, .danger, .quiet, .share { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 7px 15px; border-radius: 10px; font-weight: 500; white-space: nowrap; text-decoration: none; transition: background .12s; }
.primary { background: var(--accent); color: var(--on-accent); }
.primary:hover:not(:disabled) { background: color-mix(in oklab, var(--accent), white 18%); }
.danger { background: var(--danger); color: #fff; }
.danger:hover:not(:disabled) { background: #b22f2f; }
.quiet { background: var(--raised); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.quiet:hover:not(:disabled) { background: var(--hover); }
.link { color: var(--accent-text); font-weight: 500; }
.link:hover { text-decoration: underline; }
.link.bad { color: var(--danger-text); justify-self: start; }
.icon-button { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 9px; color: var(--soft); transition: background .12s, color .12s; }
.icon-button:hover:not(:disabled) { background: var(--hover); color: var(--text); }
.icon-button[aria-pressed='true'] { color: var(--accent-text); }
.icon-button.off { color: var(--danger-text); }
.icon-button.hang { background: var(--danger); color: #fff; }
.icon-button.hang:hover { background: #b22f2f; color: #fff; }
label { display: grid; gap: 6px; font-weight: 500; }
label.inline, .checks label, .radios label { display: flex; align-items: center; gap: 9px; font-weight: 400; min-height: 32px; }
input:is(:not([type]), [type='password'], [type='search'], [type='text']), select, textarea {
  width: 100%; min-height: 40px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--raised); font-weight: 400; resize: vertical;
}
::placeholder { color: var(--soft); opacity: 1; }
input[type='checkbox'], input[type='radio'] { width: 18px; height: 18px; flex: none; }
.form { display: grid; gap: 16px; align-content: start; }
.form > footer { display: flex; justify-content: flex-end; gap: 8px; }
.error { color: var(--danger-text); }
legend { font-weight: 500; margin-bottom: 8px; padding: 0; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; font-weight: 400; padding: 5px 0; }
.switch input { appearance: none; width: 40px; height: 23px; border-radius: 12px; background: var(--line); position: relative; cursor: pointer; transition: background .15s; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; transition: translate .15s; }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { translate: 17px; }
.switch input:disabled { opacity: .45; cursor: default; }
.checks { display: grid; gap: 2px; max-height: 220px; overflow-y: auto; margin-top: 4px; }
.radios { display: grid; gap: 4px; }
.swatches { display: flex; flex-wrap: wrap; gap: 9px; }
.swatches input { appearance: none; width: 32px; height: 32px; border-radius: var(--dome); background: var(--tint, var(--accent)); cursor: pointer; }
.swatches input:checked { box-shadow: 0 0 0 3px var(--ground), 0 0 0 5px var(--text); }
.photo-field { display: flex; align-items: center; gap: 14px; }

/* rostos e emblemas */
.face { position: relative; display: inline-grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: var(--dome); background: var(--tint); color: var(--ink); font-weight: 600; font-size: 14px; line-height: 1; user-select: none; }
.face img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.face.sm { width: 24px; height: 24px; font-size: 10px; }
.face.md { width: 32px; height: 32px; font-size: 12px; }
.face.lg { width: 52px; height: 52px; font-size: 19px; }
.face.xl { width: 88px; height: 88px; font-size: 31px; }
.tint-0 { --tint: #ff9a4a; } .tint-1 { --tint: #6fb7ff; } .tint-2 { --tint: #77d39b; } .tint-3 { --tint: #f2cb54; } .tint-4 { --tint: #ff97b0; } .tint-5 { --tint: #b8a4ff; } .tint-6 { --tint: #5fd0cf; } .tint-7 { --tint: #cfc5b4; }
.text-0 { color: #ffa65c; } .text-1 { color: #85c0ff; } .text-2 { color: #86dca8; } .text-3 { color: #f2cb54; } .text-4 { color: #ffa5ba; } .text-5 { color: #c4b4ff; } .text-6 { color: #70dbda; }
[data-theme='light'] :is(.text-0) { color: #a84900; } [data-theme='light'] .text-1 { color: #0b62b8; } [data-theme='light'] .text-2 { color: #11784a; } [data-theme='light'] .text-3 { color: #7d5b00; }
[data-theme='light'] .text-4 { color: #b3265a; } [data-theme='light'] .text-5 { color: #6b43d8; } [data-theme='light'] .text-6 { color: #0b7473; }
.chip { width: 14px; height: 14px; border-radius: 50%; background: var(--tint); flex: none; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--live); flex: none; }
.dot.idle { background: var(--warn); } .dot.dnd { background: #e25555; } .dot:is(.offline, .invisible) { background: var(--soft); }
.face .dot { position: absolute; right: -4px; bottom: -3px; width: 13px; height: 13px; border: 2.5px solid var(--side); }
.face.sm .dot { width: 10px; height: 10px; border-width: 2px; right: -5px; bottom: -4px; }
.face.xl .dot { width: 22px; height: 22px; border-width: 4px; right: 0; bottom: -2px; }
.emblem { display: grid; place-items: center; width: 46px; height: 46px; flex: none; border-radius: 14px; background: var(--raised); font-weight: 600; font-size: 15px; overflow: hidden; }
.emblem img { width: 100%; height: 100%; object-fit: cover; }
.emblem.small { width: 32px; height: 32px; border-radius: 10px; font-size: 12px; }
.emblem.big { width: 72px; height: 72px; border-radius: 20px; font-size: 24px; }
.speaking .face { box-shadow: 0 0 0 2px var(--side), 0 0 0 4px var(--live); }

/* estrutura */
.splash { height: 100%; display: grid; place-items: center; background: var(--rail); }
.splash img { width: 72px; animation: breathe 1.4s ease-in-out infinite alternate; }
@keyframes breathe { to { opacity: .45; } }
.app { height: 100dvh; display: grid; grid-template-columns: auto minmax(0, 1fr); }
.nav-wrap { display: grid; grid-template-columns: 68px 244px; min-height: 0; }
.scrim { display: none; }
.rail { background: var(--rail); display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px 0; overflow-y: auto; scrollbar-width: none; }
.rail hr { width: 30px; margin: 2px 0; }
.rail-item { position: relative; border-radius: 14px; }
.rail-item .emblem { transition: background .12s, color .12s; }
.rail-item img.emblem { background: none; padding: 4px; }
.rail-item:hover .emblem { background: var(--hover); }
.rail-item[aria-current]::before, .rail-item.fresh::before { content: ''; position: absolute; left: -11px; top: 50%; translate: 0 -50%; width: 4px; height: 8px; border-radius: 0 4px 4px 0; background: var(--text); }
.rail-item[aria-current]::before { height: 34px; }
.rail-item[aria-current] span.emblem { background: var(--accent); color: var(--on-accent); }
.emblem.add { color: var(--soft); background: none; box-shadow: inset 0 0 0 1.5px var(--line); }
.rail-item .badge { position: absolute; right: -5px; bottom: -4px; box-shadow: 0 0 0 3px var(--rail); }
.live-dot { position: absolute; right: -5px; top: -4px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--live); color: #06140d; box-shadow: 0 0 0 3px var(--rail); }
.live-dot .icon { width: 12px; height: 12px; }
.badge { min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--danger); color: #fff; font-size: 12px; font-weight: 600; line-height: 19px; text-align: center; flex: none; }

.side { background: var(--side); display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.side-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 52px; flex: none; padding: 0 14px; font-weight: 600; font-size: 16px; border-bottom: 1px solid var(--line); }
button.side-head:hover { background: var(--hover); }
.side-body { flex: 1; overflow-y: auto; padding: 10px 8px 16px; }
.side-body section { margin-top: 14px; }
.side-body header { display: flex; align-items: center; justify-content: space-between; min-height: 30px; }
.side-body h2 { font-size: 13px; font-weight: 500; color: var(--soft); padding-left: 8px; }
.category { display: flex; align-items: center; gap: 4px; min-width: 0; flex: 1; color: var(--soft); font-size: 13px; font-weight: 500; }
.category:hover { color: var(--text); }
.category .icon { width: 14px; height: 14px; }
.side-body header .icon-button { width: 26px; height: 26px; }
.channel { position: relative; }
.place { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 34px; padding: 3px 8px; border-radius: 9px; color: var(--soft); }
.place.tall { min-height: 44px; }
.place > .clip { flex: 1; }
.place > .icon:nth-child(n + 3) { width: 13px; height: 13px; }
.place:hover, .channel:hover .place { background: var(--hover); color: var(--text); }
.place[aria-current] { background: var(--raised) !important; color: var(--text); }
.place.unread { color: var(--text); font-weight: 600; }
.place.hush { opacity: .55; }
.place-more { position: absolute; right: 3px; top: 3px; width: 28px; height: 28px; opacity: 0; background: var(--hover); }
.place.tall + .place-more { top: 8px; }
.place-more:focus-visible, .channel:hover > .place-more { opacity: 1; }
.channel:hover > .place .badge { visibility: hidden; }
.voice-people { padding: 2px 0 6px 28px; }
.voice-people button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 3px 8px; border-radius: 8px; font-size: 14px; color: var(--soft); }
.voice-people button:hover { background: var(--hover); }
.voice-people .clip { flex: 1; }
.voice-people .icon { width: 14px; height: 14px; }
.voice-people .speaking button { color: var(--text); }
.live { background: var(--danger); color: #fff; font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 5px; white-space: nowrap; }
.hint { color: var(--soft); font-size: 14px; padding: 4px 8px; }
.side-foot { flex: none; border-top: 1px solid var(--line); }
.linked { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.linked > button:first-child { flex: 1; min-width: 0; display: grid; line-height: 1.3; font-size: 14px; color: var(--soft); }
.linked strong { color: var(--live); font-weight: 600; }
.linked .wait { color: var(--accent-text); }
.self { display: flex; align-items: center; padding: 8px; }
.self-card { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 4px 6px; border-radius: 9px; line-height: 1.25; }
.self-card:hover { background: var(--hover); }
.self-card b { font-weight: 500; }
.self .icon-button { width: 31px; }

/* conversa */
.place-view { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.bar { display: flex; align-items: center; gap: 8px; height: 52px; flex: none; padding: 0 12px 0 18px; border-bottom: 1px solid var(--line); }
.bar h1 { font-size: 16px; flex: none; max-width: 45%; }
.bar > .icon { color: var(--soft); }
.bar .topic { color: var(--soft); font-size: 14px; padding-left: 10px; border-left: 1px solid var(--line); }
.bar .space { flex: 1; }
.bar .quiet { min-height: 32px; padding: 4px 12px; }
.offline { color: var(--accent-text); font-size: 14px; white-space: nowrap; }
.split { flex: 1; display: flex; min-height: 0; }
.center { flex: 1; min-width: 0; display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); }
.center.staged:not(.solo) { grid-template-columns: minmax(0, 1fr) 340px; }
.staged .chat { border-left: 1px solid var(--line); }
.page-body { flex: 1; overflow-y: auto; padding: 22px clamp(14px, 4vw, 40px); display: grid; gap: 14px; align-content: start; }
.page-body > * { max-width: 760px; }
.page-body h2 { font-size: 15px; margin-top: 10px; }
.add-friend { grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; }
.add-friend .error { grid-column: 1 / -1; grid-row: 2; }

.chat { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.chat.dropping::after { content: 'Solte para anexar'; position: absolute; inset: 12px; z-index: 3; display: grid; place-items: center; border-radius: 16px; border: 2px dashed var(--accent); background: color-mix(in srgb, var(--ground) 88%, transparent); font-weight: 600; font-size: 18px; }
.log-wrap { position: relative; flex: 1; min-height: 0; }
.log { height: 100%; overflow-y: auto; padding: 16px 0 6px; overflow-wrap: anywhere; overflow-anchor: none; }
.log:focus-visible { outline-offset: -2px; }
.start { padding: 24px 20px 10px; display: grid; gap: 6px; }
.start h2 { font-size: 26px; }
.start p { color: var(--soft); }
.message { position: relative; padding: 2px 20px 2px 70px; min-height: 26px; }
.message.head { margin-top: 14px; }
.compact .message.head { margin-top: 5px; }
.compact .message { padding-block: 0; }
.message:hover { background: color-mix(in srgb, var(--hover) 45%, transparent); }
.message.named { background: color-mix(in srgb, var(--accent) 11%, transparent); }
.message.lit { animation: lit 2.4s; }
@keyframes lit { 0%, 60% { background: color-mix(in srgb, var(--accent) 26%, transparent); } }
.message.pending { opacity: .55; }
.message .who { position: absolute; left: 20px; }
.message header { display: flex; align-items: baseline; gap: 8px; }
.message header .icon { width: 13px; height: 13px; color: var(--accent-text); align-self: center; }
.name { font-weight: 600; }
button.name:hover { text-decoration: underline; }
.message time { color: var(--soft); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.message .side-time { position: absolute; left: 20px; width: 38px; text-align: center; font-size: 11px; line-height: 22px; opacity: 0; }
.message:hover .side-time { opacity: 1; }
.message .body { white-space: pre-wrap; max-width: 78ch; }
.message .body small { display: inline; font-size: 12px; }
.message .big { font-size: 40px; line-height: 1.25; }
.reply-to { display: flex; align-items: center; gap: 6px; max-width: 100%; font-size: 13.5px; color: var(--soft); margin-bottom: 2px; opacity: 1 !important; }
.reply-to b { font-weight: 500; color: var(--text); white-space: nowrap; }
.reply-to .icon { width: 14px; height: 14px; }
.message:has(.reply-to) .who { top: 26px; }
.mention { display: inline; padding: 0 4px; border-radius: 5px; background: color-mix(in srgb, var(--accent) 20%, transparent); color: var(--accent-text); font-weight: 500; }
code { font: 13.5px/1.5 Consolas, monospace; background: var(--raised); padding: 1px 5px; border-radius: 5px; }
pre { background: var(--rail); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 4px 0; overflow-x: auto; white-space: pre; }
pre code { background: none; padding: 0; }
.edit-box textarea { min-height: 60px; field-sizing: content; max-height: 300px; }
.edit-box p { display: flex; gap: 14px; font-size: 14px; }
.muted-line { padding: 4px 20px 4px 70px; color: var(--soft); font-size: 13.5px; font-style: italic; }
.files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 5px; }
.picture { max-width: 100%; border-radius: 12px; overflow: hidden; background: var(--raised); }
.picture img { display: block; width: 100%; height: 100%; max-height: 320px; object-fit: contain; }
.clip-video { max-width: min(100%, 460px); max-height: 340px; border-radius: 12px; background: #000; }
.file { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; background: var(--raised); color: var(--text); text-decoration: none; max-width: 340px; min-width: 0; }
.file span { display: grid; min-width: 0; }
.file b { font-weight: 500; }
.reactions { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.reactions button { display: inline-flex; align-items: center; gap: 5px; height: 27px; padding: 0 9px; border-radius: 9px; background: var(--raised); opacity: 1; }
.reactions b { font-weight: 500; font-size: 13px; color: var(--soft); }
.reactions .on { box-shadow: inset 0 0 0 1.5px var(--accent); }
.reactions .on b { color: var(--accent-text); }
.tools { position: absolute; right: 16px; top: -14px; display: flex; padding: 2px; border-radius: 10px; background: var(--raised); border: 1px solid var(--line); opacity: 0; pointer-events: none; }
.message:is(:hover, :focus-within) .tools { opacity: 1; pointer-events: auto; }
.tools .icon-button { width: 30px; height: 28px; }
.tools .quick { font-size: 15px; }
.day { display: flex; align-items: center; gap: 12px; margin: 18px 20px 4px; color: var(--soft); font-size: 13px; }
.day::before, .day::after, .new-mark::before { content: ''; flex: 1; border-top: 1px solid var(--line); }
.new-mark { display: flex; align-items: center; gap: 10px; margin: 12px 20px 0; font-size: 12.5px; font-weight: 600; color: var(--danger-text); }
.new-mark::before { border-color: var(--danger-text); }
.seen { display: flex; align-items: center; justify-content: flex-end; gap: 5px; padding: 2px 20px; font-size: 12.5px; color: var(--soft); }
.seen .icon { width: 13px; height: 13px; }
.to-end { position: absolute; right: 20px; bottom: 8px; display: flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 18px; background: var(--accent); color: var(--on-accent); font-weight: 500; font-size: 14px; }

.composer-wrap { position: relative; padding: 4px 16px 0; }
.composer { border: 1px solid var(--line); border-radius: 14px; background: var(--raised); }
.composer:focus-within { border-color: var(--accent-text); }
.composer .row { display: flex; align-items: end; gap: 2px; padding: 5px; }
#draft { flex: 1; width: auto; min-height: 36px; max-height: 190px; padding: 7px 8px; border: 0; background: none; outline: 0; resize: none; field-sizing: content; }
.composer .icon-button { height: 36px; }
.composer .go { color: var(--accent-text); }
.replying { display: flex; align-items: center; gap: 8px; padding: 4px 6px 4px 12px; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--soft); }
.replying .clip { flex: 1; }
.drafts { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 10px 4px; }
.drafts li { display: flex; align-items: center; gap: 8px; max-width: 230px; padding: 4px 4px 4px 8px; border-radius: 10px; background: var(--ground); font-size: 13.5px; }
.drafts img { width: 34px; height: 34px; border-radius: 6px; object-fit: cover; }
.drafts .busy { opacity: .6; }
.typing { height: 24px; padding: 2px 6px; font-size: 13px; color: var(--soft); }
.no-write { display: flex; align-items: center; gap: 10px; margin: 4px 0 16px; padding: 12px 14px; border-radius: 12px; background: var(--side); color: var(--soft); }
.suggest { position: absolute; left: 16px; right: 16px; bottom: calc(100% - 4px); z-index: 2; padding: 6px; border-radius: 12px; background: var(--raised); border: 1px solid var(--line); box-shadow: 0 10px 30px rgb(0 0 0 / .3); }
.suggest button, .jump button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 8px; border-radius: 8px; }
:is(.suggest, .jump) button:is([aria-selected='true'], :hover) { background: var(--hover); }
.suggest b { font-weight: 500; }

/* painéis laterais */
.panel { width: 252px; flex: none; display: flex; flex-direction: column; min-height: 0; background: var(--side); }
.panel > header { display: flex; align-items: center; justify-content: space-between; padding: 10px 8px 4px 16px; }
.panel h2 { font-size: 14px; }
.panel-body { flex: 1; overflow-y: auto; padding: 4px 8px 16px; }
.panel h3 { font-size: 13px; font-weight: 500; color: var(--soft); padding: 12px 8px 4px; }
.person { display: flex; align-items: center; gap: 10px; width: 100%; min-width: 0; min-height: 42px; padding: 4px 8px; border-radius: 9px; line-height: 1.25; }
.person:hover { background: var(--hover); }
.person > .clip { flex: 1; }
.person b { font-weight: 500; }
.person.away { opacity: .5; }
.person > .icon { width: 14px; height: 14px; color: var(--warn); }
.with-action { display: flex; align-items: center; gap: 8px; padding-right: 8px; }
.search { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 4px 8px 10px; }
.search .primary { min-height: 40px; padding: 0 12px; }
.found { display: block; width: 100%; padding: 9px 10px; border-radius: 10px; overflow-wrap: anywhere; }
.found + .found { margin-top: 4px; }
.found:hover { background: var(--hover); }
.found header { display: flex; justify-content: space-between; gap: 8px; }
.found b { font-weight: 500; }
.found time { font-size: 12.5px; color: var(--soft); white-space: nowrap; }
.found p { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; }

/* chamada */
.stage { display: flex; flex-direction: column; gap: 12px; min-width: 0; min-height: 0; padding: 14px; background: var(--stage); }
.tiles { flex: 1; min-height: 0; display: flex; flex-wrap: wrap; gap: 12px; align-content: center; justify-content: center; overflow: hidden; }
.tile { position: relative; width: var(--tile, 320px); aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: var(--ground); display: grid; place-items: center; container-type: size; }
.tile::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; }
.tile.speaking::after { box-shadow: inset 0 0 0 3px var(--live); }
.tile.speaking .face { box-shadow: none; }
.tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile.screen { background: #000; }
.tile.screen video { object-fit: contain; }
.tile video.mirror { transform: scaleX(-1); }
.tile .face.xl { width: min(96px, 46cqh); height: min(96px, 46cqh); font-size: min(34px, 16cqh); }
.tile-hit { position: absolute; inset: 0; border-radius: inherit; }
.tile-hit:focus-visible { outline-offset: -4px; }
.tile footer { position: absolute; inset: auto 8px 8px; display: flex; align-items: center; gap: 6px; pointer-events: none; }
.tile footer > * { pointer-events: auto; }
.tile-name { display: flex; align-items: center; gap: 6px; min-width: 0; margin-right: auto; pointer-events: none !important; padding: 3px 9px; border-radius: 7px; background: rgb(8 8 10 / .78); color: #fff; font-size: 13px; }
.tile-name .icon { width: 14px; height: 14px; }
.tile-name em { font-style: normal; color: #ffb57a; white-space: nowrap; }
.tile footer .icon-button { width: 28px; height: 28px; background: rgb(8 8 10 / .78); color: #fff; }
@container (max-height: 120px) {
  .tile .face.xl { width: 40px; height: 40px; font-size: 15px; translate: 0 -9px; }
  .tile footer { inset: auto 4px 4px; }
  .tile-name { font-size: 12px; padding: 2px 7px; }
}
.volume { width: 76px; height: 28px; min-width: 40px; }
.tile .volume, .tile footer .icon-button { opacity: 0; transition: opacity .12s; }
.tile:is(:hover, :focus-within) :is(.volume, .icon-button) { opacity: 1; }
.has-focus .tile { width: var(--strip); order: 1; }
.has-focus .tile.focused { order: 0; width: 100%; height: var(--main); aspect-ratio: auto; }
.has-focus .tile:not(.focused) :is(.volume, footer .icon-button) { display: none; }
.tile:fullscreen { width: 100%; height: 100%; border-radius: 0; }
.stage-note { text-align: center; color: var(--soft); }
.controls { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.controls .icon-button { width: 46px; height: 46px; border-radius: 13px; background: var(--raised); color: var(--text); }
.controls .icon-button:hover { background: var(--hover); }
.controls .icon-button.off { color: var(--danger-text); }
.controls :is(.icon-button.on, .share.on) { background: var(--live); color: #06140d; }
.controls .icon-button.hang { background: var(--danger); color: #fff; }
.share { min-height: 46px; border-radius: 13px; background: var(--raised); }
.share:hover { background: var(--hover); }
.talk { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 8px 18px; border-radius: 13px; background: var(--accent); color: var(--on-accent); font-weight: 500; white-space: nowrap; touch-action: none; user-select: none; -webkit-touch-callout: none; }
.talk.on { background: var(--live); color: #06140d; }
.talk:disabled { background: var(--raised); color: var(--soft); opacity: 1; }
[data-theme='light'] .controls :is(.icon-button.on, .share.on, .talk.on) { color: #fff; }
.lobby { flex: 1; display: grid; place-content: center; justify-items: center; gap: 16px; text-align: center; padding: 16px; }
.faces { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.ring { position: fixed; z-index: 5; top: 16px; left: 50%; translate: -50%; width: max-content; max-width: calc(100vw - 24px); display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 18px; background: var(--raised); border: 1px solid var(--line); box-shadow: 0 14px 40px rgb(0 0 0 / .45); }
.ring > div { display: grid; margin-right: auto; padding-right: 12px; }
.ring > button { flex: 1 0 auto; }

/* janelas, menus e avisos */
dialog { margin: auto; padding: 0; width: min(440px, calc(100vw - 24px)); max-width: none; max-height: calc(100dvh - 24px); border: 1px solid var(--line); border-radius: 18px; background: var(--ground); color: var(--text); animation: rise .16s ease-out; }
dialog::backdrop { background: rgb(0 0 0 / .62); }
@keyframes rise { from { opacity: 0; translate: 0 8px; } }
.sheet { padding: 20px 22px 22px; display: grid; gap: 16px; }
.sheet > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -4px -8px 0 0; }
.sheet > header h2 { font-size: 19px; overflow-wrap: anywhere; }
dialog h3 { font-size: 15px; }
dialog.viewer { width: max-content; max-width: calc(100vw - 24px); }
dialog.viewer img { max-width: calc(100vw - 72px); max-height: calc(100dvh - 190px); border-radius: 10px; justify-self: center; }
dialog.viewer .quiet { justify-self: start; }
.profile-top { display: flex; align-items: center; gap: 18px; min-width: 0; overflow-wrap: anywhere; }
.profile-top h3 { font-size: 20px; }
.bio { white-space: pre-wrap; overflow-wrap: anywhere; padding: 11px 14px; border-radius: 12px; background: var(--side); }
.facts { display: grid; gap: 8px; }
.facts dt { font-size: 13px; color: var(--soft); }
.facts dd { margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.code { font: 600 18px/1.4 Consolas, monospace; text-align: center; padding: 16px 10px; border-radius: 12px; background: var(--side); user-select: all; }
.menu { inset: auto; margin: 0; padding: 0; width: auto; min-width: 210px; animation: none; max-width: calc(100vw - 16px); max-height: calc(100dvh - 16px); overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--raised); color: var(--text); box-shadow: 0 12px 36px rgb(0 0 0 / .4); }
.menu::backdrop { background: none; }
.menu button:first-child { margin-top: 6px; }
.menu button:last-child { margin-bottom: 6px; }
.menu button { display: flex; margin: 0 6px; align-items: center; gap: 10px; width: calc(100% - 12px); min-height: 36px; padding: 5px 10px; border-radius: 8px; }
.menu button span { flex: 1; }
.menu button:is(:hover, :focus-visible) { background: var(--hover); outline: 0; }
.menu .bad { color: var(--danger-text); }
#toasts { inset: auto 0 84px; margin: 0 auto; width: min(460px, calc(100vw - 24px)); border: 0; padding: 0; background: none; overflow: visible; pointer-events: none; }
#toasts:popover-open { display: grid; gap: 8px; justify-items: center; }
.toast { padding: 11px 16px; border-radius: 12px; background: var(--text); color: var(--ground); box-shadow: 0 8px 24px rgb(0 0 0 / .35); animation: rise .16s ease-out; }
.emoji-picker > div { height: 300px; overflow-y: auto; margin-top: 10px; }
.emoji-picker section { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); }
.emoji-picker h3 { grid-column: 1 / -1; font-size: 13px; font-weight: 500; color: var(--soft); padding: 8px 4px 2px; }
.emoji-picker button { height: 40px; font-size: 22px; border-radius: 8px; text-align: center; }
.emoji-picker button:hover { background: var(--hover); }
.jump { display: grid; gap: 2px; min-height: 260px; align-content: start; }
.jump input { margin-bottom: 8px; }
.jump small { margin-left: auto; }

dialog.page { width: min(960px, calc(100vw - 24px)); height: min(720px, calc(100dvh - 24px)); }
dialog.page .sheet { height: 100%; grid-template-rows: auto minmax(0, 1fr); padding-bottom: 0; }
.pages { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 26px; min-height: 0; }
.pages nav { display: grid; align-content: start; gap: 2px; overflow-y: auto; }
.pages nav button { padding: 8px 12px; border-radius: 9px; color: var(--soft); white-space: nowrap; }
.pages nav button:hover { background: var(--hover); color: var(--text); }
.pages nav [aria-current] { background: var(--raised); color: var(--text); font-weight: 500; }
.pages > section { overflow-y: auto; padding: 4px 8px 28px 4px; display: grid; gap: 16px; align-content: start; }
.pages > section > h3 { font-size: 18px; }
.pages h4 { font-size: 15px; }
.pages > section > :is(button) { justify-self: start; }
.danger-zone { display: grid; gap: 14px; justify-items: start; padding-top: 18px; border-top: 1px solid var(--line); }
.danger-zone .form { width: 100%; }
.rows { display: grid; }
.rows li { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 7px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.rows li:last-child { border: 0; }
.rows b { font-weight: 500; }
.rows.tall li { align-items: start; padding: 14px 0; }
.rows.tall .grow { display: grid; gap: 8px; }
.rows p small { display: inline; }
.rows .fresh { box-shadow: -10px 0 0 -7px var(--accent); }
.rows li > :is(.quiet, .primary) { min-height: 34px; padding: 4px 12px; }
.note { display: flex; align-items: center; gap: 12px; width: 100%; min-width: 0; }
blockquote { white-space: pre-wrap; padding: 10px 14px; border-radius: 10px; background: var(--side); max-height: 180px; overflow-y: auto; margin: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 22px 18px; }
.stats dt { color: var(--soft); font-size: 14px; }
.stats dd { margin: 0; font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tabs { display: flex; gap: 6px; }
.tabs button { padding: 6px 14px; border-radius: 9px; color: var(--soft); }
.tabs [aria-pressed='true'] { background: var(--raised); color: var(--text); font-weight: 500; }
.key-field { display: grid; gap: 6px; }
.keys { display: grid; gap: 10px; }
.keys div { display: grid; grid-template-columns: 150px 1fr; align-items: center; }
.keys dd { margin: 0; }
kbd { font: 500 13px/1 Consolas, monospace; padding: 5px 8px; border-radius: 7px; background: var(--raised); border: 1px solid var(--line); }

/* vazio, carregando, entrada */
.empty { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 40px 20px; color: var(--soft); align-self: center; }
.empty strong { color: var(--text); font-weight: 600; }
.empty > .icon { width: 30px; height: 30px; margin-bottom: 4px; }
.empty p { max-width: 42ch; }
.place-view > .empty { flex: 1; align-content: center; }
.bones { display: grid; gap: 18px; padding: 16px 20px; }
.bones > div { display: flex; gap: 12px; }
.bones i { width: 38px; height: 38px; border-radius: var(--dome); flex: none; }
.bones span { flex: 1; display: grid; gap: 8px; align-content: center; }
.bones b { height: 11px; border-radius: 6px; }
.bones :is(i, b) { background: var(--raised); animation: breathe .9s ease-in-out infinite alternate; }
.panel .bones, .pages .bones { padding: 8px; }
.entry { height: 100%; overflow-y: auto; display: grid; background: var(--rail); padding: 28px 22px; }
.entry-box { margin: auto; width: min(350px, 100%); display: grid; gap: 18px; }
.entry-mark { height: 88px; }
.entry-mark img { height: 100%; }
.entry h1 { font-size: 27px; line-height: 1.15; }
.entry .form > footer > * { width: 100%; min-height: 42px; }
.entry nav { display: flex; justify-content: space-between; }
.notice { padding: 11px 14px; border-radius: 12px; background: var(--raised); }

/* telas menores */
@media (hover: none) {
  .tile .volume, .tile footer .icon-button, .place-more { opacity: 1; background: none; }
  .tile footer .icon-button { background: rgb(8 8 10 / .78); }
  .channel .place { padding-right: 34px; }
  .channel:hover > .place .badge { visibility: visible; }
  .tools { opacity: 1; pointer-events: auto; top: 0; right: 6px; background: none; border: 0; }
  .tools > :not(.more) { display: none; }
  .message { padding-right: 44px; }
}
@media (max-width: 1180px) {
  .center.staged:not(.solo) { grid-template: minmax(0, 1.3fr) minmax(0, 1fr) / minmax(0, 1fr); }
  .staged .chat { border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 1000px) {
  .panel { position: absolute; z-index: 2; right: 0; top: 52px; bottom: 0; width: min(300px, 100vw); box-shadow: -14px 0 40px rgb(0 0 0 / .35); }
  .place-view { position: relative; }
}
@media (max-width: 760px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .narrow { display: grid !important; }
  .back-call.narrow { display: flex !important; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 9px; background: var(--live); color: #06140d; font-weight: 500; font-size: 13px; white-space: nowrap; }
  .nav-wrap { position: fixed; z-index: 4; inset: 0 auto 0 0; width: min(330px, 88vw); grid-template-columns: 64px minmax(0, 1fr); visibility: hidden; translate: -100%; transition: translate .2s, visibility .2s; }
  .drawer .nav-wrap { visibility: visible; translate: 0; }
  .drawer .scrim { display: block; position: fixed; z-index: 3; inset: 0; background: rgb(0 0 0 / .6); }
  .bar { padding: 0 6px 0 8px; gap: 4px; }
  .bar h1 { flex: 0 1 auto; max-width: none; }
  .bar .topic, .bar .quiet span { display: none; }
  .message { padding-left: 60px; }
  .message .who, .message .side-time { left: 12px; }
  .composer-wrap { padding-inline: 10px; }
  .start, .bones { padding-inline: 14px; }
  .talk { flex: 1 0 100%; }
  .share { width: 46px; padding: 0; gap: 0; font-size: 0; }
  .stage { padding: 10px; }
  input, select, textarea, #draft { font-size: 16px !important; }
  dialog.page { width: 100vw; height: 100dvh; max-height: none; border: 0; border-radius: 0; }
  .sheet { padding: 16px; }
  .pages { grid-template: auto minmax(0, 1fr) / minmax(0, 1fr); gap: 12px; }
  .pages nav { display: flex; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
  .rows li { flex-wrap: wrap; }
  .rows li > .grow { flex: 1 0 55%; }
}
@media (prefers-reduced-motion: reduce) { *, ::before, ::after { transition: none !important; animation-duration: .01s !important; animation-iteration-count: 1 !important; } }
