:root {
  color-scheme: dark;
  --bg: #080a10;
  --panel: rgba(15, 18, 28, 0.94);
  --panel-solid: #0f121c;
  --panel-raised: #151927;
  --field: #111521;
  --line: rgba(255, 255, 255, 0.075);
  --line-strong: rgba(255, 255, 255, 0.13);
  --text: #f4f6fb;
  --muted: #929aad;
  --muted-strong: #b5bdcc;
  --accent: #8b7cff;
  --accent-bright: #a99dff;
  --accent-soft: rgba(139, 124, 255, 0.14);
  --teal: #59e1c2;
  --danger: #ff758c;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.46);
  --radius: 18px;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% -20%, rgba(139, 124, 255, 0.13), transparent 34%),
    radial-gradient(circle at 95% 105%, rgba(53, 205, 184, 0.08), transparent 30%),
    var(--bg);
  color: var(--text);
  font: 14px/1.5 Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }

.ambient { position: fixed; width: 360px; height: 360px; border-radius: 50%; filter: blur(100px); opacity: .12; pointer-events: none; }
.ambient--one { left: -180px; top: 20%; background: var(--accent); }
.ambient--two { right: -180px; bottom: 2%; background: var(--teal); }

[hidden] { display: none !important; }

.loading-screen {
  position: fixed;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  background: var(--bg);
  z-index: 100;
  transition: opacity .28s ease;
}
.loading-screen.is-leaving { opacity: 0; pointer-events: none; }
.loading-screen strong { margin-top: 12px; font-size: 22px; letter-spacing: -.03em; }
.loading-screen p { color: var(--muted); margin: 0; }

.brand-mark {
  position: relative;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 11px;
  background: linear-gradient(145deg, #9a8cff, #6d5ce8);
  box-shadow: 0 9px 22px rgba(103, 86, 224, .26), inset 0 1px 0 rgba(255,255,255,.3);
}
.brand-mark span { position: absolute; display: block; width: 7px; height: 7px; background: white; border-radius: 50%; top: 10px; }
.brand-mark span:first-child { left: 8px; }
.brand-mark span:last-child { right: 8px; }
.brand-mark::after { content: ""; position: absolute; left: 9px; right: 9px; bottom: 8px; height: 5px; border: 2px solid white; border-top: 0; border-radius: 0 0 8px 8px; }
.brand-mark--large { width: 58px; height: 58px; border-radius: 18px; animation: breathe 1.8s ease-in-out infinite; }
.brand-mark--large span { width: 9px; height: 9px; top: 17px; }
.brand-mark--large span:first-child { left: 14px; }
.brand-mark--large span:last-child { right: 14px; }
.brand-mark--large::after { left: 16px; right: 16px; bottom: 14px; height: 8px; }
@keyframes breathe { 50% { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(103, 86, 224, .34); } }

.app-shell {
  position: relative;
  width: min(1540px, calc(100vw - 24px));
  height: min(960px, calc(100vh - 24px));
  margin: 12px auto;
  display: grid;
  grid-template-columns: 250px minmax(420px, 1fr) 286px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background: rgba(9, 11, 17, .82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}

.sidebar, .people-panel { background: var(--panel); min-width: 0; }
.sidebar { display: flex; flex-direction: column; border-right: 1px solid var(--line); padding: 18px 12px 12px; }
.brand-row { height: 48px; display: flex; align-items: center; gap: 11px; padding: 0 6px 14px; }
.brand-row > div:nth-child(2) { display: flex; flex-direction: column; line-height: 1.05; }
.brand-row strong { font-size: 18px; letter-spacing: -.035em; }
.brand-row small { margin-top: 5px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .2em; }

.sidebar-section-row { display: flex; align-items: center; justify-content: space-between; margin: 20px 5px 8px 11px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.icon-button {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--muted-strong);
  font-size: 19px;
  cursor: pointer;
  transition: .18s ease;
}
.icon-button:hover { border-color: var(--line); background: rgba(255,255,255,.045); color: var(--text); }
.sidebar-section-row .icon-button { width: 27px; height: 27px; font-size: 18px; }

.channel-list { display: flex; flex-direction: column; gap: 3px; overflow-y: auto; }
.channel-button {
  width: 100%;
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: var(--muted-strong);
  text-align: left;
  cursor: pointer;
  transition: .16s ease;
}
.channel-button:hover { background: rgba(255,255,255,.035); color: var(--text); }
.channel-button.active { background: var(--accent-soft); color: #eae7ff; border-color: rgba(139,124,255,.16); }
.channel-button .hash { color: #737b8d; font-size: 18px; text-align: center; }
.channel-button.active .hash { color: var(--accent-bright); }
.channel-button strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 650; }
.channel-button .lock { color: var(--muted); font-size: 11px; }
.unread-badge { min-width: 18px; height: 18px; padding: 0 5px; display: grid; place-items: center; border-radius: 20px; background: var(--accent); color: white; font-size: 10px; font-weight: 800; }

.sidebar-spacer { flex: 1; }
.download-card, .identity-card { border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.025); }
.download-card { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px; margin-bottom: 8px; color: var(--text); text-decoration: none; text-align: left; font: inherit; cursor: pointer; transition: .18s ease; }
.download-card:hover { background: rgba(255,255,255,.05); border-color: rgba(139,124,255,.28); }
.download-card > span:nth-child(2), .identity-copy { min-width: 0; display: flex; flex: 1; flex-direction: column; }
.download-card strong, .identity-card strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.download-card small, .identity-card small { color: var(--muted); font-size: 10px; }
.download-icon { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 9px; background: var(--accent-soft); color: var(--accent-bright); font-weight: 800; }
.download-app-icon { width: 29px; height: 29px; flex: 0 0 auto; object-fit: contain; }
.identity-card { width: 100%; display: flex; align-items: center; gap: 9px; padding: 9px; text-align: left; cursor: pointer; color: var(--text); }
.identity-card:hover { background: rgba(255,255,255,.045); }

.avatar { width: 34px; height: 34px; display: inline-grid; place-items: center; flex: 0 0 auto; border-radius: 11px; background: linear-gradient(145deg, #353b52, #24293b); border: 1px solid rgba(255,255,255,.1); color: #fff; font-size: 12px; font-weight: 800; text-transform: uppercase; box-shadow: inset 0 1px 0 rgba(255,255,255,.07); }
.presence-dot { width: 8px; height: 8px; border-radius: 50%; box-shadow: 0 0 0 3px var(--panel-solid); }
.presence-dot--online { background: var(--teal); }
.presence-dot--offline { background: #4e5565; }

.chat-panel {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 68px minmax(0, 1fr) auto;
  overflow: hidden;
  background: rgba(10, 12, 19, .78);
}
.chat-header { display: flex; align-items: center; gap: 10px; padding: 0 20px; border-bottom: 1px solid var(--line); background: rgba(13,16,25,.75); backdrop-filter: blur(16px); z-index: 3; }
.channel-symbol { color: var(--accent-bright); font-size: 22px; font-weight: 500; }
.channel-heading { display: flex; flex-direction: column; min-width: 0; }
.channel-heading strong { font-size: 15px; letter-spacing: -.01em; }
.channel-heading small { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.connection-pill { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; }
.connection-pill i { width: 6px; height: 6px; border-radius: 50%; background: #d3a446; box-shadow: 0 0 10px rgba(211,164,70,.35); }
.connection-pill.online i { background: var(--teal); box-shadow: 0 0 10px rgba(89,225,194,.42); }
.connection-pill.offline i { background: var(--danger); }

.secondary-button, .primary-button { border: 0; border-radius: 10px; cursor: pointer; font-weight: 750; transition: .18s ease; }
.secondary-button { padding: 8px 12px; background: rgba(255,255,255,.055); color: var(--muted-strong); border: 1px solid var(--line); font-size: 11px; }
.secondary-button:hover { background: rgba(255,255,255,.09); color: white; }
.primary-button { min-height: 42px; padding: 0 18px; color: white; background: linear-gradient(135deg, #8d7eff, #7262ec); box-shadow: 0 10px 24px rgba(114,98,236,.22); }
.primary-button:hover { filter: brightness(1.08); transform: translateY(-1px); }

.message-scroller {
  min-height: 0;
  overflow-y: scroll;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(169, 157, 255, .52) rgba(255, 255, 255, .035);
}
.message-scroller::-webkit-scrollbar { width: 12px; }
.message-scroller::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, .025);
  border-left: 1px solid rgba(255, 255, 255, .025);
}
.message-scroller::-webkit-scrollbar-thumb {
  min-height: 54px;
  border: 3px solid transparent;
  border-radius: 20px;
  background: rgba(169, 157, 255, .48);
  background-clip: padding-box;
}
.message-scroller::-webkit-scrollbar-thumb:hover {
  border: 2px solid transparent;
  background: rgba(185, 176, 255, .72);
  background-clip: padding-box;
}
.message-list { padding: 26px 22px 20px; }
.empty-state { padding: 60px 28px 20px; }
.empty-symbol { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 17px; background: var(--accent-soft); color: var(--accent-bright); font-size: 27px; font-weight: 700; }
.empty-state h1 { margin: 18px 0 5px; font-size: 25px; letter-spacing: -.035em; }
.empty-state p { margin: 0; color: var(--muted); }

.message { position: relative; display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 11px; padding: 6px 10px 8px; margin: 0 -10px 9px; border-radius: 12px; }
.message:hover { background: rgba(255,255,255,.018); }
.message .avatar { margin-top: 1px; }
.message-main { min-width: 0; }
.message-meta { display: flex; align-items: baseline; gap: 7px; min-height: 21px; }
.message-author { padding: 0; border: 0; background: none; color: #edf0f7; font-weight: 750; cursor: pointer; }
.message-author:hover { color: var(--accent-bright); }
.message-author.guest { cursor: default; }
.message-time { color: #697184; font-size: 10px; }
.message-delete { display: none; margin-left: auto; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 10px; }
.message:hover .message-delete { display: inline; }
.message-delete:hover { color: var(--danger); }
.message-body { color: #dbe0eb; overflow-wrap: anywhere; }
.message-body > :first-child { margin-top: 0; }
.message-body > :last-child { margin-bottom: 0; }
.message-body p { margin: 1px 0 5px; }
.message-body h3, .message-body h4, .message-body h5 { margin: 8px 0 4px; line-height: 1.25; }
.message-body h3 { font-size: 18px; }
.message-body h4 { font-size: 16px; }
.message-body h5 { font-size: 14px; }
.message-body a { color: #9fbeff; }
.message-body code { padding: 2px 5px; border: 1px solid var(--line); border-radius: 5px; background: #0a0d14; color: #d8d1ff; font: 12px/1.5 Consolas, monospace; }
.message-body pre { max-width: 100%; overflow-x: auto; padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; background: #080a10; }
.message-body pre code { padding: 0; border: 0; background: none; }
.message-body blockquote { margin: 5px 0; padding-left: 11px; border-left: 3px solid var(--accent); color: var(--muted-strong); }
.message-body ul, .message-body ol { margin: 4px 0 6px; padding-left: 22px; }

.media-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 290px)); gap: 7px; margin-top: 8px; }
.media-item { position: relative; overflow: hidden; min-width: 0; border: 1px solid var(--line); border-radius: 11px; background: #090b11; }
.media-item img { display: block; width: 100%; max-height: 330px; object-fit: cover; background: #080a0f; }
.media-item--video {
  grid-column: 1 / -1;
  width: min(100%, 900px);
  background: #050609;
}
.media-item--video video {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(72vh, 760px);
  object-fit: contain;
  background: #050609;
}
.media-item--file { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; max-width: 420px; padding: 10px 12px; color: var(--text); text-decoration: none; }
.media-item--file:hover { border-color: rgba(139,124,255,.3); background: var(--accent-soft); }
.file-glyph { width: 32px; height: 36px; display: grid; place-items: center; border-radius: 7px; background: var(--accent-soft); color: var(--accent-bright); font-size: 10px; font-weight: 800; }
.file-copy { min-width: 0; display: flex; flex-direction: column; }
.file-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.file-copy small { color: var(--muted); font-size: 10px; }

.composer-wrap { position: relative; padding: 8px 20px 14px; background: linear-gradient(180deg, rgba(10,12,19,0), rgba(10,12,19,.98) 24%); z-index: 4; }
.composer { min-height: 50px; display: grid; grid-template-columns: 40px minmax(0, 1fr) 38px; align-items: end; gap: 4px; padding: 5px; border: 1px solid var(--line-strong); border-radius: 15px; background: var(--field); box-shadow: 0 10px 35px rgba(0,0,0,.16); transition: .18s ease; }
.composer:focus-within { border-color: rgba(139,124,255,.42); box-shadow: 0 0 0 3px rgba(139,124,255,.08), 0 12px 38px rgba(0,0,0,.2); }
.attach-button, .send-button { width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 10px; cursor: pointer; }
.attach-button { color: var(--muted-strong); background: rgba(255,255,255,.04); font-size: 20px; }
.attach-button:hover { color: white; background: rgba(255,255,255,.08); }
.send-button { color: white; background: linear-gradient(145deg, #8d7eff, #6e5fe4); font-size: 19px; font-weight: 700; box-shadow: 0 6px 16px rgba(110,95,228,.23); }
.send-button:disabled { opacity: .35; cursor: default; box-shadow: none; }
#message-input { align-self: stretch; width: 100%; max-height: 150px; resize: none; overflow-y: auto; padding: 9px 8px 7px; border: 0; outline: 0; background: transparent; color: var(--text); line-height: 1.45; }
#message-input::placeholder { color: #697184; }
.composer-note { display: flex; justify-content: space-between; padding: 5px 4px 0; color: #5e6575; font-size: 9px; }
.upload-strip { display: flex; gap: 7px; overflow-x: auto; padding: 0 2px 8px; }
.upload-chip { position: relative; min-width: 160px; max-width: 230px; display: flex; align-items: center; gap: 7px; padding: 7px 28px 7px 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-raised); }
.upload-chip.uploading { background: linear-gradient(90deg, var(--panel-raised), rgba(139,124,255,.16), var(--panel-raised)); background-size: 220% 100%; animation: upload 1.4s linear infinite; }
@keyframes upload { to { background-position: -220% 0; } }
.upload-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.upload-chip button { position: absolute; right: 5px; top: 5px; width: 20px; height: 20px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; }
.upload-chip button:hover { background: rgba(255,255,255,.07); color: white; }
.drop-overlay { position: absolute; inset: 68px 0 0; display: grid; place-items: center; z-index: 20; background: rgba(8,10,16,.83); backdrop-filter: blur(8px); pointer-events: none; }
.drop-overlay > div { width: min(420px, calc(100% - 40px)); display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 38px; border: 2px dashed rgba(139,124,255,.46); border-radius: 22px; background: rgba(139,124,255,.08); }
.drop-overlay span { font-size: 36px; color: var(--accent-bright); }
.drop-overlay strong { font-size: 18px; }
.drop-overlay small { color: var(--muted); }

.people-panel { display: flex; flex-direction: column; border-left: 1px solid var(--line); padding: 18px 14px 14px; }
.people-header { min-height: 42px; display: flex; align-items: flex-start; justify-content: space-between; padding: 0 2px 12px 5px; border-bottom: 1px solid var(--line); }
.people-header > div { display: flex; flex-direction: column; }
.people-header strong { font-size: 14px; }
.people-header small { color: var(--muted); font-size: 10px; }
.friend-form { display: grid; grid-template-columns: 1fr 33px; gap: 5px; margin: 12px 0 5px; }
.friend-form input { min-width: 0; height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; outline: 0; background: var(--field); color: var(--text); font-size: 11px; }
.friend-form input:focus { border-color: rgba(139,124,255,.4); }
.friend-form button { border: 0; border-radius: 9px; background: var(--accent-soft); color: var(--accent-bright); cursor: pointer; }
.people-content { flex: 1; overflow-y: auto; padding-top: 10px; }
.people-group-title { margin: 13px 5px 6px; color: #6f7789; font-size: 9px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.person-row { width: 100%; display: flex; align-items: center; gap: 9px; padding: 7px; border: 0; border-radius: 10px; background: transparent; color: var(--text); text-align: left; cursor: pointer; }
.person-row:hover { background: rgba(255,255,255,.035); }
.person-row .avatar { width: 31px; height: 31px; border-radius: 10px; }
.person-copy { min-width: 0; display: flex; flex: 1; flex-direction: column; }
.person-copy strong, .person-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-copy strong { font-size: 11px; }
.person-copy small { color: var(--muted); font-size: 9px; }
.person-actions { display: flex; gap: 3px; }
.person-actions button { width: 25px; height: 25px; border: 0; border-radius: 7px; background: rgba(255,255,255,.05); color: var(--muted-strong); cursor: pointer; }
.person-actions button:hover { background: var(--accent-soft); color: var(--accent-bright); }
.account-nudge { padding: 16px; border: 1px solid rgba(139,124,255,.18); border-radius: 14px; background: linear-gradient(145deg, rgba(139,124,255,.1), rgba(89,225,194,.035)); }
.account-nudge .nudge-icon { color: var(--accent-bright); font-size: 21px; }
.account-nudge strong { display: block; margin-top: 7px; font-size: 13px; }
.account-nudge p { margin: 4px 0 13px; color: var(--muted); font-size: 10px; }
.account-nudge .primary-button { width: 100%; min-height: 36px; font-size: 11px; }

.modal { width: min(450px, calc(100vw - 28px)); padding: 27px; border: 1px solid var(--line-strong); border-radius: 20px; outline: 0; background: #111521; color: var(--text); box-shadow: 0 34px 100px rgba(0,0,0,.6); }
.modal::backdrop { background: rgba(3,4,8,.72); backdrop-filter: blur(7px); }
.modal-close { position: absolute; top: 14px; right: 14px; width: 31px; height: 31px; border: 0; border-radius: 9px; background: rgba(255,255,255,.04); color: var(--muted); cursor: pointer; font-size: 18px; }
.modal-close:hover { background: rgba(255,255,255,.08); color: white; }
.modal-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; color: var(--muted-strong); font-weight: 750; }
.modal h2 { margin: 0; font-size: 24px; line-height: 1.15; letter-spacing: -.035em; }
.modal-lead { margin: 7px 0 20px; color: var(--muted); }
.modal-kicker { margin-bottom: 8px; color: var(--accent-bright); font-size: 10px; font-weight: 850; letter-spacing: .12em; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 11px; background: #090c13; }
.segmented button { height: 35px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; font-size: 11px; font-weight: 700; }
.segmented button.active { background: var(--panel-raised); color: var(--text); box-shadow: 0 5px 14px rgba(0,0,0,.2); }
.modal-form { display: flex; flex-direction: column; gap: 12px; margin-top: 17px; }
.modal-form label { display: flex; flex-direction: column; gap: 5px; color: var(--muted-strong); font-size: 10px; font-weight: 700; }
.modal-form input, .modal-form textarea, .modal-form select { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; outline: 0; background: #0b0e16; color: var(--text); resize: vertical; }
.modal-form input:focus, .modal-form textarea:focus, .modal-form select:focus { border-color: rgba(139,124,255,.46); box-shadow: 0 0 0 3px rgba(139,124,255,.08); }
.form-error { min-height: 16px; margin: -3px 0; color: var(--danger); font-size: 10px; }
.profile-hero { display: flex; align-items: center; gap: 14px; margin: 8px 0 18px; }
.avatar--hero { width: 58px; height: 58px; border-radius: 18px; font-size: 19px; background: linear-gradient(145deg, #7163e6, #3f4667); }
.profile-hero h2 { margin: 0; }
.profile-hero p { margin: 3px 0 0; color: var(--muted); }
.profile-status { display: inline-block; margin: 0 0 11px; padding: 5px 9px; border-radius: 8px; background: rgba(89,225,194,.08); color: #8de9d4; font-size: 11px; }
.profile-bio { min-height: 35px; margin: 0 0 15px; color: var(--muted-strong); }

.toast-stack { position: fixed; right: 24px; bottom: 24px; z-index: 200; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; pointer-events: none; }
.toast { max-width: 360px; padding: 10px 13px; border: 1px solid var(--line-strong); border-radius: 10px; background: #171b28; color: var(--text); box-shadow: 0 14px 38px rgba(0,0,0,.32); font-size: 11px; animation: toast-in .2s ease both; }
.toast.error { border-color: rgba(255,117,140,.24); color: #ffc1cb; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

.mobile-only { display: none; }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.09); border: 3px solid transparent; background-clip: padding-box; border-radius: 20px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.16); border: 2px solid transparent; background-clip: padding-box; }

@media (max-width: 1080px) {
  .app-shell { grid-template-columns: 230px minmax(400px, 1fr); }
  .people-panel { position: absolute; z-index: 30; right: 0; top: 0; bottom: 0; width: 286px; box-shadow: -20px 0 55px rgba(0,0,0,.38); transform: translateX(105%); transition: transform .22s ease; }
  .people-panel.open { transform: translateX(0); }
}

@media (max-width: 740px) {
  body { overflow: hidden; }
  .app-shell { width: 100vw; height: 100dvh; margin: 0; grid-template-columns: 1fr; border: 0; border-radius: 0; }
  .sidebar { position: absolute; z-index: 40; left: 0; top: 0; bottom: 0; width: min(280px, 88vw); box-shadow: 24px 0 70px rgba(0,0,0,.48); transform: translateX(-105%); transition: transform .22s ease; }
  .sidebar.open { transform: translateX(0); }
  .mobile-only { display: inline-grid; }
  .brand-row .mobile-only { margin-left: auto; }
  .chat-header { padding: 0 12px; }
  .connection-pill span { display: none; }
  .channel-heading small { max-width: 38vw; }
  .message-list { padding: 20px 12px 14px; }
  .composer-wrap { padding: 8px 10px 10px; }
  .media-grid { grid-template-columns: 1fr; }
  .people-panel { width: min(300px, 92vw); }
}
