:root {
  --wa-green: #4f46e5;
  --wa-green-dark: #3730a3;
  --badge: #6366f1;
  --tick: #4f46e5;
  --header: #ffffff;
  --bg: #f6f7fb;
  --chat-bg: #eef1f8;
  --bubble-out: #e7e9ee;
  --bubble-in: #ffffff;
  --text: #111b21;
  --muted: #667781;
  --border: #e9edef;
  --hover: #f5f6f6;
  --active: #f0f2f5;
  --search: #f0f2f5;
  --icon: #54656f;
  --composer: #f0f2f5;
  --panel: #ffffff;
  --empty: #f0f2f5;
  --notice: #ffeecd;
  --shadow: 0 1px 0.5px rgba(11, 20, 26, 0.13);
  color-scheme: light;
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

:root.dark {
  --header: #202c33;
  --bg: #111b21;
  --chat-bg: #0b141a;
  --bubble-out: #3a3f46;
  --bubble-in: #202c33;
  --text: #e9edef;
  --muted: #8696a0;
  --border: rgba(255, 255, 255, 0.08);
  --hover: #202c33;
  --active: #2a3942;
  --search: #202c33;
  --icon: #aebac1;
  --composer: #202c33;
  --panel: #111b21;
  --empty: #222e35;
  --notice: #182229;
  --shadow: none;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
@supports (height: 100dvh) {
  html, body, #app { height: 100dvh; }
}
body {
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea { font-family: inherit; color: inherit; }
button { touch-action: manipulation; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--wa-green);
  outline-offset: 2px;
}
[hidden] { display: none !important; }
#app { height: 100%; }
body[data-view="qr"] { overflow: auto; }
body[data-view="qr"] #app { height: auto; min-height: 100%; overflow: visible; }

.netbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  background: #fff3c4;
  color: #3b4a54;
  text-align: center;
  font-size: 14px;
  padding: calc(8px + env(safe-area-inset-top)) 12px 8px;
  transform: translateY(-110%);
  transition: transform .2s ease;
}
.netbar.show { transform: translateY(0); }
html.native-app { --kb: 0px; }
html.native-app #app { height: calc(100% - var(--kb)); }
:root.dark .netbar { background: #3d3416; color: #ffe8a3; }

#toasts {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  width: max-content;
  max-width: calc(100% - 32px);
}
body.role-phone #toasts { bottom: calc(150px + env(safe-area-inset-bottom)); }
.toast {
  background: #111b21;
  color: #fff;
  padding: 10px 16px;
  border-radius: 24px;
  font-size: 14px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}

.splash, .syncing {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  gap: 18px;
}
.splash-name, .syncing h2 {
  margin-top: auto;
  margin-bottom: 48px;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: .2px;
  font-size: 18px;
}
.logo-wrap {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  color: var(--wa-green);
}
.spin {
  width: 28px; height: 28px;
  border: 3px solid var(--border);
  border-top-color: var(--wa-green);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.login {
  min-height: 100%;
  background: #f0f2f5;
  position: relative;
  padding: 28px 16px 48px;
}
.login::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 222px;
  background: #4f46e5;
}
:root.dark .login { background: #0b141a; }
:root.dark .login::before { background: #3730a3; }
.login-card {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  background: #fff;
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  min-height: 600px;
  box-shadow: 0 17px 50px rgba(11,20,26,.06), 0 1px 2px rgba(11,20,26,.08);
}
:root.dark .login-card { background: #111b21; }
.login-copy { padding: 48px 48px 32px; }
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--wa-green);
  font-weight: 700;
  font-size: 20px;
  margin-bottom: 28px;
}
.login-copy h1 {
  font-size: 28px;
  font-weight: 400;
  margin: 0 0 28px;
  color: var(--text);
  line-height: 1.3;
}
.steps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 18px; }
.steps li { display: flex; gap: 14px; color: var(--text); font-size: 16px; line-height: 1.45; }
.num {
  width: 22px; height: 22px; flex: none;
  border-radius: 50%;
  background: var(--search);
  color: var(--muted);
  display: grid; place-items: center;
  font-size: 13px;
  margin-top: 1px;
}
.keep-row, .disc, .ip-line, .code-line { color: var(--muted); font-size: 14px; }
.keep-row { display: flex; align-items: center; gap: 10px; margin-top: 28px; }
.keep-row input { width: 18px; height: 18px; accent-color: var(--wa-green); }
.disc { margin-top: 22px; line-height: 1.45; max-width: 460px; }
.qr-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  gap: 14px;
}
.qr-ring {
  --p: 100;
  padding: 8px;
  border-radius: 12px;
  background: conic-gradient(var(--wa-green) calc(var(--p) * 1%), #e9edef 0);
}
:root.dark .qr-ring { background: conic-gradient(var(--wa-green) calc(var(--p) * 1%), #2a3942 0); }
.qr-box {
  position: relative;
  background: #fff;
  padding: 12px;
  border-radius: 8px;
  min-width: 264px;
  min-height: 264px;
  display: grid;
  place-items: center;
}
.qr-box img { width: 240px; height: 240px; display: block; }
.qr-logo {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 12px;
  padding: 4px;
  box-shadow: 0 0 0 4px #fff;
  color: var(--wa-green);
  display: grid;
}
.code-line { font-variant-numeric: tabular-nums; }
.code-line strong { color: var(--text); letter-spacing: 1px; font-size: 16px; }
.linkish, .text-btn {
  background: none;
  border: 0;
  color: var(--wa-green-dark);
  cursor: pointer;
  font-size: 14px;
  padding: 0;
}
:root.dark .linkish, :root.dark .text-btn { color: #06cf9c; }
.demo-btn {
  margin-top: 8px;
  background: var(--wa-green);
  color: white;
  border: 0;
  border-radius: 24px;
  padding: 10px 16px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}
.demo-btn:hover { filter: brightness(1.05); }
.ip-line { text-align: center; line-height: 1.4; max-width: 280px; }
@media (max-width: 800px) {
  .login-card { grid-template-columns: 1fr; }
  .login-copy { padding: 28px 22px 8px; }
  .login-copy h1 { font-size: 24px; }
}

@media (min-width: 521px) {
  body.role-phone { background: #d5dbd1; }
  body.role-phone #app {
    max-width: 460px;
    margin: 0 auto;
    box-shadow: 0 12px 40px rgba(11, 20, 26, .18);
    background: var(--bg);
    position: relative;
  }
}
body.role-phone #app { height: 100%; overflow: hidden; background: var(--bg); }

.web { height: 100%; display: flex; min-height: 0; background: var(--bg); }
.side {
  width: 400px;
  flex: none;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid var(--border);
  background: var(--bg);
}
@media (max-width: 1100px) { .side { width: 340px; } }
.main { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--empty); position: relative; }
.side-head, .chathead, .subhead, .phone-top {
  height: 60px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 8px 0 16px;
  background: var(--header);
}
.phone-top { background: var(--bg); padding-right: 8px; }
body.role-phone .phone-top,
body.role-phone .subhead,
body.role-phone .chathead {
  height: calc(64px + env(safe-area-inset-top));
  padding-top: env(safe-area-inset-top);
  background:
    linear-gradient(180deg, rgba(99, 102, 241, .16), transparent 78%),
    var(--bg);
  box-shadow: none;
}
body.role-phone .chathead {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .5), transparent 78%),
    #f4f5f7;
}
:root.dark body.role-phone .chathead {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .06), transparent 80%),
    #121416;
}
body.role-phone .chathead .icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(28, 31, 36, .06);
  color: #3a3f46;
}
:root.dark body.role-phone .chathead .icon-btn {
  background: rgba(255, 255, 255, .08);
  color: #e7e9ee;
}
body.role-phone .chathead .icon-btn[data-action="call"],
body.role-phone .chathead .icon-btn[data-action="video-call"] {
  background: #e7e9ee;
  color: #1c1f24;
  box-shadow: 0 8px 16px rgba(0, 0, 0, .12);
}
:root.dark body.role-phone .chathead .icon-btn[data-action="call"],
:root.dark body.role-phone .chathead .icon-btn[data-action="video-call"] {
  background: #2a2e34;
  color: #f2f4f7;
  box-shadow: 0 8px 16px rgba(0, 0, 0, .28);
}
.ico-back { display: inline-grid; place-items: center; animation: back-nudge 1.35s ease-in-out infinite; }
.ico-back svg { display: block; }
@keyframes back-nudge {
  0%, 70%, 100% { transform: translateX(0); }
  35% { transform: translateX(-5px); }
}
body.role-phone .subhead .icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(79, 70, 229, .14);
  color: #4338ca;
}
:root.dark body.role-phone .subhead .icon-btn { color: #c7d2fe; background: rgba(129, 140, 248, .18); }
.side-head .avatar, .phone-top .avatar { cursor: pointer; }
.spacer { flex: 1; }
.wordmark {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: var(--wa-green);
  letter-spacing: -0.3px;
  transition: opacity .2s ease;
}
.phone-top { position: relative; }
.list-title {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -36%);
  opacity: 0;
  font-size: 17px;
  font-weight: 650;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.phone-top.show-title .list-title { opacity: 1; transform: translate(-50%, -50%); }
.phone-top.show-title .wordmark { opacity: 0; }
.phone-top .head-ico { color: #3a3f46; }
:root.dark .phone-top .head-ico { color: #f4f6f8; }
.ico-dots { display: flex; flex-direction: column; gap: 3px; align-items: center; }
.ico-dots i {
  width: 4px; height: 4px; border-radius: 50%; background: currentColor; display: block;
  animation: dot-wave 1.5s ease-in-out infinite;
}
.ico-dots i:nth-child(2) { animation-delay: .16s; }
.ico-dots i:nth-child(3) { animation-delay: .32s; }
@keyframes dot-wave {
  0%, 70%, 100% { transform: scale(1); opacity: .4; }
  35% { transform: scale(1.4); opacity: 1; }
}
.ico-cam {
  width: 24px; height: 18px; border: 1.8px solid currentColor; border-radius: 5px;
  position: relative; display: grid; place-items: center;
  animation: cam-float 3.2s ease-in-out infinite;
}
.ico-cam::before {
  content: ""; position: absolute; top: -5px; left: 6px; width: 8px; height: 4px;
  border: 1.8px solid currentColor; border-bottom: 0; border-radius: 3px 3px 0 0;
}
.ico-cam i {
  width: 8px; height: 8px; border: 1.8px solid currentColor; border-radius: 50%;
  animation: cam-lens 3.2s ease-in-out infinite;
}
.ico-cam b {
  position: absolute; top: 2px; right: 3px; width: 3px; height: 3px; border-radius: 50%;
  background: currentColor; animation: cam-flash 3.2s ease-in-out infinite;
}
@keyframes cam-float { 50% { transform: translateY(-1px); } }
@keyframes cam-lens { 50% { transform: scale(.72); } }
@keyframes cam-flash { 0%, 40%, 100% { opacity: .35; } 55% { opacity: 1; } }
.ico-gear { width: 22px; height: 22px; position: relative; display: grid; place-items: center; animation: gear-turn 9s linear infinite; }
.ico-gear i {
  width: 20px; height: 20px; background: currentColor; display: block;
  clip-path: polygon(40% 0, 60% 0, 66% 14%, 82% 8%, 92% 22%, 80% 34%, 100% 40%, 100% 60%, 80% 66%, 92% 82%, 78% 92%, 66% 80%, 60% 100%, 40% 100%, 34% 80%, 18% 92%, 8% 78%, 20% 66%, 0 60%, 0 40%, 20% 34%, 8% 18%, 22% 8%, 34% 14%);
}
.ico-gear b {
  position: absolute; width: 6px; height: 6px; border-radius: 50%; z-index: 1;
  background: var(--bg); box-shadow: 0 0 0 1.6px currentColor;
}
@keyframes gear-turn { to { transform: rotate(360deg); } }
.phone-top .head-ico.danger-icon { color: #e11d48; }
.ico-x { width: 16px; height: 16px; position: relative; animation: ico-tilt 2.6s ease-in-out infinite; }
.ico-x i {
  position: absolute; left: 7px; top: 0; width: 2px; height: 16px; border-radius: 2px; background: currentColor; display: block;
}
.ico-x i:first-child { transform: rotate(45deg); }
.ico-x i:last-child { transform: rotate(-45deg); }
@keyframes ico-tilt { 50% { transform: rotate(90deg); } }
.ico-checks { position: relative; width: 22px; height: 16px; }
.ico-checks i {
  position: absolute; width: 9px; height: 5px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(-45deg); animation: check-pop 1.6s ease-in-out infinite;
}
.ico-checks i:first-child { left: 0; top: 7px; }
.ico-checks i:last-child { left: 8px; top: 4px; animation-delay: .18s; }
@keyframes check-pop { 40% { transform: rotate(-45deg) scale(1.18); } }
.ico-trash { width: 16px; height: 18px; position: relative; }
.ico-trash i {
  position: absolute; left: 1px; bottom: 0; width: 14px; height: 12px; display: block;
  border: 1.8px solid currentColor; border-top: 0; border-radius: 0 0 3px 3px;
}
.ico-trash b {
  position: absolute; left: 0; top: 3px; width: 16px; height: 2px; border-radius: 2px; background: currentColor;
  animation: lid-lift 1.8s ease-in-out infinite;
}
.ico-trash b::before {
  content: ""; position: absolute; left: 4px; top: -5px; width: 6px; height: 3px;
  border: 1.8px solid currentColor; border-bottom: 0; border-radius: 3px 3px 0 0;
}
@keyframes lid-lift { 45% { transform: translateY(-2px) rotate(-6deg); } }
.chat-item .tickbox.on::after {
  content: "";
  width: 8px; height: 4px;
  border-left: 2px solid #fff; border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translateY(-1px);
}
.icon-btn {
  width: 40px; height: 40px;
  border: 0; background: transparent;
  color: var(--icon);
  border-radius: 50%;
  display: grid; place-items: center;
  flex: none;
  cursor: pointer;
}
.icon-btn:hover { background: rgba(11,20,26,.06); }
:root.dark .icon-btn:hover { background: rgba(255,255,255,.08); }
.search-wrap { padding: 8px 12px; background: var(--bg); }
.search-wrap input, .field input, .field textarea, .manual input, .inchat input {
  width: 100%;
  border: 0;
  background: var(--search);
  border-radius: 8px;
  padding: 9px 12px 9px 36px;
  font-size: 14px;
  outline: none;
}
.search-wrap { position: relative; }
.search-wrap .mag {
  position: absolute;
  left: 22px; top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.search-wrap.chat-search {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 50px;
  margin: 2px 16px 12px;
  padding: 0 14px 0 8px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(17, 19, 24, .08);
  box-shadow: 0 1px 2px rgba(17, 19, 24, .04);
  transition: border-color .18s ease, box-shadow .18s ease;
}
:root.dark .search-wrap.chat-search {
  background: rgba(168, 174, 184, .1);
  border-color: rgba(255, 255, 255, .08);
  box-shadow: none;
  backdrop-filter: saturate(160%) blur(22px);
  -webkit-backdrop-filter: saturate(160%) blur(22px);
}
.search-wrap.chat-search:focus-within {
  border-color: rgba(17, 19, 24, .28);
  box-shadow: 0 0 0 3px rgba(17, 19, 24, .06);
}
:root.dark .search-wrap.chat-search:focus-within {
  border-color: rgba(244, 246, 248, .4);
  box-shadow: 0 0 0 3px rgba(244, 246, 248, .08);
}
.search-wrap.chat-search .mag {
  position: static;
  left: auto;
  top: auto;
  transform: none;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 12px;
  background: #eceef2;
  color: #3a3f46;
  display: grid;
  place-items: center;
  flex: none;
}
.search-wrap.chat-search .mag::after { content: none; }
:root.dark .search-wrap.chat-search .mag {
  background: rgba(255, 255, 255, .06);
  color: #d7dbe2;
}
.search-wrap.chat-search .mag svg { display: block; }
.search-wrap.chat-search input {
  flex: 1;
  min-width: 0;
  width: auto;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: 15px;
}
.search-wrap.chat-search input::placeholder { color: #8b939e; }
.search-wrap.chat-search input:focus,
.search-wrap.chat-search input:focus-visible {
  outline: none;
  border: 0;
  box-shadow: none;
}
.chips {
  display: flex; gap: 8px;
  padding: 0 12px 8px;
  overflow-x: auto;
  background: var(--bg);
}
.chips.chat-chips {
  width: 100%;
  box-sizing: border-box;
  justify-content: center;
  padding-left: 16px;
  padding-right: 16px;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  border: 0;
  background: var(--search);
  color: var(--muted);
  border-radius: 16px;
  padding: 6px 12px;
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
}
.chip.on { background: #e0e7ff; color: #3730a3; }
:root.dark .chip.on { background: #312e81; color: #e0e7ff; }
.presence-note {
  margin: 0 12px 8px;
  background: #e0e7ff;
  color: #312e81;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  line-height: 1.4;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
:root.dark .presence-note { background: #312e81; color: #e0e7ff; }
.presence-note button {
  border: 0;
  background: var(--wa-green);
  color: white;
  border-radius: 14px;
  padding: 4px 10px;
  cursor: pointer;
}
.list-scroll { flex: 1; overflow-y: auto; min-height: 0; background: var(--bg); }
.chat-item {
  width: 100%;
  display: flex;
  gap: 0;
  align-items: stretch;
  padding: 0 0 0 13px;
  background: transparent;
  border: 0;
  text-align: left;
  cursor: pointer;
  color: inherit;
}
.chat-item:hover { background: var(--hover); }
.chat-item.active, .chat-item.active:hover { background: var(--active); }
.avatar {
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 600;
  flex: none;
  user-select: none;
}
.avatar.lg { width: 49px; height: 49px; font-size: 18px; margin: 10px 13px 10px 0; }
.avatar.md { width: 40px; height: 40px; font-size: 16px; }
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.avatar.xl { width: 120px; height: 120px; font-size: 42px; }
.avatar.group { background: #dfe5e7 !important; color: #54656f; font-size: 22px; }
:root.dark .avatar.group { background: #6b7b85 !important; color: #fff; }
.meta-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 12px 14px 12px 0;
  border-bottom: 1px solid var(--border);
}
.list-scroll .meta-col { border-bottom: 0; }
.list-scroll .chat-item { position: relative; border-bottom: 0; }
.list-scroll .chat-item::after {
  content: "";
  position: absolute;
  left: 68px;
  right: 0;
  bottom: 0;
  height: 1px;
  background: rgba(140, 152, 164, .32);
  pointer-events: none;
}
:root.dark .list-scroll .chat-item::after { background: rgba(244, 246, 248, .12); }
.name-row, .preview-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.name {
  font-size: 17px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-item.unread .name { font-weight: 650; }
.preview {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  color: var(--muted);
}
.chat-item.unread .preview { color: var(--text); font-weight: 500; }
.chat-item.unread .preview,
.chat-item.unread .badge { animation: unread-glow 1.6s ease-in-out infinite; }
@keyframes unread-glow { 50% { opacity: .4; } }
.chat-item .avatar.ring-fresh { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px #22c55e; }
.chat-item .avatar.ring-seen { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px #3b82f6; }
.time { font-size: 12px; color: var(--muted); flex: none; }
.chat-item.unread .time { color: var(--badge); }
.badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--badge);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  display: inline-grid;
  place-items: center;
}
.badge.muted, .nav-badge.muted { background: #8696a0; }
.mini-ticks { color: #8696a0; display: inline-flex; flex: none; }
.mini-ticks.read { color: var(--tick); }
.pin { color: var(--muted); display: inline-flex; }

.empty {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px 24px 0;
  background: var(--empty);
  border-bottom: 6px solid var(--wa-green);
  position: relative;
}
.empty-logo { color: #cfd6db; margin-bottom: 16px; }
:root.dark .empty-logo { color: #374045; }
.empty h2 { font-weight: 300; font-size: 32px; margin: 0 0 12px; color: var(--muted); }
.empty p { margin: 0; max-width: 460px; color: var(--muted); line-height: 1.5; font-size: 14px; }
.lockline {
  margin-top: auto;
  padding: 16px;
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 13px;
}

.chathead .who { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.chathead .who strong, .subhead h1 {
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.subhead h1 { margin: 0; font-size: 19px; }
.sub { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sub.online { color: var(--wa-green); }
.msgs {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: var(--chat-bg);
  position: relative;
  display: flex;
  flex-direction: column;
}
.msgs-scroll {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 12px 4% 8px;
  position: relative;
  z-index: 1;
}
.msgs.is-empty .msgs-scroll { overflow: hidden; }
.msgs::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("doodle.svg") center / 360px repeat;
  opacity: .35;
  pointer-events: none;
  animation: doodle-drift 26s linear infinite;
}
.msgs::after {
  content: "";
  position: absolute;
  inset: -30%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 24% 18%, rgba(255, 255, 255, .16), transparent 36%),
    radial-gradient(circle at 82% 72%, rgba(180, 186, 196, .14), transparent 34%),
    radial-gradient(circle at 12% 84%, rgba(90, 96, 106, .16), transparent 32%);
  animation: wall-glow 16s ease-in-out infinite alternate;
}
@keyframes doodle-drift { to { background-position: 180px 90px; } }
@keyframes wall-glow { to { transform: translate3d(-6%, -4%, 0) scale(1.1); } }
:root.dark .msgs::before { opacity: .25; filter: invert(1); }
.row, .daychip, .notice, .sys { position: relative; z-index: 1; }
.daychip, .notice, .sys {
  width: fit-content;
  margin: 8px auto;
  background: var(--notice);
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.35;
  text-align: center;
  padding: 6px 12px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  max-width: min(480px, 90%);
}
.notice { display: flex; gap: 6px; align-items: flex-start; }
.row { display: flex; margin: 2px 0; }
.row.out { justify-content: flex-end; }
.row.in { justify-content: flex-start; }
.row.spaced { margin-bottom: 8px; }
.reply-hit {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 24px;
  height: 24px;
  opacity: 0;
}
.bubble:hover .reply-hit,
.bubble:focus-within .reply-hit { opacity: .8; }
@media (hover: none) { .reply-hit { opacity: .45; } }
.bubble {
  position: relative;
  max-width: min(78%, 620px);
  padding: 6px 8px 4px 9px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  line-height: 19px;
  font-size: 14.2px;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}
.bubble.in { background: var(--bubble-in); border-top-left-radius: 0; }
.bubble.out { background: var(--bubble-out); border-top-right-radius: 0; }
.bubble.in.tail::after, .bubble.out.tail::after {
  content: "";
  position: absolute;
  top: 0;
  border-style: solid;
}
.bubble.in.tail::after {
  left: -8px;
  border-width: 0 8px 10px 0;
  border-color: transparent var(--bubble-in) transparent transparent;
}
.bubble.out.tail::after {
  right: -8px;
  border-width: 0 0 10px 8px;
  border-color: transparent transparent transparent var(--bubble-out);
}
.bubble.voice { background: #e7e9ee; color: #1c1f24; }
:root.dark .bubble.voice { background: #2e333a; color: #f2f4f7; }
.bubble.out.voice.tail::after { border-color: transparent transparent transparent #e7e9ee; }
:root.dark .bubble.out.voice.tail::after { border-color: transparent transparent transparent #2e333a; }
.bubble.voice { padding: 8px 10px 18px; min-width: 220px; }
.voice-note { display: flex; align-items: center; gap: 10px; }
.voice-note audio { display: none; }
.voice-play {
  width: 38px; height: 38px; border: 0; border-radius: 50%;
  background: #1a1d22; color: #f4f6f8;
  display: grid; place-items: center; flex: none; cursor: pointer;
}
:root.dark .voice-play { background: #f4f6f8; color: #1a1d22; }
.voice-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.voice-note .wave { height: 28px; cursor: pointer; }
.voice-note .wave i { background: rgba(26, 29, 34, .28); }
.voice-note .wave i.on { background: #1a1d22; }
:root.dark .voice-note .wave i { background: rgba(244, 246, 248, .28); }
:root.dark .voice-note .wave i.on { background: #f4f6f8; }
.voice-len { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.bubble .body a { color: #027eb5; }
.time-space { display: inline-block; width: 64px; height: 1px; }
.meta {
  position: absolute;
  right: 7px;
  bottom: 3px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: var(--muted);
  user-select: none;
}
.bubble { padding-bottom: 16px; }
.ticks { display: inline-flex; color: #8696a0; }
.ticks.read { color: var(--tick); }
.sender { font-size: 12.5px; font-weight: 600; line-height: 1.2; margin-bottom: 2px; }
.quote {
  background: rgba(0,0,0,.06);
  border-left: 4px solid #06cf9c;
  border-radius: 6px;
  padding: 4px 8px;
  margin-bottom: 4px;
}
:root.dark .quote { background: rgba(255,255,255,.06); }
.quote .qn { color: #06cf9c; font-weight: 600; font-size: 12.5px; }
.quote .qt {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
}
.bubble.emoji-only {
  background: transparent !important;
  box-shadow: none;
  font-size: 42px;
  line-height: 1.15;
  padding-bottom: 4px;
}
.bubble.emoji-only .time-space { display: none; }
.bubble.emoji-only .meta { position: static; }
.bubble.emoji-only::after { display: none; }
.bubble.media { padding: 3px 3px 4px; }
.shot {
  width: min(320px, 70vw);
  max-height: 360px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
  cursor: zoom-in;
}
video.shot { object-fit: contain; background: #111; cursor: auto; }
.cap { padding: 4px 6px 0; }
.sender { display: block; font-size: 12px; font-weight: 700; margin-bottom: 2px; }
.group-person {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  font: inherit;
}
.group-person .tickbox { margin: 0; }
.group-person .avatar { margin: 0; }
.group-copy { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.group-copy strong { font-size: 16px; font-weight: 600; line-height: 1.2; }
.group-copy small { color: var(--muted); font-size: 13px; line-height: 1.2; }
.tickbox { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #818cf8; flex: none; display: grid; place-items: center; color: #fff; font-size: 13px; }
.tickbox.on { background: #4f46e5; border-color: #4f46e5; }
.bubble.media { padding-bottom: 4px; }
.bubble.media .meta {
  right: 8px;
  bottom: 8px;
  background: rgba(0,0,0,.45);
  color: #fff;
  border-radius: 8px;
  padding: 1px 6px;
}
.bubble.media .ticks { color: #fff; }
.bubble.media .ticks.read { color: #9be7ff; }
.audio, .filecard, .loc { display: flex; align-items: center; gap: 10px; min-width: 220px; }
.play, .fileicon {
  width: 36px; height: 36px; border-radius: 50%;
  border: 0; background: var(--wa-green); color: white;
  display: grid; place-items: center; cursor: pointer; flex: none;
}
.fileicon { border-radius: 8px; font-size: 11px; font-weight: 700; }
.wave { display: flex; align-items: center; gap: 2px; height: 26px; flex: 1; }
.wave i {
  width: 3px; border-radius: 3px; background: var(--muted); display: block; flex: 1;
  height: calc(var(--h) * 1px); max-height: 100%; transform-origin: center;
}
.filecard small { display: block; color: var(--muted); font-size: 12px; }
.loccard { min-width: 210px; }
.locmap {
  width: 100%; height: 92px; border-radius: 6px;
  background:
    linear-gradient(rgba(90, 96, 106, .16), rgba(90, 96, 106, .16)),
    repeating-linear-gradient(90deg, transparent, transparent 18px, rgba(0,0,0,.05) 19px),
    repeating-linear-gradient(0deg, transparent, transparent 18px, rgba(0,0,0,.05) 19px),
    #e7e9ee;
  position: relative;
}
.locmap::after {
  content: "";
  position: absolute;
  left: 50%; top: 46%;
  width: 14px; height: 14px;
  background: #ea0038;
  border-radius: 50% 50% 50% 0;
  transform: translate(-50%, -50%) rotate(-45deg);
}
.hit { box-shadow: 0 0 0 2px #ffe082; }

.composer-box { position: relative; flex: none; background: #f4f5f7; }
:root.dark .composer-box { background: #16181c; }
.composer-row { display: flex; align-items: flex-end; gap: 8px; padding: 8px 12px calc(10px + env(safe-area-inset-bottom)); }
.composer-row .icon-btn { width: 44px; height: 44px; color: #3a3f46; }
:root.dark .composer-row .icon-btn { color: #e7e9ee; }
.plus-btn { transition: transform .28s cubic-bezier(.2, .8, .2, 1); }
.plus-btn.open { transform: rotate(45deg); }
.composer-row textarea {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  border: 0;
  border-radius: 22px;
  padding: 12px 16px;
  resize: none;
  max-height: 120px;
  min-height: 44px;
  font-size: 16px;
  line-height: 20px;
  background: #ffffff;
  outline: none;
}
:root.dark .composer-row textarea { background: #22262c; color: #f2f4f7; }
#send-btn.ready { background: #3a3f46; color: #fff; }
.attach-sheet {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: calc(100% - 6px);
  z-index: 5;
  padding: 16px 14px 18px;
  border-radius: 24px;
  background: #f7f8fa;
  box-shadow: 0 -18px 40px rgba(0, 0, 0, .16);
  animation: sheet-up .34s cubic-bezier(.16, 1, .3, 1);
}
:root.dark .attach-sheet { background: #1c1f24; box-shadow: 0 -18px 40px rgba(0, 0, 0, .45); }
.attach-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 8px; }
.attach-grid button {
  border: 0;
  background: transparent;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  cursor: pointer;
  animation: tile-in .42s cubic-bezier(.16, 1, .3, 1) both;
}
.attach-ico {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 10px 18px rgba(0, 0, 0, .16);
}
.tone-photo { background: linear-gradient(160deg, #8b939e, #5c6570); }
.tone-camera { background: linear-gradient(160deg, #e7a0a0, #b85c5c); }
.tone-pin { background: linear-gradient(160deg, #9aa3ae, #6b7280); }
.tone-person { background: linear-gradient(160deg, #7c8490, #4b5563); }
.tone-doc { background: linear-gradient(160deg, #6b7280, #3f4650); }
.attach-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.attach-people { display: flex; flex-direction: column; max-height: 240px; overflow: auto; }
.attach-person {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  padding: 8px 4px;
  cursor: pointer;
  border-radius: 12px;
}
.attach-person:hover { background: rgba(255, 255, 255, .06); }
@keyframes sheet-up { from { opacity: 0; transform: translateY(28px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes tile-in { from { opacity: 0; transform: translateY(16px) scale(.9); } to { opacity: 1; transform: none; } }
.replybar {
  margin: 8px 12px 0;
  background: var(--panel);
  border-left: 4px solid var(--wa-green);
  border-radius: 6px;
  padding: 8px 8px 8px 10px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.replybar .qt { min-width: 0; flex: 1; }
.replybar .qn { color: var(--wa-green); font-size: 13px; font-weight: 600; }
.replybar .qx { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.emoji-panel, .attach-menu {
  position: absolute;
  bottom: 64px;
  left: 10px;
  background: var(--panel);
  box-shadow: 0 4px 18px rgba(11,20,26,.18);
  border-radius: 12px;
  z-index: 6;
}
.emoji-panel { width: min(360px, calc(100% - 20px)); padding: 8px; display: flex; flex-wrap: wrap; gap: 2px; max-height: 210px; overflow: auto; }
.emoji-panel[hidden] { display: none; }
.emoji-panel button { background: none; border: 0; font-size: 24px; width: 40px; height: 40px; border-radius: 8px; cursor: pointer; }
.emoji-panel button:hover { background: var(--hover); }
.attach-menu { min-width: 190px; padding: 6px; display: flex; flex-direction: column; }
.attach-menu button {
  background: none; border: 0; text-align: left;
  padding: 12px 14px; border-radius: 8px; cursor: pointer; font-size: 15px;
}
.attach-menu button:hover { background: var(--hover); }
.composer-box.is-rec { background: #f4f5f7; }
:root.dark .composer-box.is-rec { background: #1c1f24; }
.rec-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  color: #1a1d22;
}
:root.dark .rec-bar { color: #f2f4f7; }
.rec-bar .icon-btn { color: #3a3f46; }
:root.dark .rec-bar .icon-btn { color: #f2f4f7; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: #e11d48; box-shadow: 0 0 0 4px rgba(225, 29, 72, .18); animation: blink 1s infinite; flex: none; }
@keyframes blink { 50% { opacity: .35; } }
.rec-wave { height: 32px; }
.rec-wave i { background: #3a3f46; animation: rec-dance .9s ease-in-out infinite alternate; animation-delay: var(--d); }
:root.dark .rec-wave i { background: #f4f6f8; }
@keyframes rec-dance { from { transform: scaleY(.35); } to { transform: scaleY(1); } }
#rec-time { font-size: 14px; font-weight: 650; font-variant-numeric: tabular-nums; min-width: 38px; }
.rec-bar .rec-send { width: 42px; height: 42px; border-radius: 50%; background: #1a1d22; color: #f4f6f8; }
:root.dark .rec-bar .rec-send { background: #f4f6f8; color: #1a1d22; }
.inchat {
  display: flex; gap: 8px; align-items: center;
  padding: 8px 12px; background: var(--header);
}
.inchat input { padding-left: 12px; }

.phone-shell { height: 100%; display: flex; flex-direction: column; min-height: 0; background: var(--bg); position: relative; overflow: hidden; }
.stage { flex: 1; min-height: 0; min-width: 0; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.stage > .page, .stage > .main { flex: 1; min-height: 0; }
.stage .fab-wrap { bottom: 18px; }
.stage.motion, .main.motion, .gate.motion, .auth.motion {
  transform-origin: 50% 40%;
  animation: page-in .34s cubic-bezier(.16, 1, .3, 1);
}
@keyframes page-in {
  from { opacity: 0; transform: scale(.96); }
  to { opacity: 1; transform: none; }
}
.phone-shell .list-scroll { padding-bottom: 8px; }
.bottom-nav {
  height: 58px;
  margin: 0 14px calc(10px + env(safe-area-inset-bottom));
  flex: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 0;
  border-radius: 29px;
  background: #eceef2;
  box-shadow: 0 14px 32px rgba(0, 0, 0, .12);
  backdrop-filter: blur(12px);
}
:root.dark .bottom-nav {
  background: rgba(168, 174, 184, .1);
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: none;
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
}
body.role-phone .phone-shell { position: relative; }
body.role-phone .bottom-nav {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: calc(10px + env(safe-area-inset-bottom));
  margin: 0;
  z-index: 5;
}
body.role-phone .stage .fab-wrap { bottom: 82px; }
body.role-phone .list-scroll { padding-bottom: 92px; }
.bottom-nav button {
  background: none; border: 0; color: #3a3f46;
  font-size: 11px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px; cursor: pointer;
  position: relative;
}
:root.dark .bottom-nav button { color: #f4f6f8; }
.bottom-nav button.on,
:root.dark .bottom-nav button.on { color: #f4f6f8; }
.nav-hit {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1px; min-width: 68px; padding: 2px 12px 3px; border-radius: 18px;
}
.bottom-nav button.on .nav-hit { background: #14161a; color: #f4f6f8; }
.nav-ico {
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; position: relative; flex: none;
  background: transparent;
}
.bottom-nav button.jump .nav-hit { animation: nav-pop .42s cubic-bezier(.2, .8, .2, 1); }
@keyframes nav-pop { from { transform: translateY(4px) scale(.8); } to { transform: none; } }
.nav-chats i {
  position: absolute; left: 7px; top: 9px; width: 16px; height: 11px;
  border: 1.7px solid currentColor; border-radius: 6px 6px 6px 2px;
  animation: chat-bob 1.8s ease-in-out infinite;
}
.nav-chats i::before {
  content: ""; position: absolute; left: 3px; top: 4px; width: 2px; height: 2px; border-radius: 50%;
  background: currentColor; box-shadow: 4px 0 0 currentColor, 8px 0 0 currentColor;
  animation: chat-dots 1.4s ease-in-out infinite;
}
.nav-chats i::after {
  content: ""; position: absolute; left: 2px; bottom: -4px; width: 5px; height: 4px;
  border-left: 1.7px solid currentColor; border-bottom: 1.7px solid currentColor;
  border-radius: 0 0 0 3px;
}
@keyframes chat-bob { 45% { transform: translateY(-2px); } }
@keyframes chat-dots { 40% { opacity: .35; } }
.nav-people i, .nav-people b {
  position: absolute; width: 7px; height: 7px; border: 1.6px solid currentColor; border-radius: 50%;
}
.nav-people i { left: 7px; top: 8px; }
.nav-people b { right: 7px; top: 9px; animation: people-bob 1.7s ease-in-out infinite; }
.nav-people i::after, .nav-people b::after {
  content: ""; position: absolute; left: -3px; top: 7px; width: 11px; height: 6px;
  border: 1.6px solid currentColor; border-bottom: 0; border-radius: 8px 8px 0 0;
}
@keyframes people-bob { 40% { transform: translateY(-2px); } }
.nav-calls i {
  width: 12px; height: 17px; border: 1.7px solid currentColor; border-radius: 3px; position: relative;
  animation: ring-tilt 1.8s ease-in-out infinite;
}
.nav-calls i::before {
  content: ""; position: absolute; top: 2px; left: 3px; width: 4px; height: 1.5px; border-radius: 1px; background: currentColor;
}
.nav-calls i::after {
  content: ""; position: absolute; bottom: 2px; left: 3px; width: 4px; height: 4px; border-radius: 50%; border: 1.4px solid currentColor;
}
@keyframes ring-tilt { 20% { transform: rotate(-10deg); } 40% { transform: rotate(10deg); } 60%, 100% { transform: none; } }
.nav-gear i {
  width: 16px; height: 16px; display: block; position: relative; background: currentColor;
  clip-path: polygon(40% 0, 60% 0, 66% 14%, 82% 8%, 92% 22%, 80% 34%, 100% 40%, 100% 60%, 80% 66%, 92% 82%, 78% 92%, 66% 80%, 60% 100%, 40% 100%, 34% 80%, 18% 92%, 8% 78%, 20% 66%, 0 60%, 0 40%, 20% 34%, 8% 18%, 22% 8%, 34% 14%);
  animation: gear-turn 8s linear infinite;
}
.nav-gear i::after {
  content: ""; position: absolute; left: 5px; top: 5px; width: 6px; height: 6px; border-radius: 50%;
  background: #eceef2; box-shadow: 0 0 0 1.4px currentColor;
}
:root.dark .nav-gear i::after { background: #1b222b; }
.bottom-nav button.on .nav-gear i::after { background: #14161a; }
.nav-badge {
  position: absolute;
  top: 4px; right: calc(50% - 24px);
  background: var(--badge); color: white;
  border-radius: 10px; font-size: 10px; min-width: 16px; height: 16px;
  display: grid; place-items: center; padding: 0 4px;
}
.fab-wrap {
  position: absolute;
  right: 18px;
  bottom: calc(74px + env(safe-area-inset-bottom));
  z-index: 6;
}
.fab {
  position: relative;
  right: auto;
  bottom: auto;
  width: 56px; height: 56px; border-radius: 28px;
  border: 0; background: #f4f6f8; color: #1a1d22;
  box-shadow: 0 3px 8px rgba(11,20,26,.25);
  display: grid; place-items: center; cursor: pointer;
  animation: fab-float 2.6s ease-in-out infinite;
}
.fab::before {
  content: "";
  position: absolute; inset: -7px; border-radius: 50%;
  border: 1.5px solid rgba(244, 246, 248, .55);
  animation: fab-ring 2.2s ease-out infinite;
}
.fab.on { animation: none; }
.fab-pop {
  position: absolute; right: 0; bottom: 66px; width: 188px;
  display: flex; flex-direction: column; gap: 8px;
}
.fab-pop button {
  display: flex; align-items: center; gap: 10px;
  border: 0; border-radius: 16px; padding: 12px 14px;
  background: #f4f6f8; color: #1a1d22; font: inherit; font-size: 15px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .18); cursor: pointer; text-align: left;
  animation: fab-item .34s cubic-bezier(.16, 1, .3, 1) both;
}
:root.dark .fab-pop button { background: #23262c; color: #f4f6f8; }
.fab-ico { width: 22px; display: grid; place-items: center; flex: none; }
@keyframes fab-float { 50% { transform: translateY(-4px); } }
@keyframes fab-ring { 70%, 100% { transform: scale(1.22); opacity: 0; } }
@keyframes fab-item { from { opacity: 0; transform: translateY(10px) scale(.96); } }
.page { flex: 1; min-height: 0; overflow-y: auto; background: var(--bg); }
.page > .subhead,
.page > .phone-top,
.page > .settings-head {
  position: sticky;
  top: 0;
  z-index: 8;
}
.page h2 { font-size: 16px; margin: 16px 16px 8px; color: var(--wa-green); font-weight: 600; }
.set-item, .device-row, .status-row, .call-row, .community {
  width: 100%;
  display: flex; gap: 14px; align-items: center;
  padding: 12px 16px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border);
  text-align: left;
  cursor: pointer;
  color: inherit;
}
.set-item:hover, .call-row:hover, .status-row:hover, .community:hover { background: var(--hover); }
.set-item .st, .device-row .st, .call-row .st { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.set-item small, .device-row small, .call-row small, .status-row small, .community small { color: var(--muted); }
.call-row { padding: 2px 6px 2px 14px; gap: 2px; cursor: default; }
.call-main {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px;
  padding: 6px 0; border: 0; background: transparent; color: inherit;
  text-align: left; cursor: pointer; font: inherit;
}
.call-row .avatar { margin: 0; width: 40px; height: 40px; }
.call-row .st strong { font-size: 15px; line-height: 1.2; }
.call-row .call-kind { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; line-height: 1.2; }
.call-row .call-kind svg { flex: none; }
.call-row .call-kind.missed { color: #e11d48; }
.call-when { margin-left: auto; flex: none; color: var(--muted); font-size: 13px; }
.call-info {
  flex: none; width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: transparent; color: #6b7280; display: grid; place-items: center; cursor: pointer;
}
:root.dark .call-info { color: #f4f6f8; }
.call-info:hover { background: var(--hover); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #8696a0; flex: none; }
.dot.on { background: var(--badge); }
.hero-pad { padding: 22px 16px; color: var(--muted); line-height: 1.45; }
.field { padding: 8px 16px 16px; }
.field label { display: block; color: var(--wa-green); font-size: 13px; margin-bottom: 6px; }
.field input, .field textarea { padding-left: 12px; }
.field textarea { min-height: 72px; resize: vertical; }
.primary, .ghost, .danger {
  border: 0; border-radius: 24px; padding: 10px 16px; cursor: pointer; font-size: 14px; font-weight: 600;
}
.primary { background: var(--wa-green); color: white; }
.ghost { background: var(--search); color: var(--text); }
.danger { background: transparent; color: #ea0038; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; padding: 8px 16px 20px; }
.profile-hero { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 28px 16px 8px; }
.manual { display: flex; gap: 8px; padding: 0 16px 16px; }
.manual input { flex: 1; padding-left: 12px; }
.stack-form { display: flex; flex-direction: column; gap: 10px; padding: 0 16px 20px; }
.stack-form label { font-size: 13px; color: var(--wa-green); font-weight: 600; }
.stack-form input, .stack-form textarea {
  width: 100%; border: 0; background: var(--search); color: var(--text);
  border-radius: 14px; padding: 14px 16px; font-size: 17px;
}
.stack-form textarea { min-height: 110px; resize: vertical; }
.stack-form .primary { width: 100%; }
.stack-form .row-actions { padding: 0; }
.stack-form .row-actions .primary { flex: 1; width: auto; }
.empty-list { padding: 24px; text-align: center; color: var(--muted); }
.scanner { height: 100%; background: #000; color: white; position: relative; display: flex; flex-direction: column; }
.scanner video { width: 100%; height: 100%; object-fit: cover; flex: 1; min-height: 0; background: #111; }
.scan-frame {
  pointer-events: none;
  position: absolute;
  left: 12%; right: 12%; top: 16%; bottom: 28%;
  border: 2px solid rgba(255,255,255,.9);
  border-radius: 18px;
  box-shadow: 0 0 0 200vmax rgba(0,0,0,.45);
}
.scan-top, .scan-bottom {
  position: absolute; left: 0; right: 0; z-index: 2;
  display: flex; align-items: center; gap: 8px;
}
.scan-top { top: 0; padding: 10px; }
.scan-bottom {
  bottom: 0; padding: 16px;
  flex-direction: column; align-items: stretch;
  background: linear-gradient(transparent, rgba(0,0,0,.75));
}
.scan-top button, .scan-bottom .text-btn { color: white; }
.scan-help { text-align: center; margin: 0 0 8px; }

.menu-back { position: fixed; inset: 0; z-index: 80; background: transparent; }
.menu {
  position: fixed; z-index: 81;
  background: var(--panel);
  min-width: 210px;
  box-shadow: 0 2px 12px rgba(11,20,26,.18);
  border-radius: 4px;
  padding: 6px 0;
}
.menu button {
  display: block; width: 100%; text-align: left;
  background: none; border: 0; padding: 12px 24px;
  font-size: 14.5px; cursor: pointer; color: var(--text);
}
.menu button:hover { background: var(--hover); }
.lightbox {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(11,20,26,.92);
  display: grid; place-items: center;
  cursor: zoom-out;
}
.lightbox img { max-width: 92vw; max-height: 92vh; cursor: default; }
.call-screen {
  position: fixed; inset: 0; z-index: 95;
  background: radial-gradient(circle at top, #134e48, #0b141a 55%);
  color: white;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; text-align: center;
}
.call-screen h2 { margin: 8px 0 0; font-weight: 500; }
.call-screen .sub { color: rgba(255,255,255,.8); }
.call-stage { position: absolute; inset: 0; background: #000; }
.call-stage video { width: 100%; height: 100%; object-fit: cover; }
#call-local { position: absolute; width: 112px; height: 160px; right: 16px; bottom: 120px; border-radius: 12px; object-fit: cover; }
.upload-bar { height: 3px; margin: 0 12px 6px; background: rgba(255,255,255,.12); border-radius: 99px; overflow: hidden; }
.upload-bar span { display: block; height: 100%; background: #d7dbe2; }
.check-row { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.hint { color: var(--muted, #8b909a); font-size: 13px; margin: 0; }
.call-actions { display: flex; gap: 18px; margin-top: 28px; }
.call-actions button {
  width: 64px; height: 64px; border-radius: 50%; border: 0; cursor: pointer; color: white; font-size: 13px;
}
.end-call { background: #ea0038; }
.call-actions .ghost { background: rgba(255,255,255,.16); color: white; }
.ring { width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; animation: pulse 1.6s ease-out infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(0,168,132,.45); }
  100% { box-shadow: 0 0 0 18px rgba(0,168,132,0); }
}
.status-mine { display: flex; gap: 12px; align-items: center; padding: 12px 16px; }
.ring-avatar { padding: 3px; border-radius: 50%; border: 2px solid var(--wa-green); }
.missed { color: #ea0038; }
.checks { letter-spacing: -2px; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,.2); border-radius: 4px; }
:root.dark ::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); }

.avatar { position: relative; }
.online-dot {
  position: absolute; right: 0; bottom: 0;
  width: 12px; height: 12px; border-radius: 50%;
  background: #25d366; border: 2px solid var(--bg);
  box-shadow: 0 0 0 0 rgba(37, 211, 102, .6);
  animation: pulse 1.8s ease-out infinite;
}
.chat-item { transition: background .18s ease, transform .18s ease; }
.bubble { animation: rise .18s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.phone-top, .side-head, .chathead { box-shadow: 0 1px 0 var(--border); }

.auth {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background: #071410;
  position: relative;
  overflow: hidden;
}
.orb { display: none; }
.gate {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(480px 240px at 100% 0%, rgba(99, 102, 241, .32), transparent 70%),
    linear-gradient(180deg, #171722, #0d0d14);
  color: #f3f3f8;
  padding: calc(12px + env(safe-area-inset-top)) 20px calc(20px + env(safe-area-inset-bottom));
}
.gate-top { display: flex; align-items: center; justify-content: space-between; min-height: 48px; position: relative; }
.gate .text-btn, .gate .linkish { color: #c7c9ff; }
.dot-btn { width: 42px; height: 42px; border: 0; border-radius: 14px; background: #262633; display: flex; flex-direction: column; gap: 3px; align-items: center; justify-content: center; box-shadow: 0 8px 0 #12121a; }
.dot-btn i { width: 4px; height: 4px; border-radius: 50%; background: #f3f3f8; display: block; animation: dot-wave 1.4s ease-in-out infinite; }
.dot-btn i:nth-child(2) { animation-delay: .16s; }
.dot-btn i:nth-child(3) { animation-delay: .32s; }
.lang-chip { display: inline-flex; align-items: center; gap: 8px; border: 1px solid rgba(199, 201, 255, .35); background: linear-gradient(180deg, rgba(67, 56, 202, .55), rgba(18, 18, 32, .92)); color: #f8f8ff; border-radius: 999px; padding: 5px 12px 5px 5px; font-weight: 750; box-shadow: 0 10px 24px rgba(49, 46, 129, .4), inset 0 1px 0 rgba(255, 255, 255, .18); animation: chip-float 2.2s ease-in-out infinite; }
.lang-mark { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 11px; font-weight: 800; letter-spacing: .04em; color: #fff; background: linear-gradient(160deg, #c7d2fe, #4f46e5 58%, #312e81); box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 4px 0 #312e81; animation: chip-mark 2.2s ease-in-out infinite; }
@keyframes chip-float { 50% { transform: translateY(-3px); } }
@keyframes chip-mark { 50% { transform: scale(1.08); } }
.lang-name { font-size: 14px; }
.lang-caret { width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 6px solid #c7d2fe; }
.pop { position: absolute; top: 50px; left: 0; min-width: 196px; display: flex; flex-direction: column; background: #1c1c28; color: #f3f3f8; border-radius: 14px; box-shadow: 0 16px 40px rgba(0, 0, 0, .4); padding: 6px; z-index: 5; }
.pop button { display: block; width: 100%; text-align: left; border: 0; background: transparent; color: inherit; padding: 10px 16px; border-radius: 10px; font-weight: 650; cursor: pointer; }
button:disabled { opacity: .45; }
.gate-body { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.mark { width: auto; height: auto; display: grid; place-items: center; background: transparent; margin-bottom: 12px; }
.mark svg, .logo-wrap svg, .empty-logo svg, .brand svg { display: block; filter: drop-shadow(0 14px 24px rgba(79, 70, 229, .38)); }
.mark.sm { margin-bottom: 8px; }
.mark.sm svg, .brand svg, .qr-logo svg { filter: none; }
.gate h1 { margin: 0 0 8px; font-size: 32px; letter-spacing: -.6px; line-height: 1.15; }
.gate p { margin: 0 0 8px; color: #b7b9c8; line-height: 1.45; font-size: 16px; }
.linkish { border: 0; background: transparent; color: #c7c9ff; padding: 0; font-weight: 700; }
.gate-go { margin-top: auto; position: relative; z-index: 1; animation: gate-pulse 1.6s ease-in-out infinite; }
@keyframes gate-pulse {
  0%, 100% { transform: translateY(0); box-shadow: 0 0 0 0 rgba(79, 70, 229, .28); }
  50% { transform: translateY(-3px); box-shadow: 0 12px 22px rgba(79, 70, 229, .42); }
}
.support-offer { text-align: center; }
.support-offer .mark { margin: 0 auto 8px; }
.support-offer .ghost { margin-top: 8px; }
.welcome-gate { position: relative; overflow: hidden; background: #0c0c14; }
.welcome-gate .aurora { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.welcome-gate .blob { position: absolute; border-radius: 50%; filter: blur(26px); opacity: .8; }
.welcome-gate .b1 { width: 280px; height: 280px; left: -50px; top: 6%; background: #6366f1; animation: drift-a 16s ease-in-out infinite; }
.welcome-gate .b2 { width: 360px; height: 360px; right: -90px; top: 12%; background: #312e81; animation: drift-b 18s ease-in-out infinite; }
.welcome-gate .b3 { width: 240px; height: 240px; left: 28%; bottom: -70px; background: #818cf8; animation: drift-c 13s ease-in-out infinite; }
.welcome-gate .b4 { width: 170px; height: 170px; right: 16%; bottom: 18%; background: #4f46e5; opacity: .55; animation: drift-a 11s ease-in-out infinite reverse; }
.welcome-gate .gate-top, .welcome-gate .gate-body { position: relative; z-index: 1; }
.welcome-gate .gate-top { z-index: 4; }
.hello-wall { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hello-bit { position: absolute; display: flex; align-items: center; gap: 6px; animation: hello-drift 9s ease-in-out infinite; }
.hello-bit:nth-child(odd) { animation-duration: 12s; animation-direction: reverse; }
.hello-face { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 11px; font-weight: 800; box-shadow: 0 8px 16px rgba(0,0,0,.28); }
.hello-bubble { background: rgba(28, 28, 40, .88); color: #f3f3f8; border-radius: 14px 14px 14px 4px; padding: 5px 8px; font-size: 12px; box-shadow: 0 8px 18px rgba(0,0,0,.25); }
@keyframes hello-drift { 50% { transform: translateY(-10px); } }
.welcome-gate .welcome-title { position: relative; z-index: 2; text-align: center; font-size: 24px; margin: 10px 0 2px; }
.welcome-gate .gate-go { margin-top: 8px; }
.welcome-stage { position: relative; z-index: 2; flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.deck { position: relative; flex: 1; min-height: 0; perspective: 1400px; overflow: hidden; }
.wslide { position: absolute; inset: 8px 2px; border-radius: 26px; background: #161622; padding: 0; overflow: hidden; display: flex; flex-direction: column; transition: transform .55s cubic-bezier(.22,.8,.2,1), opacity .55s; }
.slide-banner { width: calc(100% - 20px); margin: 12px auto 0; aspect-ratio: 1200 / 420; flex: none; border-radius: 28px; overflow: hidden; background: #312e81; box-shadow: 0 16px 34px rgba(49, 46, 129, .28); }
.slide-banner img { width: 100%; height: 100%; object-fit: contain; object-position: center; display: block; }
.slide-copy { flex: none; padding: 12px 14px 14px; }
.slide-copy h2 { margin: 0 0 4px; }
.slide-copy p { margin: 0; }
.wslide[data-pose="now"] { transform: translateX(0); opacity: 1; z-index: 3; }
.wslide[data-pose="next"] { transform: translateX(110%); opacity: 0; z-index: 1; pointer-events: none; }
.wslide[data-pose="prev"] { transform: translateX(-110%); opacity: 0; z-index: 1; pointer-events: none; }
.wslide h2 { margin: 10px 0 6px; font-size: 22px; letter-spacing: -.4px; }
.wslide p { font-size: 14px; }
.wdots { display: flex; justify-content: center; gap: 8px; }
.wdot { width: 8px; height: 8px; border: 0; border-radius: 99px; background: #3a3a4e; padding: 0; }
.wdot.on { width: 22px; background: #818cf8; }
.welcome-legal { position: relative; z-index: 2; font-size: 12px; text-align: center; margin: 8px 0; }
.mock-phone { height: 132px; border-radius: 22px; background: linear-gradient(180deg, #312e81, #11111a); display: grid; place-items: center; box-shadow: inset 0 0 0 2px rgba(255,255,255,.08); }
.mock-call, .mock-lock { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.mock-ava { width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(160deg, #c7d2fe, #4f46e5); }
.mock-acts { display: flex; gap: 10px; }
.mock-acts span { width: 32px; height: 32px; border-radius: 50%; background: #4f46e5; display: grid; place-items: center; }
.mock-chat { width: 100%; padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.mock-chat i { font-style: normal; font-size: 12px; padding: 6px 8px; border-radius: 12px; max-width: 70%; }
.mock-chat .out { align-self: flex-end; background: #4f46e5; }
.mock-chat .in { align-self: flex-start; background: #2a2a3c; }
@keyframes drift-a { 50% { transform: translate(46px, 64px) scale(1.12); } }
@keyframes drift-b { 50% { transform: translate(-72px, 36px) scale(1.08); } }
@keyframes drift-c { 50% { transform: translate(-40px, -48px) scale(1.18); } }
@media (prefers-reduced-motion: reduce) {
  .welcome-gate .blob { animation: none; }
}
.gate-card { margin: auto 0; background: #1c1c28; color: #f3f3f8; border-radius: 28px; padding: 22px 18px; box-shadow: 0 20px 50px rgba(0, 0, 0, .35); }
@media (min-width: 861px) {
  .gate-card, .help-layout, .welcome-stage, .wdots, .welcome-legal, .welcome-gate .welcome-title { width: min(440px, 100%); margin-left: auto; margin-right: auto; }
}
.doc-body { white-space: pre-wrap; line-height: 1.5; color: #d5d6e4; }
.float-card { transform: perspective(900px) rotateX(4deg); box-shadow: 0 18px 0 rgba(0, 0, 0, .35), 0 28px 50px rgba(0, 0, 0, .45); }
.orbit { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 6px 0 16px; perspective: 900px; }
.orbit-btn { width: 46px; height: 46px; border: 0; border-radius: 16px; background: #262633; color: #f3f3f8; font-size: 28px; line-height: 1; box-shadow: 0 8px 0 #12121a; }
.orbit-btn:active { transform: translateY(4px); box-shadow: 0 4px 0 #12121a; }
.phone-lead { text-align: center; margin: 4px 0 16px; }
.country-stage { width: 100%; min-height: 168px; border: 0; border-radius: 28px; padding: 16px; margin: 0 0 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; color: #f3f3f8; background: linear-gradient(155deg, #32324a 0%, #1e1e2e 55%, #14141f 100%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 10px 16px 0 rgba(79, 70, 229, .35), 0 22px 36px rgba(0, 0, 0, .4); transform: rotateX(14deg) rotateY(-16deg); animation: stage-float 4.6s ease-in-out infinite; cursor: pointer; }
.stage-flag { width: 84px; height: 56px; object-fit: cover; border-radius: 8px; box-shadow: 0 10px 0 #312e81; background: #1e1b4b; display: block; }
.stage-copy { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.stage-copy strong { font-size: 28px; letter-spacing: .16em; }
.stage-copy span { font-size: 16px; font-weight: 650; }
.stage-copy small { color: #a5b4fc; font-size: 12px; }
@keyframes stage-float { 50% { transform: rotateX(8deg) rotateY(-6deg) translateY(-7px); } }
.phone-slab { display: flex; align-items: center; gap: 8px; margin: 0 0 16px; padding: 4px 8px 4px 14px; border-radius: 18px; background: linear-gradient(180deg, #2a2a3c, #171722); box-shadow: 0 8px 0 #101018, 0 14px 24px rgba(0, 0, 0, .28); }
.gate-card input[type="hidden"] { display: none !important; width: 0; height: 0; padding: 0; margin: 0; border: 0; }
.gate-card .phone-slab .dial-input { width: 78px; flex: 0 0 78px; border: 0; border-right: 1px solid rgba(199, 201, 255, .25); border-radius: 5px; background: transparent; color: #c7c9ff; font-size: 18px; font-weight: 750; padding: 12px 8px 12px 0; margin: 0; outline: none; }
.gate-card .phone-slab .dial-input:focus,
.gate-card .phone-slab .dial-input:focus-visible { outline: none; background: rgba(79, 70, 229, .22); box-shadow: inset 0 0 0 1.5px rgba(165, 180, 252, .8); }
.phone-slab:focus-within { box-shadow: inset 0 0 0 1.5px rgba(165, 180, 252, .45), 0 8px 0 #101018, 0 14px 24px rgba(0, 0, 0, .28); }
.gate input:focus, .gate textarea:focus, .gate select:focus, .gate button:focus,
.gate input:focus-visible, .gate textarea:focus-visible, .gate select:focus-visible, .gate button:focus-visible { outline: none; }
.num-wrap { position: relative; flex: 1; min-width: 0; display: block; }
.gate-card .phone-slab .num-wrap input { width: 100%; margin: 0; background: transparent; font-size: 20px; padding: 12px 8px; color: #f3f3f8; }
.num-wrap:not(.filled) input { caret-color: transparent; }
.blink-caret { position: absolute; left: 8px; top: 50%; transform: translateY(-54%); color: #f8fafc; font-weight: 300; pointer-events: none; animation: caret-blink 1s steps(1) infinite; }
.num-wrap.filled .blink-caret { visibility: hidden; }
@keyframes caret-blink { 50% { opacity: 0; } }
.modal-back.dim { background: rgba(0, 0, 0, .72); }
.confirm-line { margin: 4px 0; font-size: 16px; color: #e8e8f4; }
.check-line { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0; text-align: left; font-size: 14px; color: #d5d6e4; }
.check-line input { width: 18px; height: 18px; margin-top: 2px; flex: none; }
.otp-gate { position: relative; overflow: hidden; justify-content: center; }
.otp-aurora { position: absolute; inset: -20%; background: radial-gradient(circle at 50% 40%, rgba(99, 102, 241, .45), transparent 55%); animation: drift-a 8s ease-in-out infinite; pointer-events: none; }
.otp-card { position: relative; text-align: center; animation: popin .45s cubic-bezier(.2, .8, .2, 1); }
.otp-pulse { width: 72px; height: 72px; margin: 0 auto 12px; border-radius: 50%; border: 2px solid rgba(165, 180, 252, .7); box-shadow: 0 0 0 0 rgba(79, 70, 229, .45); animation: pulse 1.8s ease-out infinite; }
.otp-lead { font-size: 15px; }
.otp-link { display: block; width: 100%; margin-top: 8px; text-align: center; }
.otp-gate .otp { border: 0; border-bottom: 2px solid #4f46e5; border-radius: 0; background: transparent; font-size: 26px; animation: rise .4s ease both; }
.otp-gate .otp::placeholder { color: #6b6b80; }
.otp-gate .otp:nth-child(2) { animation-delay: .05s; }
.otp-gate .otp:nth-child(3) { animation-delay: .1s; }
.otp-gate .otp:nth-child(4) { animation-delay: .15s; }
.otp-gate .otp:nth-child(5) { animation-delay: .2s; }
.otp-gate .otp:nth-child(6) { animation-delay: .25s; }
.help-layout { margin: auto 0; display: flex; flex-direction: column; gap: 16px; }
.help-intro { padding: 4px 2px; }
.help-intro h1 { margin: 0 0 8px; font-size: 28px; letter-spacing: -.4px; }
.help-intro p { margin: 0; color: #c7c9d9; line-height: 1.45; }
.help-card { margin: 0; }
.help-card textarea { border-radius: 16px; }
.help-card textarea::placeholder { color: #9aa0b8; }
.help-card input:focus, .help-card textarea:focus, .help-card select:focus { box-shadow: inset 0 0 0 1.5px rgba(165, 180, 252, .85); }
.eyebrow { margin: 0 0 6px; color: #a5b4fc; font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.country-sheet { width: min(440px, 100%); max-height: min(78dvh, 640px); display: flex; flex-direction: column; gap: 10px; padding: 14px 14px 16px; border-radius: 28px; background: linear-gradient(180deg, #222232, #14141c); color: #f3f3f8; box-shadow: 0 30px 70px rgba(0, 0, 0, .45); }
.country-sheet h2 { margin: 0; font-size: 20px; }
.sheet-handle { width: 42px; height: 5px; border-radius: 99px; background: #3a3a4e; margin: 2px auto 0; }
.country-sheet input { border: 0; background: #101018; color: #f3f3f8; border-radius: 14px; padding: 12px 14px; font-size: 16px; box-shadow: 0 6px 0 #0a0a10; }
.country-grid { overflow: auto; display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.country-tile { display: flex; align-items: center; gap: 12px; border: 0; background: #262636; color: #f3f3f8; border-radius: 16px; padding: 10px 12px; text-align: start; box-shadow: 0 6px 0 #12121a; }
.country-tile.on { background: #4f46e5; color: #fff; box-shadow: 0 8px 0 #312e81; transform: translateY(-2px); }
.country-tile.on small { color: #e0e7ff; }
.tile-flag { width: 48px; height: 34px; object-fit: cover; border-radius: 6px; display: block; flex: none; background: #1e1b4b; box-shadow: 0 4px 0 #312e81; }
.flag-fallback { display: grid; place-items: center; color: #fff; font-size: 11px; font-weight: 800; }
.resend-btn:disabled { opacity: .62; }
.sms-note p { color: #d5d6e4; line-height: 1.45; }
.sms-note .primary { margin-top: 8px; }
.tile-copy { display: flex; flex-direction: column; }
.tile-copy small { color: #a5b4fc; }
.blocked-bar { margin: 8px 12px calc(10px + env(safe-area-inset-bottom)); background: var(--panel); color: var(--text); border-radius: 22px; padding: 14px; box-shadow: 0 10px 28px rgba(0, 0, 0, .18); }
.blocked-bar p { margin: 0 0 10px; text-align: center; color: var(--muted); }
.blocked-actions { display: flex; gap: 8px; }
.blocked-actions button { flex: 1; border: 0; border-radius: 14px; padding: 12px 8px; font-weight: 700; }
.blocked-actions .danger { background: #3f1d24; color: #fecaca; }
.blocked-actions .good { background: #312e81; color: #e0e7ff; }
.gate-card input, .gate-card textarea, .gate-card select { width: 100%; border: 0; background: #12121a; color: #f3f3f8; border-radius: 14px; padding: 14px 16px; font-size: 16px; margin: 0 0 12px; }
.gate-card label { display: block; font-size: 13px; color: #4f46e5; font-weight: 700; margin-bottom: 6px; }
.gate .dial-row { margin-bottom: 12px; }
.gate .dial-row input, .gate .dial-row select { margin: 0; }
#overlay { position: fixed; inset: 0; z-index: 80; }
#overlay:empty { display: none; }
.modal-back { position: absolute; inset: 0; background: rgba(18, 18, 32, .42); display: grid; place-items: center; padding: 24px; }
.modal-back:has(.busy) { background: rgba(6, 6, 14, .78); }
.modal { width: min(380px, 100%); background: #1c1c28; color: #f3f3f8; border-radius: 24px; padding: 22px; box-shadow: 0 24px 60px rgba(0,0,0,.4); }
.modal h2 { margin: 0 0 8px; font-size: 22px; }
.modal p { margin: 0 0 12px; color: #b7b9c8; }
.busy-line { min-height: 28px; margin: 0; font-size: 18px; font-weight: 750; color: #f8fafc; letter-spacing: -.2px; }
.busy-line.swap { animation: line-in .45s ease; }
@keyframes line-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.modal-phone { display: block; font-size: 20px; margin-bottom: 16px; }
.modal-actions { display: flex; gap: 8px; }
.modal-actions .ghost, .modal-actions .primary { flex: 1; border-radius: 14px; padding: 12px; }
.modal-actions .ghost { border: 0; background: #2a2a3c; color: #f3f3f8; }
.modal.busy { display: grid; justify-items: center; gap: 14px; padding: 28px 22px 22px; background: radial-gradient(120px 80px at 50% 42%, rgba(99, 102, 241, .28), transparent 70%), #161622; }
.spin3d { width: 168px; height: 150px; perspective: 520px; display: grid; place-items: center; position: relative; }
.cube { width: 72px; height: 72px; position: relative; transform-style: preserve-3d; animation: tumble 2.8s linear infinite; }
.cube b { position: absolute; inset: 0; border-radius: 16px; backface-visibility: hidden; background: linear-gradient(145deg, #f5f3ff, #818cf8 40%, #4338ca); box-shadow: inset 0 2px 0 rgba(255,255,255,.7), inset 0 -14px 18px rgba(15, 12, 40, .28); }
.cube b:nth-child(1) { transform: rotateY(0deg) translateZ(36px); }
.cube b:nth-child(2) { transform: rotateY(180deg) translateZ(36px); background: linear-gradient(160deg, #6366f1, #1e1b4b); }
.cube b:nth-child(3) { transform: rotateY(90deg) translateZ(36px); background: linear-gradient(180deg, #c4b5fd, #4f46e5 60%, #312e81); }
.cube b:nth-child(4) { transform: rotateY(-90deg) translateZ(36px); background: linear-gradient(200deg, #a5b4fc, #3730a3 70%, #1e1b4b); }
.cube b:nth-child(5) { transform: rotateX(90deg) translateZ(36px); background: linear-gradient(180deg, #ffffff, #a5b4fc); }
.cube b:nth-child(6) { transform: rotateX(-90deg) translateZ(36px); background: #0b0a16; }
.spin3d-ring { position: absolute; width: 132px; height: 132px; border-radius: 50%; border: 3px solid transparent; border-top-color: #e0e7ff; border-right-color: rgba(129, 140, 248, .45); border-bottom-color: rgba(49, 46, 129, .2); transform: rotateX(72deg); animation: ring3d 1.35s linear infinite; box-shadow: 0 0 18px rgba(129, 140, 248, .35); }
.spin3d-shadow { position: absolute; bottom: 6px; width: 64px; height: 14px; border-radius: 50%; background: rgba(79, 70, 229, .55); filter: blur(5px); animation: shadow3d 2.8s ease-in-out infinite; }
@keyframes tumble { to { transform: rotateX(360deg) rotateY(360deg); } }
@keyframes ring3d { to { transform: rotateX(70deg) rotateZ(360deg); } }
@keyframes shadow3d { 50% { transform: scaleX(.7); opacity: .35; } }
@media (prefers-reduced-motion: reduce) {
  .cube, .spin3d-ring, .spin3d-shadow { animation: none; }
}
.lang-list { display: flex; flex-direction: column; gap: 8px; }
.lang-option { display: flex; align-items: center; gap: 12px; width: 100%; text-align: start; border: 1px solid transparent; background: #1a1a28; color: #f3f3f8; border-radius: 16px; padding: 10px 12px; font-size: 16px; }
.lang-option.on { background: #221f4a; border-color: #818cf8; box-shadow: 0 8px 0 #312e81; }
.lang-option .lang-copy strong { font-weight: 750; }
@keyframes float { 50% { transform: translateY(18px); } }
.auth-card {
  position: relative;
  width: min(440px, 100%);
  background: rgba(255,255,255,.96);
  color: #111b21;
  border-radius: 28px;
  padding: 28px 22px 22px;
  box-shadow: 0 24px 60px rgba(0,0,0,.28);
  animation: rise .28s ease;
}
:root.dark .auth-card { background: #111b21; color: #e9edef; }
.auth-card h1 { margin: 8px 0; font-size: 30px; font-weight: 700; letter-spacing: -.4px; }
.auth-card p, .auth-card label { color: #667781; }
.auth-card label { display: block; font-size: 13px; margin-bottom: 6px; }
.auth-card input, .auth-card textarea, .auth-card select {
  width: 100%; border: 0; background: #f0f2f5; border-radius: 14px;
  padding: 14px 16px; font-size: 18px; margin-bottom: 12px;
}
.dial-row { display: flex; gap: 8px; align-items: stretch; }
.dial-row select { width: 138px; flex: none; font-size: 14px; }
.auth-card .dial-row { margin-bottom: 8px; }
.auth-card .dial-row input, .auth-card .dial-row select, .stack-form .dial-row input, .stack-form .dial-row select { margin: 0; width: auto; }
.auth-card .dial-row input, .stack-form .dial-row input { flex: 1; min-width: 0; }
.stack-form .dial-row select { background: var(--search); color: var(--text); border: 0; border-radius: 14px; padding: 14px 8px; width: 138px; }
.auth-card .fine { font-size: 13px; margin: 0 0 8px; }
:root.dark .auth-card select, :root.dark .dial-row select { background: #202c33; color: white; }
:root.dark .auth-card input, :root.dark .auth-card textarea { background: #202c33; color: white; }
.primary.wide, .ghost.wide { width: 100%; display: block; text-align: center; text-decoration: none; margin-top: 8px; }
.otp-gate { padding-left: 12px; padding-right: 12px; }
.otp-gate .gate-card { padding-left: 16px; padding-right: 16px; }
.otp-row { display: flex; gap: 8px; justify-content: stretch; margin: 16px 0 10px; width: 100%; }
.otp {
  height: 64px;
  flex: 1 1 0;
  width: 0;
  min-width: 0;
  max-width: none;
  margin: 0;
  padding: 0;
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  border: 1px solid #3f3f5a;
  border-radius: 16px;
  background: #12121c;
  color: #f8fafc;
  caret-color: #c7d2fe;
  box-sizing: border-box;
}
.gate-card .otp, .auth-card .otp { width: 0; min-width: 0; max-width: none; height: 64px; margin: 0; padding: 0; background: #12121c; color: #f8fafc; }
.otp:focus { border-color: #818cf8; background: #1e1b4b; color: #ffffff; outline: none; }
.dev-code {
  background: #fff7e0; color: #6a4b00; border-radius: 14px; padding: 12px;
  font-size: 14px; line-height: 1.4; margin-bottom: 8px;
}
.dev-code b { font-size: 22px; letter-spacing: 3px; }
.pill-ok, .pill-invite {
  border-radius: 999px; padding: 3px 8px; font-size: 11px; font-weight: 700; flex: none;
}
.pill-ok { background: #e0e7ff; color: #3730a3; }
.pill-invite { background: #fff; color: #3730a3; border: 1px solid #c7d2fe; }
.sheet {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%);
  width: min(420px, calc(100% - 24px)); background: var(--panel); color: var(--text);
  border-radius: 20px; padding: 18px; z-index: 90; box-shadow: 0 16px 40px rgba(0,0,0,.2);
}
.ban-banner {
  margin: 8px 12px calc(8px + env(safe-area-inset-bottom));
  background: #fff4d6; color: #6a4b00; border-radius: 12px; padding: 12px; font-size: 14px;
}
.fab { border-radius: 28px; }
.fab:active { transform: scale(.96); }

.brand-logo { display: block; object-fit: cover; border-radius: 8px; }
.avatar .face {
  width: 100%; height: 100%; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center;
}
.avatar .face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-btn { border: 0; background: transparent; padding: 0; cursor: pointer; }
.switch { width: 46px; height: 28px; border-radius: 99px; background: #c5c9d6; position: relative; flex: none; transition: background .28s ease; }
.switch.on { background: #4f46e5; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: white; transition: transform .32s cubic-bezier(.2, .9, .2, 1.35); box-shadow: 0 2px 6px rgba(0,0,0,.18); }
.switch.on::after { transform: translateX(18px); }
.story-row { display: flex; align-items: flex-start; width: 100%; min-width: 0; }
.story-fixed { flex: none; padding: 8px 0 6px 10px; }
.rail-clip { flex: 1; min-width: 0; height: 102px; overflow: hidden; }
.stories {
  display: flex; gap: 4px; width: 100%; height: 122px; min-width: 0;
  overflow-x: auto; overflow-y: hidden; flex-wrap: nowrap; padding: 8px 12px 20px 4px;
  scrollbar-width: none; -ms-overflow-style: none; touch-action: pan-x; overscroll-behavior-x: contain;
}
.stories::-webkit-scrollbar,
.stories::-webkit-scrollbar-thumb,
.stories::-webkit-scrollbar-track { width: 0 !important; height: 0 !important; background: transparent; display: none; }
.story-bubble { position: relative; flex: none; border: 0; background: transparent; color: inherit; display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 12px; width: 76px; padding-top: 4px; cursor: pointer; }
.story-bubble span { max-width: 76px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.story-face { border: 0; background: transparent; padding: 0; color: inherit; cursor: pointer; }
.story-bubble .avatar, .story-face .avatar { width: 64px; height: 64px; font-size: 22px; margin: 0; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px #22c55e; }
.story-bubble.seen .avatar { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px #3b82f6; }
.story-plus {
  position: absolute; top: 46px; right: 0; width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--bg); background: #f4f6f8; color: #1a1d22; padding: 0; cursor: pointer;
  display: grid; place-items: center; z-index: 1;
}
.story-plus i { position: absolute; background: currentColor; border-radius: 1px; }
.story-plus i:first-child { width: 10px; height: 2px; }
.story-plus i:last-child { width: 2px; height: 10px; }
.status-page { display: flex; flex-direction: column; overflow: hidden; }
.status-fixed { flex: none; background: var(--bg); }
.status-clip { flex: 1; min-height: 0; overflow: hidden; }
.status-feed {
  height: 100%;
  width: calc(100% + 18px);
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 18px;
}
.status-feed::-webkit-scrollbar,
.status-feed::-webkit-scrollbar-thumb,
.status-feed::-webkit-scrollbar-track { width: 0 !important; height: 0 !important; background: transparent; display: none; }
.status-feed h3 { margin: 8px 16px; font-size: 13px; letter-spacing: .4px; text-transform: uppercase; color: var(--muted); }
.status-compose { margin: 12px; padding: 14px 0 4px; border-radius: 22px; background: linear-gradient(180deg, rgba(0,168,132,.16), transparent 70%); }
.status-compose p { margin: 0 16px 10px; color: var(--muted); line-height: 1.4; }
.status-compose textarea { background: #12141a; color: #f4f6f8; border-radius: 16px; }
.status-block { padding: 4px 0 12px; }
.status-block h3 { margin: 8px 16px; font-size: 13px; letter-spacing: .4px; text-transform: uppercase; color: var(--muted); }
.status-person { width: 100%; display: flex; align-items: center; gap: 4px; border: 0; background: transparent; color: inherit; text-align: left; padding-right: 12px; cursor: pointer; }
.status-person .st { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.status-person small { color: var(--muted); }
.status-person .avatar { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px #22c55e; margin-left: 16px; }
.status-person.seen .avatar { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px #3b82f6; }
.status-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 16px 8px; }
.status-card { min-height: 120px; border: 0; border-radius: 18px; overflow: hidden; position: relative; color: white; background: linear-gradient(160deg, #0b6e4f, #128c7e); text-align: left; cursor: pointer; }
.status-card img { width: 100%; height: 120px; object-fit: cover; display: block; }
.status-card span { display: block; padding: 14px; font-size: 15px; font-weight: 650; }
.status-card small { position: absolute; left: 10px; bottom: 8px; font-size: 11px; background: rgba(0,0,0,.35); border-radius: 999px; padding: 3px 8px; }
.story-screen { position: absolute; inset: 0; z-index: 30; background: #05080a; color: white; display: flex; flex-direction: column; padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
.story-bars { display: flex; gap: 4px; padding: 10px 12px 0; }
.story-bars i { position: relative; overflow: hidden; flex: 1; height: 3px; border-radius: 99px; background: rgba(255,255,255,.28); }
.story-bars i.done { background: #fff; }
.story-bars i.now::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #fff;
  transform-origin: left center;
  transform: scaleX(0);
  animation: story-fill var(--fill, 5s) linear forwards;
}
.story-music {
  position: absolute; left: 16px; right: 16px; bottom: 22px; z-index: 2;
  display: flex; align-items: center; gap: 10px; pointer-events: none;
  background: rgba(18, 20, 24, .5); border-radius: 999px; padding: 8px 14px;
}
.story-music i { width: 18px; height: 18px; border-radius: 50%; background: #f4f6f8; position: relative; flex: none; }
.story-music i::before {
  content: ""; position: absolute; left: 7px; top: 5px;
  border-style: solid; border-width: 4px 0 4px 6px;
  border-color: transparent transparent transparent #1a1d22;
}
.story-music span { display: flex; flex-direction: column; min-width: 0; }
.story-music strong, .story-music small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.story-music small { color: rgba(255,255,255,.75); font-size: 12px; }
.music-chip {
  display: flex; align-items: center; gap: 10px; margin: 0 16px 10px; padding: 8px 8px 8px 14px;
  border-radius: 16px; background: rgba(244, 246, 248, .1);
}
.music-chip span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.music-chip small { color: var(--muted); }
.music-chip button { border: 0; background: transparent; color: inherit; font-size: 22px; line-height: 1; cursor: pointer; }
.music-modal { width: min(420px, 100%); max-height: min(560px, calc(100% - 24px)); display: flex; flex-direction: column; }
.music-note { margin: 0; color: #c5c7d4; font-size: 13px; line-height: 1.4; }
.rise-sheet .device-add { padding: 10px 0 0; }
.rise-sheet .ghost { border: 0; border-radius: 12px; padding: 10px 14px; background: #2a2a3c; color: #f3f3f8; }
.rise-sheet label { display: block; margin-top: 10px; font-size: 13px; color: #b7b9c8; }
.rise-sheet input { width: 100%; border: 0; border-radius: 14px; padding: 12px 14px; margin: 8px 0; background: rgba(244, 246, 248, .1); color: inherit; font: inherit; }
.music-modal input {
  width: 100%; border: 0; border-radius: 14px; padding: 12px 14px; margin: 10px 0;
  background: rgba(244, 246, 248, .1); color: inherit; font: inherit;
}
#music-list { overflow: auto; min-height: 0; display: flex; flex-direction: column; gap: 2px; }
.music-row { display: flex; align-items: center; gap: 8px; }
.music-play {
  width: 36px; height: 36px; border-radius: 50%; border: 0; flex: none; cursor: pointer;
  background: #f4f6f8; color: #1a1d22; position: relative;
}
.music-play::before {
  content: ""; position: absolute; left: 14px; top: 11px;
  border-style: solid; border-width: 7px 0 7px 11px;
  border-color: transparent transparent transparent currentColor;
}
.music-meta { flex: 1; min-width: 0; text-align: left; border: 0; background: transparent; color: inherit; cursor: pointer; padding: 8px 4px; }
.music-meta strong, .music-meta small { display: block; }
.music-meta small { color: #b7b9c8; font-size: 12px; }
.music-empty { color: #b7b9c8; padding: 16px 4px; }
.modal-back.sheet-back { display: flex; align-items: flex-end; justify-content: center; padding: 0; }
.rise-sheet {
  width: min(460px, 100%); max-height: min(78vh, 640px); display: flex; flex-direction: column;
  background: #1c1c28; color: #f3f3f8; border-radius: 22px 22px 0 0;
  padding: 8px 16px calc(16px + env(safe-area-inset-bottom));
  box-shadow: 0 -18px 40px rgba(0,0,0,.35);
  animation: sheet-up .38s cubic-bezier(.16, 1, .3, 1);
}
.rise-sheet h2 { margin: 0 0 6px; font-size: 20px; }
.sheet-grab { width: 42px; height: 4px; border-radius: 99px; background: rgba(255,255,255,.28); margin: 2px auto 10px; }
.music-sheet input, .loc-add input {
  width: 100%; border: 0; border-radius: 14px; padding: 12px 14px; margin: 8px 0;
  background: rgba(244, 246, 248, .1); color: inherit; font: inherit;
}
#music-list, #sticker-list { overflow: auto; min-height: 0; max-height: 46vh; display: flex; flex-direction: column; gap: 2px; }
.loc-add { display: flex; gap: 8px; align-items: center; }
.loc-add input { flex: 1; margin: 0; }
.trim-bar {
  position: relative; height: 72px; display: flex; align-items: flex-end; gap: 2px;
  padding: 8px; border-radius: 16px; background: rgba(255,255,255,.06); touch-action: none; cursor: ew-resize;
}
.trim-bar > i:not(#trim-sel) { flex: 1; display: block; border-radius: 99px; background: #d7dbe3; align-self: flex-end; }
#trim-sel {
  position: absolute; top: 6px; bottom: 6px; border-radius: 10px; pointer-events: none;
  background: rgba(59, 130, 246, .28); box-shadow: inset 2px 0 0 #3b82f6, inset -2px 0 0 #3b82f6;
}
.trim-label { text-align: center; font-variant-numeric: tabular-nums; margin: 8px 0 4px; }
.story-tools { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 8px; }
.font-btn { border: 0; background: transparent; color: inherit; border-radius: 999px; padding: 6px 10px; cursor: pointer; font-size: 13px; }
.font-btn.on { background: rgba(244, 246, 248, .16); }
.font-serif { font-family: Georgia, serif; }
.font-script { font-family: "Segoe Script", cursive; }
.font-bold { font-weight: 800; }
.ink { width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; padding: 0; cursor: pointer; }
.ink.on { border-color: #f4f6f8; }
.sticker-row { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 8px; }
.sticker-chip { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 4px 8px 4px 10px; background: rgba(244,246,248,.12); font-size: 13px; }
.sticker-chip button { border: 0; background: transparent; color: inherit; cursor: pointer; font-size: 16px; }
.story-tags { position: absolute; left: 14px; top: 14px; z-index: 2; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; pointer-events: none; }
.story-tag { background: rgba(18, 20, 24, .55); border-radius: 999px; padding: 6px 10px; font-size: 13px; }
@keyframes sheet-up { from { transform: translateY(110%); } }
@keyframes story-fill { to { transform: scaleX(1); } }
.story-screen header { display: flex; align-items: center; gap: 8px; padding: 8px 8px 0; }
.story-screen header small { display: block; color: rgba(255,255,255,.7); font-size: 12px; }
.story-screen .icon-btn { color: white; }
.story-stage { position: relative; flex: 1; margin: 10px; border-radius: 28px; overflow: hidden; min-height: 0; }
.story-full { width: 100%; height: 100%; object-fit: cover; display: block; }
.story-full.text { display: grid; place-items: center; text-align: center; font-size: 30px; font-weight: 700; line-height: 1.25; padding: 28px; }
.story-cap { position: absolute; left: 16px; right: 16px; bottom: 18px; margin: 0; text-align: center; font-size: 16px; text-shadow: 0 1px 8px rgba(0,0,0,.6); }
.story-nav { position: absolute; top: 0; bottom: 0; width: 28%; border: 0; background: transparent; }
.story-nav.prev { left: 0; }
.story-nav.next { right: 0; }
.story-views { margin: 0 12px 12px; background: rgba(255,255,255,.08); border-radius: 16px; padding: 12px; max-height: 120px; overflow: auto; }
.story-preview { width: calc(100% - 32px); margin: 0 16px; max-height: 180px; object-fit: cover; border-radius: 16px; display: block; }
.walls { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 12px; }
.wall {
  min-height: 118px; border-radius: 18px; border: 0; position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between;
  padding: 12px; color: #111; cursor: pointer;
}
.wall.on { box-shadow: inset 0 0 0 3px #f4f6f8; }
.wall-mark {
  position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 50%; background: #16a34a;
}
.wall-mark::after {
  content: ""; position: absolute; left: 6px; top: 7px; width: 8px; height: 4px;
  border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg);
}
.wall i { align-self: flex-end; background: #e0e7ff; border-radius: 10px; padding: 6px 8px; font-style: normal; font-size: 13px; position: relative; z-index: 1; }
.wall-shade { animation: shade-in .25s ease; }
.wall-sheet { display: flex; flex-direction: column; gap: 14px; animation: wall-pop .42s cubic-bezier(.16, 1, .3, 1); }
.wall-sheet h2 { margin: 0; font-size: 20px; }
.wall-stage { height: 280px; border-radius: 22px; overflow: hidden; display: flex; animation: preview-rise .45s .05s both; }
.wall-stage .msgs { flex: 1; border-radius: 22px; }
.wall-actions { display: flex; gap: 10px; }
.wall-actions button { flex: 1; min-height: 46px; animation: act-rise .4s both; }
.wall-actions .ghost { animation-delay: .08s; }
.wall-actions .primary { animation-delay: .16s; }
@keyframes shade-in { from { opacity: 0; } }
@keyframes wall-pop { from { opacity: 0; transform: translateY(28px) scale(.92); } }
@keyframes preview-rise { from { opacity: 0; transform: scale(.96); } }
@keyframes act-rise { from { opacity: 0; transform: translateY(10px); } }
.swipe { position: relative; overflow: hidden; }
.swipe-del { position: absolute; inset: 0 0 0 auto; width: 74px; border: 0; background: #e53935; color: white; display: grid; place-items: center; transform: translateX(calc(100% + 8px)); transition: transform .22s ease; }
.swipe.open .swipe-del { transform: none; }
.swipe-del .ico-trash { color: #fff; transform: scale(1.35); transform-origin: center bottom; }
.swipe.open .swipe-del .ico-trash { animation: del-pop .45s ease; }
@keyframes del-pop { from { transform: scale(.6) rotate(-8deg); } to { transform: scale(1.35) rotate(0); } }
.swipe-acts { position: absolute; inset: 0 auto 0 0; width: 156px; display: flex; transform: translateX(calc(-100% - 8px)); transition: transform .22s ease; }
.swipe.acts .swipe-acts { transform: none; }
.swipe-pin, .swipe-unread { flex: 1; border: 0; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; font: inherit; cursor: pointer; padding: 0; }
.swipe-pin { background: #334155; }
.swipe-unread { background: #4f46e5; }
.swipe-pin em, .swipe-unread em { font-style: normal; font-size: 11px; font-weight: 650; }
.ico-pin { width: 16px; height: 18px; position: relative; display: block; }
.ico-pin i {
  position: absolute; left: 2px; top: 0; width: 12px; height: 12px;
  border: 2px solid currentColor; border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg); display: block;
  animation: pin-bob 1.25s ease-in-out infinite;
}
.ico-pin i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 3px; height: 3px; border-radius: 50%; background: currentColor; }
@keyframes pin-bob { 40% { transform: rotate(-45deg) translateY(-3px); } }
.ico-unread { width: 20px; height: 16px; position: relative; display: block; }
.ico-unread i { display: block; width: 18px; height: 12px; border: 2px solid currentColor; border-radius: 4px; position: relative; }
.ico-unread i::before { content: ""; position: absolute; left: 3px; top: 3px; width: 8px; height: 2px; background: currentColor; box-shadow: 0 3px 0 currentColor; }
.ico-unread b { position: absolute; right: -2px; top: -4px; width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: unread-dot 1.15s ease-in-out infinite; }
@keyframes unread-dot { 50% { transform: scale(.55); opacity: .45; } }
.row-pin { width: 12px; height: 14px; position: relative; color: #93c5fd; flex: none; display: block; }
.row-pin i {
  position: absolute; left: 0; top: 0; width: 10px; height: 10px;
  border: 1.6px solid currentColor; border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg); display: block;
  animation: pin-bob 1.6s ease-in-out infinite;
}
.row-pin i::after { content: ""; position: absolute; left: 2px; top: 2px; width: 2px; height: 2px; border-radius: 50%; background: currentColor; }
.swipe .chat-item { position: relative; z-index: 1; width: calc(100% + 2px); background: var(--bg); transform: translateX(0); transition: transform .22s ease; }
.swipe.open .chat-item { transform: translateX(-74px); }
.swipe.acts .chat-item { transform: translateX(156px); }
.tickbox { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #8696a0; margin: auto 8px auto 0; flex: none; }
.tickbox.on { background: #4f46e5; border-color: #4f46e5; }
.group-person .tickbox.on { background: #22c55e; border-color: #16a34a; color: #fff; }
.chat-item.picked { background: var(--active); }
.mini-mute { color: var(--muted); display: inline-flex; }
.danger-icon { color: #e53935; }
.lock-box { padding: 32px 16px; }
.vanish { margin-right: 3px; }
.msgs.wall-dusk { background: #2b2438; }
.msgs.wall-ocean { background: #d7eef2; }
.msgs.wall-blossom { background: #f8d7e3; }
.msgs.wall-forest { background: #dcead7; }
.msgs.wall-night { background: #111b21; }
.msgs.wall-paper { background: #f4f1ea; }
.msgs.wall-sand { background: #f3e6cf; }
.msgs.wall-dusk::before, .msgs.wall-night::before { opacity: .18; filter: invert(1); }
.profile-slim { display: flex; align-items: center; gap: 12px; padding: 8px 14px 12px; border-bottom: 1px solid var(--line, rgba(255,255,255,.08)); }
.qr-side, .slim-copy { border: 0; background: transparent; color: inherit; cursor: pointer; }
.slim-copy { flex: 1; text-align: left; display: flex; flex-direction: column; gap: 2px; }
.slim-copy small { color: var(--muted); }
.menu-list { display: flex; flex-direction: column; }
.menu-row { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.menu-row:hover { background: var(--hover); }
.menu-row .st { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; flex: 1; }
.menu-row small { color: var(--muted); font-size: 13px; line-height: 1.35; }
.menu-ico { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: rgba(79,70,229,.14); color: #818cf8; flex: none; }
.settings-page .menu-row { min-height: 78px; padding: 16px 18px; gap: 16px; }
.settings-page .menu-row strong { font-size: 17px; }
.settings-page .menu-row small { font-size: 14px; }
.settings-page .menu-ico { width: 50px; height: 50px; border-radius: 16px; }
.settings-page .menu-ico svg { width: 26px; height: 26px; }
.settings-page {
  background:
    radial-gradient(520px 220px at 50% 0%, rgba(99, 102, 241, .2), transparent 72%),
    var(--bg);
}
body.role-phone .settings-page { padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
.settings-head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 12px 16px 6px;
  background: transparent;
  border: 0;
  box-shadow: none;
}
body.role-phone .settings-head {
  padding-top: calc(12px + env(safe-area-inset-top));
  height: auto;
  background:
    radial-gradient(420px 140px at 28% 0%, rgba(99, 102, 241, .22), transparent 72%),
    var(--bg);
}
.settings-head h1 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -.5px;
  background: linear-gradient(100deg, #312e81, #6366f1 55%, #818cf8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: title-in .45s ease both;
}
:root.dark .settings-head h1 { background: linear-gradient(100deg, #e0e7ff, #a5b4fc 40%, #818cf8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.back-orb {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(160deg, #818cf8, #4338ca);
  box-shadow: 0 10px 20px rgba(67, 56, 202, .35);
  animation: orb-in .4s cubic-bezier(.2, .8, .2, 1);
}
.back-orb:active { transform: scale(.94); }
.settings-hero { position: relative; display: flex; flex-direction: column; align-items: center; padding: 8px 0 18px; animation: hero-in .5s ease both; }
.cover-banner { position: relative; width: calc(100% - 28px); height: 168px; margin: 0 14px; border: 0; padding: 0; overflow: hidden; cursor: pointer; background: #312e81; border-radius: 28px; box-shadow: 0 16px 34px rgba(49, 46, 129, .28); }
.cover-banner img { width: 100%; height: 100%; object-fit: cover; display: block; transform-origin: center; animation: banner-drift 16s ease-in-out infinite alternate; }
.qr-float { position: absolute; top: 18px; right: 26px; left: auto; width: 46px; height: 46px; border: 0; border-radius: 50%; background: rgba(15, 15, 28, .55); color: #fff; display: grid; place-items: center; cursor: pointer; z-index: 2; backdrop-filter: blur(8px); box-shadow: 0 8px 18px rgba(0, 0, 0, .25); }
.hero-avatar { margin-top: -54px; z-index: 1; line-height: 0; animation: avatar-in .55s cubic-bezier(.2, .8, .2, 1) both; }
.hero-avatar .avatar { width: 112px; height: 112px; margin: 0; font-size: 38px; box-shadow: 0 0 0 4px var(--bg), 0 12px 24px rgba(49, 46, 129, .28); }
.settings-page .menu-list { margin: 4px 14px 8px; border-radius: 24px; overflow: hidden; background: color-mix(in srgb, var(--bg) 88%, #6366f1 12%); box-shadow: 0 10px 28px rgba(15, 23, 42, .06); }
.settings-page .menu-list .menu-row { animation: row-in .48s cubic-bezier(.2, .8, .2, 1) both; }
.settings-page .menu-list .menu-row:nth-child(2) { animation-delay: .04s; }
.settings-page .menu-list .menu-row:nth-child(3) { animation-delay: .08s; }
.settings-page .menu-list .menu-row:nth-child(4) { animation-delay: .12s; }
.settings-page .menu-list .menu-row:nth-child(5) { animation-delay: .16s; }
.settings-page .menu-list .menu-row:nth-child(6) { animation-delay: .2s; }
.settings-page .menu-list .menu-row:nth-child(7) { animation-delay: .24s; }
.settings-page .menu-list .menu-row:nth-child(8) { animation-delay: .28s; }
.settings-page .menu-list .menu-row:nth-child(9) { animation-delay: .32s; }
.settings-page .menu-list .menu-row:nth-child(10) { animation-delay: .36s; }
@keyframes orb-in { from { opacity: 0; transform: translateX(-8px) scale(.8); } }
@keyframes title-in { from { opacity: 0; transform: translateY(6px); } }
@keyframes hero-in { from { opacity: 0; transform: translateY(12px); } }
@keyframes avatar-in { from { opacity: 0; transform: translateY(10px) scale(.92); } }
@keyframes row-in { from { opacity: 0; transform: translateY(12px); } }
@keyframes banner-drift { to { transform: scale(1.08) translate3d(0, -3%, 0); } }
@media (prefers-reduced-motion: reduce) {
  .cover-banner img, .back-orb, .settings-head h1, .settings-hero, .hero-avatar, .settings-page .menu-row,
  .stage.motion, .main.motion, .gate.motion, .auth.motion,
  .msgs::before, .msgs::after, .attach-sheet, .attach-grid button,
  .bottom-nav button.on .nav-hit, .person-card, .person-face, .person-actions button, .person-menu .menu-row,
  .rec-wave i, .dev-glyph, .dev-glyph i, .dev-glyph i::after,
  .ico-dots i, .dot-btn i, .lang-chip, .lang-mark, .gate-go, .ico-cam, .ico-cam i, .ico-cam b, .ico-gear,
  .ico-x, .ico-checks i, .ico-trash b, .bottom-nav button.jump .nav-hit,
  .nav-chats i, .nav-chats i::before, .nav-people b, .nav-calls i, .nav-gear i,
  .wall-shade, .wall-sheet, .wall-stage, .wall-actions button, .story-bars i.now::after,
  .chat-item.unread .preview, .chat-item.unread .badge, .rise-sheet, .ico-back,
  .fab, .fab::before, .fab-pop button, .swipe.open .swipe-del .ico-trash, .ico-trash b,
  .ico-pin i, .ico-unread b, .row-pin i { animation: none; }
}
.hero-id { border: 0; background: transparent; color: inherit; display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 12px; cursor: pointer; padding: 0 20px; }
.hero-id strong { font-size: 22px; }
.hero-id small { font-size: 15px; color: var(--muted); }
.setup-card { text-align: center; }
.setup-card h1 { font-size: 28px; }
.setup-photo { width: 148px; height: 148px; margin: 8px auto 18px; border: 0; border-radius: 50%; padding: 0; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: #e0e7ff; background: linear-gradient(160deg, #4338ca, #1e1b4b); cursor: pointer; box-shadow: 0 14px 0 rgba(49, 46, 129, .45); }
.setup-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.setup-photo small { font-size: 12px; color: #c7d2fe; }
.setup-card input { text-align: center; font-size: 18px; margin-top: 4px; }
.account-out {
  display: block; width: calc(100% - 28px); margin: 6px 14px 4px;
  border: 0; background: transparent; color: #e11d48;
  font-size: 16px; font-weight: 650; text-align: center;
  padding: 16px; border-radius: 18px; cursor: pointer;
}
.menu-row.account-out { width: 100%; margin: 0; text-align: left; font-weight: 500; border-radius: 0; }
.menu-row.account-out strong { color: #e11d48; }
.settings-logo { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 28px 0 18px; color: var(--muted); }
.settings-logo strong { color: inherit; }
.device-hero { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 22px 16px; text-align: center; }
.dev-glyph { position: relative; display: block; flex: none; }
.dev-glyph.phone {
  width: 26px; height: 38px; border-radius: 7px;
  background: linear-gradient(180deg, #4a515b, #1a1d22);
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.2), 0 6px 12px rgba(0,0,0,.22);
}
.dev-glyph.phone i {
  position: absolute; left: 3px; right: 3px; top: 5px; bottom: 7px; border-radius: 3px;
  background: linear-gradient(165deg, #ffffff, #d5dae2 55%, #aeb6c2);
  animation: dev-glow 2.6s ease-in-out infinite;
}
.dev-glyph.phone b {
  position: absolute; left: 50%; bottom: 2px; width: 8px; height: 2px; margin-left: -4px;
  border-radius: 2px; background: rgba(255,255,255,.62);
}
.dev-glyph.big.phone {
  width: 58px; height: 86px; border-radius: 16px;
  animation: dev-float 3.2s ease-in-out infinite;
}
.dev-glyph.big.phone i { left: 6px; right: 6px; top: 12px; bottom: 16px; border-radius: 7px; }
.dev-glyph.big.phone b { width: 18px; height: 3px; bottom: 6px; margin-left: -9px; }
.dev-glyph.desk { width: 40px; height: 32px; }
.dev-glyph.desk i {
  display: block; height: 22px; border-radius: 5px;
  background: linear-gradient(180deg, #4a515b, #1a1d22);
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.18);
  position: relative;
}
.dev-glyph.desk i::after {
  content: ""; position: absolute; inset: 3px; border-radius: 2px;
  background: linear-gradient(165deg, #ffffff, #d5dae2);
  animation: dev-glow 2.6s ease-in-out infinite;
}
.dev-glyph.desk b {
  display: block; width: 12px; height: 4px; margin: 0 auto;
  background: #3a3f46; position: relative;
}
.dev-glyph.desk b::before {
  content: ""; position: absolute; left: 50%; top: 4px; width: 22px; height: 2px; margin-left: -11px;
  border-radius: 2px; background: #5c6570;
}
@keyframes dev-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes dev-glow { 0%, 100% { filter: brightness(.86); } 50% { filter: brightness(1.08); } }
.device-card { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.device-card .device-ico { flex: none; display: grid; place-items: center; }
.device-card .st { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.device-card strong { font-size: 16px; font-weight: 600; line-height: 1.25; }
.device-card small { display: block; color: var(--muted); font-size: 13px; line-height: 1.3; }
.device-out {
  flex: none; border: 0; background: transparent; color: #e11d48;
  font-size: 14px; font-weight: 650; padding: 8px 4px; cursor: pointer;
}
.device-link {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px 20px;
}
.device-link input {
  flex: 1; min-width: 0; width: auto; height: 42px; margin: 0;
  border: 0; border-radius: 21px; background: var(--search); color: var(--text);
  padding: 0 12px; font-size: 14px;
}
.device-link .primary { flex: none; height: 42px; padding: 0 14px; white-space: nowrap; }
.person-page { background: radial-gradient(520px 220px at 50% 0%, rgba(255, 255, 255, .06), transparent 70%), var(--bg); }
.person-card { display: flex; flex-direction: column; align-items: center; padding: 0 0 8px; animation: hero-in .45s ease both; }
.person-cover { pointer-events: none; }
.person-face { margin-top: -48px; z-index: 1; animation: avatar-in .5s cubic-bezier(.2, .8, .2, 1) both; }
.person-face .avatar { width: 96px; height: 96px; font-size: 32px; box-shadow: 0 0 0 4px var(--bg), 0 12px 24px rgba(0, 0, 0, .28); }
.person-name { margin-top: 10px; font-size: 22px; }
.person-about { color: var(--muted); margin-top: 2px; padding: 0 24px; text-align: center; }
.person-actions { display: flex; gap: 14px; margin: 14px 0 6px; }
.person-actions button {
  border: 0;
  min-width: 84px;
  padding: 12px 10px;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(160deg, #6b7280, #3a3f46);
  box-shadow: 0 10px 18px rgba(0, 0, 0, .22);
  animation: tile-in .42s cubic-bezier(.16, 1, .3, 1) both;
}
.person-actions button:nth-child(2) { animation-delay: .06s; background: linear-gradient(160deg, #e7a0a0, #b85c5c); }
.person-actions button:nth-child(3) { animation-delay: .12s; background: linear-gradient(160deg, #9aa1ab, #5c6570); }
.person-actions button:active { transform: scale(.96); }
.person-note { margin-top: 8px; }
.person-note textarea { min-height: 52px; height: 52px; resize: none; }
.person-page .primary { background: #3a3f46; border: 0; }
.person-menu { margin: 4px 14px 18px; border-radius: 24px; overflow: hidden; background: color-mix(in srgb, var(--bg) 92%, #fff 8%); }
.person-menu .menu-row { animation: row-in .45s cubic-bezier(.2, .8, .2, 1) both; }
.person-menu .menu-row:nth-child(2) { animation-delay: .04s; }
.person-menu .menu-row:nth-child(3) { animation-delay: .08s; }
.person-menu .menu-row:nth-child(4) { animation-delay: .12s; }
.person-menu .menu-row:nth-child(5) { animation-delay: .16s; }
.person-menu .menu-row:nth-child(6) { animation-delay: .2s; }
.person-menu .menu-row:nth-child(7) { animation-delay: .24s; }
.person-menu .menu-row:nth-child(8) { animation-delay: .28s; }
.person-menu .menu-row:nth-child(9) { animation-delay: .32s; }
.callcard { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.call-ico { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .08); color: #e7e9ee; flex: none; }
.callcard.missed .call-ico, .callcard.missed strong { color: #e11d48; background: rgba(225, 29, 72, .12); }
.callcard.missed strong { background: transparent; }
.callcard small { display: block; color: var(--muted); font-size: 12px; }
.call-clock { font-size: 28px; font-weight: 650; letter-spacing: .4px; }
.take-call { background: #3f8f62; }
.who-btn { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.media-row, .gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 8px 16px 16px; }
.media-row img, .gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; }
.app-info { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 36px 16px; text-align: center; }
.block-title { margin: 14px 16px 6px; font-size: 13px; color: var(--muted); }
.call-pop { right: 8px; top: 52px; }
.gif-pop { font-size: 54px; display: inline-block; animation: gifpop 1.1s ease-in-out infinite; }
@keyframes gifpop { 50% { transform: translateY(-6px) scale(1.08) rotate(-6deg); } }
.theme-pop { display: flex; flex-direction: column; gap: 8px; animation: popin .28s cubic-bezier(.2,.8,.2,1); }
.theme-pop button { border: 0; background: var(--hover); color: inherit; border-radius: 14px; padding: 14px; cursor: pointer; }
@keyframes popin { from { transform: translateY(12px) scale(.96); opacity: 0; } }
.icon-btn.rec { color: #e11d48; animation: gifpop 1s infinite; }
.msgs.wall-aurora { background: linear-gradient(120deg, #312e81, #7c3aed, #22d3ee); background-size: 200% 200%; animation: drift 8s ease infinite; }
.msgs.wall-ember { background: linear-gradient(160deg, #7f1d1d, #f59e0b, #111827); background-size: 180% 180%; animation: drift 7s ease infinite; }
.msgs.wall-tide { background: linear-gradient(180deg, #082f49, #0ea5e9, #d1fae5); background-size: 160% 160%; animation: drift 9s ease infinite; }
.msgs.wall-noir { background: radial-gradient(circle at 20% 20%, #312e81, #09090b 55%); }
.msgs.wall-paper { background: #f4f1ea; }
.msgs.wall-sand { background: #f3e6cf; }
.msgs.wall-ocean { background: #d7eef2; }
.msgs.wall-blossom { background: #f8d7e3; }
.wall-aurora { background: linear-gradient(120deg, #312e81, #22d3ee); color: white; }
.wall-ember { background: linear-gradient(160deg, #7f1d1d, #f59e0b); color: white; }
.wall-tide { background: linear-gradient(180deg, #082f49, #5eead4); color: white; }
.wall-noir { background: #111827; color: white; }
.wall-dusk { background: #2b2438; color: white; }
.wall-forest { background: #14532d; color: white; }
.wall-paper { background: #f4f1ea; }
.wall-sand { background: #f3e6cf; }
.wall-ocean { background: #d7eef2; }
.wall-blossom { background: #f8d7e3; }
@keyframes drift { 50% { background-position: 100% 50%; } }
html[data-bubble="rose"] .bubble.out { background: #e11d48; }
html[data-bubble="amber"] .bubble.out { background: #d97706; }
html[data-bubble="teal"] .bubble.out { background: #0f766e; }
html[data-bubble="slate"] .bubble.out { background: #334155; }
html[data-tone="rose"] .menu-ico { color: #fb7185; background: rgba(244,63,94,.15); }
html[data-tone="amber"] .menu-ico { color: #fbbf24; background: rgba(245,158,11,.15); }
html[data-tone="teal"] .menu-ico { color: #2dd4bf; background: rgba(13,148,136,.15); }
.link-card { display: block; margin-top: 6px; padding: 6px 8px; border-radius: 8px; background: rgba(0,0,0,.08); color: inherit; text-decoration: none; font-size: 12px; }
.show-media { border: 0; background: rgba(255,255,255,.12); color: inherit; border-radius: 10px; padding: 10px 12px; cursor: pointer; }
.chips { overflow-x: auto; }
.help-success { text-align: center; }
.help-success h2 { margin: 8px 0 6px; font-size: 22px; }
.help-success p { color: var(--muted, #a7a8ba); }
.help-error { min-height: 1.2em; color: #fb7185; font-size: 13px; }
.ok-mark, .warn-mark { width: 88px; height: 88px; margin: 6px auto 12px; border-radius: 50%; display: grid; place-items: center; animation: okPop .55s cubic-bezier(.2, 1.3, .4, 1); }
.ok-mark { background: #4f46e5; }
.ok-mark svg { stroke-dasharray: 64; stroke-dashoffset: 64; animation: okDraw .55s .2s forwards; }
.warn-mark { background: #f59e0b; color: #1a1204; font-size: 42px; font-weight: 800; }
.warn-mark.hard { background: #e11d48; color: #fff; }
.help-success a.primary { display: grid; place-items: center; text-decoration: none; }
.slide-fallback { background: radial-gradient(420px 180px at 50% 40%, rgba(79, 70, 229, .55), #12121c 70%); }
.appeal-status { margin-top: 12px; padding: 12px; border-radius: 16px; background: rgba(79, 70, 229, .16); }
@keyframes okPop { from { transform: scale(.55); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes okDraw { to { stroke-dashoffset: 0; } }
.web-pair h1 { font-size: 36px; letter-spacing: -.03em; }
.web-pair #pair-status { color: #a7a8ba; min-height: 1.4em; }
.pair-story { display: flex; gap: 8px; margin: 16px 0; }
.pair-story span { flex: 1; padding: 12px 8px; border-radius: 14px; background: #1e1b4b; text-align: center; font-size: 13px; }
@media (prefers-reduced-motion: reduce) {
  .ok-mark, .warn-mark, .ok-mark svg { animation: none; stroke-dashoffset: 0; }
}
