:root {
  --bg: #f2f2f3;
  --bg-soft: #ffffff;
  --card-bg: #ffffff;
  --line: #e2e2e5;
  --text: #17181a;
  --muted-text: #6b6f76;
  --accent: #111113;
  --accent-2: #3f3f45;
  --sidebar-bg: #0c0c0e;
  --sidebar-line: #232327;
  --sidebar-text: #d6d6d9;
  --sidebar-muted: #8a8a90;
  --radius: 14px;
  --shadow-card: 0 10px 24px rgba(17, 17, 19, 0.06);
  --font-sans: "Inter", "gg sans", "Segoe UI", system-ui, sans-serif;
  --font-display: "Plus Jakarta Sans", "Inter", "gg sans", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes pulseRing {
  0% { box-shadow: 0 0 0 0 rgba(79, 206, 122, 0.45); }
  70% { box-shadow: 0 0 0 7px rgba(79, 206, 122, 0); }
  100% { box-shadow: 0 0 0 0 rgba(79, 206, 122, 0); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes shimmer {
  0% { background-position: -200px 0; }
  100% { background-position: calc(200px + 100%) 0; }
}

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .brand strong, .stat .value, .wallet-hero-value, .login-card h1 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

::selection { background: rgba(17, 17, 19, 0.15); color: #17181a; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d3d3d6; border-radius: 999px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #b8b8bc; }

.hidden { display: none !important; }
.muted { color: var(--muted-text); }
.small { font-size: 12px; }
.error { color: #c23b3b; min-height: 18px; margin: 8px 0 0; font-size: 13px; }

.login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 30% 20%, #1c1c1f 0%, #0c0c0e 60%);
}

.login-card {
  width: 380px;
  max-width: 92vw;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  animation: scaleIn 0.35s ease both;
}

.login-card h1 { margin: 0; font-size: 22px; letter-spacing: -0.01em; }
.login-mark {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: linear-gradient(135deg, #17181c 0%, #0c0c0e 100%);
  color: #ffffff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 19px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  box-shadow: 0 8px 18px rgba(17, 17, 19, 0.22);
}

.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }

.sidebar {
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-line);
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
  gap: 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  animation: fadeIn 0.4s ease both;
}

.brand { padding: 4px 6px 16px; border-bottom: 1px solid var(--sidebar-line); margin-bottom: 4px; }
.brand strong { font-family: var(--font-display); font-size: 22px; font-weight: 800; color: #ffffff; letter-spacing: -0.02em; }
.nav { display: flex; flex-direction: column; gap: 4px; overflow-y: auto; flex: 1; }
.nav-section-label { color: var(--sidebar-muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; padding: 12px 12px 4px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border-radius: 10px;
  color: var(--sidebar-muted);
  cursor: pointer;
  border: 1px solid transparent;
  background: none;
  text-align: left;
  font-size: 13.5px;
  width: 100%;
}
.nav-item { transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease; }
.nav-item:hover { background: #17171a; color: #ffffff; transform: translateX(2px); }
.nav-item.active { background: #1c1c20; color: #ffffff; border-color: #2c2c31; box-shadow: inset 2px 0 0 #ffffff; }
.nav-item:active { transform: translateX(2px) scale(0.98); }
.nav-item .nav-icon { width: 17px; height: 17px; flex: none; display: flex; align-items: center; justify-content: center; opacity: 0.85; }
.nav-item .nav-icon svg { width: 100%; height: 100%; }
.nav-item:hover .nav-icon, .nav-item.active .nav-icon { opacity: 1; }
.nav-item.active .nav-icon { color: #ffffff; }

.sidebar-foot { display: flex; flex-direction: column; gap: 8px; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid var(--sidebar-line);
  background: #141416;
  color: var(--sidebar-text);
}
.pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--sidebar-muted); transition: background 0.2s ease; }
.pill-on { color: #7fdba0; border-color: #204a30; }
.pill-on i { background: #4fce7a; animation: pulseRing 1.8s infinite; }
.pill-off { color: var(--sidebar-muted); }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 100vh; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 26px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  z-index: 5;
}
.topbar h2 { margin: 0; font-size: 18px; letter-spacing: -0.01em; animation: fadeIn 0.3s ease both; }
.topbar-actions { display: flex; gap: 8px; }

.view { padding: 24px 26px 40px; display: flex; flex-direction: column; gap: 18px; flex: 1; }
.view-stack { display: flex; flex-direction: column; gap: 18px; }
.view.view-fade { animation: fadeInUp 0.3s ease both; }

.loading { display: flex; align-items: center; gap: 10px; color: var(--muted-text); padding: 6px 0; }
.spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  animation: spin 0.7s linear infinite;
  flex: none;
}

.footer {
  padding: 16px 26px;
  border-top: 1px solid var(--line);
  color: var(--muted-text);
  font-size: 12px;
  text-align: center;
  background: var(--bg-soft);
}
.footer-login {
  border-top: 1px solid var(--line);
  margin-top: 6px;
  padding: 14px 0 0;
  background: transparent;
  text-align: center;
}

.btn {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
  padding: 9px 15px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
}
.btn { transition: border-color 0.15s ease, transform 0.12s ease, filter 0.15s ease, background 0.15s ease, box-shadow 0.15s ease; }
.btn:hover { border-color: #b8b8bc; background: #f7f7f8; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(17, 17, 19, 0.08); }
.btn.primary { background: var(--accent); color: #ffffff; font-weight: 700; border: none; }
.btn.primary:hover { filter: brightness(1.25); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(17, 17, 19, 0.22); }
.btn.ghost { background: transparent; }
.btn.danger { background: transparent; border-color: #e3c3c3; color: #c23b3b; }
.btn.danger:hover { border-color: #d99a9a; background: rgba(194, 59, 59, 0.06); }
.btn.small { padding: 6px 10px; font-size: 12px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn:active:not(:disabled) { transform: translateY(0) scale(0.98); }

.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-card);
  animation: fadeInUp 0.35s ease both;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(17, 17, 19, 0.1); border-color: #d5d5d8; }
.card h3 { margin: 0 0 4px; font-size: 15px; }
.card .card-sub { color: var(--muted-text); font-size: 12px; margin-bottom: 14px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-head h3 { margin: 0; }
.card-title-row { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.card-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.card-icon svg { width: 17px; height: 17px; }
.card-title-row h3 { margin: 0; }

.stat { display: flex; flex-direction: column; gap: 4px; }
.stat .value { font-size: 26px; font-weight: 700; }
.stat .label { color: var(--muted-text); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; }

.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  gap: 14px;
  animation: fadeInUp 0.35s ease both;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(17, 17, 19, 0.1); border-color: #d5d5d8; }
.stat-card .card-icon { width: 40px; height: 40px; border-radius: 11px; }
.stat-card .card-icon svg { width: 19px; height: 19px; }
.stat-card .stat { gap: 3px; }
.stat-card .stat .value { font-size: 21px; }

.overview-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(135deg, #17181c 0%, #0c0c0e 75%);
  border: 1px solid var(--sidebar-line);
  border-radius: var(--radius);
  padding: 22px 26px;
  color: #ffffff;
  box-shadow: var(--shadow-card);
  animation: fadeInUp 0.3s ease both;
}
.overview-hero-title { font-family: var(--font-display); font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.overview-hero-sub { color: #9a9aa0; font-size: 12.5px; margin-top: 6px; }
.overview-hero-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.overview-hero-icon svg { width: 26px; height: 26px; }
.overview-hero-icon.ok { color: #7fdba0; }
.overview-hero-icon.warn { color: #e3c07a; }
.overview-hero-icon.err { color: #e39a9a; }

.chain-list { display: flex; flex-wrap: wrap; gap: 8px; }
.chain-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px 6px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg);
  font-size: 12.5px;
  font-weight: 600;
}
.chain-chip .chain-dot { width: 8px; height: 8px; border-radius: 50%; background: #2f8a52; flex: none; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field label { font-size: 12.5px; color: var(--muted-text); }
.field .hint { font-size: 11.5px; color: #8a8d93; }
input, select, textarea {
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 9px 11px;
  font-size: 13px;
  font-family: inherit;
}
input, select, textarea { transition: border-color 0.15s ease, box-shadow 0.15s ease; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(17, 17, 19, 0.08); }
textarea { resize: vertical; min-height: 70px; }
input[type="color"] { padding: 3px; height: 40px; cursor: pointer; }

.row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.row > .field { margin-bottom: 0; flex: 1; min-width: 150px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); }
th { color: var(--muted-text); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.05em; }
tr:last-child td { border-bottom: none; }
tbody tr { transition: background 0.12s ease; }
tbody tr:hover td { background: rgba(17, 17, 19, 0.025); }
.table-wrap { overflow-x: auto; }

.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  border: 1px solid var(--line);
  background: #f5f5f6;
}
.badge.green { color: #2f8a52; border-color: #cdeada; background: #f0faf3; }
.badge.yellow { color: #9a7300; border-color: #f0e0ad; background: #fdf9ec; }
.badge.red { color: #c23b3b; border-color: #f0cccc; background: #fbf0f0; }
.badge.blue { color: var(--text); border-color: var(--line); background: #f0f0f1; }

.banner-preview {
  width: 100%;
  height: 130px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: #f0f0f1;
}

.swatch { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); }

.emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.emoji-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f9f9fa;
}
.emoji-cell img { width: 28px; height: 28px; object-fit: contain; }
.emoji-cell .emoji-name { font-size: 12px; color: var(--muted-text); }

.console {
  background: #0c0c0e;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  height: 380px;
  overflow-y: auto;
  font-family: "Consolas", monospace;
  font-size: 12px;
  line-height: 1.5;
  color: #d6d6d9;
}
.console .log-line { white-space: pre-wrap; word-break: break-word; }
.console .log-time { color: #8a8a90; margin-right: 8px; }
.console .log-line.err { color: #e39a9a; }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 13px; }
.kv .k { color: var(--muted-text); }

.path { font-family: "Consolas", monospace; font-size: 12px; color: var(--muted-text); word-break: break-all; }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.toast {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 50;
  background: #ffffff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  padding: 12px 16px;
  border-radius: 10px;
  min-width: 240px;
  max-width: 380px;
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.34, 1.4, 0.64, 1);
  pointer-events: none;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}
.toast.show { transform: translateY(0) scale(1); }

.row-active td { background: rgba(17, 17, 19, 0.04); }

.embed-intro h3 { margin-bottom: 6px; }

.embed-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}
.embed-toolbar .embed-search { flex: 1; max-width: 360px; margin: 0; }
.embed-toolbar .btn { white-space: nowrap; }

.embed-group { padding: 0; overflow: hidden; }
.embed-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  cursor: pointer;
  user-select: none;
}
.embed-group-head:hover { background: rgba(17, 17, 19, 0.03); }
.embed-group-title { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.embed-group-title h3 { margin: 0; }
.embed-group-count { font-size: 12px; color: #8a8d93; }
.embed-group-chevron {
  color: #8a8d93;
  transition: transform 0.15s ease;
  flex: none;
}
.embed-group.collapsed .embed-group-chevron { transform: rotate(-90deg); }
.embed-group-body {
  padding: 0 18px 18px;
}
.embed-group.collapsed .embed-group-body { display: none; }
.embed-group.hidden { display: none; }
.embed-item.hidden { display: none; }

.embed-cheatsheet {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 6px 16px;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.cheat-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted-text); }
.cheat-row code {
  background: #f0f0f1;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 11.5px;
  color: #333338;
  font-family: "Consolas", monospace;
}
.cheat-arrow { color: #b0b0b4; }
.cheat-sample { color: #333338; }
.discord-quote-sample { border-left: 3px solid #4e5058; padding-left: 8px; color: #333338; }
.discord-subtext-sample { color: #8a8d93; font-size: 11.5px; }

.embed-columns {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(300px, 1fr);
  gap: 20px;
  align-items: start;
}
@media (max-width: 980px) {
  .embed-columns { grid-template-columns: 1fr; }
}

.embed-list { display: flex; flex-direction: column; gap: 16px; }
.embed-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: #fafafb;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.embed-item-head { display: flex; align-items: center; gap: 10px; }
.embed-hint { font-size: 11.5px; color: #8a8d93; margin-top: -4px; }
.embed-hint code {
  background: #f0f0f1;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 5px;
  color: #333338;
  font-family: "Consolas", monospace;
}
.embed-item-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.embed-item-actions .embed-emoji-select { max-width: 220px; }
.ws-select { background:#ffffff; color:var(--text); border:1px solid var(--line); border-radius:8px; padding:6px 10px; font-size:13px; }

/* Button items: label input + visual emoji picker ------------------- */
.embed-item-button { background: #f5f5f6; }
.embed-button-row { display: flex; align-items: center; gap: 8px; }
.embed-button-row .embed-button-label { flex: 1; margin: 0; }

.emoji-pick { position: relative; flex: none; }
.emoji-pick-trigger {
  display: flex;
  align-items: center;
  gap: 7px;
  background: #ffffff;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13px;
  cursor: pointer;
  min-width: 128px;
}
.emoji-pick-trigger:hover { border-color: #b8b8bc; }
.emoji-pick-trigger img.discord-emoji { width: 18px; height: 18px; margin: 0; }
.emoji-pick-name { flex: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.emoji-pick-chevron { color: #8a8d93; font-size: 11px; }

.emoji-pick-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 20;
  width: 260px;
  max-height: 260px;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
  padding: 8px;
}
.emoji-pick-menu.hidden { display: none; }
.emoji-pick-grid { display: flex; flex-direction: column; gap: 2px; }
.emoji-pick-option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: transparent;
  border: none;
  border-radius: 8px;
  padding: 6px 8px;
  color: var(--text);
  font-size: 12.5px;
  text-align: left;
  cursor: pointer;
}
.emoji-pick-option:hover { background: rgba(17, 17, 19, 0.05); }
.emoji-pick-option img.discord-emoji { width: 18px; height: 18px; margin: 0; flex: none; }
.emoji-pick-option .discord-emoji-fallback { flex: none; }

/* -----------------------------------------------------------------
   Discord-accurate message preview
   Colors match Discord's dark theme (#313338 chat bg, #2b2d31 card).
   Kept as-is intentionally: this simulates the real Discord UI.
------------------------------------------------------------------ */

.discord-chat-frame {
  position: sticky;
  top: 90px;
  background: #313338;
  border: 1px solid #1e1f22;
  border-radius: 12px;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: "gg sans", "Whitney", "Helvetica Neue", Helvetica, Arial, sans-serif;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02), 0 10px 30px rgba(0, 0, 0, 0.35);
}

.discord-msg-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #80848e;
  font-weight: 700;
  margin: 6px 2px 2px;
}
.discord-msg-gap { height: 4px; }

.discord-message { display: flex; gap: 14px; padding: 6px 4px; border-radius: 6px; }
.discord-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  color: #17181a;
  background: linear-gradient(135deg, #e4e4e6, #ffffff);
}
.discord-message-body { flex: 1; min-width: 0; }
.discord-message-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 3px; flex-wrap: wrap; }
.discord-username { font-weight: 600; color: #f2f3f5; font-size: 15px; }
.discord-bot-tag {
  background: #5865f2;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px 2px;
  border-radius: 4px;
  line-height: 1.4;
  letter-spacing: 0.02em;
}
.discord-timestamp { font-size: 12px; color: #949ba4; }

.discord-container {
  position: relative;
  background: #2b2d31;
  border-radius: 8px;
  padding: 12px 14px 12px 18px;
  overflow: hidden;
}
.discord-container::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--accent, #111113);
}

.discord-p { font-size: 14.5px; line-height: 1.45; color: #dbdee1; margin: 3px 0; word-break: break-word; }
.discord-h1 { font-size: 19px; font-weight: 800; line-height: 1.3; color: #f2f3f5; margin: 5px 0 3px; }
.discord-h2 { font-size: 16.5px; font-weight: 800; line-height: 1.3; color: #f2f3f5; margin: 5px 0 3px; }
.discord-h3 { font-size: 14.5px; font-weight: 800; line-height: 1.3; color: #dbdee1; margin: 5px 0 3px; }
.discord-subtext { font-size: 12px; color: #949ba4; margin: 3px 0; }
.discord-quote {
  border-left: 4px solid #4e5058;
  padding-left: 10px;
  margin: 4px 0;
  font-size: 14.5px;
  line-height: 1.45;
  color: #dbdee1;
}
.discord-inline-code {
  background: #1e1f22;
  border-radius: 4px;
  padding: 1px 5px;
  font-family: "Consolas", monospace;
  font-size: 0.85em;
  color: #dbdee1;
}
.discord-codeblock {
  background: #1e1f22;
  border-radius: 4px;
  padding: 8px 10px;
  margin: 4px 0;
  font-family: "Consolas", monospace;
  font-size: 12.5px;
  line-height: 1.5;
  color: #dbdee1;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}
.discord-tab { display: inline-block; width: 1.4em; }

.discord-emoji { width: 20px; height: 20px; object-fit: contain; vertical-align: -5px; margin: 0 1px; }
.discord-emoji-fallback {
  display: inline-block;
  padding: 0 5px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: #949ba4;
  font-size: 11px;
  font-family: "Consolas", monospace;
  vertical-align: 1px;
}

.discord-dynamic { border-bottom: 1px dotted #949ba4; color: #cfd2d6; cursor: help; }
.discord-var {
  display: inline-block;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #dbdee1;
  font-size: 0.85em;
  font-family: "Consolas", monospace;
  cursor: help;
}

.discord-divider { height: 1px; background: rgba(255, 255, 255, 0.06); margin: 8px -4px; }

.discord-media { margin: 2px 0; }
.discord-media img { width: 100%; max-height: 200px; object-fit: cover; border-radius: 8px; display: block; background: #1e1f22; }

.discord-button-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 2px; }
.discord-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 6px;
  border: none;
  font-size: 13.5px;
  font-weight: 600;
  cursor: default;
  font-family: inherit;
  transition: filter 0.12s ease;
}
.discord-btn:hover { filter: brightness(1.1); }
.discord-btn img.discord-emoji { width: 16px; height: 16px; vertical-align: -3px; margin: 0; }
.discord-btn-primary { background: #5865f2; color: #fff; }
.discord-btn-secondary { background: #4e5058; color: #fff; }
.discord-btn-success { background: #248046; color: #fff; }
.discord-btn-danger { background: #da373c; color: #fff; }

.discord-select { margin: 6px 0 2px; }
.discord-select-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #1e1f22;
  border-radius: 8px;
  padding: 10px 12px;
  color: #949ba4;
  font-size: 14px;
}
.discord-select-chevron { color: #949ba4; font-size: 12px; }
.discord-select-hint { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.discord-select-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #1e1f22;
  border-radius: 999px;
  padding: 3px 9px 3px 5px;
  font-size: 11px;
  color: #949ba4;
}
.discord-select-chip .discord-emoji { width: 16px; height: 16px; vertical-align: -3px; }

/* Wallets page - Trust Wallet / Crypto.com style balance card + coin list */
.wallet-hero {
  background: linear-gradient(135deg, #17181c 0%, #0c0c0e 70%);
  border: 1px solid var(--sidebar-line);
  border-radius: var(--radius);
  padding: 24px 26px;
  color: #ffffff;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  box-shadow: var(--shadow-card);
  animation: fadeInUp 0.35s ease both;
}
.wallet-hero-label { color: #9a9aa0; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px; }
.wallet-hero-value { font-size: 34px; font-weight: 700; letter-spacing: -0.02em; }
.wallet-hero-sub { color: #9a9aa0; font-size: 12.5px; margin-top: 8px; }
.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid #2c2c31;
  background: #17171a;
  color: #d6d6d9;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 15px;
  flex: none;
  transition: transform 0.15s ease, background 0.15s ease;
}
.icon-btn:hover { background: #1e1e22; transform: rotate(90deg); }
.icon-btn:active { transform: rotate(90deg) scale(0.92); }
.icon-btn.spin { animation: spin 0.7s linear infinite; }

.asset-list { display: flex; flex-direction: column; gap: 10px; }
.asset-row {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-card);
  animation: fadeInUp 0.3s ease both;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.asset-row:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(17, 17, 19, 0.1); }
.asset-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: -0.02em;
}
.asset-main { flex: 1; min-width: 0; }
.asset-name { font-weight: 600; font-size: 14px; }
.asset-sub { color: var(--muted-text); font-size: 12px; margin-top: 2px; }
.asset-amounts { text-align: right; flex: none; }
.asset-balance { font-weight: 600; font-size: 14px; }
.asset-usd { color: var(--muted-text); font-size: 12px; margin-top: 2px; }
.asset-actions { flex: none; }
.asset-details { margin-top: 10px; }
.asset-details summary { cursor: pointer; color: var(--muted-text); font-size: 12px; list-style: none; }
.asset-details summary::-webkit-details-marker { display: none; }
.asset-details summary:hover { color: var(--text); }
.asset-addr-list { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.asset-addr-row { display: flex; align-items: center; gap: 8px; font-size: 12px; flex-wrap: wrap; }
.asset-addr-row .idx { color: var(--muted-text); min-width: 18px; }

.asset-icon-emoji { background: var(--bg); border: 1px solid var(--line); }
.asset-icon-emoji img.emoji { width: 26px; height: 26px; object-fit: contain; }
.pending-note { color: #9a7300; }

.withdraw-summary {
  background: #f7f7f8;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12.5px;
  color: var(--muted-text);
  margin-bottom: 12px;
}
.withdraw-result { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.withdraw-result-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12.5px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.withdraw-result-row:last-child { border-bottom: none; }

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