:root {
  --bg: #120d1f;
  --bg2: #1b1330;
  --text: #f3eefc;
  --muted: rgba(243, 238, 252, 0.58);
  --line: rgba(255, 255, 255, 0.09);
  --glass: rgba(255, 255, 255, 0.07);
  --glass-strong: rgba(30, 22, 50, 0.72);
  --theirs: rgba(255, 255, 255, 0.085);
  --mine-a: #8b5cf6;
  --mine-b: #d9468f;
  --accent: #b17cff;
  --danger: #ff5f7e;
  --ok: #5fe0a5;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
  --radius: 20px;
  --blur: saturate(160%) blur(22px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f1fb;
    --bg2: #ece3f8;
    --text: #1d1430;
    --muted: rgba(29, 20, 48, 0.55);
    --line: rgba(29, 20, 48, 0.1);
    --glass: rgba(255, 255, 255, 0.6);
    --glass-strong: rgba(255, 255, 255, 0.78);
    --theirs: rgba(255, 255, 255, 0.82);
    --accent: #7c3aed;
    --shadow: 0 10px 30px rgba(60, 30, 110, 0.14);
    color-scheme: light;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  background-image:
    radial-gradient(60vmax 60vmax at 10% -10%, rgba(139, 92, 246, 0.28), transparent 60%),
    radial-gradient(50vmax 50vmax at 110% 110%, rgba(217, 70, 143, 0.22), transparent 60%),
    radial-gradient(40vmax 40vmax at 90% 10%, rgba(80, 120, 255, 0.12), transparent 60%);
  background-attachment: fixed;
  color: var(--text);
  font: 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Arabic", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  overscroll-behavior: none;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
button:disabled { cursor: default; opacity: 0.5; }
a { color: inherit; text-decoration: underline; text-underline-offset: 2px; word-break: break-word; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.tiny { font-size: 12px; }
.center { text-align: center; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.hidden-user { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.ic { width: 22px; height: 22px; fill: currentColor; flex: none; }

.logo-mark {
  width: 56px; height: 56px; border-radius: 18px; flex: none;
  background: linear-gradient(135deg, var(--mine-a), var(--mine-b));
  box-shadow: 0 8px 30px rgba(177, 124, 255, 0.4);
  position: relative;
}
.logo-mark::before, .logo-mark::after {
  content: ""; position: absolute; width: 38%; height: 38%; border-radius: 50%; top: 31%;
  background: rgba(255, 255, 255, 0.92);
}
.logo-mark::before { left: 18%; }
.logo-mark::after { right: 18%; background: rgba(255, 255, 255, 0.62); }
.logo-mark.small { width: 40px; height: 40px; border-radius: 14px; }
.logo-mark.big { width: 72px; height: 72px; border-radius: 24px; margin: 0 auto 8px; }
.splash { height: 100dvh; display: grid; place-items: center; }

/* ---------- cards, buttons, fields ---------- */
.card {
  background: var(--glass-strong);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--shadow);
}
.btn {
  height: 44px; padding: 0 18px; border-radius: 14px; font-weight: 600;
  background: var(--glass); border: 1px solid var(--line);
  transition: transform 0.12s ease, filter 0.15s ease;
}
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn.primary { background: linear-gradient(135deg, var(--mine-a), var(--mine-b)); color: #fff; border: 0; }
.btn.danger { background: rgba(255, 95, 126, 0.14); color: var(--danger); border-color: rgba(255, 95, 126, 0.3); }
.btn.ghost { background: var(--glass); }
.btn.wide { width: 100%; }
.btn.small { height: 34px; padding: 0 12px; font-size: 14px; border-radius: 11px; }
.link { color: var(--accent); font-size: 14px; padding: 6px; align-self: center; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.input {
  height: 46px; padding: 0 14px; border-radius: 14px; font-size: 16px;
  background: rgba(127, 127, 127, 0.1); border: 1px solid var(--line); color: var(--text); outline: none;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(177, 124, 255, 0.2); }
.error { color: var(--danger); font-size: 14px; margin: 0; min-height: 0; }
.error:empty { display: none; }
.check { display: flex; gap: 10px; align-items: center; font-size: 15px; }
.check input { width: 20px; height: 20px; accent-color: var(--mine-a); }
.code {
  font: 600 19px/1.5 ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: 0.04em;
  text-align: center; padding: 16px; border-radius: 16px; background: rgba(127, 127, 127, 0.12);
  border: 1px dashed var(--line); user-select: all; word-break: break-all;
}

/* ---------- sign-in screens ---------- */
.auth { height: 100dvh; overflow-y: auto; display: grid; place-items: center; padding: max(24px, var(--safe-t)) 16px max(24px, var(--safe-b)); }
.auth-card { width: min(420px, 100%); padding: 32px 26px 22px; display: flex; flex-direction: column; gap: 14px; }
.auth-card > .logo-mark { margin: 0 auto 4px; }
.auth-card h1 { margin: 0; text-align: center; font-size: 28px; letter-spacing: -0.02em; }
.auth-card > p { margin: 0; text-align: center; }
.lockline { display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 8px !important; }
.lockline .ic { width: 14px; height: 14px; }

/* ---------- chat layout ---------- */
.app { height: 100dvh; display: flex; flex-direction: column; position: relative; max-width: 900px; margin: 0 auto; }
.app.drop::after {
  content: "Drop to send"; position: absolute; inset: 10px; border: 2px dashed var(--accent); border-radius: 24px;
  display: grid; place-items: center; font-weight: 700; background: rgba(18, 13, 31, 0.6); z-index: 20;
}
.top {
  display: flex; align-items: center; gap: 8px; padding: calc(8px + var(--safe-t)) 10px 8px 12px;
  background: var(--glass-strong); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--line); z-index: 5;
}
.peer { display: flex; align-items: center; gap: 11px; flex: 1; min-width: 0; text-align: left; padding: 4px; border-radius: 14px; }
.who { min-width: 0; }
.name { font-weight: 700; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status.on { color: var(--ok); }
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; }
.avatar.letter { display: grid; place-items: center; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--mine-a), var(--mine-b)); }
.avatar.huge { width: 88px; height: 88px; font-size: 34px; }
.icon-btn { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; flex: none; color: var(--text); }
.icon-btn:hover:not(:disabled) { background: var(--glass); }
.icon-btn.small { width: 32px; height: 32px; }
.icon-btn.small .ic { width: 18px; height: 18px; }
.icon-btn.danger { color: var(--danger); }

.list { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 8px 10px 14px; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.older { text-align: center; font-size: 13px; color: var(--muted); min-height: 8px; }
.msgs { display: flex; flex-direction: column; }
.empty { text-align: center; padding: 18vh 24px 0; }
.empty.soft { padding-top: 30vh; }
.day { text-align: center; margin: 14px 0 8px; position: sticky; top: 4px; z-index: 2; pointer-events: none; }
.day span {
  display: inline-block; font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 999px;
  background: var(--glass-strong); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); color: var(--muted);
}

.msg { display: flex; flex-direction: column; max-width: min(78%, 560px); position: relative; margin-top: 2px; }
.msg.first { margin-top: 10px; }
.msg.mine { align-self: flex-end; align-items: flex-end; }
.msg.theirs { align-self: flex-start; align-items: flex-start; }
.bubble {
  position: relative; padding: 8px 12px 6px; border-radius: var(--radius); min-width: 64px; max-width: 100%;
  overflow-wrap: anywhere; user-select: text; -webkit-user-select: text; -webkit-touch-callout: none;
}
.theirs .bubble {
  background: var(--theirs); border: 1px solid var(--line);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
}
.mine .bubble { background: linear-gradient(135deg, var(--mine-a), var(--mine-b)); color: #fff; }
.mine .bubble a { color: #fff; }
.mine:not(.last) .bubble { border-bottom-right-radius: 7px; }
.mine:not(.first) .bubble { border-top-right-radius: 7px; }
.theirs:not(.last) .bubble { border-bottom-left-radius: 7px; }
.theirs:not(.first) .bubble { border-top-left-radius: 7px; }
.bubble.clear { background: none !important; border: 0 !important; backdrop-filter: none; -webkit-backdrop-filter: none; padding: 0 2px; }
.bubble.clear .meta { color: var(--muted); }
.bubble.deleted { font-style: italic; opacity: 0.75; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.bubble.deleted .ic { width: 16px; height: 16px; }
.mine .bubble.deleted { background: var(--glass); color: var(--text); border: 1px solid var(--line); }
.text { white-space: pre-wrap; font-size: 16px; }
.text.jumbo { font-size: 42px; line-height: 1.15; }
.meta { display: flex; gap: 6px; justify-content: flex-end; font-size: 11px; opacity: 0.72; margin-top: 2px; white-space: nowrap; }
.meta .fail { color: #ffd0d8; font-weight: 700; opacity: 1; }
.theirs .meta .fail { color: var(--danger); }
.meta .status:empty { display: none; }
.msg.flash .bubble { animation: flash 1.2s ease; }
@keyframes flash { 30% { box-shadow: 0 0 0 4px var(--accent); } }

.quote {
  display: flex; flex-direction: column; font-size: 13px; padding: 6px 10px; margin: 2px -4px 6px; border-radius: 12px;
  background: rgba(0, 0, 0, 0.16); border-left: 3px solid rgba(255, 255, 255, 0.7); cursor: pointer; max-width: 100%;
}
.theirs .quote { background: rgba(127, 127, 127, 0.14); border-left-color: var(--accent); }
.quote span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: 0.85; }

.reacts { display: flex; gap: 4px; margin-top: -6px; padding: 0 8px; z-index: 1; flex-wrap: wrap; }
.react {
  font-size: 15px; padding: 1px 7px; border-radius: 999px; background: var(--glass-strong); border: 1px solid var(--line);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); display: flex; gap: 3px; align-items: center;
}
.react.mine { border-color: var(--accent); }
.react small { font-size: 11px; color: var(--muted); }

.more {
  position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; color: var(--muted); opacity: 0; transition: opacity 0.15s;
}
.mine .more { left: -36px; }
.theirs .more { right: -36px; }
.more .ic { width: 18px; height: 18px; }
@media (hover: hover) { .msg:hover .more { opacity: 1; } .more:hover { background: var(--glass); } }
@media (hover: none) { .more { display: none; } }

/* attachments */
.atts { display: flex; flex-direction: column; gap: 6px; margin: 2px -6px 4px; }
.bubble.media-only { padding: 4px; }
.bubble.media-only .atts { margin: 0; }
.bubble.media-only .meta {
  position: absolute; right: 12px; bottom: 10px; background: rgba(0, 0, 0, 0.45); color: #fff; padding: 2px 7px; border-radius: 999px; opacity: 1;
}
.grid { display: grid; gap: 3px; border-radius: 16px; overflow: hidden; width: min(300px, 64vw); }
.grid.n2, .grid.n3, .grid.n4 { grid-template-columns: 1fr 1fr; }
.grid.n2 .att.media, .grid.n3 .att.media, .grid.n4 .att.media { aspect-ratio: 1 !important; }
.grid.n3 .att.media:first-child { grid-column: span 2; aspect-ratio: 2 !important; }
.att.media { position: relative; display: block; width: 100%; overflow: hidden; background: rgba(0, 0, 0, 0.25); }
.att.media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.att.media img.thumb { filter: blur(6px); transform: scale(1.06); }
.att.media img.none { visibility: hidden; }
.att.media.broken::after { content: "Couldn't load"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; background: rgba(0, 0, 0, 0.4); color: #fff; }
.play { position: absolute; inset: 0; display: grid; place-items: center; }
.play .ic { width: 54px; height: 54px; padding: 13px; border-radius: 50%; background: rgba(0, 0, 0, 0.5); color: #fff; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.dur { position: absolute; left: 8px; bottom: 8px; font-size: 12px; color: #fff; background: rgba(0, 0, 0, 0.5); padding: 1px 6px; border-radius: 6px; }
.loadbar { position: absolute; left: 10px; right: 10px; bottom: 10px; height: 4px; border-radius: 4px; background: rgba(0, 0, 0, 0.4); overflow: hidden; }
.loadbar i { display: block; height: 100%; width: 0; background: #fff; transition: width 0.2s; }

.att.voice { display: flex; align-items: center; gap: 10px; padding: 4px 6px; width: min(260px, 62vw); }
.play-btn { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none; background: rgba(255, 255, 255, 0.22); }
.theirs .play-btn { background: linear-gradient(135deg, var(--mine-a), var(--mine-b)); color: #fff; }
.play-btn.spin { animation: pulse 0.9s infinite; }
.track { flex: 1; height: 26px; display: flex; align-items: center; cursor: pointer; position: relative; }
.track::before { content: ""; position: absolute; left: 0; right: 0; height: 4px; border-radius: 4px; background: currentColor; opacity: 0.25; }
.track i { position: relative; height: 4px; border-radius: 4px; background: currentColor; width: 0; }
.time { font-size: 12px; opacity: 0.8; min-width: 34px; text-align: right; font-variant-numeric: tabular-nums; }

.att.file { display: flex; align-items: center; gap: 10px; text-align: left; padding: 8px; border-radius: 14px; background: rgba(0, 0, 0, 0.14); width: min(280px, 64vw); }
.theirs .att.file { background: rgba(127, 127, 127, 0.12); }
.file-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.18); flex: none; }
.file-txt { display: flex; flex-direction: column; min-width: 0; }
.file-txt b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-txt small { font-size: 12px; opacity: 0.75; }

.typing-bubble {
  display: inline-flex; gap: 4px; padding: 12px 14px; margin-top: 10px; border-radius: var(--radius);
  background: var(--theirs); border: 1px solid var(--line); width: max-content;
}
.typing-bubble span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: dot 1.2s infinite; }
.typing-bubble span:nth-child(2) { animation-delay: 0.15s; }
.typing-bubble span:nth-child(3) { animation-delay: 0.3s; }
@keyframes dot { 0%, 60%, 100% { transform: translateY(0); opacity: 0.5; } 30% { transform: translateY(-4px); opacity: 1; } }
@keyframes pulse { 50% { opacity: 0.4; } }

.jump {
  position: absolute; right: 14px; bottom: calc(86px + var(--safe-b)); width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; background: var(--glass-strong); border: 1px solid var(--line); box-shadow: var(--shadow);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); z-index: 4;
}
.jump-count:not(:empty) {
  position: absolute; top: -6px; right: -4px; min-width: 20px; height: 20px; border-radius: 10px; padding: 0 5px;
  font-size: 12px; font-weight: 700; display: grid; place-items: center; color: #fff; background: var(--mine-b);
}

/* composer */
.composer {
  padding: 8px 10px calc(8px + var(--safe-b)); background: var(--glass-strong);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border-top: 1px solid var(--line); z-index: 5;
}
.compose-row { flex-wrap: nowrap; gap: 6px; align-items: flex-end; }
.compose {
  flex: 1; min-width: 0; resize: none; border: 1px solid var(--line); outline: none; border-radius: 22px;
  padding: 10px 16px; font-size: 16px; line-height: 1.35; max-height: 160px; overflow-y: hidden; background: rgba(127, 127, 127, 0.1); color: var(--text);
}
.compose:focus { border-color: rgba(177, 124, 255, 0.6); }
.icon-btn.action { background: var(--glass); }
.icon-btn.action.send { background: linear-gradient(135deg, var(--mine-a), var(--mine-b)); color: #fff; }
.composer.recording .compose-row { display: none; }
.replybar { display: flex; align-items: center; gap: 10px; padding: 4px 4px 8px 8px; color: var(--accent); }
.rb-text { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13px; color: var(--text); }
.rb-text b { color: var(--accent); }
.rb-text span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--muted); }
.tray { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; }
.chip { display: flex; align-items: center; gap: 8px; padding: 4px 4px 4px 4px; border-radius: 14px; background: var(--glass); border: 1px solid var(--line); flex: none; max-width: 220px; }
.chip img, .chip .file-ic { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; }
.chip span { font-size: 13px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.recbar { display: flex; align-items: center; gap: 10px; height: 44px; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); animation: pulse 1s infinite; }
.rec-time { font-variant-numeric: tabular-nums; min-width: 44px; }
.meter { flex: 1; height: 6px; border-radius: 6px; background: rgba(127, 127, 127, 0.2); overflow: hidden; }
.meter i { display: block; height: 100%; width: 100%; transform-origin: left; transform: scaleX(0.05); background: linear-gradient(90deg, var(--mine-a), var(--mine-b)); transition: transform 0.1s; }

/* ---------- layers (dialogs, sheets, viewer): block everything behind, tap outside closes ---------- */
.layer {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px;
  background: rgba(8, 5, 16, 0.45); opacity: 0; transition: opacity 0.2s ease;
}
.layer.show { opacity: 1; }
.layer.dark { background: rgba(0, 0, 0, 0.92); padding: 0; }
.layer.bottom { align-items: end; padding: 0 0 0 0; }
.layer.side { place-items: stretch end; padding: 0; }
.dialog { width: min(400px, 100%); padding: 22px; display: flex; flex-direction: column; gap: 12px; transform: scale(0.96); transition: transform 0.2s ease; }
.layer.show .dialog { transform: none; }
.dialog h3 { margin: 0; font-size: 19px; }
.dialog p { margin: 0; }
.sheet {
  width: min(480px, 100%); margin: 0 auto; padding: 14px 14px calc(14px + var(--safe-b)); border-radius: 26px 26px 0 0;
  transform: translateY(30px); transition: transform 0.22s ease; display: flex; flex-direction: column; gap: 10px;
}
.layer.show .sheet { transform: none; }
@media (min-width: 700px) { .layer.bottom { align-items: center; } .sheet { border-radius: 26px; } }
.emoji-row { display: flex; justify-content: space-between; gap: 4px; }
.emoji { font-size: 26px; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; transition: transform 0.1s; }
.emoji:active { transform: scale(1.25); }
.emoji.on { background: rgba(177, 124, 255, 0.25); }
.emoji.plus { font-size: 24px; color: var(--muted); background: var(--glass); }
.emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 2px; max-height: 200px; overflow-y: auto; }
.action-list { display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: rgba(127, 127, 127, 0.08); }
.action-item { display: flex; align-items: center; gap: 14px; padding: 14px 16px; text-align: left; font-size: 16px; }
.action-item + .action-item { border-top: 1px solid var(--line); }
.action-item:active, .action-item:hover { background: var(--glass); }
.action-item.danger { color: var(--danger); }

.viewer { width: 100%; height: 100%; display: flex; flex-direction: column; }
.viewer-bar { display: flex; justify-content: flex-end; gap: 6px; padding: calc(8px + var(--safe-t)) 10px 8px; color: #fff; }
.viewer-bar .icon-btn { color: #fff; }
.stage { flex: 1; min-height: 0; display: grid; place-items: center; padding: 0 0 var(--safe-b); }
.stage img, .stage video { max-width: 100%; max-height: 100%; object-fit: contain; }
.spinner { width: 36px; height: 36px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.2); border-top-color: #fff; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.settings { width: min(440px, 100vw); height: 100%; border-radius: 0; display: flex; flex-direction: column; transform: translateX(30px); transition: transform 0.22s ease; border-width: 0 0 0 1px; }
.layer.show .settings { transform: none; }
.settings-head { display: flex; align-items: center; justify-content: space-between; padding: calc(12px + var(--safe-t)) 12px 8px 20px; }
.settings-head h3 { margin: 0; font-size: 22px; }
.settings-body { overflow-y: auto; padding: 0 20px calc(24px + var(--safe-b)); display: flex; flex-direction: column; gap: 6px; }
.set { display: flex; flex-direction: column; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.set:last-child { border: 0; }
.set h4 { margin: 0; font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.set h4:empty { display: none; }
.set p { margin: 0; font-size: 14px; }
.profile-row { display: flex; gap: 16px; align-items: flex-start; }
.avatar-pick { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; color: var(--accent); }
.devices { display: flex; flex-direction: column; gap: 8px; }
.device { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: rgba(127, 127, 127, 0.08); }
.device b { display: block; font-size: 14px; }
.device small { font-size: 12px; }
.safety { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; font: 600 18px ui-monospace, Menlo, Consolas, monospace; text-align: center; }
.safety span { padding: 8px 0; border-radius: 10px; background: rgba(127, 127, 127, 0.12); }
.peer-card { align-items: center; text-align: center; }

.toast {
  position: fixed; left: 50%; bottom: calc(96px + var(--safe-b)); transform: translate(-50%, 20px); opacity: 0; z-index: 100;
  max-width: min(92vw, 420px); padding: 10px 16px; border-radius: 14px; font-size: 14px; text-align: center;
  background: var(--glass-strong); border: 1px solid var(--line); box-shadow: var(--shadow);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); transition: opacity 0.2s, transform 0.2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) { * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } }
