/* Azad Chat. Everything is self-hosted: the font ships with the app. */

@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/vazirmatn-arabic-400-normal.woff2) format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/vazirmatn-arabic-500-normal.woff2) format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../fonts/vazirmatn-arabic-700-normal.woff2) format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/vazirmatn-latin-400-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/vazirmatn-latin-500-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../fonts/vazirmatn-latin-700-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --brand-1: #4F46E5;
  --brand-2: #2F5BEA;
  --brand-3: #0EA5E9;
  --brand: linear-gradient(135deg, var(--brand-1), var(--brand-2) 55%, var(--brand-3));
  --accent: #6D6AF5;
  --accent-soft: rgba(99, 102, 241, .16);
  --danger: #F43F5E;
  --danger-soft: rgba(244, 63, 94, .14);
  --ok: #10B981;
  --warn: #F59E0B;

  --bg: #070B16;
  --bg-2: #0B1020;
  --panel: #0F1528;
  --panel-2: #141B33;
  --raised: #1A2240;
  --hover: rgba(255, 255, 255, .045);
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .12);
  --text: #E8EBF8;
  --text-2: #A3ABCB;
  --muted: #6F7899;
  --bubble-in: #172040;
  --bubble-in-text: #E8EBF8;
  --bubble-out-text: #FFFFFF;
  --shadow: 0 20px 60px rgba(0, 0, 0, .45);
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, .25);
  --chat-bg:
    radial-gradient(900px 600px at 85% -10%, rgba(79, 70, 229, .18), transparent 60%),
    radial-gradient(700px 500px at 0% 110%, rgba(14, 165, 233, .12), transparent 60%),
    var(--bg-2);

  --radius: 16px;
  --radius-sm: 10px;
  --sidebar: 380px;
  --header: 64px;
  color-scheme: dark;
}

:root[data-theme='light'] {
  --bg: #EEF1F8;
  --bg-2: #E8ECF6;
  --panel: #FFFFFF;
  --panel-2: #F6F7FC;
  --raised: #FFFFFF;
  --hover: rgba(15, 23, 42, .045);
  --line: rgba(15, 23, 42, .08);
  --line-2: rgba(15, 23, 42, .14);
  --text: #0F172A;
  --text-2: #475569;
  --muted: #8790A8;
  --bubble-in: #FFFFFF;
  --bubble-in-text: #0F172A;
  --accent-soft: rgba(79, 70, 229, .10);
  --shadow: 0 20px 60px rgba(15, 23, 42, .18);
  --shadow-sm: 0 4px 16px rgba(15, 23, 42, .08);
  --chat-bg:
    radial-gradient(900px 600px at 85% -10%, rgba(79, 70, 229, .10), transparent 60%),
    radial-gradient(700px 500px at 0% 110%, rgba(14, 165, 233, .10), transparent 60%),
    var(--bg-2);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body, #root { height: 100%; }
body {
  margin: 0;
  font-family: 'Vazirmatn', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
  font-feature-settings: 'ss01';
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--brand-3); }
::selection { background: rgba(99, 102, 241, .35); }
[hidden] { display: none !important; }

.icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.mark { width: 100%; height: auto; display: block; }

/* scrollbars */
.scroll { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.scroll::-webkit-scrollbar { width: 6px; }
.scroll::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 6px; }

/* ---------- buttons & fields ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 20px; border-radius: 14px; border: 0;
  font-weight: 700; font-size: 15px; white-space: nowrap;
  transition: transform .12s ease, filter .15s ease, background .15s ease, opacity .15s;
  position: relative; user-select: none;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .6; cursor: default; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 24px rgba(79, 70, 229, .35); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: var(--hover); color: var(--text); }
.btn-ghost:hover { background: var(--line-2); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-soft-danger { background: var(--danger-soft); color: var(--danger); }
.btn-ok { background: var(--ok); color: #fff; }
.btn-sm { height: 34px; padding: 0 14px; border-radius: 10px; font-size: 13.5px; }
.btn-block { width: 100%; }
.btn.is-busy { color: transparent !important; }
.btn.is-busy::after {
  content: ''; position: absolute; width: 20px; height: 20px; border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: spin .7s linear infinite;
}
.btn-ghost.is-busy::after { border-color: var(--line-2); border-top-color: var(--text); }
@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn {
  width: 42px; height: 42px; border-radius: 50%; border: 0; background: transparent; color: var(--text-2);
  display: inline-flex; align-items: center; justify-content: center; flex: none; position: relative;
  transition: background .15s, color .15s, transform .12s;
}
.icon-btn:hover { background: var(--hover); color: var(--text); }
.icon-btn:active { transform: scale(.94); }
.icon-btn .badge { position: absolute; top: 4px; inset-inline-end: 2px; }

.input, .textarea, .select {
  width: 100%; height: 48px; padding: 0 16px; border-radius: 14px;
  background: var(--panel-2); border: 1.5px solid var(--line); color: var(--text);
  outline: none; transition: border-color .15s, box-shadow .15s, background .15s;
}
.textarea { height: auto; min-height: 110px; padding: 12px 16px; resize: vertical; line-height: 1.7; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.input::placeholder, .textarea::placeholder { color: var(--muted); }
.input[dir='ltr'] { text-align: left; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field-label { font-size: 13px; font-weight: 500; color: var(--text-2); }
.field-hint { font-size: 12.5px; color: var(--muted); line-height: 1.7; }
.field-error { color: var(--danger); font-size: 13px; min-height: 0; }
.pw-wrap { position: relative; }
/* Password inputs are left-to-right inside a right-to-left page; the toggle
   sits on the left, so the room for it is kept on the left in both. */
.pw-wrap .input { padding-left: 48px; padding-right: 16px; }
.pw-wrap .icon-btn { position: absolute; left: 4px; top: 3px; width: 42px; height: 42px; }

.switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; cursor: pointer; }
.switch input { appearance: none; width: 46px; height: 26px; border-radius: 26px; background: var(--line-2); position: relative; transition: background .2s; flex: none; cursor: pointer; }
.switch input::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: inset-inline-start .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { inset-inline-start: 23px; }

.badge {
  min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--accent);
  color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center;
}
.badge-muted { background: var(--line-2); color: var(--text-2); }
.badge-danger { background: var(--danger); }
.pill { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 10px; border-radius: 12px; font-size: 12px; font-weight: 500; background: var(--hover); color: var(--text-2); }
.pill-ok { background: rgba(16, 185, 129, .15); color: var(--ok); }
.pill-warn { background: rgba(245, 158, 11, .15); color: var(--warn); }
.pill-danger { background: var(--danger-soft); color: var(--danger); }
.pill-accent { background: var(--accent-soft); color: var(--accent); }

/* ---------- logo ---------- */

.logo-tile {
  width: 84px; height: 84px; border-radius: 24px; background: var(--brand);
  display: flex; align-items: center; justify-content: center; position: relative;
  box-shadow: 0 16px 40px rgba(47, 91, 234, .45), inset 0 1px 0 rgba(255,255,255,.25);
}
.logo-tile::before { content: ''; position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(circle at 50% 25%, rgba(255,255,255,.22), transparent 60%); }
.logo-bubble {
  width: 62%; height: 52%; background: #fff; border-radius: 50%; position: relative;
  display: flex; align-items: center; justify-content: center; color: var(--brand-1);
}
.logo-bubble::after {
  content: ''; position: absolute; inset-inline-start: 10%; bottom: -14%; width: 26%; height: 34%;
  background: #fff; clip-path: polygon(0 100%, 30% 0, 100% 40%);
}
[dir='rtl'] .logo-bubble::after { transform: scaleX(-1); }
.logo-bubble .mark { width: 56%; }
.logo-tile.sm { width: 38px; height: 38px; border-radius: 12px; box-shadow: 0 6px 16px rgba(47, 91, 234, .35); }
.brand-name { font-weight: 700; font-size: 19px; letter-spacing: -.2px; }
.brand-name b { background: var(--brand); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- auth screens ---------- */

.auth {
  height: 100%; overflow-y: auto; display: flex; align-items: center; justify-content: center; padding: 32px 16px;
  background:
    radial-gradient(800px 500px at 80% 0%, rgba(79, 70, 229, .28), transparent 60%),
    radial-gradient(700px 500px at 10% 100%, rgba(14, 165, 233, .20), transparent 60%),
    var(--bg);
}
.auth-card {
  width: 100%; max-width: 440px; background: color-mix(in srgb, var(--panel) 88%, transparent);
  backdrop-filter: blur(20px); border: 1px solid var(--line); border-radius: 28px; padding: 32px 28px 28px;
  box-shadow: var(--shadow); animation: rise .45s cubic-bezier(.2, .8, .2, 1);
}
@keyframes rise { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.auth-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; margin-bottom: 26px; }
.auth-head h1 { margin: 0; font-size: 26px; font-weight: 700; }
.auth-head p { margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.8; }
.tabs { display: flex; gap: 6px; padding: 5px; background: var(--panel-2); border-radius: 16px; margin-bottom: 22px; border: 1px solid var(--line); }
.tab { flex: 1; height: 40px; border: 0; border-radius: 12px; background: transparent; color: var(--text-2); font-weight: 500; transition: all .2s; }
.tab.active { background: var(--raised); color: var(--text); box-shadow: var(--shadow-sm); font-weight: 700; }
.auth-foot { margin-top: 18px; text-align: center; font-size: 12.5px; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 6px; }
.auth-foot .icon { width: 16px; height: 16px; }
.notice { display: flex; gap: 12px; padding: 14px 16px; border-radius: 16px; background: var(--accent-soft); color: var(--text); font-size: 14px; line-height: 1.8; margin-bottom: 18px; }
.notice .icon { color: var(--accent); margin-top: 2px; }
.notice-warn { background: rgba(245, 158, 11, .12); }
.notice-warn .icon { color: var(--warn); }
.notice-danger { background: var(--danger-soft); }
.notice-danger .icon { color: var(--danger); }
.steps { display: flex; gap: 8px; justify-content: center; margin-bottom: 20px; }
.steps i { width: 34px; height: 5px; border-radius: 5px; background: var(--line-2); }
.steps i.on { background: var(--brand); }
.big-icon { width: 76px; height: 76px; border-radius: 26px; display: flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); }
.big-icon .icon { width: 38px; height: 38px; }
.big-icon.ok { background: rgba(16, 185, 129, .15); color: var(--ok); }
.big-icon.warn { background: rgba(245, 158, 11, .14); color: var(--warn); }
.strength { height: 5px; border-radius: 5px; background: var(--line); overflow: hidden; margin-top: 2px; }
.strength i { display: block; height: 100%; width: 0; border-radius: 5px; transition: width .25s, background .25s; }

/* ---------- app shell ---------- */

.app { display: grid; grid-template-columns: var(--sidebar) 1fr; height: 100%; height: 100dvh; }
.sidebar { background: var(--panel); border-inline-end: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; position: relative; z-index: 2; }
.side-head { height: var(--header); display: flex; align-items: center; gap: 10px; padding: 0 12px 0 10px; flex: none; }
.side-head .brand { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.conn { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(16, 185, 129, .18); transition: background .3s; }
.conn.off { background: var(--warn); box-shadow: 0 0 0 3px rgba(245, 158, 11, .18); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .4; } }
.search { margin: 2px 14px 10px; position: relative; flex: none; }
.search .input { height: 42px; border-radius: 21px; padding-inline-start: 42px; background: var(--panel-2); font-size: 14px; }
.search .icon { position: absolute; inset-inline-start: 14px; top: 10px; width: 20px; height: 20px; color: var(--muted); pointer-events: none; }
.chat-list { flex: 1; padding: 0 8px 90px; }
.list-section { padding: 10px 12px 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
.chat-item {
  display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 16px; cursor: pointer;
  transition: background .12s; position: relative; user-select: none;
}
.chat-item:hover { background: var(--hover); }
.chat-item.active { background: var(--brand); color: #fff; box-shadow: 0 8px 24px rgba(47, 91, 234, .30); }
.chat-item.active .ci-sub, .chat-item.active .ci-time { color: rgba(255, 255, 255, .78); }
.chat-item.active .badge { background: #fff; color: var(--brand-1); }
.ci-body { flex: 1; min-width: 0; }
.ci-row { display: flex; align-items: center; gap: 8px; }
.ci-title { font-weight: 700; font-size: 15px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 5px; }
.ci-title .icon { width: 16px; height: 16px; color: var(--accent); }
.chat-item.active .ci-title .icon { color: #fff; }
.ci-time { font-size: 12px; color: var(--muted); flex: none; }
.ci-sub { font-size: 13.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.ci-sub .typing-text { color: var(--accent); }
.chat-item.active .ci-sub .typing-text { color: #fff; }
.ci-ticks { display: inline-flex; color: var(--accent); }
.ci-ticks .icon { width: 17px; height: 17px; }
.chat-item.active .ci-ticks { color: #fff; }
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; color: var(--muted); padding: 40px 24px; font-size: 14px; line-height: 1.8; }
.empty .big-icon { margin-bottom: 6px; }
.empty b { color: var(--text); font-size: 16px; }
.fab {
  position: absolute; bottom: 22px; inset-inline-end: 22px; width: 56px; height: 56px; border-radius: 50%; border: 0;
  background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 30px rgba(47, 91, 234, .5); transition: transform .15s;
}
.fab:hover { transform: translateY(-2px); }
.fab .icon { width: 26px; height: 26px; }

.menu {
  position: fixed; z-index: 60; min-width: 230px; padding: 6px; border-radius: 16px; background: var(--raised);
  border: 1px solid var(--line); box-shadow: var(--shadow); animation: pop .14s ease-out; transform-origin: top;
}
@keyframes pop { from { opacity: 0; transform: scale(.95); } }
.menu button {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 0; background: none;
  border-radius: 10px; text-align: start; font-size: 14.5px;
}
.menu button:hover { background: var(--hover); }
.menu button .icon { width: 20px; height: 20px; color: var(--text-2); }
.menu button.danger, .menu button.danger .icon { color: var(--danger); }
.menu hr { border: 0; height: 1px; background: var(--line); margin: 5px 6px; }
.menu .badge { margin-inline-start: auto; }

/* ---------- chat pane ---------- */

.main { display: flex; flex-direction: column; min-width: 0; background: var(--chat-bg); position: relative; }
.chat-head {
  height: var(--header); display: flex; align-items: center; gap: 10px; padding: 0 10px 0 14px; flex: none;
  background: color-mix(in srgb, var(--panel) 85%, transparent); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line); z-index: 3;
}
.chat-head .back { display: none; }
.ch-info { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; cursor: pointer; padding: 4px 0; }
.ch-text { min-width: 0; }
.ch-title { font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-sub { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-sub.online, .ch-sub.typing { color: var(--accent); }
.key-banner {
  display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: rgba(245, 158, 11, .12);
  color: var(--text); font-size: 13.5px; border-bottom: 1px solid var(--line); flex: none;
}
.key-banner .icon { color: var(--warn); }
.key-banner span { flex: 1; }

.messages { flex: 1; padding: 16px 0 8px; position: relative; }
.msg-wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; display: flex; flex-direction: column; }
.day-sep { align-self: center; margin: 14px 0 10px; padding: 3px 14px; border-radius: 14px; font-size: 12.5px; font-weight: 500; background: color-mix(in srgb, var(--panel) 75%, transparent); backdrop-filter: blur(8px); color: var(--text-2); position: sticky; top: 4px; z-index: 1; }
.e2e-note { align-self: center; margin: 4px 0 16px; padding: 10px 16px; border-radius: 14px; max-width: 360px; text-align: center; font-size: 12.5px; color: var(--text-2); background: color-mix(in srgb, var(--panel) 70%, transparent); display: flex; gap: 8px; align-items: flex-start; line-height: 1.8; }
.e2e-note .icon { width: 18px; height: 18px; color: var(--ok); margin-top: 3px; }

/* Right to left: your own messages sit on the right (flex-start), the other
   side's on the left with their avatar on the outer edge. */
.msg { display: flex; gap: 8px; align-items: flex-end; margin: 2px 0; max-width: 78%; align-self: flex-end; flex-direction: row-reverse; animation: msgIn .22s ease-out; }
@keyframes msgIn { from { opacity: 0; transform: translateY(6px); } }
.msg.out { align-self: flex-start; flex-direction: row; }
.msg.cont { margin-top: 1px; }
.msg .avatar { margin-bottom: 2px; }
.msg .avatar-spacer { width: 34px; flex: none; }
.bubble {
  position: relative; padding: 7px 12px 6px; border-radius: 18px; background: var(--bubble-in); color: var(--bubble-in-text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .12); min-width: 76px; max-width: 100%; word-wrap: break-word; overflow-wrap: anywhere;
}
.msg:not(.out) .bubble { border-start-end-radius: 6px; }
.msg.cont:not(.out) .bubble { border-start-end-radius: 18px; }
.msg.out .bubble { background: var(--brand); color: var(--bubble-out-text); border-start-start-radius: 6px; }
.msg.out.cont .bubble { border-start-start-radius: 18px; }
.msg.selected .bubble { outline: 2px solid var(--accent); outline-offset: 2px; }
.sender { font-size: 13px; font-weight: 700; margin-bottom: 1px; }
.text { white-space: pre-wrap; font-size: 15px; line-height: 1.75; unicode-bidi: plaintext; }
.text a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.text.emoji-only { font-size: 40px; line-height: 1.25; }
.meta { display: flex; align-items: center; justify-content: flex-end; gap: 3px; font-size: 11.5px; opacity: .7; margin-top: -2px; float: inline-end; margin-inline-start: 10px; position: relative; top: 7px; height: 20px; }
.meta .icon { width: 16px; height: 16px; }
.meta .icon.read { color: #7DD3FC; }
.msg:not(.out) .meta .icon.read { color: var(--accent); }
.meta-row { display: flex; justify-content: flex-end; clear: both; }
.msg.failed .meta { color: var(--danger); opacity: 1; }
.bubble.media { padding: 4px; overflow: hidden; }
.bubble.media .meta.overlay { position: absolute; bottom: 10px; inset-inline-end: 10px; top: auto; background: rgba(0, 0, 0, .45); color: #fff; padding: 1px 8px; border-radius: 10px; opacity: 1; float: none; margin: 0; }
.bubble.media .caption { padding: 6px 8px 2px; }
.reply-quote {
  display: block; border-inline-start: 3px solid currentColor; padding: 3px 10px; margin: 3px 0 6px; border-radius: 6px;
  background: rgba(127, 127, 160, .12); cursor: pointer; max-width: 320px;
}
.msg.out .reply-quote { background: rgba(255, 255, 255, .14); }
.reply-quote b { display: block; font-size: 12.5px; color: var(--accent); }
.msg.out .reply-quote b { color: #fff; }
.reply-quote span { display: block; font-size: 13px; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg.flash .bubble { animation: flash 1.2s ease; }
@keyframes flash { 30% { box-shadow: 0 0 0 4px var(--accent); } }
.msg-error { font-size: 13.5px; font-style: italic; opacity: .75; display: flex; gap: 6px; align-items: center; }
.msg-error .icon { width: 16px; height: 16px; }
.system-line { align-self: center; font-size: 12.5px; color: var(--text-2); background: color-mix(in srgb, var(--panel) 70%, transparent); padding: 4px 14px; border-radius: 14px; margin: 8px 0; }

.media-box { position: relative; border-radius: 14px; overflow: hidden; background: rgba(0, 0, 0, .25); cursor: pointer; display: block; max-width: min(380px, 70vw); }
.media-box img, .media-box video { display: block; width: 100%; height: 100%; object-fit: cover; }
.media-box .thumb { filter: blur(14px); transform: scale(1.1); }
.media-box .media-center { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.media-box .media-btn { width: 52px; height: 52px; border-radius: 50%; background: rgba(0, 0, 0, .5); color: #fff; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(6px); border: 0; }
.media-box .media-btn .icon { width: 24px; height: 24px; }
.media-box .media-label { position: absolute; top: 10px; inset-inline-start: 10px; font-size: 12px; background: rgba(0, 0, 0, .5); color: #fff; padding: 1px 8px; border-radius: 10px; }
.ring { width: 52px; height: 52px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 3; }
.ring .bg { stroke: rgba(255, 255, 255, .25); }
.ring .fg { stroke: #fff; stroke-linecap: round; transition: stroke-dashoffset .2s; }

.file-card { display: flex; align-items: center; gap: 12px; padding: 4px 2px 2px; min-width: 220px; max-width: 320px; cursor: pointer; }
.file-icon { width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.msg.out .file-icon { background: rgba(255, 255, 255, .2); color: #fff; }
.file-name { font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-size { font-size: 12.5px; opacity: .7; }

.voice { display: flex; align-items: center; gap: 10px; min-width: 230px; padding: 2px 0; }
.voice .play { width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; flex: none; }
.msg.out .voice .play { background: #fff; color: var(--brand-2); }
.voice .play .icon { width: 20px; height: 20px; fill: currentColor; stroke: none; }
.wave { display: flex; align-items: center; gap: 2px; height: 30px; flex: 1; cursor: pointer; direction: ltr; }
.wave i { flex: 1; min-width: 2px; border-radius: 2px; background: currentColor; opacity: .35; transition: opacity .1s; }
.wave i.on { opacity: 1; }
.voice .dur { font-size: 12px; opacity: .75; min-width: 34px; }

.call-line { display: flex; align-items: center; gap: 10px; padding: 2px 4px; min-width: 180px; }
.call-line .icon { width: 20px; height: 20px; }
.call-line .missed { color: var(--danger); }

.typing-dots { display: inline-flex; gap: 3px; margin-inline-end: 4px; vertical-align: middle; }
.typing-dots i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; animation: dot 1.2s infinite; }
.typing-dots i:nth-child(2) { animation-delay: .15s; }
.typing-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 60%, 100% { opacity: .3; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }

.jump {
  position: absolute; bottom: 92px; inset-inline-end: 22px; width: 46px; height: 46px; border-radius: 50%; border: 0;
  background: var(--raised); color: var(--text); box-shadow: var(--shadow-sm); display: flex; align-items: center; justify-content: center; z-index: 4;
}
.jump .icon { transform: rotate(90deg); }
.jump .badge { position: absolute; top: -6px; inset-inline-start: -4px; }

/* composer */
.composer-wrap { padding: 8px 16px 14px; flex: none; }
.composer-inner { max-width: 860px; margin: 0 auto; }
.reply-bar { display: flex; align-items: center; gap: 10px; padding: 8px 14px; margin-bottom: 6px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
.reply-bar .icon { color: var(--accent); }
.reply-bar div { flex: 1; min-width: 0; }
.reply-bar b { font-size: 13px; color: var(--accent); display: block; }
.reply-bar span { font-size: 13px; color: var(--text-2); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.composer { display: flex; align-items: flex-end; gap: 8px; }
.composer-box { flex: 1; display: flex; align-items: flex-end; background: var(--panel); border: 1px solid var(--line); border-radius: 24px; padding: 3px 4px; box-shadow: var(--shadow-sm); min-width: 0; }
.composer-box textarea {
  flex: 1; border: 0; background: none; outline: none; resize: none; max-height: 180px; min-height: 42px;
  padding: 9px 6px; line-height: 1.65; font-size: 15px; unicode-bidi: plaintext; min-width: 0;
}
.composer-box textarea::placeholder { color: var(--muted); }
.send-btn {
  width: 50px; height: 50px; border-radius: 50%; border: 0; background: var(--brand); color: #fff; flex: none;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 20px rgba(47, 91, 234, .4); transition: transform .12s;
}
.send-btn:active { transform: scale(.93); }
.send-btn .icon { width: 23px; height: 23px; }
[dir='rtl'] .send-btn .icon-send { transform: scaleX(-1); }
.send-btn.recording { background: var(--danger); box-shadow: 0 0 0 0 rgba(244, 63, 94, .5); animation: recPulse 1.4s infinite; }
@keyframes recPulse { 70% { box-shadow: 0 0 0 14px rgba(244, 63, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(244, 63, 94, 0); } }
.rec-bar { flex: 1; display: flex; align-items: center; gap: 12px; height: 50px; padding: 0 8px 0 16px; border-radius: 25px; background: var(--panel); border: 1px solid var(--line); }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); animation: pulse 1s infinite; }
.rec-time { font-variant-numeric: tabular-nums; font-weight: 500; }
.rec-wave { flex: 1; display: flex; align-items: center; gap: 2px; height: 28px; overflow: hidden; direction: ltr; justify-content: flex-end; color: var(--accent); }
.rec-wave i { width: 3px; flex: none; border-radius: 2px; background: currentColor; }
.uploads { display: flex; flex-direction: column; gap: 6px; margin-bottom: 6px; }
.upload-row { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); font-size: 13px; }
.upload-row .bar { flex: 1; height: 5px; border-radius: 5px; background: var(--line); overflow: hidden; }
.upload-row .bar i { display: block; height: 100%; background: var(--brand); width: 0; transition: width .2s; }

.welcome { flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px; }
.welcome-card { text-align: center; max-width: 420px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.welcome-card h2 { margin: 6px 0 0; font-size: 22px; }
.welcome-card p { margin: 0; color: var(--text-2); line-height: 1.9; font-size: 14.5px; }
.welcome-card .logo-tile { width: 104px; height: 104px; border-radius: 30px; }

/* ---------- avatars ---------- */

.avatar { position: relative; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; flex: none; user-select: none; }
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.avatar .icon { width: 55%; height: 55%; }
.avatar-xs { width: 28px; height: 28px; font-size: 11px; }
.avatar-sm { width: 34px; height: 34px; font-size: 13px; }
.avatar-md { width: 52px; height: 52px; font-size: 18px; }
.avatar-lg { width: 96px; height: 96px; font-size: 34px; }
.avatar-xl { width: 128px; height: 128px; font-size: 44px; }
.online-dot { position: absolute; bottom: 1px; inset-inline-end: 1px; width: 14px; height: 14px; border-radius: 50%; background: var(--ok); border: 2.5px solid var(--panel); }
.avatar-sm .online-dot { width: 10px; height: 10px; border-width: 2px; }

/* ---------- modals ---------- */

.backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(3, 6, 15, .6); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; padding: 16px; opacity: 0; transition: opacity .2s; }
.backdrop.in { opacity: 1; }
.modal { width: 100%; max-width: 460px; max-height: calc(100dvh - 32px); display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); transform: translateY(12px) scale(.98); transition: transform .22s cubic-bezier(.2, .8, .2, 1); }
.backdrop.in .modal { transform: none; }
.modal-wide { max-width: 860px; }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px 6px 12px; }
.modal-head h2 { flex: 1; margin: 0; font-size: 18px; padding-inline-start: 6px; }
.modal-body { padding: 8px 20px 18px; overflow-y: auto; scrollbar-width: thin; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; padding: 0 20px 20px; flex-wrap: wrap; }
.confirm-text { margin: 4px 0 6px; line-height: 1.9; color: var(--text-2); }

.list { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: 14px; }
.row.click { cursor: pointer; }
.row.click:hover { background: var(--hover); }
.row-body { flex: 1; min-width: 0; }
.row-title { font-weight: 700; font-size: 14.5px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.row-sub { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row input[type='checkbox'] { width: 22px; height: 22px; accent-color: var(--accent); }
.section-title { font-size: 13px; font-weight: 700; color: var(--accent); margin: 18px 4px 8px; }
.card { background: var(--panel-2); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; }
.profile-head { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 6px 0 12px; }
.profile-head h3 { margin: 6px 0 0; font-size: 20px; }
.profile-head p { margin: 0; color: var(--muted); font-size: 13.5px; }
.profile-actions { display: flex; gap: 10px; justify-content: center; margin-top: 8px; flex-wrap: wrap; }
.fingerprint { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; direction: ltr; text-align: center; font-size: 15px; letter-spacing: 1px; line-height: 2; padding: 12px; border-radius: 14px; background: var(--panel-2); border: 1px dashed var(--line-2); word-spacing: 6px; }
.link-box { display: flex; gap: 8px; align-items: center; }
.link-box .input { direction: ltr; text-align: left; font-size: 13px; height: 42px; }

/* viewer */
.viewer { position: fixed; inset: 0; z-index: 70; background: rgba(0, 0, 0, .92); display: flex; align-items: center; justify-content: center; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.viewer img, .viewer video { max-width: 96vw; max-height: 88vh; border-radius: 8px; }
.viewer .viewer-bar { position: absolute; top: 0; inset-inline: 0; display: flex; justify-content: space-between; padding: 12px; }
.viewer .icon-btn { color: #fff; background: rgba(255, 255, 255, .08); }

/* toasts */
.toasts { position: fixed; z-index: 90; top: 16px; inset-inline: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast { display: flex; align-items: center; gap: 10px; padding: 11px 18px; border-radius: 16px; background: var(--raised); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 14px; transform: translateY(-14px); opacity: 0; transition: all .25s cubic-bezier(.2, .8, .2, 1); max-width: 520px; }
.toast.in { transform: none; opacity: 1; }
.toast .icon { width: 20px; height: 20px; color: var(--accent); }
.toast-error .icon { color: var(--danger); }
.toast-ok .icon { color: var(--ok); }

/* ---------- calls ---------- */

.call {
  position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: 48px 20px 40px; color: #fff; overflow: hidden;
  background: radial-gradient(900px 700px at 50% 0%, rgba(99, 102, 241, .55), transparent 60%), radial-gradient(700px 600px at 50% 110%, rgba(14, 165, 233, .45), transparent 60%), #070B16;
  animation: fade .25s;
}
.call .remote-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.call .local-video { position: absolute; top: 20px; inset-inline-end: 20px; width: 120px; height: 170px; object-fit: cover; border-radius: 18px; box-shadow: var(--shadow); background: #111; z-index: 2; transform: scaleX(-1); }
.call-top { display: flex; flex-direction: column; align-items: center; gap: 12px; z-index: 1; text-align: center; }
.call-top h2 { margin: 8px 0 0; font-size: 26px; text-shadow: 0 2px 12px rgba(0, 0, 0, .4); }
.call-status { font-size: 15px; opacity: .85; font-variant-numeric: tabular-nums; text-shadow: 0 2px 10px rgba(0, 0, 0, .4); }
.call-e2e { display: flex; align-items: center; gap: 6px; font-size: 12.5px; opacity: .75; }
.call-e2e .icon { width: 15px; height: 15px; }
.call.video-on .call-top { margin-top: auto; margin-bottom: auto; opacity: 0; pointer-events: none; }
.call.video-on.connecting .call-top { opacity: 1; }
.call-avatar { position: relative; }
.call-avatar::before, .call-avatar::after { content: ''; position: absolute; inset: -14px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .25); animation: ripple 2s infinite; }
.call-avatar::after { animation-delay: 1s; }
.call.connected .call-avatar::before, .call.connected .call-avatar::after { animation: none; opacity: 0; }
@keyframes ripple { from { transform: scale(.9); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }
.call-controls { display: flex; gap: 18px; z-index: 1; flex-wrap: wrap; justify-content: center; }
.call-btn { width: 64px; height: 64px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .14); backdrop-filter: blur(10px); color: #fff; display: flex; align-items: center; justify-content: center; transition: transform .12s, background .15s; }
.call-btn:active { transform: scale(.92); }
.call-btn .icon { width: 28px; height: 28px; }
.call-btn.off { background: #fff; color: #0F172A; }
.call-btn.hang { background: var(--danger); }
.call-btn.answer { background: var(--ok); animation: bounce 1.2s infinite; }
@keyframes bounce { 50% { transform: translateY(-6px); } }
.call-btn-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 12.5px; opacity: .95; }
.call-mini { position: fixed; z-index: 75; top: 12px; inset-inline-start: 50%; transform: translateX(50%); display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 16px; border-radius: 26px; background: var(--ok); color: #fff; box-shadow: var(--shadow); cursor: pointer; font-weight: 500; font-size: 14px; }
[dir='ltr'] .call-mini { transform: translateX(-50%); }

/* ---------- admin ---------- */

.admin-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 12px; scrollbar-width: none; }
.admin-tabs .tab { flex: none; padding: 0 16px; background: var(--panel-2); border: 1px solid var(--line); }
.admin-tabs .tab.active { background: var(--brand); color: #fff; border-color: transparent; }
.admin-tabs .badge { margin-inline-start: 6px; height: 20px; min-width: 20px; font-size: 11px; }
.request-card { background: var(--panel-2); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; margin-bottom: 10px; }
.request-card .note { margin: 10px 0 12px; padding: 10px 14px; border-radius: 12px; background: var(--panel); white-space: pre-wrap; font-size: 14px; line-height: 1.9; unicode-bidi: plaintext; border-inline-start: 3px solid var(--accent); }
.request-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.stat { background: var(--panel-2); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; }
.stat b { display: block; font-size: 22px; font-weight: 700; }
.stat span { font-size: 12.5px; color: var(--muted); }
.logs { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; direction: ltr; text-align: left; background: #050812; color: #CBD5E1; border-radius: 14px; padding: 12px; max-height: 420px; overflow: auto; white-space: pre-wrap; line-height: 1.6; }
.logs .warn { color: #FBBF24; }
.logs .error { color: #F87171; }
.logs .debug { color: #64748B; }
.event-row { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; font-size: 14px; }
.event-row.unseen { background: var(--accent-soft); }
.event-row.duress.unseen { background: var(--danger-soft); }
.event-row .icon { width: 20px; height: 20px; }
.event-row.duress .icon { color: var(--danger); }
.event-row time { margin-inline-start: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }

/* ---------- additions for the chat, call and settings screens ---------- */

.chat-view { display: contents; }
.ch-actions { display: flex; align-items: center; flex: none; }
.msg.no-anim { animation: none; }
.msg.failed .bubble { cursor: pointer; }
.select { appearance: none; padding-inline-end: 36px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: 18px 21px, 13px 21px; background-size: 5px 5px; background-repeat: no-repeat; }
.avatar-edit { position: relative; border: 0; padding: 0; background: none; border-radius: 50%; }
.avatar-edit > span { position: absolute; bottom: 4px; inset-inline-end: 4px; width: 36px; height: 36px; border-radius: 50%; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; border: 3px solid var(--panel); }
.avatar-edit > span .icon { width: 18px; height: 18px; }
.call .icon-btn:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.call-mini .icon { width: 18px; height: 18px; }
.mini-time { font-variant-numeric: tabular-nums; opacity: .9; }
.row label, label > .row { cursor: pointer; }

/* apps: server line on the login screen */
.server-line { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.link-btn { border: 0; background: none; color: var(--accent); padding: 4px; font-size: 12.5px; text-decoration: underline; text-underline-offset: 3px; }

/* Installed on an iPhone the page runs under the status bar and around the
   notch; env() is 0 everywhere else. */
.sidebar, .main { padding-top: env(safe-area-inset-top, 0px); }
.sidebar { padding-inline-start: env(safe-area-inset-right, 0px); }
.main { padding-inline-end: env(safe-area-inset-left, 0px); }
.auth { padding-top: calc(32px + env(safe-area-inset-top, 0px)); padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px)); }
.call { padding-top: calc(48px + env(safe-area-inset-top, 0px)); padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px)); }
.fab { bottom: calc(22px + env(safe-area-inset-bottom, 0px)); }
.toasts { top: calc(16px + env(safe-area-inset-top, 0px)); }
.install-hint { font-size: 13px; }
.install-card { margin: 0 14px 10px; padding: 12px 14px; border-radius: 16px; background: var(--accent-soft); display: flex; flex-direction: column; gap: 10px; flex: none; }
.install-card-text b { display: block; font-size: 14px; }
.install-card-text span { font-size: 12.5px; color: var(--text-2); line-height: 1.7; }
.install-card-actions { display: flex; align-items: center; justify-content: space-between; }
.ci-muted { display: inline-flex; color: var(--muted); }
.ci-title .ci-muted .icon { width: 15px; height: 15px; color: var(--muted); }
.chat-item.active .ci-title .ci-muted .icon { color: rgba(255, 255, 255, .78); }
.install-hint .icon { width: 18px; height: 18px; vertical-align: -3px; }

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  :root { --sidebar: 100%; }
  /* Contain the parked chat pane, so the page never grows sideways. */
  .app { grid-template-columns: 100%; position: relative; overflow: hidden; }
  .main { position: absolute; inset: 0; transform: translateX(-100%); transition: transform .28s cubic-bezier(.2, .8, .2, 1); z-index: 5; }
  [dir='rtl'] .main { transform: translateX(-100%); }
  .app.show-chat .main { transform: none; }
  /* Off-screen the pane is also hidden once it has slid out, or some
     browsers keep painting it over the list. */
  .main { visibility: hidden; transition: transform .28s cubic-bezier(.2, .8, .2, 1), visibility 0s .28s; }
  .app.show-chat .main { visibility: visible; transition: transform .28s cubic-bezier(.2, .8, .2, 1); }
  .app.show-chat .sidebar { pointer-events: none; }
  .chat-head .back { display: inline-flex; }
  .msg { max-width: 88%; }
  .composer-wrap { padding: 6px 8px calc(10px + env(safe-area-inset-bottom)); }
  .messages { padding-top: 10px; }
  .msg-wrap { padding: 0 10px; }
  .modal { border-radius: 24px 24px 0 0; max-height: 92dvh; align-self: flex-end; padding-bottom: env(safe-area-inset-bottom, 0px); }
  .backdrop { padding: 0; align-items: flex-end; }
  .modal-wide { max-width: 100%; }
  .call .local-video { width: 96px; height: 136px; }
}
@media (min-width: 861px) {
  .app .main .back { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
