: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;
  --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;
}

body {
  margin: 0;
  min-height: 100vh;
  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;
}

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;
}

.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;
  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);
}

.sidebar {
  position: relative;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.brand {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 198, 73, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(5, 5, 4, 0.94), rgba(25, 18, 8, 0.72)),
    var(--brand-image) 18% 16% / 480px auto;
  box-shadow: inset 0 1px 0 rgba(255, 215, 128, 0.12), 0 10px 30px rgba(0, 0, 0, 0.2);
}

.brand::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(112deg, transparent 0 62%, rgba(255, 198, 73, 0.22) 63%, transparent 66%);
}

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

.brand h1 {
  margin: 0;
  font-size: 18px;
  line-height: 1.05;
  letter-spacing: 0.08em;
  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: 3px 0 0;
  font-size: 12px;
}

.mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  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 4px rgba(217, 154, 25, 0.08),
    0 0 28px rgba(217, 154, 25, 0.28);
}

.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: 38px;
  width: 38px;
  min-height: 38px;
  padding: 0;
  border-radius: 50%;
  background: rgba(5, 5, 4, 0.66);
  color: var(--gold-2);
  font-size: 20px;
  line-height: 1;
}

.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: 78px;
  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;
}

.mainMenu > 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;
}

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

.mainMenu > 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;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(7, 10, 15, 0.46);
  padding: 6px 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: 34px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 10, 15, 0.58);
  backdrop-filter: blur(14px);
}

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

.tab.active {
  background: linear-gradient(180deg, rgba(255, 211, 109, 0.2), rgba(24, 18, 10, 0.92));
  color: var(--ink);
  border-color: var(--line-strong);
}

.actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

#createInvite {
  background: linear-gradient(180deg, rgba(255, 211, 109, 0.2), rgba(20, 14, 6, 0.9));
  border-color: rgba(255, 211, 109, 0.36);
  color: var(--ink);
  font-weight: 700;
}

#createGroup {
  background: linear-gradient(180deg, rgba(255, 211, 109, 0.14), rgba(20, 14, 6, 0.86));
  border-color: rgba(255, 211, 109, 0.28);
}

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

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

.listEmpty {
  border: 1px dashed rgba(216, 173, 85, 0.26);
  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: 58px;
  border-color: transparent;
  border-radius: 8px;
  padding: 8px 10px 8px 58px;
  background: transparent;
  backdrop-filter: blur(14px);
  box-shadow: none;
}

.contact::before {
  content: attr(data-initials);
  position: absolute;
  left: 10px;
  top: 50%;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  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.active {
  border-color: rgba(255, 211, 109, 0.22);
  background:
    linear-gradient(90deg, rgba(255, 211, 109, 0.18), rgba(255, 211, 109, 0.06) 68%, transparent),
    rgba(216, 173, 85, 0.08);
}

.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.08);
}

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

.contact span {
  margin-top: 4px;
  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;
}

.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;
}

#exportState {
  display: none;
}

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

.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 {
  max-width: min(680px, 82%);
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 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%);
  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;
}

.bubble time {
  display: block;
  margin-top: 5px;
  font-size: 11px;
  opacity: 0.72;
}

.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;
}

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

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

.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 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[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);
}

.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 {
  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;
}

.composer input {
  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;
}

.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);
}

.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;
}

.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;
}

.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(5, 1fr);
  gap: 8px;
}

#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);
}

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

.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;
}

.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(6, 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,
#demoDepositWallet,
#makeTransaction,
#importSeed,
#createAdditionalDemoWallet,
#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;
}

.adminMetric,
.adminRecord {
  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 {
  display: block;
}

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

.adminMetric span,
.adminRecord span,
.adminRecord 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;
}

.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;
}

.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;
}

.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);
}

.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 button {
  grid-column: 1 / -1;
  justify-self: start;
}

#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 {
    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;
    padding: 0;
    gap: 0;
  }

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

  .sidebar {
    border-bottom: 1px solid var(--line);
    max-height: 42vh;
    padding: 8px;
    gap: 8px;
  }

  .chat {
    min-height: 58vh;
    border-top: 0;
  }

  .brandTop {
    min-height: 50px;
    padding: 6px 8px;
  }

  .brand h1 {
    font-size: 16px;
  }

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

  .mainMenu {
    top: 64px;
    left: 8px;
    right: 8px;
    max-height: min(78vh, 620px);
  }

  .tabs {
    gap: 4px;
  }

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

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

  .contact {
    min-height: 54px;
    padding-top: 7px;
    padding-bottom: 7px;
  }

  .chatTop {
    min-height: 72px;
    align-items: center;
    flex-direction: row;
    gap: 10px;
    padding: 10px;
  }

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

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

  .chatTop p {
    max-width: 46vw;
    font-size: 12px;
  }

  .chatActions {
    gap: 6px;
  }

  .callMode {
    width: 40px;
    min-height: 38px;
    padding: 0;
    font-size: 0;
  }

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

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

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

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

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

  .composer {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    padding: 8px;
    gap: 6px;
  }

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

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

  #sendMessage {
    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(210px, calc(100vw - 16px));
  }

  .messages {
    padding: 12px 10px;
  }

  .bubble {
    max-width: 88%;
  }

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

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