:root {
  color-scheme: dark;
  --brand-image: url("./greekkeepers-style.jpg");
  --bg: #030303;
  --bg-2: #090805;
  --surface: #12100b;
  --surface-2: #1a150d;
  --panel: #251b0e;
  --glass: rgba(13, 11, 8, 0.74);
  --glass-strong: rgba(12, 10, 7, 0.9);
  --ink: #fff7df;
  --muted: #b6a98e;
  --soft: #f7ddb0;
  --line: rgba(255, 215, 128, 0.16);
  --line-strong: rgba(255, 198, 73, 0.58);
  --gold: #d99a19;
  --gold-2: #ffd36d;
  --teal: #f4c15a;
  --blue: #8bbcff;
  --red: #f05d66;
  --green: #46be78;
  --ember: #ff8f1f;
  --mine: #d99a19;
  --theirs: #f5ecd8;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.62);
  --shadow-soft: 0 12px 36px rgba(0, 0, 0, 0.38);
}

body[data-theme="white"] {
  color-scheme: light;
  --bg: #f7f8fb;
  --bg-2: #eef2f7;
  --surface: #ffffff;
  --surface-2: #edf2f7;
  --panel: #dde6ef;
  --glass: rgba(255, 255, 255, 0.78);
  --glass-strong: rgba(255, 255, 255, 0.9);
  --ink: #101720;
  --muted: #5e6b7a;
  --soft: #263445;
  --line: rgba(25, 38, 55, 0.14);
  --line-strong: rgba(169, 126, 45, 0.34);
  --gold: #b98324;
  --gold-2: #8f651d;
  --teal: #0a927f;
  --blue: #425bd6;
  --red: #c93f4c;
  --green: #188f56;
  --mine: #ffe2a3;
  --theirs: #ffffff;
  --shadow: 0 24px 80px rgba(40, 56, 80, 0.18);
  --shadow-soft: 0 12px 36px rgba(40, 56, 80, 0.14);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    linear-gradient(90deg, rgba(3, 3, 3, 0.94), rgba(5, 5, 4, 0.76) 48%, rgba(3, 3, 3, 0.96)),
    linear-gradient(180deg, rgba(255, 187, 57, 0.08), transparent 38%),
    var(--brand-image) center / cover fixed,
    var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body[data-theme="white"] {
  background:
    linear-gradient(135deg, rgba(247, 248, 251, 0.94), rgba(229, 236, 246, 0.94)),
    radial-gradient(circle at 10% 4%, rgba(69, 209, 183, 0.12), transparent 27rem),
    radial-gradient(circle at 88% 14%, rgba(216, 173, 85, 0.16), transparent 25rem),
    radial-gradient(circle at 52% 95%, rgba(102, 133, 255, 0.1), transparent 30rem),
    var(--bg);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(112deg, transparent 0 31%, rgba(255, 194, 71, 0.14) 32%, transparent 34% 62%, rgba(139, 188, 255, 0.12) 63%, transparent 65%),
    repeating-linear-gradient(90deg, rgba(255, 215, 128, 0.022) 0 1px, transparent 1px 96px);
  opacity: 0.82;
}

.appVideoWallpaper {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.34;
  pointer-events: none;
  filter: saturate(0.9) contrast(1.05) brightness(0.72);
}

.appVideoWallpaper[hidden] {
  display: none;
}

body.hasVideoWallpaper {
  background:
    linear-gradient(90deg, rgba(3, 3, 3, 0.95), rgba(5, 5, 4, 0.82) 48%, rgba(3, 3, 3, 0.96)),
    linear-gradient(180deg, rgba(255, 187, 57, 0.08), transparent 38%),
    var(--bg);
}

body[data-theme="white"]::before {
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.52), transparent 23%, rgba(255, 255, 255, 0.28) 49%, transparent 74%),
    repeating-linear-gradient(90deg, rgba(20, 32, 46, 0.035) 0 1px, transparent 1px 96px);
  opacity: 0.68;
}

.runtimeWarning {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  justify-content: center;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(231, 191, 100, 0.28);
  background: rgba(9, 11, 16, 0.86);
  backdrop-filter: blur(18px) saturate(145%);
  color: var(--gold-2);
  font-size: 13px;
  text-align: center;
}

.runtimeWarning[hidden] {
  display: none;
}

.onboarding {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    linear-gradient(90deg, rgba(2, 2, 2, 0.94), rgba(3, 3, 3, 0.7)),
    linear-gradient(180deg, rgba(255, 183, 41, 0.14), transparent 46%),
    var(--brand-image) center / cover;
  z-index: 20;
}

.onboarding[hidden] {
  display: none;
}

.registerCard {
  width: min(430px, 100%);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(38, 27, 12, 0.84), rgba(5, 5, 4, 0.9)),
    var(--glass);
  backdrop-filter: blur(22px) saturate(135%);
  padding: 26px;
  box-shadow: var(--shadow), 0 0 48px rgba(217, 154, 25, 0.18);
}

body[data-theme="white"] .onboarding {
  background:
    radial-gradient(circle at 50% 20%, rgba(216, 173, 85, 0.16), transparent 24rem),
    rgba(246, 248, 252, 0.96);
}

body[data-theme="white"] .registerCard,
body[data-theme="white"] .sidebar,
body[data-theme="white"] .chat {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(237, 242, 248, 0.68)),
    var(--glass);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.registerCard h2 {
  margin: 14px 0 6px;
  font-size: 30px;
}

.registerCard p,
.registerCard label {
  color: var(--muted);
}

.registerCard label {
  display: block;
  margin: 18px 0 8px;
  font-size: 12px;
  text-transform: uppercase;
}

.registerCard input {
  width: 100%;
  height: 46px;
  padding: 0 12px;
  font-size: 15px;
}

.registerCard button {
  width: 100%;
  margin-top: 12px;
  background: var(--gold);
  border-color: var(--gold);
  color: #111722;
  font-weight: 800;
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(41, 31, 17, 0.94), rgba(13, 11, 8, 0.94));
  color: var(--ink);
  cursor: pointer;
  min-height: 40px;
  padding: 0 14px;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

body[data-theme="white"] button {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(231, 238, 247, 0.92));
}

button:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft), 0 0 20px rgba(217, 154, 25, 0.14);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(255, 211, 109, 0.7);
  outline-offset: 2px;
}

button:disabled,
input:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

input,
textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(5, 5, 4, 0.9);
  color: var(--ink);
  outline: none;
}

select {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(5, 5, 4, 0.9);
  color: var(--ink);
  outline: none;
}

body[data-theme="white"] input,
body[data-theme="white"] textarea,
body[data-theme="white"] select {
  background: rgba(255, 255, 255, 0.92);
}

input:focus,
textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(216, 173, 85, 0.16);
}

.shell {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100dvh;
  padding: 10px;
  gap: 10px;
  isolation: isolate;
}

.sidebar,
.chat {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(31, 22, 10, 0.78), rgba(5, 5, 4, 0.68)),
    var(--glass);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 215, 128, 0.1);
  backdrop-filter: blur(24px) saturate(145%);
  min-height: 0;
}

body[data-theme="white"] .panel,
body[data-theme="white"] .mainMenu,
body[data-theme="white"] dialog,
body[data-theme="white"] .browserTorPanel,
body[data-theme="white"] .proxyPanel,
body[data-theme="white"] .browserProjectNews,
body[data-theme="white"] .browserAdSlot,
body[data-theme="white"] .browserSafety div,
body[data-theme="white"] .proxyRoute,
body[data-theme="white"] .browserNewsCard {
  background: rgba(255, 255, 255, 0.72);
}

body[data-theme="white"] .mainMenu {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 247, 251, 0.97)),
    var(--glass-strong);
  border-color: rgba(169, 126, 45, 0.32);
  box-shadow: 0 28px 80px rgba(20, 28, 40, 0.24), 0 0 0 1px rgba(255, 255, 255, 0.74) inset;
  backdrop-filter: blur(24px) saturate(120%);
}

body[data-theme="white"] .menuProfile {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.9), rgba(242, 246, 252, 0.78)),
    var(--brand-image) center 22% / 560px auto;
  border-color: rgba(169, 126, 45, 0.24);
}

body[data-theme="white"] .accountSwitcher,
body[data-theme="white"] .accountItem.active {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(169, 126, 45, 0.22);
}

.sidebar {
  position: relative;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
}

.brand {
  position: relative;
  overflow: hidden;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(14, 12, 9, 0.96), rgba(7, 7, 6, 0.92)),
    rgba(5, 5, 4, 0.9);
  box-shadow: none;
}

.brand::after {
  display: none;
}

.brandTop {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 8px 12px 6px;
}

.statusPanel {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 0 12px 10px;
}

.statusCard {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  border-color: rgba(255, 211, 109, 0.18);
  background: rgba(255, 255, 255, 0.045);
  padding: 5px 7px;
  text-align: left;
}

.statusCard:hover {
  transform: none;
}

.statusCard span:not(.statusDot),
.statusCard strong,
.statusCard small {
  display: block;
  min-width: 0;
}

.statusCard strong {
  color: var(--soft);
  font-size: 11px;
  line-height: 1.1;
}

.statusCard small {
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.statusCard b {
  color: var(--gold-2);
  font-size: 11px;
}

.statusDot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--muted);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.045);
}

.statusCard[data-state="online"] .statusDot,
.statusCard[data-state="secure"] .statusDot {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(70, 190, 120, 0.12), 0 0 16px rgba(70, 190, 120, 0.34);
}

.statusCard[data-state="warn"] .statusDot {
  background: var(--gold-2);
  box-shadow: 0 0 0 4px rgba(255, 211, 109, 0.12), 0 0 16px rgba(255, 211, 109, 0.3);
}

.statusCard[data-state="offline"] .statusDot,
.statusCard[data-state="risk"] .statusDot {
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(240, 93, 102, 0.12), 0 0 16px rgba(240, 93, 102, 0.32);
}

.brand h1 {
  margin: 0;
  font-size: 17px;
  line-height: 1.05;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold-2);
  text-shadow: 0 0 18px rgba(217, 154, 25, 0.28);
}

.brand p,
.chatTop p,
small {
  color: var(--muted);
}

.brand p {
  margin: 2px 0 0;
  font-size: 12px;
}

.mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #030303;
  border: 1px solid var(--line-strong);
  color: var(--gold-2);
  font-weight: 800;
  font-size: 13px;
  overflow: hidden;
  box-shadow:
    inset 0 0 0 2px rgba(0, 0, 0, 0.82),
    0 0 0 3px rgba(217, 154, 25, 0.06);
}

.mark img,
.callAvatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.largeMark {
  width: 92px;
  height: 92px;
  font-size: 18px;
  margin: 0 auto;
}

.menuButton {
  margin-left: auto;
  min-width: 44px;
  width: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 50%;
  background: rgba(5, 5, 4, 0.66);
  color: var(--gold-2);
  font-size: 22px;
  line-height: 1;
  touch-action: manipulation;
  z-index: 4;
}

.menuButton[aria-expanded="true"] {
  background: linear-gradient(180deg, #ffd36d, #c88410);
  border-color: rgba(255, 211, 109, 0.72);
  color: #151006;
  box-shadow: 0 0 24px rgba(217, 154, 25, 0.22);
}

.mainMenu {
  position: absolute;
  top: 92px;
  left: 12px;
  right: 12px;
  z-index: 12;
  display: grid;
  gap: 6px;
  max-height: min(74vh, 680px);
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(30, 22, 10, 0.96), rgba(5, 5, 4, 0.98)),
    var(--glass-strong);
  backdrop-filter: blur(18px);
  padding: 10px;
  box-shadow: var(--shadow), 0 0 38px rgba(217, 154, 25, 0.14);
}

.mainMenu::before {
  content: "";
  position: sticky;
  top: -10px;
  display: block;
  height: 1px;
  margin-bottom: -1px;
  background: linear-gradient(90deg, transparent, rgba(255, 211, 109, 0.58), transparent);
}

.mainMenu[hidden] {
  display: none;
}

.menuProfile {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
  border: 1px solid rgba(255, 198, 73, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(5, 5, 4, 0.82), rgba(60, 38, 12, 0.38)),
    var(--brand-image) center 22% / 560px auto;
  padding: 10px;
}

.menuProfile strong,
.menuProfile span {
  display: block;
}

.menuProfile strong {
  color: var(--gold-2);
  font-size: 15px;
}

.menuProfile span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.accountSwitcher {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(255, 198, 73, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  padding: 8px;
}

.accountSwitcherHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.accountSwitcherHead strong {
  color: var(--soft);
  font-size: 13px;
}

.accountSwitcherHead button {
  width: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 198, 73, 0.12);
  color: var(--gold-2);
}

.accountList {
  display: grid;
  gap: 4px;
}

.accountItem {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  width: 100%;
  min-height: 48px;
  border-color: transparent;
  background: transparent;
  padding: 5px;
  text-align: left;
}

.accountItem:hover {
  transform: none;
  box-shadow: none;
  background: rgba(255, 198, 73, 0.08);
}

.accountItem.active {
  border-color: rgba(255, 211, 109, 0.34);
  background: rgba(255, 198, 73, 0.12);
}

.accountAvatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 211, 109, 0.42);
  background: linear-gradient(145deg, rgba(255, 211, 109, 0.24), rgba(8, 7, 5, 0.82));
  color: var(--gold-2);
  font-size: 12px;
  font-weight: 900;
  overflow: hidden;
}

.accountAvatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.accountText {
  min-width: 0;
}

.accountText strong,
.accountText span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.accountText strong {
  color: var(--ink);
  font-size: 13px;
}

.accountText span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.plusCard {
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 198, 73, 0.24), rgba(255, 143, 31, 0.08)),
    var(--surface);
  padding: 10px;
}

.plusCard strong,
.plusCard span {
  display: block;
}

.plusCard strong {
  color: var(--gold-2);
}

.plusCard span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.appearanceCard {
  display: grid;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  padding: 10px;
}

.menuSection {
  display: grid;
  gap: 3px;
  border: 1px solid rgba(255, 198, 73, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  padding: 7px;
}

.menuSection[hidden] {
  display: none;
}

.menuSectionTitle {
  padding: 2px 7px 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.serviceSection {
  border-color: rgba(69, 209, 183, 0.22);
  background: rgba(69, 209, 183, 0.055);
}

.menuSection > button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 42px;
  border-color: transparent;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font-weight: 650;
}

.menuSection > button:hover {
  background: rgba(255, 198, 73, 0.1);
  box-shadow: none;
  transform: none;
}

.menuSection > button::before {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-right: 10px;
  border-radius: 50%;
  background: rgba(255, 198, 73, 0.1);
  color: var(--gold-2);
  font-size: 14px;
}

#copyId::before { content: "ID"; font-size: 10px; font-weight: 900; }
#profileSettings::before { content: "👤"; }
#walletButton::before { content: "₮"; font-weight: 900; }
#marketButton::before { content: "◆"; }
#escrowButton::before { content: "✓"; font-weight: 900; }
#developerPortalButton::before { content: "</>"; font-size: 10px; font-weight: 900; }
#adminPanelButton::before { content: "ADM"; font-size: 9px; font-weight: 900; }
#botsButton::before { content: "⚙"; }
#browserButton::before { content: "◌"; }
#securityCenter::before { content: "🔒"; }
#lockApp::before { content: "⏻"; }
#resetProfile::before { content: "!"; font-weight: 900; }

.appearanceCard strong {
  color: var(--soft);
}

.appearanceCard label {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.appearanceCard select {
  width: 100%;
  height: 36px;
  padding: 0 9px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(20, 27, 39, 0.68);
  backdrop-filter: blur(16px);
  padding: 13px;
}

.identity {
  display: none;
}

.identity label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.row input {
  min-width: 0;
  height: 40px;
  padding: 0 10px;
}

.row button {
  background: var(--gold);
  border-color: var(--gold);
  color: #111722;
  font-weight: 700;
}

#fingerprint {
  display: block;
  margin-top: 10px;
  overflow-wrap: anywhere;
  font-size: 12px;
}

.searchBox {
  display: block;
  margin: 0 12px;
  border: 1px solid rgba(255, 215, 128, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  padding: 4px 10px;
  backdrop-filter: blur(14px);
}

.searchBox:focus-within {
  border-color: rgba(255, 211, 109, 0.48);
  background: rgba(10, 8, 5, 0.76);
  box-shadow: 0 0 0 3px rgba(217, 154, 25, 0.1);
}

.searchBox span {
  display: none;
}

.searchBox input {
  width: 100%;
  height: 32px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.directorySearchStatus {
  margin: -4px 16px 2px;
  min-height: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.directorySearchStatus[data-state="found"] {
  color: var(--gold-2);
}

.directorySearchStatus[data-state="error"] {
  color: #ffb0a0;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 0 8px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
}

.tab {
  position: relative;
  min-height: 38px;
  padding: 0 8px;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.tab.active {
  background: transparent;
  color: var(--gold-2);
  border-color: transparent;
  box-shadow: none;
}

.tab.active::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: -1px;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: var(--gold-2);
}

.actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 6px;
  margin: 0 12px;
}

#createInvite {
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(255, 211, 109, 0.18);
  color: var(--ink);
  font-weight: 700;
}

#createGroup {
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(255, 211, 109, 0.18);
}

#createChannel {
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(255, 211, 109, 0.18);
  color: var(--ink);
  font-weight: 700;
}

.actions button {
  min-height: 32px;
  padding: 0 8px;
  font-size: 12px;
}

.contacts {
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: auto;
  padding: 0 8px 10px;
  min-height: 0;
}

.listEmpty {
  margin: 6px 4px;
  border: 0;
  border-radius: 8px;
  padding: 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}

.contact {
  position: relative;
  width: 100%;
  text-align: left;
  min-height: 62px;
  border-color: transparent;
  border-radius: 0;
  padding: 9px 10px 9px 60px;
  background: transparent;
  backdrop-filter: blur(14px);
  box-shadow: none;
  border-bottom: 1px solid rgba(255, 215, 128, 0.08);
}

.contact::before {
  content: attr(data-initials);
  position: absolute;
  left: 10px;
  top: 50%;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  transform: translateY(-50%);
  background: linear-gradient(145deg, rgba(255, 211, 109, 0.3), rgba(9, 8, 6, 0.95));
  border: 1px solid rgba(255, 211, 109, 0.32);
  color: var(--gold-2);
  font-size: 12px;
  font-weight: 900;
  box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.18);
}

.contact.groupContact::before {
  border-radius: 8px;
  background: linear-gradient(145deg, var(--gold), #27374b);
}

.contact.channelContact::before {
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(255, 211, 109, 0.42), rgba(5, 5, 4, 0.96));
  content: "#";
  font-size: 18px;
}

.contact.active {
  border-color: transparent;
  background:
    linear-gradient(90deg, rgba(255, 211, 109, 0.14), rgba(255, 211, 109, 0.04) 68%, transparent),
    rgba(216, 173, 85, 0.055);
}

.contact.active::after {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 999px;
  background: var(--gold-2);
  box-shadow: 0 0 12px rgba(255, 211, 109, 0.42);
}

.contact:hover {
  transform: none;
  box-shadow: none;
  background: rgba(255, 198, 73, 0.065);
}

.contact strong,
.contact span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.chat {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
}

.chatTop {
  min-height: 84px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(8, 7, 5, 0.94), rgba(36, 25, 10, 0.66)),
    var(--brand-image) center 28% / 980px auto;
  backdrop-filter: blur(18px) saturate(140%);
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.chatPeer {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1 1 auto;
}

.chatPeer > div {
  min-width: 0;
}

.chatAvatar {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 1px solid rgba(255, 211, 109, 0.48);
  background:
    linear-gradient(145deg, rgba(255, 211, 109, 0.32), rgba(8, 7, 5, 0.92)),
    var(--brand-image) center / cover;
  color: var(--gold-2);
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 0 24px rgba(217, 154, 25, 0.14);
}

.chatAvatar[data-kind="group"] {
  border-radius: 8px;
}

.chatAvatar[data-kind="bot"] {
  background: linear-gradient(145deg, rgba(139, 188, 255, 0.26), rgba(8, 7, 5, 0.92));
}

.chatTop h2 {
  margin: 0 0 4px;
  font-size: 20px;
  letter-spacing: 0;
  color: var(--gold-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chatTop p {
  margin: 0;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chatSafety {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.chatSafety[data-state="verified"] {
  color: var(--gold-2);
}

.chatSafety[data-state="changed"],
.chatSafety[data-state="missing"] {
  color: #ffb36d;
}

.chatActions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex: 0 0 auto;
}

.callMode {
  min-height: 36px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(9, 8, 6, 0.92);
  color: var(--ink);
  padding: 0 8px;
}

.iconButton {
  min-width: 40px;
  width: 40px;
  min-height: 40px;
  padding: 0;
  border-radius: 50%;
  background: rgba(9, 8, 6, 0.92);
  color: var(--ink);
  font-size: 17px;
}

.analyticsIcon {
  width: 20px;
  height: 20px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.shieldIcon {
  width: 20px;
  height: 20px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#exportState {
  display: none;
}

#exportLocalBackup,
#importLocalBackup {
  border-color: rgba(242, 180, 63, 0.42);
  background: rgba(242, 180, 63, 0.12);
}

#callButton {
  background: linear-gradient(180deg, #ffd36d, #c88410);
  border-color: rgba(255, 211, 109, 0.74);
  color: #110c04;
}

#safetyButton[data-state="verified"] {
  border-color: rgba(130, 219, 154, 0.52);
  color: #b9f5c5;
}

#safetyButton[data-state="changed"],
#safetyButton[data-state="missing"] {
  border-color: rgba(255, 179, 109, 0.56);
  color: #ffcf9e;
}

.safetyNumber {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid rgba(255, 211, 109, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.35;
  color: var(--ink);
}

.safetyNumber span {
  text-align: center;
  letter-spacing: 0;
}

.safetyDetails {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.safetyDetails strong {
  color: var(--gold-2);
}

.backToChats {
  display: none;
}

.messages {
  padding: 18px 20px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background:
    linear-gradient(180deg, rgba(5, 5, 4, 0.93), rgba(5, 5, 4, 0.985)),
    var(--brand-image) center 24% / cover,
    repeating-linear-gradient(135deg, transparent 0 18px, rgba(255, 198, 73, 0.028) 18px 19px);
}

.empty {
  margin: auto;
  max-width: 520px;
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
}

.bubble {
  position: relative;
  max-width: min(680px, 82%);
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 38px 10px 12px;
  overflow-wrap: anywhere;
  line-height: 1.42;
}

.bubble.mine {
  align-self: flex-end;
  background: linear-gradient(180deg, #ffd36d, #c88410);
  border-color: rgba(255, 211, 109, 0.82);
  color: #151006;
  box-shadow: 0 8px 28px rgba(217, 154, 25, 0.24);
}

.bubble.theirs {
  align-self: flex-start;
  background: rgba(15, 13, 9, 0.9);
  color: var(--ink);
  border-color: rgba(255, 215, 128, 0.18);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.bubble.system {
  align-self: center;
  max-width: min(520px, 92%);
  padding: 10px 12px;
  background: rgba(255, 198, 73, 0.08);
  border-color: rgba(255, 198, 73, 0.18);
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.sender {
  display: block;
  margin-bottom: 4px;
  color: var(--gold-2);
  font-size: 12px;
}

.messageMeta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 5px;
  flex-wrap: wrap;
}

.bubble time,
.messageExpire {
  font-size: 11px;
  opacity: 0.72;
}

.messageExpire {
  padding: 2px 6px;
  border: 1px solid rgba(255, 211, 109, 0.22);
  border-radius: 999px;
  color: var(--gold-2);
  background: rgba(0, 0, 0, 0.18);
}

.messageDeleteButton {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  min-width: 26px;
  height: 26px;
  min-height: 26px;
  padding: 0;
  border-radius: 999px;
  border-color: rgba(255, 211, 109, 0.24);
  background: rgba(0, 0, 0, 0.22);
  color: currentColor;
  font-size: 18px;
  line-height: 1;
  opacity: 0;
}

.bubble:hover .messageDeleteButton,
.bubble:focus-within .messageDeleteButton {
  opacity: 0.78;
}

.messageDeleteButton:hover {
  opacity: 1;
  border-color: rgba(255, 211, 109, 0.7);
  background: rgba(0, 0, 0, 0.38);
}

.mediaAttachment {
  display: block;
  max-width: min(340px, 100%);
  margin-top: 8px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

.mediaAttachment img,
.mediaAttachment video {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: cover;
}

.mediaAttachment.circle,
.mediaAttachment.circle video {
  width: 190px;
  height: 190px;
  border-radius: 50%;
  object-fit: cover;
}

.fileAttachment {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: min(320px, 100%);
  margin-top: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.11);
  padding: 10px;
  backdrop-filter: blur(12px);
}

.fileIcon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: rgba(255, 198, 73, 0.14);
  border: 1px solid rgba(255, 198, 73, 0.36);
  color: var(--gold-2);
  font-size: 10px;
  font-weight: 900;
}

.fileMeta {
  min-width: 0;
}

.fileMeta strong,
.fileMeta small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fileMeta small {
  color: inherit;
  opacity: 0.72;
}

.attachmentProtection {
  display: block;
  grid-column: 1 / -1;
  margin-top: 2px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 211, 109, 0.24);
  background: rgba(0, 0, 0, 0.18);
  color: inherit;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.attachmentProtection[data-state="encrypted"] {
  border-color: rgba(71, 213, 151, 0.38);
  background: rgba(71, 213, 151, 0.13);
}

.attachmentProtection[data-state="public"] {
  border-color: rgba(255, 198, 73, 0.34);
  background: rgba(255, 198, 73, 0.13);
}

.fileAttachment a,
.externalBlobButton {
  color: #111722;
  background: var(--gold);
  border: 0;
  border-radius: 8px;
  padding: 8px 10px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.externalBlobButton:disabled {
  cursor: progress;
  opacity: 0.64;
}

.sticker {
  display: block;
  font-size: 54px;
  line-height: 1.05;
}

.channelPost {
  width: min(720px, 100%);
  align-self: center;
  border: 1px solid rgba(255, 211, 109, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(24, 18, 10, 0.92), rgba(8, 7, 5, 0.9)),
    rgba(255, 255, 255, 0.055);
  box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255, 215, 128, 0.08);
  padding: 14px;
  backdrop-filter: blur(16px) saturate(135%);
}

.channelPostHeader,
.channelPostMeta,
.channelCommentComposer {
  display: flex;
  align-items: center;
  gap: 8px;
}

.channelPostHeader {
  justify-content: space-between;
  margin-bottom: 10px;
}

.channelPostHeader strong {
  color: var(--gold-2);
  font-size: 14px;
}

.channelPostHeader time,
.channelPostMeta,
.channelComment {
  color: var(--muted);
  font-size: 12px;
}

.channelPost p {
  margin: 0;
  color: var(--ink);
  line-height: 1.5;
  white-space: pre-wrap;
}

.channelPostMeta {
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 215, 128, 0.12);
}

.channelPostMeta button {
  min-height: 32px;
  padding: 0 10px;
  background: rgba(255, 198, 73, 0.1);
  color: var(--gold-2);
}

.channelComments {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.channelComment {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  border: 1px solid rgba(255, 215, 128, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  padding: 8px 10px;
}

.channelComment strong {
  color: var(--gold-2);
}

.channelComment span {
  overflow-wrap: anywhere;
}

.channelCommentComposer input {
  flex: 1 1 auto;
  min-width: 0;
  height: 38px;
  padding: 0 10px;
}

.channelCommentComposer button {
  min-height: 38px;
  background: linear-gradient(180deg, #ffd36d, #c88410);
  border-color: rgba(255, 211, 109, 0.78);
  color: #151006;
  font-weight: 800;
}

.composer {
  border-top: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(19, 14, 8, 0.82), rgba(5, 5, 4, 0.86)),
    rgba(10, 14, 20, 0.72);
  backdrop-filter: blur(18px) saturate(140%);
  padding: 10px 12px;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

.attachMenu {
  position: relative;
  display: grid;
}

.attachTrigger,
.emojiTrigger {
  width: 46px;
  min-width: 46px;
  height: 46px;
  min-height: 46px;
  padding: 0;
  border-color: rgba(255, 211, 109, 0.34);
  background: rgba(8, 7, 5, 0.88);
  color: var(--gold-2);
  font-size: 20px;
  line-height: 1;
}

.attachTrigger {
  display: inline-grid;
  place-items: center;
}

.paperclipIcon {
  width: 25px;
  height: 25px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: rotate(-8deg);
  transition: transform 160ms ease, stroke-width 160ms ease;
}

.attachTrigger:hover .paperclipIcon {
  transform: rotate(-8deg) translateY(-1px);
}

.attachTrigger[aria-expanded="true"] {
  border-color: rgba(255, 211, 109, 0.78);
  background: linear-gradient(180deg, #ffd36d, #c88410);
  color: #151006;
  box-shadow: 0 0 26px rgba(217, 154, 25, 0.2);
}

.attachTrigger[aria-expanded="true"] .paperclipIcon {
  stroke-width: 2.25;
  transform: rotate(-8deg) scale(1.04);
}

.attachPanel {
  position: absolute;
  left: 0;
  bottom: calc(100% + 10px);
  z-index: 8;
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 8px;
  width: min(292px, calc(100vw - 24px));
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(30, 22, 10, 0.96), rgba(5, 5, 4, 0.96)),
    var(--brand-image) center / cover;
  padding: 10px;
  box-shadow: var(--shadow-soft), 0 0 34px rgba(217, 154, 25, 0.16);
  backdrop-filter: blur(20px) saturate(145%);
}

.attachPanel[hidden] {
  display: none;
}

.attachPanel button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 38px;
  padding: 0 10px;
  white-space: nowrap;
  text-align: left;
  font-size: 13px;
  background: rgba(8, 7, 5, 0.86);
  color: var(--ink);
}

.attachPanel button::before {
  display: inline-block;
  width: 22px;
  margin-right: 8px;
  color: var(--gold-2);
  text-align: center;
}

#attachPhoto::before {
  content: "▧";
}

#attachVideo::before {
  content: "▶";
}

#attachFile::before {
  content: "▤";
}

#attachCircle::before {
  content: "◉";
}

#stickersButton::before {
  content: "✦";
}

.emojiPanel {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(24, 17, 8, 0.96), rgba(5, 5, 4, 0.96)),
    var(--brand-image) center / cover;
  padding: 8px;
  box-shadow: var(--shadow-soft);
}

.emojiPanel[hidden] {
  display: none;
}

.emojiPanel button {
  min-width: 38px;
  min-height: 36px;
  padding: 0;
  font-size: 20px;
}

.attachmentUploadPanel {
  grid-column: 1 / -1;
  display: grid;
  gap: 7px;
  border: 1px solid rgba(255, 211, 109, 0.28);
  border-radius: 8px;
  background: rgba(8, 7, 5, 0.78);
  padding: 9px 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.attachmentUploadPanel[hidden] {
  display: none;
}

.attachmentUploadHeader,
.attachmentUploadFooter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.attachmentUploadHeader strong,
.attachmentUploadFooter span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachmentUploadHeader strong {
  color: var(--ink);
  font-size: 13px;
}

.attachmentUploadHeader span,
.attachmentUploadFooter span {
  color: var(--muted);
  font-size: 12px;
}

.attachmentUploadTrack {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.attachmentUploadTrack span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffd36d, #c88410);
  transition: width 180ms ease;
}

.attachmentUploadPanel[data-state="paused"] .attachmentUploadTrack span {
  background: linear-gradient(90deg, #ffe2a0, #8f9bb3);
}

.attachmentUploadPanel[data-state="error"] {
  border-color: rgba(255, 107, 107, 0.48);
}

.attachmentUploadPanel[data-state="error"] .attachmentUploadTrack span {
  background: linear-gradient(90deg, #ff8a8a, #b91c1c);
}

.attachmentUploadPanel[data-state="done"] .attachmentUploadTrack span {
  background: linear-gradient(90deg, #a7f3d0, #10b981);
}

#attachmentUploadRetry {
  min-height: 30px;
  padding: 0 10px;
  white-space: nowrap;
  font-size: 12px;
}

.messageTimerControl {
  position: relative;
  display: grid;
  width: 70px;
  min-width: 70px;
  height: 46px;
}

.messageTimerControl span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.messageTimerControl select {
  width: 100%;
  height: 46px;
  border: 1px solid rgba(255, 211, 109, 0.34);
  border-radius: 8px;
  background: rgba(8, 7, 5, 0.88);
  color: var(--gold-2);
  font: inherit;
  font-weight: 800;
  text-align: center;
  text-align-last: center;
  appearance: none;
}

.messageTimerControl::after {
  content: "v";
  position: absolute;
  right: 8px;
  top: 50%;
  color: var(--muted);
  font-size: 10px;
  transform: translateY(-50%);
  pointer-events: none;
}

.composer input {
  min-width: 0;
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border-radius: 8px;
}

.composer > button,
.attachMenu > button {
  background: var(--gold);
  border-color: var(--gold);
  color: #111722;
  font-weight: 800;
}

#sendMessage {
  min-width: 112px;
  background: linear-gradient(180deg, #ffd36d, #c88410);
  border-color: rgba(255, 211, 109, 0.78);
  color: #151006;
}

#emojiButton {
  background: rgba(8, 7, 5, 0.88);
  border-color: rgba(255, 211, 109, 0.34);
  color: var(--gold-2);
}

.callScreen {
  position: absolute;
  inset: 84px 0 74px;
  display: grid;
  place-items: center;
  padding: 22px;
  background:
    radial-gradient(circle at 50% 34%, rgba(69, 209, 183, 0.14), transparent 18rem),
    radial-gradient(circle at 62% 24%, rgba(216, 173, 85, 0.12), transparent 16rem),
    rgba(7, 9, 13, 0.9);
  backdrop-filter: blur(14px);
  z-index: 4;
}

.callScreen[hidden] {
  display: none;
}

.callScreen.minimized {
  inset: auto 14px 86px auto;
  width: min(360px, calc(100% - 28px));
  display: block;
  padding: 0;
  background: transparent;
  backdrop-filter: none;
  pointer-events: none;
}

.callCard {
  width: min(420px, 100%);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(31, 22, 10, 0.92), rgba(5, 5, 4, 0.96)),
    var(--brand-image) center / cover;
  padding: 28px 22px;
  text-align: center;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.62), 0 0 60px rgba(217, 154, 25, 0.16);
}

.callScreen.minimized .callCard {
  width: 100%;
  padding: 12px;
  text-align: left;
  pointer-events: auto;
  cursor: pointer;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  background:
    linear-gradient(180deg, rgba(24, 17, 8, 0.96), rgba(5, 5, 4, 0.98)),
    var(--brand-image) center / cover;
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.58), 0 0 28px rgba(217, 154, 25, 0.18);
}

.callScreen.minimized .callAvatar,
.callScreen.minimized .videoStage,
.callScreen.minimized .callWave,
.callScreen.minimized .callQuality {
  display: none;
}

.callScreen.minimized .callLabel {
  font-size: 10px;
}

.callScreen.minimized .callCard h3 {
  margin: 0;
  font-size: 16px;
}

.callScreen.minimized .callMeta {
  justify-content: start;
  margin: 0;
}

.callScreen.minimized .callCard p {
  margin: 0;
  font-size: 12px;
}

.callAvatar {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: linear-gradient(145deg, #0b0905, var(--gold));
  color: #10131b;
  font-size: 26px;
  font-weight: 900;
  box-shadow: 0 0 0 10px rgba(255, 198, 73, 0.08), 0 0 36px rgba(255, 198, 73, 0.2);
  overflow: hidden;
}

.videoStage {
  display: grid;
  grid-template-columns: 1fr 92px;
  gap: 10px;
  margin: 0 0 14px;
}

.videoStage video {
  width: 100%;
  min-height: 180px;
  border-radius: 8px;
  background: #05070b;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

#localVideo {
  min-height: 92px;
  align-self: end;
}

.callLabel {
  margin: 0;
  color: var(--teal);
  font-size: 12px;
  text-transform: uppercase;
}

.callCard h3 {
  margin: 6px 0;
  font-size: 28px;
}

.callMeta {
  display: flex;
  justify-content: center;
  gap: 8px;
  align-items: center;
  margin: 8px 0;
  color: var(--gold-2);
  font-size: 12px;
  font-weight: 800;
}

.callMeta span {
  min-width: 58px;
  border: 1px solid rgba(255, 211, 109, 0.2);
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(255, 211, 109, 0.08);
}

.callCard p {
  color: var(--muted);
}

.callQuality {
  min-height: 24px;
  margin: 8px auto 0;
  border: 1px solid rgba(69, 209, 183, 0.22);
  border-radius: 8px;
  background: rgba(69, 209, 183, 0.08);
  color: var(--teal);
  padding: 5px 8px;
  font-size: 12px;
}

.groupCallParticipants {
  display: grid;
  gap: 6px;
  margin: 10px 0 0;
}

.groupCallParticipant {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid rgba(255, 211, 109, 0.16);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.24);
  padding: 6px 8px;
  color: var(--text);
  font-size: 12px;
}

.groupCallParticipant span {
  color: var(--muted);
  font-size: 11px;
}

.callWave {
  display: flex;
  justify-content: center;
  align-items: end;
  gap: 6px;
  height: 38px;
  margin: 18px 0;
}

.callWave span {
  width: 7px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--teal), var(--gold));
  animation: callPulse 1.05s ease-in-out infinite;
}

.callWave span:nth-child(1) {
  height: 18px;
}

.callWave span:nth-child(2) {
  height: 32px;
  animation-delay: 0.12s;
}

.callWave span:nth-child(3) {
  height: 23px;
  animation-delay: 0.24s;
}

@keyframes callPulse {
  0%, 100% {
    transform: scaleY(0.65);
    opacity: 0.55;
  }

  50% {
    transform: scaleY(1);
    opacity: 1;
  }
}

.callControls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 8px;
}

.callScreen.minimized .callControls {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.callScreen.minimized .callControls button {
  min-height: 30px;
  padding: 0 6px;
  font-size: 11px;
}

.callScreen.minimized #videoCall,
.callScreen.minimized #shareScreen {
  display: none;
}

#acceptCall {
  background: var(--teal);
  border-color: var(--teal);
  color: #06100f;
}

#endCall {
  background: var(--red);
  border-color: var(--red);
}

dialog {
  width: min(680px, calc(100vw - 28px));
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(32, 22, 10, 0.94), rgba(5, 5, 4, 0.92)),
    var(--brand-image) center / cover;
  backdrop-filter: blur(22px) saturate(140%);
  box-shadow: var(--shadow), 0 0 42px rgba(217, 154, 25, 0.16);
}

.wideDialog {
  width: min(980px, calc(100vw - 28px));
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.68);
}

.dialogBody {
  padding: 18px;
  background: linear-gradient(180deg, rgba(5, 5, 4, 0.46), rgba(5, 5, 4, 0.78));
}

.dialogBody h3 {
  margin: 0 0 8px;
  color: var(--gold-2);
  text-shadow: 0 0 22px rgba(255, 198, 73, 0.2);
}

.dialogBody p {
  margin: 0 0 12px;
  color: var(--muted);
}

.dialogHeader {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 14px;
  margin-bottom: 10px;
}

.dialogHeader h3,
.dialogHeader p {
  margin-left: 0;
}

.dialogHeader > strong {
  min-width: 42px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 198, 73, 0.38);
  border-radius: 8px;
  background: rgba(255, 198, 73, 0.12);
  color: var(--gold-2);
  font-size: 18px;
}

textarea {
  width: 100%;
  min-height: 180px;
  resize: vertical;
  padding: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}

.inviteLink {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 12px;
  border: 1px solid rgba(255, 198, 73, 0.34);
  border-radius: 8px;
  background: rgba(255, 198, 73, 0.1);
  color: var(--gold-2);
  padding: 10px 12px;
  font-weight: 800;
  text-decoration: none;
}

.inviteLink::before {
  content: "↗";
}

.shortInviteBox {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
  margin: 8px 0 12px;
  padding: 12px;
  border: 1px solid rgba(255, 198, 73, 0.32);
  border-radius: 8px;
  background: rgba(7, 8, 10, 0.54);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.shortInviteBox span,
.shortInviteBox small {
  color: var(--text-muted);
}

.shortInviteBox strong {
  font-size: clamp(22px, 4.8vw, 34px);
  letter-spacing: 0;
  color: var(--gold-2);
  overflow-wrap: anywhere;
}

.shortInviteBox button {
  grid-row: span 3;
}

@media (max-width: 560px) {
  .shortInviteBox {
    grid-template-columns: 1fr;
  }

  .shortInviteBox button {
    grid-row: auto;
    width: 100%;
  }
}

.circlePreview {
  display: block;
  width: 220px;
  height: 220px;
  margin: 14px auto;
  border-radius: 50%;
  background: #050505;
  object-fit: cover;
  border: 1px solid var(--line-strong);
  box-shadow: 0 0 0 10px rgba(255, 198, 73, 0.08), 0 0 34px rgba(217, 154, 25, 0.2);
}

.dialogActions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.walletBody {
  max-height: min(860px, calc(100vh - 48px));
  overflow: auto;
}

.walletHeader {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(5, 5, 4, 0.88), rgba(63, 40, 12, 0.5)),
    var(--brand-image) center 34% / 820px auto;
  padding: 14px;
}

.walletHeader strong {
  color: var(--gold-2);
  font-size: 28px;
  white-space: nowrap;
  text-shadow: 0 0 24px rgba(255, 198, 73, 0.28);
}

.walletWarning {
  margin: 12px 0;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 198, 73, 0.16), rgba(255, 143, 31, 0.08));
  color: var(--gold-2);
  padding: 12px;
  line-height: 1.45;
}

.walletSecurityStatus {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.readinessMiniPanel {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border: 1px solid rgba(139, 188, 255, 0.22);
  border-radius: 8px;
  background: rgba(139, 188, 255, 0.055);
  padding: 10px;
  margin: 8px 0;
}

.readinessMiniPanel strong {
  flex: 1 0 100%;
  color: var(--blue);
}

.readinessMiniPanel span,
.walletSafetyBadge {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 9px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.readinessMiniPanel span.ok,
.walletSafetyBadge.ok {
  border-color: rgba(93, 214, 139, 0.46);
  color: #9ef0bc;
}

.readinessMiniPanel span.warn,
.walletSafetyBadge.warn {
  border-color: rgba(255, 198, 73, 0.54);
  color: var(--gold-2);
}

.walletEmpty label,
.walletSend label,
.walletAdd label,
.walletSwitcher label {
  display: block;
  margin: 12px 0 6px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.walletDashboard {
  display: grid;
  gap: 14px;
}

.walletDashboard[hidden] {
  display: none;
}

.walletActions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
}

.walletSwitcher {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(21, 16, 9, 0.72), rgba(6, 6, 5, 0.72)),
    rgba(7, 10, 15, 0.48);
  padding: 12px;
}

.walletSwitcher label {
  grid-column: 1 / -1;
  margin-top: 0;
}

.walletSwitcher select,
.walletAdd input,
.walletAdd textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(5, 5, 4, 0.92);
  color: var(--ink);
  padding: 0 10px;
}

.walletSwitcher select,
.walletAdd input {
  height: 42px;
}

.walletAdd {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(21, 16, 9, 0.7), rgba(6, 6, 5, 0.7));
  padding: 12px;
}

.walletAdd summary {
  cursor: pointer;
  color: var(--gold-2);
  font-weight: 800;
}

.walletAdd textarea {
  min-height: 92px;
  padding: 10px;
}

.walletActions button:first-child,
#refreshWalletBalances,
#broadcastTransaction,
#makeTransaction,
#importSeed,
#createRealWallet,
#importAdditionalSeed {
  background: linear-gradient(180deg, #ffd36d, #c88410);
  border-color: rgba(255, 211, 109, 0.78);
  color: #151006;
  font-weight: 800;
}

.assetList {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

.assetCard {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(26, 20, 11, 0.88), rgba(8, 7, 5, 0.86)),
    rgba(255, 255, 255, 0.045);
  padding: 12px;
  backdrop-filter: blur(14px);
}

.assetCard.selected {
  border-color: rgba(255, 211, 109, 0.76);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 0 0 2px rgba(216, 173, 85, 0.12), 0 0 28px rgba(217, 154, 25, 0.14);
}

.assetTop {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.assetTop strong {
  font-size: 18px;
  color: var(--gold-2);
}

.assetCard code {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.walletSend {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(21, 16, 9, 0.7), rgba(6, 6, 5, 0.7));
  padding: 12px;
}

.adminAuth {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: end;
  margin: 12px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(21, 16, 9, 0.72), rgba(6, 6, 5, 0.72));
  padding: 12px;
}

.adminAuth label {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.adminAuth input {
  height: 42px;
  padding: 0 10px;
}

.adminGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.analyticsGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.analyticsSection {
  display: grid;
  gap: 10px;
  margin: 12px 0;
}

.analyticsSection h4 {
  margin: 4px 0 0;
  color: var(--gold-2);
  font-size: 14px;
}

.roleCreate {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 220px);
  gap: 10px;
  align-items: end;
  margin: 12px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(21, 16, 9, 0.72), rgba(6, 6, 5, 0.72));
  padding: 12px;
}

.roleCreate label {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.roleCreate input,
.roleCreate select {
  min-height: 42px;
  padding: 0 10px;
}

.rolePermissions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
}

.rolePermission {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid rgba(255, 211, 109, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  padding: 8px 10px;
  color: var(--ink);
  font-size: 13px;
}

.rolePermission input {
  width: 16px;
  height: 16px;
  min-height: 16px;
  accent-color: var(--gold);
}

.roleCreate > button {
  grid-column: 1 / -1;
}

.roleAdminList {
  display: grid;
  gap: 10px;
}

.roleRow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(24, 18, 10, 0.72), rgba(8, 7, 5, 0.74));
  padding: 12px;
}

.roleRow strong,
.roleRow span,
.roleRow small {
  display: block;
}

.roleRow strong,
.roleRow b {
  color: var(--gold-2);
}

.roleRow span,
.roleRow small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.roleRow.owner {
  border-color: rgba(255, 211, 109, 0.42);
}

.roleRowActions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.callLogSummary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 8px;
  margin: 10px 0 12px;
}

.callLogSummary span {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  padding: 10px;
}

.callLogSummary strong,
.callLogSummary small {
  display: block;
}

.callLogSummary strong {
  color: var(--gold-2);
  font-size: 17px;
}

.callLogSummary small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.callLogList {
  display: grid;
  gap: 8px;
  max-height: min(56vh, 520px);
  overflow: auto;
  padding-right: 2px;
}

.callLogRow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-left-width: 3px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(24, 18, 10, 0.72), rgba(8, 7, 5, 0.74));
  padding: 12px;
}

.callLogRow.ended {
  border-left-color: var(--teal);
}

.callLogRow.missed {
  border-left-color: var(--red);
}

.callLogRow.rejected {
  border-left-color: var(--gold);
}

.callLogRow strong,
.callLogRow span,
.callLogRow small,
.callLogRow b {
  display: block;
}

.callLogRow strong,
.callLogRow b {
  color: var(--gold-2);
}

.callLogRow span,
.callLogRow small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.callLogActions {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.adminMetric,
.adminRecord,
.analyticsRow {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(24, 18, 10, 0.72), rgba(8, 7, 5, 0.74));
  padding: 12px;
}

.adminMetric strong,
.adminMetric span,
.adminRecord strong,
.adminRecord span,
.adminRecord small,
.analyticsRow strong,
.analyticsRow span,
.analyticsRow small {
  display: block;
}

.adminMetric strong,
.adminRecord strong,
.analyticsRow strong {
  color: var(--gold-2);
}

.adminMetric span,
.adminRecord span,
.adminRecord small,
.analyticsRow span,
.analyticsRow small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.adminModeration {
  display: grid;
  gap: 10px;
}

.adminRecord {
  display: grid;
  gap: 8px;
}

.adminRecordActions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.blobOpsActions {
  margin: 10px 0 12px;
}

.blobScopeList {
  display: grid;
  gap: 8px;
}

.mediaGovernanceList {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.trustSafetyList {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.adminRecordList {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.adminRecord.status-mvp {
  border-color: rgba(245, 158, 11, 0.42);
}

.adminRecord.status-blocked {
  border-color: rgba(239, 68, 68, 0.48);
  background: linear-gradient(180deg, rgba(92, 20, 20, 0.48), rgba(8, 7, 5, 0.74));
}

.adminRecord.status-ready {
  border-color: rgba(34, 197, 94, 0.36);
}

.adminRecord.stale {
  border-color: rgba(239, 68, 68, 0.42);
  background: linear-gradient(180deg, rgba(92, 20, 20, 0.52), rgba(8, 7, 5, 0.74));
}

.stakingHeader {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.stakingHeader strong,
.stakingHeader span {
  display: block;
}

.stakingHeader span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.stakingProviderList {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.stakingProvider {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  align-items: center;
  border: 1px solid rgba(255, 198, 73, 0.24);
  border-radius: 8px;
  background: rgba(255, 198, 73, 0.065);
  padding: 10px;
}

.stakingProvider span,
.stakingProvider small {
  color: var(--muted);
}

.stakingProvider small {
  grid-column: 1 / -1;
  overflow-wrap: anywhere;
}

.walletSend input {
  width: 100%;
  height: 42px;
  padding: 0 10px;
}

.walletSend select {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(5, 5, 4, 0.92);
  color: var(--ink);
  padding: 0 10px;
  margin-bottom: 8px;
}

.walletLocked {
  display: grid;
  gap: 10px;
}

.walletLocked[hidden] {
  display: none;
}

.walletLocked input {
  height: 42px;
  padding: 0 10px;
}

.receivePanel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 198, 73, 0.09), rgba(10, 9, 6, 0.78));
  padding: 12px;
}

.qrMock {
  display: grid;
  grid-template-columns: repeat(9, 8px);
  grid-auto-rows: 8px;
  gap: 3px;
  padding: 10px;
  border-radius: 8px;
  background: #f7f4ea;
}

.qrMock span {
  border-radius: 2px;
  background: transparent;
}

.qrMock span.on {
  background: #11141c;
}

.receiveInfo {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.receiveInfo code {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.receiveInfo button {
  justify-self: start;
  min-height: 34px;
}

.walletHistory {
  display: grid;
  gap: 8px;
}

.historyItem {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  color: var(--muted);
}

.historyItem strong {
  color: var(--ink);
}

.escrowCreate,
.marketCreate,
.botBuilder {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 10, 15, 0.48);
  padding: 12px;
  margin: 12px 0;
}

.splitActions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.escrowCreate label,
.marketCreate label,
.botBuilder label {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.escrowCreate input,
.escrowCreate select,
.marketCreate input,
.marketCreate select,
.botBuilder input {
  height: 42px;
  padding: 0 10px;
}

.escrowCreate select,
.marketCreate select {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 10, 15, 0.92);
  color: var(--ink);
}

.escrowList,
.listingList,
.botList {
  display: grid;
  gap: 10px;
}

.escrowCard,
.listingCard,
.botRow {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.065);
  padding: 12px;
}

.escrowTop,
.listingTop,
.botRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.escrowCard code {
  display: block;
  color: var(--muted);
  margin: 8px 0;
}

.escrowMeta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  margin: 8px 0;
  overflow-wrap: anywhere;
}

.escrowRuleGrid,
.listingRules,
.escrowAudit {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}

.escrowRuleGrid span,
.listingRules span,
.escrowAudit span {
  border: 1px solid rgba(255, 198, 73, 0.22);
  border-radius: 8px;
  background: rgba(255, 198, 73, 0.06);
  color: var(--muted);
  padding: 5px 8px;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.escrowAudit span {
  border-color: rgba(69, 209, 183, 0.2);
  background: rgba(69, 209, 183, 0.055);
}

.escrowIntegrity {
  border: 1px solid rgba(139, 188, 255, 0.22);
  border-radius: 8px;
  background: rgba(139, 188, 255, 0.055);
  color: var(--blue);
  padding: 7px 9px;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.escrowIntegrity.warn {
  border-color: rgba(240, 93, 102, 0.35);
  background: rgba(240, 93, 102, 0.09);
  color: var(--red);
}

.treasuryPanel {
  display: grid;
  gap: 6px;
  border: 1px solid rgba(69, 209, 183, 0.22);
  border-radius: 8px;
  background: rgba(69, 209, 183, 0.055);
  padding: 10px 12px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.treasuryPanel strong {
  color: var(--teal);
}

.treasuryPanel code {
  color: var(--gold-2);
  white-space: normal;
}

.evidenceList,
.escrowTimeline {
  display: grid;
  gap: 6px;
  margin: 8px 0;
}

.evidenceList div {
  border: 1px solid rgba(69, 209, 183, 0.18);
  border-radius: 8px;
  background: rgba(69, 209, 183, 0.055);
  padding: 8px;
}

.evidenceList strong,
.evidenceList span {
  display: block;
  overflow-wrap: anywhere;
}

.evidenceList strong {
  color: var(--soft);
  font-size: 12px;
}

.evidenceList span,
.escrowTimeline span {
  color: var(--muted);
  font-size: 12px;
}

.escrowTimeline span {
  border-left: 2px solid rgba(216, 173, 85, 0.45);
  padding-left: 8px;
}

.escrowActions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.listingCard p,
.escrowCard p {
  color: var(--muted);
  margin: 8px 0;
  overflow-wrap: anywhere;
}

.listingCard small {
  color: var(--muted);
  display: block;
  margin-bottom: 10px;
}

.listingActions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.listingCard.escrow {
  border-color: rgba(102, 133, 255, 0.55);
}

.adSlot {
  display: grid;
  gap: 5px;
  border: 1px solid rgba(69, 209, 183, 0.28);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(69, 209, 183, 0.12), rgba(216, 173, 85, 0.08));
  padding: 10px 12px;
  cursor: pointer;
}

.adSlot[hidden] {
  display: none;
}

.adSlot strong {
  color: var(--teal);
}

.adSlot span,
.adSlot small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.developerNewsList {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.newsCard {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.065);
  padding: 12px;
}

.newsCard strong,
.newsCard span,
.newsCard p,
.newsCard small {
  display: block;
}

.newsCard span {
  width: fit-content;
  margin: 8px 0;
  border: 1px solid rgba(216, 173, 85, 0.38);
  border-radius: 8px;
  color: var(--gold-2);
  padding: 3px 7px;
  font-size: 11px;
}

.newsCard p,
.newsCard small {
  color: var(--muted);
  line-height: 1.4;
}

.escrowCard.funded {
  border-color: rgba(102, 133, 255, 0.55);
}

.escrowCard.released {
  border-color: rgba(70, 190, 120, 0.55);
}

.escrowCard.dispute {
  border-color: rgba(229, 87, 87, 0.7);
}

.botRow strong,
.botRow span {
  min-width: 0;
}

.contact.botContact::before {
  border-radius: 50%;
  background: linear-gradient(145deg, var(--gold-2), var(--blue));
}

.browserBar {
  display: grid;
  grid-template-columns: minmax(132px, 0.45fr) minmax(0, 1fr) auto auto auto auto auto;
  gap: 8px;
  margin: 12px 0;
}

.browserBar input,
.browserBar select,
.proxyForm input,
.proxyForm select {
  height: 42px;
  padding: 0 10px;
}

.browserTorPanel,
.proxyPanel,
.browserProjectNews,
.browserAdSlot {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(23, 17, 9, 0.68), rgba(6, 6, 5, 0.7)),
    rgba(7, 10, 15, 0.46);
}

.browserTorPanel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin: 12px 0;
  padding: 10px;
}

.browserTorPanel label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--soft);
  font-weight: 700;
}

.browserTorPanel span {
  color: var(--muted);
  font-size: 12px;
}

.proxyPanel {
  display: grid;
  gap: 10px;
  padding: 10px;
}

.proxyForm {
  display: grid;
  grid-template-columns: 112px 1fr 1fr 84px auto;
  gap: 8px;
}

.proxyList {
  display: grid;
  gap: 8px;
}

.proxyRoute {
  display: grid;
  grid-template-columns: minmax(120px, 0.7fr) minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.proxyRoute.active {
  border-color: rgba(255, 211, 109, 0.48);
  background: rgba(255, 198, 73, 0.1);
}

.proxyRoute.empty {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.proxyRoute strong,
.proxyRoute span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.proxyRoute span {
  color: var(--muted);
  font-size: 12px;
}

.browserSideGrid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(220px, 0.75fr);
  gap: 10px;
  margin-bottom: 12px;
}

.browserProjectNews,
.browserAdSlot {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 10px;
}

.browserProjectNews > strong,
.browserAdSlot > strong {
  color: var(--gold-2);
}

.browserNewsCard {
  display: grid;
  gap: 4px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.browserNewsCard span,
.browserProjectNews > span,
.browserAdSlot span,
.browserAdSlot small,
.browserNewsCard small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.browserAdSlot {
  border-color: rgba(216, 173, 85, 0.26);
  background:
    linear-gradient(135deg, rgba(216, 173, 85, 0.13), rgba(255, 143, 31, 0.08)),
    rgba(7, 10, 15, 0.46);
}

.browserSafety {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.browserSafety div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 12, 7, 0.72);
  padding: 10px;
}

.browserSafety strong,
.browserSafety span {
  display: block;
}

.browserSafety strong {
  color: var(--soft);
}

.browserSafety span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

#anonFrame {
  width: 100%;
  height: min(620px, 62vh);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.profileEditor {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

#profileAvatarPreview {
  width: 112px;
  height: 112px;
  border-radius: 24px;
  border: 1px solid var(--line-strong);
  object-fit: cover;
  background: rgba(7, 10, 15, 0.92);
  box-shadow: 0 0 0 6px rgba(255, 198, 73, 0.06), 0 0 26px rgba(217, 154, 25, 0.12);
}

.profileEditor label {
  display: block;
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.profileEditor input {
  width: 100%;
  height: 42px;
  padding: 0 10px;
  margin-bottom: 10px;
}

.statusPresets {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.statusPresets button {
  min-height: 32px;
  font-size: 12px;
}

.profileTools {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  border: 1px solid rgba(255, 215, 128, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  padding: 10px;
}

.profileTools small {
  font-size: 11px;
  line-height: 1.35;
}

.profileTools select {
  width: 100%;
  height: 40px;
  padding: 0 10px;
}

.toggleRow {
  display: flex !important;
  align-items: center;
  gap: 8px;
  margin: 4px 0 0 !important;
  color: var(--ink) !important;
  text-transform: none !important;
}

.toggleRow input {
  width: auto;
  height: auto;
  margin: 0;
}

.translationLine {
  display: block;
  margin-top: 7px;
  border-left: 2px solid rgba(255, 211, 109, 0.48);
  padding-left: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.securityGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.securityGrid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(24, 18, 10, 0.72), rgba(8, 7, 5, 0.74));
  padding: 12px;
}

.securityGrid strong,
.securityGrid span {
  display: block;
}

.securityGrid strong {
  color: var(--soft);
}

.securityGrid span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.securityDiagnostics {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.securityDiagnostics div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(16, 12, 7, 0.72);
  color: var(--muted);
}

.securityDiagnostics strong {
  color: var(--ink);
}

.securityDiagnostics div.ready {
  border-color: rgba(69, 209, 183, 0.28);
}

.securityDiagnostics div.ready strong {
  color: var(--teal);
}

.securityDiagnostics div.mvp,
.securityDiagnostics div.idle,
.securityDiagnostics div.running {
  border-color: rgba(255, 198, 73, 0.28);
}

.securityDiagnostics div.mvp strong,
.securityDiagnostics div.idle strong,
.securityDiagnostics div.running strong {
  color: var(--gold);
}

.securityDiagnostics div.blocked {
  border-color: rgba(255, 90, 110, 0.34);
}

.securityDiagnostics div.blocked strong {
  color: var(--red);
}

.readinessPanel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.readinessSummary,
.readinessCard {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(10, 10, 8, 0.78);
  padding: 12px;
}

.readinessSummary {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border-color: rgba(255, 198, 73, 0.32);
  background: linear-gradient(135deg, rgba(255, 198, 73, 0.12), rgba(69, 209, 183, 0.06));
}

.readinessSummary strong,
.readinessSummary span,
.readinessCard strong,
.readinessCard span,
.readinessCard small {
  display: block;
}

.readinessSummary strong {
  color: var(--gold);
}

.readinessSummary span,
.readinessCard small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.readinessCard {
  border-left-width: 3px;
}

.readinessCard strong {
  color: var(--ink);
  font-size: 13px;
}

.readinessCard span {
  color: var(--soft);
  margin-top: 6px;
  font-size: 15px;
  font-weight: 800;
}

.readinessCard small {
  margin-top: 6px;
}

.readinessCard.ready {
  border-left-color: var(--teal);
}

.readinessCard.mvp {
  border-left-color: var(--gold);
}

.readinessCard.blocked {
  border-left-color: var(--red);
}

.externalDependenciesPanel {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.launchClosurePanel {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.launchClosureSummary {
  border-color: rgba(255, 198, 73, 0.34);
  background: linear-gradient(135deg, rgba(255, 198, 73, 0.13), rgba(47, 214, 184, 0.07));
}

.launchClosureSummary .externalDepsSummaryText strong {
  color: var(--gold);
}

.launchClosurePhaseStrip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.launchClosurePhaseStrip span {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.35;
  min-height: 34px;
  padding: 7px 9px;
}

.launchClosurePhaseStrip span.ready {
  border-color: rgba(47, 214, 184, 0.26);
  color: var(--teal);
}

.launchClosurePhaseStrip span.mvp {
  border-color: rgba(255, 198, 73, 0.26);
  color: var(--gold);
}

.launchClosurePhaseStrip span.blocked {
  border-color: rgba(255, 90, 110, 0.28);
  color: var(--red);
}

.launchClosureCard {
  border-left-color: var(--gold);
}

.launchClosureCard.current {
  background: linear-gradient(135deg, rgba(255, 198, 73, 0.12), rgba(10, 10, 8, 0.78));
  box-shadow: inset 0 0 0 1px rgba(255, 198, 73, 0.12);
}

.launchClosureCard.ready {
  border-left-color: var(--teal);
}

.launchClosureCard.blocked {
  border-left-color: var(--red);
}

.launchClosureCriteria span {
  border-color: rgba(255, 198, 73, 0.24);
}

.credentialRotationPanel {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.credentialRotationSummary {
  border-color: rgba(255, 90, 110, 0.28);
  background: linear-gradient(135deg, rgba(255, 90, 110, 0.10), rgba(255, 198, 73, 0.08));
}

.credentialRotationSummary .externalDepsSummaryText strong {
  color: var(--red);
}

.credentialRotationCard {
  border-left-color: var(--gold);
}

.credentialRotationCard.current {
  background: linear-gradient(135deg, rgba(255, 90, 110, 0.10), rgba(10, 10, 8, 0.78));
  box-shadow: inset 0 0 0 1px rgba(255, 90, 110, 0.11);
}

.credentialRotationCard.ready {
  border-left-color: var(--teal);
}

.credentialRotationCard.blocked {
  border-left-color: var(--red);
}

.credentialRotationFlags .credentialRotationFlag {
  border-color: rgba(255, 90, 110, 0.28);
  color: var(--red);
}

.credentialRotationFlags .credentialRotationFallback {
  border-color: rgba(255, 198, 73, 0.24);
  color: var(--gold);
}

.credentialRotationFlags .credentialRotationRejected {
  border-color: rgba(47, 214, 184, 0.22);
  color: var(--teal);
}

.credentialRotationCriteria span {
  border-color: rgba(255, 255, 255, 0.12);
}

.credentialRotationLive.ready {
  border-color: rgba(47, 214, 184, 0.24);
  color: var(--teal);
}

.credentialRotationLive.blocked {
  border-color: rgba(255, 198, 73, 0.28);
  color: var(--gold);
}

.externalAuditPanel {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.externalAuditSummary {
  border-color: rgba(255, 198, 73, 0.30);
  background: linear-gradient(135deg, rgba(255, 198, 73, 0.12), rgba(57, 156, 255, 0.07));
}

.externalAuditSummary .externalDepsSummaryText strong {
  color: var(--gold);
}

.externalAuditCard {
  border-left-color: var(--gold);
}

.externalAuditCard.ready {
  border-left-color: var(--teal);
}

.externalAuditCard.blocked {
  border-left-color: var(--red);
}

.externalAuditChips .externalAuditFlag {
  border-color: rgba(255, 198, 73, 0.28);
  color: var(--gold);
}

.externalAuditChips .externalAuditRejected {
  border-color: rgba(47, 214, 184, 0.24);
  color: var(--teal);
}

.browserGatewayPanel {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.browserGatewaySummary {
  border-color: rgba(57, 156, 255, 0.24);
  background: rgba(57, 156, 255, 0.08);
}

.browserGatewaySummary .externalDepsSummaryText strong {
  color: var(--blue);
}

.browserGatewayCard {
  border-left-color: var(--blue);
}

.browserGatewayCard.mvp {
  border-left-color: var(--teal);
}

.browserGatewayCard.blocked {
  border-left-color: var(--gold);
}

.browserGatewayLive.ready {
  border-color: rgba(47, 214, 184, 0.24);
  color: var(--teal);
}

.browserGatewayLive.blocked {
  border-color: rgba(255, 90, 110, 0.24);
  color: var(--red);
}

.browserGatewayChips .browserGatewayFlag {
  border-color: rgba(255, 198, 73, 0.28);
  color: var(--gold);
}

.browserGatewayChips .browserGatewayRejected {
  border-color: rgba(47, 214, 184, 0.24);
  color: var(--teal);
}

.nativePushPanel {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.nativePushSummary {
  border-color: rgba(70, 190, 120, 0.25);
  background: rgba(70, 190, 120, 0.08);
}

.nativePushSummary .externalDepsSummaryText strong {
  color: var(--green);
}

.nativePushProviderStrip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nativePushProviderStrip span {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.04);
}

.nativePushProviderStrip .nativePushReady {
  border-color: rgba(70, 190, 120, 0.28);
  color: var(--green);
}

.nativePushProviderStrip .nativePushPending {
  border-color: rgba(255, 198, 73, 0.28);
  color: var(--gold);
}

.nativePushLive.ready {
  border-color: rgba(70, 190, 120, 0.24);
  color: var(--green);
}

.nativePushLive.blocked {
  border-color: rgba(255, 198, 73, 0.28);
  color: var(--gold);
}

.nativePushCard {
  border-left-color: var(--green);
}

.nativePushCard.mvp {
  border-left-color: var(--teal);
}

.nativePushCard.blocked {
  border-left-color: var(--gold);
}

.nativePushChips .nativePushFlag {
  border-color: rgba(255, 198, 73, 0.28);
  color: var(--gold);
}

.nativePushChips .nativePushSafe {
  border-color: rgba(70, 190, 120, 0.24);
  color: var(--green);
}

.launchFlagsPanel {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.launchFlagsSummary {
  border-color: rgba(47, 214, 184, 0.24);
  background: rgba(47, 214, 184, 0.07);
}

.launchFlagsSummary .externalDepsSummaryText strong {
  color: var(--teal);
}

.launchFlagsCard {
  border-left-color: var(--teal);
}

.launchFlagsCard.blocked {
  border-left-color: var(--gold);
}

.launchFlagsChips .launchFlagPending {
  border-color: rgba(255, 198, 73, 0.26);
  color: var(--gold);
}

.launchFlagsChips .launchFlagConfirmed {
  border-color: rgba(47, 214, 184, 0.24);
  color: var(--teal);
}

.externalDepsSummary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  border: 1px solid rgba(255, 198, 73, 0.28);
  border-radius: 8px;
  background: rgba(255, 198, 73, 0.08);
  padding: 12px;
}

.externalDepsSummaryText {
  min-width: 0;
}

.externalDepsSummaryText strong,
.externalDepsSummaryText span {
  display: block;
}

.externalDepsSummaryText strong {
  color: var(--gold);
}

.externalDepsSummaryText span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.externalDepsSummaryActions,
.externalDepsActions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.externalDepsSummaryActions button,
.externalDepsAction {
  min-height: 30px;
  border: 1px solid rgba(255, 198, 73, 0.22);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--soft);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  padding: 7px 9px;
}

.externalDepsSummaryActions button:disabled,
.externalDepsAction:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.externalDepsNotice {
  border: 1px solid rgba(47, 214, 184, 0.22);
  border-radius: 8px;
  background: rgba(47, 214, 184, 0.08);
  color: var(--teal);
  font-size: 12px;
  line-height: 1.45;
  padding: 9px 10px;
}

.externalDepsGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}

.externalDepsCard {
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: 8px;
  background: rgba(10, 10, 8, 0.72);
  padding: 12px;
  min-width: 0;
}

.externalDepsCard.ready {
  border-left-color: var(--teal);
}

.externalDepsCard.blocked {
  border-left-color: var(--red);
}

.externalDepsCardHeader {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.externalDepsCardHeader strong {
  min-width: 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
}

.externalDepsPill {
  flex: 0 0 auto;
  border: 1px solid rgba(255, 198, 73, 0.28);
  border-radius: 999px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  padding: 5px 8px;
}

.externalDepsCard small,
.externalDepsCard p {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  margin: 8px 0 0;
}

.externalDepsCard p {
  color: var(--soft);
}

.externalDepsChips,
.externalDepsEndpoints {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.externalDepsChips span,
.externalDepsEndpoints code,
.externalDepsEndpoints a {
  max-width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
  padding: 5px 8px;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.externalDepsEndpoints code,
.externalDepsEndpoints a {
  border-radius: 7px;
  color: var(--teal);
}

.externalDepsActions {
  justify-content: flex-start;
  margin-top: 10px;
}

.privacyControls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
  border: 1px solid rgba(255, 198, 73, 0.22);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 198, 73, 0.08), rgba(255, 255, 255, 0.035));
  padding: 12px;
}

.privacyControls label {
  color: var(--muted);
  font-size: 13px;
}

.privacyControls label:has(input) {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
}

.privacyControls select,
.privacyControls input {
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 10, 15, 0.92);
  color: var(--ink);
  padding: 0 10px;
}

.privacyControls input[type="range"] {
  accent-color: var(--gold);
  padding: 0;
}

.notificationStatus,
.backupStatus {
  grid-column: 1 / -1;
  border: 1px solid rgba(69, 209, 183, 0.2);
  border-radius: 8px;
  background: rgba(69, 209, 183, 0.08);
  color: var(--teal);
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.4;
}

.backupStatus[data-state="missing"],
.backupStatus[data-state="old"] {
  border-color: rgba(255, 198, 73, 0.3);
  background: rgba(255, 198, 73, 0.1);
  color: var(--gold);
}

.backupStatus[data-state="fresh"] {
  border-color: rgba(69, 209, 183, 0.26);
  background: rgba(69, 209, 183, 0.08);
  color: var(--teal);
}

.backupStatus strong,
.backupStatus span {
  display: block;
}

.backupStatus span {
  margin-top: 4px;
  color: var(--muted);
}

.notificationTestGrid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.notificationTestGrid button {
  width: 100%;
  min-height: 36px;
  padding: 0 10px;
  font-size: 12px;
}

.releaseArtifactLinks {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.releaseArtifactLinks a,
.releaseArtifactLinks small {
  min-height: 56px;
  border: 1px solid rgba(255, 198, 73, 0.22);
  border-radius: 8px;
  background: rgba(7, 10, 15, 0.76);
  color: var(--ink);
  padding: 9px 10px;
  text-decoration: none;
}

.releaseArtifactLinks a strong,
.releaseArtifactLinks a span {
  display: block;
}

.releaseArtifactLinks a span,
.releaseArtifactLinks small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.privacyControls button {
  grid-column: 1 / -1;
  justify-self: start;
}

.privacyControls .notificationTestGrid button {
  grid-column: auto;
  justify-self: stretch;
}

#panicLock,
#resetProfile,
#endCall {
  background: linear-gradient(180deg, rgba(240, 93, 102, 0.95), rgba(150, 38, 51, 0.95));
  border-color: rgba(240, 93, 102, 0.72);
  color: #fff5f5;
}

#saveEmergencyPassword,
#lockApp {
  border-color: rgba(240, 93, 102, 0.36);
}

* {
  scrollbar-color: rgba(216, 173, 85, 0.42) rgba(7, 10, 15, 0.26);
}

::selection {
  background: rgba(216, 173, 85, 0.35);
  color: var(--ink);
}

@media (max-width: 760px) {
  body {
    padding-top: 0;
    min-height: 100dvh;
    overflow-x: hidden;
    overscroll-behavior-x: none;
    background:
      linear-gradient(180deg, rgba(3, 3, 3, 0.94), rgba(3, 3, 3, 0.98)),
      var(--brand-image) center top / auto 100vh fixed,
      var(--bg);
  }

  .shell {
    grid-template-columns: 1fr;
    min-height: 100vh;
    min-height: 100dvh;
    height: 100dvh;
    padding: 0;
    gap: 0;
  }

  .sidebar,
  .chat {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }

  .sidebar {
    border-bottom: 1px solid var(--line);
    min-height: 100vh;
    min-height: 100dvh;
    max-height: 100dvh;
    padding: 0 0 max(10px, var(--safe-bottom));
    gap: 7px;
    z-index: 4;
  }

  body.menuOpen .sidebar {
    overflow: visible;
    z-index: 80;
  }

  .brand {
    position: sticky;
    top: 0;
    z-index: 90;
    padding-top: max(48px, calc(var(--safe-top) + 18px));
  }

  .chat {
    display: none;
    min-height: 100vh;
    min-height: 100dvh;
    height: 100dvh;
    width: 100vw;
    max-width: 100vw;
    border-top: 0;
    grid-template-rows: auto minmax(0, 1fr) auto;
    z-index: 1;
  }

  body.mobileChatOpen .sidebar {
    display: none;
  }

  body.mobileChatOpen .chat {
    display: grid;
    min-height: 100vh;
    min-height: 100dvh;
  }

  .brandTop {
    min-height: 70px;
    padding: 10px 12px 8px;
    gap: 9px;
  }

  .brand h1 {
    font-size: 15px;
    max-width: calc(100vw - 134px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .brand p {
    font-size: 11px;
    max-width: calc(100vw - 134px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mark {
    width: 42px;
    height: 42px;
  }

  .menuButton {
    min-width: 52px;
    width: 52px;
    min-height: 52px;
    border-width: 2px;
    font-size: 26px;
    box-shadow:
      0 0 0 6px rgba(0, 0, 0, 0.22),
      0 0 22px rgba(217, 154, 25, 0.12);
  }

  body[data-theme="white"] .menuButton {
    background: rgba(255, 255, 255, 0.92);
    color: var(--gold-2);
    box-shadow:
      0 0 0 6px rgba(255, 255, 255, 0.48),
      0 10px 24px rgba(30, 42, 60, 0.14);
  }

  .statusPanel {
    padding: 0 12px 14px;
    gap: 8px;
  }

  .statusCard {
    min-height: 58px;
    padding: 8px 9px;
  }

  .statusCard strong {
    font-size: 13px;
  }

  .statusCard small {
    font-size: 11px;
    line-height: 1.2;
  }

  .searchBox {
    margin: 10px 12px 0;
  }

  .mainMenu {
    position: fixed;
    top: calc(var(--safe-top) + 122px);
    left: 8px;
    right: 8px;
    z-index: 120;
    max-height: calc(100dvh - var(--safe-top) - var(--safe-bottom) - 134px);
    overscroll-behavior: contain;
  }

  .tabs {
    margin: 0 6px;
  }

  .contacts {
    min-height: 0;
    padding-bottom: max(18px, calc(var(--safe-bottom) + 18px));
    overscroll-behavior: contain;
  }

  .actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0 8px;
  }

  #createGroup,
  #createChannel {
    grid-column: 1 / -1;
  }

  .contact {
    min-height: 58px;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .chatTop {
    width: 100%;
    max-width: 100vw;
    min-height: calc(112px + max(28px, var(--safe-top)));
    align-items: stretch;
    flex-direction: column;
    justify-content: flex-start;
    gap: 8px;
    padding: max(38px, calc(var(--safe-top) + 10px)) max(10px, var(--safe-right)) 10px max(10px, var(--safe-left));
  }

  .chatPeer {
    width: 100%;
    gap: 8px;
    overflow: hidden;
  }

  .chatPeer > div {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
  }

  .backToChats {
    display: inline-grid;
    flex: 0 0 auto;
    place-items: center;
    color: var(--gold-2);
    font-size: 22px;
  }

  .chatAvatar {
    width: 40px;
    height: 40px;
  }

  .chatTop h2 {
    font-size: 17px;
  }

  .chatTop p {
    max-width: 100%;
    font-size: 12px;
  }

  .chatActions {
    width: 100%;
    max-width: calc(100vw - 20px);
    gap: 6px;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .chatActions::-webkit-scrollbar {
    display: none;
  }

  .callMode {
    flex: 0 0 82px;
    width: 82px;
    min-height: 38px;
    padding: 0 6px;
    font-size: 12px;
  }

  .callMode option {
    font-size: 14px;
  }

  .iconButton {
    flex: 0 0 38px;
    min-width: 38px;
    width: 38px;
    min-height: 38px;
  }

  .privacyControls {
    grid-template-columns: 1fr;
  }

  .externalDepsSummary {
    align-items: flex-start;
    flex-direction: column;
  }

  .externalDepsSummaryActions {
    justify-content: flex-start;
    width: 100%;
  }

  .externalDepsSummaryText span {
    text-align: left;
  }

  .callControls,
  .walletActions,
  .walletSwitcher {
    grid-template-columns: 1fr;
  }

  .browserBar,
  .browserTorPanel,
  .proxyForm,
  .proxyRoute,
  .browserSideGrid,
  .roleCreate,
  .roleRow {
    grid-template-columns: 1fr;
  }

  .composer {
    position: sticky;
    bottom: 0;
    z-index: 30;
    grid-template-columns: 44px 54px minmax(0, 1fr) 44px 44px;
    width: 100%;
    max-width: 100vw;
    padding: 8px max(8px, var(--safe-right)) max(8px, calc(var(--safe-bottom) + 8px)) max(8px, var(--safe-left));
    gap: 6px;
    overflow: visible;
  }

  .attachTrigger,
  .emojiTrigger,
  .messageTimerControl,
  .messageTimerControl select,
  .composer input {
    height: 44px;
    min-height: 44px;
  }

  .attachTrigger,
  .emojiTrigger {
    flex: 0 0 44px;
    width: 44px;
    min-width: 44px;
  }

  .messageTimerControl {
    width: 54px;
    min-width: 54px;
  }

  .messageTimerControl select {
    font-size: 12px;
  }

  .messageTimerControl::after {
    right: 5px;
  }

  #sendMessage {
    flex: 0 0 44px;
    min-width: 44px;
    width: 44px;
    padding: 0;
    overflow: hidden;
    white-space: nowrap;
    text-indent: -999px;
    position: relative;
  }

  #sendMessage::after {
    content: "➤";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    text-indent: 0;
    font-size: 18px;
  }

  .attachPanel {
    grid-template-columns: 1fr;
    width: min(218px, calc(100vw - 16px - var(--safe-left) - var(--safe-right)));
    max-height: min(58vh, 330px);
    overflow: auto;
  }

  .messageDeleteButton {
    opacity: 0.68;
  }

  .messages {
    padding: 12px 10px;
    min-height: 0;
    overscroll-behavior: contain;
  }

  .bubble {
    max-width: 88%;
  }

  .profileEditor {
    grid-template-columns: 1fr;
  }

  #profileAvatarPreview {
    width: 96px;
    height: 96px;
    border-radius: 50%;
  }
}
