:root {
  --bg: #070b16;
  --bg-2: #0a1120;
  --panel: rgba(15, 22, 40, 0.76);
  --panel-solid: #0f1628;
  --panel-raised: #131c31;
  --line: rgba(148, 163, 184, 0.12);
  --line-strong: rgba(148, 163, 184, 0.22);
  --text: #eef2ff;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --accent: #8b5cf6;
  --accent-2: #22d3ee;
  --accent-3: #f472b6;
  --danger: #fb7185;
  --ok: #34d399;
  --radius: 26px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  --mono: "SF Mono", "JetBrains Mono", "Cascadia Code", Menlo, Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.modal-open {
  overflow: hidden;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
}

::selection {
  background: rgba(139, 92, 246, 0.45);
  color: #fff;
}

:focus-visible {
  outline: 2px solid rgba(139, 92, 246, 0.8);
  outline-offset: 2px;
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.28) transparent;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.24);
  border-radius: 99px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

/* ------------------------------- backdrop ------------------------------ */

.aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% -18%, rgba(49, 46, 129, 0.65), transparent 55%),
    linear-gradient(180deg, #070b16 0%, #080d1a 55%, #050812 100%);
}

.aurora span {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.42;
  animation: drift 22s ease-in-out infinite alternate;
}

.aurora-a {
  width: 52vw;
  height: 52vw;
  left: -14vw;
  top: 2vh;
  background: #4c1d95;
}

.aurora-b {
  width: 38vw;
  height: 38vw;
  right: -8vw;
  top: 24vh;
  background: #0e7490;
  animation-delay: -7s;
  animation-duration: 26s;
}

.aurora-c {
  width: 30vw;
  height: 30vw;
  left: 38vw;
  bottom: -14vw;
  background: #831843;
  opacity: 0.3;
  animation-delay: -13s;
  animation-duration: 30s;
}

.grain {
  position: absolute;
  inset: 0;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

@keyframes drift {
  from {
    transform: translate3d(-3%, -2%, 0) scale(1);
  }
  to {
    transform: translate3d(5%, 4%, 0) scale(1.12);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.45);
  }
  50% {
    opacity: 0.7;
    box-shadow: 0 0 0 5px rgba(52, 211, 153, 0);
  }
}

@keyframes breathe {
  0%,
  100% {
    transform: translateY(0) scale(1);
    box-shadow: 0 0 60px rgba(139, 92, 246, 0.45);
  }
  50% {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 0 90px rgba(34, 211, 238, 0.4);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes orbit {
  to {
    transform: rotate(360deg);
  }
}

/* -------------------------------- splash ------------------------------- */

.splash {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: #070b16;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.splash.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-moon {
  position: relative;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 45%, #22d3ee 100%);
  box-shadow: 0 0 70px rgba(139, 92, 246, 0.55);
  animation: breathe 2.8s ease-in-out infinite;
}

.splash-moon::after {
  content: "";
  position: absolute;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  left: 25px;
  top: -13px;
  background: #070b16;
}

.splash-star {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #c4b5fd;
  box-shadow: 0 0 10px #a78bfa;
}

.splash-star.s1 {
  left: 56px;
  top: 8px;
}

.splash-star.s2 {
  left: 72px;
  top: 30px;
  width: 2px;
  height: 2px;
}

.splash-star.s3 {
  left: 62px;
  top: 48px;
  width: 3px;
  height: 3px;
}

.splash p {
  margin: 8px 0 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.splash-sub {
  font-size: 12px;
  color: var(--muted-2);
  letter-spacing: 0.12em;
}

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

.auth {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(390px, 0.92fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
  max-width: 1240px;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 48px clamp(20px, 5vw, 60px);
  overflow-y: auto;
}

.auth-hero {
  animation: fadeUp 0.6s ease both;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 14px;
  border: 1px solid rgba(139, 92, 246, 0.28);
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.08);
  color: #c4b5fd;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.pulse-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  animation: pulse 2s ease-in-out infinite;
}

.auth h1 {
  margin: 26px 0 22px;
  font-size: clamp(44px, 5.4vw, 76px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.auth h1 em {
  font-style: normal;
  background: linear-gradient(100deg, #c4b5fd 5%, #67e8f9 52%, #f9a8d4 96%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  margin: 0;
  max-width: 520px;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.85;
}

.lede strong {
  color: #ddd6fe;
  font-weight: 600;
}

.feature-list {
  display: grid;
  gap: 0;
  margin: 38px 0 34px;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.feature-list li {
  display: flex;
  gap: 18px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.feature-list .num {
  padding-top: 2px;
  color: var(--accent-2);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.feature-list strong {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
}

.feature-list p {
  margin: 4px 0 0;
  color: var(--muted-2);
  font-size: 12.5px;
  line-height: 1.6;
}

.hero-status {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12.5px;
}

.auth-panel {
  animation: fadeUp 0.6s 0.08s ease both;
  min-width: 0;
}

.auth-card {
  padding: 28px;
  border: 1px solid var(--line-strong);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(22, 30, 52, 0.88), rgba(11, 17, 32, 0.94));
  box-shadow:
    0 40px 100px -30px rgba(0, 0, 0, 0.85),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(28px);
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(5, 9, 18, 0.6);
}

.tab {
  padding: 9px 12px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  transition: background 0.18s ease, color 0.18s ease;
}

.tab:hover {
  color: var(--text);
}

.tab.is-active {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.92), rgba(109, 40, 217, 0.92));
  color: #fff;
  box-shadow: 0 6px 18px -6px rgba(139, 92, 246, 0.7);
}

.auth-title {
  margin: 24px 0 20px;
}

.auth-title h2 {
  margin: 0;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.auth-title p {
  margin: 6px 0 0;
  color: var(--muted-2);
  font-size: 12.5px;
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
}

.field > span {
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: #b6c2d9;
  font-size: 12px;
  font-weight: 500;
}

.field small {
  color: var(--muted-2);
  font-size: 10.5px;
}

.field input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  outline: none;
  background: rgba(5, 9, 18, 0.62);
  font-size: 14px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.field input::placeholder {
  color: #475569;
}

.field input:focus {
  border-color: rgba(139, 92, 246, 0.75);
  background: rgba(6, 10, 20, 0.9);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.14);
}

.form-error {
  margin: 2px 0 12px;
  padding: 10px 12px;
  border: 1px solid rgba(251, 113, 133, 0.25);
  border-radius: 10px;
  background: rgba(251, 113, 133, 0.08);
  color: #fda4af;
  font-size: 12.5px;
  line-height: 1.5;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 13px;
  font-size: 13.5px;
  font-weight: 600;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease,
    opacity 0.16s ease;
}

.btn:not(:disabled):hover {
  transform: translateY(-1px);
}

.btn.primary {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  color: #fff;
  box-shadow: 0 10px 26px -10px rgba(139, 92, 246, 0.9);
}

.btn.primary:not(:disabled):hover {
  background: linear-gradient(135deg, #9d70fb, #7c3aed);
}

.btn.ghost {
  border-color: var(--line-strong);
  background: rgba(148, 163, 184, 0.06);
  color: #cbd5e1;
}

.btn.ghost:not(:disabled):hover {
  background: rgba(148, 163, 184, 0.12);
}

.btn.wide {
  width: 100%;
}

.btn.tiny {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 9px;
  font-size: 12px;
}

.btn-spinner {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.auth-note {
  display: flex;
  gap: 11px;
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px solid rgba(251, 191, 36, 0.14);
  border-radius: 12px;
  background: rgba(251, 191, 36, 0.05);
}

.moon-glyph {
  color: #fcd34d;
  font-size: 17px;
  line-height: 1.2;
}

.auth-note p {
  margin: 0;
  color: #b8a98a;
  font-size: 11.5px;
  line-height: 1.65;
}

.auth-note strong {
  color: #fde68a;
  font-weight: 600;
}

.invite-box {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed var(--line-strong);
}

.invite-box > p {
  margin: 0 0 8px;
  color: var(--muted-2);
  font-size: 11.5px;
}

.invite-copy {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 10px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(5, 9, 18, 0.55);
  text-align: left;
  transition: border-color 0.18s ease;
}

.invite-copy:hover {
  border-color: rgba(139, 92, 246, 0.45);
}

.invite-copy code {
  flex: 1;
  overflow: hidden;
  color: #a5b4fc;
  font-family: var(--mono);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invite-copy span {
  flex: 0 0 auto;
  padding: 4px 9px;
  border-radius: 7px;
  background: rgba(139, 92, 246, 0.16);
  color: #c4b5fd;
  font-size: 10.5px;
  font-weight: 600;
}

.auth-meta {
  margin: 16px 0 0;
  color: #3f4c63;
  font-size: 11px;
  text-align: center;
  letter-spacing: 0.04em;
}

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

.app {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 358px minmax(0, 1fr);
  gap: 16px;
  width: 100%;
  max-width: 1700px;
  height: 100dvh;
  margin: 0 auto;
  padding: 16px;
}

.sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(17, 25, 44, 0.86), rgba(10, 16, 30, 0.92));
  box-shadow:
    0 30px 80px -40px rgba(0, 0, 0, 0.9),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(26px);
}

.side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 18px 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand img {
  border-radius: 10px;
  box-shadow: 0 8px 20px -8px rgba(139, 92, 246, 0.8);
}

.brand div {
  display: grid;
  gap: 2px;
}

.brand strong {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.brand span {
  color: var(--muted-2);
  font-size: 9.5px;
  letter-spacing: 0.14em;
}

.version-chip {
  padding: 4px 8px;
  border: 1px solid rgba(52, 211, 153, 0.22);
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.07);
  color: #6ee7b7;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.14em;
}

.me-card {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 4px 14px 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(148, 163, 184, 0.04);
}

.avatar {
  --avatar-color: #8b5cf6;
  position: relative;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background-color: var(--avatar-color);
  background-image: linear-gradient(145deg, rgba(255, 255, 255, 0.3), rgba(0, 0, 0, 0.22));
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  box-shadow: 0 6px 16px -6px var(--avatar-color);
  user-select: none;
}

.avatar.sm {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  font-size: 14px;
}

.avatar .presence-dot {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 11px;
  height: 11px;
  border: 2px solid #0f172a;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.7);
}

.me-text {
  display: grid;
  flex: 1;
  gap: 2px;
  min-width: 0;
}

.me-text strong {
  overflow: hidden;
  font-size: 13.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.me-text span {
  overflow: hidden;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 10px;
  color: var(--muted);
  transition: background 0.16s ease, color 0.16s ease;
}

.icon-btn:hover {
  background: rgba(148, 163, 184, 0.1);
  color: var(--text);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

#friendMenuBtn svg {
  fill: currentColor;
  stroke: none;
}

.add-friend {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 14px 10px;
  padding: 11px 13px;
  border: 1px dashed rgba(139, 92, 246, 0.34);
  border-radius: 13px;
  background: rgba(139, 92, 246, 0.06);
  color: #c4b5fd;
  font-size: 12.5px;
  font-weight: 600;
  text-align: left;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.add-friend:hover {
  border-color: rgba(139, 92, 246, 0.6);
  background: rgba(139, 92, 246, 0.12);
}

.add-friend .plus {
  font-size: 16px;
  line-height: 1;
}

.add-friend kbd {
  margin-left: auto;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 9px;
}

.requests-panel {
  max-height: 220px;
  margin: 0 14px 8px;
  padding: 10px;
  overflow-y: auto;
  border: 1px solid rgba(251, 191, 36, 0.18);
  border-radius: 14px;
  background: rgba(251, 191, 36, 0.05);
}

.requests-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
  padding: 0 3px;
  color: #fcd34d;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.requests-head b {
  display: grid;
  place-items: center;
  min-width: 17px;
  height: 17px;
  border-radius: 99px;
  background: rgba(251, 191, 36, 0.18);
  font-size: 9.5px;
}

.request-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 3px;
}

.request-item .avatar {
  width: 31px;
  height: 31px;
  border-radius: 10px;
  font-size: 12px;
}

.request-item .meta {
  flex: 1;
  min-width: 0;
}

.request-item strong {
  display: block;
  overflow: hidden;
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.request-item .meta span {
  color: var(--muted-2);
  font-size: 10px;
}

.request-actions {
  display: flex;
  gap: 5px;
}

.mini-btn {
  min-height: 26px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease;
}

.mini-btn:hover {
  background: rgba(148, 163, 184, 0.1);
  color: var(--text);
}

.mini-btn.accept {
  border-color: rgba(52, 211, 153, 0.25);
  background: rgba(52, 211, 153, 0.1);
  color: #6ee7b7;
}

.mini-btn.accept:hover {
  background: rgba(52, 211, 153, 0.18);
}

.mini-btn.reject {
  color: var(--muted-2);
}

.list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px 7px;
  color: var(--muted-2);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.list-summary {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.05em;
}

.friend-list {
  flex: 1;
  min-height: 0;
  padding: 0 9px 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.friend-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  width: 100%;
  padding: 8px 9px;
  border: 1px solid transparent;
  border-radius: 15px;
  text-align: left;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.friend-item:hover {
  background: rgba(148, 163, 184, 0.055);
}

.friend-item.is-active {
  border-color: rgba(139, 92, 246, 0.28);
  background: linear-gradient(100deg, rgba(139, 92, 246, 0.18), rgba(34, 211, 238, 0.05));
}

.friend-main {
  min-width: 0;
}

.friend-name-row {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.friend-name {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  font-size: 13.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friend-handle {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 52%;
  overflow: hidden;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 9.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friend-preview {
  overflow: hidden;
  margin-top: 3px;
  color: var(--muted-2);
  font-size: 11px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friend-item.is-active .friend-preview {
  color: #a5b4fc;
}

.friend-side {
  display: grid;
  justify-items: end;
  gap: 5px;
}

.friend-time {
  color: #475569;
  font-family: var(--mono);
  font-size: 9px;
}

.unread {
  display: grid;
  place-items: center;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  border-radius: 99px;
  background: linear-gradient(135deg, #8b5cf6, #d946ef);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  box-shadow: 0 3px 8px -2px rgba(139, 92, 246, 0.9);
}

.friend-empty {
  padding: 36px 18px;
  color: var(--muted-2);
  font-size: 12px;
  line-height: 1.8;
  text-align: center;
}

.friend-empty strong {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 13px;
}

.side-foot {
  padding: 10px 14px 14px;
  border-top: 1px solid var(--line);
  background: rgba(5, 9, 18, 0.35);
}

.countdown-card {
  padding: 11px 13px;
  border: 1px solid rgba(139, 92, 246, 0.16);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.08), rgba(34, 211, 238, 0.04));
}

.countdown-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted-2);
  font-size: 10px;
  letter-spacing: 0.05em;
}

.countdown-card strong {
  display: block;
  margin: 5px 0 7px;
  color: #ddd6fe;
  font-family: var(--mono);
  font-size: 23px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-shadow: 0 0 24px rgba(139, 92, 246, 0.4);
}

.countdown-track {
  height: 3px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(148, 163, 184, 0.14);
}

.countdown-track span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #8b5cf6, #22d3ee);
  transition: width 1s linear;
}

.countdown-card p {
  margin: 7px 0 0;
  color: #475569;
  font-size: 9.5px;
}

.invite-link {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted-2);
  font-size: 10.5px;
  text-align: left;
  transition: border-color 0.16s ease;
}

.invite-link:hover {
  border-color: rgba(139, 92, 246, 0.4);
}

.invite-link span {
  flex: 0 0 auto;
}

.invite-link code {
  overflow: hidden;
  color: #64748b;
  font-family: var(--mono);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.chat-pane {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 78% 0%, rgba(139, 92, 246, 0.11), transparent 42%),
    linear-gradient(180deg, rgba(15, 22, 40, 0.84), rgba(8, 13, 25, 0.93));
  box-shadow:
    0 30px 80px -40px rgba(0, 0, 0, 0.9),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(26px);
}

.empty-state {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
}

.empty-orbit {
  position: relative;
  display: grid;
  place-items: center;
  width: 190px;
  height: 190px;
  margin-bottom: 22px;
}

.orbit {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 50%;
}

.orbit-1 {
  border-top-color: rgba(139, 92, 246, 0.55);
  animation: orbit 14s linear infinite;
}

.orbit-2 {
  inset: 26px;
  border-right-color: rgba(34, 211, 238, 0.5);
  animation: orbit 9s linear infinite reverse;
}

.orbit-moon {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #a78bfa, #6d28d9 60%, #4c1d95);
  box-shadow:
    0 0 50px rgba(139, 92, 246, 0.4),
    inset -16px -10px 0 rgba(8, 13, 25, 0.5);
  color: #ede9fe;
  font-size: 30px;
}

.empty-state h2 {
  margin: 0;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.empty-state > p {
  margin: 9px 0 24px;
  color: var(--muted-2);
  font-size: 13px;
}

.empty-actions {
  display: flex;
  gap: 10px;
}

.empty-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 30px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--muted-2);
  font-size: 10.5px;
}

.chat {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.chat-head {
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 16, 30, 0.5);
  backdrop-filter: blur(18px);
}

.chat-head .back {
  display: none;
}

.chat-title {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.chat-title strong {
  overflow: hidden;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.presence {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted-2);
  font-size: 10.5px;
}

.presence i {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #475569;
}

.presence.is-online {
  color: #6ee7b7;
}

.presence.is-online i {
  background: var(--ok);
  box-shadow: 0 0 7px rgba(52, 211, 153, 0.8);
}

.chat-tools {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-left: auto;
}

.head-countdown {
  display: grid;
  gap: 1px;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(5, 9, 18, 0.45);
  text-align: right;
}

.head-countdown span {
  color: var(--muted-2);
  font-size: 8.5px;
  letter-spacing: 0.08em;
}

.head-countdown strong {
  color: #c4b5fd;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.menu-wrap {
  position: relative;
}

.menu {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  z-index: 20;
  min-width: 132px;
  padding: 5px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: #131c31;
  box-shadow: 0 18px 40px -14px rgba(0, 0, 0, 0.85);
  animation: fadeUp 0.14s ease;
}

.menu button {
  width: 100%;
  padding: 8px 10px;
  border-radius: 7px;
  color: #cbd5e1;
  font-size: 12px;
  text-align: left;
}

.menu button:hover {
  background: rgba(148, 163, 184, 0.1);
}

.menu button.danger {
  color: #fda4af;
}

.menu button.danger:hover {
  background: rgba(251, 113, 133, 0.1);
}

/* ------------------------------- messages ------------------------------ */

.messages {
  flex: 1;
  min-height: 0;
  padding: 20px clamp(16px, 4vw, 46px) 8px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
}

.messages-inner {
  display: flex;
  flex-direction: column;
  max-width: 900px;
  min-height: 100%;
  margin: 0 auto;
}

.day-rule {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0 4px;
  color: #475569;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.day-rule::before,
.day-rule::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.chat-notice {
  align-self: center;
  margin: 10px 0 4px;
  padding: 6px 13px;
  border: 1px solid rgba(251, 191, 36, 0.12);
  border-radius: 99px;
  background: rgba(251, 191, 36, 0.045);
  color: #8d8066;
  font-size: 10px;
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  padding: 6px 0 10px;
}

.load-more-wrap .btn {
  color: var(--muted-2);
  font-size: 11px;
}

.msg-row {
  display: flex;
  gap: 9px;
  align-items: flex-end;
  max-width: min(78%, 640px);
  margin-top: 9px;
  animation: fadeUp 0.18s ease both;
}

.msg-row.mine {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.msg-avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 29px;
  height: 29px;
  margin-bottom: 17px;
  border-radius: 9px;
  background-color: var(--avatar-color);
  background-image: linear-gradient(145deg, rgba(255, 255, 255, 0.28), rgba(0, 0, 0, 0.2));
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  user-select: none;
}

.msg-body {
  min-width: 0;
}

.bubble {
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 17px 17px 17px 6px;
  background: rgba(24, 34, 56, 0.88);
  color: #e2e8f0;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.msg-row.mine .bubble {
  border-color: rgba(139, 92, 246, 0.55);
  border-radius: 17px 17px 6px 17px;
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  color: #fff;
  box-shadow: 0 8px 22px -12px rgba(139, 92, 246, 0.9);
}

.msg-row.pending .bubble {
  opacity: 0.62;
}

.msg-row.failed .bubble {
  border-color: rgba(251, 113, 133, 0.55);
  background: rgba(159, 18, 57, 0.55);
}

.msg-meta {
  display: flex;
  gap: 7px;
  align-items: center;
  margin-top: 4px;
  padding: 0 3px;
  color: #475569;
  font-family: var(--mono);
  font-size: 9px;
}

.msg-row.mine .msg-meta {
  justify-content: flex-end;
}

.msg-meta .status {
  color: #64748b;
}

.msg-meta .status.read {
  color: #a5b4fc;
}

.msg-row.failed .msg-meta .status {
  color: #fda4af;
  cursor: pointer;
}

.msg-row.failed .msg-meta .status:hover {
  text-decoration: underline;
}

.msg-row.continued {
  margin-top: 2px;
}

.msg-row.continued .msg-avatar {
  visibility: hidden;
  height: 0;
  margin: 0;
}

.chat-empty {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 16px;
  text-align: center;
}

.chat-empty .empty-moon {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(139, 92, 246, 0.07);
  color: #c4b5fd;
  font-size: 26px;
}

.chat-empty strong {
  font-size: 15px;
  font-weight: 600;
}

.chat-empty p {
  margin: 6px 0 18px;
  color: var(--muted-2);
  font-size: 11.5px;
}

.suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: center;
}

.suggestion {
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: rgba(148, 163, 184, 0.04);
  color: var(--muted);
  font-size: 11px;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.suggestion:hover {
  border-color: rgba(139, 92, 246, 0.4);
  background: rgba(139, 92, 246, 0.09);
  color: #ddd6fe;
}

.message-skeleton {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px 4px;
}

.skeleton-row {
  display: flex;
  gap: 9px;
  align-items: flex-end;
}

.skeleton-row.mine {
  flex-direction: row-reverse;
}

.skeleton-bubble {
  width: 42%;
  height: 42px;
  border-radius: 16px;
  background: linear-gradient(
    90deg,
    rgba(148, 163, 184, 0.07),
    rgba(148, 163, 184, 0.13),
    rgba(148, 163, 184, 0.07)
  );
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}

.skeleton-row:nth-child(2) .skeleton-bubble {
  width: 30%;
}

.skeleton-row:nth-child(3) .skeleton-bubble {
  width: 55%;
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

/* -------------------------------- composer ----------------------------- */

.jump-latest {
  position: absolute;
  bottom: 116px;
  left: 50%;
  z-index: 4;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 99px;
  background: #131c31;
  color: #c4b5fd;
  font-size: 10.5px;
  box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.8);
  transform: translateX(-50%);
}

.composer {
  z-index: 3;
  padding: 10px clamp(16px, 4vw, 46px) 13px;
  border-top: 1px solid var(--line);
  background: rgba(8, 13, 25, 0.55);
  backdrop-filter: blur(18px);
}

.composer-box {
  display: flex;
  align-items: flex-end;
  gap: 9px;
  max-width: 900px;
  margin: 0 auto;
  padding: 7px 7px 7px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: rgba(5, 9, 18, 0.6);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.composer-box:focus-within {
  border-color: rgba(139, 92, 246, 0.55);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.composer textarea {
  flex: 1;
  min-height: 26px;
  max-height: 150px;
  padding: 7px 0;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 14px;
  line-height: 1.55;
  resize: none;
}

.composer textarea::placeholder {
  color: #475569;
}

.send-btn {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, #8b5cf6, #22d3ee);
  color: #fff;
  box-shadow: 0 6px 18px -7px rgba(139, 92, 246, 0.9);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.send-btn:not(:disabled):hover {
  transform: translateY(-1px);
}

.send-btn:disabled {
  opacity: 0.25;
  box-shadow: none;
}

.send-btn svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.composer-foot {
  display: flex;
  justify-content: space-between;
  max-width: 900px;
  margin: 6px auto 0;
  padding: 0 5px;
  color: #3f4c63;
  font-size: 9.5px;
}

/* --------------------------------- modal ------------------------------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(3, 6, 15, 0.72);
  backdrop-filter: blur(9px);
  animation: fadeUp 0.16s ease;
}

.modal {
  display: flex;
  flex-direction: column;
  width: min(560px, 100%);
  max-height: min(84vh, 720px);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background: linear-gradient(180deg, #111a2d, #0d1424);
  box-shadow: 0 50px 120px -30px rgba(0, 0, 0, 0.95);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 16px;
}

.modal-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.modal-head p {
  margin: 5px 0 0;
  color: var(--muted-2);
  font-size: 11.5px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 24px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: rgba(5, 9, 18, 0.55);
  transition: border-color 0.18s ease;
}

.search-box:focus-within {
  border-color: rgba(139, 92, 246, 0.6);
}

.search-box svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--muted-2);
  stroke-linecap: round;
  stroke-width: 1.8;
}

.search-box input {
  flex: 1;
  height: 44px;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 13.5px;
}

.search-box input::placeholder {
  color: #475569;
}

.search-box input::-webkit-search-cancel-button {
  filter: invert(0.5);
}

.search-spinner {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(148, 163, 184, 0.25);
  border-top-color: #a78bfa;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.search-hint {
  margin: 9px 27px 4px;
  color: #475569;
  font-size: 10.5px;
}

.search-results {
  flex: 1;
  min-height: 110px;
  max-height: 320px;
  padding: 4px 14px 10px;
  overflow-y: auto;
}

.search-user {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 10px;
  border-radius: 13px;
  transition: background 0.15s ease;
}

.search-user:hover {
  background: rgba(148, 163, 184, 0.05);
}

.search-user .avatar {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  font-size: 13px;
}

.search-user .meta {
  flex: 1;
  min-width: 0;
}

.search-user strong {
  display: block;
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-user .meta span {
  display: block;
  overflow: hidden;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.relation-badge {
  flex: 0 0 auto;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--muted-2);
  font-size: 10px;
  white-space: nowrap;
}

.search-action {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: 9px;
  background: rgba(139, 92, 246, 0.12);
  color: #c4b5fd;
  font-size: 11px;
  font-weight: 600;
}

.search-action:hover {
  background: rgba(139, 92, 246, 0.2);
}

.search-action.accept {
  border-color: rgba(52, 211, 153, 0.3);
  background: rgba(52, 211, 153, 0.1);
  color: #6ee7b7;
}

.empty-result {
  padding: 34px 12px;
  color: var(--muted-2);
  font-size: 12px;
  line-height: 1.7;
  text-align: center;
}

.modal-requests {
  max-height: 210px;
  padding: 12px 24px 4px;
  overflow-y: auto;
  border-top: 1px solid var(--line);
}

.modal-requests h3 {
  margin: 0 0 4px;
  color: var(--muted-2);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px 18px;
  border-top: 1px solid var(--line);
}

.modal-foot p {
  margin: 0;
  color: #475569;
  font-size: 10.5px;
}

/* -------------------------------- toasts -------------------------------- */

.toasts {
  position: fixed;
  bottom: 22px;
  left: 50%;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  width: min(440px, calc(100vw - 32px));
  pointer-events: none;
  transform: translateX(-50%);
}

.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: 100%;
  padding: 10px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(19, 28, 49, 0.96);
  color: #dbe4f5;
  font-size: 12px;
  line-height: 1.5;
  box-shadow: 0 18px 45px -16px rgba(0, 0, 0, 0.9);
  pointer-events: auto;
  animation: toastIn 0.22s ease both;
  backdrop-filter: blur(16px);
}

.toast.is-out {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast .toast-icon {
  flex: 0 0 auto;
  font-size: 14px;
}

.toast.success {
  border-color: rgba(52, 211, 153, 0.28);
}

.toast.error {
  border-color: rgba(251, 113, 133, 0.32);
}

.toast.message {
  border-color: rgba(139, 92, 246, 0.3);
}

.conn-banner {
  position: fixed;
  top: 14px;
  left: 50%;
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid rgba(251, 191, 36, 0.24);
  border-radius: 99px;
  background: rgba(41, 32, 12, 0.92);
  color: #fcd34d;
  font-size: 11px;
  box-shadow: 0 12px 30px -12px rgba(0, 0, 0, 0.8);
  transform: translateX(-50%);
}

.conn-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fbbf24;
  animation: pulse 1.4s ease-in-out infinite;
}

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

@media (max-width: 1120px) {
  .app {
    grid-template-columns: 326px minmax(0, 1fr);
  }
}

@media (max-width: 960px) {
  .auth {
    grid-template-columns: 1fr;
    max-width: 560px;
    gap: 36px;
    padding: 56px 24px 40px;
    align-items: start;
  }

  .auth-hero {
    text-align: center;
  }

  .eyebrow {
    margin: 0 auto;
  }

  .auth h1 {
    margin: 22px 0 16px;
    font-size: clamp(40px, 8.5vw, 56px);
  }

  .lede {
    margin: 0 auto;
    font-size: 14px;
  }

  .lede br {
    display: none;
  }

  .feature-list {
    display: none;
  }

  .hero-status {
    justify-content: center;
    margin-top: 22px;
  }

  .auth-meta {
    margin-bottom: 16px;
  }
}

@media (max-width: 820px) {
  body {
    background: var(--bg);
  }

  .app {
    display: block;
    height: 100dvh;
    padding: 0;
  }

  .sidebar {
    width: 100%;
    height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .chat-pane {
    position: fixed;
    inset: 0;
    z-index: 20;
    border: 0;
    border-radius: 0;
    transform: translateX(101%);
    transition: transform 0.26s cubic-bezier(0.32, 0.72, 0, 1);
  }

  body.in-chat .chat-pane {
    transform: translateX(0);
  }

  .chat-head .back {
    display: grid;
  }

  .head-countdown {
    display: none;
  }

  .empty-state {
    display: none;
  }

  .messages {
    padding: 14px 14px 6px;
  }

  .composer {
    padding: 8px 12px calc(10px + env(safe-area-inset-bottom));
  }

  .composer-foot span:last-child {
    display: none;
  }

  .msg-row {
    max-width: 86%;
  }

  .modal-backdrop {
    align-items: end;
    padding: 0;
  }

  .modal {
    width: 100%;
    max-height: 88dvh;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 24px 24px 0 0;
  }

  .modal-foot {
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
  }

  .toasts {
    bottom: calc(16px + env(safe-area-inset-bottom));
  }

  .side-head {
    padding-top: calc(14px + env(safe-area-inset-top));
  }
}

@media (max-width: 480px) {
  .auth {
    padding: 44px 16px 32px;
  }

  .auth-card {
    padding: 20px;
    border-radius: 22px;
  }

  .auth h1 {
    font-size: 38px;
  }

  .lede {
    font-size: 13px;
  }

  .empty-actions {
    flex-direction: column;
    width: 100%;
    max-width: 240px;
  }

  .modal-head,
  .modal-foot,
  .modal-requests {
    padding-right: 18px;
    padding-left: 18px;
  }

  .search-box {
    margin: 0 18px;
  }

  .search-hint {
    margin-left: 21px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
